@c8y/ngx-components 1024.16.10 → 1024.16.12
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.
|
@@ -31037,7 +31037,7 @@ class DashboardChildComponent {
|
|
|
31037
31037
|
return false;
|
|
31038
31038
|
}
|
|
31039
31039
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DashboardChildComponent, deps: [{ token: DashboardComponent }, { token: i2$1.DomSanitizer }, { token: i0.ElementRef }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31040
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: DashboardChildComponent, isStandalone: true, selector: "c8y-dashboard-child", inputs: { x: { classPropertyName: "x", publicName: "x", isSignal: false, isRequired: false, transformFunction: null }, y: { classPropertyName: "y", publicName: "y", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: false, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: false, isRequired: false, transformFunction: null }, minH: { classPropertyName: "minH", publicName: "minH", isSignal: false, isRequired: false, transformFunction: null }, minW: { classPropertyName: "minW", publicName: "minW", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: false, isRequired: false, transformFunction: null }, useIntersection: { classPropertyName: "useIntersection", publicName: "useIntersection", isSignal: false, isRequired: false, transformFunction: null }, isFrozen: { classPropertyName: "isFrozen", publicName: "isFrozen", isSignal: false, isRequired: false, transformFunction: null }, canToggleFullscreen: { classPropertyName: "canToggleFullscreen", publicName: "canToggleFullscreen", isSignal: false, isRequired: false, transformFunction: null }, _editModeInput: { classPropertyName: "_editModeInput", publicName: "editMode", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changeStart: "changeStart", changeEnd: "changeEnd", toggleFullscreen: "toggleFullscreen" }, host: { properties: { "class.fullscreen": "this.fullscreen" }, classAttribute: "dashboard-grid-child grid-stack-item" }, queries: [{ propertyName: "templateActions", predicate: DashboardChildActionComponent }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"klasses\">\n <div\n class=\"card-header-actions card-header-grid\"\n data-cy=\"c8y-dashboard-child--drag-handle\"\n [ngClass]=\"{\n 'drag-handle': editMode() && !fullscreen,\n draggableCursor: editMode() && !fullscreen\n }\"\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n\n @if (actions.length > 0) {\n <div class=\"header-actions d-flex a-i-center\">\n @for (headerTemplate of additionalHeaderTemplates$ | async; track headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate.template\"></ng-container>\n }\n\n @if (editMode()) {\n <div\n class=\"dropdown\"\n placement=\"bottom right\"\n dropdown\n c8yDropdownFocusTrap\n [container]=\"'body'\"\n #sizePreset=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-icon dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Size' | translate\"\n [tooltip]=\"'Set size' | translate\"\n container=\"body\"\n [delay]=\"500\"\n dropdownToggle\n data-cy=\"c8y-dashboard-child--height-preset\"\n >\n <i\n [c8yIcon]=\"'resize'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right p-16\"\n *dropdownMenu\n >\n @if (dashboard?.layout() === 'custom' && dashboard?.alignViewHeight()) {\n <table class=\"table-bordered table-btn-grid\">\n <caption class=\"sr-only\">\n {{\n 'Select widget size by width and height' | translate\n }}\n </caption>\n <thead>\n <tr>\n <th>\n <span class=\"sr-only\">{{ 'Width / Height' | translate }}</span>\n </th>\n @for (wp of sizePresets; track wp) {\n <th class=\"text-center\">\n <small class=\"text-label-small\">\n {{ wp === 100 ? ('Full' | translate) : wp + '%' }}\n </small>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (hp of sizePresets; track hp) {\n <tr>\n <th class=\"text-right p-r-4\">\n <small class=\"text-label-small\">\n {{ hp === 100 ? ('Full' | translate) : hp + '%' }}\n </small>\n </th>\n @for (wp of sizePresets; track wp) {\n <td\n class=\"p-2\"\n [attr.data-g-btn]=\"wp\"\n >\n @let active = isActiveSizePreset(wp, hp);\n <button\n class=\"btn btn-dot btn-xs\"\n [class.btn-primary]=\"active\"\n [attr.aria-label]=\"getSizePresetAriaLabel(wp, hp)\"\n type=\"button\"\n (click)=\"setSizePreset(wp, hp)\"\n >\n @if (active) {\n <i\n [c8yIcon]=\"'check'\"\n aria-hidden=\"true\"\n ></i>\n }\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <div class=\"d-col gap-4\">\n <small class=\"text-label-small\">{{ 'Width' | translate }}</small>\n <div\n class=\"btn-group\"\n [attr.aria-label]=\"'Width presets' | translate\"\n role=\"group\"\n >\n @for (wp of sizePresets; track wp) {\n <button\n class=\"btn btn-default btn-sm p-l-4 p-r-4\"\n [class.btn-primary]=\"isActiveWidthPreset(wp)\"\n [attr.aria-label]=\"\n wp === 100\n ? ('Set full width' | translate)\n : ('Set width to {{percent}}%' | translate: { percent: wp })\n \"\n type=\"button\"\n (click)=\"setWidthPreset(wp)\"\n >\n {{ wp === 100 ? ('Full' | translate) : wp + '%' }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n @let fullScreenLabel = 'Full screen' | translate;\n @let exitFullScreenLabel = 'Exit full screen' | translate;\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"fullscreen ? exitFullScreenLabel : fullScreenLabel\"\n [tooltip]=\"fullscreen ? exitFullScreenLabel : fullScreenLabel\"\n container=\"body\"\n [delay]=\"500\"\n [disabled]=\"!canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i\n [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n c8yDropdownFocusTrap\n [container]=\"'body'\"\n #cardDashboardActions=\"bs-dropdown\"\n >\n @if (editMode()) {\n <button\n class=\"btn btn-icon dropdown-toggle c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n [attr.aria-label]=\"'Settings' | translate\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"cardDashboardActions.isOpen\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i\n [c8yIcon]=\"'cog'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n } @else {\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click "Edit widgets" to unlock' | translate\"\n tooltip=\"{{ 'Click "Edit widgets" to unlock' | translate }}\"\n container=\"body\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i\n [c8yIcon]=\"'lock'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n style=\"right: -1px\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n *dropdownMenu\n >\n @for (action of actions; track action) {\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n }\n </ul>\n </div>\n </div>\n }\n </div>\n\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1$4.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: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i1$2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i1$2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i1$2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownFocusTrapDirective, selector: "[c8yDropdownFocusTrap]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
31040
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: DashboardChildComponent, isStandalone: true, selector: "c8y-dashboard-child", inputs: { x: { classPropertyName: "x", publicName: "x", isSignal: false, isRequired: false, transformFunction: null }, y: { classPropertyName: "y", publicName: "y", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: false, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: false, isRequired: false, transformFunction: null }, minH: { classPropertyName: "minH", publicName: "minH", isSignal: false, isRequired: false, transformFunction: null }, minW: { classPropertyName: "minW", publicName: "minW", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: false, isRequired: false, transformFunction: null }, useIntersection: { classPropertyName: "useIntersection", publicName: "useIntersection", isSignal: false, isRequired: false, transformFunction: null }, isFrozen: { classPropertyName: "isFrozen", publicName: "isFrozen", isSignal: false, isRequired: false, transformFunction: null }, canToggleFullscreen: { classPropertyName: "canToggleFullscreen", publicName: "canToggleFullscreen", isSignal: false, isRequired: false, transformFunction: null }, _editModeInput: { classPropertyName: "_editModeInput", publicName: "editMode", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changeStart: "changeStart", changeEnd: "changeEnd", toggleFullscreen: "toggleFullscreen" }, host: { properties: { "class.fullscreen": "this.fullscreen" }, classAttribute: "dashboard-grid-child grid-stack-item" }, queries: [{ propertyName: "templateActions", predicate: DashboardChildActionComponent }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"klasses\">\n <div\n class=\"card-header-actions card-header-grid\"\n data-cy=\"c8y-dashboard-child--drag-handle\"\n [ngClass]=\"{\n 'drag-handle': editMode() && !fullscreen,\n draggableCursor: editMode() && !fullscreen\n }\"\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n\n @let headerTemplates = additionalHeaderTemplates$ | async;\n @let hasActions = actions.length > 0;\n <!-- Projected header templates (e.g. widget time-context controls) must render even\n without actions \u2014 widgets rely on their instantiation to trigger the first data fetch. -->\n @if (hasActions || headerTemplates?.length) {\n <div class=\"header-actions d-flex a-i-center\">\n @for (headerTemplate of headerTemplates; track headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate.template\"></ng-container>\n }\n\n @if (hasActions) {\n @if (editMode()) {\n <div\n class=\"dropdown\"\n placement=\"bottom right\"\n dropdown\n c8yDropdownFocusTrap\n [container]=\"'body'\"\n #sizePreset=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-icon dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Size' | translate\"\n [tooltip]=\"'Set size' | translate\"\n container=\"body\"\n [delay]=\"500\"\n dropdownToggle\n data-cy=\"c8y-dashboard-child--height-preset\"\n >\n <i\n [c8yIcon]=\"'resize'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right p-16\"\n *dropdownMenu\n >\n @if (dashboard?.layout() === 'custom' && dashboard?.alignViewHeight()) {\n <table class=\"table-bordered table-btn-grid\">\n <caption class=\"sr-only\">\n {{\n 'Select widget size by width and height' | translate\n }}\n </caption>\n <thead>\n <tr>\n <th>\n <span class=\"sr-only\">{{ 'Width / Height' | translate }}</span>\n </th>\n @for (wp of sizePresets; track wp) {\n <th class=\"text-center\">\n <small class=\"text-label-small\">\n {{ wp === 100 ? ('Full' | translate) : wp + '%' }}\n </small>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (hp of sizePresets; track hp) {\n <tr>\n <th class=\"text-right p-r-4\">\n <small class=\"text-label-small\">\n {{ hp === 100 ? ('Full' | translate) : hp + '%' }}\n </small>\n </th>\n @for (wp of sizePresets; track wp) {\n <td\n class=\"p-2\"\n [attr.data-g-btn]=\"wp\"\n >\n @let active = isActiveSizePreset(wp, hp);\n <button\n class=\"btn btn-dot btn-xs\"\n [class.btn-primary]=\"active\"\n [attr.aria-label]=\"getSizePresetAriaLabel(wp, hp)\"\n type=\"button\"\n (click)=\"setSizePreset(wp, hp)\"\n >\n @if (active) {\n <i\n [c8yIcon]=\"'check'\"\n aria-hidden=\"true\"\n ></i>\n }\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <div class=\"d-col gap-4\">\n <small class=\"text-label-small\">{{ 'Width' | translate }}</small>\n <div\n class=\"btn-group\"\n [attr.aria-label]=\"'Width presets' | translate\"\n role=\"group\"\n >\n @for (wp of sizePresets; track wp) {\n <button\n class=\"btn btn-default btn-sm p-l-4 p-r-4\"\n [class.btn-primary]=\"isActiveWidthPreset(wp)\"\n [attr.aria-label]=\"\n wp === 100\n ? ('Set full width' | translate)\n : ('Set width to {{percent}}%' | translate: { percent: wp })\n \"\n type=\"button\"\n (click)=\"setWidthPreset(wp)\"\n >\n {{ wp === 100 ? ('Full' | translate) : wp + '%' }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n @let fullScreenLabel = 'Full screen' | translate;\n @let exitFullScreenLabel = 'Exit full screen' | translate;\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"fullscreen ? exitFullScreenLabel : fullScreenLabel\"\n [tooltip]=\"fullscreen ? exitFullScreenLabel : fullScreenLabel\"\n container=\"body\"\n [delay]=\"500\"\n [disabled]=\"!canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i\n [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n c8yDropdownFocusTrap\n [container]=\"'body'\"\n #cardDashboardActions=\"bs-dropdown\"\n >\n @if (editMode()) {\n <button\n class=\"btn btn-icon dropdown-toggle c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n [attr.aria-label]=\"'Settings' | translate\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"cardDashboardActions.isOpen\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i\n [c8yIcon]=\"'cog'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n } @else {\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click "Edit widgets" to unlock' | translate\"\n tooltip=\"{{ 'Click "Edit widgets" to unlock' | translate }}\"\n container=\"body\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i\n [c8yIcon]=\"'lock'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n style=\"right: -1px\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n *dropdownMenu\n >\n @for (action of actions; track action) {\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n }\n </ul>\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1$4.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: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i1$2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i1$2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i1$2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownFocusTrapDirective, selector: "[c8yDropdownFocusTrap]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
31041
31041
|
}
|
|
31042
31042
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DashboardChildComponent, decorators: [{
|
|
31043
31043
|
type: Component,
|
|
@@ -31052,7 +31052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
31052
31052
|
C8yTranslatePipe,
|
|
31053
31053
|
DropdownFocusTrapDirective,
|
|
31054
31054
|
AsyncPipe
|
|
31055
|
-
], template: "<div [ngClass]=\"klasses\">\n <div\n class=\"card-header-actions card-header-grid\"\n data-cy=\"c8y-dashboard-child--drag-handle\"\n [ngClass]=\"{\n 'drag-handle': editMode() && !fullscreen,\n draggableCursor: editMode() && !fullscreen\n }\"\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n\n @
|
|
31055
|
+
], template: "<div [ngClass]=\"klasses\">\n <div\n class=\"card-header-actions card-header-grid\"\n data-cy=\"c8y-dashboard-child--drag-handle\"\n [ngClass]=\"{\n 'drag-handle': editMode() && !fullscreen,\n draggableCursor: editMode() && !fullscreen\n }\"\n >\n <ng-content select=\"c8y-dashboard-child-title\"></ng-content>\n\n @let headerTemplates = additionalHeaderTemplates$ | async;\n @let hasActions = actions.length > 0;\n <!-- Projected header templates (e.g. widget time-context controls) must render even\n without actions \u2014 widgets rely on their instantiation to trigger the first data fetch. -->\n @if (hasActions || headerTemplates?.length) {\n <div class=\"header-actions d-flex a-i-center\">\n @for (headerTemplate of headerTemplates; track headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate.template\"></ng-container>\n }\n\n @if (hasActions) {\n @if (editMode()) {\n <div\n class=\"dropdown\"\n placement=\"bottom right\"\n dropdown\n c8yDropdownFocusTrap\n [container]=\"'body'\"\n #sizePreset=\"bs-dropdown\"\n >\n <button\n class=\"btn btn-icon dropdown-toggle c8y-dropdown\"\n [attr.aria-label]=\"'Size' | translate\"\n [tooltip]=\"'Set size' | translate\"\n container=\"body\"\n [delay]=\"500\"\n dropdownToggle\n data-cy=\"c8y-dashboard-child--height-preset\"\n >\n <i\n [c8yIcon]=\"'resize'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right p-16\"\n *dropdownMenu\n >\n @if (dashboard?.layout() === 'custom' && dashboard?.alignViewHeight()) {\n <table class=\"table-bordered table-btn-grid\">\n <caption class=\"sr-only\">\n {{\n 'Select widget size by width and height' | translate\n }}\n </caption>\n <thead>\n <tr>\n <th>\n <span class=\"sr-only\">{{ 'Width / Height' | translate }}</span>\n </th>\n @for (wp of sizePresets; track wp) {\n <th class=\"text-center\">\n <small class=\"text-label-small\">\n {{ wp === 100 ? ('Full' | translate) : wp + '%' }}\n </small>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (hp of sizePresets; track hp) {\n <tr>\n <th class=\"text-right p-r-4\">\n <small class=\"text-label-small\">\n {{ hp === 100 ? ('Full' | translate) : hp + '%' }}\n </small>\n </th>\n @for (wp of sizePresets; track wp) {\n <td\n class=\"p-2\"\n [attr.data-g-btn]=\"wp\"\n >\n @let active = isActiveSizePreset(wp, hp);\n <button\n class=\"btn btn-dot btn-xs\"\n [class.btn-primary]=\"active\"\n [attr.aria-label]=\"getSizePresetAriaLabel(wp, hp)\"\n type=\"button\"\n (click)=\"setSizePreset(wp, hp)\"\n >\n @if (active) {\n <i\n [c8yIcon]=\"'check'\"\n aria-hidden=\"true\"\n ></i>\n }\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <div class=\"d-col gap-4\">\n <small class=\"text-label-small\">{{ 'Width' | translate }}</small>\n <div\n class=\"btn-group\"\n [attr.aria-label]=\"'Width presets' | translate\"\n role=\"group\"\n >\n @for (wp of sizePresets; track wp) {\n <button\n class=\"btn btn-default btn-sm p-l-4 p-r-4\"\n [class.btn-primary]=\"isActiveWidthPreset(wp)\"\n [attr.aria-label]=\"\n wp === 100\n ? ('Set full width' | translate)\n : ('Set width to {{percent}}%' | translate: { percent: wp })\n \"\n type=\"button\"\n (click)=\"setWidthPreset(wp)\"\n >\n {{ wp === 100 ? ('Full' | translate) : wp + '%' }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n @let fullScreenLabel = 'Full screen' | translate;\n @let exitFullScreenLabel = 'Exit full screen' | translate;\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"fullscreen ? exitFullScreenLabel : fullScreenLabel\"\n [tooltip]=\"fullscreen ? exitFullScreenLabel : fullScreenLabel\"\n container=\"body\"\n [delay]=\"500\"\n [disabled]=\"!canToggleFullscreen\"\n (click)=\"toggleFullscreen.next()\"\n data-cy=\"c8y-dashboard-child--settings-fullscreen\"\n >\n <i\n [c8yIcon]=\"fullscreen ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n\n <div\n class=\"optionsBtn dropdown\"\n placement=\"bottom right\"\n dropdown\n c8yDropdownFocusTrap\n [container]=\"'body'\"\n #cardDashboardActions=\"bs-dropdown\"\n >\n @if (editMode()) {\n <button\n class=\"btn btn-icon dropdown-toggle c8y-dropdown\"\n title=\"{{ 'Settings' | translate }}\"\n [attr.aria-label]=\"'Settings' | translate\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"cardDashboardActions.isOpen\"\n data-cy=\"c8y-dashboard-child--settings\"\n (click)=\"(false)\"\n dropdownToggle\n >\n <i\n [c8yIcon]=\"'cog'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n } @else {\n <button\n class=\"btn btn-icon\"\n [attr.aria-label]=\"'Click "Edit widgets" to unlock' | translate\"\n tooltip=\"{{ 'Click "Edit widgets" to unlock' | translate }}\"\n container=\"body\"\n (click)=\"(false)\"\n data-cy=\"c8y-dashboard-child--settings-locked\"\n >\n <i\n [c8yIcon]=\"'lock'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n style=\"right: -1px\"\n data-cy=\"c8y-dashboard-child--actions-dropdown\"\n *dropdownMenu\n >\n @for (action of actions; track action) {\n <ng-container *ngTemplateOutlet=\"action.template\"></ng-container>\n }\n </ul>\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"card-inner-scroll\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
|
|
31056
31056
|
}], ctorParameters: () => [{ type: DashboardComponent }, { type: i2$1.DomSanitizer }, { type: i0.ElementRef }, { type: i1$1.TranslateService }], propDecorators: { templateActions: [{
|
|
31057
31057
|
type: ContentChildren,
|
|
31058
31058
|
args: [DashboardChildActionComponent]
|