ngx-skeleton-loader 8.0.1 → 8.1.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,600 @@
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
+ ## [8.1.0][] - 2023-09-12
11
+
12
+ ### Fixed
13
+
14
+ - fixing issue with optional chaining not being supported on apps using Angular CLI <=v11;
15
+
16
+ ### Updated
17
+
18
+ - Updated input values validation in order to remove optional chaining. Instead, the code is now using object destructuring to get config theme value;
19
+
20
+ ## [8.0.2][] - 2023-09-11
21
+
22
+ ### Fixed
23
+
24
+ - Fixing `README.md` docs
25
+
26
+ ## [8.0.1][] - 2023-08-30
27
+
28
+ ### Fixed
29
+
30
+ - Fixing CSS reduce motion in MacOS;
31
+
32
+ ## [8.0.0][] - 2023-06-20
33
+
34
+ ### Updated
35
+
36
+ - Updating project to support Angular v16;
37
+ - Updating NodeJS version to v18;
38
+ - Updating peerDependencies to point to latest `@angular/*` packages;
39
+
40
+ ### Removed
41
+
42
+ - Removing `perf-marks` dependency library;
43
+
44
+ ## [7.0.0][] - 2023-02-04
45
+
46
+ ### Added
47
+
48
+ - Adding support for extending global theme added via `NgxSkeletonLoaderModule.forRoot({ theme: /* ...list of CSS atributes */} })`
49
+
50
+ By default when using `NgxSkeletonLoaderModule.forRoot({ theme: /* ...list of CSS atributes */} })` the application is using this value as source of truth, overriding any local theming passed to `<ngx-skeleton-loader>` component via `[theme]` input.
51
+
52
+ By using `NgxSkeletonLoaderModule.forRoot({ theme: { extendsFromRoot: true, /* ...list of CSS atributes */} })` in your application, you should also be aware that:
53
+
54
+ - By default, every `<ngx-skeleton-loader>` component will use `theme` coming from `NgxSkeletonLoaderModule.forRoot()` as the source of truth
55
+ - If there's any CSS attribute on the component locally which overrides the CSS spec, it combines both themes, but overriding global CSS attributes in favor of local ones.
56
+
57
+ ```html
58
+ <!--
59
+ // ... E.G: App is using this configuration below
60
+
61
+ NgxSkeletonLoaderModule.forRoot({
62
+ theme: {
63
+ // Enabliong theme combination
64
+ extendsFromRoot: true,
65
+ // ... list of CSS theme attributes
66
+ height: '30px',
67
+ },
68
+ }),
69
+ -->
70
+
71
+ <div class="item">
72
+ <ngx-skeleton-loader></ngx-skeleton-loader>
73
+ <!-- above line will produce a skeleton component using `height: 30px;`" -->
74
+ <ngx-skeleton-loader [theme]="{background: 'blue'}"></ngx-skeleton-loader>
75
+ <!-- above line will produce a skeleton component using `height: 30px; background: blue;`" -->
76
+ <ngx-skeleton-loader [theme]="{height: '50px', background: 'red'}"></ngx-skeleton-loader>
77
+ <!-- above line will produce a skeleton component using `height: 50px; background: red;`" -->
78
+ </div>
79
+ ```
80
+
81
+ - Adding new `custom-content` appearance. From now on, consumers can now add their own content inside `<ng-skeleton-loader></ng-skeleton-loader>` component. So that, they can add some custom content, such as SVG, as an example
82
+ - Adding examples for `custom-content` usage
83
+
84
+ ### Updated
85
+
86
+ - Updagrading module to Angular v15
87
+
88
+ ### Fixed
89
+
90
+ - Removing build warnings
91
+
92
+ ## [6.0.0][] - 2022-08-18
93
+
94
+ ### Updated
95
+
96
+ - Adding Publishing setup using NPX
97
+ - Replacing CSS class namespace from `.loader` to `.skeleton-loader`
98
+
99
+ #### Breaking Change
100
+
101
+ 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.
102
+
103
+ ## [5.0.0][] - 2022-02-08
104
+
105
+ ### Updated
106
+
107
+ > Thanks @yharaskrik
108
+
109
+ #### Breaking Change
110
+
111
+ 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.
112
+
113
+ - Updating package bundle distribution
114
+ - Updating `@angular/cli` to v13
115
+ - Applying project changes to v13
116
+ - Updating bundlesize check to point to `fesm2020`
117
+
118
+ ## [4.0.0][] - 2021-07-28
119
+
120
+ ### Fixed
121
+
122
+ #### Breaking Change
123
+
124
+ - 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.
125
+
126
+ 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.
127
+
128
+ ## [3.0.0][] - 2021-07-23
129
+
130
+ ### Added
131
+
132
+ #### Breaking Change
133
+
134
+ - 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.
135
+
136
+ ## [2.10.1][] - 2021-07-13
137
+
138
+ ### Fixed
139
+
140
+ - Ensures every ARIA progressbar node has an accessible name. This is caused by missing aria-label on the `<span>` element.
141
+
142
+ Thanks @rkristelijn for raising the issue and the pull request!
143
+
144
+ ## [2.10.0][] - 2021-06-15
145
+
146
+ ### Added
147
+
148
+ - 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.
149
+
150
+ ```ts
151
+
152
+ @NgModule({
153
+ // ...
154
+ imports: [NgxSkeletonLoaderModule.forRoot({ appearance: 'circle', count: 3 )],
155
+ // ...
156
+ })
157
+ ```
158
+
159
+ ## [2.9.2][] - 2021-04-11
160
+
161
+ ### Updated
162
+
163
+ - Updating link in README.md
164
+
165
+ ### Fixed
166
+
167
+ - Bumping dev dependencies to avoid security issues
168
+
169
+ ## [2.9.1][] - 2021-02-20
170
+
171
+ ### Fixed
172
+
173
+ - Adding `appearance` attribute to be checked via `ngOnChanges`
174
+
175
+ ### Updated
176
+
177
+ - Updating examples with new features
178
+
179
+ ## [2.9.0][] - 2021-02-19
180
+
181
+ ### Added
182
+
183
+ - Adding validation for @Input attributes that needs internal manipulation. After these changes:
184
+ - if `count` is not a numeric value, it will use the default value as `1`
185
+ - if `animation` is not a valid attribute, it will use the default value as `progress`
186
+ - PS: The other values alredy have a fallback, so nothing to worry here
187
+ - 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
188
+
189
+ ### Updated
190
+
191
+ - Adding `ngOnChange` to validate `count` input in case of changes via binding
192
+ - Updating `README.md` with information about `appearance` and `theme` usage.
193
+
194
+ ## [2.8.0][] - 2021-02-18
195
+
196
+ ### Fixed
197
+
198
+ - 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
199
+ - Fixing type issues on `yarn build:ssr` command
200
+
201
+ ### Updated
202
+
203
+ - Updating `perf-marks` to `v1.14.1`
204
+ - Adding strict mode support in module
205
+ - Updating types for `theme` to match with `ngStyle`. More details in https://angular.io/api/common/NgStyle#properties
206
+
207
+ ## [2.7.0][] - 2021-02-06
208
+
209
+ ### Added
210
+
211
+ - 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..."
212
+
213
+ ```html
214
+ <!-- Passing loading text to be used as WAI-ARIA `aria-valuetext` -->
215
+ <!-- In this case, it will render the component using "Please wait ..." -->
216
+ <!-- Otherwise, it defaults to "Loading..." -->
217
+ <div class="skeleton-with-specific-loading-text">
218
+ <ngx-skeleton-loader loadingText="Please wait ..."></ngx-skeleton-loader>
219
+ </div>
220
+ ```
221
+
222
+ ### Updated
223
+
224
+ - Using OnPush as changeDetection mechanism into ngx-skeleton-loader component
225
+ - 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.
226
+
227
+ ```html
228
+ <div class="item">
229
+ <!-- Disables the animation -->
230
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
231
+ <!-- Disables the animation, but receiving boolean value from binding -->
232
+ <!-- Via binding it can receive `false` (boolean), "false" (string), or any other animation type -->
233
+ <ngx-skeleton-loader [animation]="classAttributeWithBooleanFalseValue"></ngx-skeleton-loader>
234
+ <!-- Uses `progress` as animation -->
235
+ <ngx-skeleton-loader animation="progress"></ngx-skeleton-loader>
236
+ <ngx-skeleton-loader></ngx-skeleton-loader>
237
+ <!-- Uses `pulse` as animation -->
238
+ <ngx-skeleton-loader animation="pulse"></ngx-skeleton-loader>
239
+ </div>
240
+ ```
241
+
242
+ ## [2.6.2][] - 2020-12-08
243
+
244
+ ### Fixed
245
+
246
+ - Removing Lighthouse "Avoid non-composited animations" issue. Lighthouse shows warnings from ngx-skeleton-loader.scss -file (progress).
247
+
248
+ - "Avoid non-composited animations":
249
+ - "Animations which are not composited can be janky and contribute to CLS"
250
+
251
+ 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 🎉
252
+
253
+ ## [2.6.1][] - 2020-11-30
254
+
255
+ ### Fixed
256
+
257
+ - Solving `forRoot()` types error `Generic type 'ModuleWithProviders<T>' requires 1 type argument(s)`. Closes https://github.com/willmendesneto/ngx-skeleton-loader/issues/51
258
+
259
+ ## [2.6.0][] - 2020-11-15
260
+
261
+ ### Added
262
+
263
+ - Adding `NgxSkeletonLoaderModule.forRoot()` method. Usage:
264
+
265
+ ```js
266
+ import { NgModule } from '@angular/core';
267
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
268
+ // ... list of other app dependencies
269
+
270
+ import { AppComponent } from './app.component';
271
+ // ... list of other app components/modules
272
+
273
+ @NgModule({
274
+ declarations: [AppComponent],
275
+ imports: [NgxSkeletonLoaderModule.forRoot()],
276
+ providers: [],
277
+ bootstrap: [AppComponent],
278
+ })
279
+ export class AppModule {}
280
+ ```
281
+
282
+ ## [2.5.0][] - 2020-10-10
283
+
284
+ ### Fixed
285
+
286
+ - Fixing bundle size command on CircleCI pipeline
287
+
288
+ ### Updated
289
+
290
+ - Upgrading NodeJS to v14.11.0
291
+ - Updating `perf-marks` package to v1.14.0
292
+ - Improving skeleton animations fps by using `cubic-bezier` instead of `ease-in-out`
293
+
294
+ ## [2.4.4][] - 2020-08-21
295
+
296
+ ### Fixed
297
+
298
+ - Remove check requirements if perf-marks is running in a browser or not in Angular apps 🔥
299
+
300
+ ### Added
301
+
302
+ - 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 💪
303
+ - Adding `.prettierrc` file with some of the code styling rules
304
+
305
+ ## [2.4.3][] - 2020-08-13
306
+
307
+ ### Fixed
308
+
309
+ - Avoiding perf-marks call if running in Angular Universal applications
310
+
311
+ ## [2.4.2][] - 2020-08-01
312
+
313
+ ### Updated
314
+
315
+ - Bumping `perf-marks` to latest version
316
+
317
+ ## [2.4.1][] - 2020-08-01
318
+
319
+ ### Updated
320
+
321
+ - Bumping `perf-marks` to latest version
322
+
323
+ ## [2.4.0][] - 2020-08-01
324
+
325
+ ### Added
326
+
327
+ - Adding User Timing API to track component render and content loader time
328
+
329
+ ### Updated
330
+
331
+ - Updating examples with new skeleton simulation
332
+ - Adding Stackblitz link for user card skeleton loading demo
333
+
334
+ ## [2.3.0][] - 2020-08-01
335
+
336
+ ### Added
337
+
338
+ - Adding User Timing API to track component render and content loader time
339
+
340
+ ### Updated
341
+
342
+ - Updating examples with new skeleton simulation
343
+ - Adding Stackblitz link for user card skeleton loading demo
344
+
345
+ ## [2.2.1][] - 2020-06-30
346
+
347
+ ### Fixed
348
+
349
+ - For compatibility with IE11 by using indexOf instead of `includes`
350
+
351
+ ### Updated
352
+
353
+ - Updating `npm run postinstall` command to follow the new rules from update.angular.io website
354
+
355
+ ## [2.2.0][] - 2020-06-01
356
+
357
+ ### Added
358
+
359
+ - 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/
360
+
361
+ ## [2.1.0][] - 2020-06-01
362
+
363
+ ### Updated
364
+
365
+ - Upgrading @angular/cli to version 9
366
+ - 🎉 Decreasing bundle size to 1.17KB 🎉
367
+
368
+ ## [2.0.0][] - 2020-05-15
369
+
370
+ ### Updated
371
+
372
+ - Upgrading NodeJS to v12.16.2
373
+ - Updating documentation with `animation` attribute
374
+
375
+ ### Added
376
+
377
+ - Supporting for new animation `progress-dark` to enable users when using theme with darker color schema
378
+ - Supporting for different animations 🎉
379
+
380
+ 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:
381
+
382
+ - `false`: it will disable the animation;
383
+ - `progress` - _default_: it will use it `progress` as animation;
384
+ - `pulse`: it will use `pulse` as animation;
385
+
386
+ > `progress` is the default animation, used as the single one previously. If you don't pass the animation attribute, it defaults to `progress`.
387
+
388
+ ```html
389
+ <div class="item">
390
+ <!-- Disables the animation -->
391
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
392
+ <!-- Uses `progress` as animation -->
393
+ <ngx-skeleton-loader animation="progress"></ngx-skeleton-loader>
394
+ <ngx-skeleton-loader></ngx-skeleton-loader>
395
+ <!-- Uses `pulse` as animation -->
396
+ <ngx-skeleton-loader animation="pulse"></ngx-skeleton-loader>
397
+ </div>
398
+ ```
399
+
400
+ - Supporting enabling/disabling animations.
401
+ 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.
402
+
403
+ > It works only to disable it. In case you want to keep enable it
404
+
405
+ ```js
406
+ <div class="item">
407
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
408
+ </div>
409
+ ```
410
+
411
+ ## [1.2.7][] - 2020-04-13
412
+
413
+ ### Updated
414
+
415
+ - Decreasing bundle size after disable Ivy in production build
416
+ - Adding description, keywords and github information on `package.json` files
417
+
418
+ ## [1.2.6][] - 2020-02-26
419
+
420
+ ### Fixed
421
+
422
+ - Changing angular library configuration to prod and forcing it at publish time
423
+
424
+ ## [1.2.5][] - 2020-02-25
425
+
426
+ ### Fixed
427
+
428
+ - Changing angular library configuration to prod
429
+
430
+ ## [1.2.4][] - 2020-02-25
431
+
432
+ ### Updated
433
+
434
+ - Updating Github templates
435
+ - Updating Angular CLI to v9
436
+
437
+ ## [1.2.3][] - 2020-02-25
438
+
439
+ ### Fixed
440
+
441
+ - Solving peerDependency warning when installing library in an Angular 9 project
442
+
443
+ ## [1.2.2][] - 2019-06-22
444
+
445
+ ### Fixed
446
+
447
+ - Fixing component dimensions via theme
448
+
449
+ ## [1.2.1][] - 2019-06-08
450
+
451
+ ### Updated
452
+
453
+ - Updating Angular CLI to v8
454
+
455
+ ## [1.2.0][] - 2019-04-19
456
+
457
+ ### Updated
458
+
459
+ - Updating Angular CLI to 7.3.8
460
+
461
+ ## [1.1.2][] - 2019-01-07
462
+
463
+ ### Added
464
+
465
+ - Adding badges for stackblitz, bundlephobia and license
466
+
467
+ ### Updated
468
+
469
+ - Removing unnecessary CSS styles for skeleton
470
+
471
+ ## [1.1.1][] - 2018-12-17
472
+
473
+ ### Fixed
474
+
475
+ - Fixing Stackblitz link demo link
476
+
477
+ ## [1.1.0][] - 2018-12-17
478
+
479
+ ### Added
480
+
481
+ - Added GitHub urls into `package.json`
482
+ - Added Circle CI integration
483
+ - Added Coveralls integration
484
+ - Added GitHub templates
485
+ - Added `CODE_OF_CONDUCT.md` with the Code of conduct
486
+ - Added unit tests for skeletons and demo components
487
+
488
+ ### Updated
489
+
490
+ - Decreased bundle size
491
+ - New gif showing `ngx-skeleton-loader` in action
492
+
493
+ ## [1.0.2][] - 2018-12-16
494
+
495
+ ### Fixed
496
+
497
+ - Added markdown files in dist folder in build time
498
+
499
+ ## [1.0.1][] - 2018-12-16
500
+
501
+ ### Fixed
502
+
503
+ - Added markdown files in dist folder in build time
504
+
505
+ ## [1.0.0][] - 2018-12-16
506
+
507
+ ### Fixed
508
+
509
+ - Fixed build script
510
+
511
+ ## [0.0.1][] - 2018-12-16
512
+
513
+ ### Added
514
+
515
+ - Created `ngx-skeleton-loader`
516
+ - Created test automation for the module
517
+
518
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v0.0.1...HEAD
519
+ [0.0.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v0.0.1
520
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.0...HEAD
521
+ [1.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.0.0
522
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.2...HEAD
523
+ [1.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.1...v1.0.2
524
+ [1.0.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.0.1
525
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.0.2...HEAD
526
+ [1.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.0.2
527
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.1.0...HEAD
528
+ [1.1.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.1.0
529
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.1.1...HEAD
530
+ [1.1.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.1.1
531
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.4...HEAD
532
+ [1.2.4]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.3...v1.2.4
533
+ [1.2.3]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.2...v1.2.3
534
+ [1.2.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.1...v1.2.2
535
+ [1.2.1]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.0...v1.2.1
536
+ [1.2.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.1.2...v1.2.0
537
+ [1.1.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.1.2
538
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.5...HEAD
539
+ [1.2.5]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.2.5
540
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.6...HEAD
541
+ [1.2.6]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.2.6
542
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v1.2.7...HEAD
543
+ [1.2.7]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v1.2.7
544
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.0.0...HEAD
545
+ [2.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.0.0
546
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.1.0...HEAD
547
+ [2.1.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.1.0
548
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.2.0...HEAD
549
+ [2.2.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.2.0
550
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.2.1...HEAD
551
+ [2.2.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.2.1
552
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.3.0...HEAD
553
+ [2.3.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.3.0
554
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.0...HEAD
555
+ [2.4.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.0
556
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.1...HEAD
557
+ [2.4.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.1
558
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.2...HEAD
559
+ [2.4.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.2
560
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.3...HEAD
561
+ [2.4.3]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.3
562
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.4.4...HEAD
563
+ [2.4.4]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.4.4
564
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.5.0...HEAD
565
+ [2.5.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.5.0
566
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.6.0...HEAD
567
+ [2.6.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.6.0
568
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.6.1...HEAD
569
+ [2.6.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.6.1
570
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.6.2...HEAD
571
+ [2.6.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.6.2
572
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.7.0...HEAD
573
+ [2.7.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.7.0
574
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.8.0...HEAD
575
+ [2.8.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.8.0
576
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.9.0...HEAD
577
+ [2.9.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.9.0
578
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.9.1...HEAD
579
+ [2.9.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.9.1
580
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.9.2...HEAD
581
+ [2.9.2]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.9.2
582
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.10.0...HEAD
583
+ [2.10.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.10.0
584
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v2.10.1...HEAD
585
+ [2.10.1]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v2.10.1
586
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v4.0.0...HEAD
587
+ [4.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v3.0.0...v4.0.0
588
+ [3.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v3.0.0
589
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v5.0.0...HEAD
590
+ [5.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v5.0.0
591
+ [unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v6.0.0...HEAD
592
+ [6.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v6.0.0
593
+ [Unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.1.0...HEAD
594
+ [8.1.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.2...v8.1.0
595
+ [8.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.1...v8.0.2
596
+ [8.0.1]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.2...v8.0.1
597
+ [8.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.1...v8.0.2
598
+ [8.0.1]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.0...v8.0.1
599
+ [8.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v7.0.0...v8.0.0
600
+ [7.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v7.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,345 @@
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
+ #### Extending `theme` via `NgxSkeletonLoaderModule.forRoot()`
122
+
123
+ > By default when using `NgxSkeletonLoaderModule.forRoot({ theme: /* ...list of CSS atributes */} })` the application is using this value as source of truth, overriding any local theming passed to `<ngx-skeleton-loader>` component via `[theme]` input. Check these steps in case you need to change this behaviour in your app
124
+
125
+ This method is also accepting the option of having a global theme and local theme inputs. You can enable it by passing `NgxSkeletonLoaderModule.forRoot({ theme: { extendsFromRoot: true, /* ...list of CSS atributes */} })` in your module. Quite simple, right? 😄
126
+
127
+ By using that configuration in your application, you should also be aware that:
128
+
129
+ - By default, every `<ngx-skeleton-loader>` component will use `theme` coming from `NgxSkeletonLoaderModule.forRoot()` as the source of truth
130
+ - If there's any CSS attribute on the component locally which overrides the CSS spec, it combines both themes, but overriding global CSS attributes in favor of local ones.
131
+
132
+ As an example:
133
+
134
+ ```typescript
135
+ ...
136
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
137
+ ...
138
+
139
+ @NgModule({
140
+ declarations: [
141
+ YourAppComponent
142
+ ],
143
+ imports: [
144
+ ...
145
+ NgxSkeletonLoaderModule.forRoot({
146
+ theme: {
147
+ // Enabliong theme combination
148
+ extendsFromRoot: true,
149
+ // ... list of CSS theme attributes
150
+ height: '30px',
151
+ },
152
+ }),
153
+ ...
154
+ ],
155
+ providers: [],
156
+ bootstrap: [YourAppComponent]
157
+ })
158
+
159
+ export class YourAppComponent {}
160
+
161
+ ```
162
+
163
+ ```html
164
+ <div class="item">
165
+ <ngx-skeleton-loader></ngx-skeleton-loader>
166
+ <!-- above line will produce a skeleton component using `height: 30px;`" -->
167
+ <ngx-skeleton-loader [theme]="{background: 'blue'}"></ngx-skeleton-loader>
168
+ <!-- above line will produce a skeleton component using `height: 30px; background: blue;`" -->
169
+ <ngx-skeleton-loader [theme]="{height: '50px', background: 'red'}"></ngx-skeleton-loader>
170
+ <!-- above line will produce a skeleton component using `height: 50px; background: red;`" -->
171
+ </div>
172
+ ```
173
+
174
+ ## WAI-ARIA values
175
+
176
+ - loadingText - _default_ `Loading...`: attribute that defines the text value for `aria-valuetext` attribute. Defaults to "Loading..."
177
+ - `aria-label` - _default_ `loading`: you can add `ariaLabel` as input of the component to set a different value.
178
+
179
+ ## Appearance
180
+
181
+ You can also define which appearance want to use in your skeleton loader by passing the options in your component via `[appearance]` attribute.
182
+
183
+ ### Options
184
+
185
+ - `''` - _default_: it will use it `''` as appearance. At the end, it will render like a line;
186
+ - `line`: it will render like a line. This is the same behavior as passing an empty string;
187
+ - `circle`: it will use `circle` as appearance. Great for avatar skeletons, for example :);
188
+ - `custom-content`: it will NOT add any appearance. Great for custom content, such as SVG, internal components and such;
189
+
190
+ ## Animations
191
+
192
+ 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.
193
+
194
+ ### Options
195
+
196
+ - `"false"` (as string): it will disable the animation;
197
+ - `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;
198
+ - `progress` - _default_: it will use it `progress` as animation;
199
+ - `progress-dark`: it will use it `progress-dark` as animation. Recommended if your color schema is darken;
200
+ - `pulse`: it will use `pulse` as animation;
201
+
202
+ > `progress` is the default animation, used as the single one previously. If you don't pass the animation attribute, it defaults to `progress`.
203
+
204
+ ```html
205
+ <!--
206
+ If you need to change all the background wrapper
207
+ you need to apply the style changes on the
208
+ `ngx-skeleton-loader` component wrapper
209
+ -->
210
+ <div class="item">
211
+ <!-- Disables the animation -->
212
+ <ngx-skeleton-loader animation="false"></ngx-skeleton-loader>
213
+ <!-- Disables the animation, but receiving boolean value from binding -->
214
+ <!-- Via binding it can receive `false` (boolean), "false" (string), or any other animation type -->
215
+ <ngx-skeleton-loader [animation]="classAttributeWithBooleanFalseValue"></ngx-skeleton-loader>
216
+ <!-- Uses `progress` as animation -->
217
+ <ngx-skeleton-loader animation="progress"></ngx-skeleton-loader>
218
+ <ngx-skeleton-loader></ngx-skeleton-loader>
219
+ <!-- Uses `pulse` as animation -->
220
+ <ngx-skeleton-loader animation="pulse"></ngx-skeleton-loader>
221
+ </div>
222
+ ```
223
+
224
+ > 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)
225
+
226
+ ## Theming
227
+
228
+ 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.
229
+
230
+ ```html
231
+ <!--
232
+ If you need to change all the background wrapper
233
+ you need to apply the style changes on the
234
+ `ngx-skeleton-loader` component wrapper
235
+ -->
236
+
237
+ <div style="background: #FF0001; padding: 10px;">
238
+ <ngx-skeleton-loader
239
+ count="5"
240
+ [theme]="{
241
+ 'border-radius': '5px',
242
+ height: '50px',
243
+ 'background-color': '#992929',
244
+ border: '1px solid white'
245
+ }"
246
+ ></ngx-skeleton-loader>
247
+ </div>
248
+ ```
249
+
250
+ 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
251
+
252
+ ```html
253
+ <!--
254
+ Note that we are using a combination of styles and ngStyle inside theme object,
255
+ having `height.px` receiving a number and `background-color` receiving a HEX Color
256
+ -->
257
+ <div style="background: #FF0001; padding: 10px;">
258
+ <ngx-skeleton-loader
259
+ count="5"
260
+ [theme]="{
261
+ 'height.px': 50,
262
+ 'background-color': '#992929'
263
+ }"
264
+ ></ngx-skeleton-loader>
265
+ </div>
266
+ ```
267
+
268
+ ### ⚠️ This is here only as a documentation, but it's not encouraged to be used. Please consider use it with caution ⚠️
269
+
270
+ Also, you can use CSS to add theme styles into your component. However, there are some implications:
271
+
272
+ - 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)**
273
+ - 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**.
274
+
275
+ As an example, your Component file is like this
276
+
277
+ ```typescript
278
+ import { Component } from '@angular/core';
279
+
280
+ @Component({
281
+ selector: 'my-ngx-skeleton-loader-with-theming',
282
+ templateUrl: './my-ngx-skeleton-loader-with-theming.component.html',
283
+ styleUrls: ['./my-ngx-skeleton-loader-with-theming.component.css'],
284
+ })
285
+ export class MyNGXSkeletonLoaderWithThemingComponent {
286
+ /* ... code goes here*/
287
+ }
288
+ ```
289
+
290
+ And your component HTML code is
291
+
292
+ ```html
293
+ <!--
294
+ file: my-ngx-skeleton-loader-with-theming.component.html
295
+
296
+ As an example, it's not using themes via [theme] attributes.
297
+ -->
298
+
299
+ <ngx-skeleton-loader count="5" animation="pulse"></ngx-skeleton-loader>
300
+ ```
301
+
302
+ You can apply theme changes in our stylesheet. At the end it will be
303
+
304
+ ```css
305
+ /* file: `my-ngx-skeleton-loader-with-theming.component.css`
306
+ *
307
+ * You can find more details about `:host` at
308
+ * Angular Component Style Docs https://angular.io/guide/component-styles#host
309
+ */
310
+ :host >>> ngx-skeleton-loader .skeleton-loader {
311
+ border-radius: 5px;
312
+ height: 50px;
313
+ background-color: #992929;
314
+ border: 1px solid white;
315
+ }
316
+ ```
317
+
318
+ > 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)
319
+
320
+ ## Development
321
+
322
+ ### Run demo locally
323
+
324
+ 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
325
+
326
+ ### Run tests
327
+
328
+ 1. Run `npm test` for run tests. In case you want to test using watch, please use `npm run tdd`
329
+
330
+ ### Publish
331
+
332
+ 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`
333
+
334
+ > For more details, [please check np package on npmjs.com](https://www.npmjs.com/package/np)
335
+
336
+ ## Contribute
337
+
338
+ 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.
339
+
340
+ ## Author
341
+
342
+ **Wilson Mendes (willmendesneto)**
343
+
344
+ - <https://twitter.com/willmendesneto>
345
+ - <http://github.com/willmendesneto>
@@ -50,11 +50,11 @@ class NgxSkeletonLoaderComponent {
50
50
  }
51
51
  this.appearance = '';
52
52
  }
53
- // Optional chaining is only supported on Angular CLI v12
53
+ // This code is not using optional chaining since it's only supported on Angular CLI v12
54
54
  // - more details in this comment https://github.com/angular/angular-cli/issues/20471#issuecomment-815599616
55
- // So the main issue here is on the consumer's side.
56
- // Options are use v6.0.0 or upgrade your Angular CLI to >= v12, as described in https://github.com/willmendesneto/ngx-skeleton-loader/issues/150#issuecomment-1638612329
57
- if (Boolean(this.config?.theme?.extendsFromRoot) && this.theme !== null) {
55
+ // Which raises issues on the consumer's side. E.G: https://github.com/willmendesneto/ngx-skeleton-loader/issues/150#issuecomment-1638612329
56
+ const { theme } = this.config || {};
57
+ if (!!theme && !!theme.extendsFromRoot && this.theme !== null) {
58
58
  // Shows error message only in Development
59
59
  this.theme = { ...this.config.theme, ...this.theme };
60
60
  }
@@ -93,4 +93,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
93
93
  }], theme: [{
94
94
  type: Input
95
95
  }] } });
96
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXNrZWxldG9uLWxvYWRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2tlbGV0b24tbG9hZGVyL3NyYy9saWIvbmd4LXNrZWxldG9uLWxvYWRlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ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5kZXg9XCItMVwiXG4gIFtuZ0NsYXNzXT1cIntcbiAgICAnY3VzdG9tLWNvbnRlbnQnOiBhcHBlYXJhbmNlID09PSAnY3VzdG9tLWNvbnRlbnQnLFxuICAgIGNpcmNsZTogYXBwZWFyYW5jZSA9PT0gJ2NpcmNsZScsXG4gICAgcHJvZ3Jlc3M6IGFuaW1hdGlvbiA9PT0gJ3Byb2dyZXNzJyxcbiAgICAncHJvZ3Jlc3MtZGFyayc6IGFuaW1hdGlvbiA9PT0gJ3Byb2dyZXNzLWRhcmsnLFxuICAgIHB1bHNlOiBhbmltYXRpb24gPT09ICdwdWxzZSdcbiAgfVwiXG4gIFtuZ1N0eWxlXT1cInRoZW1lXCJcbj5cbiAgPG5nLWNvbnRlbnQgKm5nSWY9XCJhcHBlYXJhbmNlICA9PT0gJ2N1c3RvbS1jb250ZW50J1wiPjwvbmctY29udGVudD5cbjwvZGl2PlxuIl19
@@ -53,11 +53,11 @@ class NgxSkeletonLoaderComponent {
53
53
  }
54
54
  this.appearance = '';
55
55
  }
56
- // Optional chaining is only supported on Angular CLI v12
56
+ // This code is not using optional chaining since it's only supported on Angular CLI v12
57
57
  // - more details in this comment https://github.com/angular/angular-cli/issues/20471#issuecomment-815599616
58
- // So the main issue here is on the consumer's side.
59
- // Options are use v6.0.0 or upgrade your Angular CLI to >= v12, as described in https://github.com/willmendesneto/ngx-skeleton-loader/issues/150#issuecomment-1638612329
60
- if (Boolean(this.config?.theme?.extendsFromRoot) && this.theme !== null) {
58
+ // Which raises issues on the consumer's side. E.G: https://github.com/willmendesneto/ngx-skeleton-loader/issues/150#issuecomment-1638612329
59
+ const { theme } = this.config || {};
60
+ if (!!theme && !!theme.extendsFromRoot && this.theme !== null) {
61
61
  // Shows error message only in Development
62
62
  this.theme = { ...this.config.theme, ...this.theme };
63
63
  }
@@ -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 // It enforces a combination of `fromRoot` styles with component `styles` attribute\n extendsFromRoot?: boolean;\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | 'custom-content' | '';\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 ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\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, OnChanges {\n static ngAcceptInputType_count: number | string;\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 items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() private 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 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\n //Force count to 1 when custom-content is used\n if (this.appearance === 'custom-content') {\n // Shows error message only in Development\n if (isDevMode() && this.count !== 1) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` enforces elements with \"custom-content\" appearance as DOM nodes. Forcing \"count\" to \"1\".`,\n );\n this.count = 1;\n }\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', 'custom-content', ''].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 custom-content or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n\n // Optional chaining is only supported on Angular CLI v12\n // - more details in this comment https://github.com/angular/angular-cli/issues/20471#issuecomment-815599616\n // So the main issue here is on the consumer's side.\n // Options are use v6.0.0 or upgrade your Angular CLI to >= v12, as described in https://github.com/willmendesneto/ngx-skeleton-loader/issues/150#issuecomment-1638612329\n if (Boolean(this.config?.theme?.extendsFromRoot) && this.theme !== null) {\n // Shows error message only in Development\n this.theme = { ...this.config!.theme, ...this.theme };\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","<div\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=\"-1\"\n [ngClass]=\"{\n 'custom-content': appearance === 'custom-content',\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n <ng-content *ngIf=\"appearance === 'custom-content'\"></ng-content>\n</div>\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":";;;;;MAmBa,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA4B;;ACFlH,MAMa,0BAA0B,CAAA;AAwBrC,IAAA,WAAA,CAAoE,MAAgC,EAAA;QAAhC,IAAM,CAAA,MAAA,GAAN,MAAM,CAA0B;AAClG,QAAA,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;AAEjB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;AAChB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC5B;IAED,QAAQ,GAAA;QACN,IAAI,CAAC,mBAAmB,EAAE,CAAC;KAC5B;IAEO,mBAAmB,GAAA;;QAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAG,EAAA,IAAI,CAAC,KAAK,CAAE,CAAA,CAAC,EAAE;;YAElC,IAAI,SAAS,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AAE,MAAM,EAAE,CAAC;SACvE,CAAC;KACH;iIANU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EAJnB,YAAA,EAAA,CAAA,0BAA0B,CAC/B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,0BAA0B,CAAA,EAAA,CAAA,CAAA,EAAA;AAEzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAHxB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACtC,iBAAA,CAAA;;;ACVD;;AAEG;;ACFH;;AAEG;;;;"}
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 // It enforces a combination of `fromRoot` styles with component `styles` attribute\n extendsFromRoot?: boolean;\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | 'custom-content' | '';\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 ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\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, OnChanges {\n static ngAcceptInputType_count: number | string;\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 items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() private 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 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\n //Force count to 1 when custom-content is used\n if (this.appearance === 'custom-content') {\n // Shows error message only in Development\n if (isDevMode() && this.count !== 1) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` enforces elements with \"custom-content\" appearance as DOM nodes. Forcing \"count\" to \"1\".`,\n );\n this.count = 1;\n }\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', 'custom-content', ''].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 custom-content or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n\n // This code is not using optional chaining since it's only supported on Angular CLI v12\n // - more details in this comment https://github.com/angular/angular-cli/issues/20471#issuecomment-815599616\n // Which raises issues on the consumer's side. E.G: https://github.com/willmendesneto/ngx-skeleton-loader/issues/150#issuecomment-1638612329\n const { theme } = this.config || {};\n if (!!theme && !!theme.extendsFromRoot && this.theme !== null) {\n // Shows error message only in Development\n this.theme = { ...this.config!.theme, ...this.theme };\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","<div\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=\"-1\"\n [ngClass]=\"{\n 'custom-content': appearance === 'custom-content',\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n <ng-content *ngIf=\"appearance === 'custom-content'\"></ng-content>\n</div>\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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EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EAJnB,YAAA,EAAA,CAAA,0BAA0B,CAC/B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,0BAA0B,CAAA,EAAA,CAAA,CAAA,EAAA;AAEzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAHxB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACtC,iBAAA,CAAA;;;ACVD;;AAEG;;ACFH;;AAEG;;;;"}
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": "8.0.1",
4
+ "version": "8.1.0",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=16.0.0",
7
7
  "@angular/core": ">=16.0.0"