@stemy/ngx-utils 19.0.9 → 19.0.10
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 +158 -21
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +3 -3
- package/ngx-utils/ngx-utils.imports.d.ts +6 -0
- package/ngx-utils/plugins/drag-drop-event.plugin.d.ts +14 -0
- package/ngx-utils/plugins/drag-drop-handler.d.ts +24 -0
- package/ngx-utils/plugins/scroll-event.plugin.d.ts +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -0
|
@@ -3760,6 +3760,131 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3760
3760
|
args: [NgZone]
|
|
3761
3761
|
}] }] });
|
|
3762
3762
|
|
|
3763
|
+
class DragDropHandler {
|
|
3764
|
+
static get(el) {
|
|
3765
|
+
if (DragDropHandler.handlers?.has(el)) {
|
|
3766
|
+
return DragDropHandler.handlers.get(el);
|
|
3767
|
+
}
|
|
3768
|
+
return new DragDropHandler(el);
|
|
3769
|
+
}
|
|
3770
|
+
static add(el, inst) {
|
|
3771
|
+
DragDropHandler.handlers = DragDropHandler.handlers || new Map();
|
|
3772
|
+
DragDropHandler.handlers.set(el, inst);
|
|
3773
|
+
}
|
|
3774
|
+
constructor(el) {
|
|
3775
|
+
this.el = el;
|
|
3776
|
+
this.first = false;
|
|
3777
|
+
this.second = false;
|
|
3778
|
+
this.listeners = [];
|
|
3779
|
+
this.onDragStart = ev => {
|
|
3780
|
+
this.fireEvent("dragstart", ev);
|
|
3781
|
+
this.effectAllowed = ev.dataTransfer.effectAllowed;
|
|
3782
|
+
this.dropEffect = ev.dataTransfer.dropEffect;
|
|
3783
|
+
};
|
|
3784
|
+
this.onDragEnter = ev => {
|
|
3785
|
+
ev.preventDefault();
|
|
3786
|
+
if (this.first) {
|
|
3787
|
+
this.second = true;
|
|
3788
|
+
}
|
|
3789
|
+
else {
|
|
3790
|
+
this.first = true;
|
|
3791
|
+
this.fireEvent("dragenter", ev);
|
|
3792
|
+
this.effectAllowed = ev.dataTransfer.effectAllowed;
|
|
3793
|
+
this.dropEffect = ev.dataTransfer.dropEffect;
|
|
3794
|
+
}
|
|
3795
|
+
};
|
|
3796
|
+
this.onDragOver = ev => {
|
|
3797
|
+
ev.preventDefault();
|
|
3798
|
+
ev.dataTransfer.effectAllowed = this.effectAllowed;
|
|
3799
|
+
ev.dataTransfer.dropEffect = this.dropEffect;
|
|
3800
|
+
};
|
|
3801
|
+
this.onDragLeave = ev => {
|
|
3802
|
+
if (this.second) {
|
|
3803
|
+
this.second = false;
|
|
3804
|
+
}
|
|
3805
|
+
else if (this.first) {
|
|
3806
|
+
this.first = false;
|
|
3807
|
+
}
|
|
3808
|
+
if (!this.first && !this.second) {
|
|
3809
|
+
this.fireEvent("dragleave", ev);
|
|
3810
|
+
}
|
|
3811
|
+
};
|
|
3812
|
+
this.onDrop = ev => {
|
|
3813
|
+
ev.preventDefault();
|
|
3814
|
+
this.first = false;
|
|
3815
|
+
this.second = false;
|
|
3816
|
+
this.fireEvent("drop", ev);
|
|
3817
|
+
};
|
|
3818
|
+
this.el.addEventListener("dragstart", this.onDragStart);
|
|
3819
|
+
this.el.addEventListener("dragenter", this.onDragEnter);
|
|
3820
|
+
this.el.addEventListener("dragover", this.onDragOver);
|
|
3821
|
+
this.el.addEventListener("dragleave", this.onDragLeave);
|
|
3822
|
+
this.el.addEventListener("drop", this.onDrop);
|
|
3823
|
+
DragDropHandler.add(this.el, this);
|
|
3824
|
+
}
|
|
3825
|
+
addListener(key, value) {
|
|
3826
|
+
this.listeners = [
|
|
3827
|
+
...this.listeners,
|
|
3828
|
+
{ key, value }
|
|
3829
|
+
];
|
|
3830
|
+
}
|
|
3831
|
+
removeListener(type, listener) {
|
|
3832
|
+
this.listeners = this.listeners.filter(entry => entry.key !== type || entry.value !== listener);
|
|
3833
|
+
if (this.listeners.length > 0)
|
|
3834
|
+
return;
|
|
3835
|
+
this.destroy();
|
|
3836
|
+
}
|
|
3837
|
+
fireEvent(type, ev) {
|
|
3838
|
+
this.listeners.forEach(entry => {
|
|
3839
|
+
if (entry.key !== type)
|
|
3840
|
+
return;
|
|
3841
|
+
entry.value(ev);
|
|
3842
|
+
});
|
|
3843
|
+
}
|
|
3844
|
+
destroy() {
|
|
3845
|
+
this.el.removeEventListener("dragstart", this.onDragStart);
|
|
3846
|
+
this.el.removeEventListener("dragenter", this.onDragEnter);
|
|
3847
|
+
this.el.removeEventListener("dragover", this.onDragOver);
|
|
3848
|
+
this.el.removeEventListener("dragleave", this.onDragLeave);
|
|
3849
|
+
this.el.removeEventListener("drop", this.onDrop);
|
|
3850
|
+
DragDropHandler.handlers?.delete(this.el);
|
|
3851
|
+
}
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3854
|
+
function emptyRemove$2() {
|
|
3855
|
+
}
|
|
3856
|
+
class DragDropEventPlugin extends _DomEventsPlugin {
|
|
3857
|
+
static { this.EVENT_NAMES = ["dragstart", "dragenter", "dragleave", "drop"]; }
|
|
3858
|
+
constructor(doc, universal) {
|
|
3859
|
+
super(doc);
|
|
3860
|
+
this.universal = universal;
|
|
3861
|
+
}
|
|
3862
|
+
supports(eventName) {
|
|
3863
|
+
return DragDropEventPlugin.EVENT_NAMES.includes(eventName);
|
|
3864
|
+
}
|
|
3865
|
+
addEventListener(element, eventName, handler) {
|
|
3866
|
+
const zone = this.manager.getZone();
|
|
3867
|
+
return zone.runOutsideAngular(() => {
|
|
3868
|
+
if (this.universal.isServer)
|
|
3869
|
+
return emptyRemove$2;
|
|
3870
|
+
const callback = (e) => {
|
|
3871
|
+
zone.run(() => handler(e));
|
|
3872
|
+
};
|
|
3873
|
+
const dd = DragDropHandler.get(element);
|
|
3874
|
+
dd.addListener(eventName, callback);
|
|
3875
|
+
return () => dd.removeListener(eventName, callback);
|
|
3876
|
+
});
|
|
3877
|
+
}
|
|
3878
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DragDropEventPlugin, deps: [{ token: DOCUMENT }, { token: UniversalService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3879
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DragDropEventPlugin }); }
|
|
3880
|
+
}
|
|
3881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DragDropEventPlugin, decorators: [{
|
|
3882
|
+
type: Injectable
|
|
3883
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3884
|
+
type: Inject,
|
|
3885
|
+
args: [DOCUMENT]
|
|
3886
|
+
}] }, { type: UniversalService }] });
|
|
3887
|
+
|
|
3763
3888
|
function emptyRemove$1() {
|
|
3764
3889
|
}
|
|
3765
3890
|
function isWindow(el) {
|
|
@@ -5449,41 +5574,48 @@ class DynamicTableComponent {
|
|
|
5449
5574
|
this.refresh();
|
|
5450
5575
|
}
|
|
5451
5576
|
onDragStart(ev, elem, item) {
|
|
5452
|
-
if (!ev)
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
return
|
|
5577
|
+
if (!elem || !item || !ObjectUtils.isFunction(this.dragStartFn) || !this.dragStartFn({ ev, elem, item })) {
|
|
5578
|
+
ev.preventDefault();
|
|
5579
|
+
ev.stopPropagation();
|
|
5580
|
+
return;
|
|
5456
5581
|
}
|
|
5457
5582
|
ev.dataTransfer.setData("itemData", JSON.stringify(item));
|
|
5458
|
-
ev.dataTransfer.setData(item.type,
|
|
5459
|
-
|
|
5583
|
+
ev.dataTransfer.setData(item.type, "type");
|
|
5584
|
+
ev.dataTransfer.setData(item.id, "id");
|
|
5460
5585
|
}
|
|
5461
5586
|
onDragEnter(ev, elem, item) {
|
|
5462
|
-
if (!ev)
|
|
5463
|
-
return true;
|
|
5464
|
-
ev.preventDefault();
|
|
5465
|
-
if (!elem || !item || !ObjectUtils.isFunction(this.dragEnterFn)) {
|
|
5587
|
+
if (!elem || !item || !ObjectUtils.isFunction(this.dragEnterFn) || !this.dragEnterFn({ ev, elem, item })) {
|
|
5466
5588
|
ev.dataTransfer.effectAllowed = "none";
|
|
5467
5589
|
ev.dataTransfer.dropEffect = "none";
|
|
5468
|
-
return
|
|
5590
|
+
return;
|
|
5469
5591
|
}
|
|
5470
|
-
|
|
5592
|
+
ev.dataTransfer.effectAllowed = "move";
|
|
5593
|
+
ev.dataTransfer.dropEffect = "move";
|
|
5594
|
+
elem.classList.add("drop-allowed");
|
|
5471
5595
|
}
|
|
5472
|
-
|
|
5596
|
+
onDragLeave(ev, elem) {
|
|
5473
5597
|
if (!ev)
|
|
5474
|
-
return
|
|
5475
|
-
|
|
5476
|
-
return false;
|
|
5598
|
+
return;
|
|
5599
|
+
elem.classList.remove("drop-allowed");
|
|
5477
5600
|
}
|
|
5478
5601
|
onDrop(ev, elem, item) {
|
|
5479
5602
|
if (!ev)
|
|
5480
|
-
return
|
|
5603
|
+
return;
|
|
5481
5604
|
ev.preventDefault();
|
|
5605
|
+
ev.stopPropagation();
|
|
5482
5606
|
if (!elem || !item || !ObjectUtils.isFunction(this.dropFn)) {
|
|
5483
5607
|
return false;
|
|
5484
5608
|
}
|
|
5609
|
+
elem.classList.remove("drop-allowed");
|
|
5485
5610
|
const source = JSON.parse(ev.dataTransfer.getData("itemData"));
|
|
5486
|
-
|
|
5611
|
+
if (!this.dropFn({ ev, elem, item, source })) {
|
|
5612
|
+
return;
|
|
5613
|
+
}
|
|
5614
|
+
elem.classList.add("dropped");
|
|
5615
|
+
elem.onanimationend = () => {
|
|
5616
|
+
elem.classList.remove("dropped");
|
|
5617
|
+
};
|
|
5618
|
+
setTimeout(elem.onanimationend, 10000);
|
|
5487
5619
|
}
|
|
5488
5620
|
refresh(time) {
|
|
5489
5621
|
if (!this.pagination)
|
|
@@ -5545,11 +5677,11 @@ class DynamicTableComponent {
|
|
|
5545
5677
|
});
|
|
5546
5678
|
}
|
|
5547
5679
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DynamicTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5548
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DynamicTableComponent, isStandalone: false, selector: "dynamic-table", inputs: { label: "label", placeholder: "placeholder", dataLoader: "dataLoader", data: "data", page: "page", urlParam: "urlParam", parallelData: "parallelData", columns: "columns", showFilter: "showFilter", itemsPerPage: "itemsPerPage", updateTime: "updateTime", filterTime: "filterTime", maxPages: "maxPages", directionLinks: "directionLinks", boundaryLinks: "boundaryLinks", orderBy: "orderBy", orderDescending: "orderDescending", testId: "testId", titlePrefix: "titlePrefix", dragStartFn: "dragStartFn", dragEnterFn: "dragEnterFn", dropFn: "dropFn" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: ["rowTemplate"], descendants: true, static: true }, { propertyName: "wrapperTemplate", first: true, predicate: ["wrapperTemplate"], descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }, { propertyName: "templateDirectives", predicate: DynamicTableTemplateDirective }], viewQueries: [{ propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }, { propertyName: "defaultRowTemplate", first: true, predicate: ["defaultRowTemplate"], descendants: true, static: true }, { propertyName: "defaultWrapperTemplate", first: true, predicate: ["defaultWrapperTemplate"], descendants: true, static: true }, { propertyName: "defaultFilterTemplate", first: true, predicate: ["defaultFilterTemplate"], descendants: true, static: true }, { propertyName: "pagination", first: true, predicate: ["pagination"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\" [updateTime]=\"updateTime\">\r\n <ng-template #defaultFilterTemplate let-table>\r\n <div class=\"table-search\" *ngIf=\"table.showFilter\">\r\n <label *ngIf=\"label\" [attr.for]=\"tableId\">{{ label | translate }}</label>\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"table.filter\"\r\n (ngModelChange)=\"table.setFilter($event)\"/>\r\n </div>\r\n </ng-template>\r\n <ng-container [ngxTemplateOutlet]=\"filterTemplate || defaultFilterTemplate\" [context]=\"this\"></ng-container>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\r\n <ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\r\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\r\n </ng-template>\r\n <ng-template #pureTemplate>\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n </ng-template>\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\" *ngIf=\"!template || !template.pure; else pureTemplate\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\" [context]=\"context\"></ng-container>\r\n </td>\r\n </ng-template>\r\n\r\n <ng-template #columnsTemplate let-context>\r\n <ng-container *ngFor=\"let column of cols\"\r\n [ngxTemplateOutlet]=\"columnTemplate\"\r\n [context]=\"context\"\r\n [additionalContext]=\"{\r\n template: templates[column],\r\n column: column\r\n }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultRowTemplate let-context>\r\n <tr draggable=\"true\"\r\n #elem\r\n (dragstart)=\"onDragStart($event, elem, context.item)\"\r\n (dragenter)=\"onDragEnter($event, elem, context.item)\"\r\n (
|
|
5680
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DynamicTableComponent, isStandalone: false, selector: "dynamic-table", inputs: { label: "label", placeholder: "placeholder", dataLoader: "dataLoader", data: "data", page: "page", urlParam: "urlParam", parallelData: "parallelData", columns: "columns", showFilter: "showFilter", itemsPerPage: "itemsPerPage", updateTime: "updateTime", filterTime: "filterTime", maxPages: "maxPages", directionLinks: "directionLinks", boundaryLinks: "boundaryLinks", orderBy: "orderBy", orderDescending: "orderDescending", testId: "testId", titlePrefix: "titlePrefix", dragStartFn: "dragStartFn", dragEnterFn: "dragEnterFn", dropFn: "dropFn" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: ["rowTemplate"], descendants: true, static: true }, { propertyName: "wrapperTemplate", first: true, predicate: ["wrapperTemplate"], descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }, { propertyName: "templateDirectives", predicate: DynamicTableTemplateDirective }], viewQueries: [{ propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }, { propertyName: "defaultRowTemplate", first: true, predicate: ["defaultRowTemplate"], descendants: true, static: true }, { propertyName: "defaultWrapperTemplate", first: true, predicate: ["defaultWrapperTemplate"], descendants: true, static: true }, { propertyName: "defaultFilterTemplate", first: true, predicate: ["defaultFilterTemplate"], descendants: true, static: true }, { propertyName: "pagination", first: true, predicate: ["pagination"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\" [updateTime]=\"updateTime\">\r\n <ng-template #defaultFilterTemplate let-table>\r\n <div class=\"table-search\" *ngIf=\"table.showFilter\">\r\n <label *ngIf=\"label\" [attr.for]=\"tableId\">{{ label | translate }}</label>\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"table.filter\"\r\n (ngModelChange)=\"table.setFilter($event)\"/>\r\n </div>\r\n </ng-template>\r\n <ng-container [ngxTemplateOutlet]=\"filterTemplate || defaultFilterTemplate\" [context]=\"this\"></ng-container>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\r\n <ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\r\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\r\n </ng-template>\r\n <ng-template #pureTemplate>\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n </ng-template>\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\" *ngIf=\"!template || !template.pure; else pureTemplate\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\" [context]=\"context\"></ng-container>\r\n </td>\r\n </ng-template>\r\n\r\n <ng-template #columnsTemplate let-context>\r\n <ng-container *ngFor=\"let column of cols\"\r\n [ngxTemplateOutlet]=\"columnTemplate\"\r\n [context]=\"context\"\r\n [additionalContext]=\"{\r\n template: templates[column],\r\n column: column\r\n }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultRowTemplate let-context>\r\n <tr draggable=\"true\"\r\n #elem\r\n (dragstart)=\"onDragStart($event, elem, context.item)\"\r\n (dragenter)=\"onDragEnter($event, elem, context.item)\"\r\n (dragleave)=\"onDragLeave($event, elem)\"\r\n (drop)=\"onDrop($event, elem, context.item)\">\r\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\" [context]=\"context\"></ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template #defaultWrapperTemplate>\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let column of cols\" [ngClass]=\"'column-' + column\">\r\n <ng-template #defaultCol>\r\n <span>{{ realColumns[column].title | translate }}</span>\r\n </ng-template>\r\n <a *ngIf=\"realColumns[column].sort; else defaultCol\" (click)=\"setOrder(column)\">\r\n <span>{{ realColumns[column].title | translate }}</span>\r\n <i *ngIf=\"orderBy == column\"\r\n [icon]=\"orderDescending ? 'sort-desc' : 'sort-asc'\"\r\n [ngClass]=\"orderBy == column ? (orderDescending ? 'sort-desc': 'sort-asc') : ''\"></i>\r\n </a>\r\n </th>\r\n </tr>\r\n <tr *ngIf=\"hasQuery\">\r\n <th *ngFor=\"let column of cols\" [ngClass]=\"['column-' + column, 'filter-column']\">\r\n <ng-container *ngIf=\"realColumns[column].filter\">\r\n <input class=\"form-control\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [type]=\"realColumns[column].filterType || 'text'\"\r\n [placeholder]=\"realColumns[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"updateQuery(column, $event)\"/>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *paginationItem=\"let context\"\r\n [ngxTemplateOutlet]=\"rowTemplate\"\r\n [context]=\"context\"\r\n [additionalContext]=\"this\"></ng-container>\r\n </tbody>\r\n </table>\r\n </ng-template>\r\n\r\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\r\n [context]=\"this\"></ng-container>\r\n </div>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n</div>\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: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IconDirective, selector: "[icon]", inputs: ["icon", "activeIcon", "active"], outputs: ["activeChange"] }, { kind: "directive", type: NgxTemplateOutletDirective, selector: "[ngxTemplateOutlet]", inputs: ["context", "additionalContext", "ngxTemplateOutlet"] }, { kind: "directive", type: PaginationDirective, selector: "[pagination]", inputs: ["pagination", "page", "itemsPerPage", "updateTime", "waitFor"], outputs: ["pageChange", "onRefresh"], exportAs: ["pagination"] }, { kind: "directive", type: PaginationItemDirective, selector: "[paginationItem]" }, { kind: "component", type: PaginationMenuComponent, selector: "pagination-menu", inputs: ["maxSize", "urlParam", "directionLinks", "boundaryLinks"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
5549
5681
|
}
|
|
5550
5682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DynamicTableComponent, decorators: [{
|
|
5551
5683
|
type: Component,
|
|
5552
|
-
args: [{ standalone: false, selector: "dynamic-table", template: "<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\" [updateTime]=\"updateTime\">\r\n <ng-template #defaultFilterTemplate let-table>\r\n <div class=\"table-search\" *ngIf=\"table.showFilter\">\r\n <label *ngIf=\"label\" [attr.for]=\"tableId\">{{ label | translate }}</label>\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"table.filter\"\r\n (ngModelChange)=\"table.setFilter($event)\"/>\r\n </div>\r\n </ng-template>\r\n <ng-container [ngxTemplateOutlet]=\"filterTemplate || defaultFilterTemplate\" [context]=\"this\"></ng-container>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\r\n <ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\r\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\r\n </ng-template>\r\n <ng-template #pureTemplate>\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n </ng-template>\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\" *ngIf=\"!template || !template.pure; else pureTemplate\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\" [context]=\"context\"></ng-container>\r\n </td>\r\n </ng-template>\r\n\r\n <ng-template #columnsTemplate let-context>\r\n <ng-container *ngFor=\"let column of cols\"\r\n [ngxTemplateOutlet]=\"columnTemplate\"\r\n [context]=\"context\"\r\n [additionalContext]=\"{\r\n template: templates[column],\r\n column: column\r\n }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultRowTemplate let-context>\r\n <tr draggable=\"true\"\r\n #elem\r\n (dragstart)=\"onDragStart($event, elem, context.item)\"\r\n (dragenter)=\"onDragEnter($event, elem, context.item)\"\r\n (
|
|
5684
|
+
args: [{ standalone: false, selector: "dynamic-table", template: "<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\" [updateTime]=\"updateTime\">\r\n <ng-template #defaultFilterTemplate let-table>\r\n <div class=\"table-search\" *ngIf=\"table.showFilter\">\r\n <label *ngIf=\"label\" [attr.for]=\"tableId\">{{ label | translate }}</label>\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"table.filter\"\r\n (ngModelChange)=\"table.setFilter($event)\"/>\r\n </div>\r\n </ng-template>\r\n <ng-container [ngxTemplateOutlet]=\"filterTemplate || defaultFilterTemplate\" [context]=\"this\"></ng-container>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\r\n <ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\r\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\r\n </ng-template>\r\n <ng-template #pureTemplate>\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n </ng-template>\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\" *ngIf=\"!template || !template.pure; else pureTemplate\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\" [context]=\"context\"></ng-container>\r\n </td>\r\n </ng-template>\r\n\r\n <ng-template #columnsTemplate let-context>\r\n <ng-container *ngFor=\"let column of cols\"\r\n [ngxTemplateOutlet]=\"columnTemplate\"\r\n [context]=\"context\"\r\n [additionalContext]=\"{\r\n template: templates[column],\r\n column: column\r\n }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultRowTemplate let-context>\r\n <tr draggable=\"true\"\r\n #elem\r\n (dragstart)=\"onDragStart($event, elem, context.item)\"\r\n (dragenter)=\"onDragEnter($event, elem, context.item)\"\r\n (dragleave)=\"onDragLeave($event, elem)\"\r\n (drop)=\"onDrop($event, elem, context.item)\">\r\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\" [context]=\"context\"></ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template #defaultWrapperTemplate>\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let column of cols\" [ngClass]=\"'column-' + column\">\r\n <ng-template #defaultCol>\r\n <span>{{ realColumns[column].title | translate }}</span>\r\n </ng-template>\r\n <a *ngIf=\"realColumns[column].sort; else defaultCol\" (click)=\"setOrder(column)\">\r\n <span>{{ realColumns[column].title | translate }}</span>\r\n <i *ngIf=\"orderBy == column\"\r\n [icon]=\"orderDescending ? 'sort-desc' : 'sort-asc'\"\r\n [ngClass]=\"orderBy == column ? (orderDescending ? 'sort-desc': 'sort-asc') : ''\"></i>\r\n </a>\r\n </th>\r\n </tr>\r\n <tr *ngIf=\"hasQuery\">\r\n <th *ngFor=\"let column of cols\" [ngClass]=\"['column-' + column, 'filter-column']\">\r\n <ng-container *ngIf=\"realColumns[column].filter\">\r\n <input class=\"form-control\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [type]=\"realColumns[column].filterType || 'text'\"\r\n [placeholder]=\"realColumns[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"updateQuery(column, $event)\"/>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *paginationItem=\"let context\"\r\n [ngxTemplateOutlet]=\"rowTemplate\"\r\n [context]=\"context\"\r\n [additionalContext]=\"this\"></ng-container>\r\n </tbody>\r\n </table>\r\n </ng-template>\r\n\r\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\r\n [context]=\"this\"></ng-container>\r\n </div>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n</div>\r\n" }]
|
|
5553
5685
|
}], ctorParameters: () => [], propDecorators: { label: [{
|
|
5554
5686
|
type: Input
|
|
5555
5687
|
}], placeholder: [{
|
|
@@ -5705,6 +5837,11 @@ const providers = [
|
|
|
5705
5837
|
WasmService,
|
|
5706
5838
|
DeviceDetectorService,
|
|
5707
5839
|
GlobalTemplateService,
|
|
5840
|
+
{
|
|
5841
|
+
provide: EVENT_MANAGER_PLUGINS,
|
|
5842
|
+
useClass: DragDropEventPlugin,
|
|
5843
|
+
multi: true
|
|
5844
|
+
},
|
|
5708
5845
|
{
|
|
5709
5846
|
provide: EVENT_MANAGER_PLUGINS,
|
|
5710
5847
|
useClass: ResizeEventPlugin,
|
|
@@ -6038,5 +6175,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
6038
6175
|
* Generated bundle index. Do not edit.
|
|
6039
6176
|
*/
|
|
6040
6177
|
|
|
6041
|
-
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, 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 };
|
|
6178
|
+
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 };
|
|
6042
6179
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|