@@ -80,8 +80,8 @@ export class AdvancedComponent implements OnInit {
8080 this . lazyElementLoaderService . preload ( ) ;
8181 }
8282
83- preloadFab ( ) {
84- this . lazyElementLoaderService . preload ( [ 'mwc-fab ' ] ) ;
83+ preloadSome ( ) {
84+ this . lazyElementLoaderService . preload ( [ 'sl-avatar ' ] ) ;
8585 }
8686}
8787
@@ -139,8 +139,8 @@ const CODE_EXAMPLE_2_MODULE = `// pre-configured LazyElementsModule in FeatureMo
139139const options: LazyElementModuleOptions = {
140140 elementConfigs: [
141141 {
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' 144144 }
145145 ]
146146};
@@ -157,8 +157,8 @@ export class FeatureModule { }
157157const CODE_EXAMPLE_2_STANDALONE = `// pre-configured routes based lazy feature
158158const configs: ElementConfig[] = [
159159 {
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', 162162 }
163163];
164164
@@ -177,14 +177,14 @@ export default <Routes>[
177177 },
178178];` ;
179179const 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>` ;
181181
182182const CODE_EXAMPLE_3_MODULE = `// pre-configured LazyElementsModule
183183const options: LazyElementModuleOptions = {
184184 elementConfigs: [
185185 {
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', 188188 isModule: true
189189 }
190190 ]
@@ -202,8 +202,8 @@ export class FeatureModule { }
202202const CODE_EXAMPLE_3_STANDALONE = `// pre-configured routes based lazy feature
203203const configs: ElementConfig[] = [
204204 {
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', 207207 isModule: true
208208 }
209209];
@@ -223,10 +223,10 @@ export default <Routes>[
223223 },
224224];` ;
225225const 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>` ;
227227
228228const 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 >` ;
230230const CODE_EXAMPLE_4_CORE_MODULE = `// pre-configured LazyElementsModule in CoreModule or AppModule
231231const options: LazyElementModuleRootOptions = {
232232 rootOptions: {
@@ -236,8 +236,8 @@ const options: LazyElementModuleRootOptions = {
236236 },
237237 elementConfigs: [
238238 {
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' 241241 }
242242 ]
243243};
@@ -262,8 +262,8 @@ bootstrapApplication(AppComponent, {
262262 },
263263 elementConfigs: [
264264 {
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' 267267 }
268268 ]
269269 }),
@@ -280,7 +280,7 @@ class LazyFeatureComponent {
280280 }
281281
282282 preloadFab() {
283- this.lazyElementLoaderService.preload(['mwc-fab ']);
283+ this.lazyElementLoaderService.preload(['sl-avatar ']);
284284 }
285285}
286286` ;
@@ -292,8 +292,8 @@ const CODE_EXAMPLE_6_STANDALONE = `export function beforeLoadHook(tag: string):
292292
293293const options: ElementConfig[] = [
294294 {
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', 297297 isModule: true,
298298 hooks: {
299299 beforeLoad: beforeLoadHook
@@ -325,8 +325,8 @@ export function beforeLoadHook(tag: string): Promise<void> {
325325const options: LazyElementModuleOptions = {
326326 elementConfigs: [
327327 {
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', 330330 isModule: true,
331331 hooks: {
332332 beforeLoad: beforeLoadHook
@@ -346,7 +346,7 @@ const options: LazyElementModuleOptions = {
346346})
347347export class FeatureModule { }
348348` ;
349- const CODE_EXAMPLE_6_HTML = `<mwc-slider *axLazyElement></mwc-slider >` ;
349+ const CODE_EXAMPLE_6_HTML = `<sl-range *axLazyElement></sl-range >` ;
350350
351351const CODE_EXAMPLE_7_HTML = `<!-- No need to specify url -->
352352<wired-toggle *axLazyElement (change)="toggle()"></wired-toggle>` ;
0 commit comments