ngx-skeleton-loader 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,512 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/).
7
+
8
+ ## [Unreleased][]
9
+
10
+ ## [6.0.0][] - 2022-08-18
11
+
12
+ ### Updated
13
+
14
+ - Adding Publishing setup using NPX
15
+ - Replacing CSS class namespace from `.loader` to `.skeleton-loader`
16
+
17
+ #### Breaking Change
18
+
19
+ The CSS class used as namespace was changed. Previously, it was called `.loader` and now is `.skeleton-loader`. It might cause some issues in cases of `:host` DOM style scoping usage. For the sake of semantic versioning, please bear in mind this scenario in case of `:host` usage.
20
+
21
+ ## [5.0.0][] - 2022-02-08
22
+
23
+ ### Updated
24
+
25
+ > Thanks @yharaskrik
26
+
27
+ #### Breaking Change
28
+
29
+ Bundle distribution are now `esm2020`, `fesm2015` and `fesm2020`. UMD and CommonJS versions were support were removed from Angular CLI directly. So the next version for the package will be a major version to cover these changes accordingly.
30
+
31
+ - Updating package bundle distribution
32
+ - Updating `@angular/cli` to v13
33
+ - Applying project changes to v13
34
+ - Updating bundlesize check to point to `fesm2020`
35
+
36
+ ## [4.0.0][] - 2021-07-28
37
+
38
+ ### Fixed
39
+
40
+ #### Breaking Change
41
+
42
+ - Rolling back "Adding mechanism to prevents calling `forRoot()` more than once if module is loaded asynchronously in a submodule.". Unfortunately, this was affecting consumers and it needed to be reverted to avoid friction in other applications.
43
+
44
+ If you need to have this feature in place, the suggestion is to create a specific module in your app and apply the changes on your application.
45
+
46
+ ## [3.0.0][] - 2021-07-23
47
+
48
+ ### Added
49
+
50
+ #### Breaking Change
51
+
52
+ - Adding mechanism to prevents calling `forRoot()` more than once if module is loaded asynchronously in a submodule. This is required in order to avoid issues in consumers. To avoid that, consumers should load the module once on the main module instead - if loading submodules async.
53
+
54
+ ## [2.10.1][] - 2021-07-13
55
+
56
+ ### Fixed
57
+
58
+ - Ensures every ARIA progressbar node has an accessible name. This is caused by missing aria-label on the `<span>` element.
59
+
60
+ Thanks @rkristelijn for raising the issue and the pull request!
61
+
62
+ ## [2.10.0][] - 2021-06-15
63
+
64
+ ### Added
65
+
66
+ - Adding module configuration support via `forRoot()` method. Now you can add configure your module via `forRoot()`. You can now set the default of `appearance`, `animation`, `theme`, `loadingText`, `count` and/or `items`.E.G.
67
+
68
+ ```ts
69
+
70
+ @NgModule({
71
+ // ...
72
+ imports: [NgxSkeletonLoaderModule.forRoot({ appearance: 'circle', count: 3 )],
73
+ // ...
74
+ })
75
+ ```
76
+
77
+ ## [2.9.2][] - 2021-04-11
78
+
79
+ ### Updated
80
+
81
+ - Updating link in README.md
82
+
83
+ ### Fixed
84
+
85
+ - Bumping dev dependencies to avoid security issues
86
+
87
+ ## [2.9.1][] - 2021-02-20
88
+
89
+ ### Fixed
90
+
91
+ - Adding `appearance` attribute to be checked via `ngOnChanges`
92
+
93
+ ### Updated
94
+
95
+ - Updating examples with new features
96
+
97
+ ## [2.9.0][] - 2021-02-19
98
+
99
+ ### Added
100
+
101
+ - Adding validation for @Input attributes that needs internal manipulation. After these changes:
102
+ - if `count` is not a numeric value, it will use the default value as `1`
103
+ - if `animation` is not a valid attribute, it will use the default value as `progress`
104
+ - PS: The other values alredy have a fallback, so nothing to worry here
105
+ - Adding error feedback for `appearance` attribute in case of wrong configuration. Now it will show a error message on the console in case of receiving a wrong value
106
+
107
+ ### Updated
108
+
109
+ - Adding `ngOnChange` to validate `count` input in case of changes via binding
110
+ - Updating `README.md` with information about `appearance` and `theme` usage.
111
+
112
+ ## [2.8.0][] - 2021-02-18
113
+
114
+ ### Fixed
115
+
116
+ - Using `ngAcceptInputType_count` for template checking in count input. That solves issue https://github.com/willmendesneto/ngx-skeleton-loader/issues/59. You can find more details about it in https://angular.io/guide/template-typecheck
117
+ - Fixing type issues on `yarn build:ssr` command
118
+
119
+ ### Updated
120
+
121
+ - Updating `perf-marks` to `v1.14.1`
122
+ - Adding strict mode support in module
123
+ - Updating types for `theme` to match with `ngStyle`. More details in https://angular.io/api/common/NgStyle#properties
124
+
125
+ ## [2.7.0][] - 2021-02-06
126
+
127
+ ### Added
128
+
129
+ - Adding new `loadingText` attribute to be used as WAI-ARIA `aria-valuetext`. In this case, it will render the component using "Please wait ...". Otherwise, it defaults to "Loading..."
130
+
131
+ ```html
132
+ <!-- Passing loading text to be used as WAI-ARIA `aria-valuetext` -->
133
+ <!-- In this case, it will render the component using "Please wait ..." -->
134
+ <!-- Otherwise, it defaults to "Loading..." -->
135
+ <div class="skeleton-with-specific-loading-text">
136
+ <ngx-skeleton-loader loadingText="Please wait ..."></ngx-skeleton-loader>
137
+ </div>
138
+ ```
139
+
140
+ ### Updated
141
+
142
+ - Using OnPush as changeDetection mechanism into ngx-skeleton-loader component
143
+ - Adding ability to pass `false` as string or boolean (coming from variable value via binding) on `animation` attribute in `ngx-skeleton-loader` component configuration. animation will receive `false` as string when attribute field it's not using binding. Component now can receive `false` (boolean), "false" (string), or any other animation type via binding.
144
+
145
+ ```html
146
+ <div class="item">
147
+ <!-- Disables the animation -->
148
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
149
+ <!-- Disables the animation, but receiving boolean value from binding -->
150
+ <!-- Via binding it can receive `false` (boolean), "false" (string), or any other animation type -->
151
+ <ngx-skeleton-loader [animation]="classAttributeWithBooleanFalseValue"></ngx-skeleton-loader>
152
+ <!-- Uses `progress` as animation -->
153
+ <ngx-skeleton-loader animation="progress"></ngx-skeleton-loader>
154
+ <ngx-skeleton-loader></ngx-skeleton-loader>
155
+ <!-- Uses `pulse` as animation -->
156
+ <ngx-skeleton-loader animation="pulse"></ngx-skeleton-loader>
157
+ </div>
158
+ ```
159
+
160
+ ## [2.6.2][] - 2020-12-08
161
+
162
+ ### Fixed
163
+
164
+ - Removing Lighthouse "Avoid non-composited animations" issue. Lighthouse shows warnings from ngx-skeleton-loader.scss -file (progress).
165
+
166
+ - "Avoid non-composited animations":
167
+ - "Animations which are not composited can be janky and contribute to CLS"
168
+
169
+ To solve that, instead of using CSS `background-position` the module is now using CSS `translate3d`, which improves the animation by using GPU instead of CPU. Issue fixed and performance boost added 🎉
170
+
171
+ ## [2.6.1][] - 2020-11-30
172
+
173
+ ### Fixed
174
+
175
+ - Solving `forRoot()` types error `Generic type 'ModuleWithProviders<T>' requires 1 type argument(s)`. Closes https://github.com/willmendesneto/ngx-skeleton-loader/issues/51
176
+
177
+ ## [2.6.0][] - 2020-11-15
178
+
179
+ ### Added
180
+
181
+ - Adding `NgxSkeletonLoaderModule.forRoot()` method. Usage:
182
+
183
+ ```js
184
+ import { NgModule } from '@angular/core';
185
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
186
+ // ... list of other app dependencies
187
+
188
+ import { AppComponent } from './app.component';
189
+ // ... list of other app components/modules
190
+
191
+ @NgModule({
192
+ declarations: [AppComponent],
193
+ imports: [NgxSkeletonLoaderModule.forRoot()],
194
+ providers: [],
195
+ bootstrap: [AppComponent],
196
+ })
197
+ export class AppModule {}
198
+ ```
199
+
200
+ ## [2.5.0][] - 2020-10-10
201
+
202
+ ### Fixed
203
+
204
+ - Fixing bundle size command on CircleCI pipeline
205
+
206
+ ### Updated
207
+
208
+ - Upgrading NodeJS to v14.11.0
209
+ - Updating `perf-marks` package to v1.14.0
210
+ - Improving skeleton animations fps by using `cubic-bezier` instead of `ease-in-out`
211
+
212
+ ## [2.4.4][] - 2020-08-21
213
+
214
+ ### Fixed
215
+
216
+ - Remove check requirements if perf-marks is running in a browser or not in Angular apps 🔥
217
+
218
+ ### Added
219
+
220
+ - Adding Angular Universal support for examples. Now we can run `npm run dev:ssr` and access `http://localhost:4200/index.html` and the page will run using angular universal 💪
221
+ - Adding `.prettierrc` file with some of the code styling rules
222
+
223
+ ## [2.4.3][] - 2020-08-13
224
+
225
+ ### Fixed
226
+
227
+ - Avoiding perf-marks call if running in Angular Universal applications
228
+
229
+ ## [2.4.2][] - 2020-08-01
230
+
231
+ ### Updated
232
+
233
+ - Bumping `perf-marks` to latest version
234
+
235
+ ## [2.4.1][] - 2020-08-01
236
+
237
+ ### Updated
238
+
239
+ - Bumping `perf-marks` to latest version
240
+
241
+ ## [2.4.0][] - 2020-08-01
242
+
243
+ ### Added
244
+
245
+ - Adding User Timing API to track component render and content loader time
246
+
247
+ ### Updated
248
+
249
+ - Updating examples with new skeleton simulation
250
+ - Adding Stackblitz link for user card skeleton loading demo
251
+
252
+ ## [2.3.0][] - 2020-08-01
253
+
254
+ ### Added
255
+
256
+ - Adding User Timing API to track component render and content loader time
257
+
258
+ ### Updated
259
+
260
+ - Updating examples with new skeleton simulation
261
+ - Adding Stackblitz link for user card skeleton loading demo
262
+
263
+ ## [2.2.1][] - 2020-06-30
264
+
265
+ ### Fixed
266
+
267
+ - For compatibility with IE11 by using indexOf instead of `includes`
268
+
269
+ ### Updated
270
+
271
+ - Updating `npm run postinstall` command to follow the new rules from update.angular.io website
272
+
273
+ ## [2.2.0][] - 2020-06-01
274
+
275
+ ### Added
276
+
277
+ - Using `prefers-reduced-motion` to respect user’s OS option to `Reduce Motion`. More details about `prefers-reduced-motion` in https://web.dev/prefers-reduced-motion/
278
+
279
+ ## [2.1.0][] - 2020-06-01
280
+
281
+ ### Updated
282
+
283
+ - Upgrading @angular/cli to version 9
284
+ - 🎉 Decreasing bundle size to 1.17KB 🎉
285
+
286
+ ## [2.0.0][] - 2020-05-15
287
+
288
+ ### Updated
289
+
290
+ - Upgrading NodeJS to v12.16.2
291
+ - Updating documentation with `animation` attribute
292
+
293
+ ### Added
294
+
295
+ - Supporting for new animation `progress-dark` to enable users when using theme with darker color schema
296
+ - Supporting for different animations 🎉
297
+
298
+ Now we can define the animation we want to use in `<ngx-skeleton-loader>` component via `animation` input. It's a string that can defined the animation used during the loading, having as options:
299
+
300
+ - `false`: it will disable the animation;
301
+ - `progress` - _default_: it will use it `progress` as animation;
302
+ - `pulse`: it will use `pulse` as animation;
303
+
304
+ > `progress` is the default animation, used as the single one previously. If you don't pass the animation attribute, it defaults to `progress`.
305
+
306
+ ```html
307
+ <div class="item">
308
+ <!-- Disables the animation -->
309
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
310
+ <!-- Uses `progress` as animation -->
311
+ <ngx-skeleton-loader animation="progress"></ngx-skeleton-loader>
312
+ <ngx-skeleton-loader></ngx-skeleton-loader>
313
+ <!-- Uses `pulse` as animation -->
314
+ <ngx-skeleton-loader animation="pulse"></ngx-skeleton-loader>
315
+ </div>
316
+ ```
317
+
318
+ - Supporting enabling/disabling animations.
319
+ Now the users will be able to enable/disable animations by using `animation` input. It's a string with `false` as value that the component receives to check if it should not load progress animation.
320
+
321
+ > It works only to disable it. In case you want to keep enable it
322
+
323
+ ```js
324
+ <div class="item">
325
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
326
+ </div>
327
+ ```
328
+
329
+ ## [1.2.7][] - 2020-04-13
330
+
331
+ ### Updated
332
+
333
+ - Decreasing bundle size after disable Ivy in production build
334
+ - Adding description, keywords and github information on `package.json` files
335
+
336
+ ## [1.2.6][] - 2020-02-26
337
+
338
+ ### Fixed
339
+
340
+ - Changing angular library configuration to prod and forcing it at publish time
341
+
342
+ ## [1.2.5][] - 2020-02-25
343
+
344
+ ### Fixed
345
+
346
+ - Changing angular library configuration to prod
347
+
348
+ ## [1.2.4][] - 2020-02-25
349
+
350
+ ### Updated
351
+
352
+ - Updating Github templates
353
+ - Updating Angular CLI to v9
354
+
355
+ ## [1.2.3][] - 2020-02-25
356
+
357
+ ### Fixed
358
+
359
+ - Solving peerDependency warning when installing library in an Angular 9 project
360
+
361
+ ## [1.2.2][] - 2019-06-22
362
+
363
+ ### Fixed
364
+
365
+ - Fixing component dimensions via theme
366
+
367
+ ## [1.2.1][] - 2019-06-08
368
+
369
+ ### Updated
370
+
371
+ - Updating Angular CLI to v8
372
+
373
+ ## [1.2.0][] - 2019-04-19
374
+
375
+ ### Updated
376
+
377
+ - Updating Angular CLI to 7.3.8
378
+
379
+ ## [1.1.2][] - 2019-01-07
380
+
381
+ ### Added
382
+
383
+ - Adding badges for stackblitz, bundlephobia and license
384
+
385
+ ### Updated
386
+
387
+ - Removing unnecessary CSS styles for skeleton
388
+
389
+ ## [1.1.1][] - 2018-12-17
390
+
391
+ ### Fixed
392
+
393
+ - Fixing Stackblitz link demo link
394
+
395
+ ## [1.1.0][] - 2018-12-17
396
+
397
+ ### Added
398
+
399
+ - Added GitHub urls into `package.json`
400
+ - Added Circle CI integration
401
+ - Added Coveralls integration
402
+ - Added GitHub templates
403
+ - Added `CODE_OF_CONDUCT.md` with the Code of conduct
404
+ - Added unit tests for skeletons and demo components
405
+
406
+ ### Updated
407
+
408
+ - Decreased bundle size
409
+ - New gif showing `ngx-skeleton-loader` in action
410
+
411
+ ## [1.0.2][] - 2018-12-16
412
+
413
+ ### Fixed
414
+
415
+ - Added markdown files in dist folder in build time
416
+
417
+ ## [1.0.1][] - 2018-12-16
418
+
419
+ ### Fixed
420
+
421
+ - Added markdown files in dist folder in build time
422
+
423
+ ## [1.0.0][] - 2018-12-16
424
+
425
+ ### Fixed
426
+
427
+ - Fixed build script
428
+
429
+ ## [0.0.1][] - 2018-12-16
430
+
431
+ ### Added
432
+
433
+ - Created `ngx-skeleton-loader`
434
+ - Created test automation for the module
435
+
436
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v0.0.1...HEAD
437
+ [0.0.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v0.0.1
438
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.0...HEAD
439
+ [1.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.0.0
440
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.2...HEAD
441
+ [1.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.1...v1.0.2
442
+ [1.0.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.0.1
443
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.2...HEAD
444
+ [1.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.0.2
445
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.1.0...HEAD
446
+ [1.1.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.1.0
447
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.1.1...HEAD
448
+ [1.1.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.1.1
449
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.4...HEAD
450
+ [1.2.4]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.3...v1.2.4
451
+ [1.2.3]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.2...v1.2.3
452
+ [1.2.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.1...v1.2.2
453
+ [1.2.1]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.0...v1.2.1
454
+ [1.2.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.1.2...v1.2.0
455
+ [1.1.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.1.2
456
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.5...HEAD
457
+ [1.2.5]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.2.5
458
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.6...HEAD
459
+ [1.2.6]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.2.6
460
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.7...HEAD
461
+ [1.2.7]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.2.7
462
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.0.0...HEAD
463
+ [2.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.0.0
464
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.1.0...HEAD
465
+ [2.1.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.1.0
466
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.2.0...HEAD
467
+ [2.2.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.2.0
468
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.2.1...HEAD
469
+ [2.2.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.2.1
470
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.3.0...HEAD
471
+ [2.3.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.3.0
472
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.0...HEAD
473
+ [2.4.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.0
474
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.1...HEAD
475
+ [2.4.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.1
476
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.2...HEAD
477
+ [2.4.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.2
478
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.3...HEAD
479
+ [2.4.3]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.3
480
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.4...HEAD
481
+ [2.4.4]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.4
482
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.5.0...HEAD
483
+ [2.5.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.5.0
484
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.6.0...HEAD
485
+ [2.6.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.6.0
486
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.6.1...HEAD
487
+ [2.6.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.6.1
488
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.6.2...HEAD
489
+ [2.6.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.6.2
490
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.7.0...HEAD
491
+ [2.7.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.7.0
492
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.8.0...HEAD
493
+ [2.8.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.8.0
494
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.9.0...HEAD
495
+ [2.9.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.9.0
496
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.9.1...HEAD
497
+ [2.9.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.9.1
498
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.9.2...HEAD
499
+ [2.9.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.9.2
500
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.10.0...HEAD
501
+ [2.10.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.10.0
502
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.10.1...HEAD
503
+ [2.10.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.10.1
504
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v4.0.0...HEAD
505
+ [4.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v3.0.0...v4.0.0
506
+ [3.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v3.0.0
507
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v5.0.0...HEAD
508
+ [5.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v5.0.0
509
+
510
+
511
+ [Unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v6.0.0...HEAD
512
+ [6.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v6.0.0
@@ -0,0 +1,77 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
77
+
@@ -0,0 +1,34 @@
1
+ # How to start
2
+
3
+ **Note** requires node v10.x.x or higher and npm 6.x.x.
4
+
5
+ ```bash
6
+ git clone https://github.com/willmendesneto/ngx-skeleton-loader.git
7
+ cd ngx-skeleton-loader
8
+ npm install
9
+ npm start
10
+ ```
11
+
12
+ # Running test
13
+
14
+ ```bash
15
+ npm test
16
+ ```
17
+
18
+ ## Submitting Pull Requests
19
+
20
+ **Please follow these basic steps to simplify pull request reviews - if you don't you'll probably just be asked to anyway.**
21
+
22
+ - Please rebase your branch against the current master
23
+ - Run `npm install` to make sure your development dependencies are up-to-date
24
+ - Please ensure that the test suite passes **and** that code is lint free before submitting a PR by running:
25
+ - `npm test`
26
+ - If you've added new functionality, **please** include tests which validate its behaviour
27
+ - Make reference to possible [issues](https://github.com/willmendesneto/ngx-skeleton-loader/issues) on PR comment
28
+ - This module follows Angular commit message standard, so please make sure that you are following this standard.
29
+
30
+ ## Submitting bug reports
31
+
32
+ - Please detail the affected browser(s) and operating system(s)
33
+ - Please be sure to state which version of node **and** npm you're using
34
+ - Please use try to simulate your bug based on [the demo on Stackblitz](https://ngx-skeleton-loader-sample.stackblitz.io)!
package/README.md CHANGED
@@ -1,24 +1,291 @@
1
- # NgxSkeletonLoader
1
+ # NGX Skeleton loader
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.0.
3
+ [![npm downloads](https://img.shields.io/npm/dm/ngx-skeleton-loader.svg)](https://npmjs.org/ngx-skeleton-loader)
4
+ [![npm](https://img.shields.io/badge/stackblitz-online-orange.svg)](https://stackblitz.com/edit/ngx-skeleton-loader-sample)
5
+ [![npm](https://img.shields.io/badge/stackblitz-online-orange.svg)](https://stackblitz.com/edit/ngx-skeleton-loader-user-card-component-sample)
4
6
 
5
- ## Code scaffolding
7
+ [![NPM](https://nodei.co/npm/ngx-skeleton-loader.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/ngx-skeleton-loader)
8
+ [![NPM](https://nodei.co/npm-dl/ngx-skeleton-loader.png?height=3&months=3)](https://npmjs.org/ngx-skeleton-loader)
6
9
 
7
- Run `ng generate component component-name --project ngx-skeleton-loader` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-skeleton-loader`.
8
- > Note: Don't forget to add `--project ngx-skeleton-loader` or else it will be added to the default project in your `angular.json` file.
10
+ [![Build Status](https://circleci.com/gh/willmendesneto/ngx-skeleton-loader.svg?style=shield)](https://circleci.com/gh/willmendesneto/ngx-skeleton-loader)
11
+ [![Coverage Status](https://coveralls.io/repos/willmendesneto/ngx-skeleton-loader/badge.svg?branch=master)](https://coveralls.io/r/willmendesneto/ngx-skeleton-loader?branch=master)
12
+ [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/ngx-skeleton-loader.svg)](https://bundlephobia.com/result?p=ngx-skeleton-loader)
13
+ [![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](/LICENSE)
9
14
 
10
- ## Build
15
+ ![ngx-skeleton-loader in action](https://user-images.githubusercontent.com/1252570/50053778-d4e0d900-018e-11e9-9de7-fad6f9fddd9e.gif)
11
16
 
12
- Run `ng build ngx-skeleton-loader` to build the project. The build artifacts will be stored in the `dist/` directory.
17
+ ## Why skeletons?
13
18
 
14
- ## Publishing
19
+ > If you want to get more details about that, please read ["NGX-Skeleton-Loader — States, Animations, Performance, and Accessibility for your Angular App"](https://willmendesneto.com/posts/ngx-skeleton-loader-states-animations-performance-and-accessibility-for-your-angular-app) blog post
15
20
 
16
- After building your library with `ng build ngx-skeleton-loader`, go to the dist folder `cd dist/ngx-skeleton-loader` and run `npm publish`.
21
+ The idea of this component is make the process transparent and easier. So the main point is integrate this component with other tooling process, such as:
17
22
 
18
- ## Running unit tests
23
+ - Server-side rendering;
24
+ - Progressive rendering;
25
+ - Any other that you like :)
19
26
 
20
- Run `ng test ngx-skeleton-loader` to execute the unit tests via [Karma](https://karma-runner.github.io).
27
+ It's totally transparent for you and you can integrate easier in your application, improving your user experience 🎉
21
28
 
22
- ## Further help
29
+ - [Demo](#demo)
30
+ - [Install](#install)
31
+ - [Setup](#setup)
32
+ - [Development](#development)
33
+ - [Contribute](#contribute)
23
34
 
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
35
+ ## Demo
36
+
37
+ Try out our demos on Stackblitz!
38
+
39
+ - [Usage: animations, appearance, and themes](https://ngx-skeleton-loader-sample.stackblitz.io)
40
+ - [User Card Component Loading simulation using NGX Skeleton Loader](https://ngx-skeleton-loader-user-card-component-sample.stackblitz.io)
41
+
42
+ ## Install
43
+
44
+ You can get it on NPM installing `ngx-skeleton-loader` module as a project dependency.
45
+
46
+ ```shell
47
+ npm install ngx-skeleton-loader --save
48
+ ```
49
+
50
+ ## Setup
51
+
52
+ You'll need to add `NgxSkeletonLoaderModule` to your application module. So that, the `<ngx-skeleton-loader>` components will be accessible in your application.
53
+
54
+ ```typescript
55
+ ...
56
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
57
+ ...
58
+
59
+ @NgModule({
60
+ declarations: [
61
+ YourAppComponent
62
+ ],
63
+ imports: [
64
+ ...
65
+ NgxSkeletonLoaderModule,
66
+ ...
67
+ ],
68
+ providers: [],
69
+ bootstrap: [YourAppComponent]
70
+ })
71
+
72
+ export class YourAppComponent {}
73
+
74
+ ```
75
+
76
+ After that, you can use the `ngx-skeleton-loader` components in your templates, passing the configuration data into the component itself.
77
+
78
+ - `ngx-skeleton-loader`: Handle the skeleton animation and the skeleton styles of your app;
79
+
80
+ ```html
81
+ <div class="item">
82
+ <ngx-skeleton-loader count="5" appearance="circle"></ngx-skeleton-loader>
83
+ </div>
84
+ ```
85
+
86
+ ### Using `NgxSkeletonLoaderModule.forRoot()`
87
+
88
+ Also, you can import the module in your app by calling `NgxSkeletonLoaderModule.forRoot()` when adding it. So it will be available across your Angular application.
89
+
90
+ Importing the module this way also allows you to globally configure the default values for the `ngx-skeleton-loader` components in your application, in case you need some different default values for your app.
91
+
92
+ ```typescript
93
+ ...
94
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
95
+ ...
96
+
97
+ @NgModule({
98
+ declarations: [
99
+ YourAppComponent
100
+ ],
101
+ imports: [
102
+ ...
103
+ NgxSkeletonLoaderModule.forRoot({ animation: 'pulse', loadingText: 'This item is actually loading...' }),
104
+ ...
105
+ ],
106
+ providers: [],
107
+ bootstrap: [YourAppComponent]
108
+ })
109
+
110
+ export class YourAppComponent {}
111
+
112
+ ```
113
+
114
+ ```html
115
+ <div class="item">
116
+ <ngx-skeleton-loader count="5" appearance="circle"></ngx-skeleton-loader>
117
+ <!-- above line will produce the rendering of 5 circles with the pulse animation and the aria-valuetext attribute set with "This item is actually loading..." -->
118
+ </div>
119
+ ```
120
+
121
+ ## WAI-ARIA values
122
+
123
+ - loadingText - _default_ `Loading...`: attribute that defines the text value for `aria-valuetext` attribute. Defaults to "Loading..."
124
+ - `aria-label` - _default_ `loading`: you can add `ariaLabel` as input of the component to set a different value.
125
+
126
+ ## Appearance
127
+
128
+ You can also define which appearance want to use in your skeleton loader by passing the options in your component via `[appearance]` attribute.
129
+
130
+ ### Options
131
+
132
+ - `''` - _default_: it will use it `''` as appearance. At the end, it will render like a line;
133
+ - `line`: it will render like a line. This is the same behavior as passing an empty string;
134
+ - `circle`: it will use `circle` as appearance. Great for avatar skeletons, for example :);
135
+
136
+ ## Animations
137
+
138
+ You can also define which CSS animation you want to use - even not use any, if it's the case - in your skeleton loader by passing the options in your component via `[animation]` attribute.
139
+
140
+ ### Options
141
+
142
+ - `"false"` (as string): it will disable the animation;
143
+ - `false` (as boolean): it will disable the animation. Animation will receive `false` as string when attribute field it's not using binding. Component now can receive `false` (boolean), "false" (string), or any other animation type via binding;
144
+ - `progress` - _default_: it will use it `progress` as animation;
145
+ - `progress-dark`: it will use it `progress-dark` as animation. Recommended if your color schema is darken;
146
+ - `pulse`: it will use `pulse` as animation;
147
+
148
+ > `progress` is the default animation, used as the single one previously. If you don't pass the animation attribute, it defaults to `progress`.
149
+
150
+ ```html
151
+ <!--
152
+ If you need to change all the background wrapper
153
+ you need to apply the style changes on the
154
+ `ngx-skeleton-loader` component wrapper
155
+ -->
156
+ <div class="item">
157
+ <!-- Disables the animation -->
158
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
159
+ <!-- Disables the animation, but receiving boolean value from binding -->
160
+ <!-- Via binding it can receive `false` (boolean), "false" (string), or any other animation type -->
161
+ <ngx-skeleton-loader [animation]="classAttributeWithBooleanFalseValue"></ngx-skeleton-loader>
162
+ <!-- Uses `progress` as animation -->
163
+ <ngx-skeleton-loader animation="progress"></ngx-skeleton-loader>
164
+ <ngx-skeleton-loader></ngx-skeleton-loader>
165
+ <!-- Uses `pulse` as animation -->
166
+ <ngx-skeleton-loader animation="pulse"></ngx-skeleton-loader>
167
+ </div>
168
+ ```
169
+
170
+ > You can check the code details in the [Stackblitz Live Demo Link](https://stackblitz.com/edit/ngx-skeleton-loader-sample?file=app%2Fapp.component.html)
171
+
172
+ ## Theming
173
+
174
+ You can also define different styles for the skeleton loader by passing an object with the css styles - in dashed case - into the component via `[theme]` attribute.
175
+
176
+ ```html
177
+ <!--
178
+ If you need to change all the background wrapper
179
+ you need to apply the style changes on the
180
+ `ngx-skeleton-loader` component wrapper
181
+ -->
182
+
183
+ <div style="background: #FF0001; padding: 10px;">
184
+ <ngx-skeleton-loader
185
+ count="5"
186
+ [theme]="{
187
+ 'border-radius': '5px',
188
+ height: '50px',
189
+ 'background-color': '#992929',
190
+ border: '1px solid white'
191
+ }"
192
+ ></ngx-skeleton-loader>
193
+ </div>
194
+ ```
195
+
196
+ The [theme] attribute now accepts the same configuration as `ngStyle` as well. That means you can manage to use like you're doing with the built-in directive, having a pleasure and beautiful experience
197
+
198
+ ```html
199
+ <!--
200
+ Note that we are using a combination of styles and ngStyle inside theme object,
201
+ having `height.px` receiving a number and `background-color` receiving a HEX Color
202
+ -->
203
+ <div style="background: #FF0001; padding: 10px;">
204
+ <ngx-skeleton-loader
205
+ count="5"
206
+ [theme]="{
207
+ 'height.px': 50,
208
+ 'background-color': '#992929'
209
+ }"
210
+ ></ngx-skeleton-loader>
211
+ </div>
212
+ ```
213
+
214
+ ### ⚠️ This is here only as a documentation, but it's not encouraged to be used. Please consider use it with caution ⚠️
215
+
216
+ Also, you can use CSS to add theme styles into your component. However, there are some implications:
217
+
218
+ - You're using `:host` in your stylesheet, which means **you are aware of any possible problem `:host` can create for your app at that level since it's based on [`:host` DOM style scoping](https://developer.mozilla.org/en-US/docs/Web/CSS/:host)**
219
+ - You're adding stylesheet based on `<ngx-skeleton-loader>` internal classes. It means that **class naming changes on module's side will be breaking changes for your application as well**.
220
+
221
+ As an example, your Component file is like this
222
+
223
+ ```typescript
224
+ import { Component } from '@angular/core';
225
+
226
+ @Component({
227
+ selector: 'my-ngx-skeleton-loader-with-theming',
228
+ templateUrl: './my-ngx-skeleton-loader-with-theming.component.html',
229
+ styleUrls: ['./my-ngx-skeleton-loader-with-theming.component.css'],
230
+ })
231
+ export class MyNGXSkeletonLoaderWithThemingComponent {
232
+ /* ... code goes here*/
233
+ }
234
+ ```
235
+
236
+ And your component HTML code is
237
+
238
+ ```html
239
+ <!--
240
+ file: my-ngx-skeleton-loader-with-theming.component.html
241
+
242
+ As an example, it's not using themes via [theme] attributes.
243
+ -->
244
+
245
+ <ngx-skeleton-loader count="5" animation="pulse"></ngx-skeleton-loader>
246
+ ```
247
+
248
+ You can apply theme changes in our stylesheet. At the end it will be
249
+
250
+ ```css
251
+ /* file: `my-ngx-skeleton-loader-with-theming.component.css`
252
+ *
253
+ * You can find more details about `:host` at
254
+ * Angular Component Style Docs https://angular.io/guide/component-styles#host
255
+ */
256
+ :host >>> ngx-skeleton-loader .skeleton-loader {
257
+ border-radius: 5px;
258
+ height: 50px;
259
+ background-color: #992929;
260
+ border: 1px solid white;
261
+ }
262
+ ```
263
+
264
+ > You should change the styles on the skeleton wrapper element in case you need to change the background color. You can check the code details in the [Stackblitz Live Demo Link](https://stackblitz.com/edit/ngx-skeleton-loader-sample?file=app%2Fapp.component.html) or check it out a content load simulation [in this Stackblitz Live Demo Link](https://stackblitz.com/edit/ngx-skeleton-loader-user-card-component-sample?file=app%2Fapp.component.html)
265
+
266
+ ## Development
267
+
268
+ ### Run demo locally
269
+
270
+ 1. This project uses [Angular CLI](https://cli.angular.io/) as base. That means you just need to run `npm start` and access the link `http://localhost:4200` in your browser
271
+
272
+ ### Run tests
273
+
274
+ 1. Run `npm test` for run tests. In case you want to test using watch, please use `npm run tdd`
275
+
276
+ ### Publish
277
+
278
+ this project is using `np` package to publish, which makes things straightforward. EX: `npx np <patch|minor|major> --no-yarn --no-cleanup --contents=dist/ngx-skeleton-loader`
279
+
280
+ > For more details, [please check np package on npmjs.com](https://www.npmjs.com/package/np)
281
+
282
+ ## Contribute
283
+
284
+ For any type of contribution, please follow the instructions in [CONTRIBUTING.md](https://github.com/willmendesneto/ngx-skeleton-loader/blob/master/CONTRIBUTING.md) and read [CODE_OF_CONDUCT.md](https://github.com/willmendesneto/ngx-skeleton-loader/blob/master/CODE_OF_CONDUCT.md) files.
285
+
286
+ ## Author
287
+
288
+ **Wilson Mendes (willmendesneto)**
289
+
290
+ - <https://twitter.com/willmendesneto>
291
+ - <http://github.com/willmendesneto>
@@ -62,10 +62,10 @@ export class NgxSkeletonLoaderComponent {
62
62
  }
63
63
  }
64
64
  /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [{ token: NGX_SKELETON_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
65
- /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
65
+ /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".skeleton-loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader:after,.skeleton-loader:before{box-sizing:border-box}.skeleton-loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.progress,.skeleton-loader.progress-dark{transform:translate(0)}.skeleton-loader.progress:after,.skeleton-loader.progress:before,.skeleton-loader.progress-dark:after,.skeleton-loader.progress-dark:before{box-sizing:border-box}.skeleton-loader.progress:before,.skeleton-loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.skeleton-loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.progress{-webkit-animation:none;animation:none}.skeleton-loader.progress,.skeleton-loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
66
66
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, decorators: [{
67
67
  type: Component,
68
- args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
68
+ args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".skeleton-loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader:after,.skeleton-loader:before{box-sizing:border-box}.skeleton-loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.progress,.skeleton-loader.progress-dark{transform:translate(0)}.skeleton-loader.progress:after,.skeleton-loader.progress:before,.skeleton-loader.progress-dark:after,.skeleton-loader.progress-dark:before{box-sizing:border-box}.skeleton-loader.progress:before,.skeleton-loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.skeleton-loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.progress{-webkit-animation:none;animation:none}.skeleton-loader.progress,.skeleton-loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
69
69
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
70
70
  type: Inject,
71
71
  args: [NGX_SKELETON_LOADER_CONFIG]
@@ -84,4 +84,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
84
84
  }], theme: [{
85
85
  type: Input
86
86
  }] } });
87
- //# sourceMappingURL=data:application/json;base64,eyJ2Z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1c3k9XCJ0cnVlXCJcbiAgYXJpYS12YWx1ZW1pbj1cIjBcIlxuICBhcmlhLXZhbHVlbWF4PVwiMTAwXCJcbiAgW2F0dHIuYXJpYS12YWx1ZXRleHRdPVwibG9hZGluZ1RleHRcIlxuICByb2xlPVwicHJvZ3Jlc3NiYXJcIlxuICB0YWJpbmRleD1cIjBcIlxuICBbbmdDbGFzc109XCJ7XG4gICAgY2lyY2xlOiBhcHBlYXJhbmNlID09PSAnY2lyY2xlJyxcbiAgICBwcm9ncmVzczogYW5pbWF0aW9uID09PSAncHJvZ3Jlc3MnLFxuICAgICdwcm9ncmVzcy1kYXJrJzogYW5pbWF0aW9uID09PSAncHJvZ3Jlc3MtZGFyaycsXG4gICAgcHVsc2U6IGFuaW1hdGlvbiA9PT0gJ3B1bHNlJ1xuICB9XCJcbiAgW25nU3R5bGVdPVwidGhlbWVcIlxuPlxuPC9zcGFuPlxuIl19
@@ -65,10 +65,10 @@ class NgxSkeletonLoaderComponent {
65
65
  }
66
66
  }
67
67
  /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [{ token: NGX_SKELETON_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
68
- /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".skeleton-loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader:after,.skeleton-loader:before{box-sizing:border-box}.skeleton-loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.progress,.skeleton-loader.progress-dark{transform:translate(0)}.skeleton-loader.progress:after,.skeleton-loader.progress:before,.skeleton-loader.progress-dark:after,.skeleton-loader.progress-dark:before{box-sizing:border-box}.skeleton-loader.progress:before,.skeleton-loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.skeleton-loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.progress{-webkit-animation:none;animation:none}.skeleton-loader.progress,.skeleton-loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
69
69
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, decorators: [{
70
70
  type: Component,
71
- args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
71
+ args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".skeleton-loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader:after,.skeleton-loader:before{box-sizing:border-box}.skeleton-loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.progress,.skeleton-loader.progress-dark{transform:translate(0)}.skeleton-loader.progress:after,.skeleton-loader.progress:before,.skeleton-loader.progress-dark:after,.skeleton-loader.progress-dark:before{box-sizing:border-box}.skeleton-loader.progress:before,.skeleton-loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.skeleton-loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.progress{-webkit-animation:none;animation:none}.skeleton-loader.progress,.skeleton-loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
72
72
  }], ctorParameters: function () {
73
73
  return [{ type: undefined, decorators: [{
74
74
  type: Inject,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-skeleton-loader.mjs","sources":["../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader-config.types.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.component.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.html","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.module.ts","../../../projects/ngx-skeleton-loader/src/public-api.ts","../../../projects/ngx-skeleton-loader/src/ngx-skeleton-loader.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport type NgxSkeletonLoaderConfigTheme = {\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | '';\n animation: 'progress' | 'progress-dark' | 'pulse' | 'false' | false;\n theme: NgxSkeletonLoaderConfigTheme;\n loadingText: string;\n count: number;\n ariaLabel: string;\n}\n\nexport const NGX_SKELETON_LOADER_CONFIG = new InjectionToken<NgxSkeletonLoaderConfig>('ngx-skeleton-loader.config');\n","import {\n Component,\n OnInit,\n Input,\n isDevMode,\n OnDestroy,\n AfterViewInit,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\nimport { start, end } from 'perf-marks/marks';\nimport {\n NgxSkeletonLoaderConfig,\n NgxSkeletonLoaderConfigTheme,\n NGX_SKELETON_LOADER_CONFIG,\n} from './ngx-skeleton-loader-config.types';\n\n@Component({\n selector: 'ngx-skeleton-loader',\n templateUrl: './ngx-skeleton-loader.html',\n styleUrls: ['./ngx-skeleton-loader.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n // eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blacklist,id-match\n static ngAcceptInputType_count: number | string;\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\n static ngAcceptInputType_animation: boolean | string;\n\n @Input()\n count: NgxSkeletonLoaderConfig['count'];\n\n @Input()\n loadingText: NgxSkeletonLoaderConfig['loadingText'];\n\n @Input()\n appearance: NgxSkeletonLoaderConfig['appearance'];\n\n @Input()\n animation: NgxSkeletonLoaderConfig['animation'];\n\n @Input()\n ariaLabel: NgxSkeletonLoaderConfig['ariaLabel'];\n\n @Input()\n theme: NgxSkeletonLoaderConfigTheme;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() config?: NgxSkeletonLoaderConfig) {\n const {\n appearance = 'line',\n animation = 'progress',\n theme = null,\n loadingText = 'Loading...',\n count = 1,\n ariaLabel = 'loading',\n } = config || {};\n\n this.appearance = appearance;\n this.animation = animation;\n this.theme = theme;\n this.loadingText = loadingText;\n this.count = count;\n this.items = [];\n this.ariaLabel = ariaLabel;\n }\n\n ngOnInit() {\n start('NgxSkeletonLoader:Rendered');\n start('NgxSkeletonLoader:Loaded');\n\n this.validateInputValues();\n }\n\n private validateInputValues() {\n // Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)\n if (!/^\\d+$/.test(`${this.count}`)) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'count' a numeric value. Forcing default to \"1\".`,\n );\n }\n this.count = 1;\n }\n this.items.length = this.count;\n\n const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];\n if (allowedAnimations.indexOf(String(this.animation)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'animation' as: ${allowedAnimations.join(\n ', ',\n )}. Forcing default to \"progress\".`,\n );\n }\n this.animation = 'progress';\n }\n\n if (['circle', 'line', ''].indexOf(String(this.appearance)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'appearance' as: circle or line or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Avoiding multiple calls for the same input in case there's no changes in the fields\n // Checking if the fields that require validation are available and if they were changed\n // In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.\n if (\n ['count', 'animation', 'appearance'].find(\n key =>\n changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue),\n )\n ) {\n return;\n }\n\n this.validateInputValues();\n }\n\n ngAfterViewInit() {\n end('NgxSkeletonLoader:Rendered');\n }\n\n ngOnDestroy() {\n end('NgxSkeletonLoader:Loaded');\n }\n}\n","<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';\nimport { NgxSkeletonLoaderConfig, NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';\n\n@NgModule({\n declarations: [NgxSkeletonLoaderComponent],\n imports: [CommonModule],\n exports: [NgxSkeletonLoaderComponent],\n})\nexport class NgxSkeletonLoaderModule {\n static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule> {\n return {\n ngModule: NgxSkeletonLoaderModule,\n providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],\n };\n }\n}\n","/*\n * Public API Surface of ngx-skeleton-loader\n */\n\nexport * from './lib/ngx-skeleton-loader.component';\nexport * from './lib/ngx-skeleton-loader.module';\nexport * from './lib/ngx-skeleton-loader-config.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA4B;;MCQrG,0BAA0B;IA2BrC,YAA4D,MAAgC;QAC1F,MAAM,EACJ,UAAU,GAAG,MAAM,EACnB,SAAS,GAAG,UAAU,EACtB,KAAK,GAAG,IAAI,EACZ,WAAW,GAAG,YAAY,EAC1B,KAAK,GAAG,CAAC,EACT,SAAS,GAAG,SAAS,GACtB,GAAG,MAAM,IAAI,EAAE,CAAC;QAEjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC5B;IAED,QAAQ;QACN,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACpC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAElC,IAAI,CAAC,mBAAmB,EAAE,CAAC;KAC5B;IAEO,mBAAmB;;QAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE;;YAElC,IAAI,SAAS,EAAE,EAAE;gBACf,OAAO,CAAC,KAAK,CACX,iGAAiG,CAClG,CAAC;aACH;YACD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;SAChB;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QAE/B,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,CAA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;sBADJ,KAAK;gBAIN,WAAW;sBADV,KAAK;gBAIN,UAAU;sBADT,KAAK;gBAIN,SAAS;sBADR,KAAK;gBAIN,SAAS;sBADR,KAAK;gBAIN,KAAK;sBADJ,KAAK;;;MEpCK,uBAAuB;IAClC,OAAO,OAAO,CAAC,MAAyC;QACtD,OAAO;YACL,QAAQ,EAAE,uBAAuB;YACjC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SACvE,CAAC;KACH;;0JANU,uBAAuB;2JAAvB,uBAAuB,iBAJnB,0BAA0B,aAC/B,YAAY,aACZ,0BAA0B;2JAEzB,uBAAuB,YAHzB,CAAC,YAAY,CAAC;2FAGZ,uBAAuB;kBALnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC;;;ACVD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"ngx-skeleton-loader.mjs","sources":["../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader-config.types.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.component.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.html","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.module.ts","../../../projects/ngx-skeleton-loader/src/public-api.ts","../../../projects/ngx-skeleton-loader/src/ngx-skeleton-loader.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport type NgxSkeletonLoaderConfigTheme = {\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | '';\n animation: 'progress' | 'progress-dark' | 'pulse' | 'false' | false;\n theme: NgxSkeletonLoaderConfigTheme;\n loadingText: string;\n count: number;\n ariaLabel: string;\n}\n\nexport const NGX_SKELETON_LOADER_CONFIG = new InjectionToken<NgxSkeletonLoaderConfig>('ngx-skeleton-loader.config');\n","import {\n Component,\n OnInit,\n Input,\n isDevMode,\n OnDestroy,\n AfterViewInit,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\nimport { start, end } from 'perf-marks/marks';\nimport {\n NgxSkeletonLoaderConfig,\n NgxSkeletonLoaderConfigTheme,\n NGX_SKELETON_LOADER_CONFIG,\n} from './ngx-skeleton-loader-config.types';\n\n@Component({\n selector: 'ngx-skeleton-loader',\n templateUrl: './ngx-skeleton-loader.html',\n styleUrls: ['./ngx-skeleton-loader.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n // eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blacklist,id-match\n static ngAcceptInputType_count: number | string;\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\n static ngAcceptInputType_animation: boolean | string;\n\n @Input()\n count: NgxSkeletonLoaderConfig['count'];\n\n @Input()\n loadingText: NgxSkeletonLoaderConfig['loadingText'];\n\n @Input()\n appearance: NgxSkeletonLoaderConfig['appearance'];\n\n @Input()\n animation: NgxSkeletonLoaderConfig['animation'];\n\n @Input()\n ariaLabel: NgxSkeletonLoaderConfig['ariaLabel'];\n\n @Input()\n theme: NgxSkeletonLoaderConfigTheme;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() config?: NgxSkeletonLoaderConfig) {\n const {\n appearance = 'line',\n animation = 'progress',\n theme = null,\n loadingText = 'Loading...',\n count = 1,\n ariaLabel = 'loading',\n } = config || {};\n\n this.appearance = appearance;\n this.animation = animation;\n this.theme = theme;\n this.loadingText = loadingText;\n this.count = count;\n this.items = [];\n this.ariaLabel = ariaLabel;\n }\n\n ngOnInit() {\n start('NgxSkeletonLoader:Rendered');\n start('NgxSkeletonLoader:Loaded');\n\n this.validateInputValues();\n }\n\n private validateInputValues() {\n // Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)\n if (!/^\\d+$/.test(`${this.count}`)) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'count' a numeric value. Forcing default to \"1\".`,\n );\n }\n this.count = 1;\n }\n this.items.length = this.count;\n\n const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];\n if (allowedAnimations.indexOf(String(this.animation)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'animation' as: ${allowedAnimations.join(\n ', ',\n )}. Forcing default to \"progress\".`,\n );\n }\n this.animation = 'progress';\n }\n\n if (['circle', 'line', ''].indexOf(String(this.appearance)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'appearance' as: circle or line or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Avoiding multiple calls for the same input in case there's no changes in the fields\n // Checking if the fields that require validation are available and if they were changed\n // In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.\n if (\n ['count', 'animation', 'appearance'].find(\n key =>\n changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue),\n )\n ) {\n return;\n }\n\n this.validateInputValues();\n }\n\n ngAfterViewInit() {\n end('NgxSkeletonLoader:Rendered');\n }\n\n ngOnDestroy() {\n end('NgxSkeletonLoader:Loaded');\n }\n}\n","<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';\nimport { NgxSkeletonLoaderConfig, NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';\n\n@NgModule({\n declarations: [NgxSkeletonLoaderComponent],\n imports: [CommonModule],\n exports: [NgxSkeletonLoaderComponent],\n})\nexport class NgxSkeletonLoaderModule {\n static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule> {\n return {\n ngModule: NgxSkeletonLoaderModule,\n providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],\n };\n }\n}\n","/*\n * Public API Surface of ngx-skeleton-loader\n */\n\nexport * from './lib/ngx-skeleton-loader.component';\nexport * from './lib/ngx-skeleton-loader.module';\nexport * from './lib/ngx-skeleton-loader-config.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA4B;;MCQrG,0BAA0B;IA2BrC,YAA4D,MAAgC;QAC1F,MAAM,EACJ,UAAU,GAAG,MAAM,EACnB,SAAS,GAAG,UAAU,EACtB,KAAK,GAAG,IAAI,EACZ,WAAW,GAAG,YAAY,EAC1B,KAAK,GAAG,CAAC,EACT,SAAS,GAAG,SAAS,GACtB,GAAG,MAAM,IAAI,EAAE,CAAC;QAEjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,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AC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC;;;ACVD;;;;ACAA;;;;;;"}
@@ -65,10 +65,10 @@ class NgxSkeletonLoaderComponent {
65
65
  }
66
66
  }
67
67
  /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [{ token: NGX_SKELETON_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
68
- /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ /** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".skeleton-loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader:after,.skeleton-loader:before{box-sizing:border-box}.skeleton-loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.progress,.skeleton-loader.progress-dark{transform:translate(0)}.skeleton-loader.progress:after,.skeleton-loader.progress:before,.skeleton-loader.progress-dark:after,.skeleton-loader.progress-dark:before{box-sizing:border-box}.skeleton-loader.progress:before,.skeleton-loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.skeleton-loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.progress{-webkit-animation:none;animation:none}.skeleton-loader.progress,.skeleton-loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
69
69
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, decorators: [{
70
70
  type: Component,
71
- args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
71
+ args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".skeleton-loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.skeleton-loader:after,.skeleton-loader:before{box-sizing:border-box}.skeleton-loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.skeleton-loader.progress,.skeleton-loader.progress-dark{transform:translate(0)}.skeleton-loader.progress:after,.skeleton-loader.progress:before,.skeleton-loader.progress-dark:after,.skeleton-loader.progress-dark:before{box-sizing:border-box}.skeleton-loader.progress:before,.skeleton-loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.skeleton-loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.progress{-webkit-animation:none;animation:none}.skeleton-loader.progress,.skeleton-loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
72
72
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
73
73
  type: Inject,
74
74
  args: [NGX_SKELETON_LOADER_CONFIG]
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-skeleton-loader.mjs","sources":["../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader-config.types.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.component.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.html","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.module.ts","../../../projects/ngx-skeleton-loader/src/public-api.ts","../../../projects/ngx-skeleton-loader/src/ngx-skeleton-loader.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport type NgxSkeletonLoaderConfigTheme = {\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | '';\n animation: 'progress' | 'progress-dark' | 'pulse' | 'false' | false;\n theme: NgxSkeletonLoaderConfigTheme;\n loadingText: string;\n count: number;\n ariaLabel: string;\n}\n\nexport const NGX_SKELETON_LOADER_CONFIG = new InjectionToken<NgxSkeletonLoaderConfig>('ngx-skeleton-loader.config');\n","import {\n Component,\n OnInit,\n Input,\n isDevMode,\n OnDestroy,\n AfterViewInit,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\nimport { start, end } from 'perf-marks/marks';\nimport {\n NgxSkeletonLoaderConfig,\n NgxSkeletonLoaderConfigTheme,\n NGX_SKELETON_LOADER_CONFIG,\n} from './ngx-skeleton-loader-config.types';\n\n@Component({\n selector: 'ngx-skeleton-loader',\n templateUrl: './ngx-skeleton-loader.html',\n styleUrls: ['./ngx-skeleton-loader.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n // eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blacklist,id-match\n static ngAcceptInputType_count: number | string;\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\n static ngAcceptInputType_animation: boolean | string;\n\n @Input()\n count: NgxSkeletonLoaderConfig['count'];\n\n @Input()\n loadingText: NgxSkeletonLoaderConfig['loadingText'];\n\n @Input()\n appearance: NgxSkeletonLoaderConfig['appearance'];\n\n @Input()\n animation: NgxSkeletonLoaderConfig['animation'];\n\n @Input()\n ariaLabel: NgxSkeletonLoaderConfig['ariaLabel'];\n\n @Input()\n theme: NgxSkeletonLoaderConfigTheme;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() config?: NgxSkeletonLoaderConfig) {\n const {\n appearance = 'line',\n animation = 'progress',\n theme = null,\n loadingText = 'Loading...',\n count = 1,\n ariaLabel = 'loading',\n } = config || {};\n\n this.appearance = appearance;\n this.animation = animation;\n this.theme = theme;\n this.loadingText = loadingText;\n this.count = count;\n this.items = [];\n this.ariaLabel = ariaLabel;\n }\n\n ngOnInit() {\n start('NgxSkeletonLoader:Rendered');\n start('NgxSkeletonLoader:Loaded');\n\n this.validateInputValues();\n }\n\n private validateInputValues() {\n // Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)\n if (!/^\\d+$/.test(`${this.count}`)) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'count' a numeric value. Forcing default to \"1\".`,\n );\n }\n this.count = 1;\n }\n this.items.length = this.count;\n\n const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];\n if (allowedAnimations.indexOf(String(this.animation)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'animation' as: ${allowedAnimations.join(\n ', ',\n )}. Forcing default to \"progress\".`,\n );\n }\n this.animation = 'progress';\n }\n\n if (['circle', 'line', ''].indexOf(String(this.appearance)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'appearance' as: circle or line or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Avoiding multiple calls for the same input in case there's no changes in the fields\n // Checking if the fields that require validation are available and if they were changed\n // In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.\n if (\n ['count', 'animation', 'appearance'].find(\n key =>\n changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue),\n )\n ) {\n return;\n }\n\n this.validateInputValues();\n }\n\n ngAfterViewInit() {\n end('NgxSkeletonLoader:Rendered');\n }\n\n ngOnDestroy() {\n end('NgxSkeletonLoader:Loaded');\n }\n}\n","<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';\nimport { NgxSkeletonLoaderConfig, NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';\n\n@NgModule({\n declarations: [NgxSkeletonLoaderComponent],\n imports: [CommonModule],\n exports: [NgxSkeletonLoaderComponent],\n})\nexport class NgxSkeletonLoaderModule {\n static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule> {\n return {\n ngModule: NgxSkeletonLoaderModule,\n providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],\n };\n }\n}\n","/*\n * Public API Surface of ngx-skeleton-loader\n */\n\nexport * from './lib/ngx-skeleton-loader.component';\nexport * from './lib/ngx-skeleton-loader.module';\nexport * from './lib/ngx-skeleton-loader-config.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA4B;;MCQrG,0BAA0B;IA2BrC,YAA4D,MAAgC;QAC1F,MAAM,EACJ,UAAU,GAAG,MAAM,EACnB,SAAS,GAAG,UAAU,EACtB,KAAK,GAAG,IAAI,EACZ,WAAW,GAAG,YAAY,EAC1B,KAAK,GAAG,CAAC,EACT,SAAS,GAAG,SAAS,GACtB,GAAG,MAAM,IAAI,EAAE,CAAC;QAEjB,IAAI,CAAC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,CAAC,YAAY,CAAC;2FAGZ,uBAAuB;kBALnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC;;;ACVD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"ngx-skeleton-loader.mjs","sources":["../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader-config.types.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.component.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.html","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.module.ts","../../../projects/ngx-skeleton-loader/src/public-api.ts","../../../projects/ngx-skeleton-loader/src/ngx-skeleton-loader.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport type NgxSkeletonLoaderConfigTheme = {\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | '';\n animation: 'progress' | 'progress-dark' | 'pulse' | 'false' | false;\n theme: NgxSkeletonLoaderConfigTheme;\n loadingText: string;\n count: number;\n ariaLabel: string;\n}\n\nexport const NGX_SKELETON_LOADER_CONFIG = new InjectionToken<NgxSkeletonLoaderConfig>('ngx-skeleton-loader.config');\n","import {\n Component,\n OnInit,\n Input,\n isDevMode,\n OnDestroy,\n AfterViewInit,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\nimport { start, end } from 'perf-marks/marks';\nimport {\n NgxSkeletonLoaderConfig,\n NgxSkeletonLoaderConfigTheme,\n NGX_SKELETON_LOADER_CONFIG,\n} from './ngx-skeleton-loader-config.types';\n\n@Component({\n selector: 'ngx-skeleton-loader',\n templateUrl: './ngx-skeleton-loader.html',\n styleUrls: ['./ngx-skeleton-loader.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n // eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blacklist,id-match\n static ngAcceptInputType_count: number | string;\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\n static ngAcceptInputType_animation: boolean | string;\n\n @Input()\n count: NgxSkeletonLoaderConfig['count'];\n\n @Input()\n loadingText: NgxSkeletonLoaderConfig['loadingText'];\n\n @Input()\n appearance: NgxSkeletonLoaderConfig['appearance'];\n\n @Input()\n animation: NgxSkeletonLoaderConfig['animation'];\n\n @Input()\n ariaLabel: NgxSkeletonLoaderConfig['ariaLabel'];\n\n @Input()\n theme: NgxSkeletonLoaderConfigTheme;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() config?: NgxSkeletonLoaderConfig) {\n const {\n appearance = 'line',\n animation = 'progress',\n theme = null,\n loadingText = 'Loading...',\n count = 1,\n ariaLabel = 'loading',\n } = config || {};\n\n this.appearance = appearance;\n this.animation = animation;\n this.theme = theme;\n this.loadingText = loadingText;\n this.count = count;\n this.items = [];\n this.ariaLabel = ariaLabel;\n }\n\n ngOnInit() {\n start('NgxSkeletonLoader:Rendered');\n start('NgxSkeletonLoader:Loaded');\n\n this.validateInputValues();\n }\n\n private validateInputValues() {\n // Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)\n if (!/^\\d+$/.test(`${this.count}`)) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'count' a numeric value. Forcing default to \"1\".`,\n );\n }\n this.count = 1;\n }\n this.items.length = this.count;\n\n const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];\n if (allowedAnimations.indexOf(String(this.animation)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'animation' as: ${allowedAnimations.join(\n ', ',\n )}. Forcing default to \"progress\".`,\n );\n }\n this.animation = 'progress';\n }\n\n if (['circle', 'line', ''].indexOf(String(this.appearance)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'appearance' as: circle or line or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Avoiding multiple calls for the same input in case there's no changes in the fields\n // Checking if the fields that require validation are available and if they were changed\n // In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.\n if (\n ['count', 'animation', 'appearance'].find(\n key =>\n changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue),\n )\n ) {\n return;\n }\n\n this.validateInputValues();\n }\n\n ngAfterViewInit() {\n end('NgxSkeletonLoader:Rendered');\n }\n\n ngOnDestroy() {\n end('NgxSkeletonLoader:Loaded');\n }\n}\n","<span\n *ngFor=\"let item of items\"\n class=\"skeleton-loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';\nimport { NgxSkeletonLoaderConfig, NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';\n\n@NgModule({\n declarations: [NgxSkeletonLoaderComponent],\n imports: [CommonModule],\n exports: [NgxSkeletonLoaderComponent],\n})\nexport class NgxSkeletonLoaderModule {\n static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule> {\n return {\n ngModule: NgxSkeletonLoaderModule,\n providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],\n };\n }\n}\n","/*\n * Public API Surface of ngx-skeleton-loader\n */\n\nexport * from './lib/ngx-skeleton-loader.component';\nexport * from './lib/ngx-skeleton-loader.module';\nexport * from './lib/ngx-skeleton-loader-config.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA4B;;MCQrG,0BAA0B;IA2BrC,YAA4D,MAAgC;QAC1F,MAAM,EACJ,UAAU,GAAG,MAAM,EACnB,SAAS,GAAG,UAAU,EACtB,KAAK,GAAG,IAAI,EACZ,WAAW,GAAG,YAAY,EAC1B,KAAK,GAAG,CAAC,EACT,SAAS,GAAG,SAAS,GACtB,GAAG,MAAM,IAAI,EAAE,CAAC;QAEjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC5B;IAED,QAAQ;QACN,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACpC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAElC,IAAI,CAAC,mBAAmB,EAAE,CAAC;KAC5B;IAEO,mBAAmB;;QAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE;;YAElC,IAA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ACnC;IAED,WAAW;QACT,GAAG,CAAC,0BAA0B,CAAC,CAAC;KACjC;;6JAhHU,0BAA0B,kBA2BjB,0BAA0B;iJA3BnC,0BAA0B,kOC1BvC,meAmBA;2FDOa,0BAA0B;kBANtC,SAAS;+BACE,qBAAqB,mBAGd,uBAAuB,CAAC,MAAM;;0BA6BlC,MAAM;2BAAC,0BAA0B;;0BAAG,QAAQ;4CApBzD,KAAK;sBADJ,KAAK;gBAIN,WAAW;sBADV,KAAK;gBAIN,UAAU;sBADT,KAAK;gBAIN,SAAS;sBADR,KAAK;gBAIN,SAAS;sBADR,KAAK;gBAIN,KAAK;sBADJ,KAAK;;;MEpCK,uBAAuB;IAClC,OAAO,OAAO,CAAC,MAAyC;QACtD,OAAO;YACL,QAAQ,EAAE,uBAAuB;YACjC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SACvE,CAAC;KACH;;0JANU,uBAAuB;2JAAvB,uBAAuB,iBAJnB,0BAA0B,aAC/B,YAAY,aACZ,0BAA0B;2JAEzB,uBAAuB,YAHzB,CAAC,YAAY,CAAC;2FAGZ,uBAAuB;kBALnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC;;;ACVD;;;;ACAA;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ngx-skeleton-loader",
3
3
  "description": "Make beautiful, animated loading skeletons that automatically adapt to your Angular apps",
4
- "version": "5.0.0",
4
+ "version": "6.0.0",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=8.0.0",
7
7
  "@angular/core": ">=8.0.0"