@stemy/ngx-utils 19.9.6 → 19.9.8

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.
@@ -1,6 +1,6 @@
1
1
  import 'zone.js';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, PLATFORM_ID, Inject, Injectable, Optional, Injector, inject, untracked, computed, signal, DestroyRef, isDevMode, ErrorHandler, EventEmitter, createComponent, NgZone, Pipe, input, output, ChangeDetectorRef, ElementRef, effect, HostListener, Directive, Input, HostBinding, Output, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewChild, forwardRef, ContentChild, contentChild, contentChildren, Renderer2, model, ContentChildren, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
3
+ import { InjectionToken, runInInjectionContext, PLATFORM_ID, Inject, Injectable, Optional, inject, Injector, untracked, computed, signal, DestroyRef, isDevMode, ErrorHandler, EventEmitter, createComponent, NgZone, Pipe, input, output, ChangeDetectorRef, ElementRef, effect, HostListener, Directive, Input, HostBinding, Output, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewChild, forwardRef, ContentChild, contentChild, contentChildren, Renderer2, model, ContentChildren, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
4
4
  import 'reflect-metadata';
5
5
  import * as i2 from '@angular/router';
6
6
  import { ActivatedRouteSnapshot, Scroll, NavigationEnd, Router, DefaultUrlSerializer, UrlTree, UrlSegmentGroup, UrlSegment, UrlSerializer, ROUTES } from '@angular/router';
@@ -39,6 +39,7 @@ var StorageMode;
39
39
  })(StorageMode || (StorageMode = {}));
40
40
  // --- Reflect utils ---
41
41
  function FactoryDependencies(...dependencies) {
42
+ console.warn(`FactoryDependencies is deprecated, please use Angular's inject() method to retrieve the services instead`);
42
43
  return function (target, method) {
43
44
  Reflect.defineMetadata("factoryDependencies", dependencies, target, method);
44
45
  };
@@ -617,7 +618,7 @@ class ReflectUtils {
617
618
  const parameters = depends.map(function (dep) {
618
619
  return injector.get(dep);
619
620
  }).concat(factory.params);
620
- return factory.func.apply(null, parameters);
621
+ return runInInjectionContext(injector, () => factory.func.apply(factory.type ?? null, parameters));
621
622
  }
622
623
  }
623
624
 
@@ -892,15 +893,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
892
893
  type: Optional
893
894
  }] }] });
894
895
 
