@c8y/ngx-components 1024.20.1 → 1024.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +527 -12
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +31 -9
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +503 -62
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +3 -3
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-application-access-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-application-access-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-application-select.mjs +1 -1
- package/fesm2022/c8y-ngx-components-application-select.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +3 -2
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +5 -5
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-Jyjkv4JT.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CP1afwVe.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-Jyjkv4JT.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CP1afwVe.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +81 -20
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-UEUYsXBv.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CRvgIgri.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-UEUYsXBv.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CRvgIgri.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +2 -2
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +2 -2
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +146 -126
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +2 -2
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +4 -4
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events.mjs +2 -2
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +4 -4
- package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +5 -5
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +3 -3
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +3 -3
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +17 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-scada.mjs +21 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +60 -31
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +500 -38
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +72 -0
- package/locales/es.po +72 -0
- package/locales/fr.po +72 -0
- package/locales/ja_JP.po +72 -0
- package/locales/ko.po +72 -0
- package/locales/locales.pot +72 -3
- package/locales/nl.po +72 -0
- package/locales/pl.po +73 -1
- package/locales/pt_BR.po +74 -2
- package/locales/zh_CN.po +72 -0
- package/locales/zh_TW.po +72 -0
- package/package.json +1 -1
- package/types/c8y-ngx-components-ai-agent-chat.d.ts +201 -3
- package/types/c8y-ngx-components-ai-agent-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-ai-chat.d.ts +14 -4
- package/types/c8y-ngx-components-ai-ai-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai.d.ts +157 -2
- package/types/c8y-ngx-components-ai.d.ts.map +1 -1
- package/types/c8y-ngx-components-asset-properties.d.ts.map +1 -1
- package/types/c8y-ngx-components-context-dashboard.d.ts +37 -3
- package/types/c8y-ngx-components-context-dashboard.d.ts.map +1 -1
- package/types/c8y-ngx-components-echart.d.ts +6 -0
- package/types/c8y-ngx-components-echart.d.ts.map +1 -1
- package/types/c8y-ngx-components-widgets-implementations-asset-table.d.ts +5 -0
- package/types/c8y-ngx-components-widgets-implementations-asset-table.d.ts.map +1 -1
- package/types/c8y-ngx-components.d.ts +310 -12
- package/types/c8y-ngx-components.d.ts.map +1 -1
|
@@ -11,12 +11,12 @@ import { AssetSelectorModule } from '@c8y/ngx-components/assets-navigator';
|
|
|
11
11
|
import { WidgetConfigService, ContextDashboardService } from '@c8y/ngx-components/context-dashboard';
|
|
12
12
|
import { from, switchMap, isObservable, of, firstValueFrom, tap, BehaviorSubject, Subject, merge, startWith, scan, distinctUntilChanged, takeUntil, shareReplay, skip } from 'rxjs';
|
|
13
13
|
import * as i2$1 from '@c8y/ngx-components/asset-properties';
|
|
14
|
-
import { AssetPropertySelectorDrawerComponent } from '@c8y/ngx-components/asset-properties';
|
|
14
|
+
import { AssetPropertiesService, AssetPropertySelectorDrawerComponent } from '@c8y/ngx-components/asset-properties';
|
|
15
15
|
import { transform, identity, get as get$1, assign } from 'lodash';
|
|
16
16
|
import * as i2 from '@c8y/ngx-components/device-grid';
|
|
17
17
|
import { AlarmsDeviceGridColumn, StatusDeviceGridColumn } from '@c8y/ngx-components/device-grid';
|
|
18
18
|
import { gettext } from '@c8y/ngx-components/gettext';
|
|
19
|
-
import { get, isEqual } from 'lodash-es';
|
|
19
|
+
import { get, isEqual, cloneDeep } from 'lodash-es';
|
|
20
20
|
import * as i1$2 from '@ngx-translate/core';
|
|
21
21
|
import { TranslateService } from '@ngx-translate/core';
|
|
22
22
|
import * as i3 from 'ngx-bootstrap/tooltip';
|
|
@@ -701,6 +701,16 @@ class AssetTableService {
|
|
|
701
701
|
if (Object.keys(preConfigFilterObj).length > 0) {
|
|
702
702
|
andConditions.push({ __filter: filterQuery });
|
|
703
703
|
}
|
|
704
|
+
for (const [columnName, model] of Object.entries(preConfiguredFilter)) {
|
|
705
|
+
const column = columns.find(c => c.name === columnName);
|
|
706
|
+
const getFilter = column?.filteringConfig?.getFilter;
|
|
707
|
+
if (getFilter && model && typeof model === 'object') {
|
|
708
|
+
const columnFilter = getFilter(model);
|
|
709
|
+
if (columnFilter?.__or?.length || columnFilter?.__and?.length) {
|
|
710
|
+
andConditions.push({ __filter: columnFilter });
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
704
714
|
const combinedQueryObj = {
|
|
705
715
|
__filter: {
|
|
706
716
|
__and: andConditions
|
|
@@ -920,6 +930,22 @@ class AssetTableService {
|
|
|
920
930
|
}
|
|
921
931
|
return false;
|
|
922
932
|
}
|
|
933
|
+
/**
|
|
934
|
+
* Builds the grid-unique identifier (used as the column `name`/`__id`) for a selected property.
|
|
935
|
+
* The base identifier is the computed `instanceId` or the property name; the data grid
|
|
936
|
+
* de-duplicates columns by `name`, so when several selected properties share that base — e.g. the
|
|
937
|
+
* top-level `name` and a nested `c8y_Agent.name` — the nested ones are disambiguated by their full
|
|
938
|
+
* key path. Non-colliding properties keep their plain name, so existing saved configs (column
|
|
939
|
+
* order, sort orders, filters, custom headers keyed by that name) are unaffected.
|
|
940
|
+
*/
|
|
941
|
+
getColumnName(prop, allProperties) {
|
|
942
|
+
const base = prop.instanceId || prop.name || prop.title;
|
|
943
|
+
const collides = (allProperties || []).filter(p => (p.instanceId || p.name || p.title) === base).length > 1;
|
|
944
|
+
if (collides && prop.keyPath?.length) {
|
|
945
|
+
return prop.keyPath.join('.');
|
|
946
|
+
}
|
|
947
|
+
return base;
|
|
948
|
+
}
|
|
923
949
|
getFirstLinkableIndex(selectedProperties, config) {
|
|
924
950
|
if (!selectedProperties?.length)
|
|
925
951
|
return -1;
|
|
@@ -961,12 +987,10 @@ class AssetTableService {
|
|
|
961
987
|
? config.showAsLink
|
|
962
988
|
: false;
|
|
963
989
|
const column = this.createPropertyColumn(prop, columnType, isLink, config);
|
|
964
|
-
const uniqueName =
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
column.computedConfig.__propertyName = prop.name;
|
|
969
|
-
}
|
|
990
|
+
const uniqueName = this.getColumnName(prop, selectedProperties);
|
|
991
|
+
column.name = uniqueName;
|
|
992
|
+
if (prop.instanceId && column.computedConfig) {
|
|
993
|
+
column.computedConfig.__propertyName = prop.name;
|
|
970
994
|
}
|
|
971
995
|
column.__origin = 'selectedProperties';
|
|
972
996
|
column.__id = uniqueName;
|
|
@@ -1803,7 +1827,7 @@ class IconRenderTypeModalComponent {
|
|
|
1803
1827
|
});
|
|
1804
1828
|
}
|
|
1805
1829
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IconRenderTypeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1806
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: IconRenderTypeModalComponent, isStandalone: true, selector: "c8y-icon-render-type-modal", ngImport: i0, template: "<c8y-modal\n title=\"{{ 'Configure icon conditions' | translate }}\"\n (onClose)=\"onClose($event)\"\n (onDismiss)=\"onDismiss($event)\"\n [labels]=\"labels\"\n [disabled]=\"isAnyFormInvalid()\"\n [headerClasses]=\"'dialog-header'\"\n [flushBody]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-circle-star\"></span>\n </ng-container>\n <form class=\"p-24 p-t-0\">\n @for (form of forms; track form; let i = $index) {\n <fieldset\n class=\"c8y-fieldset\"\n [formGroup]=\"form\"\n >\n <legend>\n {{ 'If condition' | translate }}\n @if (forms.length > 1) {\n <button\n class=\"btn-dot btn-dot--danger\"\n title=\"{{ 'Remove condition' | translate }}\"\n type=\"button\"\n (click)=\"removeCondition(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n }\n </legend>\n <!-- Data type selection -->\n <div class=\"row tight-grid\">\n <div class=\"col-md-4 col-12\">\n <label\n for=\"dataType-{{ i }}\"\n translate\n >\n Data type\n </label>\n <c8y-select\n
|
|
1830
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: IconRenderTypeModalComponent, isStandalone: true, selector: "c8y-icon-render-type-modal", ngImport: i0, template: "<c8y-modal\n title=\"{{ 'Configure icon conditions' | translate }}\"\n (onClose)=\"onClose($event)\"\n (onDismiss)=\"onDismiss($event)\"\n [labels]=\"labels\"\n [disabled]=\"isAnyFormInvalid()\"\n [headerClasses]=\"'dialog-header'\"\n [flushBody]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-circle-star\"></span>\n </ng-container>\n <form class=\"p-24 p-t-0\">\n @for (form of forms; track form; let i = $index) {\n <fieldset\n class=\"c8y-fieldset\"\n [formGroup]=\"form\"\n >\n <legend>\n {{ 'If condition' | translate }}\n @if (forms.length > 1) {\n <button\n class=\"btn-dot btn-dot--danger\"\n title=\"{{ 'Remove condition' | translate }}\"\n type=\"button\"\n (click)=\"removeCondition(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n }\n </legend>\n <!-- Data type selection -->\n <div class=\"row tight-grid\">\n <div class=\"col-md-4 col-12\">\n <label\n for=\"dataType-{{ i }}\"\n translate\n >\n Data type\n </label>\n <c8y-select\n id=\"dataType-{{ i }}\"\n [ariaLabel]=\"'Data type select' | translate\"\n [items]=\"dataTypes\"\n [placeholder]=\"'Select data type\u2026' | translate\"\n formControlName=\"dataType\"\n ></c8y-select>\n </div>\n\n <!-- Comparison dropdown -->\n <div class=\"col-md-4 col-12\">\n <label\n for=\"comparison-{{ i }}\"\n translate\n >\n Comparison\n </label>\n <c8y-select\n id=\"comparison-{{ i }}\"\n [ariaLabel]=\"'Comparison select' | translate\"\n [items]=\"comparisonOptions[form.get('dataType')?.value?.value] || []\"\n formControlName=\"comparison\"\n [placeholder]=\"'Select comparison type\u2026' | translate\"\n labelProp=\"label\"\n valueProp=\"value\"\n ></c8y-select>\n </div>\n <!-- Value input based on type -->\n <div class=\"col-md-4 col-12\">\n <label\n for=\"value-{{ i }}\"\n translate\n >\n Value\n </label>\n @switch (form.get('dataType')?.value?.value) {\n @case ('number') {\n <input\n class=\"form-control\"\n id=\"value-{{ i }}\"\n type=\"number\"\n formControlName=\"value\"\n />\n }\n @case ('date') {\n <c8y-date-time-picker\n aria-label=\"{{ 'Date and time picker' | translate }}\"\n placeholder=\"{{ 'Select date\u2026' | translate }}\"\n formControlName=\"value\"\n size=\"sm\"\n (onDateSelected)=\"onDateSelected($event, i)\"\n ></c8y-date-time-picker>\n }\n @case ('string') {\n <input\n class=\"form-control\"\n id=\"value-{{ i }}\"\n type=\"text\"\n formControlName=\"value\"\n />\n }\n @case ('boolean') {\n <c8y-select\n [ariaLabel]=\"'Boolean select' | translate\"\n [items]=\"booleanOptions\"\n [placeholder]=\"'Select value\u2026' | translate\"\n formControlName=\"value\"\n labelProp=\"label\"\n valueProp=\"value\"\n ></c8y-select>\n }\n }\n </div>\n </div>\n <div class=\"d-flex gap-16 m-t-8 m-b-8\">\n <!-- Icon field -->\n <div class=\"d-flex a-i-center\">\n <label\n class=\"m-b-0 m-r-4\"\n for=\"icon-{{ i }}\"\n translate\n >\n Icon\n </label>\n <c8y-icon-selector-wrapper\n [selectedIcon]=\"form.get('icon')?.value || 'c8y-cockpit'\"\n [iconSize]=\"24\"\n (onSelect)=\"iconSelectionChange($event, i)\"\n ></c8y-icon-selector-wrapper>\n </div>\n\n <!-- Color field -->\n <div class=\"d-flex a-i-center m-l-8\">\n <label\n class=\"m-b-0 m-r-4 text-nowrap\"\n for=\"color-{{ i }}\"\n translate\n >\n Icon color\n </label>\n <input\n class=\"form-control\"\n style=\"width: 100%; min-width: 40px\"\n id=\"color-{{ i }}\"\n type=\"color\"\n formControlName=\"color\"\n />\n </div>\n </div>\n </fieldset>\n }\n <button\n class=\"btn btn-default m-t-16\"\n title=\"{{ 'Add condition' | translate }}\"\n type=\"button\"\n (click)=\"addCondition()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add condition' | translate }}\n </button>\n </form>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: ModalModule }, { kind: "component", type: i1.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "flushBody", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.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$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i1.SelectComponent, selector: "c8y-select", inputs: ["placeholder", "items", "selected", "container", "multi", "canSelectWithSpace", "disabled", "autoClose", "insideClick", "required", "canDeselect", "name", "ariaLabel", "ariaLabelledby", "icon", "filterItems"], outputs: ["onSelect", "onDeselect", "onIconClick"] }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "component", type: i3$2.IconSelectorWrapperComponent, selector: "c8y-icon-selector-wrapper", inputs: ["canRemoveIcon", "selectedIcon", "iconSize"], outputs: ["onSelect"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i1.DateTimePickerComponent, selector: "c8y-date-time-picker", inputs: ["minDate", "maxDate", "placeholder", "dateInputFormat", "adaptivePosition", "size", "dateType", "config"], outputs: ["onDateSelected"] }, { kind: "ngmodule", type: C8yTranslateModule }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
1807
1831
|
}
|
|
1808
1832
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IconRenderTypeModalComponent, decorators: [{
|
|
1809
1833
|
type: Component,
|
|
@@ -1817,7 +1841,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
1817
1841
|
C8yTranslateModule,
|
|
1818
1842
|
CommonModule,
|
|
1819
1843
|
CoreModule
|
|
1820
|
-
], changeDetection: ChangeDetectionStrategy.Eager, template: "<c8y-modal\n title=\"{{ 'Configure icon conditions' | translate }}\"\n (onClose)=\"onClose($event)\"\n (onDismiss)=\"onDismiss($event)\"\n [labels]=\"labels\"\n [disabled]=\"isAnyFormInvalid()\"\n [headerClasses]=\"'dialog-header'\"\n [flushBody]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-circle-star\"></span>\n </ng-container>\n <form class=\"p-24 p-t-0\">\n @for (form of forms; track form; let i = $index) {\n <fieldset\n class=\"c8y-fieldset\"\n [formGroup]=\"form\"\n >\n <legend>\n {{ 'If condition' | translate }}\n @if (forms.length > 1) {\n <button\n class=\"btn-dot btn-dot--danger\"\n title=\"{{ 'Remove condition' | translate }}\"\n type=\"button\"\n (click)=\"removeCondition(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n }\n </legend>\n <!-- Data type selection -->\n <div class=\"row tight-grid\">\n <div class=\"col-md-4 col-12\">\n <label\n for=\"dataType-{{ i }}\"\n translate\n >\n Data type\n </label>\n <c8y-select\n
|
|
1844
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<c8y-modal\n title=\"{{ 'Configure icon conditions' | translate }}\"\n (onClose)=\"onClose($event)\"\n (onDismiss)=\"onDismiss($event)\"\n [labels]=\"labels\"\n [disabled]=\"isAnyFormInvalid()\"\n [headerClasses]=\"'dialog-header'\"\n [flushBody]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-circle-star\"></span>\n </ng-container>\n <form class=\"p-24 p-t-0\">\n @for (form of forms; track form; let i = $index) {\n <fieldset\n class=\"c8y-fieldset\"\n [formGroup]=\"form\"\n >\n <legend>\n {{ 'If condition' | translate }}\n @if (forms.length > 1) {\n <button\n class=\"btn-dot btn-dot--danger\"\n title=\"{{ 'Remove condition' | translate }}\"\n type=\"button\"\n (click)=\"removeCondition(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n }\n </legend>\n <!-- Data type selection -->\n <div class=\"row tight-grid\">\n <div class=\"col-md-4 col-12\">\n <label\n for=\"dataType-{{ i }}\"\n translate\n >\n Data type\n </label>\n <c8y-select\n id=\"dataType-{{ i }}\"\n [ariaLabel]=\"'Data type select' | translate\"\n [items]=\"dataTypes\"\n [placeholder]=\"'Select data type\u2026' | translate\"\n formControlName=\"dataType\"\n ></c8y-select>\n </div>\n\n <!-- Comparison dropdown -->\n <div class=\"col-md-4 col-12\">\n <label\n for=\"comparison-{{ i }}\"\n translate\n >\n Comparison\n </label>\n <c8y-select\n id=\"comparison-{{ i }}\"\n [ariaLabel]=\"'Comparison select' | translate\"\n [items]=\"comparisonOptions[form.get('dataType')?.value?.value] || []\"\n formControlName=\"comparison\"\n [placeholder]=\"'Select comparison type\u2026' | translate\"\n labelProp=\"label\"\n valueProp=\"value\"\n ></c8y-select>\n </div>\n <!-- Value input based on type -->\n <div class=\"col-md-4 col-12\">\n <label\n for=\"value-{{ i }}\"\n translate\n >\n Value\n </label>\n @switch (form.get('dataType')?.value?.value) {\n @case ('number') {\n <input\n class=\"form-control\"\n id=\"value-{{ i }}\"\n type=\"number\"\n formControlName=\"value\"\n />\n }\n @case ('date') {\n <c8y-date-time-picker\n aria-label=\"{{ 'Date and time picker' | translate }}\"\n placeholder=\"{{ 'Select date\u2026' | translate }}\"\n formControlName=\"value\"\n size=\"sm\"\n (onDateSelected)=\"onDateSelected($event, i)\"\n ></c8y-date-time-picker>\n }\n @case ('string') {\n <input\n class=\"form-control\"\n id=\"value-{{ i }}\"\n type=\"text\"\n formControlName=\"value\"\n />\n }\n @case ('boolean') {\n <c8y-select\n [ariaLabel]=\"'Boolean select' | translate\"\n [items]=\"booleanOptions\"\n [placeholder]=\"'Select value\u2026' | translate\"\n formControlName=\"value\"\n labelProp=\"label\"\n valueProp=\"value\"\n ></c8y-select>\n }\n }\n </div>\n </div>\n <div class=\"d-flex gap-16 m-t-8 m-b-8\">\n <!-- Icon field -->\n <div class=\"d-flex a-i-center\">\n <label\n class=\"m-b-0 m-r-4\"\n for=\"icon-{{ i }}\"\n translate\n >\n Icon\n </label>\n <c8y-icon-selector-wrapper\n [selectedIcon]=\"form.get('icon')?.value || 'c8y-cockpit'\"\n [iconSize]=\"24\"\n (onSelect)=\"iconSelectionChange($event, i)\"\n ></c8y-icon-selector-wrapper>\n </div>\n\n <!-- Color field -->\n <div class=\"d-flex a-i-center m-l-8\">\n <label\n class=\"m-b-0 m-r-4 text-nowrap\"\n for=\"color-{{ i }}\"\n translate\n >\n Icon color\n </label>\n <input\n class=\"form-control\"\n style=\"width: 100%; min-width: 40px\"\n id=\"color-{{ i }}\"\n type=\"color\"\n formControlName=\"color\"\n />\n </div>\n </div>\n </fieldset>\n }\n <button\n class=\"btn btn-default m-t-16\"\n title=\"{{ 'Add condition' | translate }}\"\n type=\"button\"\n (click)=\"addCondition()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add condition' | translate }}\n </button>\n </form>\n</c8y-modal>\n" }]
|
|
1821
1845
|
}] });
|
|
1822
1846
|
|
|
1823
1847
|
class AssetTableGridSettingsComponent {
|
|
@@ -1834,6 +1858,7 @@ class AssetTableGridSettingsComponent {
|
|
|
1834
1858
|
this.customLabel = gettext('(custom`column`)');
|
|
1835
1859
|
this.widgetConfigService = inject(WidgetConfigService);
|
|
1836
1860
|
this.assetTableService = inject(AssetTableService);
|
|
1861
|
+
this.assetPropertiesService = inject(AssetPropertiesService);
|
|
1837
1862
|
this.bottomDrawerService = inject(BottomDrawerService);
|
|
1838
1863
|
this.inventoryService = inject(InventoryService);
|
|
1839
1864
|
this.modalService = inject(BsModalService);
|
|
@@ -1861,7 +1886,7 @@ class AssetTableGridSettingsComponent {
|
|
|
1861
1886
|
}
|
|
1862
1887
|
if (column.filteringConfig) {
|
|
1863
1888
|
column.filteringConfig.formGroup = new FormGroup({});
|
|
1864
|
-
column.filteringConfig.model = this.existingColumnFilter[column.name] || {};
|
|
1889
|
+
column.filteringConfig.model = cloneDeep(this.existingColumnFilter[column.name] || {});
|
|
1865
1890
|
}
|
|
1866
1891
|
});
|
|
1867
1892
|
});
|
|
@@ -1872,9 +1897,7 @@ class AssetTableGridSettingsComponent {
|
|
|
1872
1897
|
}
|
|
1873
1898
|
async applyColumnType(type, column) {
|
|
1874
1899
|
if (type === 'icon') {
|
|
1875
|
-
const currentIconConfig = this.selectedProperties.find(
|
|
1876
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1877
|
-
(prop) => (prop.instanceId || prop.name) === column.name)?.iconConfig;
|
|
1900
|
+
const currentIconConfig = this.selectedProperties.find(prop => this.assetTableService.getColumnName(prop, this.selectedProperties) === column.name)?.iconConfig;
|
|
1878
1901
|
const modal = this.modalService.show(IconRenderTypeModalComponent, {
|
|
1879
1902
|
class: 'modal-md',
|
|
1880
1903
|
ariaDescribedby: 'modal-body',
|
|
@@ -1886,7 +1909,7 @@ class AssetTableGridSettingsComponent {
|
|
|
1886
1909
|
}).content;
|
|
1887
1910
|
try {
|
|
1888
1911
|
const result = await modal.result;
|
|
1889
|
-
this.selectedProperties = this.selectedProperties.map(prop => (prop
|
|
1912
|
+
this.selectedProperties = this.selectedProperties.map(prop => this.assetTableService.getColumnName(prop, this.selectedProperties) === column.name
|
|
1890
1913
|
? { ...prop, iconConfig: result, columnType: 'icon' }
|
|
1891
1914
|
: prop);
|
|
1892
1915
|
}
|
|
@@ -1895,7 +1918,9 @@ class AssetTableGridSettingsComponent {
|
|
|
1895
1918
|
}
|
|
1896
1919
|
}
|
|
1897
1920
|
else {
|
|
1898
|
-
this.selectedProperties = this.selectedProperties.map(prop => (prop
|
|
1921
|
+
this.selectedProperties = this.selectedProperties.map(prop => this.assetTableService.getColumnName(prop, this.selectedProperties) === column.name
|
|
1922
|
+
? { ...prop, columnType: type }
|
|
1923
|
+
: prop);
|
|
1899
1924
|
}
|
|
1900
1925
|
this.widgetConfigService.updateConfig({ selectedProperties: [...this.selectedProperties] });
|
|
1901
1926
|
}
|
|
@@ -1913,7 +1938,9 @@ class AssetTableGridSettingsComponent {
|
|
|
1913
1938
|
this.widgetConfigService.updateConfig({ operationColumns: [...this.operationColumns] });
|
|
1914
1939
|
}
|
|
1915
1940
|
else {
|
|
1916
|
-
this.selectedProperties = this.selectedProperties.map(prop => (prop
|
|
1941
|
+
this.selectedProperties = this.selectedProperties.map(prop => this.assetTableService.getColumnName(prop, this.selectedProperties) === column.name
|
|
1942
|
+
? { ...prop, visible: column.visible }
|
|
1943
|
+
: prop);
|
|
1917
1944
|
this.widgetConfigService.updateConfig({ selectedProperties: [...this.selectedProperties] });
|
|
1918
1945
|
}
|
|
1919
1946
|
}
|
|
@@ -1934,6 +1961,16 @@ class AssetTableGridSettingsComponent {
|
|
|
1934
1961
|
this.widgetConfigService.updateConfig({ filterPredicate: newFilter });
|
|
1935
1962
|
dropdown.hide();
|
|
1936
1963
|
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Restores the filter form to the last applied value when the dropdown closes.
|
|
1966
|
+
*/
|
|
1967
|
+
discardUnappliedFilter(column) {
|
|
1968
|
+
if (!column.filteringConfig) {
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
column.filteringConfig.formGroup = new FormGroup({});
|
|
1972
|
+
column.filteringConfig.model = cloneDeep(this.existingColumnFilter[column.name] || {});
|
|
1973
|
+
}
|
|
1937
1974
|
isColumnFiltered(column) {
|
|
1938
1975
|
const value = this.existingColumnFilter?.[column.name];
|
|
1939
1976
|
if (!value)
|
|
@@ -1964,7 +2001,7 @@ class AssetTableGridSettingsComponent {
|
|
|
1964
2001
|
}
|
|
1965
2002
|
column.sortOrder = nextOrder || null;
|
|
1966
2003
|
this.selectedProperties = this.selectedProperties.map(prop => {
|
|
1967
|
-
if ((prop
|
|
2004
|
+
if (this.assetTableService.getColumnName(prop, this.selectedProperties) === column.name) {
|
|
1968
2005
|
if (nextOrder) {
|
|
1969
2006
|
prop.sortOrder = nextOrder;
|
|
1970
2007
|
}
|
|
@@ -2034,8 +2071,7 @@ class AssetTableGridSettingsComponent {
|
|
|
2034
2071
|
});
|
|
2035
2072
|
try {
|
|
2036
2073
|
const properties = await drawer.instance.result;
|
|
2037
|
-
const uniqueProperties = properties.filter((prop, index, self) => index ===
|
|
2038
|
-
self.findIndex(p => p.name === prop.name && (!p.instanceId || p.instanceId === prop.instanceId)));
|
|
2074
|
+
const uniqueProperties = properties.filter((prop, index, self) => index === self.findIndex(p => this.assetPropertiesService.isSameProperty(p, prop)));
|
|
2039
2075
|
this.selectProperties(uniqueProperties);
|
|
2040
2076
|
}
|
|
2041
2077
|
catch {
|
|
@@ -2045,14 +2081,7 @@ class AssetTableGridSettingsComponent {
|
|
|
2045
2081
|
selectProperties(selectedProperties) {
|
|
2046
2082
|
// if the selected properties name matches and the existing one has iconConfig, retain it
|
|
2047
2083
|
const updatedProperties = selectedProperties.map(prop => {
|
|
2048
|
-
const existingProp = this.selectedProperties.find(p =>
|
|
2049
|
-
if (prop.instanceId) {
|
|
2050
|
-
return p.name === prop.name && p.instanceId === prop.instanceId;
|
|
2051
|
-
}
|
|
2052
|
-
else {
|
|
2053
|
-
return p.name === prop.name;
|
|
2054
|
-
}
|
|
2055
|
-
});
|
|
2084
|
+
const existingProp = this.selectedProperties.find(p => this.assetPropertiesService.isSameProperty(p, prop));
|
|
2056
2085
|
if (existingProp?.iconConfig || existingProp?.columnType || existingProp?.columnLabel) {
|
|
2057
2086
|
return {
|
|
2058
2087
|
...prop,
|
|
@@ -2074,7 +2103,7 @@ class AssetTableGridSettingsComponent {
|
|
|
2074
2103
|
applyCustomHeaderNames() {
|
|
2075
2104
|
// Update selected properties and operation columns based on custom header names
|
|
2076
2105
|
this.selectedProperties = this.selectedProperties.map(prop => {
|
|
2077
|
-
const nameKey = prop
|
|
2106
|
+
const nameKey = this.assetTableService.getColumnName(prop, this.selectedProperties);
|
|
2078
2107
|
const newLabel = this.customHeaderNames[nameKey];
|
|
2079
2108
|
if (newLabel) {
|
|
2080
2109
|
prop.columnLabel = newLabel;
|
|
@@ -2104,7 +2133,7 @@ class AssetTableGridSettingsComponent {
|
|
|
2104
2133
|
return this.assetTableService.getColumns(this.selectedProperties, this.operationColumns, config);
|
|
2105
2134
|
}
|
|
2106
2135
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: AssetTableGridSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2107
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: AssetTableGridSettingsComponent, isStandalone: true, selector: "c8y-asset-table-column-settings", host: { classAttribute: "bg-level-1" }, providers: [BsDropdownDirective], ngImport: i0, template: "<fieldset class=\"c8y-fieldset bg-level-1 overflow-hidden p-0\">\n <legend class=\"m-l-16\">{{ 'Properties column settings (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n class=\"inner-scroll bg-inherit d-block no-border-last separator-top\"\n style=\"max-height: 300px\"\n role=\"list\"\n data-cy=\"selected-properties\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (column of columns; track trackByColumnName($index, column)) {\n @if (!column.positionFixed) {\n <c8y-li\n role=\"listitem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [ngClass]=\"{ 'empty-actions': !column.isOperation }\"\n >\n <c8y-li-drag-handle\n title=\"{{ 'Drag to reorder' | translate }}\"\n [attr.aria-label]=\"'Drag to reorder' | translate\"\n cdkDragHandle\n >\n <i\n c8yIcon=\"drag-reorder\"\n style=\"font-size: 0.7em\"\n ></i>\n </c8y-li-drag-handle>\n @if (column.__origin !== 'status') {\n <c8y-li-checkbox\n class=\"a-s-stretch\"\n title=\"{{ (column.header | translate) || column.name }} {{\n column.custom ? (customLabel | translate) : ''\n }}\"\n [attr.aria-label]=\"'Show/hide column' | translate\"\n [(ngModel)]=\"column.visible\"\n (ngModelChange)=\"toggleColumnVisibility(column)\"\n c8yProductExperience\n [attr.data-cy]=\"'data-grid--custom-column-header-' + column.header\"\n ></c8y-li-checkbox>\n } @else {\n <c8y-li-checkbox class=\"a-s-stretch no-pointer invisible\"></c8y-li-checkbox>\n }\n <div class=\"content-flex-32 p-t-4 p-b-4\">\n <div class=\"col-6\">\n @if (column.__origin !== 'status') {\n <c8y-input-group-editable\n required\n size=\"sm\"\n formGroupClass=\"m-b-0\"\n [ariaLabel]=\"'Column header' | translate\"\n [placeholder]=\"'Column header' | translate\"\n [(ngModel)]=\"column.header\"\n (save)=\"updateColumnNames(column)\"\n ></c8y-input-group-editable>\n } @else {\n <p class=\"text-12 p-t-4 p-b-4\">{{ column.header | translate }}</p>\n }\n </div>\n <div class=\"col-6\">\n <div class=\"d-flex a-i-center gap-8 p-t-4 p-b-4\">\n <!-- Filters button -->\n @if (column.filteringConfig) {\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n [insideClick]=\"true\"\n c8yDropdownFocusTrap\n #gridHeaderDropdown=\"bs-dropdown\"\n >\n <button\n class=\"dropdown-toggle btn btn-icon btn-default btn-xs c8y-dropdown\"\n [attr.aria-label]=\"'Filter' | translate\"\n tooltip=\"{{ 'Filter' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"gridHeaderDropdown.isOpen\"\n type=\"button\"\n [delay]=\"500\"\n [ngClass]=\"{ active: isColumnFiltered(column) }\"\n dropdownToggle\n >\n <i c8yIcon=\"filter\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n (click)=\"$event.stopPropagation()\"\n *dropdownMenu\n >\n <formly-form\n class=\"p-16 d-block\"\n style=\"min-width: 250px\"\n [form]=\"column.filteringConfig.formGroup\"\n [fields]=\"column.filteringConfig.fields\"\n [model]=\"column.filteringConfig.model\"\n ></formly-form>\n <div class=\"p-16 fit-w d-flex separator-top sticky-bottom\">\n <button\n class=\"btn btn-default btn-sm m-r-8 grow\"\n title=\"{{ 'Reset' | translate }}\"\n (click)=\"resetFilter(column, gridHeaderDropdown)\"\n translate\n >\n Reset\n </button>\n <button\n class=\"btn btn-primary btn-sm grow\"\n title=\"{{ 'Apply' | translate }}\"\n (click)=\"applyFilter(column, gridHeaderDropdown)\"\n translate\n >\n Apply\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n <!-- Sort button -->\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <button\n class=\"btn btn-icon btn-default btn-xs\"\n [attr.aria-label]=\"'Sort order' | translate\"\n tooltip=\"{{ 'Sort order' | translate }}\"\n placement=\"top\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"changeSortOrder(column)\"\n >\n @if (column.sortOrder === 'asc') {\n <i c8yIcon=\"long-arrow-up\"></i>\n } @else if (column.sortOrder === 'desc') {\n <i c8yIcon=\"long-arrow-down\"></i>\n } @else {\n <i\n c8yIcon=\"exchange\"\n style=\"transform: rotate(90deg)\"\n ></i>\n }\n </button>\n </div>\n <!-- Column type dropdown -->\n @if (!column.isOperation && column.__origin !== 'status') {\n <div\n class=\"d-flex a-i-center gap-4 flex-no-shrink\"\n [ngClass]=\"{ 'no-pointer invisible': column.__origin === 'status' }\"\n >\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #columnTypeDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-xs dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Select render type' | translate\"\n tooltip=\"{{ 'Render type' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"columnTypeDropdown.isOpen\"\n type=\"button\"\n [attr.data-cy]=\"'column-settings--render-type-dropdown--' + column.name\"\n [delay]=\"500\"\n dropdownToggle\n >\n {{ column.type | translate | humanize }}\n <i c8yIcon=\"caret-down\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <c8y-list-group role=\"list\">\n @if (column.type === 'computed' || column.computedConfig) {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (keydown.enter)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (click)=\"applyColumnType('computed', column)\"\n [active]=\"column.type === 'computed'\"\n >\n {{ 'Computed' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'icon'\"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n } @else {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (click)=\"applyColumnType('default', column)\"\n (keydown.enter)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'default'\"\n >\n {{ 'Default' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"date-render-type-option\"\n (click)=\"applyColumnType('date', column)\"\n (keydown.enter)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'date'\"\n >\n {{ 'Date' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n [active]=\"column.type === 'icon'\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n }\n </c8y-list-group>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n @if (column.isOperation) {\n <ng-container>\n @if (true) {\n <c8y-li-action\n icon=\"edit1\"\n [attr.aria-label]=\"'Edit' | translate\"\n label=\"Edit\"\n (click)=\"editOperationColumn(column)\"\n ></c8y-li-action>\n }\n @if (true) {\n <c8y-li-action\n icon=\"delete\"\n [attr.aria-label]=\"'Delete' | translate\"\n label=\"Delete\"\n (click)=\"deleteColumn(column)\"\n ></c8y-li-action>\n }\n </ng-container>\n }\n </c8y-li>\n }\n }\n @if (columns.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'list'\"\n [title]=\"'No properties selected.' | translate\"\n [subtitle]=\"'Select from the list which columns to display.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n </c8y-list-group>\n <div class=\"m-b-16 p-t-16 p-l-24 p-r-16 fit-w separator-top\">\n <button\n class=\"btn btn-default btn-sm m-r-8\"\n type=\"button\"\n (click)=\"selectAssetAndProperty()\"\n >\n {{ 'Select properties' | translate }}\n </button>\n <div\n class=\"dropdown\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #customActionsDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-sm dropdown-toggle c8y-dropdown\"\n [title]=\"'Add action' | translate\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"customActionsDropdown.isOpen\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--add-action-btn\"\n dropdownToggle\n >\n <i c8yIcon=\"cog\"></i>\n <span>{{ 'Add action' | translate }}</span>\n <span class=\"caret\"></span>\n </button>\n <ul\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--create-operation\"\n (click)=\"onCreateOperation()\"\n >\n {{ 'Create operation' | translate }}\n </button>\n </li>\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--toggle-maintenance\"\n (click)=\"onToggleMaintenanceMode()\"\n [disabled]=\"hasMaintenanceColumn\"\n >\n {{ 'Toggle maintenance mode' | translate }}\n </button>\n </li>\n </ul>\n </div>\n </div>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i3$3.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3$3.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i3$3.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: InputGroupEditableComponent, selector: "c8y-input-group-editable", inputs: ["ariaLabel", "name", "size", "placeholder", "title", "multiline", "maxHeight", "maxLength", "noSaveButton", "formGroupClass", "validators", "asyncValidators", "autocomplete", "required"], outputs: ["save", "cancel"] }, { kind: "directive", type: DropdownFocusTrapDirective, selector: "[c8yDropdownFocusTrap]" }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemActionComponent, selector: "c8y-list-item-action, c8y-li-action", inputs: ["label", "icon", "disabled"], outputs: ["click"] }, { kind: "component", type: i1.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "component", type: i1.ListItemDragHandleComponent, selector: "c8y-list-item-drag-handle, c8y-li-drag-handle" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: HumanizePipe, name: "humanize" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
2136
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: AssetTableGridSettingsComponent, isStandalone: true, selector: "c8y-asset-table-column-settings", host: { classAttribute: "bg-level-1" }, providers: [BsDropdownDirective], ngImport: i0, template: "<fieldset class=\"c8y-fieldset bg-level-1 overflow-hidden p-0\">\n <legend class=\"m-l-16\">{{ 'Properties column settings (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n class=\"inner-scroll bg-inherit d-block no-border-last separator-top\"\n style=\"max-height: 300px\"\n role=\"list\"\n data-cy=\"selected-properties\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (column of columns; track trackByColumnName($index, column)) {\n @if (!column.positionFixed) {\n <c8y-li\n role=\"listitem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [ngClass]=\"{ 'empty-actions': !column.isOperation }\"\n >\n <c8y-li-drag-handle\n title=\"{{ 'Drag to reorder' | translate }}\"\n [attr.aria-label]=\"'Drag to reorder' | translate\"\n cdkDragHandle\n >\n <i\n c8yIcon=\"drag-reorder\"\n style=\"font-size: 0.7em\"\n ></i>\n </c8y-li-drag-handle>\n @if (column.__origin !== 'status') {\n <c8y-li-checkbox\n class=\"a-s-stretch\"\n title=\"{{ (column.header | translate) || column.name }} {{\n column.custom ? (customLabel | translate) : ''\n }}\"\n [attr.aria-label]=\"'Show/hide column' | translate\"\n [(ngModel)]=\"column.visible\"\n (ngModelChange)=\"toggleColumnVisibility(column)\"\n c8yProductExperience\n [attr.data-cy]=\"'data-grid--custom-column-header-' + column.header\"\n ></c8y-li-checkbox>\n } @else {\n <c8y-li-checkbox class=\"a-s-stretch no-pointer invisible\"></c8y-li-checkbox>\n }\n <div class=\"content-flex-32 p-t-4 p-b-4\">\n <div class=\"col-6\">\n @if (column.__origin !== 'status') {\n <c8y-input-group-editable\n required\n size=\"sm\"\n formGroupClass=\"m-b-0\"\n [ariaLabel]=\"'Column header' | translate\"\n [placeholder]=\"'Column header' | translate\"\n [(ngModel)]=\"column.header\"\n (save)=\"updateColumnNames(column)\"\n ></c8y-input-group-editable>\n } @else {\n <p class=\"text-12 p-t-4 p-b-4\">{{ column.header | translate }}</p>\n }\n </div>\n <div class=\"col-6\">\n <div class=\"d-flex a-i-center gap-8 p-t-4 p-b-4\">\n <!-- Filters button -->\n @if (column.filteringConfig) {\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n [insideClick]=\"true\"\n c8yDropdownFocusTrap\n #gridHeaderDropdown=\"bs-dropdown\"\n (onHidden)=\"discardUnappliedFilter(column)\"\n >\n <button\n class=\"dropdown-toggle btn btn-icon btn-default btn-xs c8y-dropdown\"\n [attr.aria-label]=\"'Filter' | translate\"\n tooltip=\"{{ 'Filter' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"gridHeaderDropdown.isOpen\"\n type=\"button\"\n [delay]=\"500\"\n [ngClass]=\"{ active: isColumnFiltered(column) }\"\n dropdownToggle\n >\n <i c8yIcon=\"filter\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n (click)=\"$event.stopPropagation()\"\n *dropdownMenu\n >\n <formly-form\n class=\"p-16 d-block\"\n style=\"min-width: 250px\"\n [form]=\"column.filteringConfig.formGroup\"\n [fields]=\"column.filteringConfig.fields\"\n [model]=\"column.filteringConfig.model\"\n ></formly-form>\n <div class=\"p-16 fit-w d-flex separator-top sticky-bottom\">\n <button\n class=\"btn btn-default btn-sm m-r-8 grow\"\n title=\"{{ 'Reset' | translate }}\"\n (click)=\"resetFilter(column, gridHeaderDropdown)\"\n translate\n >\n Reset\n </button>\n <button\n class=\"btn btn-primary btn-sm grow\"\n title=\"{{ 'Apply' | translate }}\"\n (click)=\"applyFilter(column, gridHeaderDropdown)\"\n [disabled]=\"\n column.filteringConfig.formGroup?.pristine ||\n column.filteringConfig.formGroup?.invalid\n \"\n translate\n >\n Apply\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n <!-- Sort button -->\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <button\n class=\"btn btn-icon btn-default btn-xs\"\n [attr.aria-label]=\"'Sort order' | translate\"\n tooltip=\"{{ 'Sort order' | translate }}\"\n placement=\"top\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"changeSortOrder(column)\"\n >\n @if (column.sortOrder === 'asc') {\n <i c8yIcon=\"long-arrow-up\"></i>\n } @else if (column.sortOrder === 'desc') {\n <i c8yIcon=\"long-arrow-down\"></i>\n } @else {\n <i\n c8yIcon=\"exchange\"\n style=\"transform: rotate(90deg)\"\n ></i>\n }\n </button>\n </div>\n <!-- Column type dropdown -->\n @if (!column.isOperation && column.__origin !== 'status') {\n <div\n class=\"d-flex a-i-center gap-4 flex-no-shrink\"\n [ngClass]=\"{ 'no-pointer invisible': column.__origin === 'status' }\"\n >\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #columnTypeDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-xs dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Select render type' | translate\"\n tooltip=\"{{ 'Render type' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"columnTypeDropdown.isOpen\"\n type=\"button\"\n [attr.data-cy]=\"'column-settings--render-type-dropdown--' + column.name\"\n [delay]=\"500\"\n dropdownToggle\n >\n {{ column.type | translate | humanize }}\n <i c8yIcon=\"caret-down\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <c8y-list-group role=\"list\">\n @if (column.type === 'computed' || column.computedConfig) {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (keydown.enter)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (click)=\"applyColumnType('computed', column)\"\n [active]=\"column.type === 'computed'\"\n >\n {{ 'Computed' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'icon'\"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n } @else {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (click)=\"applyColumnType('default', column)\"\n (keydown.enter)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'default'\"\n >\n {{ 'Default' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"date-render-type-option\"\n (click)=\"applyColumnType('date', column)\"\n (keydown.enter)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'date'\"\n >\n {{ 'Date' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n [active]=\"column.type === 'icon'\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n }\n </c8y-list-group>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n @if (column.isOperation) {\n <ng-container>\n @if (true) {\n <c8y-li-action\n icon=\"edit1\"\n [attr.aria-label]=\"'Edit' | translate\"\n label=\"Edit\"\n (click)=\"editOperationColumn(column)\"\n ></c8y-li-action>\n }\n @if (true) {\n <c8y-li-action\n icon=\"delete\"\n [attr.aria-label]=\"'Delete' | translate\"\n label=\"Delete\"\n (click)=\"deleteColumn(column)\"\n ></c8y-li-action>\n }\n </ng-container>\n }\n </c8y-li>\n }\n }\n @if (columns.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'list'\"\n [title]=\"'No properties selected.' | translate\"\n [subtitle]=\"'Select from the list which columns to display.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n </c8y-list-group>\n <div class=\"m-b-16 p-t-16 p-l-24 p-r-16 fit-w separator-top\">\n <button\n class=\"btn btn-default btn-sm m-r-8\"\n type=\"button\"\n (click)=\"selectAssetAndProperty()\"\n >\n {{ 'Select properties' | translate }}\n </button>\n <div\n class=\"dropdown\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #customActionsDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-sm dropdown-toggle c8y-dropdown\"\n [title]=\"'Add action' | translate\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"customActionsDropdown.isOpen\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--add-action-btn\"\n dropdownToggle\n >\n <i c8yIcon=\"cog\"></i>\n <span>{{ 'Add action' | translate }}</span>\n <span class=\"caret\"></span>\n </button>\n <ul\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--create-operation\"\n (click)=\"onCreateOperation()\"\n >\n {{ 'Create operation' | translate }}\n </button>\n </li>\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--toggle-maintenance\"\n (click)=\"onToggleMaintenanceMode()\"\n [disabled]=\"hasMaintenanceColumn\"\n >\n {{ 'Toggle maintenance mode' | translate }}\n </button>\n </li>\n </ul>\n </div>\n </div>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i3$3.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3$3.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i3$3.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: InputGroupEditableComponent, selector: "c8y-input-group-editable", inputs: ["ariaLabel", "name", "size", "placeholder", "title", "multiline", "maxHeight", "maxLength", "noSaveButton", "formGroupClass", "validators", "asyncValidators", "autocomplete", "required"], outputs: ["save", "cancel"] }, { kind: "directive", type: DropdownFocusTrapDirective, selector: "[c8yDropdownFocusTrap]" }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable", "selectOnClick"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemActionComponent, selector: "c8y-list-item-action, c8y-li-action", inputs: ["label", "icon", "disabled"], outputs: ["click"] }, { kind: "component", type: i1.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "component", type: i1.ListItemDragHandleComponent, selector: "c8y-list-item-drag-handle, c8y-li-drag-handle" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: HumanizePipe, name: "humanize" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
2108
2137
|
}
|
|
2109
2138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: AssetTableGridSettingsComponent, decorators: [{
|
|
2110
2139
|
type: Component,
|
|
@@ -2125,7 +2154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
2125
2154
|
EmptyStateComponent,
|
|
2126
2155
|
ListGroupModule,
|
|
2127
2156
|
NgClass
|
|
2128
|
-
], providers: [BsDropdownDirective], changeDetection: ChangeDetectionStrategy.Eager, template: "<fieldset class=\"c8y-fieldset bg-level-1 overflow-hidden p-0\">\n <legend class=\"m-l-16\">{{ 'Properties column settings (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n class=\"inner-scroll bg-inherit d-block no-border-last separator-top\"\n style=\"max-height: 300px\"\n role=\"list\"\n data-cy=\"selected-properties\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (column of columns; track trackByColumnName($index, column)) {\n @if (!column.positionFixed) {\n <c8y-li\n role=\"listitem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [ngClass]=\"{ 'empty-actions': !column.isOperation }\"\n >\n <c8y-li-drag-handle\n title=\"{{ 'Drag to reorder' | translate }}\"\n [attr.aria-label]=\"'Drag to reorder' | translate\"\n cdkDragHandle\n >\n <i\n c8yIcon=\"drag-reorder\"\n style=\"font-size: 0.7em\"\n ></i>\n </c8y-li-drag-handle>\n @if (column.__origin !== 'status') {\n <c8y-li-checkbox\n class=\"a-s-stretch\"\n title=\"{{ (column.header | translate) || column.name }} {{\n column.custom ? (customLabel | translate) : ''\n }}\"\n [attr.aria-label]=\"'Show/hide column' | translate\"\n [(ngModel)]=\"column.visible\"\n (ngModelChange)=\"toggleColumnVisibility(column)\"\n c8yProductExperience\n [attr.data-cy]=\"'data-grid--custom-column-header-' + column.header\"\n ></c8y-li-checkbox>\n } @else {\n <c8y-li-checkbox class=\"a-s-stretch no-pointer invisible\"></c8y-li-checkbox>\n }\n <div class=\"content-flex-32 p-t-4 p-b-4\">\n <div class=\"col-6\">\n @if (column.__origin !== 'status') {\n <c8y-input-group-editable\n required\n size=\"sm\"\n formGroupClass=\"m-b-0\"\n [ariaLabel]=\"'Column header' | translate\"\n [placeholder]=\"'Column header' | translate\"\n [(ngModel)]=\"column.header\"\n (save)=\"updateColumnNames(column)\"\n ></c8y-input-group-editable>\n } @else {\n <p class=\"text-12 p-t-4 p-b-4\">{{ column.header | translate }}</p>\n }\n </div>\n <div class=\"col-6\">\n <div class=\"d-flex a-i-center gap-8 p-t-4 p-b-4\">\n <!-- Filters button -->\n @if (column.filteringConfig) {\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n [insideClick]=\"true\"\n c8yDropdownFocusTrap\n #gridHeaderDropdown=\"bs-dropdown\"\n >\n <button\n class=\"dropdown-toggle btn btn-icon btn-default btn-xs c8y-dropdown\"\n [attr.aria-label]=\"'Filter' | translate\"\n tooltip=\"{{ 'Filter' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"gridHeaderDropdown.isOpen\"\n type=\"button\"\n [delay]=\"500\"\n [ngClass]=\"{ active: isColumnFiltered(column) }\"\n dropdownToggle\n >\n <i c8yIcon=\"filter\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n (click)=\"$event.stopPropagation()\"\n *dropdownMenu\n >\n <formly-form\n class=\"p-16 d-block\"\n style=\"min-width: 250px\"\n [form]=\"column.filteringConfig.formGroup\"\n [fields]=\"column.filteringConfig.fields\"\n [model]=\"column.filteringConfig.model\"\n ></formly-form>\n <div class=\"p-16 fit-w d-flex separator-top sticky-bottom\">\n <button\n class=\"btn btn-default btn-sm m-r-8 grow\"\n title=\"{{ 'Reset' | translate }}\"\n (click)=\"resetFilter(column, gridHeaderDropdown)\"\n translate\n >\n Reset\n </button>\n <button\n class=\"btn btn-primary btn-sm grow\"\n title=\"{{ 'Apply' | translate }}\"\n (click)=\"applyFilter(column, gridHeaderDropdown)\"\n translate\n >\n Apply\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n <!-- Sort button -->\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <button\n class=\"btn btn-icon btn-default btn-xs\"\n [attr.aria-label]=\"'Sort order' | translate\"\n tooltip=\"{{ 'Sort order' | translate }}\"\n placement=\"top\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"changeSortOrder(column)\"\n >\n @if (column.sortOrder === 'asc') {\n <i c8yIcon=\"long-arrow-up\"></i>\n } @else if (column.sortOrder === 'desc') {\n <i c8yIcon=\"long-arrow-down\"></i>\n } @else {\n <i\n c8yIcon=\"exchange\"\n style=\"transform: rotate(90deg)\"\n ></i>\n }\n </button>\n </div>\n <!-- Column type dropdown -->\n @if (!column.isOperation && column.__origin !== 'status') {\n <div\n class=\"d-flex a-i-center gap-4 flex-no-shrink\"\n [ngClass]=\"{ 'no-pointer invisible': column.__origin === 'status' }\"\n >\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #columnTypeDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-xs dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Select render type' | translate\"\n tooltip=\"{{ 'Render type' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"columnTypeDropdown.isOpen\"\n type=\"button\"\n [attr.data-cy]=\"'column-settings--render-type-dropdown--' + column.name\"\n [delay]=\"500\"\n dropdownToggle\n >\n {{ column.type | translate | humanize }}\n <i c8yIcon=\"caret-down\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <c8y-list-group role=\"list\">\n @if (column.type === 'computed' || column.computedConfig) {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (keydown.enter)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (click)=\"applyColumnType('computed', column)\"\n [active]=\"column.type === 'computed'\"\n >\n {{ 'Computed' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'icon'\"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n } @else {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (click)=\"applyColumnType('default', column)\"\n (keydown.enter)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'default'\"\n >\n {{ 'Default' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"date-render-type-option\"\n (click)=\"applyColumnType('date', column)\"\n (keydown.enter)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'date'\"\n >\n {{ 'Date' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n [active]=\"column.type === 'icon'\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n }\n </c8y-list-group>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n @if (column.isOperation) {\n <ng-container>\n @if (true) {\n <c8y-li-action\n icon=\"edit1\"\n [attr.aria-label]=\"'Edit' | translate\"\n label=\"Edit\"\n (click)=\"editOperationColumn(column)\"\n ></c8y-li-action>\n }\n @if (true) {\n <c8y-li-action\n icon=\"delete\"\n [attr.aria-label]=\"'Delete' | translate\"\n label=\"Delete\"\n (click)=\"deleteColumn(column)\"\n ></c8y-li-action>\n }\n </ng-container>\n }\n </c8y-li>\n }\n }\n @if (columns.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'list'\"\n [title]=\"'No properties selected.' | translate\"\n [subtitle]=\"'Select from the list which columns to display.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n </c8y-list-group>\n <div class=\"m-b-16 p-t-16 p-l-24 p-r-16 fit-w separator-top\">\n <button\n class=\"btn btn-default btn-sm m-r-8\"\n type=\"button\"\n (click)=\"selectAssetAndProperty()\"\n >\n {{ 'Select properties' | translate }}\n </button>\n <div\n class=\"dropdown\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #customActionsDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-sm dropdown-toggle c8y-dropdown\"\n [title]=\"'Add action' | translate\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"customActionsDropdown.isOpen\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--add-action-btn\"\n dropdownToggle\n >\n <i c8yIcon=\"cog\"></i>\n <span>{{ 'Add action' | translate }}</span>\n <span class=\"caret\"></span>\n </button>\n <ul\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--create-operation\"\n (click)=\"onCreateOperation()\"\n >\n {{ 'Create operation' | translate }}\n </button>\n </li>\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--toggle-maintenance\"\n (click)=\"onToggleMaintenanceMode()\"\n [disabled]=\"hasMaintenanceColumn\"\n >\n {{ 'Toggle maintenance mode' | translate }}\n </button>\n </li>\n </ul>\n </div>\n </div>\n</fieldset>\n" }]
|
|
2157
|
+
], providers: [BsDropdownDirective], changeDetection: ChangeDetectionStrategy.Eager, template: "<fieldset class=\"c8y-fieldset bg-level-1 overflow-hidden p-0\">\n <legend class=\"m-l-16\">{{ 'Properties column settings (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n class=\"inner-scroll bg-inherit d-block no-border-last separator-top\"\n style=\"max-height: 300px\"\n role=\"list\"\n data-cy=\"selected-properties\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (column of columns; track trackByColumnName($index, column)) {\n @if (!column.positionFixed) {\n <c8y-li\n role=\"listitem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [ngClass]=\"{ 'empty-actions': !column.isOperation }\"\n >\n <c8y-li-drag-handle\n title=\"{{ 'Drag to reorder' | translate }}\"\n [attr.aria-label]=\"'Drag to reorder' | translate\"\n cdkDragHandle\n >\n <i\n c8yIcon=\"drag-reorder\"\n style=\"font-size: 0.7em\"\n ></i>\n </c8y-li-drag-handle>\n @if (column.__origin !== 'status') {\n <c8y-li-checkbox\n class=\"a-s-stretch\"\n title=\"{{ (column.header | translate) || column.name }} {{\n column.custom ? (customLabel | translate) : ''\n }}\"\n [attr.aria-label]=\"'Show/hide column' | translate\"\n [(ngModel)]=\"column.visible\"\n (ngModelChange)=\"toggleColumnVisibility(column)\"\n c8yProductExperience\n [attr.data-cy]=\"'data-grid--custom-column-header-' + column.header\"\n ></c8y-li-checkbox>\n } @else {\n <c8y-li-checkbox class=\"a-s-stretch no-pointer invisible\"></c8y-li-checkbox>\n }\n <div class=\"content-flex-32 p-t-4 p-b-4\">\n <div class=\"col-6\">\n @if (column.__origin !== 'status') {\n <c8y-input-group-editable\n required\n size=\"sm\"\n formGroupClass=\"m-b-0\"\n [ariaLabel]=\"'Column header' | translate\"\n [placeholder]=\"'Column header' | translate\"\n [(ngModel)]=\"column.header\"\n (save)=\"updateColumnNames(column)\"\n ></c8y-input-group-editable>\n } @else {\n <p class=\"text-12 p-t-4 p-b-4\">{{ column.header | translate }}</p>\n }\n </div>\n <div class=\"col-6\">\n <div class=\"d-flex a-i-center gap-8 p-t-4 p-b-4\">\n <!-- Filters button -->\n @if (column.filteringConfig) {\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n [insideClick]=\"true\"\n c8yDropdownFocusTrap\n #gridHeaderDropdown=\"bs-dropdown\"\n (onHidden)=\"discardUnappliedFilter(column)\"\n >\n <button\n class=\"dropdown-toggle btn btn-icon btn-default btn-xs c8y-dropdown\"\n [attr.aria-label]=\"'Filter' | translate\"\n tooltip=\"{{ 'Filter' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"gridHeaderDropdown.isOpen\"\n type=\"button\"\n [delay]=\"500\"\n [ngClass]=\"{ active: isColumnFiltered(column) }\"\n dropdownToggle\n >\n <i c8yIcon=\"filter\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n (click)=\"$event.stopPropagation()\"\n *dropdownMenu\n >\n <formly-form\n class=\"p-16 d-block\"\n style=\"min-width: 250px\"\n [form]=\"column.filteringConfig.formGroup\"\n [fields]=\"column.filteringConfig.fields\"\n [model]=\"column.filteringConfig.model\"\n ></formly-form>\n <div class=\"p-16 fit-w d-flex separator-top sticky-bottom\">\n <button\n class=\"btn btn-default btn-sm m-r-8 grow\"\n title=\"{{ 'Reset' | translate }}\"\n (click)=\"resetFilter(column, gridHeaderDropdown)\"\n translate\n >\n Reset\n </button>\n <button\n class=\"btn btn-primary btn-sm grow\"\n title=\"{{ 'Apply' | translate }}\"\n (click)=\"applyFilter(column, gridHeaderDropdown)\"\n [disabled]=\"\n column.filteringConfig.formGroup?.pristine ||\n column.filteringConfig.formGroup?.invalid\n \"\n translate\n >\n Apply\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n <!-- Sort button -->\n <div class=\"d-flex a-i-center gap-4 flex-no-shrink\">\n <button\n class=\"btn btn-icon btn-default btn-xs\"\n [attr.aria-label]=\"'Sort order' | translate\"\n tooltip=\"{{ 'Sort order' | translate }}\"\n placement=\"top\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"changeSortOrder(column)\"\n >\n @if (column.sortOrder === 'asc') {\n <i c8yIcon=\"long-arrow-up\"></i>\n } @else if (column.sortOrder === 'desc') {\n <i c8yIcon=\"long-arrow-down\"></i>\n } @else {\n <i\n c8yIcon=\"exchange\"\n style=\"transform: rotate(90deg)\"\n ></i>\n }\n </button>\n </div>\n <!-- Column type dropdown -->\n @if (!column.isOperation && column.__origin !== 'status') {\n <div\n class=\"d-flex a-i-center gap-4 flex-no-shrink\"\n [ngClass]=\"{ 'no-pointer invisible': column.__origin === 'status' }\"\n >\n <div\n class=\"dropdown d-flex\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #columnTypeDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-xs dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Select render type' | translate\"\n tooltip=\"{{ 'Render type' | translate }}\"\n placement=\"top\"\n container=\"body\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"columnTypeDropdown.isOpen\"\n type=\"button\"\n [attr.data-cy]=\"'column-settings--render-type-dropdown--' + column.name\"\n [delay]=\"500\"\n dropdownToggle\n >\n {{ column.type | translate | humanize }}\n <i c8yIcon=\"caret-down\"></i>\n </button>\n <div\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <c8y-list-group role=\"list\">\n @if (column.type === 'computed' || column.computedConfig) {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (keydown.enter)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('computed', column); $event.preventDefault()\n \"\n (click)=\"applyColumnType('computed', column)\"\n [active]=\"column.type === 'computed'\"\n >\n {{ 'Computed' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'icon'\"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n } @else {\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n (click)=\"applyColumnType('default', column)\"\n (keydown.enter)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('default', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'default'\"\n >\n {{ 'Default' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"date-render-type-option\"\n (click)=\"applyColumnType('date', column)\"\n (keydown.enter)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('date', column); $event.preventDefault()\n \"\n [active]=\"column.type === 'date'\"\n >\n {{ 'Date' | translate }}\n </c8y-li>\n <c8y-li\n tabindex=\"0\"\n role=\"listitem\"\n data-cy=\"icon-render-type-option\"\n (click)=\"applyColumnType('icon', column)\"\n [active]=\"column.type === 'icon'\"\n (keydown.enter)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n (keydown.space)=\"\n applyColumnType('icon', column); $event.preventDefault()\n \"\n >\n {{ 'Icon' | translate }}\n </c8y-li>\n }\n </c8y-list-group>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n @if (column.isOperation) {\n <ng-container>\n @if (true) {\n <c8y-li-action\n icon=\"edit1\"\n [attr.aria-label]=\"'Edit' | translate\"\n label=\"Edit\"\n (click)=\"editOperationColumn(column)\"\n ></c8y-li-action>\n }\n @if (true) {\n <c8y-li-action\n icon=\"delete\"\n [attr.aria-label]=\"'Delete' | translate\"\n label=\"Delete\"\n (click)=\"deleteColumn(column)\"\n ></c8y-li-action>\n }\n </ng-container>\n }\n </c8y-li>\n }\n }\n @if (columns.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'list'\"\n [title]=\"'No properties selected.' | translate\"\n [subtitle]=\"'Select from the list which columns to display.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n </c8y-list-group>\n <div class=\"m-b-16 p-t-16 p-l-24 p-r-16 fit-w separator-top\">\n <button\n class=\"btn btn-default btn-sm m-r-8\"\n type=\"button\"\n (click)=\"selectAssetAndProperty()\"\n >\n {{ 'Select properties' | translate }}\n </button>\n <div\n class=\"dropdown\"\n container=\"body\"\n dropdown\n c8yDropdownFocusTrap\n #customActionsDropdown=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-default btn-sm dropdown-toggle c8y-dropdown\"\n [title]=\"'Add action' | translate\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"customActionsDropdown.isOpen\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--add-action-btn\"\n dropdownToggle\n >\n <i c8yIcon=\"cog\"></i>\n <span>{{ 'Add action' | translate }}</span>\n <span class=\"caret\"></span>\n </button>\n <ul\n class=\"dropdown-menu\"\n *dropdownMenu\n >\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--create-operation\"\n (click)=\"onCreateOperation()\"\n >\n {{ 'Create operation' | translate }}\n </button>\n </li>\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\n data-cy=\"asset-table-column-settings--toggle-maintenance\"\n (click)=\"onToggleMaintenanceMode()\"\n [disabled]=\"hasMaintenanceColumn\"\n >\n {{ 'Toggle maintenance mode' | translate }}\n </button>\n </li>\n </ul>\n </div>\n </div>\n</fieldset>\n" }]
|
|
2129
2158
|
}] });
|
|
2130
2159
|
|
|
2131
2160
|
/**
|