ngx-skeleton-loader 2.10.0 → 5.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/README.md +13 -279
- package/esm2020/lib/ngx-skeleton-loader-config.types.mjs +3 -0
- package/esm2020/lib/ngx-skeleton-loader.component.mjs +87 -0
- package/esm2020/lib/ngx-skeleton-loader.module.mjs +25 -0
- package/esm2020/ngx-skeleton-loader.mjs +5 -0
- package/esm2020/public-api.mjs +7 -0
- package/fesm2015/ngx-skeleton-loader.mjs +122 -0
- package/fesm2015/ngx-skeleton-loader.mjs.map +1 -0
- package/fesm2020/ngx-skeleton-loader.mjs +120 -0
- package/fesm2020/ngx-skeleton-loader.mjs.map +1 -0
- package/lib/ngx-skeleton-loader-config.types.d.ts +1 -0
- package/lib/ngx-skeleton-loader.component.d.ts +4 -0
- package/lib/ngx-skeleton-loader.module.d.ts +6 -0
- package/ngx-skeleton-loader.d.ts +1 -0
- package/package.json +20 -8
- package/CHANGELOG.md +0 -451
- package/CODE_OF_CONDUCT.md +0 -77
- package/CONTRIBUTING.md +0 -34
- package/bundles/ngx-skeleton-loader.umd.js +0 -206
- package/bundles/ngx-skeleton-loader.umd.js.map +0 -1
- package/bundles/ngx-skeleton-loader.umd.min.js +0 -2
- package/bundles/ngx-skeleton-loader.umd.min.js.map +0 -1
- package/esm2015/lib/ngx-skeleton-loader-config.types.js +0 -25
- package/esm2015/lib/ngx-skeleton-loader.component.js +0 -128
- package/esm2015/lib/ngx-skeleton-loader.module.js +0 -29
- package/esm2015/ngx-skeleton-loader.js +0 -10
- package/esm2015/public-api.js +0 -12
- package/fesm2015/ngx-skeleton-loader.js +0 -192
- package/fesm2015/ngx-skeleton-loader.js.map +0 -1
- package/ngx-skeleton-loader.metadata.json +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, isDevMode, Component, ChangeDetectionStrategy, Inject, Optional, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { start, end } from 'perf-marks/marks';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
const NGX_SKELETON_LOADER_CONFIG = new InjectionToken('ngx-skeleton-loader.config');
|
|
8
|
+
|
|
9
|
+
class NgxSkeletonLoaderComponent {
|
|
10
|
+
constructor(config) {
|
|
11
|
+
const { appearance = 'line', animation = 'progress', theme = null, loadingText = 'Loading...', count = 1, ariaLabel = 'loading', } = config || {};
|
|
12
|
+
this.appearance = appearance;
|
|
13
|
+
this.animation = animation;
|
|
14
|
+
this.theme = theme;
|
|
15
|
+
this.loadingText = loadingText;
|
|
16
|
+
this.count = count;
|
|
17
|
+
this.items = [];
|
|
18
|
+
this.ariaLabel = ariaLabel;
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
start('NgxSkeletonLoader:Rendered');
|
|
22
|
+
start('NgxSkeletonLoader:Loaded');
|
|
23
|
+
this.validateInputValues();
|
|
24
|
+
}
|
|
25
|
+
validateInputValues() {
|
|
26
|
+
// Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)
|
|
27
|
+
if (!/^\d+$/.test(`${this.count}`)) {
|
|
28
|
+
// Shows error message only in Development
|
|
29
|
+
if (isDevMode()) {
|
|
30
|
+
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'count' a numeric value. Forcing default to "1".`);
|
|
31
|
+
}
|
|
32
|
+
this.count = 1;
|
|
33
|
+
}
|
|
34
|
+
this.items.length = this.count;
|
|
35
|
+
const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];
|
|
36
|
+
if (allowedAnimations.indexOf(String(this.animation)) === -1) {
|
|
37
|
+
// Shows error message only in Development
|
|
38
|
+
if (isDevMode()) {
|
|
39
|
+
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'animation' as: ${allowedAnimations.join(', ')}. Forcing default to "progress".`);
|
|
40
|
+
}
|
|
41
|
+
this.animation = 'progress';
|
|
42
|
+
}
|
|
43
|
+
if (['circle', 'line', ''].indexOf(String(this.appearance)) === -1) {
|
|
44
|
+
// Shows error message only in Development
|
|
45
|
+
if (isDevMode()) {
|
|
46
|
+
console.error(`\`NgxSkeletonLoaderComponent\` need to receive 'appearance' as: circle or line or empty string. Forcing default to "''".`);
|
|
47
|
+
}
|
|
48
|
+
this.appearance = '';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
ngOnChanges(changes) {
|
|
52
|
+
// Avoiding multiple calls for the same input in case there's no changes in the fields
|
|
53
|
+
// Checking if the fields that require validation are available and if they were changed
|
|
54
|
+
// In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.
|
|
55
|
+
if (['count', 'animation', 'appearance'].find(key => changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue))) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.validateInputValues();
|
|
59
|
+
}
|
|
60
|
+
ngAfterViewInit() {
|
|
61
|
+
end('NgxSkeletonLoader:Rendered');
|
|
62
|
+
}
|
|
63
|
+
ngOnDestroy() {
|
|
64
|
+
end('NgxSkeletonLoader:Loaded');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, deps: [{ token: NGX_SKELETON_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
/** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: { count: "count", loadingText: "loadingText", appearance: "appearance", animation: "animation", ariaLabel: "ariaLabel", theme: "theme" }, usesOnChanges: true, ngImport: i0, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderComponent, decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{ selector: 'ngx-skeleton-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n", styles: [".loader{box-sizing:border-box;overflow:hidden;position:relative;background:#eff1f6 no-repeat;border-radius:4px;width:100%;height:20px;display:inline-block;margin-bottom:10px;will-change:transform}.loader:after,.loader:before{box-sizing:border-box}.loader.circle{width:40px;height:40px;margin:5px;border-radius:50%}.loader.progress,.loader.progress-dark{transform:translate(0)}.loader.progress:after,.loader.progress:before,.loader.progress-dark:after,.loader.progress-dark:before{box-sizing:border-box}.loader.progress:before,.loader.progress-dark:before{-webkit-animation:progress 2s ease-in-out infinite;animation:progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:\"\"}.loader.progress:before{background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0))}.loader.progress-dark:before{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.loader.pulse{-webkit-animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;animation:pulse 1.5s cubic-bezier(.4,0,.2,1) infinite;-webkit-animation-delay:.5s;animation-delay:.5s}@media (prefers-reduced-motion: reduce){.loader.pulse,.loader.progress-dark,.loader.progress{-webkit-animation:none;animation:none}.loader.progress,.loader.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@keyframes progress{0%{transform:translate(-200px)}to{transform:translate(calc(200px + 100vw))}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}\n"] }]
|
|
72
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
73
|
+
type: Inject,
|
|
74
|
+
args: [NGX_SKELETON_LOADER_CONFIG]
|
|
75
|
+
}, {
|
|
76
|
+
type: Optional
|
|
77
|
+
}] }]; }, propDecorators: { count: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}], loadingText: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], appearance: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], animation: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], ariaLabel: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], theme: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}] } });
|
|
90
|
+
|
|
91
|
+
class NgxSkeletonLoaderModule {
|
|
92
|
+
static forRoot(config) {
|
|
93
|
+
return {
|
|
94
|
+
ngModule: NgxSkeletonLoaderModule,
|
|
95
|
+
providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
100
|
+
/** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderModule, declarations: [NgxSkeletonLoaderComponent], imports: [CommonModule], exports: [NgxSkeletonLoaderComponent] });
|
|
101
|
+
/** @nocollapse */ /** @nocollapse */ NgxSkeletonLoaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderModule, imports: [[CommonModule]] });
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NgxSkeletonLoaderModule, decorators: [{
|
|
103
|
+
type: NgModule,
|
|
104
|
+
args: [{
|
|
105
|
+
declarations: [NgxSkeletonLoaderComponent],
|
|
106
|
+
imports: [CommonModule],
|
|
107
|
+
exports: [NgxSkeletonLoaderComponent],
|
|
108
|
+
}]
|
|
109
|
+
}] });
|
|
110
|
+
|
|
111
|
+
/*
|
|
112
|
+
* Public API Surface of ngx-skeleton-loader
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Generated bundle index. Do not edit.
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
export { NGX_SKELETON_LOADER_CONFIG, NgxSkeletonLoaderComponent, NgxSkeletonLoaderModule };
|
|
120
|
+
//# sourceMappingURL=ngx-skeleton-loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-skeleton-loader.mjs","sources":["../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader-config.types.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.component.ts","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.html","../../../projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.module.ts","../../../projects/ngx-skeleton-loader/src/public-api.ts","../../../projects/ngx-skeleton-loader/src/ngx-skeleton-loader.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport type NgxSkeletonLoaderConfigTheme = {\n // This is required since ngStyle is using `any` as well\n // More details in https://angular.io/api/common/NgStyle\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [k: string]: any;\n} | null;\n\nexport interface NgxSkeletonLoaderConfig {\n appearance: 'circle' | 'line' | '';\n animation: 'progress' | 'progress-dark' | 'pulse' | 'false' | false;\n theme: NgxSkeletonLoaderConfigTheme;\n loadingText: string;\n count: number;\n ariaLabel: string;\n}\n\nexport const NGX_SKELETON_LOADER_CONFIG = new InjectionToken<NgxSkeletonLoaderConfig>('ngx-skeleton-loader.config');\n","import {\n Component,\n OnInit,\n Input,\n isDevMode,\n OnDestroy,\n AfterViewInit,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n Optional,\n Inject,\n} from '@angular/core';\nimport { start, end } from 'perf-marks/marks';\nimport {\n NgxSkeletonLoaderConfig,\n NgxSkeletonLoaderConfigTheme,\n NGX_SKELETON_LOADER_CONFIG,\n} from './ngx-skeleton-loader-config.types';\n\n@Component({\n selector: 'ngx-skeleton-loader',\n templateUrl: './ngx-skeleton-loader.html',\n styleUrls: ['./ngx-skeleton-loader.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n // eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blacklist,id-match\n static ngAcceptInputType_count: number | string;\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\n static ngAcceptInputType_animation: boolean | string;\n\n @Input()\n count: NgxSkeletonLoaderConfig['count'];\n\n @Input()\n loadingText: NgxSkeletonLoaderConfig['loadingText'];\n\n @Input()\n appearance: NgxSkeletonLoaderConfig['appearance'];\n\n @Input()\n animation: NgxSkeletonLoaderConfig['animation'];\n\n @Input()\n ariaLabel: NgxSkeletonLoaderConfig['ariaLabel'];\n\n @Input()\n theme: NgxSkeletonLoaderConfigTheme;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n items: Array<any>;\n\n constructor(@Inject(NGX_SKELETON_LOADER_CONFIG) @Optional() config?: NgxSkeletonLoaderConfig) {\n const {\n appearance = 'line',\n animation = 'progress',\n theme = null,\n loadingText = 'Loading...',\n count = 1,\n ariaLabel = 'loading',\n } = config || {};\n\n this.appearance = appearance;\n this.animation = animation;\n this.theme = theme;\n this.loadingText = loadingText;\n this.count = count;\n this.items = [];\n this.ariaLabel = ariaLabel;\n }\n\n ngOnInit() {\n start('NgxSkeletonLoader:Rendered');\n start('NgxSkeletonLoader:Loaded');\n\n this.validateInputValues();\n }\n\n private validateInputValues() {\n // Checking if it's receiving a numeric value (string having ONLY numbers or if it's a number)\n if (!/^\\d+$/.test(`${this.count}`)) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'count' a numeric value. Forcing default to \"1\".`,\n );\n }\n this.count = 1;\n }\n this.items.length = this.count;\n\n const allowedAnimations = ['progress', 'progress-dark', 'pulse', 'false'];\n if (allowedAnimations.indexOf(String(this.animation)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'animation' as: ${allowedAnimations.join(\n ', ',\n )}. Forcing default to \"progress\".`,\n );\n }\n this.animation = 'progress';\n }\n\n if (['circle', 'line', ''].indexOf(String(this.appearance)) === -1) {\n // Shows error message only in Development\n if (isDevMode()) {\n console.error(\n `\\`NgxSkeletonLoaderComponent\\` need to receive 'appearance' as: circle or line or empty string. Forcing default to \"''\".`,\n );\n }\n this.appearance = '';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Avoiding multiple calls for the same input in case there's no changes in the fields\n // Checking if the fields that require validation are available and if they were changed\n // In case were not changed, we stop the function. Otherwise, `validateInputValues` will be called.\n if (\n ['count', 'animation', 'appearance'].find(\n key =>\n changes[key] && (changes[key].isFirstChange() || changes[key].previousValue === changes[key].currentValue),\n )\n ) {\n return;\n }\n\n this.validateInputValues();\n }\n\n ngAfterViewInit() {\n end('NgxSkeletonLoader:Rendered');\n }\n\n ngOnDestroy() {\n end('NgxSkeletonLoader:Loaded');\n }\n}\n","<span\n *ngFor=\"let item of items\"\n class=\"loader\"\n [attr.aria-label]=\"ariaLabel\"\n aria-busy=\"true\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuetext]=\"loadingText\"\n role=\"progressbar\"\n tabindex=\"0\"\n [ngClass]=\"{\n circle: appearance === 'circle',\n progress: animation === 'progress',\n 'progress-dark': animation === 'progress-dark',\n pulse: animation === 'pulse'\n }\"\n [ngStyle]=\"theme\"\n>\n</span>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { NgxSkeletonLoaderComponent } from './ngx-skeleton-loader.component';\nimport { NgxSkeletonLoaderConfig, NGX_SKELETON_LOADER_CONFIG } from './ngx-skeleton-loader-config.types';\n\n@NgModule({\n declarations: [NgxSkeletonLoaderComponent],\n imports: [CommonModule],\n exports: [NgxSkeletonLoaderComponent],\n})\nexport class NgxSkeletonLoaderModule {\n static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule> {\n return {\n ngModule: NgxSkeletonLoaderModule,\n providers: [{ provide: NGX_SKELETON_LOADER_CONFIG, useValue: config }],\n };\n }\n}\n","/*\n * Public API Surface of ngx-skeleton-loader\n */\n\nexport * from './lib/ngx-skeleton-loader.component';\nexport * from './lib/ngx-skeleton-loader.module';\nexport * from './lib/ngx-skeleton-loader-config.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA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AAC,MAAyC;QACtD,OAAO;YACL,QAAQ,EAAE,uBAAuB;YACjC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SACvE,CAAC;KACH;;0JANU,uBAAuB;2JAAvB,uBAAuB,iBAJnB,0BAA0B,aAC/B,YAAY,aACZ,0BAA0B;2JAEzB,uBAAuB,YAHzB,CAAC,YAAY,CAAC;2FAGZ,uBAAuB;kBALnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC;;;ACVD;;;;ACAA;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnInit, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { NgxSkeletonLoaderConfig, NgxSkeletonLoaderConfigTheme } from './ngx-skeleton-loader-config.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
|
|
4
5
|
static ngAcceptInputType_count: number | string;
|
|
5
6
|
static ngAcceptInputType_animation: boolean | string;
|
|
@@ -7,6 +8,7 @@ export declare class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit
|
|
|
7
8
|
loadingText: NgxSkeletonLoaderConfig['loadingText'];
|
|
8
9
|
appearance: NgxSkeletonLoaderConfig['appearance'];
|
|
9
10
|
animation: NgxSkeletonLoaderConfig['animation'];
|
|
11
|
+
ariaLabel: NgxSkeletonLoaderConfig['ariaLabel'];
|
|
10
12
|
theme: NgxSkeletonLoaderConfigTheme;
|
|
11
13
|
items: Array<any>;
|
|
12
14
|
constructor(config?: NgxSkeletonLoaderConfig);
|
|
@@ -15,4 +17,6 @@ export declare class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit
|
|
|
15
17
|
ngOnChanges(changes: SimpleChanges): void;
|
|
16
18
|
ngAfterViewInit(): void;
|
|
17
19
|
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSkeletonLoaderComponent, [{ optional: true; }]>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxSkeletonLoaderComponent, "ngx-skeleton-loader", never, { "count": "count"; "loadingText": "loadingText"; "appearance": "appearance"; "animation": "animation"; "ariaLabel": "ariaLabel"; "theme": "theme"; }, {}, never, never>;
|
|
18
22
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
2
|
import { NgxSkeletonLoaderConfig } from './ngx-skeleton-loader-config.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./ngx-skeleton-loader.component";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
3
6
|
export declare class NgxSkeletonLoaderModule {
|
|
4
7
|
static forRoot(config?: Partial<NgxSkeletonLoaderConfig>): ModuleWithProviders<NgxSkeletonLoaderModule>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSkeletonLoaderModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSkeletonLoaderModule, [typeof i1.NgxSkeletonLoaderComponent], [typeof i2.CommonModule], [typeof i1.NgxSkeletonLoaderComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxSkeletonLoaderModule>;
|
|
5
11
|
}
|
package/ngx-skeleton-loader.d.ts
CHANGED
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": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=8.0.0",
|
|
7
7
|
"@angular/core": ">=8.0.0"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"perf-marks": "^1.13.4",
|
|
25
|
-
"tslib": "^
|
|
25
|
+
"tslib": "^2.0.0"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
@@ -32,12 +32,24 @@
|
|
|
32
32
|
"url": "https://github.com/willmendesneto/ngx-skeleton-loader/issues"
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/willmendesneto/ngx-skeleton-loader#readme",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"fesm2015": "fesm2015/ngx-skeleton-loader.
|
|
35
|
+
"module": "fesm2015/ngx-skeleton-loader.mjs",
|
|
36
|
+
"es2020": "fesm2020/ngx-skeleton-loader.mjs",
|
|
37
|
+
"esm2020": "esm2020/ngx-skeleton-loader.mjs",
|
|
38
|
+
"fesm2020": "fesm2020/ngx-skeleton-loader.mjs",
|
|
39
|
+
"fesm2015": "fesm2015/ngx-skeleton-loader.mjs",
|
|
40
40
|
"typings": "ngx-skeleton-loader.d.ts",
|
|
41
|
-
"
|
|
41
|
+
"exports": {
|
|
42
|
+
"./package.json": {
|
|
43
|
+
"default": "./package.json"
|
|
44
|
+
},
|
|
45
|
+
".": {
|
|
46
|
+
"types": "./ngx-skeleton-loader.d.ts",
|
|
47
|
+
"esm2020": "./esm2020/ngx-skeleton-loader.mjs",
|
|
48
|
+
"es2020": "./fesm2020/ngx-skeleton-loader.mjs",
|
|
49
|
+
"es2015": "./fesm2015/ngx-skeleton-loader.mjs",
|
|
50
|
+
"node": "./fesm2015/ngx-skeleton-loader.mjs",
|
|
51
|
+
"default": "./fesm2020/ngx-skeleton-loader.mjs"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
42
54
|
"sideEffects": false
|
|
43
55
|
}
|