@@ -80,8 +80,8 @@ export class AdvancedComponent implements OnInit {
80
80
this . lazyElementLoaderService . preload ( ) ;
81
81
}
82
82
83
- preloadFab ( ) {
84
- this . lazyElementLoaderService . preload ( [ 'mwc-fab ' ] ) ;
83
+ preloadSome ( ) {
84
+ this . lazyElementLoaderService . preload ( [ 'sl-avatar ' ] ) ;
85
85
}
86
86
}
87
87
@@ -139,8 +139,8 @@ const CODE_EXAMPLE_2_MODULE = `// pre-configured LazyElementsModule in FeatureMo
139
139
const options: LazyElementModuleOptions = {
140
140
elementConfigs: [
141
141
{
142
- tag: 'mwc -checkbox',
143
- url: 'https://unpkg.com/@material/[email protected] .0/mwc- checkbox.js?module '
142
+ tag: 'sl -checkbox',
143
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] .0/dist/components/ checkbox/checkbox .js'
144
144
}
145
145
]
146
146
};
@@ -157,8 +157,8 @@ export class FeatureModule { }
157
157
const CODE_EXAMPLE_2_STANDALONE = `// pre-configured routes based lazy feature
158
158
const configs: ElementConfig[] = [
159
159
{
160
- tag: 'wired-button ',
161
- url: 'https://unpkg.com/@material/[email protected] .0/mwc- checkbox.js?module ',
160
+ tag: 'sl-checkbox ',
161
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] .0/dist/components/ checkbox/checkbox .js',
162
162
}
163
163
];
164
164
@@ -177,14 +177,14 @@ export default <Routes>[
177
177
},
178
178
];` ;
179
179
const CODE_EXAMPLE_2_HTML = `<!-- We have to specify null; url to be able to pass in additional options -->
180
- <mwc -checkbox *axLazyElement="null; module: true; loadingTemplate: loading;"></mwc -checkbox>` ;
180
+ <sl -checkbox *axLazyElement="null; module: true; loadingTemplate: loading;"></sl -checkbox>` ;
181
181
182
182
const CODE_EXAMPLE_3_MODULE = `// pre-configured LazyElementsModule
183
183
const options: LazyElementModuleOptions = {
184
184
elementConfigs: [
185
185
{
186
- tag: 'mwc -switch',
187
- url: 'https://unpkg.com/@material/[email protected] .0/mwc- switch.js?module ',
186
+ tag: 'sl -switch',
187
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] .0/dist/components/ switch/switch .js',
188
188
isModule: true
189
189
}
190
190
]
@@ -202,8 +202,8 @@ export class FeatureModule { }
202
202
const CODE_EXAMPLE_3_STANDALONE = `// pre-configured routes based lazy feature
203
203
const configs: ElementConfig[] = [
204
204
{
205
- tag: 'wired-button ',
206
- url: 'https://unpkg.com/@material/[email protected] .0/mwc-checkbox .js?module ',
205
+ tag: 'sl-switch ',
206
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] .0/dist/components/switch/switch .js',
207
207
isModule: true
208
208
}
209
209
];
@@ -223,10 +223,10 @@ export default <Routes>[
223
223
},
224
224
];` ;
225
225
const CODE_EXAMPLE_3_HTML = `<!-- We have to specify null; url to be able to pass in additional options -->
226
- <mwc -switch *axLazyElement="null; loadingTemplate: loading;"></mwc -switch>` ;
226
+ <sl -switch *axLazyElement="null; loadingTemplate: loading;"></sl -switch>` ;
227
227
228
228
const CODE_EXAMPLE_4_HTML = `<!-- This can be used in any place in the whole application -->
229
- <mwc-fab icon="code" *axLazyElement></mwc-fab >` ;
229
+ <sl-avatar *axLazyElement></sl-avatar >` ;
230
230
const CODE_EXAMPLE_4_CORE_MODULE = `// pre-configured LazyElementsModule in CoreModule or AppModule
231
231
const options: LazyElementModuleRootOptions = {
232
232
rootOptions: {
@@ -236,8 +236,8 @@ const options: LazyElementModuleRootOptions = {
236
236
},
237
237
elementConfigs: [
238
238
{
239
- tag: 'mwc-switch ',
240
- url: 'https://unpkg.com/@material/[email protected] .0/mwc-switch .js?module '
239
+ tag: 'sl-avatar ',
240
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] .0/dist/components/avatar/avatar .js'
241
241
}
242
242
]
243
243
};
@@ -262,8 +262,8 @@ bootstrapApplication(AppComponent, {
262
262
},
263
263
elementConfigs: [
264
264
{
265
- tag: 'mwc-switch ',
266
- url: 'https://unpkg.com/@material/[email protected] .0/mwc-switch .js?module '
265
+ tag: 'sl-avatar ',
266
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] .0/dist/components/avatar/avatar .js'
267
267
}
268
268
]
269
269
}),
@@ -280,7 +280,7 @@ class LazyFeatureComponent {
280
280
}
281
281
282
282
preloadFab() {
283
- this.lazyElementLoaderService.preload(['mwc-fab ']);
283
+ this.lazyElementLoaderService.preload(['sl-avatar ']);
284
284
}
285
285
}
286
286
` ;
@@ -292,8 +292,8 @@ const CODE_EXAMPLE_6_STANDALONE = `export function beforeLoadHook(tag: string):
292
292
293
293
const options: ElementConfig[] = [
294
294
{
295
- tag: 'mwc-slider ',
296
- url: 'https://unpkg.com/@material/[email protected] /mwc-slider .js?module ',
295
+ tag: 'sl-range ',
296
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] /dist/components/range/range .js',
297
297
isModule: true,
298
298
hooks: {
299
299
beforeLoad: beforeLoadHook
@@ -325,8 +325,8 @@ export function beforeLoadHook(tag: string): Promise<void> {
325
325
const options: LazyElementModuleOptions = {
326
326
elementConfigs: [
327
327
{
328
- tag: 'mwc-slider ',
329
- url: 'https://unpkg.com/@material/[email protected] /mwc-slider .js?module ',
328
+ tag: 'sl-range ',
329
+ url: 'https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected] /dist/components/range/range .js',
330
330
isModule: true,
331
331
hooks: {
332
332
beforeLoad: beforeLoadHook
@@ -346,7 +346,7 @@ const options: LazyElementModuleOptions = {
346
346
})
347
347
export class FeatureModule { }
348
348
` ;
349
- const CODE_EXAMPLE_6_HTML = `<mwc-slider *axLazyElement></mwc-slider >` ;
349
+ const CODE_EXAMPLE_6_HTML = `<sl-range *axLazyElement></sl-range >` ;
350
350
351
351
const CODE_EXAMPLE_7_HTML = `<!-- No need to specify url -->
352
352
<wired-toggle *axLazyElement (change)="toggle()"></wired-toggle>` ;
0 commit comments