@c8y/ngx-components 1021.49.4 → 1021.49.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.
- package/LICENSE +1 -1
- package/alarms/alarms.component.d.ts +1 -1
- package/alarms/alarms.component.d.ts.map +1 -1
- package/context-dashboard/context-dashboard.component.d.ts +3 -2
- package/context-dashboard/context-dashboard.component.d.ts.map +1 -1
- package/core/common/ApplicationOptions.d.ts +1 -1
- package/core/docs/docs.service.d.ts +1 -1
- package/core/docs/docs.service.d.ts.map +1 -1
- package/core/select/typeahead.component.d.ts.map +1 -1
- package/esm2022/alarms/alarms.component.mjs +2 -2
- package/esm2022/context-dashboard/context-dashboard.component.mjs +11 -8
- package/esm2022/context-dashboard/device-info-dashboard/device-info-dashboard.component.mjs +3 -3
- package/esm2022/core/common/ApplicationOptions.mjs +1 -1
- package/esm2022/core/docs/defaults.items.mjs +5 -5
- package/esm2022/core/docs/docs.service.mjs +2 -2
- package/esm2022/core/search/search-input.component.mjs +3 -3
- package/esm2022/core/select/typeahead.component.mjs +2 -2
- package/esm2022/widgets/implementations/cockpit-welcome/welcome.component.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarms.mjs +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +12 -9
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +8 -8
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2565,7 +2565,7 @@ class ContextDashboardComponent {
|
|
|
2565
2565
|
this.childrenClasses = '';
|
|
2566
2566
|
this.setTitle = false;
|
|
2567
2567
|
this.defaultWidgets = [];
|
|
2568
|
-
this.
|
|
2568
|
+
this._canCopy = true;
|
|
2569
2569
|
this.canDelete = true;
|
|
2570
2570
|
this.isLoading = true;
|
|
2571
2571
|
this.showContextHelpButton = true;
|
|
@@ -2575,6 +2575,7 @@ class ContextDashboardComponent {
|
|
|
2575
2575
|
this.hideAvailability = false;
|
|
2576
2576
|
this.class = '';
|
|
2577
2577
|
this.widgets = [];
|
|
2578
|
+
this.canCopy = true;
|
|
2578
2579
|
this.dashboardTypeLabel = gettext('Dashboard for "{{ dashboardType }}"');
|
|
2579
2580
|
this.dashboardTypePopover = gettext(`
|
|
2580
2581
|
The layout and configuration of this dashboard is used by all other assets of model type
|
|
@@ -2905,9 +2906,10 @@ class ContextDashboardComponent {
|
|
|
2905
2906
|
? await this.contextDashboardService.canEditDashboard(this.mo)
|
|
2906
2907
|
: false;
|
|
2907
2908
|
this.canCopy =
|
|
2908
|
-
this.
|
|
2909
|
-
this.contextDashboardService.
|
|
2910
|
-
|
|
2909
|
+
this._canCopy &&
|
|
2910
|
+
(this.contextDashboardService.isDeviceDashboard(this.mo) ||
|
|
2911
|
+
this.contextDashboardService.isDeviceType(this.mo) ||
|
|
2912
|
+
this.contextDashboardService.isGroupDashboard(this.mo));
|
|
2911
2913
|
const dashboardChildren = cloneDeep(this.mo.c8y_Dashboard?.children);
|
|
2912
2914
|
const dashboardClasses = {
|
|
2913
2915
|
'c8y-grid-dashboard': true,
|
|
@@ -3170,7 +3172,7 @@ class ContextDashboardComponent {
|
|
|
3170
3172
|
: this.gainsightService.hashGroupName(str);
|
|
3171
3173
|
}
|
|
3172
3174
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ContextDashboardComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: ContextDashboardService }, { token: i2.AlertService }, { token: i0.Renderer2 }, { token: CONTEXT_DASHBOARD_CONFIG }, { token: WidgetService }, { token: i2$2.BsModalService }, { token: i2.GainsightService }, { token: i2.ActionBarService }, { token: i2$1.TranslateService }, { token: i2.ModalService }, { token: DashboardEditModeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3173
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ContextDashboardComponent, selector: "c8y-context-dashboard", inputs: { name: "name", childrenClasses: "childrenClasses", context: "context", setTitle: "setTitle", defaultWidgets: "defaultWidgets",
|
|
3175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ContextDashboardComponent, selector: "c8y-context-dashboard", inputs: { name: "name", childrenClasses: "childrenClasses", context: "context", setTitle: "setTitle", defaultWidgets: "defaultWidgets", _canCopy: ["canCopy", "_canCopy"], canDelete: "canDelete", isLoading: "isLoading", breadcrumbSettings: "breadcrumbSettings", showContextHelpButton: "showContextHelpButton", translateWidgetTitle: "translateWidgetTitle", hideAvailability: "hideAvailability" }, host: { listeners: { "window:beforeunload": "beforeUnloadHandler($event)" }, properties: { "class": "this.class" }, styleAttribute: "\n display: block;\n ", classAttribute: "dashboard c8y-grid-dashboard" }, viewQueries: [{ propertyName: "dashboardDetails", first: true, predicate: DashboardDetailComponent, descendants: true, static: true }, { propertyName: "widgetsDashboard", first: true, predicate: WidgetsDashboardComponent, descendants: true, static: true }], ngImport: i0, template: "<c8y-title *ngIf=\"title\">\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"10000\"\n *ngIf=\"dashboard?.deviceType && dashboard.deviceTypeValue\"\n>\n <button\n class=\"btn-clean btn-link\"\n popoverTitle=\"{{ 'Dashboard template' | translate }}\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"dashboardTypePopoverRef\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n >\n <span class=\"tag tag--info text-12\">\n <span class=\"dashboard-template-marker\"></span>\n {{ dashboardTypeLabel | translate: { dashboardType: dashboard.deviceTypeValue } }}\n </span>\n </button>\n <ng-template #dashboardTypePopoverRef>\n <div\n [innerHTML]=\"dashboardTypePopover | translate: { dashboardType: dashboard.deviceTypeValue }\"\n ></div>\n </ng-template>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-1\"\n *ngIf=\"defaultWidgets.length > 0\"\n>\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reset widgets' | translate }}\"\n type=\"button\"\n px-event=\"Reset dashboard\"\n (click)=\"restore()\"\n [disabled]=\"disabled || (widgetsDashboard?.editMode$ | async)\"\n data-cy=\"context-dashboard--button-reset-dashboard\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"reset\"\n ></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visible-lg-inline\">\n {{ 'Reset widgets' | translate }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/cockpit/working-with-dashboards/#working-with-dashboards\"\n *ngIf=\"showContextHelpButton\"\n></c8y-help>\n\n<c8y-dashboard-detail\n class=\"d-contents\"\n [isReport]=\"isReport\"\n [dashboard]=\"dashboard\"\n [mo]=\"mo\"\n [context]=\"context\"\n [deviceType]=\"context?.type\"\n [hideAvailability]=\"hideAvailability\"\n (dashboardSaved)=\"reloadDashboard($event)\"\n (previewChanged)=\"dashboardPreview($event)\"\n></c8y-dashboard-detail>\n\n<c8y-widgets-dashboard\n [context]=\"context\"\n [contextDashboard]=\"dashboard\"\n [widgets]=\"widgets\"\n [isCopyDisabled]=\"isCopyDisabled\"\n [settings]=\"{\n isLoading: isLoading,\n isDisabled: disabled,\n canDelete: canDelete && !!dashboard,\n translateWidgetTitle: dashboard?.translateWidgetTitle ?? translateWidgetTitle,\n allowFullscreen: moduleConfig.allowFullscreen,\n title: setTitle ? dashboard?.name || title : undefined,\n widgetMargin: dashboard?.widgetMargin,\n canCopy: canCopy && !!dashboard,\n defaultWidth: dashboard?.columns >= 24 ? 8 : 4,\n columns: dashboard?.columns || 12\n }\"\n [breadcrumb]=\"breadcrumbSettings\"\n [editModeButtons]=\"{\n undoButtonDisabled: editModeService.undoButtonDisabled,\n changeToUndoName: editModeService.changeToUndoName,\n redoButtonDisabled: !editModeService.redoStackLastItem,\n changeToRedoName: editModeService.redoStackLastItem?.name\n }\"\n (onChangeDashboard)=\"positionOrWidgetDimensionChange($event)\"\n (onAddWidget)=\"addWidget()\"\n (onEditWidget)=\"editWidget($event)\"\n (onDeleteWidget)=\"deleteWidget($event)\"\n (onSaveDashboard)=\"saveWidgetsToDashboard()\"\n (onCancelDashboard)=\"cancelEditMode()\"\n (revertChange)=\"revertChange($event)\"\n (onChangeStart)=\"addDashboardClassToBody()\"\n (onChangeEnd)=\"removeDashboardClassFromBody()\"\n (onEditDashboard)=\"dashboardDetails.show(true)\"\n (onCopyDashboard)=\"copyDashboard()\"\n (onDeleteDashboard)=\"deleteDashboard()\"\n></c8y-widgets-dashboard>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: i2.WidgetsDashboardComponent, selector: "c8y-widgets-dashboard", inputs: ["widgets", "context", "contextDashboard", "settings", "isCopyDisabled", "breadcrumb", "editModeButtons"], outputs: ["onAddWidget", "onEditWidget", "onDeleteWidget", "onChangeDashboard", "onResize", "onEditDashboard", "onCopyDashboard", "onDeleteDashboard", "onChangeStart", "onChangeEnd", "onSaveDashboard", "onCancelDashboard", "revertChange"] }, { kind: "component", type: i2.HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "directive", type: i4$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "component", type: DashboardDetailComponent, selector: "c8y-dashboard-detail", inputs: ["isReport", "deviceType", "context", "mo", "dashboard", "isNamedDashboard", "hideAvailability"], outputs: ["dashboardSaved", "previewChanged"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
|
|
3174
3176
|
}
|
|
3175
3177
|
__decorate([
|
|
3176
3178
|
memoize(),
|
|
@@ -3199,8 +3201,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
3199
3201
|
type: Input
|
|
3200
3202
|
}], defaultWidgets: [{
|
|
3201
3203
|
type: Input
|
|
3202
|
-
}],
|
|
3203
|
-
type: Input
|
|
3204
|
+
}], _canCopy: [{
|
|
3205
|
+
type: Input,
|
|
3206
|
+
args: ['canCopy']
|
|
3204
3207
|
}], canDelete: [{
|
|
3205
3208
|
type: Input
|
|
3206
3209
|
}], isLoading: [{
|
|
@@ -4043,11 +4046,11 @@ class DeviceInfoDashboardComponent {
|
|
|
4043
4046
|
return this.contextDashboard?.canDeactivate();
|
|
4044
4047
|
}
|
|
4045
4048
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceInfoDashboardComponent, deps: [{ token: i1.ActivatedRoute }, { token: WidgetService }, { token: i2$1.TranslateService }, { token: i1$1.InventoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4046
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceInfoDashboardComponent, selector: "c8y-device-info-dashboard-dashboard", viewQueries: [{ propertyName: "contextDashboard", first: true, predicate: ContextDashboardComponent, descendants: true }], ngImport: i0, template: "<div *ngIf=\"!isLoading\">\n <c8y-title>\n {{ title }}\n </c8y-title>\n <c8y-context-dashboard\n [translateWidgetTitle]=\"true\"\n [name]=\"dashboardName\"\n [context]=\"currentContext\"\n [defaultWidgets]=\"widgetsList\"\n [canDelete]=\"false\"\n [hideAvailability]=\"true\"\n ></c8y-context-dashboard>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: ContextDashboardComponent, selector: "c8y-context-dashboard", inputs: ["name", "childrenClasses", "context", "setTitle", "defaultWidgets", "canCopy", "canDelete", "isLoading", "breadcrumbSettings", "showContextHelpButton", "translateWidgetTitle", "hideAvailability"] }] }); }
|
|
4049
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceInfoDashboardComponent, selector: "c8y-device-info-dashboard-dashboard", viewQueries: [{ propertyName: "contextDashboard", first: true, predicate: ContextDashboardComponent, descendants: true }], ngImport: i0, template: "<div *ngIf=\"!isLoading\">\n <c8y-title>\n {{ title }}\n </c8y-title>\n <c8y-context-dashboard\n [translateWidgetTitle]=\"true\"\n [name]=\"dashboardName\"\n [context]=\"currentContext\"\n [defaultWidgets]=\"widgetsList\"\n [canDelete]=\"false\"\n [hideAvailability]=\"true\"\n [canCopy]=\"false\"\n ></c8y-context-dashboard>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: ContextDashboardComponent, selector: "c8y-context-dashboard", inputs: ["name", "childrenClasses", "context", "setTitle", "defaultWidgets", "canCopy", "canDelete", "isLoading", "breadcrumbSettings", "showContextHelpButton", "translateWidgetTitle", "hideAvailability"] }] }); }
|
|
4047
4050
|
}
|
|
4048
4051
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceInfoDashboardComponent, decorators: [{
|
|
4049
4052
|
type: Component,
|
|
4050
|
-
args: [{ selector: 'c8y-device-info-dashboard-dashboard', template: "<div *ngIf=\"!isLoading\">\n <c8y-title>\n {{ title }}\n </c8y-title>\n <c8y-context-dashboard\n [translateWidgetTitle]=\"true\"\n [name]=\"dashboardName\"\n [context]=\"currentContext\"\n [defaultWidgets]=\"widgetsList\"\n [canDelete]=\"false\"\n [hideAvailability]=\"true\"\n ></c8y-context-dashboard>\n</div>\n" }]
|
|
4053
|
+
args: [{ selector: 'c8y-device-info-dashboard-dashboard', template: "<div *ngIf=\"!isLoading\">\n <c8y-title>\n {{ title }}\n </c8y-title>\n <c8y-context-dashboard\n [translateWidgetTitle]=\"true\"\n [name]=\"dashboardName\"\n [context]=\"currentContext\"\n [defaultWidgets]=\"widgetsList\"\n [canDelete]=\"false\"\n [hideAvailability]=\"true\"\n [canCopy]=\"false\"\n ></c8y-context-dashboard>\n</div>\n" }]
|
|
4051
4054
|
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: WidgetService }, { type: i2$1.TranslateService }, { type: i1$1.InventoryService }], propDecorators: { contextDashboard: [{
|
|
4052
4055
|
type: ViewChild,
|
|
4053
4056
|
args: [ContextDashboardComponent, { static: false }]
|