@ruc-lib/skeleton 3.1.0 → 3.2.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 +24 -23
- package/esm2020/index.mjs +5 -0
- package/esm2020/lib/ruclib-skeleton.module.mjs +21 -0
- package/esm2020/lib/skeleton/skeleton.component.mjs +46 -0
- package/esm2020/model/skeletonOptions.mjs +3 -0
- package/esm2020/ruc-lib-skeleton.mjs +5 -0
- package/esm2020/services/skeleton.service.mjs +41 -0
- package/fesm2015/ruc-lib-skeleton.mjs +110 -0
- package/fesm2015/ruc-lib-skeleton.mjs.map +1 -0
- package/fesm2020/ruc-lib-skeleton.mjs +110 -0
- package/fesm2020/ruc-lib-skeleton.mjs.map +1 -0
- package/index.d.ts +4 -54
- package/lib/ruclib-skeleton.module.d.ts +9 -0
- package/lib/skeleton/skeleton.component.d.ts +21 -0
- package/model/skeletonOptions.d.ts +14 -0
- package/package.json +24 -12
- package/services/skeleton.service.d.ts +18 -0
- package/fesm2022/ruc-lib-skeleton.mjs +0 -93
- package/fesm2022/ruc-lib-skeleton.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -23,32 +23,33 @@ Please ensure you install the correct version of `@ruc-lib/skeleton` based on yo
|
|
|
23
23
|
|
|
24
24
|
| Angular Version | Compatible `@ruc-lib/skeleton` Version |
|
|
25
25
|
|--------------------|---------------------------------------------|
|
|
26
|
-
| 15.x.x | `npm install @ruc-lib/skeleton@^3.
|
|
27
|
-
| 16.x.x | `npm install @ruc-lib/skeleton@^3.
|
|
26
|
+
| 15.x.x | `npm install @ruc-lib/skeleton@^3.2.0` |
|
|
27
|
+
| 16.x.x | `npm install @ruc-lib/skeleton@^3.2.0` |
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
32
|
-
### 1. Import the
|
|
33
|
-
In your Angular
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
32
|
+
### 1. Import the Module
|
|
33
|
+
In your Angular module file (e.g., `app.module.ts`), import the `RuclibSkeletonModule`:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import {RuclibSkeletonModule} from '@ruclib/skeleton';
|
|
37
|
+
import { AppComponent } from './app.component';
|
|
38
|
+
import { NgModule } from '@angular/core';
|
|
39
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
40
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
41
|
+
|
|
42
|
+
@NgModule({
|
|
43
|
+
declarations: [AppComponent],
|
|
44
|
+
imports: [
|
|
45
|
+
BrowserModule,
|
|
46
|
+
RuclibSkeletonModule,
|
|
47
|
+
MatTooltipModule
|
|
48
|
+
],
|
|
49
|
+
providers: [],
|
|
50
|
+
bootstrap: [AppComponent]
|
|
51
|
+
})
|
|
52
|
+
export class AppModule {}
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
### 2. Use the Component
|
|
@@ -119,4 +120,4 @@ Contributions are welcome! Feel free to open issues or pull requests for any enh
|
|
|
119
120
|
|
|
120
121
|
## Acknowledgements
|
|
121
122
|
|
|
122
|
-
Thank you for choosing the Skeleton library. If you have any feedback or suggestions, please let us know!
|
|
123
|
+
Thank you for choosing the Skeleton library. If you have any feedback or suggestions, please let us know!
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './lib/ruclib-skeleton.module';
|
|
2
|
+
export * from './lib/skeleton/skeleton.component';
|
|
3
|
+
export * from './services/skeleton.service';
|
|
4
|
+
export * from './model/skeletonOptions';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw4QkFBOEIsQ0FBQztBQUM3QyxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyx5QkFBeUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL3J1Y2xpYi1za2VsZXRvbi5tb2R1bGUnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9za2VsZXRvbi9za2VsZXRvbi5jb21wb25lbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2VzL3NrZWxldG9uLnNlcnZpY2UnO1xyXG5leHBvcnQgKiBmcm9tICcuL21vZGVsL3NrZWxldG9uT3B0aW9ucyc7Il19
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { SkeletonComponent } from './skeleton/skeleton.component';
|
|
4
|
+
import { SkeletonService } from '../services/skeleton.service';
|
|
5
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class RuclibSkeletonModule {
|
|
8
|
+
}
|
|
9
|
+
RuclibSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
+
RuclibSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, declarations: [SkeletonComponent], imports: [CommonModule, MatTooltipModule], exports: [SkeletonComponent] });
|
|
11
|
+
RuclibSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, providers: [SkeletonService], imports: [CommonModule, MatTooltipModule] });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, decorators: [{
|
|
13
|
+
type: NgModule,
|
|
14
|
+
args: [{
|
|
15
|
+
imports: [CommonModule, MatTooltipModule],
|
|
16
|
+
declarations: [SkeletonComponent],
|
|
17
|
+
exports: [SkeletonComponent],
|
|
18
|
+
providers: [SkeletonService]
|
|
19
|
+
}]
|
|
20
|
+
}] });
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjbGliLXNrZWxldG9uLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvcnVjbGliLXNrZWxldG9uLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDL0QsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7O0FBUTdELE1BQU0sT0FBTyxvQkFBb0I7O2tIQUFwQixvQkFBb0I7bUhBQXBCLG9CQUFvQixpQkFKaEIsaUJBQWlCLGFBRHRCLFlBQVksRUFBQyxnQkFBZ0IsYUFFN0IsaUJBQWlCO21IQUdoQixvQkFBb0IsYUFGckIsQ0FBQyxlQUFlLENBQUMsWUFIakIsWUFBWSxFQUFDLGdCQUFnQjs0RkFLNUIsb0JBQW9CO2tCQU5oQyxRQUFRO21CQUFDO29CQUNSLE9BQU8sRUFBRSxDQUFDLFlBQVksRUFBQyxnQkFBZ0IsQ0FBRTtvQkFDekMsWUFBWSxFQUFFLENBQUMsaUJBQWlCLENBQUM7b0JBQ2pDLE9BQU8sRUFBRSxDQUFDLGlCQUFpQixDQUFDO29CQUM1QixTQUFTLEVBQUMsQ0FBQyxlQUFlLENBQUM7aUJBQzVCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHsgQ29tbW9uTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcclxuaW1wb3J0IHsgU2tlbGV0b25Db21wb25lbnQgfSBmcm9tICcuL3NrZWxldG9uL3NrZWxldG9uLmNvbXBvbmVudCc7XHJcbmltcG9ydCB7IFNrZWxldG9uU2VydmljZSB9IGZyb20gJy4uL3NlcnZpY2VzL3NrZWxldG9uLnNlcnZpY2UnO1xyXG5pbXBvcnQgeyBNYXRUb29sdGlwTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvbWF0ZXJpYWwvdG9vbHRpcCc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsTWF0VG9vbHRpcE1vZHVsZSBdLFxyXG4gIGRlY2xhcmF0aW9uczogW1NrZWxldG9uQ29tcG9uZW50XSxcclxuICBleHBvcnRzOiBbU2tlbGV0b25Db21wb25lbnRdLFxyXG4gIHByb3ZpZGVyczpbU2tlbGV0b25TZXJ2aWNlXVxyXG59KVxyXG5leHBvcnQgY2xhc3MgUnVjbGliU2tlbGV0b25Nb2R1bGUge31cclxuIl19
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { SkeletonService } from '../../services/skeleton.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../services/skeleton.service";
|
|
6
|
+
import * as i2 from "@angular/common";
|
|
7
|
+
import * as i3 from "@angular/material/tooltip";
|
|
8
|
+
export class SkeletonComponent {
|
|
9
|
+
set rucInputData(value) {
|
|
10
|
+
if (value) {
|
|
11
|
+
//update default value dynamically
|
|
12
|
+
this.skeletonService.setDefaultOptions(value);
|
|
13
|
+
//merge updated defaults with the new input
|
|
14
|
+
const mergedOptions = { ...this.skeletonService.getDefaultOptions(), ...value };
|
|
15
|
+
this.inputDataSubject.next(mergedOptions);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
constructor(skeletonService) {
|
|
19
|
+
this.skeletonService = skeletonService;
|
|
20
|
+
this.divArray = new Array(12);
|
|
21
|
+
this.inputDataSubject = new BehaviorSubject(this.skeletonService.getDefaultOptions());
|
|
22
|
+
this.data$ = this.inputDataSubject.asObservable();
|
|
23
|
+
}
|
|
24
|
+
ngOnInit() {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param changes
|
|
29
|
+
*/
|
|
30
|
+
ngOnChanges(changes) {
|
|
31
|
+
if (changes['rucInputData'] && !changes['rucInputData'].firstChange) {
|
|
32
|
+
this.inputDataSubject.next(changes['rucInputData'].currentValue);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
SkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonComponent, deps: [{ token: i1.SkeletonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
SkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SkeletonComponent, selector: "uxp-ruclib-skeleton", inputs: { customTheme: "customTheme", rucInputData: "rucInputData" }, usesOnChanges: true, ngImport: i0, template: "<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px;position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px;position:relative;margin:0 auto}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px;display:inline-block;position:relative;top:-5px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{ selector: 'uxp-ruclib-skeleton', template: "<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px;position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px;position:relative;margin:0 auto}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px;display:inline-block;position:relative;top:-5px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
41
|
+
}], ctorParameters: function () { return [{ type: i1.SkeletonService }]; }, propDecorators: { customTheme: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], rucInputData: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}] } });
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tlbGV0b24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9za2VsZXRvbi9za2VsZXRvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9zcmMvbGliL3NrZWxldG9uL3NrZWxldG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFvQyxNQUFNLGVBQWUsQ0FBQztBQUVuRixPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3ZDLE9BQU8sRUFBRSx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dGlwPzogYm9vbGVhbjsgLy9UbyBzZXQgYSB0b29sdGlwIG9mIHNrZWxldG9uIG5vdCBhcHBsaWNhYmxlIHRvIGxvYWRlclxyXG4gICAgdG9vbHRpcFRleHQ/IDogc3RyaW5nOyAvL1RvIHNldCBhIHRvb2x0aXAgdGV4dCBvZiBza2VsZXRvbiBub3QgYXBwbGljYWJsZSB0byBsb2FkZXJcclxuICAgIHRvb2x0aXBQb3NpdGlvbj86ICdhYm92ZScgfCAnYmVsb3cnIHwgJ2xlZnQnIHwgJ3JpZ2h0JztcclxuICAgIGlzTG9hZGVyPzogYm9vbGVhbjsgLy8gdHJ1ZSAsIGZhc2xlIHdoZW4gbG9hZGVyIGlzIHNlbGVjdGVkXHJcbiAgICBsb2FkZXJQb3NpdGlvbj86IHN0cmluZyAvLydwYWdlJyB8ICdzZWN0aW9uJyB8ICdpbmxpbmUnIHwgJ25ld2xpbmUnOyAvLyBsb2FkZXIgcG9zaXRpb25cclxuICAgIGxvYWRlckN1c3RvbVRleHQ/OiBzdHJpbmc7IC8vIGxvYWRlciBjdXN0b20gdGV4dFxyXG4gICAgbG9hZGVyU3Bpbm5lckxvZ29Vcmw/OiBzdHJpbmc7IC8vIGxvYWRlciBpbWFnZSBpZiB1c2VyIHdhbnRcclxufVxyXG5cclxuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjLWxpYi1za2VsZXRvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWMtbGliLXNrZWxldG9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class SkeletonService {
|
|
4
|
+
// skeletonOptions: SkeletonOptions;
|
|
5
|
+
constructor() {
|
|
6
|
+
this.defaultOptions = {
|
|
7
|
+
shape: 'circle',
|
|
8
|
+
width: "50px",
|
|
9
|
+
height: "50px",
|
|
10
|
+
borderRadius: '',
|
|
11
|
+
class: '',
|
|
12
|
+
tooltip: false,
|
|
13
|
+
tooltipText: '',
|
|
14
|
+
tooltipPosition: 'above',
|
|
15
|
+
isLoader: false,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* get options
|
|
20
|
+
* @returns defaultOptions
|
|
21
|
+
*/
|
|
22
|
+
getDefaultOptions() {
|
|
23
|
+
return { ...this.defaultOptions };
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* set options
|
|
27
|
+
* @param newOptions
|
|
28
|
+
*/
|
|
29
|
+
setDefaultOptions(newOptions) {
|
|
30
|
+
this.defaultOptions = { ...this.defaultOptions, ...newOptions };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
SkeletonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
34
|
+
SkeletonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, providedIn: 'root' });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, decorators: [{
|
|
36
|
+
type: Injectable,
|
|
37
|
+
args: [{
|
|
38
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iAgICAgKiBnZXQgb3B0aW9uc1xyXG4gICAgICogQHJldHVybnMgZGVmYXVsdE9wdGlvbnNcclxuICAgICAqL1xyXG4gICAgZ2V0RGVmYXVsdE9wdGlvbnMoKTogU2tlbGV0b25PcHRpb25ze1xyXG4gICAgICByZXR1cm4gey4uLnRoaXMuZGVmYXVsdE9wdGlvbnN9O1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogc2V0IG9wdGlvbnNcclxuICAgICAqIEBwYXJhbSBuZXdPcHRpb25zIFxyXG4gICAgICovXHJcbiAgICBzZXREZWZhdWx0T3B0aW9ucyhuZXdPcHRpb25zOiBQYXJ0aWFsPFNrZWxldG9uT3B0aW9ucz4pOiB2b2lke1xyXG4gICAgICB0aGlzLmRlZmF1bHRPcHRpb25zID17Li4udGhpcy5kZWZhdWx0T3B0aW9ucywgLi4ubmV3T3B0aW9uc307XHJcblxyXG4gICAgfVxyXG59Il19
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import * as i3 from '@angular/material/tooltip';
|
|
7
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
+
|
|
9
|
+
class SkeletonService {
|
|
10
|
+
// skeletonOptions: SkeletonOptions;
|
|
11
|
+
constructor() {
|
|
12
|
+
this.defaultOptions = {
|
|
13
|
+
shape: 'circle',
|
|
14
|
+
width: "50px",
|
|
15
|
+
height: "50px",
|
|
16
|
+
borderRadius: '',
|
|
17
|
+
class: '',
|
|
18
|
+
tooltip: false,
|
|
19
|
+
tooltipText: '',
|
|
20
|
+
tooltipPosition: 'above',
|
|
21
|
+
isLoader: false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* get options
|
|
26
|
+
* @returns defaultOptions
|
|
27
|
+
*/
|
|
28
|
+
getDefaultOptions() {
|
|
29
|
+
return Object.assign({}, this.defaultOptions);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* set options
|
|
33
|
+
* @param newOptions
|
|
34
|
+
*/
|
|
35
|
+
setDefaultOptions(newOptions) {
|
|
36
|
+
this.defaultOptions = Object.assign(Object.assign({}, this.defaultOptions), newOptions);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
SkeletonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
40
|
+
SkeletonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, providedIn: 'root' });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, decorators: [{
|
|
42
|
+
type: Injectable,
|
|
43
|
+
args: [{
|
|
44
|
+
providedIn: 'root',
|
|
45
|
+
}]
|
|
46
|
+
}], ctorParameters: function () { return []; } });
|
|
47
|
+
|
|
48
|
+
class SkeletonComponent {
|
|
49
|
+
set rucInputData(value) {
|
|
50
|
+
if (value) {
|
|
51
|
+
//update default value dynamically
|
|
52
|
+
this.skeletonService.setDefaultOptions(value);
|
|
53
|
+
//merge updated defaults with the new input
|
|
54
|
+
const mergedOptions = Object.assign(Object.assign({}, this.skeletonService.getDefaultOptions()), value);
|
|
55
|
+
this.inputDataSubject.next(mergedOptions);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
constructor(skeletonService) {
|
|
59
|
+
this.skeletonService = skeletonService;
|
|
60
|
+
this.divArray = new Array(12);
|
|
61
|
+
this.inputDataSubject = new BehaviorSubject(this.skeletonService.getDefaultOptions());
|
|
62
|
+
this.data$ = this.inputDataSubject.asObservable();
|
|
63
|
+
}
|
|
64
|
+
ngOnInit() {
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @param changes
|
|
69
|
+
*/
|
|
70
|
+
ngOnChanges(changes) {
|
|
71
|
+
if (changes['rucInputData'] && !changes['rucInputData'].firstChange) {
|
|
72
|
+
this.inputDataSubject.next(changes['rucInputData'].currentValue);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
SkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonComponent, deps: [{ token: SkeletonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
77
|
+
SkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SkeletonComponent, selector: "uxp-ruclib-skeleton", inputs: { customTheme: "customTheme", rucInputData: "rucInputData" }, usesOnChanges: true, ngImport: i0, template: "<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px;position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px;position:relative;margin:0 auto}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px;display:inline-block;position:relative;top:-5px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonComponent, decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{ selector: 'uxp-ruclib-skeleton', template: "<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px;position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px;position:relative;margin:0 auto}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px;display:inline-block;position:relative;top:-5px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
81
|
+
}], ctorParameters: function () { return [{ type: SkeletonService }]; }, propDecorators: { customTheme: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], rucInputData: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}] } });
|
|
86
|
+
|
|
87
|
+
class RuclibSkeletonModule {
|
|
88
|
+
}
|
|
89
|
+
RuclibSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
90
|
+
RuclibSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, declarations: [SkeletonComponent], imports: [CommonModule, MatTooltipModule], exports: [SkeletonComponent] });
|
|
91
|
+
RuclibSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, providers: [SkeletonService], imports: [CommonModule, MatTooltipModule] });
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, decorators: [{
|
|
93
|
+
type: NgModule,
|
|
94
|
+
args: [{
|
|
95
|
+
imports: [CommonModule, MatTooltipModule],
|
|
96
|
+
declarations: [SkeletonComponent],
|
|
97
|
+
exports: [SkeletonComponent],
|
|
98
|
+
providers: [SkeletonService]
|
|
99
|
+
}]
|
|
100
|
+
}] });
|
|
101
|
+
|
|
102
|
+
class SkeletonOptions {
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Generated bundle index. Do not edit.
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
export { RuclibSkeletonModule, SkeletonComponent, SkeletonOptions, SkeletonService };
|
|
110
|
+
//# sourceMappingURL=ruc-lib-skeleton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruc-lib-skeleton.mjs","sources":["../../src/services/skeleton.service.ts","../../src/lib/skeleton/skeleton.component.ts","../../src/lib/skeleton/skeleton.component.html","../../src/lib/ruclib-skeleton.module.ts","../../src/model/skeletonOptions.ts","../../src/ruc-lib-skeleton.ts"],"sourcesContent":["import { Injectable, ViewContainerRef } from '@angular/core';\r\nimport { Observable, Subject, BehaviorSubject } from 'rxjs';\r\nimport {SkeletonOptions} from '../model/skeletonOptions';\r\nimport {SkeletonComponent} from '../lib/skeleton/skeleton.component';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SkeletonService {\r\n defaultOptions: SkeletonOptions;\r\n\r\n // skeletonOptions: SkeletonOptions;\r\n\r\n constructor() {\r\n this.defaultOptions = {\r\n shape: 'circle',\r\n width: \"50px\",\r\n height: \"50px\",\r\n borderRadius: '',\r\n class: '', \r\n tooltip: false,\r\n tooltipText : '',\r\n tooltipPosition: 'above',\r\n isLoader: false,\r\n }\r\n }\r\n\r\n /**\r\n * get options\r\n * @returns defaultOptions\r\n */\r\n getDefaultOptions(): SkeletonOptions{\r\n return {...this.defaultOptions};\r\n }\r\n\r\n /**\r\n * set options\r\n * @param newOptions \r\n */\r\n setDefaultOptions(newOptions: Partial<SkeletonOptions>): void{\r\n this.defaultOptions ={...this.defaultOptions, ...newOptions};\r\n\r\n }\r\n}","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\r\nimport {SkeletonOptions} from '../../model/skeletonOptions';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { SkeletonService } from '../../services/skeleton.service';\r\n@Component({\r\n selector: 'uxp-ruclib-skeleton',\r\n templateUrl: './skeleton.component.html',\r\n styleUrls: ['./skeleton.component.scss'],\r\n})\r\nexport class SkeletonComponent implements OnInit, OnChanges {\r\n\r\n \r\n @Input() customTheme!: string;\r\n divArray = new Array(12);\r\n \r\n\r\n @Input() set rucInputData(value:Partial<SkeletonOptions>){\r\n if(value){\r\n //update default value dynamically\r\n this.skeletonService.setDefaultOptions(value);\r\n\r\n //merge updated defaults with the new input\r\n const mergedOptions = { ...this.skeletonService.getDefaultOptions(), ...value }\r\n this.inputDataSubject.next(mergedOptions);\r\n }\r\n }\r\n\r\n private inputDataSubject = new BehaviorSubject<SkeletonOptions>(this.skeletonService.getDefaultOptions()); \r\n data$ = this.inputDataSubject.asObservable();\r\n\r\n\r\n constructor(public skeletonService:SkeletonService){ }\r\n ngOnInit(): void {\r\n }\r\n\r\n /**\r\n * \r\n * @param changes \r\n */\r\n ngOnChanges(changes: SimpleChanges){\r\n if(changes['rucInputData'] && !changes['rucInputData'].firstChange){\r\n this.inputDataSubject.next(changes['rucInputData'].currentValue);\r\n }\r\n }\r\n\r\n}\r\n","<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SkeletonComponent } from './skeleton/skeleton.component';\r\nimport { SkeletonService } from '../services/skeleton.service';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\n@NgModule({\r\n imports: [CommonModule,MatTooltipModule ],\r\n declarations: [SkeletonComponent],\r\n exports: [SkeletonComponent],\r\n providers:[SkeletonService]\r\n})\r\nexport class RuclibSkeletonModule {}\r\n","export class SkeletonOptions{\r\n // rectangle , rounded-rectangle, square, circle, \r\n// triangle, arrow-left, arrow-right, arrow-up, arrow-down\r\n shape? : any; //text, rectangle, rounded, Square, Circle, Triangle, left Arrow, right , up and down arrow, loader\r\n width?: any; //To set the width of skeleton not applicable to loader\r\n height?: any; //To set the height of skeleton not applicable to loader\r\n borderRadius?: any; //To set the borderRadius of skeleton not applicable to loader\r\n class?: any; //To set a custom class of skeleton not applicable to loader\r\n tooltip?: boolean; //To set a tooltip of skeleton not applicable to loader\r\n tooltipText? : string; //To set a tooltip text of skeleton not applicable to loader\r\n tooltipPosition?: 'above' | 'below' | 'left' | 'right';\r\n isLoader?: boolean; // true , fasle when loader is selected\r\n loaderPosition?: string //'page' | 'section' | 'inline' | 'newline'; // loader position\r\n loaderCustomText?: string; // loader custom text\r\n loaderSpinnerLogoUrl?: string; // loader image if user want\r\n}\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SkeletonService"],"mappings":";;;;;;;;MAQa,eAAe,CAAA;;AAKxB,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,cAAc,GAAG;AACpB,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,YAAY,EAAE,EAAE;AAChB,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,WAAW,EAAG,EAAE;AAChB,YAAA,eAAe,EAAE,OAAO;AACxB,YAAA,QAAQ,EAAE,KAAK;SAChB,CAAA;KACF;AAED;;;AAGG;IACH,iBAAiB,GAAA;QACf,OAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,CAAC,cAAc,CAAE,CAAA;KACjC;AAED;;;AAGG;AACH,IAAA,iBAAiB,CAAC,UAAoC,EAAA;QACpD,IAAI,CAAC,cAAc,GAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,CAAC,cAAc,CAAA,EAAK,UAAU,CAAC,CAAC;KAE9D;;6GAlCQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAA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KAAK;gBAIO,YAAY,EAAA,CAAA;sBAAxB,KAAK;;;MEJK,oBAAoB,CAAA;;kHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,iBAJhB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CADtB,YAAY,EAAC,gBAAgB,aAE7B,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAGhB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,aAFrB,CAAC,eAAe,CAAC,EAHjB,OAAA,EAAA,CAAA,YAAY,EAAC,gBAAgB,CAAA,EAAA,CAAA,CAAA;4FAK5B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAC,gBAAgB,CAAE;oBACzC,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,SAAS,EAAC,CAAC,eAAe,CAAC;iBAC5B,CAAA;;;MCXY,eAAe,CAAA;AAe3B;;ACfD;;AAEG;;;;"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import * as i3 from '@angular/material/tooltip';
|
|
7
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
+
|
|
9
|
+
class SkeletonService {
|
|
10
|
+
// skeletonOptions: SkeletonOptions;
|
|
11
|
+
constructor() {
|
|
12
|
+
this.defaultOptions = {
|
|
13
|
+
shape: 'circle',
|
|
14
|
+
width: "50px",
|
|
15
|
+
height: "50px",
|
|
16
|
+
borderRadius: '',
|
|
17
|
+
class: '',
|
|
18
|
+
tooltip: false,
|
|
19
|
+
tooltipText: '',
|
|
20
|
+
tooltipPosition: 'above',
|
|
21
|
+
isLoader: false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* get options
|
|
26
|
+
* @returns defaultOptions
|
|
27
|
+
*/
|
|
28
|
+
getDefaultOptions() {
|
|
29
|
+
return { ...this.defaultOptions };
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* set options
|
|
33
|
+
* @param newOptions
|
|
34
|
+
*/
|
|
35
|
+
setDefaultOptions(newOptions) {
|
|
36
|
+
this.defaultOptions = { ...this.defaultOptions, ...newOptions };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
SkeletonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
40
|
+
SkeletonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, providedIn: 'root' });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonService, decorators: [{
|
|
42
|
+
type: Injectable,
|
|
43
|
+
args: [{
|
|
44
|
+
providedIn: 'root',
|
|
45
|
+
}]
|
|
46
|
+
}], ctorParameters: function () { return []; } });
|
|
47
|
+
|
|
48
|
+
class SkeletonComponent {
|
|
49
|
+
set rucInputData(value) {
|
|
50
|
+
if (value) {
|
|
51
|
+
//update default value dynamically
|
|
52
|
+
this.skeletonService.setDefaultOptions(value);
|
|
53
|
+
//merge updated defaults with the new input
|
|
54
|
+
const mergedOptions = { ...this.skeletonService.getDefaultOptions(), ...value };
|
|
55
|
+
this.inputDataSubject.next(mergedOptions);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
constructor(skeletonService) {
|
|
59
|
+
this.skeletonService = skeletonService;
|
|
60
|
+
this.divArray = new Array(12);
|
|
61
|
+
this.inputDataSubject = new BehaviorSubject(this.skeletonService.getDefaultOptions());
|
|
62
|
+
this.data$ = this.inputDataSubject.asObservable();
|
|
63
|
+
}
|
|
64
|
+
ngOnInit() {
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @param changes
|
|
69
|
+
*/
|
|
70
|
+
ngOnChanges(changes) {
|
|
71
|
+
if (changes['rucInputData'] && !changes['rucInputData'].firstChange) {
|
|
72
|
+
this.inputDataSubject.next(changes['rucInputData'].currentValue);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
SkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonComponent, deps: [{ token: SkeletonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
77
|
+
SkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SkeletonComponent, selector: "uxp-ruclib-skeleton", inputs: { customTheme: "customTheme", rucInputData: "rucInputData" }, usesOnChanges: true, ngImport: i0, template: "<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px;position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px;position:relative;margin:0 auto}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px;display:inline-block;position:relative;top:-5px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkeletonComponent, decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{ selector: 'uxp-ruclib-skeleton', template: "<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px;position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px;position:relative;margin:0 auto}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px;display:inline-block;position:relative;top:-5px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
81
|
+
}], ctorParameters: function () { return [{ type: SkeletonService }]; }, propDecorators: { customTheme: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], rucInputData: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}] } });
|
|
86
|
+
|
|
87
|
+
class RuclibSkeletonModule {
|
|
88
|
+
}
|
|
89
|
+
RuclibSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
90
|
+
RuclibSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, declarations: [SkeletonComponent], imports: [CommonModule, MatTooltipModule], exports: [SkeletonComponent] });
|
|
91
|
+
RuclibSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, providers: [SkeletonService], imports: [CommonModule, MatTooltipModule] });
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibSkeletonModule, decorators: [{
|
|
93
|
+
type: NgModule,
|
|
94
|
+
args: [{
|
|
95
|
+
imports: [CommonModule, MatTooltipModule],
|
|
96
|
+
declarations: [SkeletonComponent],
|
|
97
|
+
exports: [SkeletonComponent],
|
|
98
|
+
providers: [SkeletonService]
|
|
99
|
+
}]
|
|
100
|
+
}] });
|
|
101
|
+
|
|
102
|
+
class SkeletonOptions {
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Generated bundle index. Do not edit.
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
export { RuclibSkeletonModule, SkeletonComponent, SkeletonOptions, SkeletonService };
|
|
110
|
+
//# sourceMappingURL=ruc-lib-skeleton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruc-lib-skeleton.mjs","sources":["../../src/services/skeleton.service.ts","../../src/lib/skeleton/skeleton.component.ts","../../src/lib/skeleton/skeleton.component.html","../../src/lib/ruclib-skeleton.module.ts","../../src/model/skeletonOptions.ts","../../src/ruc-lib-skeleton.ts"],"sourcesContent":["import { Injectable, ViewContainerRef } from '@angular/core';\r\nimport { Observable, Subject, BehaviorSubject } from 'rxjs';\r\nimport {SkeletonOptions} from '../model/skeletonOptions';\r\nimport {SkeletonComponent} from '../lib/skeleton/skeleton.component';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SkeletonService {\r\n defaultOptions: SkeletonOptions;\r\n\r\n // skeletonOptions: SkeletonOptions;\r\n\r\n constructor() {\r\n this.defaultOptions = {\r\n shape: 'circle',\r\n width: \"50px\",\r\n height: \"50px\",\r\n borderRadius: '',\r\n class: '', \r\n tooltip: false,\r\n tooltipText : '',\r\n tooltipPosition: 'above',\r\n isLoader: false,\r\n }\r\n }\r\n\r\n /**\r\n * get options\r\n * @returns defaultOptions\r\n */\r\n getDefaultOptions(): SkeletonOptions{\r\n return {...this.defaultOptions};\r\n }\r\n\r\n /**\r\n * set options\r\n * @param newOptions \r\n */\r\n setDefaultOptions(newOptions: Partial<SkeletonOptions>): void{\r\n this.defaultOptions ={...this.defaultOptions, ...newOptions};\r\n\r\n }\r\n}","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\r\nimport {SkeletonOptions} from '../../model/skeletonOptions';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { SkeletonService } from '../../services/skeleton.service';\r\n@Component({\r\n selector: 'uxp-ruclib-skeleton',\r\n templateUrl: './skeleton.component.html',\r\n styleUrls: ['./skeleton.component.scss'],\r\n})\r\nexport class SkeletonComponent implements OnInit, OnChanges {\r\n\r\n \r\n @Input() customTheme!: string;\r\n divArray = new Array(12);\r\n \r\n\r\n @Input() set rucInputData(value:Partial<SkeletonOptions>){\r\n if(value){\r\n //update default value dynamically\r\n this.skeletonService.setDefaultOptions(value);\r\n\r\n //merge updated defaults with the new input\r\n const mergedOptions = { ...this.skeletonService.getDefaultOptions(), ...value }\r\n this.inputDataSubject.next(mergedOptions);\r\n }\r\n }\r\n\r\n private inputDataSubject = new BehaviorSubject<SkeletonOptions>(this.skeletonService.getDefaultOptions()); \r\n data$ = this.inputDataSubject.asObservable();\r\n\r\n\r\n constructor(public skeletonService:SkeletonService){ }\r\n ngOnInit(): void {\r\n }\r\n\r\n /**\r\n * \r\n * @param changes \r\n */\r\n ngOnChanges(changes: SimpleChanges){\r\n if(changes['rucInputData'] && !changes['rucInputData'].firstChange){\r\n this.inputDataSubject.next(changes['rucInputData'].currentValue);\r\n }\r\n }\r\n\r\n}\r\n","<div [class]=\"customTheme ? customTheme : ''\" *ngIf=\"data$ | async as data\">\r\n <!-- Skeleton Start -->\r\n <div class=\"skeleton skeleton-text\" \r\n [class]=\"data.shape\" \r\n *ngIf=\"!data?.isLoader\" \r\n [style.width]=\"data?.width\" \r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n<!-- Skeleton End -->\r\n<!-- Loader HTML Section start-->\r\n<div *ngIf=\"data.isLoader && data.loaderPosition\">\r\n <div *ngIf=\"data.loaderPosition == 'page'\" class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <div *ngIf=\"data.loaderPosition == 'section'\" class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n <ng-container *ngIf=\"data.loaderPosition == 'inline'\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"data.loaderPosition == 'newline'\" class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <p *ngIf=\"data.loaderCustomText\" class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n <p *ngIf=\"data.loaderCustomText\" class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n </ng-template>\r\n</div>\r\n<!-- Loader HTML section end -->\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SkeletonComponent } from './skeleton/skeleton.component';\r\nimport { SkeletonService } from '../services/skeleton.service';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\n@NgModule({\r\n imports: [CommonModule,MatTooltipModule ],\r\n declarations: [SkeletonComponent],\r\n exports: [SkeletonComponent],\r\n providers:[SkeletonService]\r\n})\r\nexport class RuclibSkeletonModule {}\r\n","export class SkeletonOptions{\r\n // rectangle , rounded-rectangle, square, circle, \r\n// triangle, arrow-left, arrow-right, arrow-up, arrow-down\r\n shape? : any; //text, rectangle, rounded, Square, Circle, Triangle, left Arrow, right , up and down arrow, loader\r\n width?: any; //To set the width of skeleton not applicable to loader\r\n height?: any; //To set the height of skeleton not applicable to loader\r\n borderRadius?: any; //To set the borderRadius of skeleton not applicable to loader\r\n class?: any; //To set a custom class of skeleton not applicable to loader\r\n tooltip?: boolean; //To set a tooltip of skeleton not applicable to loader\r\n tooltipText? : string; //To set a tooltip text of skeleton not applicable to loader\r\n tooltipPosition?: 'above' | 'below' | 'left' | 'right';\r\n isLoader?: boolean; // true , fasle when loader is selected\r\n loaderPosition?: string //'page' | 'section' | 'inline' | 'newline'; // loader position\r\n loaderCustomText?: string; // loader custom text\r\n loaderSpinnerLogoUrl?: string; // loader image if user want\r\n}\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SkeletonService"],"mappings":";;;;;;;;MAQa,eAAe,CAAA;;AAKxB,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,cAAc,GAAG;AACpB,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,YAAY,EAAE,EAAE;AAChB,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,WAAW,EAAG,EAAE;AAChB,YAAA,eAAe,EAAE,OAAO;AACxB,YAAA,QAAQ,EAAE,KAAK;SAChB,CAAA;KACF;AAED;;;AAGG;IACH,iBAAiB,GAAA;AACf,QAAA,OAAO,EAAC,GAAG,IAAI,CAAC,cAAc,EAAC,CAAC;KACjC;AAED;;;AAGG;AACH,IAAA,iBAAiB,CAAC,UAAoC,EAAA;A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C,CAAC,eAAe,CAAC;AAC5B,iBAAA,CAAA;;;MCXY,eAAe,CAAA;AAe3B;;ACfD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,54 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare class SkeletonOptions {
|
|
6
|
-
shape?: any;
|
|
7
|
-
width?: any;
|
|
8
|
-
height?: any;
|
|
9
|
-
borderRadius?: any;
|
|
10
|
-
class?: any;
|
|
11
|
-
tooltip?: boolean;
|
|
12
|
-
tooltipText?: string;
|
|
13
|
-
tooltipPosition?: 'above' | 'below' | 'left' | 'right';
|
|
14
|
-
isLoader?: boolean;
|
|
15
|
-
loaderPosition?: string;
|
|
16
|
-
loaderCustomText?: string;
|
|
17
|
-
loaderSpinnerLogoUrl?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare class SkeletonService {
|
|
21
|
-
defaultOptions: SkeletonOptions;
|
|
22
|
-
constructor();
|
|
23
|
-
/**
|
|
24
|
-
* get options
|
|
25
|
-
* @returns defaultOptions
|
|
26
|
-
*/
|
|
27
|
-
getDefaultOptions(): SkeletonOptions;
|
|
28
|
-
/**
|
|
29
|
-
* set options
|
|
30
|
-
* @param newOptions
|
|
31
|
-
*/
|
|
32
|
-
setDefaultOptions(newOptions: Partial<SkeletonOptions>): void;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonService, never>;
|
|
34
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SkeletonService>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare class RuclibSkeletonComponent implements OnChanges {
|
|
38
|
-
skeletonService: SkeletonService;
|
|
39
|
-
customTheme: string;
|
|
40
|
-
divArray: any[];
|
|
41
|
-
set rucInputData(value: Partial<SkeletonOptions>);
|
|
42
|
-
private inputDataSubject;
|
|
43
|
-
data$: rxjs.Observable<SkeletonOptions>;
|
|
44
|
-
constructor(skeletonService: SkeletonService);
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @param changes
|
|
48
|
-
*/
|
|
49
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
50
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RuclibSkeletonComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RuclibSkeletonComponent, "uxp-ruclib-skeleton", never, { "customTheme": { "alias": "customTheme"; "required": false; }; "rucInputData": { "alias": "rucInputData"; "required": false; }; }, {}, never, never, true, never>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { RuclibSkeletonComponent, SkeletonOptions, SkeletonService };
|
|
1
|
+
export * from './lib/ruclib-skeleton.module';
|
|
2
|
+
export * from './lib/skeleton/skeleton.component';
|
|
3
|
+
export * from './services/skeleton.service';
|
|
4
|
+
export * from './model/skeletonOptions';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./skeleton/skeleton.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/material/tooltip";
|
|
5
|
+
export declare class RuclibSkeletonModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuclibSkeletonModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RuclibSkeletonModule, [typeof i1.SkeletonComponent], [typeof i2.CommonModule, typeof i3.MatTooltipModule], [typeof i1.SkeletonComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RuclibSkeletonModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SkeletonOptions } from '../../model/skeletonOptions';
|
|
3
|
+
import { SkeletonService } from '../../services/skeleton.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SkeletonComponent implements OnInit, OnChanges {
|
|
6
|
+
skeletonService: SkeletonService;
|
|
7
|
+
customTheme: string;
|
|
8
|
+
divArray: any[];
|
|
9
|
+
set rucInputData(value: Partial<SkeletonOptions>);
|
|
10
|
+
private inputDataSubject;
|
|
11
|
+
data$: import("rxjs").Observable<SkeletonOptions>;
|
|
12
|
+
constructor(skeletonService: SkeletonService);
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param changes
|
|
17
|
+
*/
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonComponent, "uxp-ruclib-skeleton", never, { "customTheme": "customTheme"; "rucInputData": "rucInputData"; }, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class SkeletonOptions {
|
|
2
|
+
shape?: any;
|
|
3
|
+
width?: any;
|
|
4
|
+
height?: any;
|
|
5
|
+
borderRadius?: any;
|
|
6
|
+
class?: any;
|
|
7
|
+
tooltip?: boolean;
|
|
8
|
+
tooltipText?: string;
|
|
9
|
+
tooltipPosition?: 'above' | 'below' | 'left' | 'right';
|
|
10
|
+
isLoader?: boolean;
|
|
11
|
+
loaderPosition?: string;
|
|
12
|
+
loaderCustomText?: string;
|
|
13
|
+
loaderSpinnerLogoUrl?: string;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruc-lib/skeleton",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"peerDependencies": {
|
|
5
|
-
"@angular/
|
|
6
|
-
"@angular/
|
|
7
|
-
"@angular/
|
|
8
|
-
"@angular/
|
|
9
|
-
"@angular/forms": "
|
|
10
|
-
"@angular/platform-browser": "
|
|
11
|
-
"ngx-pagination": "^6.0.
|
|
12
|
-
"rxjs": ">=
|
|
13
|
-
"zone.js": "
|
|
6
|
+
"@angular/material": "^15.2.0",
|
|
7
|
+
"@angular/animations": ">=15.0.0 <18.0.0",
|
|
8
|
+
"@angular/core": ">=15.0.0 <18.0.0",
|
|
9
|
+
"@angular/common": ">=15.0.0 <18.0.0",
|
|
10
|
+
"@angular/forms": ">=15.0.0 <18.0.0",
|
|
11
|
+
"@angular/platform-browser": ">=15.0.0 <18.0.0",
|
|
12
|
+
"ngx-pagination": "^6.0.3",
|
|
13
|
+
"rxjs": ">=6.5.0 <8.0.0",
|
|
14
|
+
"zone.js": ">=0.11.4 <0.14.0"
|
|
14
15
|
},
|
|
15
16
|
"dependencies": {
|
|
16
17
|
"tslib": "^2.3.0"
|
|
17
18
|
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
18
22
|
"sideEffects": false,
|
|
19
|
-
"module": "
|
|
23
|
+
"module": "fesm2015/ruc-lib-skeleton.mjs",
|
|
24
|
+
"es2020": "fesm2020/ruc-lib-skeleton.mjs",
|
|
25
|
+
"esm2020": "esm2020/ruc-lib-skeleton.mjs",
|
|
26
|
+
"fesm2020": "fesm2020/ruc-lib-skeleton.mjs",
|
|
27
|
+
"fesm2015": "fesm2015/ruc-lib-skeleton.mjs",
|
|
20
28
|
"typings": "index.d.ts",
|
|
21
29
|
"exports": {
|
|
22
30
|
"./package.json": {
|
|
@@ -24,7 +32,11 @@
|
|
|
24
32
|
},
|
|
25
33
|
".": {
|
|
26
34
|
"types": "./index.d.ts",
|
|
27
|
-
"
|
|
35
|
+
"esm2020": "./esm2020/ruc-lib-skeleton.mjs",
|
|
36
|
+
"es2020": "./fesm2020/ruc-lib-skeleton.mjs",
|
|
37
|
+
"es2015": "./fesm2015/ruc-lib-skeleton.mjs",
|
|
38
|
+
"node": "./fesm2015/ruc-lib-skeleton.mjs",
|
|
39
|
+
"default": "./fesm2020/ruc-lib-skeleton.mjs"
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
42
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SkeletonOptions } from '../model/skeletonOptions';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SkeletonService {
|
|
4
|
+
defaultOptions: SkeletonOptions;
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* get options
|
|
8
|
+
* @returns defaultOptions
|
|
9
|
+
*/
|
|
10
|
+
getDefaultOptions(): SkeletonOptions;
|
|
11
|
+
/**
|
|
12
|
+
* set options
|
|
13
|
+
* @param newOptions
|
|
14
|
+
*/
|
|
15
|
+
setDefaultOptions(newOptions: Partial<SkeletonOptions>): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkeletonService>;
|
|
18
|
+
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import * as i3 from '@angular/material/tooltip';
|
|
2
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Input, Component } from '@angular/core';
|
|
5
|
-
import { BehaviorSubject } from 'rxjs';
|
|
6
|
-
import * as i2 from '@angular/common';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
|
|
9
|
-
class SkeletonService {
|
|
10
|
-
// skeletonOptions: SkeletonOptions;
|
|
11
|
-
constructor() {
|
|
12
|
-
this.defaultOptions = {
|
|
13
|
-
shape: 'circle',
|
|
14
|
-
width: "50px",
|
|
15
|
-
height: "50px",
|
|
16
|
-
borderRadius: '',
|
|
17
|
-
class: '',
|
|
18
|
-
tooltip: false,
|
|
19
|
-
tooltipText: '',
|
|
20
|
-
tooltipPosition: 'above',
|
|
21
|
-
isLoader: false,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* get options
|
|
26
|
-
* @returns defaultOptions
|
|
27
|
-
*/
|
|
28
|
-
getDefaultOptions() {
|
|
29
|
-
return { ...this.defaultOptions };
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* set options
|
|
33
|
-
* @param newOptions
|
|
34
|
-
*/
|
|
35
|
-
setDefaultOptions(newOptions) {
|
|
36
|
-
this.defaultOptions = { ...this.defaultOptions, ...newOptions };
|
|
37
|
-
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SkeletonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SkeletonService, providedIn: 'root' }); }
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SkeletonService, decorators: [{
|
|
42
|
-
type: Injectable,
|
|
43
|
-
args: [{
|
|
44
|
-
providedIn: 'root',
|
|
45
|
-
}]
|
|
46
|
-
}], ctorParameters: () => [] });
|
|
47
|
-
|
|
48
|
-
class RuclibSkeletonComponent {
|
|
49
|
-
set rucInputData(value) {
|
|
50
|
-
if (value) {
|
|
51
|
-
//update default value dynamically
|
|
52
|
-
this.skeletonService.setDefaultOptions(value);
|
|
53
|
-
//merge updated defaults with the new input
|
|
54
|
-
const mergedOptions = { ...this.skeletonService.getDefaultOptions(), ...value };
|
|
55
|
-
this.inputDataSubject.next(mergedOptions);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
constructor(skeletonService) {
|
|
59
|
-
this.skeletonService = skeletonService;
|
|
60
|
-
this.divArray = new Array(12);
|
|
61
|
-
this.inputDataSubject = new BehaviorSubject(this.skeletonService.getDefaultOptions());
|
|
62
|
-
this.data$ = this.inputDataSubject.asObservable();
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @param changes
|
|
67
|
-
*/
|
|
68
|
-
ngOnChanges(changes) {
|
|
69
|
-
if (changes['rucInputData'] && !changes['rucInputData'].firstChange) {
|
|
70
|
-
this.inputDataSubject.next(changes['rucInputData'].currentValue);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RuclibSkeletonComponent, deps: [{ token: SkeletonService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RuclibSkeletonComponent, isStandalone: true, selector: "uxp-ruclib-skeleton", inputs: { customTheme: "customTheme", rucInputData: "rucInputData" }, usesOnChanges: true, ngImport: i0, template: "@if (data$ | async; as data) {\r\n <div [class]=\"customTheme ? customTheme : ''\">\r\n <!-- Skeleton Start -->\r\n @if (!data?.isLoader) {\r\n <div class=\"skeleton skeleton-text\"\r\n [class]=\"data.shape\"\r\n [style.width]=\"data?.width\"\r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n }\r\n <!-- Skeleton End -->\r\n <!-- Loader HTML Section start-->\r\n @if (data.isLoader && data.loaderPosition) {\r\n <div>\r\n @if (data.loaderPosition === 'page') {\r\n <div class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n }\r\n @if (data.loaderPosition === 'section') {\r\n <div class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n }\r\n @if (data.loaderPosition === 'inline') {\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n }\r\n @if (data.loaderPosition === 'newline') {\r\n <ng-container class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n @if (data.loaderSpinnerLogoUrl) {\r\n <img class=\"spinner-logo\" alt=\"Logo\">\r\n }\r\n @if (data.loaderCustomText) {\r\n <p class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n }\r\n </ng-template>\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n @if (data.loaderCustomText) {\r\n <p class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n }\r\n </ng-template>\r\n </div>\r\n}\r\n<!-- Loader HTML section end -->\r\n</div>\r\n}\r\n", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-page{position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-section{position:relative;margin:0 auto}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{display:inline-block;position:relative;top:-5px}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
75
|
-
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RuclibSkeletonComponent, decorators: [{
|
|
77
|
-
type: Component,
|
|
78
|
-
args: [{ selector: 'uxp-ruclib-skeleton', imports: [CommonModule, MatTooltipModule], template: "@if (data$ | async; as data) {\r\n <div [class]=\"customTheme ? customTheme : ''\">\r\n <!-- Skeleton Start -->\r\n @if (!data?.isLoader) {\r\n <div class=\"skeleton skeleton-text\"\r\n [class]=\"data.shape\"\r\n [style.width]=\"data?.width\"\r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n }\r\n <!-- Skeleton End -->\r\n <!-- Loader HTML Section start-->\r\n @if (data.isLoader && data.loaderPosition) {\r\n <div>\r\n @if (data.loaderPosition === 'page') {\r\n <div class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n }\r\n @if (data.loaderPosition === 'section') {\r\n <div class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n }\r\n @if (data.loaderPosition === 'inline') {\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n }\r\n @if (data.loaderPosition === 'newline') {\r\n <ng-container class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n @if (data.loaderSpinnerLogoUrl) {\r\n <img class=\"spinner-logo\" alt=\"Logo\">\r\n }\r\n @if (data.loaderCustomText) {\r\n <p class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n }\r\n </ng-template>\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n @if (data.loaderCustomText) {\r\n <p class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n }\r\n </ng-template>\r\n </div>\r\n}\r\n<!-- Loader HTML section end -->\r\n</div>\r\n}\r\n", styles: [".skeletn{background-color:#e0e0e0;border-radius:4px;animation:shimmer 1.5s infinite linear;width:100%;height:20px}.skeletn-text{width:60%;height:16px}.skeletn-logo{width:200px;height:150px;border-radius:8px}.skeletn-card{width:300px;padding:16px;display:flex;flex-direction:column;gap:10px;border:1px solid #ccc;border-radius:8px}.skeletn-text.short{width:40%}.skeletn-button{width:100px;height:40px;border-radius:20px}.rectangle{width:200px;height:100px;border-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.rounded-rectangle{width:200px;height:100px;background-color:#e0e0e0;border-radius:12px;animation:shimmer 1.5s infinite linear}.square{width:100px;height:100px;background-color:#e0e0e0;animation:shimmer 1.5s infinite linear}.circle{width:100px;height:100px;background-color:#e0e0e0;border-radius:50%;animation:shimmer 1.5s infinite linear}.triangle{width:0;height:0;border-left:50px solid transparent;border-right:50px solid transparent;border-bottom:100px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-left{width:0;height:0;border-top:30px solid transparent;border-right:50px solid #e0e0e0;border-bottom:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-right{width:0;height:0;border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:50px solid #e0e0e0;animation:shimmer 1.5s infinite linear}.arrow-up{width:0;height:0;border-right:30px solid transparent;border-bottom:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}.arrow-down{width:0;height:0;border-right:30px solid transparent;border-top:50px solid #e0e0e0;border-left:30px solid transparent;animation:shimmer 1.5s infinite linear}@keyframes shimmer{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}.newline-load{padding-top:5px}@keyframes ruc-spinner{0%{opacity:1}to{opacity:0}}.ruc-load-spinner-page{z-index:99999;color:#8a2be2;display:block;width:120px;height:120px}.ruc-load-spinner-page .spineer-logo{position:relative;width:60px;left:calc(120px * .27);top:calc(120px * .27)}.ruc-load-spinner-page .spinner-text{top:72px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-page div{transform-origin:60px 60px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-60px}.ruc-load-spinner-page div:after{content:\" \";display:block;position:absolute;top:1.2px;left:36px;width:6px;height:18px;border-radius:20%;background:0}.ruc-load-spinner-page{position:absolute;top:max(30%,200px);left:calc(50% - 60px)}.ruc-load-spinner-section{z-index:99999;color:#8a2be2;display:block;width:90px;height:90px}.ruc-load-spinner-section .spineer-logo{position:relative;width:45px;left:24.3px;top:24.3px}.ruc-load-spinner-section .spinner-text{top:54px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-section div{transform-origin:45px 45px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-45px}.ruc-load-spinner-section div:after{content:\" \";display:block;position:absolute;top:.9px;left:27px;width:4.5px;height:13.5px;border-radius:20%;background:0}.ruc-load-spinner-section{position:relative;margin:0 auto}.ruc-load-spinner-small-inline{z-index:99999;color:#8a2be2;display:block;width:30px;height:30px}.ruc-load-spinner-small-inline .spineer-logo{position:relative;width:15px;left:calc(30px * .27);top:calc(30px * .27)}.ruc-load-spinner-small-inline .spinner-text{top:18px;position:relative;text-align:center;white-space:nowrap}.ruc-load-spinner-small-inline div{transform-origin:15px 15px;animation:ruc-spinner 1.2s linear infinite;position:relative;top:-15px}.ruc-load-spinner-small-inline div:after{content:\" \";display:block;position:absolute;top:.3px;left:9px;width:1.5px;height:4.5px;border-radius:20%;background:0}.ruc-load-spinner-small-inline{display:inline-block;position:relative;top:-5px}.ruc-spinner-text-inline{display:inline-block;vertical-align:sub;margin-left:10px;font-size:12px}@media (max-width: 768px){.spinner-text,.ruc-spinner-text-inline{font-size:12px}}.loader{width:48px;height:48px;border:5px dotted #3f51b5;border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;animation:rotation 2s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
79
|
-
}], ctorParameters: () => [{ type: SkeletonService }], propDecorators: { customTheme: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], rucInputData: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}] } });
|
|
84
|
-
|
|
85
|
-
class SkeletonOptions {
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Generated bundle index. Do not edit.
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
export { RuclibSkeletonComponent, SkeletonOptions, SkeletonService };
|
|
93
|
-
//# sourceMappingURL=ruc-lib-skeleton.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ruc-lib-skeleton.mjs","sources":["../../src/services/skeleton.service.ts","../../src/lib/ruclib-skeleton/ruclib-skeleton.component.ts","../../src/lib/ruclib-skeleton/ruclib-skeleton.component.html","../../src/model/skeletonOptions.ts","../../src/ruc-lib-skeleton.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { SkeletonOptions } from '../model/skeletonOptions';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SkeletonService {\r\n defaultOptions: SkeletonOptions;\r\n\r\n // skeletonOptions: SkeletonOptions;\r\n\r\n constructor() {\r\n this.defaultOptions = {\r\n shape: 'circle',\r\n width: \"50px\",\r\n height: \"50px\",\r\n borderRadius: '',\r\n class: '',\r\n tooltip: false,\r\n tooltipText : '',\r\n tooltipPosition: 'above',\r\n isLoader: false,\r\n }\r\n }\r\n\r\n /**\r\n * get options\r\n * @returns defaultOptions\r\n */\r\n getDefaultOptions(): SkeletonOptions{\r\n return {...this.defaultOptions};\r\n }\r\n\r\n /**\r\n * set options\r\n * @param newOptions\r\n */\r\n setDefaultOptions(newOptions: Partial<SkeletonOptions>): void{\r\n this.defaultOptions ={...this.defaultOptions, ...newOptions};\r\n\r\n }\r\n}\r\n","import { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\r\nimport {SkeletonOptions} from '../../model/skeletonOptions';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { SkeletonService } from '../../services/skeleton.service';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'uxp-ruclib-skeleton',\r\n imports: [CommonModule, MatTooltipModule],\r\n templateUrl: './ruclib-skeleton.component.html',\r\n styleUrl: './ruclib-skeleton.component.scss'\r\n})\r\nexport class RuclibSkeletonComponent implements OnChanges {\r\n\r\n\r\n @Input() customTheme!: string;\r\n divArray = new Array(12);\r\n\r\n\r\n @Input() set rucInputData(value:Partial<SkeletonOptions>){\r\n if(value){\r\n //update default value dynamically\r\n this.skeletonService.setDefaultOptions(value);\r\n\r\n //merge updated defaults with the new input\r\n const mergedOptions = { ...this.skeletonService.getDefaultOptions(), ...value }\r\n this.inputDataSubject.next(mergedOptions);\r\n }\r\n }\r\n\r\n private inputDataSubject = new BehaviorSubject<SkeletonOptions>(this.skeletonService.getDefaultOptions());\r\n data$ = this.inputDataSubject.asObservable();\r\n\r\n\r\n constructor(public skeletonService:SkeletonService){ }\r\n\r\n /**\r\n *\r\n * @param changes\r\n */\r\n ngOnChanges(changes: SimpleChanges){\r\n if(changes['rucInputData'] && !changes['rucInputData'].firstChange){\r\n this.inputDataSubject.next(changes['rucInputData'].currentValue);\r\n }\r\n }\r\n\r\n}\r\n\r\n","@if (data$ | async; as data) {\r\n <div [class]=\"customTheme ? customTheme : ''\">\r\n <!-- Skeleton Start -->\r\n @if (!data?.isLoader) {\r\n <div class=\"skeleton skeleton-text\"\r\n [class]=\"data.shape\"\r\n [style.width]=\"data?.width\"\r\n [style.height]=\"data?.height\"\r\n [style.borderRadius]=\"data?.borderRadius\"\r\n [ngClass]=\"data?.class\"\r\n [matTooltip]=\"data.tooltipText ?? ''\"\r\n [matTooltipPosition]=\"data.tooltipPosition ?? 'above'\"\r\n ></div>\r\n }\r\n <!-- Skeleton End -->\r\n <!-- Loader HTML Section start-->\r\n @if (data.isLoader && data.loaderPosition) {\r\n <div>\r\n @if (data.loaderPosition === 'page') {\r\n <div class=\"ruc-loading ruc-load-spinner-page\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n }\r\n @if (data.loaderPosition === 'section') {\r\n <div class=\"ruc-loading ruc-load-spinner-section\">\r\n <ng-container *ngTemplateOutlet=\"pageRef; context: this\"></ng-container>\r\n </div>\r\n }\r\n @if (data.loaderPosition === 'inline') {\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n }\r\n @if (data.loaderPosition === 'newline') {\r\n <ng-container class=\"newline-load\">\r\n <ng-container *ngTemplateOutlet=\"inlineRef; context: this\"></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #pageRef>\r\n <!-- use in loop -->\r\n <!-- <div *ngFor=\"let _ of divArray\">\r\n </div> -->\r\n <div class=\"loader\"></div>\r\n @if (data.loaderSpinnerLogoUrl) {\r\n <img class=\"spinner-logo\" alt=\"Logo\">\r\n }\r\n @if (data.loaderCustomText) {\r\n <p class=\"spinner-text\">{{data.loaderCustomText}}...</p>\r\n }\r\n </ng-template>\r\n <ng-template #inlineRef>\r\n <div class=\"loader\"></div>\r\n <!-- <div class=\"ruc-loading ruc-load-spinner-small-inline\">\r\n <img class=\"spinner-logo\" *ngIf=\"data.loaderSpinnerLogoUrl\" alt=\"Logo\">\r\n <div *ngFor=\"let _ of divArray\">\r\n </div>\r\n </div> -->\r\n @if (data.loaderCustomText) {\r\n <p class=\"ruc-spinner-text-inline\">{{data.loaderCustomText}}...</p>\r\n }\r\n </ng-template>\r\n </div>\r\n}\r\n<!-- Loader HTML section end -->\r\n</div>\r\n}\r\n","export class SkeletonOptions{\r\n // rectangle , rounded-rectangle, square, circle, \r\n// triangle, arrow-left, arrow-right, arrow-up, arrow-down\r\n shape? : any; //text, rectangle, rounded, Square, Circle, Triangle, left Arrow, right , up and down arrow, loader\r\n width?: any; //To set the width of skeleton not applicable to loader\r\n height?: any; //To set the height of skeleton not applicable to loader\r\n borderRadius?: any; //To set the borderRadius of skeleton not applicable to loader\r\n class?: any; //To set a custom class of skeleton not applicable to loader\r\n tooltip?: boolean; //To set a tooltip of skeleton not applicable to loader\r\n tooltipText? : string; //To set a tooltip text of skeleton not applicable to loader\r\n tooltipPosition?: 'above' | 'below' | 'left' | 'right';\r\n isLoader?: boolean; // true , fasle when loader is selected\r\n loaderPosition?: string //'page' | 'section' | 'inline' | 'newline'; // loader position\r\n loaderCustomText?: string; // loader custom text\r\n loaderSpinnerLogoUrl?: string; // loader image if user want\r\n}\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SkeletonService"],"mappings":";;;;;;;;MAMa,eAAe,CAAA;;AAKxB,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,cAAc,GAAG;AACpB,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,YAAY,EAAE,EAAE;AAChB,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,WAAW,EAAG,EAAE;AAChB,YAAA,eAAe,EAAE,OAAO;AACxB,YAAA,QAAQ,EAAE,KAAK;SAChB;IACH;AAEA;;;AAGG;IACH,iBAAiB,GAAA;AACf,QAAA,OAAO,EAAC,GAAG,IAAI,CAAC,cAAc,EAAC;IACjC;AAEA;;;AAGG;AACH,IAAA,iBAAiB,CAAC,UAAoC,EAAA;AACpD,QAAA,IAAI,CAAC,cAAc,GAAE,EAAC,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,UAAU,EAAC;IAE9D;8GAlCS,e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