895
- var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
896
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
897
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
898
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
899
- return c > 3 && r && Object.defineProperty(target, key, r), r;
900
- };
901
- var __metadata$1 = (this && this.__metadata) || function (k, v) {
902
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
903
- };
904
896
  class AuthGuard {
905
897
  static guardAuthenticated(auth) {
906
898
  return Promise.resolve(auth.isAuthenticated);
@@ -911,26 +903,24 @@ class AuthGuard {
911
903
  static guardNothing() {
912
904
  return Promise.resolve(true);
913
905
  }
914
- static guardAuthField(auth, expression = `auth.isAuthenticated`) {
915
- // @dynamic
916
- const lambda = () => {
917
- return Promise.resolve(ObjectUtils.evaluate(expression, { auth }));
906
+ static guardAuthField(expression = `auth.isAuthenticated`) {
907
+ const auth = inject(AUTH_SERVICE);
908
+ return async () => {
909
+ return ObjectUtils.evaluate(expression, { auth });
918
910
  };
919
- return lambda;
920
911
  }
921
- static guardStateField(state, expression = `state.data`) {
922
- // @dynamic
923
- const lambda = () => {
924
- return Promise.resolve(ObjectUtils.evaluate(expression, { state }));
912
+ static guardStateField(expression = `state.data`) {
913
+ const state = inject(StateService);
914
+ return async () => {
915
+ return ObjectUtils.evaluate(expression, { state });
925
916
  };
926
- return lambda;
927
917
  }
928
- static guardAuthStateField(auth, state, expression = `auth.isAuthenticated`) {
929
- // @dynamic
930
- const lambda = () => {
931
- return Promise.resolve(ObjectUtils.evaluate(expression, { auth, state }));
918
+ static guardAuthStateField(expression = `auth.isAuthenticated`) {
919
+ const auth = inject(AUTH_SERVICE);
920
+ const state = inject(StateService);
921
+ return async () => {
922
+ return ObjectUtils.evaluate(expression, { auth, state });
932
923
  };
933
- return lambda;
934
924
  }
935
925
  static wildRouteMatch(segments) {
936
926
  return { consumed: segments };
@@ -1015,24 +1005,6 @@ class AuthGuard {
1015
1005
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: AuthGuard, deps: [{ token: Injector }, { token: StateService }, { token: AUTH_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
1016
1006
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: AuthGuard }); }
1017
1007
  }
1018
- __decorate$1([
1019
- FactoryDependencies(AUTH_SERVICE),
1020
- __metadata$1("design:type", Function),
1021
- __metadata$1("design:paramtypes", [Object, String]),
1022
- __metadata$1("design:returntype", Function)
1023
- ], AuthGuard, "guardAuthField", null);
1024
- __decorate$1([
1025
- FactoryDependencies(StateService),
1026
- __metadata$1("design:type", Function),
1027
- __metadata$1("design:paramtypes", [StateService, String]),
1028
- __metadata$1("design:returntype", Function)
1029
- ], AuthGuard, "guardStateField", null);
1030
- __decorate$1([
1031
- FactoryDependencies(AUTH_SERVICE, StateService),
1032
- __metadata$1("design:type", Function),
1033
- __metadata$1("design:paramtypes", [Object, StateService, String]),
1034
- __metadata$1("design:returntype", Function)
1035
- ], AuthGuard, "guardAuthStateField", null);
1036
1008
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: AuthGuard, decorators: [{
1037
1009
  type: Injectable
1038
1010
  }], ctorParameters: () => [{ type: i0.Injector, decorators: [{
@@ -7903,11 +7875,11 @@ class DynamicTableCellComponent {
7903
7875
  });
7904
7876
  }
7905
7877
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DynamicTableCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7906
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: DynamicTableCellComponent, isStandalone: false, selector: "dynamic-table-cell", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, globalTemplatePrefix: { classPropertyName: "globalTemplatePrefix", publicName: "globalTemplatePrefix", isSignal: true, isRequired: false, transformFunction: null }, fallbackTemplate: { classPropertyName: "fallbackTemplate", publicName: "fallbackTemplate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-template #fallback let-value=\"value\">\r\n {{ value ?? '-' }}\r\n</ng-template>\r\n<ng-template #defaultTemplate let-context let-column=\"column\" let-id=\"id\" let-value=\"value\">\r\n @switch (column.filterType) {\r\n @case ('checkbox') {\r\n <icon [name]=\"value ? 'check' : 'xmark'\"></icon>\r\n }\r\n @case ('enum') {\r\n <div [ngClass]=\"`table-enum enum-${id} enum-value-${value}`\">\r\n <span>{{ `${id}.${value}` | translate }}</span>\r\n </div>\r\n }\r\n @default {\r\n <ng-container [ngxTemplateOutlet]=\"fallbackTemplate() || fallback\"\r\n [context]=\"context\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n<ng-container [ngxTemplateOutlet]=\"template() || defaultTemplate\"\r\n [context]=\"context()\"\r\n [additionalContext]=\"{defaultTemplate}\"></ng-container>\r\n", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgxTemplateOutletDirective, selector: "[ngxTemplateOutlet]", inputs: ["context", "additionalContext", "ngxTemplateOutlet"] }, { kind: "component", type: IconComponent, selector: "icon", inputs: ["name"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
7878
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: DynamicTableCellComponent, isStandalone: false, selector: "dynamic-table-cell", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, globalTemplatePrefix: { classPropertyName: "globalTemplatePrefix", publicName: "globalTemplatePrefix", isSignal: true, isRequired: false, transformFunction: null }, fallbackTemplate: { classPropertyName: "fallbackTemplate", publicName: "fallbackTemplate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-template #fallback let-value=\"value\">\r\n {{ value ?? '-' }}\r\n</ng-template>\r\n<ng-template #defaultTemplate let-context let-column=\"column\" let-id=\"id\" let-value=\"value\">\r\n @switch (column.filterType) {\r\n @case ('checkbox') {\r\n <icon [name]=\"value ? 'check' : 'xmark'\"></icon>\r\n }\r\n @case ('enum') {\r\n @let optionPrefix = column.enumPrefix || id;\r\n <div [ngClass]=\"`table-enum enum-${optionPrefix} enum-value-${value}`\">\r\n <span>{{ `${optionPrefix}.${value}` | translate }}</span>\r\n </div>\r\n }\r\n @default {\r\n <ng-container [ngxTemplateOutlet]=\"fallbackTemplate() || fallback\"\r\n [context]=\"context\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n<ng-container [ngxTemplateOutlet]=\"template() || defaultTemplate\"\r\n [context]=\"context()\"\r\n [additionalContext]=\"{defaultTemplate}\"></ng-container>\r\n", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgxTemplateOutletDirective, selector: "[ngxTemplateOutlet]", inputs: ["context", "additionalContext", "ngxTemplateOutlet"] }, { kind: "component", type: IconComponent, selector: "icon", inputs: ["name"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
7907
7879
  }
7908
7880
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DynamicTableCellComponent, decorators: [{
7909
7881
  type: Component,
7910
- args: [{ standalone: false, selector: "dynamic-table-cell", encapsulation: ViewEncapsulation.None, template: "<ng-template #fallback let-value=\"value\">\r\n {{ value ?? '-' }}\r\n</ng-template>\r\n<ng-template #defaultTemplate let-context let-column=\"column\" let-id=\"id\" let-value=\"value\">\r\n @switch (column.filterType) {\r\n @case ('checkbox') {\r\n <icon [name]=\"value ? 'check' : 'xmark'\"></icon>\r\n }\r\n @case ('enum') {\r\n <div [ngClass]=\"`table-enum enum-${id} enum-value-${value}`\">\r\n <span>{{ `${id}.${value}` | translate }}</span>\r\n </div>\r\n }\r\n @default {\r\n <ng-container [ngxTemplateOutlet]=\"fallbackTemplate() || fallback\"\r\n [context]=\"context\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n<ng-container [ngxTemplateOutlet]=\"template() || defaultTemplate\"\r\n [context]=\"context()\"\r\n [additionalContext]=\"{defaultTemplate}\"></ng-container>\r\n" }]
7882
+ args: [{ standalone: false, selector: "dynamic-table-cell", encapsulation: ViewEncapsulation.None, template: "<ng-template #fallback let-value=\"value\">\r\n {{ value ?? '-' }}\r\n</ng-template>\r\n<ng-template #defaultTemplate let-context let-column=\"column\" let-id=\"id\" let-value=\"value\">\r\n @switch (column.filterType) {\r\n @case ('checkbox') {\r\n <icon [name]=\"value ? 'check' : 'xmark'\"></icon>\r\n }\r\n @case ('enum') {\r\n @let optionPrefix = column.enumPrefix || id;\r\n <div [ngClass]=\"`table-enum enum-${optionPrefix} enum-value-${value}`\">\r\n <span>{{ `${optionPrefix}.${value}` | translate }}</span>\r\n </div>\r\n }\r\n @default {\r\n <ng-container [ngxTemplateOutlet]=\"fallbackTemplate() || fallback\"\r\n [context]=\"context\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n<ng-container [ngxTemplateOutlet]=\"template() || defaultTemplate\"\r\n [context]=\"context()\"\r\n [additionalContext]=\"{defaultTemplate}\"></ng-container>\r\n" }]
7911
7883
  }] });
7912
7884
 
7913
7885
  class PaginationMenuComponent {
@@ -8250,11 +8222,11 @@ class DynamicTableComponent {
8250
8222
  };
8251
8223
  }
8252
8224
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DynamicTableComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
8253
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: DynamicTableComponent, isStandalone: false, selector: "dynamic-table", inputs: { dataLoader: { classPropertyName: "dataLoader", publicName: "dataLoader", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: false, isRequired: false, transformFunction: null }, urlParam: { classPropertyName: "urlParam", publicName: "urlParam", isSignal: false, isRequired: false, transformFunction: null }, parallelData: { classPropertyName: "parallelData", publicName: "parallelData", isSignal: false, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: false, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, showItems: { classPropertyName: "showItems", publicName: "showItems", isSignal: false, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: false, isRequired: false, transformFunction: null }, updateTime: { classPropertyName: "updateTime", publicName: "updateTime", isSignal: false, isRequired: false, transformFunction: null }, filterTime: { classPropertyName: "filterTime", publicName: "filterTime", isSignal: false, isRequired: false, transformFunction: null }, maxPages: { classPropertyName: "maxPages", publicName: "maxPages", isSignal: false, isRequired: false, transformFunction: null }, directionLinks: { classPropertyName: "directionLinks", publicName: "directionLinks", isSignal: false, isRequired: false, transformFunction: null }, boundaryLinks: { classPropertyName: "boundaryLinks", publicName: "boundaryLinks", isSignal: false, isRequired: false, transformFunction: null }, orderBy: { classPropertyName: "orderBy", publicName: "orderBy", isSignal: false, isRequired: false, transformFunction: null }, orderDescending: { classPropertyName: "orderDescending", publicName: "orderDescending", isSignal: false, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: false, isRequired: false, transformFunction: null }, titlePrefix: { classPropertyName: "titlePrefix", publicName: "titlePrefix", isSignal: false, isRequired: false, transformFunction: null }, dragStartFn: { classPropertyName: "dragStartFn", publicName: "dragStartFn", isSignal: false, isRequired: false, transformFunction: null }, dragEnterFn: { classPropertyName: "dragEnterFn", publicName: "dragEnterFn", isSignal: false, isRequired: false, transformFunction: null }, dropFn: { classPropertyName: "dropFn", publicName: "dropFn", isSignal: false, isRequired: false, transformFunction: null }, globalTemplatePrefix: { classPropertyName: "globalTemplatePrefix", publicName: "globalTemplatePrefix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, queries: [{ propertyName: "fallbackTemplate", first: true, predicate: ["fallbackTemplate"], descendants: true, isSignal: true }, { propertyName: "templateDirectives", predicate: DynamicTableTemplateDirective, isSignal: true }, { propertyName: "rowTemplate", first: true, predicate: ["rowTemplate"], descendants: true, static: true }, { propertyName: "wrapperTemplate", first: true, predicate: ["wrapperTemplate"], descendants: true, static: true }], 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: "pagination", first: true, predicate: ["pagination"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@let columnTemplates = templates();\r\n@let prefix = globalTemplatePrefix();\r\n@let fallback = fallbackTemplate();\r\n\r\n<ng-template #defaultTemplate let-item=\"item\" let-column=\"column\" let-columnDef=\"columnDef\">\r\n <dynamic-table-cell [item]=\"item\"\r\n [column]=\"columnDef\"\r\n [id]=\"column\"\r\n [globalTemplatePrefix]=\"prefix\"\r\n [fallbackTemplate]=\"fallback\"></dynamic-table-cell>\r\n</ng-template>\r\n\r\n<ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n @if (!template?.pure) {\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\"\r\n [context]=\"context\"></ng-container>\r\n </td>\r\n } @else {\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n }\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: columnTemplates[column],\r\n column: column,\r\n columnDef: columnDefs[column]\r\n }\"></ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultRowTemplate let-context>\r\n <tr #elem\r\n [draggable]=\"!!dragStartFn\"\r\n [ngClass]=\"{active: selected === context.item}\"\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 (click)=\"onClick.emit(context.item)\">\r\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\"\r\n [context]=\"context\"></ng-container>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate let-column=\"column\" let-toggle=\"toggle\">\r\n <ng-template #defaultCol>\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </ng-template>\r\n <ng-template #emptyCol>\r\n <span>-</span>\r\n </ng-template>\r\n <ng-container *ngIf=\"columnDefs[column]; else emptyCol\">\r\n <a *ngIf=\"columnDefs[column].sort; else defaultCol\"\r\n [ngClass]=\"['sort', orderBy !== column ? '' : (orderDescending ? 'sort-desc' : 'sort-asc')]\"\r\n (click)=\"setSorting(column, toggle)\">\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </a>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<div class=\"dynamic-table\">\r\n <div class=\"table-features-row\">\r\n <ng-content select=\"[table-features-before]\"></ng-content>\r\n @if (showFilter) {\r\n <div class=\"table-input-wrap table-search-filter\">\r\n <label *ngIf=\"filterLabel\" [attr.for]=\"tableId\">\r\n {{ filterLabel | translate }}\r\n </label>\r\n <input type=\"text\"\r\n class=\"search-input\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"filter\"\r\n (ngModelChange)=\"setFilter($event)\"/>\r\n </div>\r\n }\r\n @if (sortable) {\r\n <dropdown-box componentClass=\"sort-dropdown\" #sortDd>\r\n <ng-container toggle-content\r\n [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: orderBy, toggle: sortDd}\"></ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let column of cols\">\r\n <li [ngClass]=\"'sort-column sort-' + column\" *ngIf=\"columnDefs[column].sort\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n }\r\n @if (showItems) {\r\n <div class=\"table-input-wrap table-items-count\">\r\n <label>\r\n {{ 'label.items.before' | translate }}\r\n </label>\r\n <dropdown-box>\r\n <ng-container toggle-content>\r\n {{ itemsPerPage }}\r\n </ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let count of showItems\">\r\n <li [ngClass]=\"'item-count count-' + count\" (click)=\"setItemsPerPage(count)\">\r\n {{ count }}\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n <label>\r\n {{ 'label.items.after' | translate }}\r\n </label>\r\n </div>\r\n }\r\n <ng-content select=\"[table-features-after]\"></ng-content>\r\n </div>\r\n <div class=\"table-content-row\"\r\n #pagination=\"pagination\"\r\n [pagination]=\"loadData\"\r\n [page]=\"page\"\r\n [itemsPerPage]=\"itemsPerPage\"\r\n [updateTime]=\"updateTime\">\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\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]=\"'header-column column-' + column\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\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=\"columnDefs[column].filter\" [ngSwitch]=\"columnDefs[column].filterType\">\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n <ng-template #optionItem let-option=\"option\">\r\n <span [ngClass]=\"`table-enum enum-${column} enum-value-${option}`\">\r\n <span>{{ `${column}.${option}` | translate }}</span>\r\n </span>\r\n </ng-template>\r\n <dropdown-box componentClass=\"filter-box\"\r\n [ngClass]=\"'filter-box-' + column\" [closeInside]=\"false\">\r\n <ng-container toggle-content>\r\n <span class=\"toggle-placeholder\" *ngIf=\"!query[column]\">\r\n {{ columnDefs[column].title | translate }}\r\n </span>\r\n <span [ngClass]=\"['option-' + option, column + '-option-' + option, option]\"\r\n *ngFor=\"let option of query[column] | values; let ix = index\">\r\n <ng-container *ngIf=\"ix > 0\">&nbsp;|&nbsp;</ng-container>\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ul>\r\n @for (option of columnDefs[column].enum; track option) {\r\n <li (click)=\"setQueryValue(column, option)\">\r\n <a class=\"toggle-link\" [ngClass]=\"'toggle-link-' + column\">\r\n <input type=\"checkbox\" [checked]=\"query[column] | includes: option\">\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </dropdown-box>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <input type=\"checkbox\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <input class=\"search-input\"\r\n type=\"text\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\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 <div class=\"table-wrapper\">\r\n <ng-content select=\"[table-top]\"></ng-content>\r\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\r\n [context]=\"this\"></ng-container>\r\n <ng-content select=\"[table-bottom]\"></ng-content>\r\n </div>\r\n </div>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n </div>\r\n</div>\r\n", styles: [".dynamic-table{--table-bg: transparent;--table-stripe-bg: rgba(210, 210, 210, .35);--border-size: 1px;--border-color: #ced4da;--bg-color: #ffffff;--text-color: #151515;--highlight-color: var(--primary-color, #888888);--highlight-text-color: #ffffff;--display-toggle: none;--arrow-size: 6px;--arrow-rotation: 90;--arrow-space: calc(var(--arrow-size) * .5 + 1px);--arrow-color: #c6c6c6}.dynamic-table *{box-sizing:border-box}.dynamic-table div.table-enum{text-align:center}.dynamic-table .search-input{background:var(--bg-color);color:var(--text-color);border:var(--border-size) solid var(--border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dynamic-table .search-input .toggle-placeholder,.dynamic-table .search-input ::placeholder{color:#495057}.dynamic-table .table-responsive{border:1px solid var(--border-color);overflow:hidden;overflow-x:auto;margin-bottom:1rem}.dynamic-table .table-features-row:not(:empty){display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}.dynamic-table .table-content-row{position:relative}.dynamic-table .sort-dropdown{display:none}.dynamic-table .table-input-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px}.dynamic-table .table-input-wrap>label{margin:0;font-weight:700}.dynamic-table .table-input-wrap>input{max-width:400px}.dynamic-table .table-items-count{flex:1}.dynamic-table .table-wrapper{position:relative}.dynamic-table table.table{border-collapse:collapse;margin:0;width:100%;font-family:inherit;font-size:inherit}.dynamic-table table.table th{text-align:left}.dynamic-table table.table th,.dynamic-table table.table td{text-align:left;padding:6px 12px;border:1px solid var(--border-color);vertical-align:middle;white-space:nowrap;width:var(--cell-width, 25%);min-width:fit-content}.dynamic-table table.table-sm th,.dynamic-table table.table-sm td{font-size:var(--font-size-sm);padding:4px 6px}.dynamic-table table.table thead th{font-weight:500}.dynamic-table table.table thead th .dropdown-box{display:block;width:100%;text-align:left}.dynamic-table table.table thead th .search-input{width:100%}.dynamic-table table.table thead th span{display:inline-block;vertical-align:top}.dynamic-table table.table thead th a{cursor:pointer;text-align:left}.dynamic-table table.table thead th.filter-column{text-align:center}.dynamic-table table.table thead tr:first-child th{border-top-width:0}.dynamic-table table.table tbody tr:last-child td{border-bottom-width:0}.dynamic-table table.table thead tr th,.dynamic-table table.table tbody tr td{background-color:var(--table-bg)}.dynamic-table table.table thead tr th:first-child,.dynamic-table table.table tbody tr td:first-child{border-left-width:0}.dynamic-table table.table thead tr th:last-child,.dynamic-table table.table tbody tr td:last-child{border-right-width:0}.dynamic-table table.table tbody tr.active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd) td{background-color:var(--table-stripe-bg)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd).active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:0;padding-right:0}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link:after{display:none}.sort-dropdown-content-wrapper a.sort,.dynamic-table a.sort{position:relative;display:block;margin-right:calc(var(--arrow-size) * 2);-webkit-user-select:none;user-select:none;padding-right:5px}.sort-dropdown-content-wrapper a.sort:before,.sort-dropdown-content-wrapper a.sort:after,.dynamic-table a.sort:before,.dynamic-table a.sort:after{content:\"\";position:absolute;transition:.2s ease;left:calc(100% + var(--arrow-size));top:calc(50% - var(--arrow-size));border-top:var(--arrow-size) solid transparent;border-bottom:var(--arrow-size) solid transparent;border-left:var(--arrow-size) solid var(--arrow-color);transform:rotate(calc(var(--arrow-rotation) * 1deg)) translate(var(--arrow-space))}.sort-dropdown-content-wrapper a.sort:before,.dynamic-table a.sort:before{--arrow-rotation: -90}.sort-dropdown-content-wrapper a.sort.sort-desc:before,.dynamic-table a.sort.sort-desc:before{--arrow-color: black}.sort-dropdown-content-wrapper a.sort.sort-asc:after,.dynamic-table a.sort.sort-asc:after{--arrow-color: black}.table-enum{--enum-color: #c6c6c6;--enum-radius: 5px}.table-enum span{display:inline-block;padding:2px 5px;background:color-mix(in srgb,var(--enum-color),rgba(255,255,255,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\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: 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: 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: DropdownBoxComponent, selector: "dropdown-box", inputs: ["closeInside", "attachTo", "placement", "crossAxis", "alignment", "autoAlignment", "allowedPlacements", "componentClass"] }, { kind: "component", type: DynamicTableCellComponent, selector: "dynamic-table-cell", inputs: ["item", "column", "id", "globalTemplatePrefix", "fallbackTemplate"] }, { kind: "component", type: PaginationMenuComponent, selector: "pagination-menu", inputs: ["maxSize", "urlParam", "directionLinks", "boundaryLinks"] }, { kind: "pipe", type: IncludesPipe, name: "includes" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: ValuesPipe, name: "values" }], encapsulation: i0.ViewEncapsulation.None }); }
8225
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: DynamicTableComponent, isStandalone: false, selector: "dynamic-table", inputs: { dataLoader: { classPropertyName: "dataLoader", publicName: "dataLoader", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: false, isRequired: false, transformFunction: null }, urlParam: { classPropertyName: "urlParam", publicName: "urlParam", isSignal: false, isRequired: false, transformFunction: null }, parallelData: { classPropertyName: "parallelData", publicName: "parallelData", isSignal: false, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: false, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, showItems: { classPropertyName: "showItems", publicName: "showItems", isSignal: false, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: false, isRequired: false, transformFunction: null }, updateTime: { classPropertyName: "updateTime", publicName: "updateTime", isSignal: false, isRequired: false, transformFunction: null }, filterTime: { classPropertyName: "filterTime", publicName: "filterTime", isSignal: false, isRequired: false, transformFunction: null }, maxPages: { classPropertyName: "maxPages", publicName: "maxPages", isSignal: false, isRequired: false, transformFunction: null }, directionLinks: { classPropertyName: "directionLinks", publicName: "directionLinks", isSignal: false, isRequired: false, transformFunction: null }, boundaryLinks: { classPropertyName: "boundaryLinks", publicName: "boundaryLinks", isSignal: false, isRequired: false, transformFunction: null }, orderBy: { classPropertyName: "orderBy", publicName: "orderBy", isSignal: false, isRequired: false, transformFunction: null }, orderDescending: { classPropertyName: "orderDescending", publicName: "orderDescending", isSignal: false, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: false, isRequired: false, transformFunction: null }, titlePrefix: { classPropertyName: "titlePrefix", publicName: "titlePrefix", isSignal: false, isRequired: false, transformFunction: null }, dragStartFn: { classPropertyName: "dragStartFn", publicName: "dragStartFn", isSignal: false, isRequired: false, transformFunction: null }, dragEnterFn: { classPropertyName: "dragEnterFn", publicName: "dragEnterFn", isSignal: false, isRequired: false, transformFunction: null }, dropFn: { classPropertyName: "dropFn", publicName: "dropFn", isSignal: false, isRequired: false, transformFunction: null }, globalTemplatePrefix: { classPropertyName: "globalTemplatePrefix", publicName: "globalTemplatePrefix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, queries: [{ propertyName: "fallbackTemplate", first: true, predicate: ["fallbackTemplate"], descendants: true, isSignal: true }, { propertyName: "templateDirectives", predicate: DynamicTableTemplateDirective, isSignal: true }, { propertyName: "rowTemplate", first: true, predicate: ["rowTemplate"], descendants: true, static: true }, { propertyName: "wrapperTemplate", first: true, predicate: ["wrapperTemplate"], descendants: true, static: true }], 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: "pagination", first: true, predicate: ["pagination"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@let columnTemplates = templates();\r\n@let prefix = globalTemplatePrefix();\r\n@let fallback = fallbackTemplate();\r\n\r\n<ng-template #defaultTemplate let-item=\"item\" let-column=\"column\" let-columnDef=\"columnDef\">\r\n <dynamic-table-cell [item]=\"item\"\r\n [column]=\"columnDef\"\r\n [id]=\"column\"\r\n [globalTemplatePrefix]=\"prefix\"\r\n [fallbackTemplate]=\"fallback\"></dynamic-table-cell>\r\n</ng-template>\r\n\r\n<ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n @if (!template?.pure) {\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\"\r\n [context]=\"context\"></ng-container>\r\n </td>\r\n } @else {\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n }\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: columnTemplates[column],\r\n column: column,\r\n columnDef: columnDefs[column]\r\n }\"></ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultRowTemplate let-context>\r\n <tr #elem\r\n [draggable]=\"!!dragStartFn\"\r\n [ngClass]=\"{active: selected === context.item}\"\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 (click)=\"onClick.emit(context.item)\">\r\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\"\r\n [context]=\"context\"></ng-container>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate let-column=\"column\" let-toggle=\"toggle\">\r\n <ng-template #defaultCol>\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </ng-template>\r\n <ng-template #emptyCol>\r\n <span>-</span>\r\n </ng-template>\r\n <ng-container *ngIf=\"columnDefs[column]; else emptyCol\">\r\n <a *ngIf=\"columnDefs[column].sort; else defaultCol\"\r\n [ngClass]=\"['sort', orderBy !== column ? '' : (orderDescending ? 'sort-desc' : 'sort-asc')]\"\r\n (click)=\"setSorting(column, toggle)\">\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </a>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<div class=\"dynamic-table\">\r\n <div class=\"table-features-row\">\r\n <ng-content select=\"[table-features-before]\"></ng-content>\r\n @if (showFilter) {\r\n <div class=\"table-input-wrap table-search-filter\">\r\n <label *ngIf=\"filterLabel\" [attr.for]=\"tableId\">\r\n {{ filterLabel | translate }}\r\n </label>\r\n <input type=\"text\"\r\n class=\"search-input\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"filter\"\r\n (ngModelChange)=\"setFilter($event)\"/>\r\n </div>\r\n }\r\n @if (sortable) {\r\n <dropdown-box componentClass=\"sort-dropdown\" #sortDd>\r\n <ng-container toggle-content\r\n [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: orderBy, toggle: sortDd}\"></ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let column of cols\">\r\n <li [ngClass]=\"'sort-column sort-' + column\" *ngIf=\"columnDefs[column].sort\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n }\r\n @if (showItems) {\r\n <div class=\"table-input-wrap table-items-count\">\r\n <label>\r\n {{ 'label.items.before' | translate }}\r\n </label>\r\n <dropdown-box>\r\n <ng-container toggle-content>\r\n {{ itemsPerPage }}\r\n </ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let count of showItems\">\r\n <li [ngClass]=\"'item-count count-' + count\" (click)=\"setItemsPerPage(count)\">\r\n {{ count }}\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n <label>\r\n {{ 'label.items.after' | translate }}\r\n </label>\r\n </div>\r\n }\r\n <ng-content select=\"[table-features-after]\"></ng-content>\r\n </div>\r\n <div class=\"table-content-row\"\r\n #pagination=\"pagination\"\r\n [pagination]=\"loadData\"\r\n [page]=\"page\"\r\n [itemsPerPage]=\"itemsPerPage\"\r\n [updateTime]=\"updateTime\">\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\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]=\"'header-column column-' + column\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\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=\"columnDefs[column].filter\" [ngSwitch]=\"columnDefs[column].filterType\">\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n @let optionPrefix = columnDefs[column].enumPrefix || column;\r\n <ng-template #optionItem let-option=\"option\">\r\n <span [ngClass]=\"`table-enum enum-${optionPrefix} enum-value-${option}`\">\r\n <span>{{ `${optionPrefix}.${option}` | translate }}</span>\r\n </span>\r\n </ng-template>\r\n <dropdown-box componentClass=\"filter-box\"\r\n [ngClass]=\"'filter-box-' + column\" [closeInside]=\"false\">\r\n <ng-container toggle-content>\r\n <span class=\"toggle-placeholder\" *ngIf=\"!query[column]\">\r\n {{ columnDefs[column].title | translate }}\r\n </span>\r\n <span [ngClass]=\"['option-' + option, column + '-option-' + option, option]\"\r\n *ngFor=\"let option of query[column] | values; let ix = index\">\r\n <ng-container *ngIf=\"ix > 0\">&nbsp;|&nbsp;</ng-container>\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ul>\r\n @for (option of columnDefs[column].enum; track option) {\r\n <li (click)=\"setQueryValue(column, option)\">\r\n <a class=\"toggle-link\" [ngClass]=\"'toggle-link-' + column\">\r\n <input type=\"checkbox\" [checked]=\"query[column] | includes: option\">\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </dropdown-box>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <input type=\"checkbox\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <input class=\"search-input\"\r\n type=\"text\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\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 <div class=\"table-wrapper\">\r\n <ng-content select=\"[table-top]\"></ng-content>\r\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\r\n [context]=\"this\"></ng-container>\r\n <ng-content select=\"[table-bottom]\"></ng-content>\r\n </div>\r\n </div>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n </div>\r\n</div>\r\n", styles: [".dynamic-table{--table-bg: transparent;--table-stripe-bg: rgba(210, 210, 210, .35);--border-size: 1px;--border-color: #ced4da;--bg-color: #ffffff;--text-color: #151515;--highlight-color: var(--primary-color, #888888);--highlight-text-color: #ffffff;--display-toggle: none;--arrow-size: 6px;--arrow-rotation: 90;--arrow-space: calc(var(--arrow-size) * .5 + 1px);--arrow-color: #c6c6c6}.dynamic-table *{box-sizing:border-box}.dynamic-table div.table-enum{text-align:center}.dynamic-table .search-input{background:var(--bg-color);color:var(--text-color);border:var(--border-size) solid var(--border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dynamic-table .search-input .toggle-placeholder,.dynamic-table .search-input ::placeholder{color:#495057}.dynamic-table .table-responsive{border:1px solid var(--border-color);overflow:hidden;overflow-x:auto;margin-bottom:1rem}.dynamic-table .table-features-row:not(:empty){display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}.dynamic-table .table-content-row{position:relative}.dynamic-table .sort-dropdown{display:none}.dynamic-table .table-input-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px}.dynamic-table .table-input-wrap>label{margin:0;font-weight:700}.dynamic-table .table-input-wrap>input{max-width:400px}.dynamic-table .table-items-count{flex:1}.dynamic-table .table-wrapper{position:relative}.dynamic-table table.table{border-collapse:collapse;margin:0;width:100%;font-family:inherit;font-size:inherit}.dynamic-table table.table th{text-align:left}.dynamic-table table.table th,.dynamic-table table.table td{text-align:left;padding:6px 12px;border:1px solid var(--border-color);vertical-align:middle;white-space:nowrap;width:var(--cell-width, 25%);min-width:fit-content}.dynamic-table table.table-sm th,.dynamic-table table.table-sm td{font-size:var(--font-size-sm);padding:4px 6px}.dynamic-table table.table thead th{font-weight:500}.dynamic-table table.table thead th .dropdown-box{display:block;width:100%;text-align:left}.dynamic-table table.table thead th .search-input{width:100%}.dynamic-table table.table thead th span{display:inline-block;vertical-align:top}.dynamic-table table.table thead th a{cursor:pointer;text-align:left}.dynamic-table table.table thead th.filter-column{text-align:center}.dynamic-table table.table thead tr:first-child th{border-top-width:0}.dynamic-table table.table tbody tr:last-child td{border-bottom-width:0}.dynamic-table table.table thead tr th,.dynamic-table table.table tbody tr td{background-color:var(--table-bg)}.dynamic-table table.table thead tr th:first-child,.dynamic-table table.table tbody tr td:first-child{border-left-width:0}.dynamic-table table.table thead tr th:last-child,.dynamic-table table.table tbody tr td:last-child{border-right-width:0}.dynamic-table table.table tbody tr.active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd) td{background-color:var(--table-stripe-bg)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd).active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:0;padding-right:0}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link:after{display:none}.sort-dropdown-content-wrapper a.sort,.dynamic-table a.sort{position:relative;display:block;margin-right:calc(var(--arrow-size) * 2);-webkit-user-select:none;user-select:none;padding-right:5px}.sort-dropdown-content-wrapper a.sort:before,.sort-dropdown-content-wrapper a.sort:after,.dynamic-table a.sort:before,.dynamic-table a.sort:after{content:\"\";position:absolute;transition:.2s ease;left:calc(100% + var(--arrow-size));top:calc(50% - var(--arrow-size));border-top:var(--arrow-size) solid transparent;border-bottom:var(--arrow-size) solid transparent;border-left:var(--arrow-size) solid var(--arrow-color);transform:rotate(calc(var(--arrow-rotation) * 1deg)) translate(var(--arrow-space))}.sort-dropdown-content-wrapper a.sort:before,.dynamic-table a.sort:before{--arrow-rotation: -90}.sort-dropdown-content-wrapper a.sort.sort-desc:before,.dynamic-table a.sort.sort-desc:before{--arrow-color: black}.sort-dropdown-content-wrapper a.sort.sort-asc:after,.dynamic-table a.sort.sort-asc:after{--arrow-color: black}.table-enum{--enum-color: #c6c6c6;--enum-radius: 5px}.table-enum span{display:inline-block;padding:2px 5px;background:color-mix(in srgb,var(--enum-color),rgba(255,255,255,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\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: 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: 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: DropdownBoxComponent, selector: "dropdown-box", inputs: ["closeInside", "attachTo", "placement", "crossAxis", "alignment", "autoAlignment", "allowedPlacements", "componentClass"] }, { kind: "component", type: DynamicTableCellComponent, selector: "dynamic-table-cell", inputs: ["item", "column", "id", "globalTemplatePrefix", "fallbackTemplate"] }, { kind: "component", type: PaginationMenuComponent, selector: "pagination-menu", inputs: ["maxSize", "urlParam", "directionLinks", "boundaryLinks"] }, { kind: "pipe", type: IncludesPipe, name: "includes" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: ValuesPipe, name: "values" }], encapsulation: i0.ViewEncapsulation.None }); }
8254
8226
  }
8255
8227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: DynamicTableComponent, decorators: [{
8256
8228
  type: Component,
8257
- args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "dynamic-table", template: "@let columnTemplates = templates();\r\n@let prefix = globalTemplatePrefix();\r\n@let fallback = fallbackTemplate();\r\n\r\n<ng-template #defaultTemplate let-item=\"item\" let-column=\"column\" let-columnDef=\"columnDef\">\r\n <dynamic-table-cell [item]=\"item\"\r\n [column]=\"columnDef\"\r\n [id]=\"column\"\r\n [globalTemplatePrefix]=\"prefix\"\r\n [fallbackTemplate]=\"fallback\"></dynamic-table-cell>\r\n</ng-template>\r\n\r\n<ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n @if (!template?.pure) {\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\"\r\n [context]=\"context\"></ng-container>\r\n </td>\r\n } @else {\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n }\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: columnTemplates[column],\r\n column: column,\r\n columnDef: columnDefs[column]\r\n }\"></ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultRowTemplate let-context>\r\n <tr #elem\r\n [draggable]=\"!!dragStartFn\"\r\n [ngClass]=\"{active: selected === context.item}\"\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 (click)=\"onClick.emit(context.item)\">\r\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\"\r\n [context]=\"context\"></ng-container>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate let-column=\"column\" let-toggle=\"toggle\">\r\n <ng-template #defaultCol>\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </ng-template>\r\n <ng-template #emptyCol>\r\n <span>-</span>\r\n </ng-template>\r\n <ng-container *ngIf=\"columnDefs[column]; else emptyCol\">\r\n <a *ngIf=\"columnDefs[column].sort; else defaultCol\"\r\n [ngClass]=\"['sort', orderBy !== column ? '' : (orderDescending ? 'sort-desc' : 'sort-asc')]\"\r\n (click)=\"setSorting(column, toggle)\">\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </a>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<div class=\"dynamic-table\">\r\n <div class=\"table-features-row\">\r\n <ng-content select=\"[table-features-before]\"></ng-content>\r\n @if (showFilter) {\r\n <div class=\"table-input-wrap table-search-filter\">\r\n <label *ngIf=\"filterLabel\" [attr.for]=\"tableId\">\r\n {{ filterLabel | translate }}\r\n </label>\r\n <input type=\"text\"\r\n class=\"search-input\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"filter\"\r\n (ngModelChange)=\"setFilter($event)\"/>\r\n </div>\r\n }\r\n @if (sortable) {\r\n <dropdown-box componentClass=\"sort-dropdown\" #sortDd>\r\n <ng-container toggle-content\r\n [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: orderBy, toggle: sortDd}\"></ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let column of cols\">\r\n <li [ngClass]=\"'sort-column sort-' + column\" *ngIf=\"columnDefs[column].sort\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n }\r\n @if (showItems) {\r\n <div class=\"table-input-wrap table-items-count\">\r\n <label>\r\n {{ 'label.items.before' | translate }}\r\n </label>\r\n <dropdown-box>\r\n <ng-container toggle-content>\r\n {{ itemsPerPage }}\r\n </ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let count of showItems\">\r\n <li [ngClass]=\"'item-count count-' + count\" (click)=\"setItemsPerPage(count)\">\r\n {{ count }}\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n <label>\r\n {{ 'label.items.after' | translate }}\r\n </label>\r\n </div>\r\n }\r\n <ng-content select=\"[table-features-after]\"></ng-content>\r\n </div>\r\n <div class=\"table-content-row\"\r\n #pagination=\"pagination\"\r\n [pagination]=\"loadData\"\r\n [page]=\"page\"\r\n [itemsPerPage]=\"itemsPerPage\"\r\n [updateTime]=\"updateTime\">\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\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]=\"'header-column column-' + column\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\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=\"columnDefs[column].filter\" [ngSwitch]=\"columnDefs[column].filterType\">\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n <ng-template #optionItem let-option=\"option\">\r\n <span [ngClass]=\"`table-enum enum-${column} enum-value-${option}`\">\r\n <span>{{ `${column}.${option}` | translate }}</span>\r\n </span>\r\n </ng-template>\r\n <dropdown-box componentClass=\"filter-box\"\r\n [ngClass]=\"'filter-box-' + column\" [closeInside]=\"false\">\r\n <ng-container toggle-content>\r\n <span class=\"toggle-placeholder\" *ngIf=\"!query[column]\">\r\n {{ columnDefs[column].title | translate }}\r\n </span>\r\n <span [ngClass]=\"['option-' + option, column + '-option-' + option, option]\"\r\n *ngFor=\"let option of query[column] | values; let ix = index\">\r\n <ng-container *ngIf=\"ix > 0\">&nbsp;|&nbsp;</ng-container>\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ul>\r\n @for (option of columnDefs[column].enum; track option) {\r\n <li (click)=\"setQueryValue(column, option)\">\r\n <a class=\"toggle-link\" [ngClass]=\"'toggle-link-' + column\">\r\n <input type=\"checkbox\" [checked]=\"query[column] | includes: option\">\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </dropdown-box>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <input type=\"checkbox\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <input class=\"search-input\"\r\n type=\"text\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\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 <div class=\"table-wrapper\">\r\n <ng-content select=\"[table-top]\"></ng-content>\r\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\r\n [context]=\"this\"></ng-container>\r\n <ng-content select=\"[table-bottom]\"></ng-content>\r\n </div>\r\n </div>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n </div>\r\n</div>\r\n", styles: [".dynamic-table{--table-bg: transparent;--table-stripe-bg: rgba(210, 210, 210, .35);--border-size: 1px;--border-color: #ced4da;--bg-color: #ffffff;--text-color: #151515;--highlight-color: var(--primary-color, #888888);--highlight-text-color: #ffffff;--display-toggle: none;--arrow-size: 6px;--arrow-rotation: 90;--arrow-space: calc(var(--arrow-size) * .5 + 1px);--arrow-color: #c6c6c6}.dynamic-table *{box-sizing:border-box}.dynamic-table div.table-enum{text-align:center}.dynamic-table .search-input{background:var(--bg-color);color:var(--text-color);border:var(--border-size) solid var(--border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dynamic-table .search-input .toggle-placeholder,.dynamic-table .search-input ::placeholder{color:#495057}.dynamic-table .table-responsive{border:1px solid var(--border-color);overflow:hidden;overflow-x:auto;margin-bottom:1rem}.dynamic-table .table-features-row:not(:empty){display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}.dynamic-table .table-content-row{position:relative}.dynamic-table .sort-dropdown{display:none}.dynamic-table .table-input-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px}.dynamic-table .table-input-wrap>label{margin:0;font-weight:700}.dynamic-table .table-input-wrap>input{max-width:400px}.dynamic-table .table-items-count{flex:1}.dynamic-table .table-wrapper{position:relative}.dynamic-table table.table{border-collapse:collapse;margin:0;width:100%;font-family:inherit;font-size:inherit}.dynamic-table table.table th{text-align:left}.dynamic-table table.table th,.dynamic-table table.table td{text-align:left;padding:6px 12px;border:1px solid var(--border-color);vertical-align:middle;white-space:nowrap;width:var(--cell-width, 25%);min-width:fit-content}.dynamic-table table.table-sm th,.dynamic-table table.table-sm td{font-size:var(--font-size-sm);padding:4px 6px}.dynamic-table table.table thead th{font-weight:500}.dynamic-table table.table thead th .dropdown-box{display:block;width:100%;text-align:left}.dynamic-table table.table thead th .search-input{width:100%}.dynamic-table table.table thead th span{display:inline-block;vertical-align:top}.dynamic-table table.table thead th a{cursor:pointer;text-align:left}.dynamic-table table.table thead th.filter-column{text-align:center}.dynamic-table table.table thead tr:first-child th{border-top-width:0}.dynamic-table table.table tbody tr:last-child td{border-bottom-width:0}.dynamic-table table.table thead tr th,.dynamic-table table.table tbody tr td{background-color:var(--table-bg)}.dynamic-table table.table thead tr th:first-child,.dynamic-table table.table tbody tr td:first-child{border-left-width:0}.dynamic-table table.table thead tr th:last-child,.dynamic-table table.table tbody tr td:last-child{border-right-width:0}.dynamic-table table.table tbody tr.active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd) td{background-color:var(--table-stripe-bg)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd).active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:0;padding-right:0}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link:after{display:none}.sort-dropdown-content-wrapper a.sort,.dynamic-table a.sort{position:relative;display:block;margin-right:calc(var(--arrow-size) * 2);-webkit-user-select:none;user-select:none;padding-right:5px}.sort-dropdown-content-wrapper a.sort:before,.sort-dropdown-content-wrapper a.sort:after,.dynamic-table a.sort:before,.dynamic-table a.sort:after{content:\"\";position:absolute;transition:.2s ease;left:calc(100% + var(--arrow-size));top:calc(50% - var(--arrow-size));border-top:var(--arrow-size) solid transparent;border-bottom:var(--arrow-size) solid transparent;border-left:var(--arrow-size) solid var(--arrow-color);transform:rotate(calc(var(--arrow-rotation) * 1deg)) translate(var(--arrow-space))}.sort-dropdown-content-wrapper a.sort:before,.dynamic-table a.sort:before{--arrow-rotation: -90}.sort-dropdown-content-wrapper a.sort.sort-desc:before,.dynamic-table a.sort.sort-desc:before{--arrow-color: black}.sort-dropdown-content-wrapper a.sort.sort-asc:after,.dynamic-table a.sort.sort-asc:after{--arrow-color: black}.table-enum{--enum-color: #c6c6c6;--enum-radius: 5px}.table-enum span{display:inline-block;padding:2px 5px;background:color-mix(in srgb,var(--enum-color),rgba(255,255,255,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
8229
+ args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "dynamic-table", template: "@let columnTemplates = templates();\r\n@let prefix = globalTemplatePrefix();\r\n@let fallback = fallbackTemplate();\r\n\r\n<ng-template #defaultTemplate let-item=\"item\" let-column=\"column\" let-columnDef=\"columnDef\">\r\n <dynamic-table-cell [item]=\"item\"\r\n [column]=\"columnDef\"\r\n [id]=\"column\"\r\n [globalTemplatePrefix]=\"prefix\"\r\n [fallbackTemplate]=\"fallback\"></dynamic-table-cell>\r\n</ng-template>\r\n\r\n<ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\r\n @if (!template?.pure) {\r\n <td [ngClass]=\"'column-' + column\"\r\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\">\r\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\"\r\n [context]=\"context\"></ng-container>\r\n </td>\r\n } @else {\r\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\r\n }\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: columnTemplates[column],\r\n column: column,\r\n columnDef: columnDefs[column]\r\n }\"></ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultRowTemplate let-context>\r\n <tr #elem\r\n [draggable]=\"!!dragStartFn\"\r\n [ngClass]=\"{active: selected === context.item}\"\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 (click)=\"onClick.emit(context.item)\">\r\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\"\r\n [context]=\"context\"></ng-container>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate let-column=\"column\" let-toggle=\"toggle\">\r\n <ng-template #defaultCol>\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </ng-template>\r\n <ng-template #emptyCol>\r\n <span>-</span>\r\n </ng-template>\r\n <ng-container *ngIf=\"columnDefs[column]; else emptyCol\">\r\n <a *ngIf=\"columnDefs[column].sort; else defaultCol\"\r\n [ngClass]=\"['sort', orderBy !== column ? '' : (orderDescending ? 'sort-desc' : 'sort-asc')]\"\r\n (click)=\"setSorting(column, toggle)\">\r\n <span>{{ columnDefs[column].title | translate }}</span>\r\n </a>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<div class=\"dynamic-table\">\r\n <div class=\"table-features-row\">\r\n <ng-content select=\"[table-features-before]\"></ng-content>\r\n @if (showFilter) {\r\n <div class=\"table-input-wrap table-search-filter\">\r\n <label *ngIf=\"filterLabel\" [attr.for]=\"tableId\">\r\n {{ filterLabel | translate }}\r\n </label>\r\n <input type=\"text\"\r\n class=\"search-input\"\r\n [attr.id]=\"tableId\"\r\n [attr.data-testid]=\"testId + '-filter-input'\"\r\n [placeholder]=\"placeholder | translate\"\r\n [ngModel]=\"filter\"\r\n (ngModelChange)=\"setFilter($event)\"/>\r\n </div>\r\n }\r\n @if (sortable) {\r\n <dropdown-box componentClass=\"sort-dropdown\" #sortDd>\r\n <ng-container toggle-content\r\n [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: orderBy, toggle: sortDd}\"></ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let column of cols\">\r\n <li [ngClass]=\"'sort-column sort-' + column\" *ngIf=\"columnDefs[column].sort\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n }\r\n @if (showItems) {\r\n <div class=\"table-input-wrap table-items-count\">\r\n <label>\r\n {{ 'label.items.before' | translate }}\r\n </label>\r\n <dropdown-box>\r\n <ng-container toggle-content>\r\n {{ itemsPerPage }}\r\n </ng-container>\r\n <ul>\r\n <ng-container *ngFor=\"let count of showItems\">\r\n <li [ngClass]=\"'item-count count-' + count\" (click)=\"setItemsPerPage(count)\">\r\n {{ count }}\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </dropdown-box>\r\n <label>\r\n {{ 'label.items.after' | translate }}\r\n </label>\r\n </div>\r\n }\r\n <ng-content select=\"[table-features-after]\"></ng-content>\r\n </div>\r\n <div class=\"table-content-row\"\r\n #pagination=\"pagination\"\r\n [pagination]=\"loadData\"\r\n [page]=\"page\"\r\n [itemsPerPage]=\"itemsPerPage\"\r\n [updateTime]=\"updateTime\">\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n <div class=\"table-responsive\">\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]=\"'header-column column-' + column\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\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=\"columnDefs[column].filter\" [ngSwitch]=\"columnDefs[column].filterType\">\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n @let optionPrefix = columnDefs[column].enumPrefix || column;\r\n <ng-template #optionItem let-option=\"option\">\r\n <span [ngClass]=\"`table-enum enum-${optionPrefix} enum-value-${option}`\">\r\n <span>{{ `${optionPrefix}.${option}` | translate }}</span>\r\n </span>\r\n </ng-template>\r\n <dropdown-box componentClass=\"filter-box\"\r\n [ngClass]=\"'filter-box-' + column\" [closeInside]=\"false\">\r\n <ng-container toggle-content>\r\n <span class=\"toggle-placeholder\" *ngIf=\"!query[column]\">\r\n {{ columnDefs[column].title | translate }}\r\n </span>\r\n <span [ngClass]=\"['option-' + option, column + '-option-' + option, option]\"\r\n *ngFor=\"let option of query[column] | values; let ix = index\">\r\n <ng-container *ngIf=\"ix > 0\">&nbsp;|&nbsp;</ng-container>\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </span>\r\n </ng-container>\r\n <ul>\r\n @for (option of columnDefs[column].enum; track option) {\r\n <li (click)=\"setQueryValue(column, option)\">\r\n <a class=\"toggle-link\" [ngClass]=\"'toggle-link-' + column\">\r\n <input type=\"checkbox\" [checked]=\"query[column] | includes: option\">\r\n <ng-container [ngTemplateOutlet]=\"optionItem\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </dropdown-box>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <input type=\"checkbox\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <input class=\"search-input\"\r\n type=\"text\"\r\n [attr.data-testid]=\"testId + '-filter-' + column\"\r\n [placeholder]=\"columnDefs[column].title | translate\"\r\n [ngModel]=\"query[column]\"\r\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\r\n </ng-container>\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 <div class=\"table-wrapper\">\r\n <ng-content select=\"[table-top]\"></ng-content>\r\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\r\n [context]=\"this\"></ng-container>\r\n <ng-content select=\"[table-bottom]\"></ng-content>\r\n </div>\r\n </div>\r\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\r\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\r\n </div>\r\n</div>\r\n", styles: [".dynamic-table{--table-bg: transparent;--table-stripe-bg: rgba(210, 210, 210, .35);--border-size: 1px;--border-color: #ced4da;--bg-color: #ffffff;--text-color: #151515;--highlight-color: var(--primary-color, #888888);--highlight-text-color: #ffffff;--display-toggle: none;--arrow-size: 6px;--arrow-rotation: 90;--arrow-space: calc(var(--arrow-size) * .5 + 1px);--arrow-color: #c6c6c6}.dynamic-table *{box-sizing:border-box}.dynamic-table div.table-enum{text-align:center}.dynamic-table .search-input{background:var(--bg-color);color:var(--text-color);border:var(--border-size) solid var(--border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dynamic-table .search-input .toggle-placeholder,.dynamic-table .search-input ::placeholder{color:#495057}.dynamic-table .table-responsive{border:1px solid var(--border-color);overflow:hidden;overflow-x:auto;margin-bottom:1rem}.dynamic-table .table-features-row:not(:empty){display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}.dynamic-table .table-content-row{position:relative}.dynamic-table .sort-dropdown{display:none}.dynamic-table .table-input-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px}.dynamic-table .table-input-wrap>label{margin:0;font-weight:700}.dynamic-table .table-input-wrap>input{max-width:400px}.dynamic-table .table-items-count{flex:1}.dynamic-table .table-wrapper{position:relative}.dynamic-table table.table{border-collapse:collapse;margin:0;width:100%;font-family:inherit;font-size:inherit}.dynamic-table table.table th{text-align:left}.dynamic-table table.table th,.dynamic-table table.table td{text-align:left;padding:6px 12px;border:1px solid var(--border-color);vertical-align:middle;white-space:nowrap;width:var(--cell-width, 25%);min-width:fit-content}.dynamic-table table.table-sm th,.dynamic-table table.table-sm td{font-size:var(--font-size-sm);padding:4px 6px}.dynamic-table table.table thead th{font-weight:500}.dynamic-table table.table thead th .dropdown-box{display:block;width:100%;text-align:left}.dynamic-table table.table thead th .search-input{width:100%}.dynamic-table table.table thead th span{display:inline-block;vertical-align:top}.dynamic-table table.table thead th a{cursor:pointer;text-align:left}.dynamic-table table.table thead th.filter-column{text-align:center}.dynamic-table table.table thead tr:first-child th{border-top-width:0}.dynamic-table table.table tbody tr:last-child td{border-bottom-width:0}.dynamic-table table.table thead tr th,.dynamic-table table.table tbody tr td{background-color:var(--table-bg)}.dynamic-table table.table thead tr th:first-child,.dynamic-table table.table tbody tr td:first-child{border-left-width:0}.dynamic-table table.table thead tr th:last-child,.dynamic-table table.table tbody tr td:last-child{border-right-width:0}.dynamic-table table.table tbody tr.active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd) td{background-color:var(--table-stripe-bg)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd).active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:0;padding-right:0}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link:after{display:none}.sort-dropdown-content-wrapper a.sort,.dynamic-table a.sort{position:relative;display:block;margin-right:calc(var(--arrow-size) * 2);-webkit-user-select:none;user-select:none;padding-right:5px}.sort-dropdown-content-wrapper a.sort:before,.sort-dropdown-content-wrapper a.sort:after,.dynamic-table a.sort:before,.dynamic-table a.sort:after{content:\"\";position:absolute;transition:.2s ease;left:calc(100% + var(--arrow-size));top:calc(50% - var(--arrow-size));border-top:var(--arrow-size) solid transparent;border-bottom:var(--arrow-size) solid transparent;border-left:var(--arrow-size) solid var(--arrow-color);transform:rotate(calc(var(--arrow-rotation) * 1deg)) translate(var(--arrow-space))}.sort-dropdown-content-wrapper a.sort:before,.dynamic-table a.sort:before{--arrow-rotation: -90}.sort-dropdown-content-wrapper a.sort.sort-desc:before,.dynamic-table a.sort.sort-desc:before{--arrow-color: black}.sort-dropdown-content-wrapper a.sort.sort-asc:after,.dynamic-table a.sort.sort-asc:after{--arrow-color: black}.table-enum{--enum-color: #c6c6c6;--enum-radius: 5px}.table-enum span{display:inline-block;padding:2px 5px;background:color-mix(in srgb,var(--enum-color),rgba(255,255,255,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
8258
8230
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { dataLoader: [{
8259
8231
  type: Input
8260
8232
  }], data: [{
@@ -9130,11 +9102,11 @@ class UnorderedListComponent {
9130
9102
  this.cdr.detectChanges();
9131
9103
  }
9132
9104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UnorderedListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
9133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", 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\" #defaultKeyTemplate>\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\n</ng-template>\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"item.key\" let-value=\"item.value\" let-path=\"path\"\n let-templates=\"templates\" let-type=\"valueType\" #defaultValueTemplate>\n @if (type === 'enum') {\n <span [ngClass]=\"`list-enum enum-${key} enum-value-${value}`\">\n <span>{{ `${key}.${value}` | translate }}</span>\n </span>\n }\n @else if (type === 'object' || type === 'array') {\n <unordered-list [data]=\"value\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level + 1\"\n [templates]=\"templates\"></unordered-list>\n } @else {\n <span [innerHTML]=\"value\"></span>\n }\n</ng-template>\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>\n <ng-template #itemKey>\n <ng-container [unorderedListItem]=\"item\"\n type=\"key\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-template #itemValue>\n <ng-container [unorderedListItem]=\"item\"\n type=\"value\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-container *ngIf=\"!isArray\">\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\n </th>\n </ng-container>\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\n </td>\n</ng-template>\n<ng-template #value>\n <span [innerHTML]=\"data\"></span>\n</ng-template>\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\n <ul [ngClass]=\"'level-' + level\" *ngSwitchCase=\"'list'\">\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </li>\n </ul>\n <table [ngClass]=\"'level-' + level\" *ngSwitchDefault>\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </tr>\n </table>\n</ng-container>\n", styles: [".unordered-list *{box-sizing:border-box}.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,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\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" }] }); }
9105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", 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\" #defaultKeyTemplate>\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\n</ng-template>\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"item.key\" let-value=\"item.value\" let-path=\"path\"\n let-templates=\"templates\" let-type=\"valueType\" #defaultValueTemplate>\n @if (type === 'enum') {\n <span [ngClass]=\"`list-enum enum-${key} enum-value-${value}`\">\n <span>{{ `${key}.${value}` | translate }}</span>\n </span>\n }\n @else if (type === 'object' || type === 'array') {\n <unordered-list [data]=\"value\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level + 1\"\n [templates]=\"templates\"></unordered-list>\n } @else {\n <span [innerHTML]=\"value\"></span>\n }\n</ng-template>\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>\n <ng-template #itemKey>\n <ng-container [unorderedListItem]=\"item\"\n type=\"key\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-template #itemValue>\n <ng-container [unorderedListItem]=\"item\"\n type=\"value\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-container *ngIf=\"!isArray\">\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\n </th>\n </ng-container>\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\n </td>\n</ng-template>\n<ng-template #value>\n <span [innerHTML]=\"data\"></span>\n</ng-template>\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\n <ul [ngClass]=\"'level-' + level\" *ngSwitchCase=\"'list'\">\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </li>\n </ul>\n <table [ngClass]=\"'level-' + level\" *ngSwitchDefault>\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </tr>\n </table>\n</ng-container>\n", styles: [".unordered-list *{box-sizing:border-box}.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,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\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" }], encapsulation: i0.ViewEncapsulation.None }); }
9134
9106
  }
9135
9107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: UnorderedListComponent, decorators: [{
9136
9108
  type: Component,
9137
- args: [{ standalone: false, selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" #defaultKeyTemplate>\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\n</ng-template>\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"item.key\" let-value=\"item.value\" let-path=\"path\"\n let-templates=\"templates\" let-type=\"valueType\" #defaultValueTemplate>\n @if (type === 'enum') {\n <span [ngClass]=\"`list-enum enum-${key} enum-value-${value}`\">\n <span>{{ `${key}.${value}` | translate }}</span>\n </span>\n }\n @else if (type === 'object' || type === 'array') {\n <unordered-list [data]=\"value\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level + 1\"\n [templates]=\"templates\"></unordered-list>\n } @else {\n <span [innerHTML]=\"value\"></span>\n }\n</ng-template>\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>\n <ng-template #itemKey>\n <ng-container [unorderedListItem]=\"item\"\n type=\"key\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-template #itemValue>\n <ng-container [unorderedListItem]=\"item\"\n type=\"value\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-container *ngIf=\"!isArray\">\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\n </th>\n </ng-container>\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\n </td>\n</ng-template>\n<ng-template #value>\n <span [innerHTML]=\"data\"></span>\n</ng-template>\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\n <ul [ngClass]=\"'level-' + level\" *ngSwitchCase=\"'list'\">\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </li>\n </ul>\n <table [ngClass]=\"'level-' + level\" *ngSwitchDefault>\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </tr>\n </table>\n</ng-container>\n", styles: [".unordered-list *{box-sizing:border-box}.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,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
9109
+ args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" #defaultKeyTemplate>\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\n</ng-template>\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-key=\"item.key\" let-value=\"item.value\" let-path=\"path\"\n let-templates=\"templates\" let-type=\"valueType\" #defaultValueTemplate>\n @if (type === 'enum') {\n <span [ngClass]=\"`list-enum enum-${key} enum-value-${value}`\">\n <span>{{ `${key}.${value}` | translate }}</span>\n </span>\n }\n @else if (type === 'object' || type === 'array') {\n <unordered-list [data]=\"value\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level + 1\"\n [templates]=\"templates\"></unordered-list>\n } @else {\n <span [innerHTML]=\"value\"></span>\n }\n</ng-template>\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>\n <ng-template #itemKey>\n <ng-container [unorderedListItem]=\"item\"\n type=\"key\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-template #itemValue>\n <ng-container [unorderedListItem]=\"item\"\n type=\"value\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </ng-template>\n <ng-container *ngIf=\"!isArray\">\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\n </th>\n </ng-container>\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\n </td>\n</ng-template>\n<ng-template #value>\n <span [innerHTML]=\"data\"></span>\n</ng-template>\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\n <ul [ngClass]=\"'level-' + level\" *ngSwitchCase=\"'list'\">\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </li>\n </ul>\n <table [ngClass]=\"'level-' + level\" *ngSwitchDefault>\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\n <ng-container type=\"item\"\n [unorderedListItem]=\"item\"\n [data]=\"data\"\n [keyPrefix]=\"keyPrefix\"\n [listStyle]=\"listStyle\"\n [path]=\"path ? path + '.' + item.key : item.key\"\n [level]=\"level\"\n [templates]=\"templates\"\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\n </tr>\n </table>\n</ng-container>\n", styles: [".unordered-list *{box-sizing:border-box}.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,.4588235294));border:1px solid var(--enum-color);border-radius:var(--enum-radius);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
9138
9110
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { data: [{
9139
9111
  type: Input
9140
9112
  }], keyPrefix: [{