@c8y/ngx-components 1023.83.4 → 1023.85.1
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/api/index.d.ts.map +1 -1
- package/cockpit-config/index.d.ts +3 -0
- package/cockpit-config/index.d.ts.map +1 -1
- package/feature-toggles/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-api.mjs +8 -11
- package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +43 -7
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-feature-toggles.mjs +13 -6
- package/fesm2022/c8y-ngx-components-feature-toggles.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +6 -6
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +17 -6
- package/locales/es.po +17 -6
- package/locales/fr.po +17 -6
- package/locales/ja_JP.po +15 -6
- package/locales/ko.po +16 -6
- package/locales/locales.pot +21 -4
- package/locales/nl.po +17 -6
- package/locales/pl.po +17 -6
- package/locales/pt_BR.po +17 -6
- package/locales/zh_CN.po +17 -6
- package/locales/zh_TW.po +17 -6
- package/package.json +1 -1
- package/widgets/implementations/asset-table/index.d.ts +4 -1
- package/widgets/implementations/asset-table/index.d.ts.map +1 -1
|
@@ -1587,7 +1587,7 @@ class AssetTableWidgetConfigComponent {
|
|
|
1587
1587
|
});
|
|
1588
1588
|
}
|
|
1589
1589
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AssetTableWidgetConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1590
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AssetTableWidgetConfigComponent, isStandalone: true, selector: "c8y-asset-table-widget-config", providers: [ManagedObjectRealtimeService], viewQueries: [{ propertyName: "previewMapSet", first: true, predicate: ["assetTablePreview"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup\">\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Date' | translate }}</legend>\n <div class=\"row tight-grid\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"d-flex gap-8 a-i-center\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n [(ngModel)]=\"refreshOption\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Refreshing after the given interval' | translate\"\n value=\"interval\"\n >\n {{ 'Use refresh interval' | translate }}\n </option>\n <option\n [title]=\"'Refreshing after the given interval, synchronized globally' | translate\"\n value=\"global-interval\"\n >\n {{ 'Use global refresh interval' | translate }}\n </option>\n </select>\n </div>\n @if (formGroup?.controls?.refreshOption?.value !== GLOBAL_INTERVAL_OPTION) {\n <div\n class=\"c8y-select-wrapper grow flex-no-shrink\"\n title=\" {{ 'Interval' | translate }}\"\n >\n <select\n class=\"form-control text-12\"\n [title]=\"'Refresh interval in seconds' | translate\"\n id=\"refreshInterval\"\n formControlName=\"refreshInterval\"\n data-cy=\"c8y-alarm-list-widget-config--interval-selector\"\n >\n @for (refreshInterval of REFRESH_INTERVAL_IN_MILLISECONDS; track refreshInterval) {\n <option [value]=\"refreshInterval\">\n {{ '{{ seconds }}s' | translate: { seconds: refreshInterval / 1000 } }}\n </option>\n }\n </select>\n </div>\n }\n </div>\n </c8y-form-group>\n </div>\n </fieldset>\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display options' | translate }}</legend>\n <div formGroupName=\"displayOptions\">\n <!-- Data options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Data' | translate }}</legend>\n <c8y-form-group\n class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- hierarchical data -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show assets and all descendants' | translate\"\n >\n <input\n name=\"includeDescendants\"\n type=\"checkbox\"\n formControlName=\"includeDescendants\"\n />\n <span></span>\n <span translate>Include descendants</span>\n <button\n class=\"btn-help m-l-8\"\n [attr.aria-label]=\"includeDescendantsTooltip | translate\"\n [popover]=\"includeDescendantsTooltip | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <!-- Status icon -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show status icon column' | translate\"\n >\n <input\n name=\"showStatusIcon\"\n type=\"checkbox\"\n formControlName=\"showStatusIcon\"\n />\n <span></span>\n <span translate>Show status icon column</span>\n </label>\n </c8y-form-group>\n </fieldset>\n <!-- Header options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Header' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\">\n <!-- grid header -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Display the data grid header' | translate\"\n >\n <input\n name=\"gridHeader\"\n type=\"checkbox\"\n formControlName=\"gridHeader\"\n />\n <span></span>\n <span translate>Table header</span>\n </label>\n <!-- show filter label -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display applied filters in the header' | translate\"\n >\n <input\n name=\"filter\"\n type=\"checkbox\"\n formControlName=\"filter\"\n />\n <span></span>\n <span translate>Active filters</span>\n </label>\n <!-- enable configurable columns -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display columns configuration button' | translate\"\n >\n <input\n name=\"configurableColumnsEnabled\"\n type=\"checkbox\"\n formControlName=\"configurableColumnsEnabled\"\n />\n <span></span>\n <span translate>Configure columns</span>\n </label>\n <!-- footer -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display the table footer' | translate\"\n >\n <input\n name=\"footer\"\n type=\"checkbox\"\n formControlName=\"footer\"\n />\n <span></span>\n <span translate>Table footer</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Row options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Row' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 d-flex-md gap-16 flex-wrap form-group-sm\">\n <!-- zebra stripes -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Alternate row background for readability' | translate\"\n >\n <input\n name=\"striped\"\n type=\"checkbox\"\n formControlName=\"striped\"\n />\n <span></span>\n <span translate>Striped rows</span>\n </label>\n <!-- hover effect -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Change row background color on hover' | translate\"\n >\n <input\n name=\"hover\"\n type=\"checkbox\"\n formControlName=\"hover\"\n />\n <span></span>\n <span translate>Hover highlight</span>\n </label>\n <!-- show loading indicator -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show a spinner while data loads' | translate\"\n >\n <input\n name=\"showLoadingIndicator\"\n type=\"checkbox\"\n formControlName=\"showLoadingIndicator\"\n />\n <span></span>\n <span translate>Loading indicator</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Cell options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Cell' | translate }}</legend>\n <div class=\"d-flex-md gap-16 flex-wrap m-b-8\">\n <!-- cell borders (inside displayOptions) -->\n <c8y-form-group class=\"m-b-0 form-group-sm\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Draw borders around table cells' | translate\"\n >\n <input\n name=\"bordered\"\n type=\"checkbox\"\n formControlName=\"bordered\"\n />\n <span></span>\n <span translate>Cell borders</span>\n </label>\n </c8y-form-group>\n <!-- Cell content options (outside displayOptions formGroup, at root form level) -->\n <c8y-form-group\n class=\"m-b-0 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- show icon and value -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'When cell rendering is set to icon, show both icon and value' | translate\"\n >\n <input\n name=\"showIconAndValue\"\n type=\"checkbox\"\n formControlName=\"showIconAndValue\"\n />\n <span></span>\n <span translate>Icon with value</span>\n </label>\n <!-- show as link -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"\n 'Render the first column (excluding computed and alarm types) as a link to the asset details.'\n | translate\n \"\n >\n <input\n name=\"showAsLink\"\n type=\"checkbox\"\n formControlName=\"showAsLink\"\n />\n <span></span>\n <span translate>First column link</span>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n </div>\n </fieldset>\n</form>\n\n<ng-template #assetTablePreview>\n @if (\n !formGroup ||\n columns?.length === 0 ||\n ((config.selectedProperties?.length === 0 || config.selectedProperties === null) &&\n (config.operationColumns?.length === 0 || config.operationColumns === null))\n ) {\n <c8y-ui-empty-state\n class=\"d-block m-t-24\"\n [icon]=\"'search'\"\n [title]=\"'No data to display' | translate\"\n [subtitle]=\"'Start by selecting the properties' | translate\"\n ></c8y-ui-empty-state>\n } @else {\n @if (!formGroup.controls.widgetInstanceGlobalTimeContext.value) {\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!formGroup.controls.refreshInterval.value\"\n [refreshInterval]=\"formGroup.controls.refreshInterval.value\"\n [config]=\"formGroup.value\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n }\n <c8y-data-grid\n class=\"content-fullpage d-flex d-col border-top border-bottom\"\n [title]=\"title\"\n [displayOptions]=\"formGroup.controls.displayOptions.value\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [configureColumnsEnabled]=\"formGroup.get('displayOptions.configurableColumnsEnabled')?.value\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n >\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule$1 }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i1.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { 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: "directive", type: i2$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: AssetSelectorModule }, { kind: "component", type: AssetTableAutoRefreshComponent, selector: "c8y-asset-table-auto-refresh", inputs: ["config", "isIntervalRefresh", "refreshInterval", "isLoading", "isScrolling", "isRefreshDisabled"], outputs: ["onCountdownEnded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i3$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] }); }
|
|
1590
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AssetTableWidgetConfigComponent, isStandalone: true, selector: "c8y-asset-table-widget-config", providers: [ManagedObjectRealtimeService], viewQueries: [{ propertyName: "previewMapSet", first: true, predicate: ["assetTablePreview"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup\">\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Date' | translate }}</legend>\n <div class=\"row tight-grid\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"d-flex gap-8 a-i-center\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n [(ngModel)]=\"refreshOption\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Refreshing after the given interval' | translate\"\n value=\"interval\"\n >\n {{ 'Use refresh interval' | translate }}\n </option>\n <option\n [title]=\"'Refreshing after the given interval, synchronized globally' | translate\"\n value=\"global-interval\"\n >\n {{ 'Use global refresh interval' | translate }}\n </option>\n </select>\n </div>\n @if (formGroup?.controls?.refreshOption?.value !== GLOBAL_INTERVAL_OPTION) {\n <div\n class=\"c8y-select-wrapper grow flex-no-shrink\"\n title=\" {{ 'Interval' | translate }}\"\n >\n <select\n class=\"form-control text-12\"\n [title]=\"'Refresh interval in seconds' | translate\"\n id=\"refreshInterval\"\n formControlName=\"refreshInterval\"\n data-cy=\"c8y-asset-table-widget-config--refresh-interval-selector\"\n >\n @for (refreshInterval of REFRESH_INTERVAL_IN_MILLISECONDS; track refreshInterval) {\n <option [value]=\"refreshInterval\">\n {{ '{{ seconds }}s' | translate: { seconds: refreshInterval / 1000 } }}\n </option>\n }\n </select>\n </div>\n }\n </div>\n </c8y-form-group>\n </div>\n </fieldset>\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display options' | translate }}</legend>\n <div formGroupName=\"displayOptions\">\n <!-- Data options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Data' | translate }}</legend>\n <c8y-form-group\n class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- hierarchical data -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show assets and all descendants' | translate\"\n data-cy=\"c8y-asset-table-widget-config--include-descendants\"\n >\n <input\n name=\"includeDescendants\"\n type=\"checkbox\"\n formControlName=\"includeDescendants\"\n />\n <span></span>\n <span translate>Include descendants</span>\n <button\n class=\"btn-help m-l-8\"\n [attr.aria-label]=\"includeDescendantsTooltip | translate\"\n [popover]=\"includeDescendantsTooltip | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <!-- Status icon -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show status icon column' | translate\"\n data-cy=\"c8y-asset-table-widget-config--show-status-icon\"\n >\n <input\n name=\"showStatusIcon\"\n type=\"checkbox\"\n formControlName=\"showStatusIcon\"\n />\n <span></span>\n <span translate>Show status icon column</span>\n </label>\n </c8y-form-group>\n </fieldset>\n <!-- Header options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Header' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\">\n <!-- grid header -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Display the data grid header' | translate\"\n >\n <input\n name=\"gridHeader\"\n type=\"checkbox\"\n formControlName=\"gridHeader\"\n />\n <span></span>\n <span translate>Table header</span>\n </label>\n <!-- show filter label -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display applied filters in the header' | translate\"\n >\n <input\n name=\"filter\"\n type=\"checkbox\"\n formControlName=\"filter\"\n />\n <span></span>\n <span translate>Active filters</span>\n </label>\n <!-- enable configurable columns -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display columns configuration button' | translate\"\n >\n <input\n name=\"configurableColumnsEnabled\"\n type=\"checkbox\"\n formControlName=\"configurableColumnsEnabled\"\n />\n <span></span>\n <span translate>Configure columns</span>\n </label>\n <!-- footer -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display the table footer' | translate\"\n >\n <input\n name=\"footer\"\n type=\"checkbox\"\n formControlName=\"footer\"\n />\n <span></span>\n <span translate>Table footer</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Row options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Row' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 d-flex-md gap-16 flex-wrap form-group-sm\">\n <!-- zebra stripes -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Alternate row background for readability' | translate\"\n >\n <input\n name=\"striped\"\n type=\"checkbox\"\n formControlName=\"striped\"\n />\n <span></span>\n <span translate>Striped rows</span>\n </label>\n <!-- hover effect -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Change row background color on hover' | translate\"\n >\n <input\n name=\"hover\"\n type=\"checkbox\"\n formControlName=\"hover\"\n />\n <span></span>\n <span translate>Hover highlight</span>\n </label>\n <!-- show loading indicator -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show a spinner while data loads' | translate\"\n >\n <input\n name=\"showLoadingIndicator\"\n type=\"checkbox\"\n formControlName=\"showLoadingIndicator\"\n />\n <span></span>\n <span translate>Loading indicator</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Cell options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Cell' | translate }}</legend>\n <div class=\"d-flex-md gap-16 flex-wrap m-b-8\">\n <!-- cell borders (inside displayOptions) -->\n <c8y-form-group class=\"m-b-0 form-group-sm\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Draw borders around table cells' | translate\"\n >\n <input\n name=\"bordered\"\n type=\"checkbox\"\n formControlName=\"bordered\"\n />\n <span></span>\n <span translate>Cell borders</span>\n </label>\n </c8y-form-group>\n <!-- Cell content options (outside displayOptions formGroup, at root form level) -->\n <c8y-form-group\n class=\"m-b-0 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- show icon and value -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'When cell rendering is set to icon, show both icon and value' | translate\"\n data-cy=\"c8y-asset-table-widget-config--show-icon-and-value\"\n >\n <input\n name=\"showIconAndValue\"\n type=\"checkbox\"\n formControlName=\"showIconAndValue\"\n />\n <span></span>\n <span translate>Icon with value</span>\n </label>\n <!-- show as link -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"\n 'Render the first column (excluding computed and alarm types) as a link to the asset details.'\n | translate\n \"\n data-cy=\"c8y-asset-table-widget-config--show-as-link\"\n >\n <input\n name=\"showAsLink\"\n type=\"checkbox\"\n formControlName=\"showAsLink\"\n />\n <span></span>\n <span translate>First column link</span>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n </div>\n </fieldset>\n</form>\n\n<ng-template #assetTablePreview>\n @if (\n !formGroup ||\n columns?.length === 0 ||\n ((config.selectedProperties?.length === 0 || config.selectedProperties === null) &&\n (config.operationColumns?.length === 0 || config.operationColumns === null))\n ) {\n <c8y-ui-empty-state\n class=\"d-block m-t-24\"\n [icon]=\"'search'\"\n [title]=\"'No data to display' | translate\"\n [subtitle]=\"'Start by selecting the properties' | translate\"\n ></c8y-ui-empty-state>\n } @else {\n @if (!formGroup.controls.widgetInstanceGlobalTimeContext.value) {\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!formGroup.controls.refreshInterval.value\"\n [refreshInterval]=\"formGroup.controls.refreshInterval.value\"\n [config]=\"formGroup.value\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n }\n <c8y-data-grid\n class=\"content-fullpage d-flex d-col border-top border-bottom\"\n [title]=\"title\"\n [displayOptions]=\"formGroup.controls.displayOptions.value\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [configureColumnsEnabled]=\"formGroup.get('displayOptions.configurableColumnsEnabled')?.value\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n >\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule$1 }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i1.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { 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: "directive", type: i2$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: AssetSelectorModule }, { kind: "component", type: AssetTableAutoRefreshComponent, selector: "c8y-asset-table-auto-refresh", inputs: ["config", "isIntervalRefresh", "refreshInterval", "isLoading", "isScrolling", "isRefreshDisabled"], outputs: ["onCountdownEnded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i3$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] }); }
|
|
1591
1591
|
}
|
|
1592
1592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AssetTableWidgetConfigComponent, decorators: [{
|
|
1593
1593
|
type: Component,
|
|
@@ -1598,7 +1598,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1598
1598
|
AssetTableAutoRefreshComponent,
|
|
1599
1599
|
TooltipModule,
|
|
1600
1600
|
PopoverModule
|
|
1601
|
-
], providers: [ManagedObjectRealtimeService], template: "<form [formGroup]=\"formGroup\">\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Date' | translate }}</legend>\n <div class=\"row tight-grid\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"d-flex gap-8 a-i-center\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n [(ngModel)]=\"refreshOption\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Refreshing after the given interval' | translate\"\n value=\"interval\"\n >\n {{ 'Use refresh interval' | translate }}\n </option>\n <option\n [title]=\"'Refreshing after the given interval, synchronized globally' | translate\"\n value=\"global-interval\"\n >\n {{ 'Use global refresh interval' | translate }}\n </option>\n </select>\n </div>\n @if (formGroup?.controls?.refreshOption?.value !== GLOBAL_INTERVAL_OPTION) {\n <div\n class=\"c8y-select-wrapper grow flex-no-shrink\"\n title=\" {{ 'Interval' | translate }}\"\n >\n <select\n class=\"form-control text-12\"\n [title]=\"'Refresh interval in seconds' | translate\"\n id=\"refreshInterval\"\n formControlName=\"refreshInterval\"\n data-cy=\"c8y-alarm-list-widget-config--interval-selector\"\n >\n @for (refreshInterval of REFRESH_INTERVAL_IN_MILLISECONDS; track refreshInterval) {\n <option [value]=\"refreshInterval\">\n {{ '{{ seconds }}s' | translate: { seconds: refreshInterval / 1000 } }}\n </option>\n }\n </select>\n </div>\n }\n </div>\n </c8y-form-group>\n </div>\n </fieldset>\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display options' | translate }}</legend>\n <div formGroupName=\"displayOptions\">\n <!-- Data options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Data' | translate }}</legend>\n <c8y-form-group\n class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- hierarchical data -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show assets and all descendants' | translate\"\n >\n <input\n name=\"includeDescendants\"\n type=\"checkbox\"\n formControlName=\"includeDescendants\"\n />\n <span></span>\n <span translate>Include descendants</span>\n <button\n class=\"btn-help m-l-8\"\n [attr.aria-label]=\"includeDescendantsTooltip | translate\"\n [popover]=\"includeDescendantsTooltip | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <!-- Status icon -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show status icon column' | translate\"\n >\n <input\n name=\"showStatusIcon\"\n type=\"checkbox\"\n formControlName=\"showStatusIcon\"\n />\n <span></span>\n <span translate>Show status icon column</span>\n </label>\n </c8y-form-group>\n </fieldset>\n <!-- Header options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Header' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\">\n <!-- grid header -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Display the data grid header' | translate\"\n >\n <input\n name=\"gridHeader\"\n type=\"checkbox\"\n formControlName=\"gridHeader\"\n />\n <span></span>\n <span translate>Table header</span>\n </label>\n <!-- show filter label -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display applied filters in the header' | translate\"\n >\n <input\n name=\"filter\"\n type=\"checkbox\"\n formControlName=\"filter\"\n />\n <span></span>\n <span translate>Active filters</span>\n </label>\n <!-- enable configurable columns -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display columns configuration button' | translate\"\n >\n <input\n name=\"configurableColumnsEnabled\"\n type=\"checkbox\"\n formControlName=\"configurableColumnsEnabled\"\n />\n <span></span>\n <span translate>Configure columns</span>\n </label>\n <!-- footer -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display the table footer' | translate\"\n >\n <input\n name=\"footer\"\n type=\"checkbox\"\n formControlName=\"footer\"\n />\n <span></span>\n <span translate>Table footer</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Row options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Row' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 d-flex-md gap-16 flex-wrap form-group-sm\">\n <!-- zebra stripes -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Alternate row background for readability' | translate\"\n >\n <input\n name=\"striped\"\n type=\"checkbox\"\n formControlName=\"striped\"\n />\n <span></span>\n <span translate>Striped rows</span>\n </label>\n <!-- hover effect -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Change row background color on hover' | translate\"\n >\n <input\n name=\"hover\"\n type=\"checkbox\"\n formControlName=\"hover\"\n />\n <span></span>\n <span translate>Hover highlight</span>\n </label>\n <!-- show loading indicator -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show a spinner while data loads' | translate\"\n >\n <input\n name=\"showLoadingIndicator\"\n type=\"checkbox\"\n formControlName=\"showLoadingIndicator\"\n />\n <span></span>\n <span translate>Loading indicator</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Cell options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Cell' | translate }}</legend>\n <div class=\"d-flex-md gap-16 flex-wrap m-b-8\">\n <!-- cell borders (inside displayOptions) -->\n <c8y-form-group class=\"m-b-0 form-group-sm\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Draw borders around table cells' | translate\"\n >\n <input\n name=\"bordered\"\n type=\"checkbox\"\n formControlName=\"bordered\"\n />\n <span></span>\n <span translate>Cell borders</span>\n </label>\n </c8y-form-group>\n <!-- Cell content options (outside displayOptions formGroup, at root form level) -->\n <c8y-form-group\n class=\"m-b-0 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- show icon and value -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'When cell rendering is set to icon, show both icon and value' | translate\"\n >\n <input\n name=\"showIconAndValue\"\n type=\"checkbox\"\n formControlName=\"showIconAndValue\"\n />\n <span></span>\n <span translate>Icon with value</span>\n </label>\n <!-- show as link -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"\n 'Render the first column (excluding computed and alarm types) as a link to the asset details.'\n | translate\n \"\n >\n <input\n name=\"showAsLink\"\n type=\"checkbox\"\n formControlName=\"showAsLink\"\n />\n <span></span>\n <span translate>First column link</span>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n </div>\n </fieldset>\n</form>\n\n<ng-template #assetTablePreview>\n @if (\n !formGroup ||\n columns?.length === 0 ||\n ((config.selectedProperties?.length === 0 || config.selectedProperties === null) &&\n (config.operationColumns?.length === 0 || config.operationColumns === null))\n ) {\n <c8y-ui-empty-state\n class=\"d-block m-t-24\"\n [icon]=\"'search'\"\n [title]=\"'No data to display' | translate\"\n [subtitle]=\"'Start by selecting the properties' | translate\"\n ></c8y-ui-empty-state>\n } @else {\n @if (!formGroup.controls.widgetInstanceGlobalTimeContext.value) {\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!formGroup.controls.refreshInterval.value\"\n [refreshInterval]=\"formGroup.controls.refreshInterval.value\"\n [config]=\"formGroup.value\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n }\n <c8y-data-grid\n class=\"content-fullpage d-flex d-col border-top border-bottom\"\n [title]=\"title\"\n [displayOptions]=\"formGroup.controls.displayOptions.value\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [configureColumnsEnabled]=\"formGroup.get('displayOptions.configurableColumnsEnabled')?.value\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n >\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n }\n</ng-template>\n" }]
|
|
1601
|
+
], providers: [ManagedObjectRealtimeService], template: "<form [formGroup]=\"formGroup\">\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Date' | translate }}</legend>\n <div class=\"row tight-grid\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"d-flex gap-8 a-i-center\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n [(ngModel)]=\"refreshOption\"\n [ngModelOptions]=\"{ standalone: true }\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Refreshing after the given interval' | translate\"\n value=\"interval\"\n >\n {{ 'Use refresh interval' | translate }}\n </option>\n <option\n [title]=\"'Refreshing after the given interval, synchronized globally' | translate\"\n value=\"global-interval\"\n >\n {{ 'Use global refresh interval' | translate }}\n </option>\n </select>\n </div>\n @if (formGroup?.controls?.refreshOption?.value !== GLOBAL_INTERVAL_OPTION) {\n <div\n class=\"c8y-select-wrapper grow flex-no-shrink\"\n title=\" {{ 'Interval' | translate }}\"\n >\n <select\n class=\"form-control text-12\"\n [title]=\"'Refresh interval in seconds' | translate\"\n id=\"refreshInterval\"\n formControlName=\"refreshInterval\"\n data-cy=\"c8y-asset-table-widget-config--refresh-interval-selector\"\n >\n @for (refreshInterval of REFRESH_INTERVAL_IN_MILLISECONDS; track refreshInterval) {\n <option [value]=\"refreshInterval\">\n {{ '{{ seconds }}s' | translate: { seconds: refreshInterval / 1000 } }}\n </option>\n }\n </select>\n </div>\n }\n </div>\n </c8y-form-group>\n </div>\n </fieldset>\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display options' | translate }}</legend>\n <div formGroupName=\"displayOptions\">\n <!-- Data options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Data' | translate }}</legend>\n <c8y-form-group\n class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- hierarchical data -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show assets and all descendants' | translate\"\n data-cy=\"c8y-asset-table-widget-config--include-descendants\"\n >\n <input\n name=\"includeDescendants\"\n type=\"checkbox\"\n formControlName=\"includeDescendants\"\n />\n <span></span>\n <span translate>Include descendants</span>\n <button\n class=\"btn-help m-l-8\"\n [attr.aria-label]=\"includeDescendantsTooltip | translate\"\n [popover]=\"includeDescendantsTooltip | translate\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <!-- Status icon -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show status icon column' | translate\"\n data-cy=\"c8y-asset-table-widget-config--show-status-icon\"\n >\n <input\n name=\"showStatusIcon\"\n type=\"checkbox\"\n formControlName=\"showStatusIcon\"\n />\n <span></span>\n <span translate>Show status icon column</span>\n </label>\n </c8y-form-group>\n </fieldset>\n <!-- Header options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Header' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 form-group-sm d-flex-md flex-wrap gap-16\">\n <!-- grid header -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Display the data grid header' | translate\"\n >\n <input\n name=\"gridHeader\"\n type=\"checkbox\"\n formControlName=\"gridHeader\"\n />\n <span></span>\n <span translate>Table header</span>\n </label>\n <!-- show filter label -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display applied filters in the header' | translate\"\n >\n <input\n name=\"filter\"\n type=\"checkbox\"\n formControlName=\"filter\"\n />\n <span></span>\n <span translate>Active filters</span>\n </label>\n <!-- enable configurable columns -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display columns configuration button' | translate\"\n >\n <input\n name=\"configurableColumnsEnabled\"\n type=\"checkbox\"\n formControlName=\"configurableColumnsEnabled\"\n />\n <span></span>\n <span translate>Configure columns</span>\n </label>\n <!-- footer -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Display the table footer' | translate\"\n >\n <input\n name=\"footer\"\n type=\"checkbox\"\n formControlName=\"footer\"\n />\n <span></span>\n <span translate>Table footer</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Row options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Row' | translate }}</legend>\n <c8y-form-group class=\"m-b-8 d-flex-md gap-16 flex-wrap form-group-sm\">\n <!-- zebra stripes -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Alternate row background for readability' | translate\"\n >\n <input\n name=\"striped\"\n type=\"checkbox\"\n formControlName=\"striped\"\n />\n <span></span>\n <span translate>Striped rows</span>\n </label>\n <!-- hover effect -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Change row background color on hover' | translate\"\n >\n <input\n name=\"hover\"\n type=\"checkbox\"\n formControlName=\"hover\"\n />\n <span></span>\n <span translate>Hover highlight</span>\n </label>\n <!-- show loading indicator -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"'Show a spinner while data loads' | translate\"\n >\n <input\n name=\"showLoadingIndicator\"\n type=\"checkbox\"\n formControlName=\"showLoadingIndicator\"\n />\n <span></span>\n <span translate>Loading indicator</span>\n </label>\n </c8y-form-group>\n </fieldset>\n\n <!-- Cell options -->\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Cell' | translate }}</legend>\n <div class=\"d-flex-md gap-16 flex-wrap m-b-8\">\n <!-- cell borders (inside displayOptions) -->\n <c8y-form-group class=\"m-b-0 form-group-sm\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Draw borders around table cells' | translate\"\n >\n <input\n name=\"bordered\"\n type=\"checkbox\"\n formControlName=\"bordered\"\n />\n <span></span>\n <span translate>Cell borders</span>\n </label>\n </c8y-form-group>\n <!-- Cell content options (outside displayOptions formGroup, at root form level) -->\n <c8y-form-group\n class=\"m-b-0 form-group-sm d-flex-md flex-wrap gap-16\"\n [formGroup]=\"formGroup\"\n >\n <!-- show icon and value -->\n <label\n class=\"c8y-checkbox\"\n [title]=\"'When cell rendering is set to icon, show both icon and value' | translate\"\n data-cy=\"c8y-asset-table-widget-config--show-icon-and-value\"\n >\n <input\n name=\"showIconAndValue\"\n type=\"checkbox\"\n formControlName=\"showIconAndValue\"\n />\n <span></span>\n <span translate>Icon with value</span>\n </label>\n <!-- show as link -->\n <label\n class=\"c8y-checkbox m-t-0\"\n [title]=\"\n 'Render the first column (excluding computed and alarm types) as a link to the asset details.'\n | translate\n \"\n data-cy=\"c8y-asset-table-widget-config--show-as-link\"\n >\n <input\n name=\"showAsLink\"\n type=\"checkbox\"\n formControlName=\"showAsLink\"\n />\n <span></span>\n <span translate>First column link</span>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n </div>\n </fieldset>\n</form>\n\n<ng-template #assetTablePreview>\n @if (\n !formGroup ||\n columns?.length === 0 ||\n ((config.selectedProperties?.length === 0 || config.selectedProperties === null) &&\n (config.operationColumns?.length === 0 || config.operationColumns === null))\n ) {\n <c8y-ui-empty-state\n class=\"d-block m-t-24\"\n [icon]=\"'search'\"\n [title]=\"'No data to display' | translate\"\n [subtitle]=\"'Start by selecting the properties' | translate\"\n ></c8y-ui-empty-state>\n } @else {\n @if (!formGroup.controls.widgetInstanceGlobalTimeContext.value) {\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!formGroup.controls.refreshInterval.value\"\n [refreshInterval]=\"formGroup.controls.refreshInterval.value\"\n [config]=\"formGroup.value\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n }\n <c8y-data-grid\n class=\"content-fullpage d-flex d-col border-top border-bottom\"\n [title]=\"title\"\n [displayOptions]=\"formGroup.controls.displayOptions.value\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [configureColumnsEnabled]=\"formGroup.get('displayOptions.configurableColumnsEnabled')?.value\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n >\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n }\n</ng-template>\n" }]
|
|
1602
1602
|
}], ctorParameters: () => [], propDecorators: { previewMapSet: [{
|
|
1603
1603
|
type: ViewChild,
|
|
1604
1604
|
args: ['assetTablePreview']
|
|
@@ -1687,11 +1687,11 @@ class AssetTableWidgetViewComponent {
|
|
|
1687
1687
|
.subscribe();
|
|
1688
1688
|
}
|
|
1689
1689
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AssetTableWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1690
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AssetTableWidgetViewComponent, isStandalone: true, selector: "c8y-asset-table-widget-view", inputs: { config: "config" }, host: { properties: { "class.hide-footer": "config?.displayOptions?.footer === false" } }, ngImport: i0, template: "@if (!config.widgetInstanceGlobalTimeContext) {\n <c8y-widget-action>\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!config.refreshInterval\"\n [refreshInterval]=\"config.refreshInterval\"\n [config]=\"config\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n </c8y-widget-action>\n}\n<c8y-data-grid\n class=\"content-fullpage d-flex d-col\"\n [title]=\"config.title\"\n [displayOptions]=\"config.displayOptions\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [pagination]=\"pagination\"\n (onPageSizeChange)=\"pagination = $event.pagination\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n>\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n</c8y-data-grid>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: i1.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: AssetTableAutoRefreshComponent, selector: "c8y-asset-table-auto-refresh", inputs: ["config", "isIntervalRefresh", "refreshInterval", "isLoading", "isScrolling", "isRefreshDisabled"], outputs: ["onCountdownEnded"] }, { kind: "component", type: WidgetActionWrapperComponent, selector: "c8y-widget-action" }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] }); }
|
|
1690
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AssetTableWidgetViewComponent, isStandalone: true, selector: "c8y-asset-table-widget-view", inputs: { config: "config" }, host: { properties: { "class.hide-footer": "config?.displayOptions?.footer === false" } }, ngImport: i0, template: "@if (!config.widgetInstanceGlobalTimeContext) {\n <c8y-widget-action>\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!config.refreshInterval\"\n [refreshInterval]=\"config.refreshInterval\"\n [config]=\"config\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n </c8y-widget-action>\n}\n<c8y-data-grid\n class=\"content-fullpage d-flex d-col\"\n [title]=\"config.title\"\n [displayOptions]=\"config.displayOptions\"\n [configureColumnsEnabled]=\"config.displayOptions.configurableColumnsEnabled ?? true\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [pagination]=\"pagination\"\n (onPageSizeChange)=\"pagination = $event.pagination\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n>\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n</c8y-data-grid>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: i1.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: AssetTableAutoRefreshComponent, selector: "c8y-asset-table-auto-refresh", inputs: ["config", "isIntervalRefresh", "refreshInterval", "isLoading", "isScrolling", "isRefreshDisabled"], outputs: ["onCountdownEnded"] }, { kind: "component", type: WidgetActionWrapperComponent, selector: "c8y-widget-action" }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] }); }
|
|
1691
1691
|
}
|
|
1692
1692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AssetTableWidgetViewComponent, decorators: [{
|
|
1693
1693
|
type: Component,
|
|
1694
|
-
args: [{ selector: 'c8y-asset-table-widget-view', standalone: true, imports: [CoreModule, RouterModule, AssetTableAutoRefreshComponent, WidgetActionWrapperComponent], host: { '[class.hide-footer]': 'config?.displayOptions?.footer === false' }, template: "@if (!config.widgetInstanceGlobalTimeContext) {\n <c8y-widget-action>\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!config.refreshInterval\"\n [refreshInterval]=\"config.refreshInterval\"\n [config]=\"config\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n </c8y-widget-action>\n}\n<c8y-data-grid\n class=\"content-fullpage d-flex d-col\"\n [title]=\"config.title\"\n [displayOptions]=\"config.displayOptions\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [pagination]=\"pagination\"\n (onPageSizeChange)=\"pagination = $event.pagination\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n>\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n</c8y-data-grid>\n" }]
|
|
1694
|
+
args: [{ selector: 'c8y-asset-table-widget-view', standalone: true, imports: [CoreModule, RouterModule, AssetTableAutoRefreshComponent, WidgetActionWrapperComponent], host: { '[class.hide-footer]': 'config?.displayOptions?.footer === false' }, template: "@if (!config.widgetInstanceGlobalTimeContext) {\n <c8y-widget-action>\n <c8y-asset-table-auto-refresh\n class=\"d-contents\"\n [isIntervalRefresh]=\"!!config.refreshInterval\"\n [refreshInterval]=\"config.refreshInterval\"\n [config]=\"config\"\n [isRefreshDisabled]=\"false\"\n [isLoading]=\"isLoading$\"\n (onCountdownEnded)=\"updateSelectedAssets()\"\n ></c8y-asset-table-auto-refresh>\n </c8y-widget-action>\n}\n<c8y-data-grid\n class=\"content-fullpage d-flex d-col\"\n [title]=\"config.title\"\n [displayOptions]=\"config.displayOptions\"\n [configureColumnsEnabled]=\"config.displayOptions.configurableColumnsEnabled ?? true\"\n [columns]=\"columns\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n [pagination]=\"pagination\"\n (onPageSizeChange)=\"pagination = $event.pagination\"\n [refresh]=\"refresh\"\n (onSort)=\"onGridSort($event)\"\n>\n <c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n</c8y-data-grid>\n" }]
|
|
1695
1695
|
}], ctorParameters: () => [], propDecorators: { config: [{
|
|
1696
1696
|
type: Input
|
|
1697
1697
|
}] } });
|
|
@@ -2056,7 +2056,7 @@ class AssetTableGridSettingsComponent {
|
|
|
2056
2056
|
return this.assetTableService.getColumns(this.selectedProperties, this.operationColumns, config);
|
|
2057
2057
|
}
|
|
2058
2058
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AssetTableGridSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2059
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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 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 <label class=\"editable\">\n <input\n class=\"form-control input-sm\"\n [attr.aria-label]=\"'Column header' | translate\"\n placeholder=\"{{ 'Column header' | translate }}\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"column.header\"\n (keydown.enter)=\"updateColumnNames(column); $event.target.blur()\"\n (blur)=\"updateColumnNames(column)\"\n />\n </label>\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\">\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 [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 (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 (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 (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 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 (click)=\"onCreateOperation()\"\n >\n {{ 'Create operation' | translate }}\n </button>\n </li>\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\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.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.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: "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" }] }); }
|
|
2059
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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 <label class=\"editable\">\n <input\n class=\"form-control input-sm\"\n [attr.aria-label]=\"'Column header' | translate\"\n placeholder=\"{{ 'Column header' | translate }}\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"column.header\"\n (keydown.enter)=\"updateColumnNames(column); $event.target.blur()\"\n (blur)=\"updateColumnNames(column)\"\n />\n </label>\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\">\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.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.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: "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" }] }); }
|
|
2060
2060
|
}
|
|
2061
2061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AssetTableGridSettingsComponent, decorators: [{
|
|
2062
2062
|
type: Component,
|
|
@@ -2076,7 +2076,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
2076
2076
|
EmptyStateComponent,
|
|
2077
2077
|
ListGroupModule,
|
|
2078
2078
|
NgClass
|
|
2079
|
-
], providers: [BsDropdownDirective], 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 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 <label class=\"editable\">\n <input\n class=\"form-control input-sm\"\n [attr.aria-label]=\"'Column header' | translate\"\n placeholder=\"{{ 'Column header' | translate }}\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"column.header\"\n (keydown.enter)=\"updateColumnNames(column); $event.target.blur()\"\n (blur)=\"updateColumnNames(column)\"\n />\n </label>\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\">\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 [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 (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 (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 (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 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 (click)=\"onCreateOperation()\"\n >\n {{ 'Create operation' | translate }}\n </button>\n </li>\n <li>\n <button\n class=\"dropdown-item\"\n type=\"button\"\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" }]
|
|
2079
|
+
], providers: [BsDropdownDirective], 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 <label class=\"editable\">\n <input\n class=\"form-control input-sm\"\n [attr.aria-label]=\"'Column header' | translate\"\n placeholder=\"{{ 'Column header' | translate }}\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"column.header\"\n (keydown.enter)=\"updateColumnNames(column); $event.target.blur()\"\n (blur)=\"updateColumnNames(column)\"\n />\n </label>\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\">\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" }]
|
|
2080
2080
|
}] });
|
|
2081
2081
|
|
|
2082
2082
|
/**
|