@stemy/ngx-utils 19.9.52 → 19.9.54
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/fesm2022/stemy-ngx-utils.mjs +9 -6
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +1 -1
- package/ngx-utils/directives/pagination.directive.d.ts +1 -1
- package/ngx-utils/ngx-utils.imports.d.ts +2 -2
- package/package.json +1 -1
|
@@ -725,7 +725,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
725
725
|
}] }, { type: i1.DeviceDetectorService }] });
|
|
726
726
|
|
|
727
727
|
const emptySnapshot = new ActivatedRouteSnapshot();
|
|
728
|
-
const emptyData = { id: "" };
|
|
728
|
+
const emptyData$1 = { id: "" };
|
|
729
729
|
const emptyParams = {};
|
|
730
730
|
const emptySegments = [];
|
|
731
731
|
const emptyComponents = [];
|
|
@@ -747,7 +747,7 @@ class StateService {
|
|
|
747
747
|
return this.snapshot.routeConfig;
|
|
748
748
|
}
|
|
749
749
|
get data() {
|
|
750
|
-
return this.snapshot.data || emptyData;
|
|
750
|
+
return this.snapshot.data || emptyData$1;
|
|
751
751
|
}
|
|
752
752
|
get params() {
|
|
753
753
|
return this.snapshot.params || emptyParams;
|
|
@@ -7317,12 +7317,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
7317
7317
|
type: Input
|
|
7318
7318
|
}] } });
|
|
7319
7319
|
|
|
7320
|
+
const emptyData = [];
|
|
7320
7321
|
class PaginationDirective {
|
|
7321
7322
|
get total() {
|
|
7322
7323
|
return this.data ? this.data.total : 0;
|
|
7323
7324
|
}
|
|
7324
7325
|
get items() {
|
|
7325
|
-
return this.data ? this.data.items :
|
|
7326
|
+
return this.data ? this.data.items : emptyData;
|
|
7326
7327
|
}
|
|
7327
7328
|
constructor(zone, renderer, element) {
|
|
7328
7329
|
this.zone = zone;
|
|
@@ -7342,8 +7343,10 @@ class PaginationDirective {
|
|
|
7342
7343
|
this.refresh();
|
|
7343
7344
|
}
|
|
7344
7345
|
refresh(time) {
|
|
7345
|
-
this.renderer.addClass(this.element.nativeElement, "loading");
|
|
7346
7346
|
time = isNaN(time) || time <= 0 ? this.updateTime : time;
|
|
7347
|
+
this.renderer.addClass(this.element.nativeElement, "loading");
|
|
7348
|
+
this.data = null;
|
|
7349
|
+
this.onRefresh.emit();
|
|
7347
7350
|
this.updateTimer.time = isNaN(time) || time <= 0 ? 350 : time;
|
|
7348
7351
|
Promise.resolve(this.waitFor).then(() => {
|
|
7349
7352
|
this.updateTimer.run();
|
|
@@ -10625,11 +10628,11 @@ class UnorderedListComponent {
|
|
|
10625
10628
|
this.cdr.detectChanges();
|
|
10626
10629
|
}
|
|
10627
10630
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: UnorderedListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10628
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: UnorderedListComponent, isStandalone: false, selector: "unordered-list", inputs: { data: "data", keyPrefix: "keyPrefix", key: "key", listStyle: "listStyle", path: "path", level: "level", templates: "templates" }, queries: [{ propertyName: "templateDirectives", predicate: UnorderedListTemplateDirective }], viewQueries: [{ propertyName: "defaultKeyTemplate", first: true, predicate: ["defaultKeyTemplate"], descendants: true }, { propertyName: "defaultValueTemplate", first: true, predicate: ["defaultValueTemplate"], descendants: true }, { propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" #defaultKeyTemplate>\r\n <label>{{ (keyPrefix ? keyPrefix + key : key) | translate }}:</label>\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"key\" let-item=\"item\" let-path=\"path\"\r\n let-templates=\"templates\" let-type=\"valueType\"
|
|
10631
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: UnorderedListComponent, isStandalone: false, selector: "unordered-list", inputs: { data: "data", keyPrefix: "keyPrefix", key: "key", listStyle: "listStyle", path: "path", level: "level", templates: "templates" }, queries: [{ propertyName: "templateDirectives", predicate: UnorderedListTemplateDirective }], viewQueries: [{ propertyName: "defaultKeyTemplate", first: true, predicate: ["defaultKeyTemplate"], descendants: true }, { propertyName: "defaultValueTemplate", first: true, predicate: ["defaultValueTemplate"], descendants: true }, { propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" #defaultKeyTemplate>\r\n <label>{{ (keyPrefix ? keyPrefix + key : key) | translate }}:</label>\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"key\" let-item=\"item\" let-path=\"path\"\r\n let-templates=\"templates\" let-type=\"valueType\" #defaultValueTemplate>\r\n @if (type === 'enum') {\r\n @let enumKey = key || item.key;\r\n <span [ngClass]=\"`list-enum enum-${enumKey} enum-value-${item.value}`\">\r\n <span>{{ `${enumKey}.${item.value}` | translate }}</span>\r\n </span>\r\n }\r\n @else if (type === 'object' || type === 'array') {\r\n <unordered-list [data]=\"item.value\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [key]=\"item.key\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level + 1\"\r\n [templates]=\"templates\"></unordered-list>\r\n } @else {\r\n <span [innerHTML]=\"item.value\"></span>\r\n }\r\n</ng-template>\r\n<ng-template let-item=\"item\" let-data=\"data\" let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-path=\"path\" let-level=\"level\" let-templates=\"templates\" #defaultItemTemplate>\r\n <ng-template #itemKey>\r\n <ng-container type=\"key\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [key]=\"key\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-template #itemValue>\r\n <ng-container type=\"value\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [key]=\"key\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"!isArray\">\r\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\r\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\r\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #value>\r\n <span [innerHTML]=\"data\"></span>\r\n</ng-template>\r\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\r\n <ul [ngClass]=\"[level === 0 ? 'unordered-list' : '', 'level-' + level]\" *ngSwitchCase=\"'list'\">\r\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container type=\"item\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </li>\r\n </ul>\r\n <table [ngClass]=\"[level === 0 ? 'unordered-list' : '', 'level-' + level]\" *ngSwitchDefault>\r\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container type=\"item\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </tr>\r\n </table>\r\n</ng-container>\r\n", styles: [".unordered-list *{box-sizing:border-box}.unordered-list li{display:flex;gap:6px;align-items:center}.unordered-list li>label{font-weight:700;display:inline-block;margin:0}.list-enum{--enum-color: #c6c6c6;--enum-radius: 5px}.list-enum span{display:inline-block;padding:2px 5px;background:color-mix(in srgb,var(--enum-color),rgba(255,255,255,.4666666667) 50%);color:color-mix(in srgb,var(--enum-color),#000 70%);border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: UnorderedListItemDirective, selector: "[unorderedListItem]", inputs: ["unorderedListItem", "type", "data", "keyPrefix", "key", "listStyle", "path", "level", "templates", "defaultTemplates"] }, { kind: "component", type: UnorderedListComponent, selector: "unordered-list", inputs: ["data", "keyPrefix", "key", "listStyle", "path", "level", "templates"] }, { kind: "pipe", type: EntriesPipe, name: "entries" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
10629
10632
|
}
|
|
10630
10633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: UnorderedListComponent, decorators: [{
|
|
10631
10634
|
type: Component,
|
|
10632
|
-
args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" #defaultKeyTemplate>\r\n <label>{{ (keyPrefix ? keyPrefix + key : key) | translate }}:</label>\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"key\" let-item=\"item\" let-path=\"path\"\r\n let-templates=\"templates\" let-type=\"valueType\"
|
|
10635
|
+
args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" #defaultKeyTemplate>\r\n <label>{{ (keyPrefix ? keyPrefix + key : key) | translate }}:</label>\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"key\" let-item=\"item\" let-path=\"path\"\r\n let-templates=\"templates\" let-type=\"valueType\" #defaultValueTemplate>\r\n @if (type === 'enum') {\r\n @let enumKey = key || item.key;\r\n <span [ngClass]=\"`list-enum enum-${enumKey} enum-value-${item.value}`\">\r\n <span>{{ `${enumKey}.${item.value}` | translate }}</span>\r\n </span>\r\n }\r\n @else if (type === 'object' || type === 'array') {\r\n <unordered-list [data]=\"item.value\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [key]=\"item.key\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level + 1\"\r\n [templates]=\"templates\"></unordered-list>\r\n } @else {\r\n <span [innerHTML]=\"item.value\"></span>\r\n }\r\n</ng-template>\r\n<ng-template let-item=\"item\" let-data=\"data\" let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-path=\"path\" let-level=\"level\" let-templates=\"templates\" #defaultItemTemplate>\r\n <ng-template #itemKey>\r\n <ng-container type=\"key\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [key]=\"key\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-template #itemValue>\r\n <ng-container type=\"value\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [key]=\"key\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"!isArray\">\r\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\r\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\r\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #value>\r\n <span [innerHTML]=\"data\"></span>\r\n</ng-template>\r\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\r\n <ul [ngClass]=\"[level === 0 ? 'unordered-list' : '', 'level-' + level]\" *ngSwitchCase=\"'list'\">\r\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container type=\"item\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </li>\r\n </ul>\r\n <table [ngClass]=\"[level === 0 ? 'unordered-list' : '', 'level-' + level]\" *ngSwitchDefault>\r\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container type=\"item\"\r\n [unorderedListItem]=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </tr>\r\n </table>\r\n</ng-container>\r\n", styles: [".unordered-list *{box-sizing:border-box}.unordered-list li{display:flex;gap:6px;align-items:center}.unordered-list li>label{font-weight:700;display:inline-block;margin:0}.list-enum{--enum-color: #c6c6c6;--enum-radius: 5px}.list-enum span{display:inline-block;padding:2px 5px;background:color-mix(in srgb,var(--enum-color),rgba(255,255,255,.4666666667) 50%);color:color-mix(in srgb,var(--enum-color),#000 70%);border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none}\n"] }]
|
|
10633
10636
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { data: [{
|
|
10634
10637
|
type: Input
|
|
10635
10638
|
}], keyPrefix: [{
|