ngx-skeleton-loader 9.0.0 → 11.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 +27 -1
- package/CONTRIBUTING.md +1 -1
- package/PUBLISHING_HOTFIX.md +102 -0
- package/README.md +5 -5
- package/fesm2022/ngx-skeleton-loader.mjs +115 -93
- package/fesm2022/ngx-skeleton-loader.mjs.map +1 -1
- package/lib/ngx-skeleton-loader.component.d.ts +78 -19
- package/lib/ngx-skeleton-loader.module.d.ts +1 -2
- package/package.json +5 -7
- package/esm2022/lib/ngx-skeleton-loader-config.types.mjs +0 -3
- package/esm2022/lib/ngx-skeleton-loader.component.mjs +0 -95
- package/esm2022/lib/ngx-skeleton-loader.module.mjs +0 -25
- package/esm2022/ngx-skeleton-loader.mjs +0 -5
- package/esm2022/public-api.mjs +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased][]
|
|
9
9
|
|
|
10
|
+
## [11.0.0][] - 2025-04-09
|
|
11
|
+
|
|
12
|
+
### Updated
|
|
13
|
+
- Upgrading project to use Node.js v22.14.0
|
|
14
|
+
- Upgrading project to Angular v19
|
|
15
|
+
- Removing [ngStyle] and [ngClass] in favor of `[style]` and `[class]`, respectively. These directives are expected to be removed in future Angular versions, since their behavior can be replicated using native bindings. This change also reduces the initial bundle size for applications that don’t use these directives.
|
|
16
|
+
|
|
17
|
+
## [10.0.0][] - 2025-01-24
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
- Removing warnings in dev mode in favor of typed angular signals integration. It should not affect consumers in general, but it will be released as a major version, since this project follows the SEMVER standards
|
|
21
|
+
|
|
22
|
+
### Updated
|
|
23
|
+
|
|
24
|
+
> Thanks to @lekhmanrus
|
|
25
|
+
|
|
26
|
+
- Upgrading `@angular/*` packages to v19 - https://github.com/willmendesneto/ngx-skeleton-loader/pull/179
|
|
27
|
+
- Implementing Angular Signals integration - https://github.com/willmendesneto/ngx-skeleton-loader/pull/179
|
|
28
|
+
- Making NGX-Skeleton-Loader Standalone Compliant - Closes https://github.com/willmendesneto/ngx-skeleton-loader/issues/183
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- Adding `PUBLISHING_HOTFIX.md` file describing all the steps to cover a hotfix in older version of NGX-Skeleton-Loader module
|
|
32
|
+
|
|
10
33
|
## [9.0.0][] - 2024-01-13
|
|
11
34
|
### Updated
|
|
12
35
|
|
|
@@ -596,7 +619,10 @@ Now we can define the animation we want to use in `<ngx-skeleton-loader>` compon
|
|
|
596
619
|
[5.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v5.0.0
|
|
597
620
|
[unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v6.0.0...HEAD
|
|
598
621
|
[6.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/tree/v6.0.0
|
|
599
|
-
[Unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/
|
|
622
|
+
[Unreleased]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v11.0.0...HEAD
|
|
623
|
+
[11.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v10.0.0...v11.0.0
|
|
624
|
+
[10.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v9.0.0...v10.0.0
|
|
625
|
+
[9.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v9.0.0...v9.0.0
|
|
600
626
|
[9.0.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.1.0...v9.0.0
|
|
601
627
|
[8.1.0]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.2...v8.1.0
|
|
602
628
|
[8.0.2]: https://github.com/willmendesneto/ngx-skeleton-loader/compare/v8.0.1...v8.0.2
|
package/CONTRIBUTING.md
CHANGED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Publishing a Hotfix for NGX Skeleton Loader
|
|
2
|
+
|
|
3
|
+
> This guide outlines the steps to publish a hotfix for the NGX Skeleton Loader package for older versions - if necessary.
|
|
4
|
+
|
|
5
|
+
A hotfix addresses critical issues that need immediate attention without waiting for the next scheduled release cycle.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
Please make sure you're using the correct NodeJS and NPM versions, as described below - and also in `.nvmrc` file.
|
|
10
|
+
|
|
11
|
+
> **Note** requires node v20.x.x or higher and npm 10.x.x.
|
|
12
|
+
|
|
13
|
+
## Hotfix Process
|
|
14
|
+
|
|
15
|
+
### 1. Identify the Issue
|
|
16
|
+
|
|
17
|
+
Clearly define the issue that needs a hotfix. Use the following steps:
|
|
18
|
+
|
|
19
|
+
Open an issue on GitHub, detailing the problem and its urgency.
|
|
20
|
+
|
|
21
|
+
Reference the issue number in all subsequent commits and documentation.
|
|
22
|
+
|
|
23
|
+
### 2. Create a Hotfix Branch
|
|
24
|
+
|
|
25
|
+
Create a new branch based on the latest stable release tag.
|
|
26
|
+
|
|
27
|
+
# Clone the package and fetch the latest tags and branches
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git clone https://github.com/willmendesneto/ngx-skeleton-loader.git
|
|
31
|
+
cd ngx-skeleton-loader
|
|
32
|
+
git fetch --all
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
# Check out the latest stable release without the issue in specific
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# By running `git checkout <latest-stable-tag>`
|
|
39
|
+
# you will be in a detached head state. E.G:
|
|
40
|
+
git checkout v1.1.0
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
# Create and switch to a hotfix branch
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# create new branch based on detached head state
|
|
47
|
+
git checkout -b hotfix/<issue-key>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3. Implement the Fix
|
|
51
|
+
|
|
52
|
+
Modify the necessary files in the codebase.
|
|
53
|
+
|
|
54
|
+
Run tests to confirm the fix resolves the issue without introducing new bugs.
|
|
55
|
+
|
|
56
|
+
### 4. Update the Version Number
|
|
57
|
+
|
|
58
|
+
Use npm to bump the patch version. The new version follows semantic versioning:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm version patch
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This updates the version in package.json and creates a Git tag for the new version.
|
|
65
|
+
|
|
66
|
+
### 5. Add a Changelog Entry
|
|
67
|
+
|
|
68
|
+
Update the `CHANGELOG.md` file with details of the hotfix:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
## [x.y.z] - YYYY-MM-DD
|
|
72
|
+
### Fixed
|
|
73
|
+
- [#issue-number] Description of the hotfix.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 6. Push Changes to the Repository
|
|
77
|
+
|
|
78
|
+
Push the hotfix branch and the updated tag to the remote repository:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git push origin hotfix/<issue-key>
|
|
82
|
+
git push origin --tags
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 7. Create a Pull Request
|
|
86
|
+
|
|
87
|
+
Open a pull request (PR) from the hotfix branch to the main branch.If it's not against main, please make sure you're pointing to the right branch - and add all relevant reviewers.
|
|
88
|
+
|
|
89
|
+
Include a link to the issue being resolved and the changelog entry.
|
|
90
|
+
|
|
91
|
+
### 8. Merge and Publish the Package Fix
|
|
92
|
+
|
|
93
|
+
Once the PR is reviewed and merged, the updated package will be published to npm by following the [Publish steps as described on `README.md` file.](https://github.com/willmendesneto/ngx-skeleton-loader?tab=readme-ov-file#publish)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
Testing: Always run the full test suite before merging and publishing a hotfix.
|
|
99
|
+
|
|
100
|
+
Documentation: Maintain up-to-date documentation for future contributors.
|
|
101
|
+
|
|
102
|
+
By following these steps, you ensure a smooth and reliable hotfix process for the NGX Skeleton Loader package.
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[](https://npmjs.org/ngx-skeleton-loader)
|
|
9
9
|
|
|
10
10
|
[](https://circleci.com/gh/willmendesneto/ngx-skeleton-loader)
|
|
11
|
-
[](https://coveralls.io/r/willmendesneto/ngx-skeleton-loader?branch=main)
|
|
12
12
|
[](https://bundlephobia.com/result?p=ngx-skeleton-loader)
|
|
13
13
|
[](/LICENSE)
|
|
14
14
|
|
|
@@ -260,11 +260,11 @@ you need to apply the style changes on the
|
|
|
260
260
|
</div>
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
-
The [theme] attribute now accepts the same configuration as `
|
|
263
|
+
The [theme] attribute now accepts the same configuration as `[style]` as well. That means you can manage to use like you're doing with the built-in directive, having a pleasure and beautiful experience
|
|
264
264
|
|
|
265
265
|
```html
|
|
266
266
|
<!--
|
|
267
|
-
Note that we are using a combination of styles and
|
|
267
|
+
Note that we are using a combination of styles and [style] inside theme object,
|
|
268
268
|
having `height.px` receiving a number and `background-color` receiving a HEX Color
|
|
269
269
|
-->
|
|
270
270
|
<div style="background: #FF0001; padding: 10px;">
|
|
@@ -348,11 +348,11 @@ this project is using `np` package to publish, which makes things straightforwar
|
|
|
348
348
|
|
|
349
349
|
## Contribute
|
|
350
350
|
|
|
351
|
-
For any type of contribution, please follow the instructions in [CONTRIBUTING.md](https://github.com/willmendesneto/ngx-skeleton-loader/blob/
|
|
351
|
+
For any type of contribution, please follow the instructions in [CONTRIBUTING.md](https://github.com/willmendesneto/ngx-skeleton-loader/blob/main/CONTRIBUTING.md) and read [CODE_OF_CONDUCT.md](https://github.com/willmendesneto/ngx-skeleton-loader/blob/main/CODE_OF_CONDUCT.md) and [PUBLISHING_HOTFIX.md](https://github.com/willmendesneto/ngx-skeleton-loader/blob/main/PUBLISHING_HOTFIX.md) files.
|
|
352
352
|
|
|
353
353
|
## Author
|
|
354
354
|
|
|
355
355
|
**Wilson Mendes (willmendesneto)**
|
|
356
356
|
|
|
357
|
-
- <https://
|
|
357
|
+
- <https://instagram.com/willmendesneto>
|
|
358
358
|
- <http://github.com/willmendesneto>
|
|
@@ -1,100 +1,123 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { InjectionToken, inject, input, numberAttribute, computed, isDevMode, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
5
3
|
|
|
6
4
|
const NGX_SKELETON_LOADER_CONFIG = new InjectionToken('ngx-skeleton-loader.config');
|
|
7
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The `NgxSkeletonLoaderComponent` is a standalone Angular component that provides a skeleton
|
|
8
|
+
* loader UI element.
|
|
9
|
+
* It can be used to display a loading state before the actual content is available.
|
|
10
|
+
* The component can be configured with various options such as the number of elements, appearance,
|
|
11
|
+
* animation, and theme.
|
|
12
|
+
*/
|
|
8
13
|
class NgxSkeletonLoaderComponent {
|
|
9
|
-
constructor(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Injects the `NgxSkeletonLoaderConfig` configuration object, which is optional.
|
|
17
|
+
* This configuration object provides various options for customizing the behavior
|
|
18
|
+
* and appearance of the `NgxSkeletonLoaderComponent`.
|
|
19
|
+
*/
|
|
20
|
+
this.#config = inject(NGX_SKELETON_LOADER_CONFIG, { optional: true });
|
|
21
|
+
/**
|
|
22
|
+
* The `count` property is an input that determines the number of skeleton loader elements
|
|
23
|
+
* to display.
|
|
24
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 1 if the config
|
|
25
|
+
* is not provided.
|
|
26
|
+
* The `transform: numberAttribute` option ensures that the input value is converted to a number.
|
|
27
|
+
*/
|
|
28
|
+
this.count = input(this.#config?.count || 1, { transform: numberAttribute });
|
|
29
|
+
/**
|
|
30
|
+
* The `loadingText` property is an input that determines the text to display while the content
|
|
31
|
+
* is loading.
|
|
32
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'Loading...'
|
|
33
|
+
* if the config is not provided.
|
|
34
|
+
*/
|
|
35
|
+
this.loadingText = input(this.#config?.loadingText || 'Loading...');
|
|
36
|
+
/**
|
|
37
|
+
* The `appearance` property is an input that determines the visual appearance of the skeleton
|
|
38
|
+
* loader.
|
|
39
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'line' if the
|
|
40
|
+
* config is not provided.
|
|
41
|
+
* The available appearance options are defined in the `NgxSkeletonLoaderConfig['appearance']`
|
|
42
|
+
* type.
|
|
43
|
+
*/
|
|
44
|
+
this.appearance = input(this.#config?.appearance || 'line');
|
|
45
|
+
/**
|
|
46
|
+
* The `animation` property is an input that determines the type of animation to apply to the
|
|
47
|
+
* skeleton loader.
|
|
48
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'progress' if
|
|
49
|
+
* the config is not provided.
|
|
50
|
+
* The available animation options are defined in the `NgxSkeletonLoaderConfig['animation']` type.
|
|
51
|
+
*/
|
|
52
|
+
this.animation = input(this.#config?.animation || 'progress');
|
|
53
|
+
/**
|
|
54
|
+
* The `ariaLabel` property is an input that determines the ARIA label to be used for the skeleton
|
|
55
|
+
* loader element. This is useful for providing accessibility information to screen readers.
|
|
56
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'loading' if the
|
|
57
|
+
* config is not provided.
|
|
58
|
+
*/
|
|
59
|
+
this.ariaLabel = input(this.#config?.ariaLabel || 'loading');
|
|
60
|
+
/**
|
|
61
|
+
* The `theme` property is an input that determines the theme configuration for the skeleton
|
|
62
|
+
* loader.
|
|
63
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or `null` if the
|
|
64
|
+
* config is not provided.
|
|
65
|
+
* The theme configuration is defined by the `NgxSkeletonLoaderConfigTheme` type, which allows
|
|
66
|
+
* customizing various aspects of the skeleton loader's appearance, such as colors, animation,
|
|
67
|
+
* etc.
|
|
68
|
+
*/
|
|
69
|
+
this.theme = input(this.#config?.theme || null);
|
|
70
|
+
/**
|
|
71
|
+
* The `items` property is a computed property that generates an array of indices based on the
|
|
72
|
+
* `count` input.
|
|
73
|
+
* If the `appearance` is set to 'custom-content', the `count` is forced to 1 to ensure that the
|
|
74
|
+
* skeleton loader is displayed as a single DOM node, as required by the 'custom-content'
|
|
75
|
+
* appearance.
|
|
76
|
+
* This computed property is used to render the appropriate number of skeleton loader elements.
|
|
77
|
+
*/
|
|
78
|
+
this.items = computed(() => {
|
|
79
|
+
let count = this.count() || 1;
|
|
80
|
+
// Force count to 1 when custom-content is used
|
|
81
|
+
if (this.appearance() === 'custom-content') {
|
|
82
|
+
// Shows error message only in Development
|
|
83
|
+
if (isDevMode() && count !== 1) {
|
|
84
|
+
console.error(`\`NgxSkeletonLoaderComponent\` enforces elements with "custom-content" appearance as DOM nodes. Forcing "count" to "1".`);
|
|
85
|
+
count = 1;
|
|
86
|
+
}
|
|
29
87
|
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
88
|
+
return [...Array(count)].map((_, index) => index);
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* A computed property that returns the final theme configuration for the skeleton loader.
|
|
92
|
+
* If the `extendsFromRoot` property is set in the `NgxSkeletonLoaderConfig`, the theme is merged
|
|
93
|
+
* with the root theme configuration. Otherwise, the theme is returned as-is.
|
|
94
|
+
* This allows the skeleton loader to inherit global theme settings while still allowing for
|
|
95
|
+
* component-specific theme customization.
|
|
96
|
+
*/
|
|
97
|
+
this.styles = computed(() => {
|
|
98
|
+
const theme = this.theme();
|
|
99
|
+
if (this.#config?.theme?.extendsFromRoot) {
|
|
100
|
+
return {
|
|
101
|
+
...this.#config?.theme,
|
|
102
|
+
...theme,
|
|
103
|
+
};
|
|
38
104
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];
|
|
42
|
-
if (allowedAnimations.indexOf(String(this.animation)) === -1) {
|
|
43
|
-
// Shows error message only in Development
|
|
44
|
-
if (isDevMode()) {
|
|
45
|
-
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'animation' as: ${allowedAnimations.join(', ')}. Forcing default to "progress".`);
|
|
46
|
-
}
|
|
47
|
-
this.animation = 'progress';
|
|
48
|
-
}
|
|
49
|
-
if (['circle', 'line', 'custom-content', ''].indexOf(String(this.appearance)) === -1) {
|
|
50
|
-
// Shows error message only in Development
|
|
51
|
-
if (isDevMode()) {
|
|
52
|
-
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'appearance' as: circle or line or custom-content or empty string. Forcing default to "''".`);
|
|
53
|
-
}
|
|
54
|
-
this.appearance = '';
|
|
55
|
-
}
|
|
56
|
-
// This code is not using optional chaining since it's only supported on Angular CLI v12
|
|
57
|
-
// - more details in this comment https://github.com/angular/angular-cli/issues/20471#issuecomment-815599616
|
|
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
|
-
// Shows error message only in Development
|
|
62
|
-
this.theme = { ...this.config.theme, ...this.theme };
|
|
63
|
-
}
|
|
105
|
+
return theme;
|
|
106
|
+
});
|
|
64
107
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [{ token: NGX_SKELETON_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
75
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.8", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "@for (item of items; track item) {\n <div\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 @if (appearance === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\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:translateZ(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{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,#fff0,#fff9,#fff0)}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.custom-content{height:100%;background:none}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.custom-content,.skeleton-loader.progress:before{animation:none}.skeleton-loader.progress:before,.skeleton-loader.progress-dark,.skeleton-loader.custom-content{background-image:none}}@media screen and (min-device-width: 1200px){.skeleton-loader{-webkit-user-select:none;user-select:none;cursor:wait}}@keyframes progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
108
|
+
/**
|
|
109
|
+
* Injects the `NgxSkeletonLoaderConfig` configuration object, which is optional.
|
|
110
|
+
* This configuration object provides various options for customizing the behavior
|
|
111
|
+
* and appearance of the `NgxSkeletonLoaderComponent`.
|
|
112
|
+
*/
|
|
113
|
+
#config;
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
115
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: NgxSkeletonLoaderComponent, isStandalone: true, selector: "ngx-skeleton-loader", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let appearanceValue = appearance();\n@let animationValue = animation();\n@for (item of items(); track item) {\n <div\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 [class.custom-content]=\"appearanceValue === 'custom-content'\"\n [class.circle]=\"appearanceValue === 'circle'\"\n [class.progress]=\"animationValue === 'progress'\"\n [class.progress-dark]=\"animationValue === 'progress-dark'\"\n [class.pulse]=\"animationValue === 'pulse'\"\n [style]=\"styles()\"\n >\n @if (appearanceValue === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\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:translateZ(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{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,#fff0,#fff9,#fff0)}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.custom-content{height:100%;background:none}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.custom-content,.skeleton-loader.progress:before{animation:none}.skeleton-loader.progress:before,.skeleton-loader.progress-dark,.skeleton-loader.custom-content{background-image:none}}@media screen and (min-device-width: 1200px){.skeleton-loader{-webkit-user-select:none;user-select:none;cursor:wait}}@keyframes progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
76
116
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: NgxSkeletonLoaderComponent, decorators: [{
|
|
78
118
|
type: Component,
|
|
79
|
-
args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (item of items; track item) {\n <div\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 [
|
|
80
|
-
}]
|
|
81
|
-
type: Inject,
|
|
82
|
-
args: [NGX_SKELETON_LOADER_CONFIG]
|
|
83
|
-
}, {
|
|
84
|
-
type: Optional
|
|
85
|
-
}] }], propDecorators: { count: [{
|
|
86
|
-
type: Input
|
|
87
|
-
}], loadingText: [{
|
|
88
|
-
type: Input
|
|
89
|
-
}], appearance: [{
|
|
90
|
-
type: Input
|
|
91
|
-
}], animation: [{
|
|
92
|
-
type: Input
|
|
93
|
-
}], ariaLabel: [{
|
|
94
|
-
type: Input
|
|
95
|
-
}], theme: [{
|
|
96
|
-
type: Input
|
|
97
|
-
}] } });
|
|
119
|
+
args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@let appearanceValue = appearance();\n@let animationValue = animation();\n@for (item of items(); track item) {\n <div\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 [class.custom-content]=\"appearanceValue === 'custom-content'\"\n [class.circle]=\"appearanceValue === 'circle'\"\n [class.progress]=\"animationValue === 'progress'\"\n [class.progress-dark]=\"animationValue === 'progress-dark'\"\n [class.pulse]=\"animationValue === 'pulse'\"\n [style]=\"styles()\"\n >\n @if (appearanceValue === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\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:translateZ(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{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,#fff0,#fff9,#fff0)}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.custom-content{height:100%;background:none}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.custom-content,.skeleton-loader.progress:before{animation:none}.skeleton-loader.progress:before,.skeleton-loader.progress-dark,.skeleton-loader.custom-content{background-image:none}}@media screen and (min-device-width: 1200px){.skeleton-loader{-webkit-user-select:none;user-select:none;cursor:wait}}@keyframes progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
|
|
120
|
+
}] });
|
|
98
121
|
|
|
99
122
|
class NgxSkeletonLoaderModule {
|
|
100
123
|
static forRoot(config) {
|
|
@@ -103,15 +126,14 @@ class NgxSkeletonLoaderModule {
|
|
|
103
126
|
providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],
|
|
104
127
|
};
|
|
105
128
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: NgxSkeletonLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
130
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: NgxSkeletonLoaderModule, imports: [NgxSkeletonLoaderComponent], exports: [NgxSkeletonLoaderComponent] }); }
|
|
131
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: NgxSkeletonLoaderModule }); }
|
|
109
132
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: NgxSkeletonLoaderModule, decorators: [{
|
|
111
134
|
type: NgModule,
|
|
112
135
|
args: [{
|
|
113
|
-
|
|
114
|
-
imports: [CommonModule],
|
|
136
|
+
imports: [NgxSkeletonLoaderComponent],
|
|
115
137
|
exports: [NgxSkeletonLoaderComponent],
|
|
116
138
|
}]
|
|
117
139
|
}] });
|
|
@@ -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 // 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","@for (item of items; track item) {\n <div\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 @if (appearance === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\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;;MCIrG,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,KA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SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,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 [style] is using `any` as well\n // More details in https://angular.dev/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 isDevMode,\n ChangeDetectionStrategy,\n input,\n inject,\n numberAttribute,\n computed,\n} from '@angular/core';\nimport {\n NgxSkeletonLoaderConfig,\n NgxSkeletonLoaderConfigTheme,\n NGX_SKELETON_LOADER_CONFIG,\n} from './ngx-skeleton-loader-config.types';\n\n/**\n * The `NgxSkeletonLoaderComponent` is a standalone Angular component that provides a skeleton\n * loader UI element.\n * It can be used to display a loading state before the actual content is available.\n * The component can be configured with various options such as the number of elements, appearance,\n * animation, and theme.\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 standalone: true,\n})\nexport class NgxSkeletonLoaderComponent {\n /**\n * Injects the `NgxSkeletonLoaderConfig` configuration object, which is optional.\n * This configuration object provides various options for customizing the behavior\n * and appearance of the `NgxSkeletonLoaderComponent`.\n */\n readonly #config = inject<NgxSkeletonLoaderConfig>(NGX_SKELETON_LOADER_CONFIG, { optional: true});\n /**\n * The `count` property is an input that determines the number of skeleton loader elements\n * to display.\n * It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 1 if the config\n * is not provided.\n * The `transform: numberAttribute` option ensures that the input value is converted to a number.\n */\n readonly count = input(this.#config?.count || 1, { transform: numberAttribute });\n /**\n * The `loadingText` property is an input that determines the text to display while the content\n * is loading.\n * It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'Loading...'\n * if the config is not provided.\n */\n readonly loadingText = input<NgxSkeletonLoaderConfig['loadingText']>(this.#config?.loadingText || 'Loading...');\n /**\n * The `appearance` property is an input that determines the visual appearance of the skeleton\n * loader.\n * It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'line' if the\n * config is not provided.\n * The available appearance options are defined in the `NgxSkeletonLoaderConfig['appearance']`\n * type.\n */\n readonly appearance = input<NgxSkeletonLoaderConfig['appearance']>(this.#config?.appearance || 'line');\n /**\n * The `animation` property is an input that determines the type of animation to apply to the\n * skeleton loader.\n * It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'progress' if\n * the config is not provided.\n * The available animation options are defined in the `NgxSkeletonLoaderConfig['animation']` type.\n */\n readonly animation = input<NgxSkeletonLoaderConfig['animation']>(this.#config?.animation || 'progress');\n /**\n * The `ariaLabel` property is an input that determines the ARIA label to be used for the skeleton\n * loader element. This is useful for providing accessibility information to screen readers.\n * It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'loading' if the\n * config is not provided.\n */\n readonly ariaLabel = input<NgxSkeletonLoaderConfig['ariaLabel']>(this.#config?.ariaLabel || 'loading');\n /**\n * The `theme` property is an input that determines the theme configuration for the skeleton\n * loader.\n * It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or `null` if the\n * config is not provided.\n * The theme configuration is defined by the `NgxSkeletonLoaderConfigTheme` type, which allows\n * customizing various aspects of the skeleton loader's appearance, such as colors, animation,\n * etc.\n */\n readonly theme = input<NgxSkeletonLoaderConfigTheme>(this.#config?.theme || null);\n /**\n * The `items` property is a computed property that generates an array of indices based on the\n * `count` input.\n * If the `appearance` is set to 'custom-content', the `count` is forced to 1 to ensure that the\n * skeleton loader is displayed as a single DOM node, as required by the 'custom-content'\n * appearance.\n * This computed property is used to render the appropriate number of skeleton loader elements.\n */\n readonly items = computed(() => {\n let count = this.count() || 1;\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() && count !== 1) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` enforces elements with \"custom-content\" appearance as DOM nodes. Forcing \"count\" to \"1\".`,\n );\n count = 1;\n }\n }\n return [...Array(count)].map((_, index) => index);\n });\n /**\n * A computed property that returns the final theme configuration for the skeleton loader.\n * If the `extendsFromRoot` property is set in the `NgxSkeletonLoaderConfig`, the theme is merged\n * with the root theme configuration. Otherwise, the theme is returned as-is.\n * This allows the skeleton loader to inherit global theme settings while still allowing for\n * component-specific theme customization.\n */\n readonly styles = computed(() => {\n const theme = this.theme();\n if (this.#config?.theme?.extendsFromRoot) {\n return {\n ...this.#config?.theme,\n ...theme,\n };\n }\n return theme;\n });\n}\n","@let appearanceValue = appearance();\n@let animationValue = animation();\n@for (item of items(); track item) {\n <div\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 [class.custom-content]=\"appearanceValue === 'custom-content'\"\n [class.circle]=\"appearanceValue === 'circle'\"\n [class.progress]=\"animationValue === 'progress'\"\n [class.progress-dark]=\"animationValue === 'progress-dark'\"\n [class.pulse]=\"animationValue === 'pulse'\"\n [style]=\"styles()\"\n >\n @if (appearanceValue === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';\nimport { NgxSkeletonLoaderConfig, NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';\n\n@NgModule({\n imports: [NgxSkeletonLoaderComponent],\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;;ACJlH;;;;;;AAMG;MAQU,0BAA0B,CAAA;AAPvC,IAAA,WAAA,GAAA;AAQE;;;;AAIG;QACM,IAAO,CAAA,OAAA,GAAG,MAAM,CAA0B,0BAA0B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;AACjG;;;;;;AAMG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAChF;;;;;AAKG;QACM,IAAW,CAAA,WAAA,GAAG,KAAK,CAAyC,IAAI,CAAC,OAAO,EAAE,WAAW,IAAI,YAAY,CAAC;AAC/G;;;;;;;AAOG;QACM,IAAU,CAAA,UAAA,GAAG,KAAK,CAAwC,IAAI,CAAC,OAAO,EAAE,UAAU,IAAI,MAAM,CAAC;AACtG;;;;;;AAMG;QACM,IAAS,CAAA,SAAA,GAAG,KAAK,CAAuC,IAAI,CAAC,OAAO,EAAE,SAAS,IAAI,UAAU,CAAC;AACvG;;;;;AAKG;QACM,IAAS,CAAA,SAAA,GAAG,KAAK,CAAuC,IAAI,CAAC,OAAO,EAAE,SAAS,IAAI,SAAS,CAAC;AACtG;;;;;;;;AAQG;QACM,IAAK,CA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CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDKa,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAGd,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,uxBAAA,EAAA,MAAA,EAAA,CAAA,8tDAAA,CAAA,EAAA;;;MElBL,uBAAuB,CAAA;IAClC,OAAO,OAAO,CAAC,MAAyC,EAAA;QACtD,OAAO;AACL,YAAA,QAAQ,EAAE,uBAAuB;YACjC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SACvE;;8GALQ,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAvB,uBAAuB,EAAA,OAAA,EAAA,CAHxB,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAC1B,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAEzB,uBAAuB,EAAA,CAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,0BAA0B,CAAC;oBACrC,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACtC,iBAAA;;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,21 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NgxSkeletonLoaderConfig, NgxSkeletonLoaderConfigTheme } from './ngx-skeleton-loader-config.types';
|
|
1
|
+
import { NgxSkeletonLoaderConfigTheme } from './ngx-skeleton-loader-config.types';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The `NgxSkeletonLoaderComponent` is a standalone Angular component that provides a skeleton
|
|
5
|
+
* loader UI element.
|
|
6
|
+
* It can be used to display a loading state before the actual content is available.
|
|
7
|
+
* The component can be configured with various options such as the number of elements, appearance,
|
|
8
|
+
* animation, and theme.
|
|
9
|
+
*/
|
|
10
|
+
export declare class NgxSkeletonLoaderComponent {
|
|
11
|
+
#private;
|
|
12
|
+
/**
|
|
13
|
+
* The `count` property is an input that determines the number of skeleton loader elements
|
|
14
|
+
* to display.
|
|
15
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 1 if the config
|
|
16
|
+
* is not provided.
|
|
17
|
+
* The `transform: numberAttribute` option ensures that the input value is converted to a number.
|
|
18
|
+
*/
|
|
19
|
+
readonly count: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* The `loadingText` property is an input that determines the text to display while the content
|
|
22
|
+
* is loading.
|
|
23
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'Loading...'
|
|
24
|
+
* if the config is not provided.
|
|
25
|
+
*/
|
|
26
|
+
readonly loadingText: import("@angular/core").InputSignal<string>;
|
|
27
|
+
/**
|
|
28
|
+
* The `appearance` property is an input that determines the visual appearance of the skeleton
|
|
29
|
+
* loader.
|
|
30
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'line' if the
|
|
31
|
+
* config is not provided.
|
|
32
|
+
* The available appearance options are defined in the `NgxSkeletonLoaderConfig['appearance']`
|
|
33
|
+
* type.
|
|
34
|
+
*/
|
|
35
|
+
readonly appearance: import("@angular/core").InputSignal<"" | "circle" | "line" | "custom-content">;
|
|
36
|
+
/**
|
|
37
|
+
* The `animation` property is an input that determines the type of animation to apply to the
|
|
38
|
+
* skeleton loader.
|
|
39
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'progress' if
|
|
40
|
+
* the config is not provided.
|
|
41
|
+
* The available animation options are defined in the `NgxSkeletonLoaderConfig['animation']` type.
|
|
42
|
+
*/
|
|
43
|
+
readonly animation: import("@angular/core").InputSignal<false | "progress" | "progress-dark" | "pulse" | "false">;
|
|
44
|
+
/**
|
|
45
|
+
* The `ariaLabel` property is an input that determines the ARIA label to be used for the skeleton
|
|
46
|
+
* loader element. This is useful for providing accessibility information to screen readers.
|
|
47
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or 'loading' if the
|
|
48
|
+
* config is not provided.
|
|
49
|
+
*/
|
|
50
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
51
|
+
/**
|
|
52
|
+
* The `theme` property is an input that determines the theme configuration for the skeleton
|
|
53
|
+
* loader.
|
|
54
|
+
* It is initialized with the value from the `NgxSkeletonLoaderConfig` object, or `null` if the
|
|
55
|
+
* config is not provided.
|
|
56
|
+
* The theme configuration is defined by the `NgxSkeletonLoaderConfigTheme` type, which allows
|
|
57
|
+
* customizing various aspects of the skeleton loader's appearance, such as colors, animation,
|
|
58
|
+
* etc.
|
|
59
|
+
*/
|
|
60
|
+
readonly theme: import("@angular/core").InputSignal<NgxSkeletonLoaderConfigTheme>;
|
|
61
|
+
/**
|
|
62
|
+
* The `items` property is a computed property that generates an array of indices based on the
|
|
63
|
+
* `count` input.
|
|
64
|
+
* If the `appearance` is set to 'custom-content', the `count` is forced to 1 to ensure that the
|
|
65
|
+
* skeleton loader is displayed as a single DOM node, as required by the 'custom-content'
|
|
66
|
+
* appearance.
|
|
67
|
+
* This computed property is used to render the appropriate number of skeleton loader elements.
|
|
68
|
+
*/
|
|
69
|
+
readonly items: import("@angular/core").Signal<number[]>;
|
|
70
|
+
/**
|
|
71
|
+
* A computed property that returns the final theme configuration for the skeleton loader.
|
|
72
|
+
* If the `extendsFromRoot` property is set in the `NgxSkeletonLoaderConfig`, the theme is merged
|
|
73
|
+
* with the root theme configuration. Otherwise, the theme is returned as-is.
|
|
74
|
+
* This allows the skeleton loader to inherit global theme settings while still allowing for
|
|
75
|
+
* component-specific theme customization.
|
|
76
|
+
*/
|
|
77
|
+
readonly styles: import("@angular/core").Signal<NgxSkeletonLoaderConfigTheme>;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSkeletonLoaderComponent, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxSkeletonLoaderComponent, "ngx-skeleton-loader", never, { "count": { "alias": "count"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
21
80
|
}
|
|
@@ -2,10 +2,9 @@ import { ModuleWithProviders } from '@angular/core';
|
|
|
2
2
|
import { NgxSkeletonLoaderConfig } from './ngx-skeleton-loader-config.types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "./ngx-skeleton-loader.component";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
5
|
export declare class NgxSkeletonLoaderModule {
|
|
7
6
|
static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule>;
|
|
8
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSkeletonLoaderModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSkeletonLoaderModule, [typeof i1.NgxSkeletonLoaderComponent], [typeof
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSkeletonLoaderModule, never, [typeof i1.NgxSkeletonLoaderComponent], [typeof i1.NgxSkeletonLoaderComponent]>;
|
|
10
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxSkeletonLoaderModule>;
|
|
11
10
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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": "
|
|
4
|
+
"version": "11.0.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": ">=
|
|
7
|
-
"@angular/core": ">=
|
|
6
|
+
"@angular/common": ">=19.0.0",
|
|
7
|
+
"@angular/core": ">=19.0.0"
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"keywords": [
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"url": "https://github.com/willmendesneto/ngx-skeleton-loader/issues"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/willmendesneto/ngx-skeleton-loader#readme",
|
|
34
|
+
"sideEffects": false,
|
|
34
35
|
"module": "fesm2022/ngx-skeleton-loader.mjs",
|
|
35
36
|
"typings": "index.d.ts",
|
|
36
37
|
"exports": {
|
|
@@ -39,10 +40,7 @@
|
|
|
39
40
|
},
|
|
40
41
|
".": {
|
|
41
42
|
"types": "./index.d.ts",
|
|
42
|
-
"esm2022": "./esm2022/ngx-skeleton-loader.mjs",
|
|
43
|
-
"esm": "./esm2022/ngx-skeleton-loader.mjs",
|
|
44
43
|
"default": "./fesm2022/ngx-skeleton-loader.mjs"
|
|
45
44
|
}
|
|
46
|
-
}
|
|
47
|
-
"sideEffects": false
|
|
45
|
+
}
|
|
48
46
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export const NGX_SKELETON_LOADER_CONFIG = new InjectionToken('ngx-skeleton-loader.config');
|
|
3
|
-
//# sourceMappingURL=data:application/json;base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AncHJvZ3Jlc3MnIHwgJ3Byb2dyZXNzLWRhcmsnIHwgJ3B1bHNlJyB8ICdmYWxzZScgfCBmYWxzZTtcbiAgdGhlbWU6IE5neFNrZWxldG9uTG9hZGVyQ29uZmlnVGhlbWU7XG4gIGxvYWRpbmdUZXh0OiBzdHJpbmc7XG4gIGNvdW50OiBudW1iZXI7XG4gIGFyaWFMYWJlbDogc3RyaW5nO1xufVxuXG5leHBvcnQgY29uc3QgTkdYX1NLRUxFVE9OX0xPQURFUl9DT05GSUcgPSBuZXcgSW5qZWN0aW9uVG9rZW48Tmd4U2tlbGV0b25Mb2FkZXJDb25maWc+KCduZ3gtc2tlbGV0b24tbG9hZGVyLmNvbmZpZycpO1xuIl19
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { Component, Input, isDevMode, ChangeDetectionStrategy, Optional, Inject, } from '@angular/core';
|
|
2
|
-
import { NGX_SKELETON_LOADER_CONFIG, } from './ngx-skeleton-loader-config.types';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
export class NgxSkeletonLoaderComponent {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
this.config = config;
|
|
8
|
-
const { appearance = 'line', animation = 'progress', theme = null, loadingText = 'Loading...', count = 1, ariaLabel = 'loading', } = config || {};
|
|
9
|
-
this.appearance = appearance;
|
|
10
|
-
this.animation = animation;
|
|
11
|
-
this.theme = theme;
|
|
12
|
-
this.loadingText = loadingText;
|
|
13
|
-
this.count = count;
|
|
14
|
-
this.items = [];
|
|
15
|
-
this.ariaLabel = ariaLabel;
|
|
16
|
-
}
|
|
17
|
-
ngOnInit() {
|
|
18
|
-
this.validateInputValues();
|
|
19
|
-
}
|
|
20
|
-
validateInputValues() {
|
|
21
|
-
// Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)
|
|
22
|
-
if (!/^\d+$/.test(`${this.count}`)) {
|
|
23
|
-
// Shows error message only in Development
|
|
24
|
-
if (isDevMode()) {
|
|
25
|
-
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'count' a numeric value. Forcing default to "1".`);
|
|
26
|
-
}
|
|
27
|
-
this.count = 1;
|
|
28
|
-
}
|
|
29
|
-
//Force count to 1 when custom-content is used
|
|
30
|
-
if (this.appearance === 'custom-content') {
|
|
31
|
-
// Shows error message only in Development
|
|
32
|
-
if (isDevMode() && this.count !== 1) {
|
|
33
|
-
console.error(`\`NgxSkeletonLoaderComponent\` enforces elements with "custom-content" appearance as DOM nodes. Forcing "count" to "1".`);
|
|
34
|
-
this.count = 1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
this.items.length = this.count;
|
|
38
|
-
const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];
|
|
39
|
-
if (allowedAnimations.indexOf(String(this.animation)) === -1) {
|
|
40
|
-
// Shows error message only in Development
|
|
41
|
-
if (isDevMode()) {
|
|
42
|
-
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'animation' as: ${allowedAnimations.join(', ')}. Forcing default to "progress".`);
|
|
43
|
-
}
|
|
44
|
-
this.animation = 'progress';
|
|
45
|
-
}
|
|
46
|
-
if (['circle', 'line', 'custom-content', ''].indexOf(String(this.appearance)) === -1) {
|
|
47
|
-
// Shows error message only in Development
|
|
48
|
-
if (isDevMode()) {
|
|
49
|
-
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'appearance' as: circle or line or custom-content or empty string. Forcing default to "''".`);
|
|
50
|
-
}
|
|
51
|
-
this.appearance = '';
|
|
52
|
-
}
|
|
53
|
-
// This code is not using optional chaining since it's only supported on Angular CLI v12
|
|
54
|
-
// - more details in this comment https://github.com/angular/angular-cli/issues/20471#issuecomment-815599616
|
|
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
|
-
// Shows error message only in Development
|
|
59
|
-
this.theme = { ...this.config.theme, ...this.theme };
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
ngOnChanges(changes) {
|
|
63
|
-
// Avoiding multiple calls for the same input in case there's no changes in the fields
|
|
64
|
-
// Checking if the fields that require validation are available and if they were changed
|
|
65
|
-
// In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.
|
|
66
|
-
if (['count', 'animation', 'appearance'].find(key => changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue))) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
this.validateInputValues();
|
|
70
|
-
}
|
|
71
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [{ token: NGX_SKELETON_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.8", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "@for (item of items; track item) {\n <div\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 @if (appearance === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\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:translateZ(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{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,#fff0,#fff9,#fff0)}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.custom-content{height:100%;background:none}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.custom-content,.skeleton-loader.progress:before{animation:none}.skeleton-loader.progress:before,.skeleton-loader.progress-dark,.skeleton-loader.custom-content{background-image:none}}@media screen and (min-device-width: 1200px){.skeleton-loader{-webkit-user-select:none;user-select:none;cursor:wait}}@keyframes progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
73
|
-
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderComponent, decorators: [{
|
|
75
|
-
type: Component,
|
|
76
|
-
args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (item of items; track item) {\n <div\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 @if (appearance === 'custom-content') {\n <ng-content></ng-content>\n }\n </div>\n}\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:translateZ(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{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,#fff0,#fff9,#fff0)}.skeleton-loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.skeleton-loader.pulse{animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation-delay:.5s}.skeleton-loader.custom-content{height:100%;background:none}@media (prefers-reduced-motion: reduce){.skeleton-loader.pulse,.skeleton-loader.progress-dark,.skeleton-loader.custom-content,.skeleton-loader.progress:before{animation:none}.skeleton-loader.progress:before,.skeleton-loader.progress-dark,.skeleton-loader.custom-content{background-image:none}}@media screen and (min-device-width: 1200px){.skeleton-loader{-webkit-user-select:none;user-select:none;cursor:wait}}@keyframes progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
|
|
77
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
78
|
-
type: Inject,
|
|
79
|
-
args: [NGX_SKELETON_LOADER_CONFIG]
|
|
80
|
-
}, {
|
|
81
|
-
type: Optional
|
|
82
|
-
}] }], propDecorators: { count: [{
|
|
83
|
-
type: Input
|
|
84
|
-
}], loadingText: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}], appearance: [{
|
|
87
|
-
type: Input
|
|
88
|
-
}], animation: [{
|
|
89
|
-
type: Input
|
|
90
|
-
}], ariaLabel: [{
|
|
91
|
-
type: Input
|
|
92
|
-
}], theme: [{
|
|
93
|
-
type: Input
|
|
94
|
-
}] } });
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXNrZWxldG9uLWxvYWRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2tlbGV0b24tbG9hZGVyL3NyYy9saWIvbmd4LXNrZWxldG9uLWxvYWRlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2tlbGV0b24tbG9hZGVyL3NyYy9saWIvbmd4LXNrZWxldG9uLWxvYWRlci5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBRVQsS0FBSyxFQUNMLFNBQVMsRUFDVCx1QkFBdUIsRUFHdkIsUUFBUSxFQUNSLE1BQU0sR0FDUCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBR0wsMEJBQT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FxuICAgICAgKVxuICAgICkge1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHRoaXMudmFsaWRhdGVJbnB1dFZhbHVlcygpO1xuICB9XG59XG4iLCJAZm9yIChpdGVtIG9mIGl0ZW1zOyB0cmFjayBpdGVtKSB7XG4gIDxkaXZcbiAgICBjbGFzcz1cInNrZWxldG9uLWxvYWRlclwiXG4gICAgW2F0dHIuYXJpYS1sYWJlbF09XCJhcmlhTGFiZWxcIlxuICAgIGFyaWEtYnVzeT1cInRydWVcIlxuICAgIGFyaWEtdmFsdWVtaW49XCIwXCJcbiAgICBhcmlhLXZhbHVlbWF4PVwiMTAwXCJcbiAgICBbYXR0ci5hcmlhLXZhbHVldGV4dF09XCJsb2FkaW5nVGV4dFwiXG4gICAgcm9sZT1cInByb2dyZXNzYmFyXCJcbiAgICB0YWJpbmRleD1cIi0xXCJcbiAgICBbbmdDbGFzc109XCJ7XG4gICAgICAnY3VzdG9tLWNvbnRlbnQnOiBhcHBlYXJhbmNlID09PSAnY3VzdG9tLWNvbnRlbnQnLFxuICAgICAgY2lyY2xlOiBhcHBlYXJhbmNlID09PSAnY2lyY2xlJyxcbiAgICAgIHByb2dyZXNzOiBhbmltYXRpb24gPT09ICdwcm9ncmVzcycsXG4gICAgICAncHJvZ3Jlc3MtZGFyayc6IGFuaW1hdGlvbiA9PT0gJ3Byb2dyZXNzLWRhcmsnLFxuICAgICAgcHVsc2U6IGFuaW1hdGlvbiA9PT0gJ3B1bHNlJ1xuICAgIH1cIlxuICAgIFtuZ1N0eWxlXT1cInRoZW1lXCJcbiAgICA+XG4gICAgQGlmIChhcHBlYXJhbmNlICA9PT0gJ2N1c3RvbS1jb250ZW50Jykge1xuICAgICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICAgIH1cbiAgPC9kaXY+XG59XG4iXX0=
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';
|
|
4
|
-
import { NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export class NgxSkeletonLoaderModule {
|
|
7
|
-
static forRoot(config) {
|
|
8
|
-
return {
|
|
9
|
-
ngModule: NgxSkeletonLoaderModule,
|
|
10
|
-
providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
14
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderModule, declarations: [NgxSkeletonLoaderComponent], imports: [CommonModule], exports: [NgxSkeletonLoaderComponent] }); }
|
|
15
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderModule, imports: [CommonModule] }); }
|
|
16
|
-
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxSkeletonLoaderModule, decorators: [{
|
|
18
|
-
type: NgModule,
|
|
19
|
-
args: [{
|
|
20
|
-
declarations: [NgxSkeletonLoaderComponent],
|
|
21
|
-
imports: [CommonModule],
|
|
22
|
-
exports: [NgxSkeletonLoaderComponent],
|
|
23
|
-
}]
|
|
24
|
-
}] });
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXNrZWxldG9uLWxvYWRlci5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoi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9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5cbmltcG9ydCB7IE5neFNrZWxldG9uTG9hZGVyQ29tcG9uZW50IH0gZnJvbSAnLi9uZ3gtc2tlbGV0b24tbG9hZGVyLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBOZ3hTa2VsZXRvbkxvYWRlckNvbmZpZywgTkdYX1NLRUxFVE9OX0xPQURFUl9DT05GSUcgfSBmcm9tICcuL25neC1za2VsZXRvbi1sb2FkZXItY29uZmlnLnR5cGVzJztcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbTmd4U2tlbGV0b25Mb2FkZXJDb21wb25lbnRdLFxuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlXSxcbiAgZXhwb3J0czogW05neFNrZWxldG9uTG9hZGVyQ29tcG9uZW50XSxcbn0pXG5leHBvcnQgY2xhc3MgTmd4U2tlbGV0b25Mb2FkZXJNb2R1bGUge1xuICBzdGF0aWMgZm9yUm9vdChjb25maWc/OiBQYXJ0aWFsPE5neFNrZWxldG9uTG9hZGVyQ29uZmlnPik6IE1vZHVsZVdpdGhQcm92aWRlcnM8Tmd4U2tlbGV0b25Mb2FkZXJNb2R1bGU+IHtcbiAgICByZXR1cm4ge1xuICAgICAgbmdNb2R1bGU6IE5neFNrZWxldG9uTG9hZGVyTW9kdWxlLFxuICAgICAgcHJvdmlkZXJzOiBbeyBwcm92aWRlOiBOR1hfU0tFTEVUT05fTE9BREVSX0NPTkZJRywgdXNlVmFsdWU6IGNvbmZpZyB9XSxcbiAgICB9O1xuICB9XG59XG4iXX0=
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXNrZWxldG9uLWxvYWRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1za2VsZXRvbi1sb2FkZXIvc3JjL25neC1za2VsZXRvbi1sb2FkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
package/esm2022/public-api.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of ngx-skeleton-loader
|
|
3
|
-
*/
|
|
4
|
-
export * from './lib/ngx-skeleton-loader.component';
|
|
5
|
-
export * from './lib/ngx-skeleton-loader.module';
|
|
6
|
-
export * from './lib/ngx-skeleton-loader-config.types';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1za2VsZXRvbi1sb2FkZXIvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLHFDQUFxQyxDQUFDO0FBQ3BELGNBQWMsa0NBQWtDLENBQUM7QUFDakQsY0FBYyx3Q0FBd0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LXNrZWxldG9uLWxvYWRlclxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1za2VsZXRvbi1sb2FkZXIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1za2VsZXRvbi1sb2FkZXIubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1za2VsZXRvbi1sb2FkZXItY29uZmlnLnR5cGVzJztcbiJdfQ==
|