@stemy/ngx-utils 19.0.12 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/stemy-ngx-utils.mjs +176 -65
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +7 -4
- package/ngx-utils/components/drop-list/drop-list.component.d.ts +34 -0
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +4 -5
- package/ngx-utils/ngx-utils.imports.d.ts +2 -1
- package/ngx-utils/ngx-utils.module.d.ts +7 -6
- package/ngx-utils/utils/misc.d.ts +1 -0
- package/package.json +1 -1
- package/public_api.d.ts +4 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, Directive, Input, Output, HostBinding, HostListener, Component,
|
|
2
|
+
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, Directive, Input, Output, HostBinding, HostListener, forwardRef, Component, ViewEncapsulation, ContentChild, ViewChild, ContentChildren, APP_INITIALIZER, makeEnvironmentProviders, NgModule } from '@angular/core';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import * as i2 from '@angular/router';
|
|
5
5
|
import { ActivatedRouteSnapshot, Scroll, NavigationEnd, DefaultUrlSerializer, UrlTree, UrlSegmentGroup, UrlSegment, UrlSerializer } from '@angular/router';
|
|
@@ -18,7 +18,7 @@ import * as i1$2 from '@angular/platform-browser';
|
|
|
18
18
|
import { ɵDomEventsPlugin as _DomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
19
19
|
import elementResizeDetectorMaker from 'element-resize-detector';
|
|
20
20
|
import * as i2$1 from '@angular/forms';
|
|
21
|
-
import { FormsModule } from '@angular/forms';
|
|
21
|
+
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
22
22
|
|
|
23
23
|
function defaultPredicate(value, key, target, source) {
|
|
24
24
|
return true;
|
|
@@ -1932,6 +1932,26 @@ class MathUtils {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
1934
|
|
|
1935
|
+
function checkTransitions(el, cb) {
|
|
1936
|
+
let hasTransitions = false;
|
|
1937
|
+
let called = false;
|
|
1938
|
+
const end = () => {
|
|
1939
|
+
if (called)
|
|
1940
|
+
return;
|
|
1941
|
+
called = true;
|
|
1942
|
+
cb();
|
|
1943
|
+
};
|
|
1944
|
+
el.onanimationstart = () => hasTransitions = true;
|
|
1945
|
+
el.ontransitionstart = () => hasTransitions = true;
|
|
1946
|
+
el.onanimationend = end;
|
|
1947
|
+
el.ontransitionend = end;
|
|
1948
|
+
setTimeout(() => {
|
|
1949
|
+
if (hasTransitions)
|
|
1950
|
+
return;
|
|
1951
|
+
end();
|
|
1952
|
+
}, 100);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1935
1955
|
class TimerUtils {
|
|
1936
1956
|
static createTimeout(func, time) {
|
|
1937
1957
|
// @dynamic
|
|
@@ -5351,61 +5371,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
5351
5371
|
type: Input
|
|
5352
5372
|
}] } });
|
|
5353
5373
|
|
|
5354
|
-
class
|
|
5374
|
+
class DropListComponent {
|
|
5355
5375
|
constructor(cdr) {
|
|
5356
5376
|
this.cdr = cdr;
|
|
5357
|
-
this.
|
|
5358
|
-
this.
|
|
5359
|
-
this.
|
|
5360
|
-
this.
|
|
5377
|
+
this.disabled = false;
|
|
5378
|
+
this.unique = false;
|
|
5379
|
+
this.idField = "id";
|
|
5380
|
+
this.labelField = "label";
|
|
5381
|
+
this.value = [];
|
|
5382
|
+
this.valueMap = {};
|
|
5383
|
+
this.remove = id => {
|
|
5384
|
+
this.changeValue(this.value.filter(t => t !== id));
|
|
5385
|
+
};
|
|
5386
|
+
}
|
|
5387
|
+
onDragEnter(ev, elem, data) {
|
|
5388
|
+
if (!elem || !ObjectUtils.isFunction(this.checkFn) || !this.checkFn({ ev, elem, data })) {
|
|
5389
|
+
ev.dataTransfer.effectAllowed = "none";
|
|
5390
|
+
ev.dataTransfer.dropEffect = "none";
|
|
5391
|
+
return;
|
|
5392
|
+
}
|
|
5393
|
+
ev.dataTransfer.effectAllowed = "move";
|
|
5394
|
+
ev.dataTransfer.dropEffect = "move";
|
|
5395
|
+
elem.classList.add("drop-allowed");
|
|
5396
|
+
}
|
|
5397
|
+
onDragLeave(ev, elem) {
|
|
5398
|
+
ev.dataTransfer.effectAllowed = "none";
|
|
5399
|
+
ev.dataTransfer.dropEffect = "none";
|
|
5400
|
+
elem.classList.remove("drop-allowed");
|
|
5401
|
+
}
|
|
5402
|
+
onDrop(ev, elem) {
|
|
5403
|
+
ev.preventDefault();
|
|
5404
|
+
ev.stopPropagation();
|
|
5405
|
+
if (!elem) {
|
|
5406
|
+
return;
|
|
5407
|
+
}
|
|
5408
|
+
const source = JSON.parse(ev.dataTransfer.getData("itemData"));
|
|
5409
|
+
elem.classList.remove("drop-allowed");
|
|
5410
|
+
checkTransitions(elem, () => {
|
|
5411
|
+
checkTransitions(elem, () => {
|
|
5412
|
+
const id = source[this.idField] || source.id;
|
|
5413
|
+
this.changeValue(this.value.concat([id]));
|
|
5414
|
+
});
|
|
5415
|
+
elem.classList.remove("dropped");
|
|
5416
|
+
});
|
|
5417
|
+
elem.classList.add("dropped");
|
|
5361
5418
|
}
|
|
5362
5419
|
ngOnChanges(changes) {
|
|
5363
|
-
|
|
5364
|
-
|
|
5420
|
+
if (changes.context || changes.idField) {
|
|
5421
|
+
this.valueMap = this.context?.reduce((res, item) => {
|
|
5422
|
+
// In case this is a dynamic form option which stores real value under props
|
|
5423
|
+
item = Object.assign({}, item, item.props || {});
|
|
5424
|
+
const id = item[this.idField] || item.id;
|
|
5425
|
+
res[id] = item;
|
|
5426
|
+
return res;
|
|
5427
|
+
}, {}) || {};
|
|
5428
|
+
this.cdr.detectChanges();
|
|
5429
|
+
}
|
|
5365
5430
|
}
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
this.templates = this.templates ? this.templates.concat(templates) : templates;
|
|
5369
|
-
this.cdr.detectChanges();
|
|
5431
|
+
registerOnChange(fn) {
|
|
5432
|
+
this.onChange = fn;
|
|
5370
5433
|
}
|
|
5371
|
-
|
|
5372
|
-
this.
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5434
|
+
registerOnTouched(fn) {
|
|
5435
|
+
this.onTouched = fn;
|
|
5436
|
+
}
|
|
5437
|
+
setDisabledState(val) {
|
|
5438
|
+
this.disabled = val === true;
|
|
5439
|
+
this.cdr.markForCheck();
|
|
5440
|
+
}
|
|
5441
|
+
writeValue(obj) {
|
|
5442
|
+
this.value = Array.isArray(obj) ? obj : this.value;
|
|
5377
5443
|
this.cdr.detectChanges();
|
|
5378
5444
|
}
|
|
5379
|
-
|
|
5380
|
-
|
|
5445
|
+
changeValue(value) {
|
|
5446
|
+
this.value = this.unique ? ArrayUtils.unique(value) : value;
|
|
5447
|
+
this.onChange?.(value);
|
|
5448
|
+
this.onTouched?.();
|
|
5449
|
+
}
|
|
5450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DropListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5451
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DropListComponent, isStandalone: false, selector: "drop-list", inputs: { disabled: "disabled", unique: "unique", idField: "idField", labelField: "labelField", value: "value", context: "context", checkFn: "checkFn" }, providers: [{
|
|
5452
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5453
|
+
useExisting: forwardRef(() => DropListComponent),
|
|
5454
|
+
multi: true,
|
|
5455
|
+
}], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template #defaultTemplate let-item=\"item\">\n <div class=\"drop-list-item-label\">\n {{ item | getValue:labelField }}\n </div>\n</ng-template>\n<div class=\"drop-list\"\n #list\n (dragenter)=\"onDragEnter($event, list, this)\"\n (dragleave)=\"onDragLeave($event, list)\"\n (drop)=\"onDrop($event, list)\">\n <ng-container *ngFor=\"let id of value\">\n <div class=\"drop-list-item\">\n <ng-template #noItemTemplate>\n <div class=\"drop-list-item-label just-id\">\n {{ id }}\n </div>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"itemTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{item: valueMap[id], id: id, remove: remove}\"\n *ngIf=\"valueMap[id]; else noItemTemplate\"></ng-container>\n <div class=\"drop-list-item-delete\" (click)=\"remove(id)\">x</div>\n </div>\n </ng-container>\n</div>\n", styles: [".drop-list{min-height:100px;border:2px #bfbfbf dashed;border-radius:10px;padding:10px;display:flex;align-items:flex-start;justify-content:left;gap:10px;background-color:#0000000d;transition:.2s;flex-wrap:wrap}.drop-list.drop-allowed{background-color:#00000080;border-color:#a9a9a9}.drop-list .drop-list-item{position:relative;background:#0003;padding:7px 23px 7px 10px;border-radius:5px;-webkit-user-select:none;user-select:none}.drop-list .drop-list-item-label:not(.just-id){min-width:50px;text-align:center}.drop-list .drop-list-item-label.just-id{max-width:100px;overflow:hidden;text-overflow:ellipsis;color:gray}.drop-list .drop-list-item-delete{font-size:14px;line-height:14px;text-align:center;cursor:pointer;background:#fff;border-radius:2px;height:14px;width:15px;position:absolute;top:4px;right:4px}\n"], dependencies: [{ 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: "pipe", type: GetValuePipe, name: "getValue" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
5381
5456
|
}
|
|
5382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
|
5457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DropListComponent, decorators: [{
|
|
5383
5458
|
type: Component,
|
|
5384
|
-
args: [{ standalone: false,
|
|
5385
|
-
|
|
5459
|
+
args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "drop-list", providers: [{
|
|
5460
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5461
|
+
useExisting: forwardRef(() => DropListComponent),
|
|
5462
|
+
multi: true,
|
|
5463
|
+
}], template: "<ng-template #defaultTemplate let-item=\"item\">\n <div class=\"drop-list-item-label\">\n {{ item | getValue:labelField }}\n </div>\n</ng-template>\n<div class=\"drop-list\"\n #list\n (dragenter)=\"onDragEnter($event, list, this)\"\n (dragleave)=\"onDragLeave($event, list)\"\n (drop)=\"onDrop($event, list)\">\n <ng-container *ngFor=\"let id of value\">\n <div class=\"drop-list-item\">\n <ng-template #noItemTemplate>\n <div class=\"drop-list-item-label just-id\">\n {{ id }}\n </div>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"itemTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{item: valueMap[id], id: id, remove: remove}\"\n *ngIf=\"valueMap[id]; else noItemTemplate\"></ng-container>\n <div class=\"drop-list-item-delete\" (click)=\"remove(id)\">x</div>\n </div>\n </ng-container>\n</div>\n", styles: [".drop-list{min-height:100px;border:2px #bfbfbf dashed;border-radius:10px;padding:10px;display:flex;align-items:flex-start;justify-content:left;gap:10px;background-color:#0000000d;transition:.2s;flex-wrap:wrap}.drop-list.drop-allowed{background-color:#00000080;border-color:#a9a9a9}.drop-list .drop-list-item{position:relative;background:#0003;padding:7px 23px 7px 10px;border-radius:5px;-webkit-user-select:none;user-select:none}.drop-list .drop-list-item-label:not(.just-id){min-width:50px;text-align:center}.drop-list .drop-list-item-label.just-id{max-width:100px;overflow:hidden;text-overflow:ellipsis;color:gray}.drop-list .drop-list-item-delete{font-size:14px;line-height:14px;text-align:center;cursor:pointer;background:#fff;border-radius:2px;height:14px;width:15px;position:absolute;top:4px;right:4px}\n"] }]
|
|
5464
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
|
|
5386
5465
|
type: Input
|
|
5387
|
-
}],
|
|
5466
|
+
}], unique: [{
|
|
5388
5467
|
type: Input
|
|
5389
|
-
}],
|
|
5468
|
+
}], idField: [{
|
|
5390
5469
|
type: Input
|
|
5391
|
-
}],
|
|
5470
|
+
}], labelField: [{
|
|
5392
5471
|
type: Input
|
|
5393
|
-
}],
|
|
5472
|
+
}], value: [{
|
|
5394
5473
|
type: Input
|
|
5395
|
-
}],
|
|
5474
|
+
}], context: [{
|
|
5396
5475
|
type: Input
|
|
5397
|
-
}],
|
|
5398
|
-
type:
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
args: ["defaultKeyTemplate"]
|
|
5403
|
-
}], defaultValueTemplate: [{
|
|
5404
|
-
type: ViewChild,
|
|
5405
|
-
args: ["defaultValueTemplate"]
|
|
5406
|
-
}], defaultItemTemplate: [{
|
|
5407
|
-
type: ViewChild,
|
|
5408
|
-
args: ["defaultItemTemplate"]
|
|
5476
|
+
}], checkFn: [{
|
|
5477
|
+
type: Input
|
|
5478
|
+
}], itemTemplate: [{
|
|
5479
|
+
type: ContentChild,
|
|
5480
|
+
args: ["itemTemplate"]
|
|
5409
5481
|
}] } });
|
|
5410
5482
|
|
|
5411
5483
|
class PaginationMenuComponent {
|
|
@@ -5606,8 +5678,8 @@ class DynamicTableComponent {
|
|
|
5606
5678
|
}
|
|
5607
5679
|
const source = JSON.parse(ev.dataTransfer.getData("itemData"));
|
|
5608
5680
|
elem.classList.remove("drop-allowed");
|
|
5609
|
-
|
|
5610
|
-
|
|
5681
|
+
checkTransitions(elem, () => {
|
|
5682
|
+
checkTransitions(elem, () => {
|
|
5611
5683
|
this.dropFn({ ev, elem, item, source });
|
|
5612
5684
|
});
|
|
5613
5685
|
elem.classList.remove("dropped");
|
|
@@ -5643,25 +5715,6 @@ class DynamicTableComponent {
|
|
|
5643
5715
|
}
|
|
5644
5716
|
this.refresh(this.filterTime ?? 300);
|
|
5645
5717
|
}
|
|
5646
|
-
checkTransitions(el, cb) {
|
|
5647
|
-
let hasTransitions = false;
|
|
5648
|
-
let called = false;
|
|
5649
|
-
const end = () => {
|
|
5650
|
-
if (called)
|
|
5651
|
-
return;
|
|
5652
|
-
called = true;
|
|
5653
|
-
cb();
|
|
5654
|
-
};
|
|
5655
|
-
el.onanimationstart = () => hasTransitions = true;
|
|
5656
|
-
el.ontransitionstart = () => hasTransitions = true;
|
|
5657
|
-
el.onanimationend = end;
|
|
5658
|
-
el.ontransitionend = end;
|
|
5659
|
-
setTimeout(() => {
|
|
5660
|
-
if (hasTransitions)
|
|
5661
|
-
return;
|
|
5662
|
-
end();
|
|
5663
|
-
}, 100);
|
|
5664
|
-
}
|
|
5665
5718
|
loadLocalData(page, rowsPerPage, orderBy, orderDescending, filter) {
|
|
5666
5719
|
if (!this.data) {
|
|
5667
5720
|
return Promise.resolve({
|
|
@@ -5771,6 +5824,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
5771
5824
|
args: [DynamicTableTemplateDirective]
|
|
5772
5825
|
}] } });
|
|
5773
5826
|
|
|
5827
|
+
class UnorderedListComponent {
|
|
5828
|
+
constructor(cdr) {
|
|
5829
|
+
this.cdr = cdr;
|
|
5830
|
+
this.keyPrefix = "";
|
|
5831
|
+
this.listStyle = "table";
|
|
5832
|
+
this.path = "";
|
|
5833
|
+
this.level = 0;
|
|
5834
|
+
}
|
|
5835
|
+
ngOnChanges(changes) {
|
|
5836
|
+
this.isArray = ObjectUtils.isArray(this.data);
|
|
5837
|
+
this.isObject = ObjectUtils.isObject(this.data);
|
|
5838
|
+
}
|
|
5839
|
+
ngAfterContentInit() {
|
|
5840
|
+
const templates = this.templateDirectives.toArray();
|
|
5841
|
+
this.templates = this.templates ? this.templates.concat(templates) : templates;
|
|
5842
|
+
this.cdr.detectChanges();
|
|
5843
|
+
}
|
|
5844
|
+
ngAfterViewInit() {
|
|
5845
|
+
this.defaultTemplates = {
|
|
5846
|
+
key: this.defaultKeyTemplate,
|
|
5847
|
+
value: this.defaultValueTemplate,
|
|
5848
|
+
item: this.defaultItemTemplate
|
|
5849
|
+
};
|
|
5850
|
+
this.cdr.detectChanges();
|
|
5851
|
+
}
|
|
5852
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UnorderedListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5853
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: UnorderedListComponent, isStandalone: false, selector: "unordered-list", inputs: { data: "data", keyPrefix: "keyPrefix", 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\" let-isArray=\"isArray\" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-val=\"item.value\" let-path=\"path\"\r\n let-templates=\"templates\" let-isObject=\"valueIsObject\" let-isArray=\"valueIsArray\" #defaultValueTemplate>\r\n <ng-template #value>\r\n <span [innerHTML]=\"val\"></span>\r\n </ng-template>\r\n <unordered-list [data]=\"val\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level + 1\"\r\n [templates]=\"templates\"\r\n *ngIf=\"(isObject || isArray); else value\"></unordered-list>\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 [unorderedListItem]=\"item\"\r\n type=\"key\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\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 [unorderedListItem]=\"item\"\r\n type=\"value\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\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-' + level\" *ngSwitchCase=\"'list'\">\r\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"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-' + level\" *ngSwitchDefault>\r\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"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", 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", "listStyle", "path", "level", "templates", "defaultTemplates"] }, { kind: "component", type: UnorderedListComponent, selector: "unordered-list", inputs: ["data", "keyPrefix", "listStyle", "path", "level", "templates"] }, { kind: "pipe", type: EntriesPipe, name: "entries" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
5854
|
+
}
|
|
5855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UnorderedListComponent, decorators: [{
|
|
5856
|
+
type: Component,
|
|
5857
|
+
args: [{ standalone: false, selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" let-isArray=\"isArray\" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-val=\"item.value\" let-path=\"path\"\r\n let-templates=\"templates\" let-isObject=\"valueIsObject\" let-isArray=\"valueIsArray\" #defaultValueTemplate>\r\n <ng-template #value>\r\n <span [innerHTML]=\"val\"></span>\r\n </ng-template>\r\n <unordered-list [data]=\"val\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level + 1\"\r\n [templates]=\"templates\"\r\n *ngIf=\"(isObject || isArray); else value\"></unordered-list>\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 [unorderedListItem]=\"item\"\r\n type=\"key\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\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 [unorderedListItem]=\"item\"\r\n type=\"value\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\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-' + level\" *ngSwitchCase=\"'list'\">\r\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"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-' + level\" *ngSwitchDefault>\r\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"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" }]
|
|
5858
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { data: [{
|
|
5859
|
+
type: Input
|
|
5860
|
+
}], keyPrefix: [{
|
|
5861
|
+
type: Input
|
|
5862
|
+
}], listStyle: [{
|
|
5863
|
+
type: Input
|
|
5864
|
+
}], path: [{
|
|
5865
|
+
type: Input
|
|
5866
|
+
}], level: [{
|
|
5867
|
+
type: Input
|
|
5868
|
+
}], templates: [{
|
|
5869
|
+
type: Input
|
|
5870
|
+
}], templateDirectives: [{
|
|
5871
|
+
type: ContentChildren,
|
|
5872
|
+
args: [UnorderedListTemplateDirective]
|
|
5873
|
+
}], defaultKeyTemplate: [{
|
|
5874
|
+
type: ViewChild,
|
|
5875
|
+
args: ["defaultKeyTemplate"]
|
|
5876
|
+
}], defaultValueTemplate: [{
|
|
5877
|
+
type: ViewChild,
|
|
5878
|
+
args: ["defaultValueTemplate"]
|
|
5879
|
+
}], defaultItemTemplate: [{
|
|
5880
|
+
type: ViewChild,
|
|
5881
|
+
args: ["defaultItemTemplate"]
|
|
5882
|
+
}] } });
|
|
5883
|
+
|
|
5774
5884
|
// --- Pipes ---
|
|
5775
5885
|
const pipes = [
|
|
5776
5886
|
ChunkPipe,
|
|
@@ -5821,6 +5931,7 @@ const directives = [
|
|
|
5821
5931
|
];
|
|
5822
5932
|
// --- Components ---
|
|
5823
5933
|
const components = [
|
|
5934
|
+
DropListComponent,
|
|
5824
5935
|
DynamicTableComponent,
|
|
5825
5936
|
PaginationMenuComponent,
|
|
5826
5937
|
UnorderedListComponent
|
|
@@ -6160,8 +6271,8 @@ class NgxUtilsModule {
|
|
|
6160
6271
|
constructor() {
|
|
6161
6272
|
}
|
|
6162
6273
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6163
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
|
|
6164
|
-
FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] }); }
|
|
6274
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DropListComponent, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
|
|
6275
|
+
FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DropListComponent, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] }); }
|
|
6165
6276
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [CommonModule,
|
|
6166
6277
|
FormsModule, FormsModule] }); }
|
|
6167
6278
|
}
|
|
@@ -6191,5 +6302,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
6191
6302
|
* Generated bundle index. Do not edit.
|
|
6192
6303
|
*/
|
|
6193
6304
|
|
|
6194
|
-
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseDialogService, BaseHttpClient, BaseHttpService, BaseToasterService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, DIALOG_SERVICE, DateUtils, DragDropEventPlugin, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService, cachedFactory, cancelablePromise, impatientPromise, provideWithOptions };
|
|
6305
|
+
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseDialogService, BaseHttpClient, BaseHttpService, BaseToasterService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, DIALOG_SERVICE, DateUtils, DragDropEventPlugin, DropListComponent, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService, cachedFactory, cancelablePromise, checkTransitions, impatientPromise, provideWithOptions };
|
|
6195
6306
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|