@c8y/ngx-components 1023.10.1 → 1023.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-context-dashboard.mjs","sources":["../../context-dashboard/new-dashboard.guard.ts","../../context-dashboard/add-dashboard.component.ts","../../context-dashboard/add-dashboard.component.html","../../context-dashboard/add-dashboard.factory.ts","../../context-dashboard/context-dashboard.model.ts","../../context-dashboard/context-dashboard.service.ts","../../context-dashboard/dashboard-detail.service.ts","../../context-dashboard/dashboard-detail.component.ts","../../context-dashboard/dashboard-detail.component.html","../../context-dashboard/memento/dashboard-originator.service.ts","../../context-dashboard/memento/dashboard-caretaker.service.ts","../../context-dashboard/memento/dashboard-edit-mode.service.ts","../../context-dashboard/widget-config-hook/widget-config-hook.model.ts","../../context-dashboard/widget-config-hook/widget-config-hook.service.ts","../../context-dashboard/widget-config/widget-config-section.component.ts","../../context-dashboard/widget-config/widget-config-section.component.html","../../context-dashboard/widget-config/widget-config-feedback.component.ts","../../context-dashboard/widget-config/widget-config-feedback.component.html","../../context-dashboard/widget-config/widget-asset-selector.component.ts","../../context-dashboard/widget-config/widget-asset-selector.component.html","../../context-dashboard/widget-config/widget-config-general.component.ts","../../context-dashboard/widget-config/widget-config-general.component.html","../../context-dashboard/widget-config.service.ts","../../context-dashboard/widget-config/appearance-settings.component.ts","../../context-dashboard/widget-config/appearance-settings.component.html","../../context-dashboard/widget-config/widget-config-root.component.ts","../../context-dashboard/widget-config/widget-config-root.component.html","../../context-dashboard/widget-config/widget-preview.component.ts","../../context-dashboard/widget-config/widget-preview.component.html","../../context-dashboard/widget.service.ts","../../context-dashboard/widget-config.component.ts","../../context-dashboard/widget-config.component.html","../../context-dashboard/context-dashboard.component.ts","../../context-dashboard/context-dashboard.component.html","../../context-dashboard/dashboard-details-tabs.factory.ts","../../context-dashboard/paste-dashboard-action.component.ts","../../context-dashboard/type-dashboard-info/type-dashboard-info.component.ts","../../context-dashboard/type-dashboard-info/type-dashboard-info.component.html","../../context-dashboard/widget-config/widget-preview-wrapper.component.ts","../../context-dashboard/context-dashboard.module.ts","../../context-dashboard/dashboard-action-bar.factory.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.component.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.component.html","../../context-dashboard/device-info-dashboard/device-info-dashboard.module.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.component.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.component.html","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.module.ts","../../context-dashboard/widget-config/widget-config-appearance.component.ts","../../context-dashboard/widget-config/widget-config-appearance.component.html","../../context-dashboard/widget-config/global-context-section.component.ts","../../context-dashboard/widget-config/global-context-section.component.html","../../context-dashboard/c8y-ngx-components-context-dashboard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Tab } from '@c8y/ngx-components';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport { ContextDashboardManagedObject } from './context-dashboard.model';\n\nexport const newDashboardTab: Tab<string> = {\n featureId: 'newDashboard',\n icon: 'th',\n label: gettext('New dashboard'),\n path: 'new-dashboard',\n // place tab as last one and hide it so it won't be opened until user initiates adding new dashboard\n hide: true,\n priority: -Infinity\n};\n\n@Injectable({ providedIn: 'root' })\nexport class NewDashboardGuard {\n tab: Tab;\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean | Tab[]> {\n const tabActive = route.routeConfig.path === newDashboardTab.path;\n if (tabActive) {\n const dashboard: Partial<ContextDashboardManagedObject> = {\n c8y_Dashboard: null\n };\n route.data = { dashboard };\n }\n if (!this.tab) {\n this.tab = {\n ...newDashboardTab,\n hide: !tabActive,\n priority: tabActive ? Infinity : -Infinity\n };\n }\n return of([this.tab]);\n }\n}\n","import { Component } from '@angular/core';\nimport { TabsService, IconDirective, C8yTranslatePipe } from '@c8y/ngx-components';\nimport { Router } from '@angular/router';\nimport { newDashboardTab } from './new-dashboard.guard';\n\n@Component({\n selector: '[c8y-add-dashboard]',\n templateUrl: './add-dashboard.component.html',\n host: { class: 'd-flex a-i-stretch sticky-right' },\n imports: [IconDirective, C8yTranslatePipe]\n})\nexport class AddDashboardComponent {\n constructor(\n private tabsService: TabsService,\n private router: Router\n ) {}\n\n addDashboard() {\n const tempNewDashboardTab = [...this.tabsService.state].find(\n t => t.featureId === newDashboardTab.featureId\n );\n // navigate before tab is displayed, because in DashboardDetailComponent tab is hidden on navigation from it.\n this.router.navigate(\n typeof tempNewDashboardTab.path === 'string'\n ? [tempNewDashboardTab.path]\n : tempNewDashboardTab.path,\n { replaceUrl: true }\n );\n // show tab and make it appear as first one\n tempNewDashboardTab.hide = false;\n tempNewDashboardTab.priority = Infinity;\n this.tabsService.refresh();\n }\n}\n","<div class=\"d-flex a-i-stretch m-b-8 m-t-8 p-l-8 hidden-xs\">\n <button\n class=\"btn btn-default btn-sm p-l-8 p-r-8 fit-h p-b-0 p-t-0 d-flex a-i-center\"\n title=\"{{ 'Add dashboard' | translate }}\"\n type=\"button\"\n (click)=\"addDashboard()\"\n >\n <i\n class=\"icon-20 m-r-4\"\n c8yIcon=\"add-circle-outline\"\n ></i>\n <span>{{ 'Add dashboard' | translate }}</span>\n </button>\n <div class=\"p-r-sm-40\"></div>\n</div>\n","import { inject } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IIdentified } from '@c8y/client';\nimport {\n ContextData,\n ContextRouteService,\n ExtensionFactory,\n Permissions,\n Tab,\n ViewContext\n} from '@c8y/ngx-components';\nimport { AddDashboardComponent } from './add-dashboard.component';\n\nexport abstract class AddDashboardFactory implements ExtensionFactory<Tab> {\n protected abstract targetContext: ViewContext.Device | ViewContext.Group;\n currentContext: ContextData;\n\n private permissions = inject(Permissions);\n private contextRoute = inject(ContextRouteService);\n\n async get(activatedRoute?: ActivatedRoute): Promise<Tab | Tab[]> {\n this.currentContext = this.contextRoute.getContextData(activatedRoute);\n if (\n this.currentContext?.context === this.targetContext &&\n (await this.hasPermission(this.currentContext.contextData))\n ) {\n return [\n {\n component: AddDashboardComponent,\n priority: -Infinity,\n showAlways: true\n }\n ];\n }\n return [];\n }\n\n private async hasPermission(context: IIdentified) {\n if (context?.id) {\n return await this.permissions.canEdit(\n [\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ],\n context\n );\n }\n return this.permissions.hasAnyRole([\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ]);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport {\n Widget,\n DynamicComponentDefinition,\n Route,\n ViewContext,\n WidgetDisplaySettings,\n TabWithTemplate,\n WidgetSettings\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { SupportedIconsSuggestions } from '@c8y/ngx-components/icon-selector/icons';\n\nexport const CONTEXT_DASHBOARD_CONFIG = new InjectionToken<any>('ContextDashboardConfig');\nexport const DASHBOARD_SETTINGS_CHANGES = {\n classes: gettext('theme'),\n globalRolesIds: gettext('global roles'),\n widgetClasses: gettext('widget header style'),\n widgetMargin: gettext('widget margin'),\n icon: gettext('icon'),\n name: gettext('name'),\n priority: gettext('priority'),\n c8y_IsNavigatorNode: gettext('navigator item'),\n translateWidgetTitle: gettext('translate widget title'),\n translateDashboardTitle: gettext('translate dashboard title'),\n children: gettext('widgets')\n} as const satisfies Partial<Record<keyof ContextDashboard, string>>;\n\nexport interface ContextDashboardConfig {\n widgetFilter?: (component: DynamicComponentDefinition) => boolean;\n allowFullscreen?: boolean;\n /**\n * @deprecated\n */\n routes?: Route[];\n}\n\nexport interface ContextWidgetConfig {\n /**\n * Settings that define how the default config component is\n * displayed. They are static and will not be saved.\n */\n settings?: WidgetSettings;\n\n /**\n * Settings that are injected in any displaying component.\n */\n displaySettings?: WidgetDisplaySettings;\n\n /**\n * Whatever should be added to the configuration when a widget is created.\n */\n config?: {\n /**\n * Any other information that should be stored here.\n */\n [key: string]: any;\n };\n /**\n * The selected device or group (note: naming is inconsistent as group was added later\n * but must stay for already implemented widgets)\n */\n device?: {\n id?: string | number;\n name?: string;\n [key: string]: any;\n };\n /**\n * Method to export the widget configuration during dashboard export to a json file. It enhances the configuration with\n * additional data that can be used later by the `import` method to restore the widget configuration in a new context.\n * @param config Widget configuration\n * @return Enhanced widget configuration\n */\n export?: (config: any) => any | Promise<any>;\n /**\n * Method to import the widget configuration during dashboard import from a json file. It restores the widget configuration\n * with data exported by the `export` method.\n * @param config Widget configuration enhanced with export method\n * @param dashboardData Dashboard metadata\n * @return Restored widget configuration\n */\n import?: (config: any, dashboardData: DashboardMetadata) => any | Promise<any>;\n\n /**\n * Any other information that should be stored here.\n */\n [key: string]: any;\n}\n\nexport interface ContextDashboardManagedObject extends IManagedObject {\n c8y_Dashboard?: ContextDashboard;\n name?: string;\n c8y_DashboardHistory?: ContextDashboard[];\n}\n\nexport interface ContextDashboard {\n icon?: SupportedIconsSuggestions | null;\n name?: string | null;\n priority?: number | null;\n deviceType?: boolean | null;\n deviceTypeValue?: string | null;\n isFrozen?: boolean | null;\n classes?: { [key: string]: boolean } | null;\n widgetClasses?: { [key: string]: boolean } | null;\n widgetMargin?: number | null;\n translateWidgetTitle?: boolean | null;\n translateDashboardTitle?: boolean | null;\n global?: boolean | null;\n /**\n * The amount of columns on that dashboard.\n * Can be freely chosen, but product uses either 12 or 24.\n */\n columns?: number | null;\n children?: {\n [id: string]: Widget;\n };\n globalRolesIds?: DashboardGlobalRoles | null;\n c8y_IsNavigatorNode?: object | null;\n description?: string | null;\n historyDescription?: DashboardHistoryDescription | null;\n created?: string | null;\n author?: string | null;\n dashboardState?: { [key: string]: any };\n}\n/**\n * Object describing changes applied to dashboard settings and its widgets. Used to display user-friendly change log.\n */\nexport interface DashboardHistoryDescription {\n /**\n * Indicates type of dashboard change (or creation).\n */\n changeType?: 'reset' | 'create' | 'update' | null;\n /**\n * List of dashboard settings that has been changed.\n */\n dashboardSettingChanges?: (typeof DASHBOARD_SETTINGS_CHANGES)[keyof typeof DASHBOARD_SETTINGS_CHANGES][];\n /**\n * True if dashboard is typed dashboard, false if it's not.\n */\n deviceType?: boolean | null;\n /**\n * Object containing lists of widgets (by title) that has been changed, grouped by change type, e.g.:\n * ```ts\n * widgetChanges: {\n * removed: ['Applications'],\n * config?: ['Data points graph', 'Events list'],\n * },\n * ```\n */\n widgetChanges?: {\n removed?: string[];\n added?: string[];\n config?: string[];\n arrangement?: string[];\n } | null;\n /**\n * String used to display the date from which the state was restored.\n */\n restored?: string;\n}\n\nexport const DASHBOARD_CHILDREN_STATE_NAME = {\n initial: gettext('Initial state'),\n config: gettext('Widget configuration changed'),\n removed: gettext('Widget removed'),\n added: gettext('Widget added'),\n arrangement: gettext('Widgets rearranged')\n} as const satisfies Record<keyof DashboardHistoryDescription['widgetChanges'] | 'initial', string>;\n/**\n * Object representing state of dashboard widgets. Its main purpose is to allow to undo and redo changes\n * applied to dashboard children.\n */\nexport type DashboardChildrenState = {\n /**\n * Name of the change applied to dashboard that results in current state, e.g. 'widget removed'\n */\n name: (typeof DASHBOARD_CHILDREN_STATE_NAME)[keyof typeof DASHBOARD_CHILDREN_STATE_NAME];\n /**\n * Dashboard children in particular, immutable state.\n */\n children: ContextDashboard['children'];\n /**\n * Object describing changes applied to dashboard widgets that can be easily mapped to DashboardHistoryDescription widgetChanges.\n * ```ts\n * {\n * removed: {\n * 0969692617637703: { componentId: \"Data points graph\", config: {...}, classes: {...} ...}\n * },\n * config: {\n * 6347567345767653: { componentId: \"Applications\", config: {...}, classes: {...} ...},\n * 6456345634564566: { componentId: \"Events list\", config: {...}, classes: {...} ...},\n * }\n * }\n * ```\n */\n changeHistory: Partial<\n Record<\n keyof DashboardHistoryDescription['widgetChanges'],\n {\n [id: string]: Widget;\n }\n >\n >;\n};\n\nexport enum ContextDashboardType {\n Device = 'device',\n Type = 'type',\n Group = 'group',\n Named = 'name',\n Report = 'report'\n}\n\nexport enum DashboardDetailsTabId {\n GENERAL = 'general',\n APPEARANCE = 'appearance',\n VERSIONHISTORY = 'versionHistory'\n}\n\nexport type DashboardDetailsTabs = Record<\n DashboardDetailsTabId,\n TabWithTemplate<string> & { featureId: DashboardDetailsTabId }\n>;\n\nexport interface DashboardAndWidgetThemeDefinition {\n label: string;\n class: string;\n description: string;\n}\n\nexport const WIDGET_HEADER_CLASSES = [\n {\n label: gettext('Regular`style`'),\n class: 'panel-title-regular',\n description: gettext('The widget has no border between header and content.')\n },\n {\n label: gettext('Border`style`'),\n class: 'panel-title-border',\n description: gettext('The widget has a small separation border between header and content.')\n },\n {\n label: gettext('Overlay`style`'),\n class: 'panel-title-overlay',\n description: gettext('The widget content overlays the header.')\n },\n {\n label: gettext('Hidden`style`'),\n class: 'panel-title-hidden',\n description: gettext('The widget header is not shown.')\n }\n] as const satisfies DashboardAndWidgetThemeDefinition[];\n\nexport const WIDGET_CONTENT_CLASSES = [\n {\n label: gettext('Branded`style`'),\n class: 'panel-content-branded',\n description: gettext('The widget is styled with the main brand color.')\n },\n {\n label: gettext('Match dashboard`style`'),\n class: 'panel-content-light',\n description: gettext('The widget appearance matches the dashboard appearance.')\n },\n {\n label: gettext('Light`style`'),\n class: 'panel-content-white',\n description: gettext('The widget has light appearance, that is, dark text on light background.')\n },\n {\n label: gettext('Dark`style`'),\n class: 'panel-content-dark',\n description: gettext('The widget has dark appearance, that is, light text on dark background.')\n },\n {\n label: gettext('Transparent`style`'),\n class: 'panel-content-transparent',\n description: gettext('The widget has no background.')\n }\n] as const satisfies DashboardAndWidgetThemeDefinition[];\n\nexport const DASHBOARD_THEME_CLASSES = [\n {\n label: gettext('Match UI`theme`'),\n class: 'dashboard-theme-light',\n description: gettext('The dashboard appearance matches the UI appearance.')\n },\n {\n label: gettext('Light`theme`'),\n class: 'dashboard-theme-white',\n description: gettext(\n 'The dashboard has light appearance, that is, dark text on light background.'\n )\n },\n {\n label: gettext('Dark`theme`'),\n class: 'dashboard-theme-dark',\n description: gettext(\n 'The dashboard has dark appearance, that is, light text on dark background.'\n )\n },\n {\n label: gettext('Branded`theme`'),\n class: 'dashboard-theme-branded',\n description: gettext('The dashboard is styled using the brand palette.')\n }\n] as const satisfies DashboardAndWidgetThemeDefinition[];\n\nexport const STYLING_CLASS_PREFIXES = [\n 'dashboard-theme-',\n 'panel-title-',\n 'panel-content-'\n] as const;\n\nexport interface DashboardCopyClipboard {\n dashboardId: string;\n dashboard: ContextDashboard;\n context: DashboardContext;\n}\n\nexport interface DashboardContext {\n context: ViewContext;\n contextData: Partial<IManagedObject>;\n}\n\nexport const ALL_GLOBAL_ROLES_SELECTED = 'all' as const;\nexport type DashboardGlobalRoles = number[] | typeof ALL_GLOBAL_ROLES_SELECTED;\n\nexport const PRODUCT_EXPERIENCE = {\n DASHBOARD: {\n EVENTS: {\n DASHBOARDS: 'dashboards',\n REPORTS: 'reports',\n DASHBOARD_TEMPLATE: 'dashboardTemplate'\n },\n COMPONENTS: {\n DASHBOARD_VIEW: 'context-dashboard',\n DASHBOARD_AVAILABILITY: 'dashboard-availability',\n REPORTS_LIST: 'report-dashboard-list',\n ADD_REPORT: 'report-dashboard-list',\n ADD_DASHBOARD: 'add-dashboard',\n DELETE_DASHBOARD: 'context-dashboard',\n TYPED_DASHBOARD_SETTINGS: 'typed-dashboard-settings'\n },\n CONTEXT: {\n REPORT: 'report',\n DEVICE: 'device',\n ASSET: 'asset',\n GROUP: 'group'\n },\n ACTIONS: {\n APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges',\n DELETE: 'delete',\n LOAD: 'load',\n CREATE: 'create',\n ADD_REPORT: 'addReport',\n DUPLICATE_AS_REGULAR_DASHBOARD: 'duplicateAsRegularDashboard'\n }\n }\n} as const;\n\nexport interface CanDeactivateComponent {\n canDeactivate: () => boolean | Observable<boolean> | Promise<boolean>;\n}\n\nexport const REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY = 30;\n\nexport type AllowTypeDashboard = 'allow' | 'disallow' | 'allow_if_type_filled';\n\nexport const DASHBOARD_DETAILS_OUTLET = 'dashboard-details' as const;\nexport const DASHBOARD_DETAILS_TABS_OUTLET_NAME = 'dashboardTabs' as const;\n\nexport interface DashboardMetadata {\n isReport: boolean;\n isNamedDashboard: boolean;\n hideAvailability: boolean;\n dashboard: ContextDashboard;\n deviceTypeValue: string;\n displayDeviceTypeValue: string;\n mo: ContextDashboardManagedObject;\n allowTypeDashboard: AllowTypeDashboard;\n isDevice: boolean;\n context: any;\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { IManagedObject, InventoryService, IResultList, QueriesUtil } from '@c8y/client';\nimport {\n AlertService,\n ApplicationOptions,\n AppStateService,\n ContextData,\n ContextRouteService,\n DynamicComponentService,\n getActivatedRoute,\n GroupService,\n ModalService,\n NavigatorNode,\n NavigatorService,\n NEW_DASHBOARD_ROUTER_STATE_PROP,\n OptionsService,\n Permissions,\n Status,\n Tab,\n TabsService,\n ViewContext,\n Widget\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n assign,\n cloneDeep,\n forEach,\n get,\n has,\n isEmpty,\n keyBy,\n keys,\n pick,\n reduce,\n set,\n some\n} from 'lodash-es';\nimport { combineLatest, from, Observable, of, Subject } from 'rxjs';\nimport { catchError, filter, map, mergeMap, tap, throwIfEmpty, toArray } from 'rxjs/operators';\nimport {\n ALL_GLOBAL_ROLES_SELECTED,\n AllowTypeDashboard,\n ContextDashboard,\n ContextDashboardManagedObject,\n ContextDashboardType,\n DashboardContext,\n DashboardCopyClipboard,\n PRODUCT_EXPERIENCE,\n STYLING_CLASS_PREFIXES\n} from './context-dashboard.model';\n\n@Injectable({ providedIn: 'root' })\nexport class ContextDashboardService {\n dashboardTabs$: Observable<Tab[]>;\n formDisabled$: Observable<boolean>;\n readonly REPORT_PARTIAL_NAME = 'report_';\n copyClipboard: DashboardCopyClipboard;\n queriesUtil: QueriesUtil;\n readonly VERSION_HISTORY_SIZE_LIMIT = 10;\n private readonly INVENTORY_ROLES = [\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN\n ];\n private cache = new Map<string, ContextDashboardManagedObject>();\n private readonly DEFAULT_PAGESIZE = 1000;\n private readonly FRAGMENT_NAME = 'c8y_Dashboard';\n private readonly APPLIED_TO_FRAGMENT = 'c8y_AppliedToApplications';\n private readonly DASHBOARD_ROUTE_PATH = 'dashboard';\n private readonly INDEX_SPLIT = '!';\n private readonly CACHE_TIMEOUT = 500;\n private _formDisabled = true;\n private formDisabledSubject = new Subject<boolean>();\n private contextDashboardsCache: {\n query: string;\n result: Promise<IResultList<IManagedObject>>;\n timestamp: number;\n };\n private appName = '';\n private readonly HIDE_TYPE_DASHBOARD_FOR_ASSETS: keyof ApplicationOptions =\n 'hideTypeDashboardForAssets';\n\n get formDisabled() {\n return this._formDisabled;\n }\n\n set formDisabled(value) {\n this._formDisabled = value;\n this.formDisabledSubject.next(value);\n }\n\n constructor(\n private inventory: InventoryService,\n private tabs: TabsService,\n private modal: ModalService,\n private translateService: TranslateService,\n private router: Router,\n private navigator: NavigatorService,\n private permissions: Permissions,\n private alert: AlertService,\n private dynamicComponent: DynamicComponentService,\n private groupService: GroupService,\n private optionsService: OptionsService,\n private appStateService: AppStateService,\n private contextRouteService: ContextRouteService\n ) {\n this.formDisabled$ = this.formDisabledSubject.asObservable();\n this.queriesUtil = new QueriesUtil();\n }\n\n async create(dashboardCfg: ContextDashboard, context?: ContextData, name = '') {\n let dashboard: Partial<ContextDashboardManagedObject> = {};\n assign(\n dashboard,\n this.adjustDashboardFor24Columns({ c8y_Dashboard: dashboardCfg }),\n this.updateDashboardHistory(dashboard, dashboardCfg)\n );\n\n const [dashboardType, dashboardFragments] = this.getDashboardFragments(\n { c8y_Dashboard: dashboardCfg } as ContextDashboardManagedObject,\n context,\n name,\n false\n );\n dashboard = { ...dashboard, ...dashboardFragments };\n\n if (this.shouldSetGlobal(dashboard, context)) {\n assign(dashboard, { c8y_Global: {} });\n }\n dashboard.name = dashboard.c8y_Dashboard.name;\n if (this.appStateService?.currentApplication?.value) {\n dashboard[this.APPLIED_TO_FRAGMENT] = [this.appStateService?.currentApplication?.value.key];\n }\n\n const { data } =\n dashboardType === ContextDashboardType.Group ||\n dashboardType === ContextDashboardType.Device ||\n (context?.contextData?.id && dashboardType === ContextDashboardType.Named)\n ? await this.inventory.childAdditionsCreate(\n dashboard,\n (context?.contextData.id as string) || ''\n )\n : await this.inventory.create(dashboard);\n return data as ContextDashboardManagedObject;\n }\n\n async detail(dashboardMO: ContextDashboardManagedObject) {\n let { data } = await this.inventory.detail(dashboardMO);\n data = this.adjustDashboardFor24Columns(data as ContextDashboardManagedObject);\n this.cache.set(dashboardMO.id, data);\n return data;\n }\n\n async update(\n dashboard: ContextDashboardManagedObject,\n context?: ContextData\n ): Promise<ContextDashboardManagedObject> {\n const dashboardCfg = dashboard.c8y_Dashboard;\n dashboard.name = dashboard.c8y_Dashboard.name;\n assign(\n dashboard,\n this.adjustDashboardFor24Columns({ c8y_Dashboard: dashboardCfg }),\n this.updateDashboardHistory(dashboard, dashboardCfg)\n );\n\n const keepFragments = this.clean(\n pick(dashboard, [this.FRAGMENT_NAME, 'id', 'name', this.APPLIED_TO_FRAGMENT])\n );\n keepFragments.c8y_DashboardHistory = dashboard.c8y_DashboardHistory;\n await this.serializeWidgetConfigs(keepFragments);\n\n const [, dashboardTypeFragments] = this.getDashboardFragments(dashboard, context, '', true);\n keepFragments.c8y_Global = this.shouldSetGlobal({ ...dashboard, ...dashboardTypeFragments });\n const { data } = await this.inventory.update({ ...keepFragments, ...dashboardTypeFragments });\n this.cache.set(dashboard.id, data);\n return data;\n }\n\n async delete(dashboard: ContextDashboardManagedObject, withConfirmation = true) {\n try {\n if (withConfirmation) {\n let msg: string = gettext(\n `You are about to delete the dashboard \"{{ dashboardName }}\". Do you want to proceed?`\n );\n if (this.isDeviceType(dashboard)) {\n msg = gettext(\n `You are about to delete the dashboard \"{{ dashboardName }}\" from all devices of the type \"{{ deviceType }}\".\n Do you want to proceed?`\n );\n }\n await this.modal.confirm(\n gettext('Delete dashboard'),\n this.translateService.instant(msg, {\n dashboardName: dashboard.c8y_Dashboard.name,\n deviceType: dashboard.c8y_Dashboard.deviceTypeValue\n }),\n Status.DANGER,\n { ok: gettext('Delete'), cancel: gettext('Cancel') }\n );\n }\n await this.inventory.delete(dashboard);\n const tabToRemove = Array.from(this.tabs.state).find(tab => {\n if (typeof tab.path === 'string') {\n return tab.path.endsWith(`${this.DASHBOARD_ROUTE_PATH}/${dashboard.id}`);\n }\n });\n this.tabs.remove(tabToRemove);\n queueMicrotask(() => {\n this.tabs.refresh();\n });\n } catch (ex) {\n // intended empty\n }\n }\n\n updateDashboardHistory(\n dashboard: Partial<ContextDashboardManagedObject>,\n dashboardCfg: ContextDashboard\n ): Partial<ContextDashboardManagedObject> {\n if (!dashboard.c8y_DashboardHistory) {\n dashboard.c8y_DashboardHistory = [];\n }\n if (isEmpty(dashboardCfg?.historyDescription)) {\n dashboardCfg.historyDescription = { changeType: 'create' };\n }\n\n dashboardCfg.created = new Date().toISOString();\n dashboard.c8y_DashboardHistory = cloneDeep([dashboardCfg, ...dashboard.c8y_DashboardHistory]);\n\n if (dashboard.c8y_DashboardHistory.length > this.VERSION_HISTORY_SIZE_LIMIT) {\n dashboard.c8y_DashboardHistory = [\n ...dashboard.c8y_DashboardHistory.slice(0, this.VERSION_HISTORY_SIZE_LIMIT)\n ];\n }\n\n return dashboard;\n }\n\n activateDashboards(\n route: ActivatedRouteSnapshot,\n types: ContextDashboardType[]\n ): Observable<boolean | Tab[]> {\n const { dashboardId } = route.params;\n if (dashboardId) {\n return this.getDashboard$(dashboardId, types, route.parent.data.contextData).pipe(\n tap(dashboard => {\n route.data = { dashboard };\n }),\n map(() => true),\n catchError(() => {\n return of(false);\n })\n );\n }\n\n const { contextData: mo } = this.contextRouteService.getContextData(route);\n\n this.dashboardTabs$ = this.getTabs$(\n mo as ContextDashboardManagedObject,\n types,\n route?.parent?.data as ContextData\n );\n return this.dashboardTabs$;\n }\n\n getDashboard(name: string, defaultWidgets: Widget[]) {\n const children = this.mapWidgets(defaultWidgets);\n return this.getDashboard$(name, [ContextDashboardType.Named]).pipe(\n throwIfEmpty(),\n catchError(() => {\n if (!this.hasPermissionsToCopyDashboard()) {\n this.alert.warning(\n gettext(\n 'You are viewing a read-only dashboard because you don’t have the necessary permissions to modify it.'\n )\n );\n }\n\n return of(\n this.getDefaultDashboard({\n name,\n children,\n widgetClasses: { 'dashboard-theme-light': true, 'panel-title-regular': true }\n })\n );\n })\n );\n }\n\n updateNavigatorItem(mo: IManagedObject) {\n this.navigator.state.forEach(node => {\n if (node.path === `reports/${mo.id}`) {\n this.navigator.remove(node);\n }\n });\n if (mo.c8y_IsNavigatorNode) {\n const nodeToAdd = new NavigatorNode({\n label: mo.name,\n path: `reports/${mo.id}`,\n icon: mo.icon,\n priority: mo.priority,\n translateLabel: mo.translateDashboardTitle\n });\n this.navigator.add(nodeToAdd);\n }\n }\n\n async navigateToDashboard(dashboardMO: ContextDashboardManagedObject, isNewDashboard = false) {\n if (/\\/dashboard\\//.test(this.router.url)) {\n this.router.navigate(['..', dashboardMO.id], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n } else if (/^\\/(device|group)\\/[0-9]+$/.test(this.router.url)) {\n // in case the add dashboard button is the only tab on that route\n this.router.navigate(['.', this.DASHBOARD_ROUTE_PATH, dashboardMO.id], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n } else if (/^\\/(device|group)\\/[0-9]+\\/device-info$/.test(this.router.url)) {\n this.router.navigate(['.'], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n } else {\n this.router.navigate(['..', this.DASHBOARD_ROUTE_PATH, dashboardMO.id], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n }\n }\n\n /**\n * Checks if user is able to edit dashboard according to his roles and dashboard ownership.\n *\n * @param mo - Dashboard managed object.\n * @returns True if user is able to edit dashboard, false if he cannot.\n */\n async canEditDashboard(mo: ContextDashboardManagedObject): Promise<boolean> {\n return await this.permissions.canEdit(this.INVENTORY_ROLES, mo);\n }\n\n /**\n * Checks if user has permissions to copy dashboard according to his roles.\n *\n * @returns True if user has permissions to copy dashboard, false if he cannot.\n */\n hasPermissionsToCopyDashboard(): boolean {\n return this.permissions.hasAnyRole([\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ]);\n }\n\n isNamed(dashboard: Partial<ContextDashboardManagedObject>) {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}`\n ).test(prop)\n );\n }\n\n isReport(dashboard: Partial<ContextDashboardManagedObject>) {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}${this.REPORT_PARTIAL_NAME}`\n ).test(prop)\n );\n }\n\n isDeviceType(dashboard: Partial<ContextDashboardManagedObject>) {\n return some(keys(dashboard), prop => {\n const matchingProp = new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Type}${this.INDEX_SPLIT}`\n ).test(prop);\n if (!matchingProp) {\n return false;\n } else {\n // there might be matching key, but its value can be {} or null\n return !!dashboard[prop];\n }\n });\n }\n\n isDeviceDashboard(dashboard: Partial<ContextDashboardManagedObject>): boolean {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Device}${this.INDEX_SPLIT}`\n ).test(prop)\n );\n }\n\n isGroupDashboard(dashboard: Partial<ContextDashboardManagedObject>): boolean {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Group}${this.INDEX_SPLIT}`\n ).test(prop)\n );\n }\n\n getFilteredDashboardStyles(styleList: string[]) {\n return styleList.filter(c =>\n STYLING_CLASS_PREFIXES.some(classPrefix => c.startsWith(classPrefix))\n );\n }\n\n getStyling(styleList, styleName, defaultValue) {\n const styling = styleList.find(\n style => style && new RegExp(`-${styleName}$`, 'i').test(style.class)\n );\n return styling ? styling.class : defaultValue;\n }\n\n mapWidgets(widgets: Widget[]) {\n return keyBy(\n widgets.map(widget => {\n widget.id = String(Math.random()).substr(2);\n return widget;\n }),\n 'id'\n );\n }\n\n getDashboard$(dashboardIdOrName, dashboardType: ContextDashboardType[], mo?: IManagedObject) {\n const cache = this.cache.get(dashboardIdOrName);\n\n const dashboards = mo\n ? this.getContextDashboards(mo, dashboardType)\n : this.getNamedDashboard(dashboardIdOrName);\n\n const cacheRefresh = this.getContextDashboards$(dashboards).pipe(\n tap(dashboard => this.cacheDashboard(dashboard)),\n filter(\n dashboard =>\n dashboard.id === dashboardIdOrName ||\n has(\n dashboard,\n `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}${dashboardIdOrName}`\n )\n )\n );\n return cache ? of(cache) : cacheRefresh;\n }\n\n async pasteDashboard(newContext: DashboardContext): Promise<void> {\n if (this.copyClipboard) {\n try {\n const dashboardToPaste = this.createContextDashboardCopy(\n this.copyClipboard.dashboard,\n newContext.contextData,\n this.copyClipboard.context.contextData\n );\n const dashboard = await this.create(this.clean(dashboardToPaste), newContext);\n\n // linking childAdditions for e.g. to grant access to the images uploaded by the image widget for users with only inventory roles.\n const { data: childAdditions } = await this.inventory.childAdditionsList(\n this.copyClipboard.dashboardId,\n { pageSize: 2000 }\n );\n if (childAdditions.length) {\n await this.inventory.childAdditionsBulkAdd(childAdditions, dashboard.id);\n }\n\n this.copyClipboard = undefined;\n this.navigateToDashboard(dashboard);\n } catch {\n this.alert.warning(gettext('Insufficient permissions for this action.'));\n }\n }\n }\n\n /**\n * Creates fragment that associates dashboards with device/asset. It consists of three elements:\n * - FRAGMENT_NAME - static string\n * - dashboard type (e.g. 'group', 'device')\n * - fragment value ( id of device/asset if it is not typed dashboard; deviceTypeValue property of dashboard if it is type dashboard)\n * Example fragment for device dashboard: 'c8y_Dashboard!device!773200'\n * Example fragment for group dashboard: 'c8y_Dashboard!group!84129208'\n * Example fragment for typed device dashboard: 'c8y_Dashboard!type!c8y_lwm2m_connector_device'\n *\n * @param contextDashboardType Type of dashboard\n * @param value Fragment value\n * @returns Fragment for dashboard\n */\n createFragmentKey<T extends ContextDashboardType, V extends string>(\n contextDashboardType: T,\n value: V\n ) {\n return `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${contextDashboardType}${this.INDEX_SPLIT}${value}` as const;\n }\n\n /**\n * Indicates if dashboard can be set to type dashboard.\n * First, it checks if deviceTypeValue exists and if user has permission to set dashboard type.\n * Then, case from sensor app is checked- dashboard created with sensor app has deviceType set to true but\n * type fragment is missing- we do not support this combination.\n * @param mo Dashboard managed object\n * @param context {ContextData} Current context\n * @returns True if dashboard can be set to type dashboard, false if it is forbidden.\n */\n shouldAllowToSetDashboardType(\n mo: ContextDashboardManagedObject,\n context: ContextData\n ): AllowTypeDashboard {\n // disallow if dashboard managed object or context is missing or context is not device/asset/group\n if (\n !mo ||\n !context?.contextData ||\n (context.context !== ViewContext.Device && context.context !== ViewContext.Group)\n ) {\n return 'disallow';\n }\n\n // if context is asset/group and type dashboard feature is hidden for assets/groups or asset/group has no typ, return disallow\n const typeDashboardHiddenForAssets = this.optionsService.get(\n this.HIDE_TYPE_DASHBOARD_FOR_ASSETS,\n true\n );\n if (\n context.context === ViewContext.Group &&\n (typeDashboardHiddenForAssets || !context.contextData.type)\n ) {\n return 'disallow';\n }\n\n // if user has no permission to change dashboard, return disallow\n if (!this.permissions.hasAnyRole(this.INVENTORY_ROLES)) {\n return 'disallow';\n }\n\n // case from sensor app is checked- dashboard created with sensor app has deviceType set to true but\n // type fragment is missing- we do not support this combination.\n const typeFragment = this.createFragmentKey(\n ContextDashboardType.Type,\n context?.contextData?.type\n );\n if (\n mo?.c8y_Dashboard &&\n mo?.c8y_Dashboard.deviceType &&\n context?.contextData?.type &&\n !mo[typeFragment]\n ) {\n return 'disallow';\n }\n\n // if view context is Device and contextData of this device has no type yet but type dashboard can be set when type is filled,\n // return allow_if_type_filled\n if (\n !context?.contextData?.type &&\n context.context === ViewContext.Device &&\n this.permissions.hasAnyRole(this.INVENTORY_ROLES)\n ) {\n return 'allow_if_type_filled';\n }\n\n return 'allow';\n }\n\n createReport(reportCfg: Partial<IManagedObject>) {\n const report: Partial<IManagedObject> = {};\n Object.assign(report, reportCfg);\n Object.assign(report, { c8y_Report: {} });\n return this.inventory.create(report);\n }\n\n addReportNavigatorNode(report: IManagedObject): void {\n const node = new NavigatorNode({\n label: report.name,\n path: `reports/${report.id}`,\n icon: report.icon,\n priority: report.priority,\n translateLabel: report.translateDashboardTitle\n });\n this.navigator.add(node);\n }\n\n getContextForGS(mo: IManagedObject): string | null {\n if (this.groupService.isDevice(mo)) {\n return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.DEVICE;\n } else if (this.groupService.isAsset(mo)) {\n return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.ASSET;\n } else if (this.groupService.isGroup(mo)) {\n return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.GROUP;\n } else {\n return null;\n }\n }\n\n async getContextDashboards(\n mo: IManagedObject,\n dashboardType: ContextDashboardType[]\n ): Promise<IResultList<IManagedObject>> {\n const filterCriteria = dashboardType.map(t => ({\n // it's necessary to wrap fragment in quotes because dashboard type can contain spaces\n __has: `'${this.createDashboardFragment(mo, t)}'`\n }));\n\n // the has query above does not work for device type dashboards where the type contains a dot\n const typeFilterCriteria =\n dashboardType.includes(ContextDashboardType.Type) && mo.type\n ? {\n __and: [\n { 'c8y_Dashboard.deviceType': { __eq: true } },\n { 'c8y_Dashboard.deviceTypeValue': { __eq: mo.type } }\n ]\n }\n : undefined;\n const finalFilterCriteria = typeFilterCriteria\n ? [...filterCriteria, typeFilterCriteria]\n : filterCriteria;\n\n const query = this.queriesUtil.buildQuery({\n __filter: {\n __and: [{ __or: finalFilterCriteria }, this.appliedToFilter()]\n }\n });\n\n const now = Date.now();\n const cacheHasValidResponse =\n this.contextDashboardsCache &&\n this.contextDashboardsCache.query === query &&\n now - this.contextDashboardsCache.timestamp < this.CACHE_TIMEOUT;\n\n if (cacheHasValidResponse) {\n return this.contextDashboardsCache.result;\n } else {\n this.contextDashboardsCache = null;\n }\n\n this.contextDashboardsCache = {\n query,\n result: this.inventory.list({ query, pageSize: this.DEFAULT_PAGESIZE }),\n timestamp: now\n };\n return this.contextDashboardsCache.result;\n }\n\n appliedToFilter() {\n const key = this.appStateService?.currentApplication?.value?.key || '';\n\n if (!key) {\n return {};\n }\n\n return {\n __or: [\n { __not: { __has: this.APPLIED_TO_FRAGMENT } }, // legacy / unlabeled ⇒ show in all\n { [this.APPLIED_TO_FRAGMENT]: { __in: [key] } }\n ]\n };\n }\n\n /**\n * Creates a tuple describing the dashboard type and its fragments. For assets like devices and groups, it's possible\n * to have two fragments: one indicating this particular device/asset with its ID, and the second indicating\n * the device/asset type (if the dashboard is meant to be applied to all assets of this type).\n *\n * @param dashboardMO - Dashboard managed object.\n * @param context - Context data of asset.\n * @param name - Name of the dashboard.\n * @param isEdit - True if existing dashboard is updated, false when it's creation of new dashboard.\n * @returns Tuple of dashboard type and object containing dashboard fragments.\n */\n private getDashboardFragments(\n dashboardMO: ContextDashboardManagedObject,\n context: ContextData,\n name: string,\n isEdit: boolean\n ): [ContextDashboardType, Record<string, object>] {\n let dashboardType: ContextDashboardType;\n const id = (context?.contextData?.id as string) || '';\n const fragments: Record<string, object> = {};\n\n if (name) {\n // a named dashboard should not receive any other fragments\n dashboardType = ContextDashboardType.Named;\n const namedFragmentKey = this.createFragmentKey(ContextDashboardType.Named, name);\n fragments[namedFragmentKey] = {};\n } else if (context?.context === ViewContext.Device || context?.context === ViewContext.Group) {\n // get base type for device or group\n const defaultType =\n context.context === ViewContext.Device\n ? ContextDashboardType.Device\n : ContextDashboardType.Group;\n dashboardType = dashboardMO.c8y_Dashboard.deviceType\n ? ContextDashboardType.Type\n : defaultType;\n\n // clear fragments from other asset if current asset is not origin of this dashboard\n this.clearRedundantFragment(dashboardMO, defaultType, fragments);\n\n // add base fragment for particular asset\n const deviceOrGroupFragmentKey = this.createFragmentKey(defaultType, id);\n fragments[deviceOrGroupFragmentKey] = {};\n\n // add or clear type fragment\n if (dashboardMO.c8y_Dashboard.deviceType || isEdit) {\n const typeFragmentKey = this.createFragmentKey(\n ContextDashboardType.Type,\n dashboardMO.c8y_Dashboard.deviceTypeValue\n );\n fragments[typeFragmentKey] = dashboardMO.c8y_Dashboard.deviceType ? {} : null;\n }\n }\n\n return [dashboardType, fragments];\n }\n\n /**\n * Clears fragments that originates from other managed object.\n * E.g. typed dashboard is created for device A of type c8y_MQTTDevice and id 1, so it gets fragments object\n * ```ts\n * {\n * c8y_Dashboard!device!1: {},\n * c8y_Dashboard!type!c8y_MQTTDevice: {}\n * }\n *```\n * then, on device B of type c8y_MQTTDevice and id 2, which also has access to this dashboard, deviceType is set to\n * false, so dashboard is not typed dashboard anymore and now belongs to device B, therefore fragments should look like\n * ```ts\n * {\n * c8y_Dashboard!device!1: null, // this value is cleared because dashboard is doesn't belong to device A anymore\n * c8y_Dashboard!device!2: {}, // assign dashboard to device B\n * c8y_Dashboard!type!c8y_MQTTDevice: null // this value is cleared in getDashboardFragments method as it's not typed dashboard anymore\n * }\n * ```\n *\n * @param dashboardMO - Dashboard managed object.\n * @param type - Context dashboard type.\n * @param fragments - Fragments object.\n */\n private clearRedundantFragment(\n dashboardMO: ContextDashboardManagedObject,\n type: ContextDashboardType,\n fragments: Record<string, object>\n ): void {\n Object.keys(dashboardMO)\n .filter(key => key.startsWith(this.createFragmentKey(type, '')))\n .forEach(key => (fragments[key] = null));\n }\n\n /**\n * Used to migrate dashboards from previous 12 columns layout to 24 columns.\n */\n private adjustDashboardFor24Columns<T extends { c8y_Dashboard?: ContextDashboard }>(\n dashboards: T[]\n ): T[];\n private adjustDashboardFor24Columns<T extends { c8y_Dashboard?: ContextDashboard }>(\n dashboards: T\n ): T;\n private adjustDashboardFor24Columns<T extends { c8y_Dashboard?: ContextDashboard }>(\n dashboards: T | T[]\n ): T | T[] {\n if (Array.isArray(dashboards)) {\n return dashboards.map(dashboard => this.adjustDashboardFor24Columns(dashboard));\n }\n // if `columns` attribute exists, dashboard was already adjusted.\n if (dashboards.c8y_Dashboard.columns) {\n return dashboards;\n }\n\n dashboards.c8y_Dashboard.columns = 24;\n if (!dashboards.c8y_Dashboard.children) {\n return dashboards;\n }\n\n // Newly created NamedContextDashboards are still created with 12 columns for backwards compatibility.\n // Default widgets might be already configured for 24 columns.\n // If a widget is already configured for more than 12 columns, we should not adjust it.\n const alreadyHasWidgetsConfiguredForMoreThan12Columns = Object.values(\n dashboards.c8y_Dashboard.children\n ).some(widget => widget._x + widget._width > 12);\n if (alreadyHasWidgetsConfiguredForMoreThan12Columns) {\n return dashboards;\n }\n\n // we need to multiply both _width and _x attributes with 2 to migrate from 12 to 24 columns.\n Object.values(dashboards.c8y_Dashboard.children).forEach(widget => {\n if (widget._width) {\n widget._width = widget._width * 2;\n }\n if (widget._x) {\n widget._x = widget._x * 2;\n }\n });\n return dashboards;\n }\n\n private async serializeWidgetConfigs(dashboard: ContextDashboardManagedObject): Promise<void> {\n const children = cloneDeep(dashboard.c8y_Dashboard.children);\n if (!children) {\n return;\n }\n const configs = Object.values(children);\n const details = configs.map(({ componentId, config }) => ({ componentId, config }));\n const results = await this.dynamicComponent.serializeConfigs(details);\n results.forEach((result, index) => {\n Object.entries(result).forEach(([key, value]) => {\n set(details[index].config, key, value);\n });\n });\n dashboard.c8y_Dashboard.children = children;\n }\n\n private createContextDashboardCopy(\n dash: ContextDashboard,\n newContext: Partial<IManagedObject>,\n oldContext: Partial<IManagedObject>\n ): ContextDashboard {\n const children = reduce(\n dash.children,\n (_children, child) => {\n const { id } = child;\n const cfg = child.config;\n const propertiesToCopy = {\n device: device => this.replaceContextInObj(device, newContext, oldContext),\n datapoints: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext),\n dataPoints: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext),\n datapointsGauge: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext),\n datapointsLabels: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext)\n };\n\n if (cfg) {\n this.copyProperties(cfg, propertiesToCopy);\n if (cfg.options) {\n this.copyProperties(cfg.options, propertiesToCopy);\n }\n }\n\n _children[id] = cloneDeep(child);\n return _children;\n },\n {}\n );\n\n dash.children = children;\n\n const isTypeDashboard = dash.deviceType && !!dash.deviceTypeValue;\n if (isTypeDashboard) {\n dash.deviceTypeValue = newContext.type;\n }\n return dash;\n }\n\n private copyProperties(obj, propertiesToCopy) {\n forEach(propertiesToCopy, (copyFn, property) => {\n if (obj[property]) {\n obj[property] = copyFn(obj[property]);\n }\n });\n }\n\n private replaceContextInDataPoints(\n dataPoints,\n newContext: Partial<IManagedObject>,\n oldContext: Partial<IManagedObject>\n ) {\n dataPoints.forEach(dp => {\n dp.__target = this.replaceContextInObj(dp.__target, newContext, oldContext);\n });\n return dataPoints;\n }\n\n private replaceContextInObj(\n obj: Partial<IManagedObject>,\n newContext: Partial<IManagedObject>,\n oldContext: Partial<IManagedObject>\n ) {\n if (obj && obj.id === oldContext.id) {\n Object.assign(obj, pick(newContext, ['id', 'name']));\n }\n return obj;\n }\n\n private getTabs$(\n mo: ContextDashboardManagedObject,\n dashboardType: ContextDashboardType[],\n context?: ContextData\n ) {\n const dashboards = this.getContextDashboards(mo, dashboardType);\n\n return this.getContextDashboards$(dashboards).pipe(\n mergeMap(dashboard => this.verifyDashboardAvailability$(dashboard)),\n // Due to MTM-62321 named context dashboards included fragments for device and groups.\n // therefore some device-info dashboards (from DM app) might occur in cockpit on device level.\n // We need to filter those out..\n filter(([dashboard]) => {\n // list all identifiers of the dashboard (name, device, group, type)\n const dashboardIdentifiers = Object.keys(dashboard)\n .filter(key => key.startsWith(`${this.FRAGMENT_NAME}${this.INDEX_SPLIT}`))\n .map(key => key.split(this.INDEX_SPLIT)[1]);\n // if dashboard is not named, it's safe to include it\n if (!dashboardIdentifiers.includes(ContextDashboardType.Named)) {\n return true;\n }\n // if dashboard is named, but also has a context identifier, we skip it\n if (\n dashboardIdentifiers.includes(ContextDashboardType.Device) ||\n dashboardIdentifiers.includes(ContextDashboardType.Group)\n ) {\n return false;\n }\n\n // all others are good..\n return true;\n }),\n mergeMap(([dashboard]) => this.removeDashboardMoProperty(dashboard)),\n tap(dashboard => this.cacheDashboard(dashboard)),\n map(dashboard => this.createDashboardTab(dashboard, context)),\n toArray()\n );\n }\n\n private verifyDashboardAvailability$(dashboard: ContextDashboardManagedObject) {\n const globalRolesIds = dashboard?.c8y_Dashboard?.globalRolesIds;\n const canEdit = from(\n this.permissions.canEdit(this.INVENTORY_ROLES, dashboard, { skipRequestCheck: true })\n );\n const hasAnyGlobalRole =\n !globalRolesIds || globalRolesIds === ALL_GLOBAL_ROLES_SELECTED\n ? of(true)\n : of(this.permissions.hasAnyGlobalRole(globalRolesIds));\n\n return combineLatest([of(dashboard), canEdit, hasAnyGlobalRole]).pipe(\n filter(([, canEdit, hasAnyGlobalRole]) => canEdit || hasAnyGlobalRole)\n );\n }\n\n private getContextDashboards$(request: Promise<IResultList<IManagedObject>>) {\n return from(request).pipe(\n mergeMap(response =>\n this.adjustDashboardFor24Columns(response.data as ContextDashboardManagedObject[])\n )\n );\n }\n\n /**\n * Cleans already corrupted dashboards from dashboardMo property.\n * Added to fix dashboards on the cloud instance (eu-latest).\n * @deprecated This is going to be removed after 1007.7.0.\n */\n private async removeDashboardMoProperty(\n dashboard: ContextDashboardManagedObject\n ): Promise<ContextDashboardManagedObject> {\n const dashboardCopy = cloneDeep(dashboard);\n const children = get(dashboardCopy, 'c8y_Dashboard.children');\n let updateDashboard = false;\n\n forEach(children, child => {\n if (get(child, 'componentTransformConfigWithContext')) {\n delete child.componentTransformConfigWithContext;\n updateDashboard = true;\n }\n if (get(child, 'config.dashboardMo')) {\n delete child.config.dashboardMo;\n updateDashboard = true;\n }\n });\n\n if (updateDashboard) {\n await this.update(dashboardCopy);\n }\n return dashboardCopy;\n }\n\n private cacheDashboard(dashboard: ContextDashboardManagedObject) {\n this.cache.set(dashboard.id, dashboard);\n }\n\n private createDashboardTab(dashboard: ContextDashboardManagedObject, context?: ContextData) {\n const { c8y_Dashboard: _dashboard, id } = dashboard;\n return {\n icon: _dashboard.icon,\n path: `${this.DASHBOARD_ROUTE_PATH}/${id}`,\n label: _dashboard.name,\n priority: _dashboard.priority,\n hide: this.isReport(dashboard),\n translateLabel: _dashboard.translateDashboardTitle,\n badge:\n _dashboard.deviceType && this.shouldAllowToSetDashboardType(dashboard, context)\n ? gettext('Dashboard template')\n : null,\n tooltipText: _dashboard.description || gettext('Dashboard template')\n } as Tab;\n }\n\n private clean(dashboard) {\n const jsonString = JSON.stringify(dashboard, (key, value) => {\n if (key === '$$hashKey' || key === 'klasses') {\n return undefined;\n }\n\n return value;\n });\n return JSON.parse(jsonString);\n }\n\n private getNamedDashboard(name: string) {\n return this.inventory.list({\n fragmentType: `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}${name}`,\n pageSize: 1\n });\n }\n\n private createDashboardFragment(mo: IManagedObject, type: ContextDashboardType) {\n let value;\n if (mo.c8y_Report) {\n value = `${this.REPORT_PARTIAL_NAME}${mo.id}`;\n } else {\n value = type === ContextDashboardType.Type ? mo.type : mo.id;\n }\n return `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${type}${this.INDEX_SPLIT}${value}`;\n }\n\n private shouldSetGlobal(dashboard: Partial<ContextDashboardManagedObject>, context?) {\n if (\n (!context && this.isNamed(dashboard) && !this.isReport(dashboard)) ||\n this.isDeviceType(dashboard)\n ) {\n return {};\n }\n return null;\n }\n\n private getDefaultDashboard(dashboardCfg: ContextDashboard): ContextDashboardManagedObject {\n return {\n c8y_Dashboard: {\n ...dashboardCfg,\n name: dashboardCfg.name || 'Default Dashboard',\n description: gettext('This is a default dashboard.')\n },\n [`c8y_Dashboard!name!${dashboardCfg.name}`]: {}\n } as ContextDashboardManagedObject;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport {\n AllowTypeDashboard,\n ContextDashboard,\n DASHBOARD_DETAILS_TABS_OUTLET_NAME,\n DashboardDetailsTabId,\n DashboardGlobalRoles,\n DashboardMetadata\n} from './context-dashboard.model';\nimport { TranslateService } from '@ngx-translate/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Tab, TabsService } from '@c8y/ngx-components';\nimport { map } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nconst DEFAULT_DUPLICATE_WITHOUT_TYPE = () => {\n throw new Error('duplicateWithoutTypeFn Not implemented');\n};\n\nconst DEFAULT_PREVIEW_CHANGED = () => {\n throw new Error('previewChanged Not implemented');\n};\n\nconst DEFAULT_REVERT_TO_DASHBOARD = () => {\n throw new Error('revertToDashboard Not implemented');\n};\n\n@Injectable()\nexport class DashboardDetailService {\n dashboardDetailsForm: ReturnType<DashboardDetailService['createDashboardDetailsForm']>;\n details: DashboardMetadata;\n detailsTabs: Tab[];\n saveButtonDisabled = false;\n get generalSettingsForm() {\n return this.dashboardDetailsForm.get('generalSettingsForm');\n }\n get appearanceSettingsForm() {\n return this.dashboardDetailsForm.get('appearanceSettingsForm');\n }\n get widgetsForm() {\n return this.dashboardDetailsForm.get('widgetsForm');\n }\n\n styling = {\n themeClass: 'dashboard-theme-light',\n headerClass: 'panel-title-regular'\n };\n\n duplicateWithoutTypeFn: () => Promise<void> = DEFAULT_DUPLICATE_WITHOUT_TYPE;\n\n previewChangedFn: (\n dashboardClasses: Pick<ContextDashboard, 'classes' | 'widgetClasses'>\n ) => void = DEFAULT_PREVIEW_CHANGED;\n\n revertToDashboardFn: (dashboard: ContextDashboard) => Promise<void> = DEFAULT_REVERT_TO_DASHBOARD;\n\n readonly DEFAULT_DASHBOARD_MARGIN = 12;\n readonly DEFAULT_DASHBOARD_ICON = 'th';\n readonly DEFAULT_DASHBOARD_PRIORITY = 5000;\n\n constructor(\n private fb: FormBuilder,\n private translateService: TranslateService,\n private tabsService: TabsService\n ) {\n this.tabsService.items$\n .pipe(\n map(tabs => tabs.filter(tab => tab.tabsOutlet === DASHBOARD_DETAILS_TABS_OUTLET_NAME)),\n takeUntilDestroyed()\n )\n .subscribe(tabs => (this.detailsTabs = tabs));\n }\n\n getTabs(): Tab[] {\n let tabs = this.detailsTabs;\n const shouldHideGeneralTab = !(\n (!this.details?.isNamedDashboard && !this.details?.hideAvailability) ||\n this.details?.isReport\n );\n const shouldHideVersionHistoryTab = !this.details?.mo?.c8y_DashboardHistory;\n if (shouldHideGeneralTab) {\n tabs = tabs.filter(tab => tab.featureId !== DashboardDetailsTabId.GENERAL);\n }\n if (shouldHideVersionHistoryTab) {\n tabs = tabs.filter(tab => tab.featureId !== DashboardDetailsTabId.VERSIONHISTORY);\n }\n return tabs;\n }\n\n /**\n * Initializes dashboard details form.\n * @param dashboard Context dashboard object\n * @param isReport True if its report dashboard\n * @param allowTypeDashboard Allow to make dashboard type dashboard\n * @returns Dashboard details form\n */\n initForm(\n dashboard: ContextDashboard,\n isReport: boolean,\n allowTypeDashboard: AllowTypeDashboard\n ): void {\n this.dashboardDetailsForm = this.createDashboardDetailsForm(\n dashboard,\n isReport,\n allowTypeDashboard\n );\n }\n\n reset() {\n this.dashboardDetailsForm = null;\n this.details = null;\n this.duplicateWithoutTypeFn = DEFAULT_DUPLICATE_WITHOUT_TYPE;\n this.previewChangedFn = DEFAULT_PREVIEW_CHANGED;\n this.revertToDashboardFn = DEFAULT_REVERT_TO_DASHBOARD;\n }\n\n /**\n * Creates dashboard details form divided into two groups- general settings and appearance settings.\n * @param dashboard Context dashboard object\n * @param isReport True if its report dashboard\n * @param allowTypeDashboard Allow to make dashboard type dashboard\n * @returns Dashboard details form\n */\n private createDashboardDetailsForm(\n dashboard: ContextDashboard,\n isReport: boolean,\n allowTypeDashboard: AllowTypeDashboard\n ) {\n return this.fb.group({\n generalSettingsForm: this.createGeneralSettingsForm(dashboard, isReport, allowTypeDashboard),\n appearanceSettingsForm: this.createAppearanceSettingsForm(dashboard),\n widgetsForm: this.createWidgetsForm(dashboard)\n });\n }\n /**\n * Creates form group for general settings of dashboard.\n * @param dashboard Context dashboard object\n * @param isReport True if its report dashboard\n * @param allowTypeDashboard Allow to make dashboard type dashboard\n * @returns Dashboard general settings form\n */\n private createGeneralSettingsForm(\n dashboard: ContextDashboard,\n isReport: boolean,\n allowTypeDashboard: AllowTypeDashboard\n ) {\n const globalRolesIdsValue: DashboardGlobalRoles = !dashboard?.globalRolesIds\n ? null\n : Array.isArray(dashboard.globalRolesIds)\n ? [...dashboard.globalRolesIds]\n : dashboard.globalRolesIds;\n return this.fb.group({\n icon: [dashboard?.icon || this.DEFAULT_DASHBOARD_ICON, [Validators.minLength(1)]],\n priority: [\n dashboard?.priority || this.DEFAULT_DASHBOARD_PRIORITY,\n [Validators.min(-10000), Validators.max(10000), Validators.required]\n ],\n name: [\n dashboard?.name ||\n (isReport\n ? this.translateService.instant(gettext('Report'))\n : this.translateService.instant(gettext('Dashboard'))),\n [Validators.required, Validators.maxLength(512)]\n ],\n description: [dashboard?.description || null, [Validators.maxLength(1_000)]],\n globalRolesIds: this.fb.control<DashboardGlobalRoles>(globalRolesIdsValue), // calling this.fb.control to cast type\n c8y_IsNavigatorNode: [!!dashboard?.c8y_IsNavigatorNode],\n ...(allowTypeDashboard !== 'disallow' && {\n deviceType: [\n {\n value: dashboard?.deviceType ?? false,\n disabled: allowTypeDashboard === 'allow_if_type_filled'\n }\n ]\n })\n });\n }\n /**\n * Creates form group for appearance settings of dashboard.\n * @param dashboard Context dashboard object\n * @returns Dashboard appearance settings form\n */\n private createAppearanceSettingsForm(dashboard: ContextDashboard) {\n return this.fb.group({\n widgetMargin: [\n dashboard?.widgetMargin || this.DEFAULT_DASHBOARD_MARGIN,\n [Validators.min(0), Validators.max(50)]\n ],\n translateWidgetTitle: [!!dashboard?.translateWidgetTitle],\n translateDashboardTitle: [dashboard?.translateDashboardTitle ?? true],\n classes: dashboard?.classes || { [this.styling.themeClass]: true },\n widgetClasses: dashboard?.widgetClasses || { [this.styling.headerClass]: true }\n });\n }\n\n private createWidgetsForm(dashboard: ContextDashboard) {\n return this.fb.group({\n children: dashboard?.children || {}\n });\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AppStateService,\n ContextData,\n ContextRouteService,\n GainsightService,\n GroupService,\n memoize,\n ModalService,\n Status,\n Tab,\n TabsService,\n TabsOutletComponent,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { clone, cloneDeep, isEqual } from 'lodash-es';\nimport { Subject } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport {\n AllowTypeDashboard,\n ContextDashboard,\n ContextDashboardManagedObject,\n DASHBOARD_DETAILS_OUTLET,\n DASHBOARD_DETAILS_TABS_OUTLET_NAME,\n DASHBOARD_SETTINGS_CHANGES,\n DashboardHistoryDescription,\n PRODUCT_EXPERIENCE,\n REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY\n} from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { DashboardDetailService } from './dashboard-detail.service';\nimport { CollapseDirective } from 'ngx-bootstrap/collapse';\nimport { NgIf } from '@angular/common';\nimport { newDashboardTab } from './new-dashboard.guard';\n\n@Component({\n selector: 'c8y-dashboard-detail',\n templateUrl: './dashboard-detail.component.html',\n providers: [DashboardDetailService],\n imports: [CollapseDirective, NgIf, TabsOutletComponent, RouterOutlet, C8yTranslatePipe]\n})\nexport class DashboardDetailComponent implements OnInit, OnChanges, OnDestroy {\n isCollapsed = true;\n currentContext: ContextData;\n currentDashboard: ContextDashboard;\n @Input() isReport: boolean;\n @Input() deviceType: string;\n @Input() context: any;\n @Input() mo: ContextDashboardManagedObject;\n @Input() dashboard: ContextDashboard;\n @Input() isNamedDashboard: boolean;\n @Input() hideAvailability = false;\n deviceTypeValue: string;\n displayDeviceTypeValue: string;\n icons: string[];\n dashboardDetailsForm: ReturnType<DashboardDetailService['createDashboardDetailsForm']>;\n allowTypeDashboard: AllowTypeDashboard;\n isEdit: boolean;\n tabs: Tab[] = [];\n @Output() dashboardSaved = new EventEmitter<ContextDashboard>();\n @Output() previewChanged = new EventEmitter<any>();\n private destroy$: Subject<void> = new Subject();\n\n readonly TABS_OUTLET_NAME = DASHBOARD_DETAILS_TABS_OUTLET_NAME;\n\n constructor(\n private contextDashboardService: ContextDashboardService,\n private translateService: TranslateService,\n private contextRoute: ContextRouteService,\n private activatedRoute: ActivatedRoute,\n private tabsService: TabsService,\n private router: Router,\n private inventory: InventoryService,\n private route: ActivatedRoute,\n public dashboardDetailService: DashboardDetailService,\n private appState: AppStateService,\n private groupService: GroupService,\n private modal: ModalService,\n private gainsightService: GainsightService\n ) {}\n\n async ngOnInit() {\n this.currentContext = this.contextRoute.getContextData(this.activatedRoute);\n this.deviceTypeValue = this.context?.type;\n this.displayDeviceTypeValue =\n this.context &&\n this.groupService.isGroup(this.context) &&\n !this.groupService.isAsset(this.context)\n ? this.translateService.instant(gettext('Group'))\n : this.deviceTypeValue;\n\n this.updateAllowTypeDashboard();\n this.initForm();\n await this.clearNamedOutletPath(); // on init this component collapsed, but outlet may occur in URL when reloading page\n }\n\n ngOnChanges(): void {\n this.updateAllowTypeDashboard();\n this.refreshDashboardDetails();\n }\n\n ngAfterContentInit(): void {\n if (!this.isEdit) {\n this.initializeConfiguration();\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n this.dashboardDetailService.reset();\n }\n\n async save() {\n const oldDashboard = cloneDeep(this.dashboard);\n this.dashboard = {\n ...this.dashboard,\n ...this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').value,\n ...this.dashboardDetailService.dashboardDetailsForm.get('appearanceSettingsForm').value,\n ...this.dashboardDetailService.dashboardDetailsForm.get('widgetsForm').value,\n c8y_IsNavigatorNode: this.dashboardDetailService.dashboardDetailsForm.get(\n 'generalSettingsForm'\n ).value.c8y_IsNavigatorNode\n ? {}\n : this.currentDashboard\n ? null\n : undefined\n };\n const dashboardSettingChanges: string[] = Object.keys(this.dashboard).filter(key => {\n if (key === 'c8y_IsNavigatorNode') {\n return !!oldDashboard[key] !== !!this.dashboard[key];\n }\n return !isEqual(oldDashboard[key], this.dashboard[key]);\n });\n\n this.dashboard.author = this.appState.currentUser.value.userName;\n\n this.dashboard.deviceTypeValue ??= this.deviceTypeValue;\n this.dashboard.historyDescription =\n this.updateDashboardHistoryDescription(dashboardSettingChanges);\n\n if (!this.isEdit && !this.isReport) {\n await this.createNewDashboard();\n } else if (!this.isEdit && this.isReport) {\n await this.createNewReport();\n } else {\n await this.updateDashboard();\n this.mo.c8y_DashboardHistory = [\n this.dashboard,\n ...(this.mo?.c8y_DashboardHistory ? this.mo.c8y_DashboardHistory : [])\n ];\n }\n }\n\n updateDashboardHistoryDescription(dashboardChanges: string[]): DashboardHistoryDescription {\n return {\n changeType: this.isEdit ? 'update' : 'create',\n dashboardSettingChanges: dashboardChanges\n .filter(value => value !== 'deviceType')\n .map(value => DASHBOARD_SETTINGS_CHANGES[value] || value),\n deviceType: dashboardChanges.find(value => value === 'deviceType')\n ? this.dashboard.deviceType\n : undefined\n };\n }\n\n async cancel() {\n if (!this.isEdit && !this.isReport) {\n // dashboard creation in it's own tab- confirm and cleanup triggered in canDeactivate during routing\n this.tabsService.items$.pipe(first()).subscribe((tabs: Tab[]) => {\n const tab = tabs.find(t => t.featureId !== newDashboardTab.featureId);\n this.router.navigate(typeof tab.path === 'string' ? [tab.path] : tab.path, {\n replaceUrl: true\n });\n });\n return;\n } else if (!this.isEdit && this.isReport) {\n this.router.navigate(['reports']);\n return;\n } else if (\n this.dashboardDetailService.dashboardDetailsForm.dirty &&\n !(await this.confirmClosing())\n ) {\n return;\n }\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n }\n\n async canDeactivate(omitConfirm = false): Promise<boolean> {\n let canDeactivate: boolean;\n if (this.isCollapsed || !this.dashboardDetailService.dashboardDetailsForm.dirty) {\n canDeactivate = true;\n } else {\n if (omitConfirm) {\n canDeactivate = false;\n } else {\n canDeactivate = await this.confirmClosing();\n }\n }\n if (canDeactivate) {\n this.cleanupAfterDetailsClose();\n }\n return canDeactivate;\n }\n\n show(isEdit: boolean) {\n this.isEdit = isEdit;\n if (this.isEdit) {\n this.edit();\n }\n this.initForm();\n this.isCollapsed = false;\n this.refreshDashboardDetails();\n }\n\n async revertDashboard(dashboard: ContextDashboard) {\n this.dashboard = dashboard;\n this.dashboard.c8y_IsNavigatorNode = this.dashboard.c8y_IsNavigatorNode\n ? {}\n : this.currentDashboard\n ? null\n : undefined;\n await this.updateDashboard();\n }\n\n async duplicateWithoutType(): Promise<void> {\n const newDashboardName = this.translateService.instant(gettext('{{ dashboardName }} (copy)'), {\n dashboardName:\n this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').value.name\n });\n this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').patchValue({\n ...this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').value,\n deviceType: false,\n name: newDashboardName\n });\n // setting edition to false so new dashboard can be created as copy of current one\n this.isEdit = false;\n await this.save();\n }\n\n private updateAllowTypeDashboard(): void {\n this.allowTypeDashboard = this.contextDashboardService.shouldAllowToSetDashboardType(\n this.mo,\n this.currentContext\n );\n }\n\n private initForm(): void {\n this.dashboardDetailService.initForm(this.dashboard, this.isReport, this.allowTypeDashboard);\n this.dashboardDetailsForm = this.dashboardDetailService.dashboardDetailsForm;\n }\n\n private async confirmClosing(): Promise<boolean> {\n try {\n await this.modal.confirm(\n gettext('Close dashboard details'),\n gettext(\n 'Are you sure you want to close dashboard details? All unsaved changes will be lost.'\n ),\n Status.WARNING,\n {\n ok: gettext('Close'),\n cancel: gettext('Cancel')\n }\n );\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private async createNewDashboard() {\n const mo: ContextDashboardManagedObject = await this.contextDashboardService.create(\n this.dashboard,\n this.currentContext,\n this.isNamedDashboard ? this.dashboard.name : undefined\n );\n\n await this.onCreateGSEvent(mo);\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n await this.contextDashboardService.navigateToDashboard(mo, true);\n }\n\n private async onCreateGSEvent(mo: ContextDashboardManagedObject) {\n const parentName = await this.convertStringToHash(this.context?.name);\n const dashboardName = await this.convertStringToHash(this.dashboard?.name);\n\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_DASHBOARD,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,\n name: dashboardName,\n id: mo.id,\n nameId: `${dashboardName}_${this.mo.id}`,\n isDashboardTemplate: mo.c8y_Dashboard.deviceType,\n parentAssetId: this.context?.id ? this.context.id : 'noContext',\n parentAssetName: this.context?.id ? parentName : 'noContext',\n parentAssetType: this.context?.id ? this.context.type : 'noContext',\n parentAssetNameId: this.context?.id ? `${parentName}_${this.context.id}` : 'noContext',\n parentAssetNameDashboardName: this.context?.id\n ? `${parentName}_${dashboardName}`\n : 'noContext',\n parentAssetIdDashboardId: this.context?.id ? `${this.context.id}_${this.mo.id}` : 'noContext',\n parentAssetNameDashboardId: this.context?.id ? `${parentName}_${this.mo.id}` : 'noContext',\n parentAssetNameIdDashboardNameId: this.context?.id\n ? `${parentName}_${this.context.id}_${dashboardName}_${this.mo.id}`\n : 'noContext',\n dashboardType: mo.c8y_Dashboard.deviceType ? mo.c8y_Dashboard.deviceTypeValue : null,\n context: this.contextDashboardService.getContextForGS(\n this.currentContext?.contextData as IManagedObject\n )\n });\n }\n\n @memoize()\n private async convertStringToHash(str: string) {\n if (!str) {\n return null;\n }\n return (await this.gainsightService.shouldSendPiiData())\n ? str\n : await this.gainsightService.hashGroupName(str);\n }\n\n private async createNewReport() {\n try {\n const { name, icon, c8y_IsNavigatorNode, priority, description, translateDashboardTitle } =\n this.dashboard;\n const report = (\n await this.contextDashboardService.createReport({\n name,\n icon,\n c8y_IsNavigatorNode,\n priority,\n description,\n translateDashboardTitle\n } as Partial<IManagedObject>)\n ).data;\n\n await this.contextDashboardService.create(\n this.dashboard,\n undefined,\n `${this.contextDashboardService.REPORT_PARTIAL_NAME}${report.id}`\n );\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_REPORT,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,\n name: report.name,\n id: report.id,\n context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT\n });\n if (report.c8y_IsNavigatorNode) {\n this.contextDashboardService.addReportNavigatorNode(report);\n }\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n await this.router.navigate(['reports', report.id]);\n } catch (ex) {\n // intended empty\n }\n }\n\n private async updateDashboard() {\n try {\n const dashboardMO: ContextDashboardManagedObject = cloneDeep(this.mo);\n const cfg = this.dashboard;\n if (this.isReport) {\n const { name, icon, c8y_IsNavigatorNode, priority, description, translateDashboardTitle } =\n cfg;\n dashboardMO.c8y_Dashboard = cfg;\n await this.updateReport({\n id: this.context.id,\n name,\n icon,\n c8y_IsNavigatorNode,\n priority,\n description,\n translateDashboardTitle\n });\n } else {\n dashboardMO.c8y_Dashboard = cfg;\n }\n\n const updatedDashboardMo = await this.contextDashboardService.update(\n dashboardMO,\n this.currentContext\n );\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n\n this.dashboardSaved.emit(updatedDashboardMo);\n } catch (ex) {\n // intended empty\n }\n }\n\n private edit() {\n if (this.isReport) {\n const { name, icon, priority, c8y_IsNavigatorNode, description } = this.context;\n Object.assign(this.dashboard, { name, icon, priority, c8y_IsNavigatorNode, description });\n }\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n const defaultDashboardCfg: Partial<ContextDashboard> = {\n name: this.translateService.instant(this.isReport ? gettext('Report') : gettext('Dashboard')),\n priority: this.isReport\n ? REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY\n : this.dashboardDetailService.DEFAULT_DASHBOARD_PRIORITY,\n icon: this.dashboardDetailService.DEFAULT_DASHBOARD_ICON,\n deviceTypeValue: this.deviceType,\n columns: 24\n };\n\n if (this.dashboard) {\n this.currentDashboard = clone(this.dashboard);\n } else {\n this.dashboard = defaultDashboardCfg;\n this.dashboardDetailService.dashboardDetailsForm.markAsDirty();\n }\n }\n\n private async updateReport(mo: Partial<IManagedObject>) {\n mo.c8y_IsNavigatorNode = mo.c8y_IsNavigatorNode ? {} : null;\n const res = await this.inventory.update(mo);\n this.context = res.data;\n if (this.route.parent) {\n this.route.parent.snapshot.data.contextData = this.context;\n }\n this.contextDashboardService.updateNavigatorItem(res.data);\n }\n\n private cleanupAfterDetailsClose() {\n this.isCollapsed = true;\n if (!this.isEdit) {\n const dashboardContext = this.route.snapshot.data.dashboard;\n // hide New dashboard tab\n const tmpNewDashboardTab = [...this.tabsService.state].find(\n t => t.featureId === newDashboardTab.featureId\n );\n // don't hide the new dashboard tab when clicking on the add dashboard button from another dashboard.\n if (!tmpNewDashboardTab || dashboardContext?.c8y_Dashboard) {\n return;\n }\n // hide tab and make it appear as last one to prevent navigating to it\n tmpNewDashboardTab.hide = true;\n tmpNewDashboardTab.priority = -Infinity;\n this.tabsService.refresh();\n }\n this.previewChanged.emit(this.dashboard);\n }\n\n private async clearNamedOutletPath() {\n if (\n this.activatedRoute.snapshot?.children?.[0]?.routeConfig.outlet === DASHBOARD_DETAILS_OUTLET\n ) {\n await this.router.navigate(\n [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: null\n }\n }\n ],\n { queryParamsHandling: 'preserve', relativeTo: this.activatedRoute }\n );\n }\n }\n\n private refreshDashboardDetails() {\n this.dashboardDetailService.details = {\n isReport: this.isReport,\n isNamedDashboard: this.isNamedDashboard,\n hideAvailability: this.hideAvailability,\n dashboard: this.dashboard,\n deviceTypeValue: this.deviceType,\n displayDeviceTypeValue: this.displayDeviceTypeValue,\n mo: this.mo,\n allowTypeDashboard: this.allowTypeDashboard,\n isDevice: !!this.context?.c8y_IsDevice,\n context: this.context\n };\n this.dashboardDetailService.duplicateWithoutTypeFn = () => this.duplicateWithoutType();\n this.dashboardDetailService.previewChangedFn = dashboardClasses =>\n this.previewChanged.emit(dashboardClasses);\n this.dashboardDetailService.revertToDashboardFn = dashboard => this.revertDashboard(dashboard);\n this.tabs = this.dashboardDetailService.getTabs();\n }\n}\n","<div\n class=\"collapse c8y-top-drawer\"\n [collapse]=\"isCollapsed\"\n [isAnimated]=\"true\"\n>\n <div class=\"p-t-16 p-b-16 p-l-24 p-r-24 separator-bottom\">\n <span class=\"h4\">{{ 'Dashboard settings' | translate }}</span>\n </div>\n\n <div\n class=\"d-flex\"\n *ngIf=\"!isCollapsed\"\n >\n <c8y-tabs-outlet\n class=\"c8y-top-drawer--tabs\"\n [tabs]=\"tabs\"\n [outletName]=\"TABS_OUTLET_NAME\"\n [orientation]=\"'vertical'\"\n [openFirstTab]=\"true\"\n ></c8y-tabs-outlet>\n\n <div\n class=\"inner-scroll c8y-top-drawer__tabs-container flex-grow p-l-24 p-r-lg-32 p-r-xs-24 p-r-sm-24\"\n >\n <router-outlet name=\"dashboard-details\"></router-outlet>\n </div>\n </div>\n\n <div class=\"c8y-top-drawer--footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"dashboard-detail--cancel-dashboard\"\n (click)=\"cancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n data-cy=\"dashboard-detail--save-dashboard\"\n (click)=\"save()\"\n [disabled]=\"((dashboardDetailsForm?.invalid || dashboardDetailsForm?.pristine) && this.isEdit) || dashboardDetailService.saveButtonDisabled\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</div>\n","import { Injectable } from '@angular/core';\nimport { DashboardChildrenState } from '../context-dashboard.model';\nimport { cloneDeep } from 'lodash-es';\n\n/**\n * Holds current state of dashboard children during edit mode.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DashboardOriginatorService {\n /**\n * Current dashboard children state name for indicating what change will be undone.\n */\n get currentStateName(): string {\n return this.state?.name;\n }\n /**\n * Current dashboard children state.\n * @private\n */\n private state: DashboardChildrenState;\n /**\n * Initializes dashboard children state on edit mode start.\n * @param state Dashboard children initial state.\n */\n initState(state: DashboardChildrenState): void {\n this.state = state;\n }\n /**\n * Updates dashboard children state when it is changed or restored with undo/redo.\n * @param state Dashboard children updated state.\n */\n setState(state: DashboardChildrenState): void {\n this.state = state;\n }\n /**\n * Returns copy of current state.\n */\n getState(): DashboardChildrenState {\n return cloneDeep(this.state);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DashboardChildrenState } from '../context-dashboard.model';\nimport { DashboardOriginatorService } from './dashboard-originator.service';\n\n/**\n * Caretaker is responsible for undo and redo functionalities.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DashboardCaretakerService {\n /**\n * Current undo stack length for defining undo button disable state.\n */\n get undoStackLength(): number {\n return this.undoStack.length;\n }\n /**\n * Redo stack latest item for defining redo button disable state and its' title.\n */\n get redoStackLastItem(): DashboardChildrenState {\n return this.redoStack[this.redoStack.length - 1];\n }\n /**\n * List of dashboard children changes.\n * @private\n */\n private undoStack: DashboardChildrenState[] = [];\n /**\n * List of dashboard children changes that were undone and can be redone back.\n * @private\n */\n private redoStack: DashboardChildrenState[] = [];\n\n constructor(private originator: DashboardOriginatorService) {}\n /**\n * Adds current dashboard children state to undo stack and clears redo stack.\n */\n backup(): void {\n this.undoStack.push(this.originator.getState());\n this.redoStack = [];\n }\n /**\n * Reverts last dashboard children change and puts it in redo stack.\n * @returns Current state of dashboard children after reverting last change.\n */\n undo(): DashboardChildrenState | undefined {\n if (!this.undoStack.length) {\n return;\n }\n const memento = this.undoStack.pop();\n this.redoStack.push(this.originator.getState());\n\n this.originator.setState(memento);\n return memento;\n }\n /**\n * Applies previously undone change.\n * @returns Current state of dashboard children after applying previously undone change.\n */\n redo(): DashboardChildrenState | undefined {\n if (!this.redoStack.length) {\n return;\n }\n this.undoStack.push(this.originator.getState());\n const memento = this.redoStack.pop();\n\n this.originator.setState(memento);\n return memento;\n }\n /**\n * Clears both undo and redo stack, sets current state as initial state and returns initial state.\n * @returns Initial state of dashboard children.\n */\n reset() {\n const initialItem = this.undoStack[0] || this.originator.getState();\n this.undoStack = [];\n this.redoStack = [];\n this.originator.initState(initialItem);\n return initialItem;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DashboardOriginatorService } from './dashboard-originator.service';\nimport { DashboardCaretakerService } from './dashboard-caretaker.service';\nimport { DashboardChildrenState } from '../context-dashboard.model';\n/**\n * Facade for implementation of Memento design pattern (caretaker, originator). Responsible for undo/redo feature\n * during edit mode of dashboard.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DashboardEditModeService {\n get undoButtonDisabled(): boolean {\n return this.caretaker.undoStackLength === 0;\n }\n /**\n * Current dashboard change name for undo button title.\n */\n get changeToUndoName(): string {\n return this.originator.currentStateName;\n }\n /**\n * Redo stack latest item for defining redo button disable state and its title.\n */\n get redoStackLastItem(): DashboardChildrenState {\n return this.caretaker.redoStackLastItem;\n }\n\n constructor(\n private originator: DashboardOriginatorService,\n private caretaker: DashboardCaretakerService\n ) {}\n /**\n * Initializes dashboard children state on edit mode start.\n * @param state Dashboard children initial state.\n */\n init(state: DashboardChildrenState) {\n this.originator.initState(state);\n }\n /**\n * Saves current state for further undo actions and sets new dashboard children state.\n * @param state Dashboard children updated state.\n */\n newState(state: DashboardChildrenState) {\n this.caretaker.backup();\n this.originator.setState(state);\n }\n /**\n * Returns copy of current state.\n */\n getCurrentState(): DashboardChildrenState {\n return this.originator.getState();\n }\n /**\n * Reverts last dashboard children change.\n * @returns Current state of dashboard children after reverting last change.\n */\n undo(): DashboardChildrenState {\n return this.caretaker.undo();\n }\n /**\n * Applies previously undone change.\n * @returns Current state of dashboard children after applying previously undone change.\n */\n redo(): DashboardChildrenState {\n return this.caretaker.redo();\n }\n /**\n * Resets dashboard children state to initial one and returns initial state.\n * @returns Initial state of dashboard children.\n */\n reset(): DashboardChildrenState {\n return this.caretaker.reset();\n }\n}\n","import { InjectionToken, Injector, Type } from '@angular/core';\nimport {\n ExtensionFactory,\n GenericHookOptions,\n GenericHookType,\n hookGeneric\n} from '@c8y/ngx-components';\n\n/**\n * A hook to add dynamic configurations to any widget configuration.\n * @deprecated Consider using the `hookWidgetConfig` function instead.\n */\nexport const HOOK_WIDGET_CONFIG = new InjectionToken<WidgetConfigSectionDefinition[]>(\n 'HOOK_WIDGET_CONFIG'\n);\n\n/**\n * An extension HOOK can use either a pure value:\n * ```typescript\n * { provide: HOOK_X, useValue: { ...hookValue }, multi: true }\n * ```\n *\n * Or an array to directly register multiple:\n * ```typescript\n * { provide: HOOK_X, useValue: [{ ...hookValue1 }, { ...hookValue2 }], multi: true }\n * ```\n *\n * Or an ExtensionFactory which allows to define a get() function. This function\n * gets called on each navigation with the current route and can return values\n * async (observable or promise).\n * ```typescript\n * { provide: HOOK_X, useFactory: { get: (route) => doSomethingAsync(route) }, multi: true }\n * ```\n */\nexport type WidgetConfigSectionExtension =\n | WidgetConfigSectionDefinition\n | WidgetConfigSectionDefinition[]\n | ExtensionFactory<WidgetConfigSectionDefinition>;\n\n/**\n * A hook to add dynamic components to the UI (e.g. widgets).\n *\n * You can either provide a single `DynamicComponentDefinition` as parameter:\n * ```typescript\n * hookWidgetConfig(...)\n * ```\n *\n * Or an array to directly register multiple:\n * ```typescript\n * hookWidgetConfig([...])\n * ```\n *\n * Or you provide an Service that implements `ExtensionFactory<DynamicComponentDefinition>`\n * ```typescript\n * export class MyDynamicComponentDefinitionFactory implements ExtensionFactory<DynamicComponentDefinition> {...}\n * ...\n * hookWidgetConfig(MyDynamicComponentDefinitionFactory)\n * ```\n * A typed alternative to `HOOK_WIDGET_CONFIG`.\n * @param components The `DynamicComponentDefinition`'s or `ExtensionFactory` to be provided.\n * @returns An `Provider` to be provided in your module.\n */\nexport function hookWidgetConfig<T = Type<any>>(\n components: GenericHookType<WidgetConfigSectionDefinition<T>>,\n options?: Partial<GenericHookOptions>\n) {\n return hookGeneric<WidgetConfigSectionDefinition<T>>(components, HOOK_WIDGET_CONFIG, options);\n}\n\nexport interface WidgetConfigSectionDefinition<T = any> extends WidgetConfigSectionBase<T> {\n /**\n * The dynamic component id this configuration applies to.\n */\n widgetId: string;\n\n /**\n * The component to load.\n */\n loadComponent: () => Promise<Type<T>>;\n}\n\nexport interface WidgetConfigSection<T = Type<any>> extends WidgetConfigSectionBase<T> {\n /**\n * The component to load.\n */\n component: T;\n providers?: Type<unknown>[];\n}\n\nexport interface WidgetConfigSectionBase<T> {\n /**\n * The label to show as headline of the section\n */\n label: string;\n /**\n * The priority. Default settings from hookWidget will have priority 0.\n */\n priority?: number;\n /**\n * Defines if the section should be by default expanded or collapsed.\n */\n expanded?: boolean;\n /**\n * The initial state.\n */\n initialState?: Partial<T>;\n /**\n * The injector to be used.\n */\n injector?: Injector;\n /**\n * Additional providers to be used only in scope of the configuration. If same Providers are\n * provided multiple times, only one is used.\n */\n providers?: Type<unknown>[] | (() => Promise<Type<unknown>[]>);\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n ExtensionPointForPlugins,\n fromTriggerOnce,\n getInjectedHooks,\n PluginsResolveService,\n stateToFactory\n} from '@c8y/ngx-components';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, shareReplay } from 'rxjs/operators';\nimport { HOOK_WIDGET_CONFIG, WidgetConfigSectionDefinition } from './widget-config-hook.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WidgetConfigSectionService extends ExtensionPointForPlugins<WidgetConfigSectionDefinition> {\n constructor(\n rootInjector: Injector,\n private router: Router,\n private plugins: PluginsResolveService\n ) {\n super(rootInjector, plugins);\n this.items$ = this.setupItemsObservable();\n }\n\n get state() {\n return this.state$.value;\n }\n\n add(component: WidgetConfigSectionDefinition) {\n this.state.add(component);\n this.emitNewState();\n }\n\n remove(component: WidgetConfigSectionDefinition) {\n this.state.delete(component);\n this.emitNewState();\n }\n\n protected setupItemsObservable(): Observable<WidgetConfigSectionDefinition[]> {\n return fromTriggerOnce<WidgetConfigSectionDefinition>(\n this.router,\n this.refresh$,\n [\n getInjectedHooks<WidgetConfigSectionDefinition>(HOOK_WIDGET_CONFIG, this.injectors),\n () => this.factories,\n stateToFactory(this.state$)\n ],\n false\n ).pipe(distinctUntilChanged(), shareReplay(1));\n }\n}\n","import { Component, Input, TemplateRef } from '@angular/core';\nimport {\n C8yComponentOutlet,\n ListGroupModule,\n IconDirective,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { WidgetConfigSection } from '../widget-config-hook/widget-config-hook.model';\nimport { CommonModule, NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'c8y-widget-config-section',\n templateUrl: './widget-config-section.component.html',\n standalone: true,\n imports: [\n ListGroupModule,\n C8yComponentOutlet,\n IconDirective,\n NgTemplateOutlet,\n CommonModule,\n C8yTranslatePipe\n ]\n})\nexport class WidgetConfigSectionComponent {\n @Input() section: WidgetConfigSection;\n\n feedbackTemplate: TemplateRef<any>;\n\n setFeedbackTemplate(template: TemplateRef<any>) {\n this.feedbackTemplate = template;\n }\n}\n","<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-grow flex-no-shrink\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n","import { AfterViewInit, Component, inject, TemplateRef, ViewChild } from '@angular/core';\nimport { WidgetConfigSectionComponent } from './widget-config-section.component';\n\n@Component({\n selector: 'c8y-widget-config-feedback',\n templateUrl: './widget-config-feedback.component.html',\n standalone: true,\n imports: [WidgetConfigSectionComponent]\n})\nexport class WidgetConfigFeedbackComponent implements AfterViewInit {\n widgetSection = inject(WidgetConfigSectionComponent);\n @ViewChild(TemplateRef) template: TemplateRef<any>;\n\n ngAfterViewInit(): void {\n this.widgetSection.setFeedbackTemplate(this.template);\n }\n}\n","<ng-template #tpl>\n <ng-content></ng-content>\n</ng-template>\n","import { AsyncPipe, NgClass, NgIf } from '@angular/common';\nimport { Component, inject, Input } from '@angular/core';\nimport { ControlContainer, FormsModule, NgForm } from '@angular/forms';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport {\n AlertService,\n C8yTranslateDirective,\n C8yTranslatePipe,\n IconDirective\n} from '@c8y/ngx-components';\nimport {\n AssetSelectionChangeEvent,\n AssetSelectorModule,\n AssetSelectorOptions\n} from '@c8y/ngx-components/assets-navigator';\nimport { ContextWidgetConfig } from '../context-dashboard.model';\nimport { WidgetConfigService } from '../widget-config.service';\nimport { WidgetConfigFeedbackComponent } from './widget-config-feedback.component';\nimport { WidgetConfigSectionComponent } from './widget-config-section.component';\nimport { gettext } from '@c8y/ngx-components/gettext';\n@Component({\n selector: 'c8y-widget-asset-selector',\n templateUrl: './widget-asset-selector.component.html',\n host: { class: 'bg-level-1' },\n standalone: true,\n imports: [\n AssetSelectorModule,\n AsyncPipe,\n WidgetConfigFeedbackComponent,\n NgIf,\n NgClass,\n C8yTranslatePipe,\n IconDirective,\n FormsModule,\n C8yTranslateDirective\n ],\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\n})\nexport class WidgetAssetSelectorComponent {\n widgetConfigService = inject(WidgetConfigService);\n sectionComponent = inject(WidgetConfigSectionComponent);\n inventoryService = inject(InventoryService);\n alertService = inject(AlertService);\n\n /**\n * If set to true, a device must be selected. Default is true.\n */\n @Input()\n isRequired = true;\n\n /**\n * If set to false, unassigned devices will not be shown in the asset selector.\n */\n @Input()\n showUnassigned: boolean;\n\n /**\n * If set to true, groups will be selectable in the asset selector.\n */\n @Input()\n groupsSelectable: boolean;\n\n /**\n * For advanced usage, the whole asset-selector-component configuration can be passed.\n */\n @Input()\n assetSelectorConfig: AssetSelectorOptions;\n\n /**\n * Defines the selected device.\n */\n @Input()\n selectedDevice: IManagedObject;\n\n /**\n * Template for displaying device names with their IDs.\n * @ignore\n */\n deviceWithIdTpl = gettext('Device {{ id }}');\n\n /**\n * @ignore\n */\n async ngOnInit(): Promise<void> {\n if (this.widgetConfigService.currentConfig.device) {\n try {\n if (this.widgetConfigService.currentConfig.device.self) {\n this.selectedDevice = this.widgetConfigService.currentConfig.device as IManagedObject;\n } else {\n this.selectedDevice = (\n await this.inventoryService.detail(this.widgetConfigService.currentConfig.device.id)\n ).data;\n }\n } catch (ex) {\n // intended empty catch block to handle cases where the device might not be found\n // error messages however will be displayed in the widget config feedback component\n }\n } else if (this.isRequired && !this.hasContext(this.widgetConfigService.currentConfig)) {\n this.sectionComponent.section.expanded = true;\n } else if (this.hasContext(this.widgetConfigService.currentConfig) && this.isRequired) {\n this.selectedDevice = this.widgetConfigService.currentConfig.settings?.context;\n }\n\n this.assetSelectorConfig = {\n view: 'miller',\n groupsSelectable:\n this.groupsSelectable || this.widgetConfigService.currentConfig.settings?.groupsSelectable,\n showChildDevices: true,\n columnHeaders: true,\n showUnassignedDevices: this.showUnassigned ?? true,\n search: !this.widgetConfigService.currentConfig.settings?.context?.additionParents,\n showFilter: true,\n showSelected: false,\n singleColumn: true,\n label: '',\n modelMode: 'full',\n preventInitialSelect: false,\n ...this.assetSelectorConfig\n };\n }\n\n /**\n * Returns true if a context is set.\n * @param value The current configuration of the widget.\n * @returns true if a context is set, false otherwise.\n */\n hasContext(value: ContextWidgetConfig): boolean {\n return value?.settings?.context && Object.keys(value.settings.context).length > 0;\n }\n\n /**\n * Update the configuration of the widget if the selection was changed.\n * @param $event The change event of the selection.\n */\n selectionChanged($event: AssetSelectionChangeEvent): void {\n if ($event.change.isSelected) {\n this.updateConfig($event.change.item);\n }\n }\n\n selectCurrentContext() {\n this.selectedDevice = this.widgetConfigService.currentConfig.settings?.context;\n this.updateConfig(this.selectedDevice);\n }\n\n updateConfig(device: IManagedObject) {\n this.widgetConfigService.updateConfig({ device });\n }\n}\n","<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n <div\n class=\"alert alert-info m-4\"\n *ngIf=\"widgetConfigService.isDeviceTypeDashboard$ | async\"\n >\n <i class=\"fa fa-info-circle m-r-4\"></i>\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n <div\n class=\"p-t-8\"\n *ngIf=\"!isRequired\"\n >\n <p translate>Asset selection is optional for this widget.</p>\n <button\n class=\"btn btn-primary btn-sm m-t-8\"\n *ngIf=\"!selectedDevice\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : { id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n <button\n class=\"btn btn-default btn-sm m-t-8\"\n *ngIf=\"selectedDevice\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n </div>\n </div>\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n *ngIf=\"!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n *ngIf=\"\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n \"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n *ngIf=\"selectedDevice\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n <span\n *ngIf=\"!selectedDevice\"\n translate\n >\n No asset selected\n </span>\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n","import { AsyncPipe } from '@angular/common';\nimport { AfterViewInit, Component, inject, Input, ViewChild } from '@angular/core';\nimport {\n DynamicComponentComponent,\n DynamicComponentDefinition,\n DynamicComponentModule\n} from '@c8y/ngx-components';\nimport { WidgetConfigService } from '../widget-config.service';\n\n@Component({\n standalone: true,\n imports: [AsyncPipe, DynamicComponentModule],\n selector: 'c8y-widget-config-general',\n templateUrl: './widget-config-general.component.html'\n})\nexport class WidgetConfigGeneralComponent implements AfterViewInit {\n widgetConfigService = inject(WidgetConfigService);\n\n @Input()\n definition: DynamicComponentDefinition;\n\n @ViewChild(DynamicComponentComponent)\n dynamicComponent: DynamicComponentComponent;\n\n ngAfterViewInit(): void {\n if (this.dynamicComponent) {\n this.widgetConfigService.selectedComponent$.next(this.dynamicComponent);\n this.widgetConfigService.addOnBeforeSave(() => this.dynamicComponent.callLifeCycleHooks());\n }\n }\n\n ngOnDestroy(): void {\n this.widgetConfigService.selectedComponent$.next(null);\n }\n}\n","<c8y-dynamic-component\n class=\"d-block p-l-16 p-r-16\"\n [componentId]=\"definition.id\"\n mode=\"config\"\n [config]=\"widgetConfigService.assignedCurrentConfig$ | async\"\n></c8y-dynamic-component>\n","import { Injectable, TemplateRef } from '@angular/core';\nimport {\n DynamicComponentComponent,\n DynamicComponentDefinition,\n isPromise,\n sortByPriority\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n from,\n isObservable,\n map,\n merge as rxjsMerge,\n mergeMap,\n Observable,\n of,\n scan,\n shareReplay,\n Subject,\n tap,\n withLatestFrom\n} from 'rxjs';\nimport { merge } from 'lodash-es';\nimport { ContextWidgetConfig } from './context-dashboard.model';\nimport {\n WidgetConfigSection,\n WidgetConfigSectionDefinition\n} from './widget-config-hook/widget-config-hook.model';\nimport { WidgetConfigSectionService } from './widget-config-hook/widget-config-hook.service';\nimport { WidgetAssetSelectorComponent } from './widget-config/widget-asset-selector.component';\nimport { WidgetConfigGeneralComponent } from './widget-config/widget-config-general.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WidgetConfigService {\n private _currentConfig$ = new BehaviorSubject<ContextWidgetConfig>(null);\n private _assignedCurrentConfig$ = new BehaviorSubject<ContextWidgetConfig>(null);\n private _instanceId$ = new BehaviorSubject<string | null>(null);\n private _isDeviceTypeDashboard$ = new BehaviorSubject<boolean>(false);\n\n /**\n * The unique identifier of the current widget instance.\n */\n instanceId$ = this._instanceId$.asObservable();\n\n /**\n * The preview of the currently selected widget. If `null` no preview is shown\n * (except if the selected widget has no configuration).\n */\n preview$ = new BehaviorSubject<true | DynamicComponentDefinition | TemplateRef<any>>(null);\n\n /**\n * The currently selected widget definition.\n */\n selected$ = new BehaviorSubject<DynamicComponentDefinition>(null);\n\n /**\n * The currently selected widget component.\n */\n selectedComponent$ = new BehaviorSubject<DynamicComponentComponent>(null);\n\n /**\n * The current configuration of the selected widget.\n * Only to read the value. Use `updateConfig` to update the configuration.\n **/\n get currentConfig() {\n return this._currentConfig$.value;\n }\n\n /**\n * Indicates if the selected widget is placed on a device type dashboard.\n */\n isDeviceTypeDashboard$ = this._isDeviceTypeDashboard$.asObservable();\n\n /**\n * The current configuration of the selected widget as observable.\n * Only to read the value. Use `updateConfig` to update the configuration.\n */\n currentConfig$ = this._currentConfig$.asObservable();\n\n /**\n * An observable that does not emit on each change. Instead the changes are only assigned.\n * This is used for legacy widgets that rely on mutating the config object.\n *\n * @deprecated Use `currentConfig$` instead.\n */\n assignedCurrentConfig$ = this._assignedCurrentConfig$.asObservable();\n\n /**\n * Returns all the current sections.\n *\n * A configuration section is a component that can be used to configure a widget.\n * Sections should be added via the `hookWidgetConfig`.\n */\n currentSections$: Observable<WidgetConfigSection[]> = this.selected$.pipe(\n tap(() => (this.beforeSaveCallbacks = [])),\n withLatestFrom(this._currentConfig$),\n mergeMap(([selectedWidget, config]) =>\n selectedWidget === null\n ? of([])\n : this.widgetConfigSectionService.items$.pipe(\n map(sections => [\n ...this.getWidgetDefaultSections(selectedWidget, config),\n ...sections.filter(section => section.widgetId === selectedWidget.id)\n ])\n )\n ),\n mergeMap((sections: WidgetConfigSectionDefinition[]) => {\n if (sections.length === 0) {\n return Promise.resolve([]);\n }\n return Promise.all(\n sections.map(async section => ({\n component: await section.loadComponent(),\n label: section.label,\n priority: section.priority || 0,\n expanded: section.expanded || false,\n initialState: section.initialState,\n injector: section.injector,\n providers: Array.isArray(section.providers)\n ? section.providers\n : section.providers\n ? await section.providers()\n : []\n }))\n );\n }),\n map(sections => sortByPriority(sections)),\n shareReplay(1)\n );\n\n /**\n * Returns a list of all unique providers used in the current sections.\n */\n providers$ = this.currentSections$.pipe(\n map(sections => Array.from(new Set(sections.flatMap(section => section.providers || []))))\n );\n\n /**\n * Indicates if the current selected widget has a configuration or not.\n */\n hasConfig$ = this.currentSections$.pipe(map(sections => sections.length > 0));\n\n /**\n * The view state of the preview. Can be one of:\n * - `noPreview`: No preview is shown and an empty state is shown.\n * - `configPreview`: The preview is shown with the view component of the selected widget.\n * - `templatePreview`: The preview is shown with any template passed with setPreview method.\n */\n previewViewState$ = combineLatest([this.hasConfig$, this.preview$]).pipe(\n map(([hasConfig, preview]) => {\n if (preview === null && hasConfig) {\n return 'noPreview';\n } else if (preview instanceof TemplateRef) {\n return 'templatePreview';\n } else if (preview === true || !hasConfig) {\n return 'configPreview';\n }\n })\n );\n\n private readonly STASH_CONFIG_DELAY = 300;\n private configChange$ = new Subject<ContextWidgetConfig>();\n private configChangeReset$ = new Subject<void>();\n\n private beforeSaveCallbacks: ((\n config?: ContextWidgetConfig\n ) => boolean | Promise<boolean> | Observable<boolean>)[] = [];\n\n constructor(private widgetConfigSectionService: WidgetConfigSectionService) {\n const add = value => state => ({ ...state, ...value });\n const clear = () => _state => ({});\n rxjsMerge(this.configChange$.pipe(map(add)), this.configChangeReset$.pipe(map(clear)))\n .pipe(\n scan((state, innerFn) => innerFn(state), {}),\n debounceTime(this.STASH_CONFIG_DELAY)\n )\n .subscribe(config => {\n if (!this._currentConfig$.value) {\n return;\n }\n\n this._currentConfig$.next({ ...this._currentConfig$.value, ...config });\n\n if (!this._assignedCurrentConfig$.value) {\n return;\n }\n Object.assign(this._assignedCurrentConfig$.value, config);\n if (this.selectedComponent$.value) {\n this.selectedComponent$.value.emitConfigChange(this._currentConfig$.value);\n }\n });\n }\n\n /**\n * Use this function to get a typed configuration of the selected widget.\n * @returns The current configuration of the selected widget or an empty object if no config is defined.\n */\n getWidgetConfig<T>(): Observable<T> {\n return this.currentConfig$.pipe(\n map(current => {\n return (current.config || {}) as T;\n })\n );\n }\n\n /**\n * Adds a callback which can check the configuration before saving.\n */\n addOnBeforeSave(\n callback: (config?: ContextWidgetConfig) => boolean | Promise<boolean> | Observable<boolean>\n ) {\n this.beforeSaveCallbacks.push(callback);\n }\n\n /**\n * Returns true if the configuration can be saved.\n */\n canSave(): Promise<boolean> {\n if (this.beforeSaveCallbacks.length === 0) {\n return Promise.resolve(true);\n }\n const config = this._currentConfig$.value;\n return combineLatest(\n this.beforeSaveCallbacks.map(cb => {\n const result = cb(config);\n if (isObservable(result)) {\n return result;\n }\n if (isPromise(result)) {\n return from(result);\n }\n return of(result);\n })\n )\n .pipe(map(results => results.every(result => result === true)))\n .toPromise();\n }\n\n /**\n * Updates the configuration of the selected widget.\n * @param change The change to apply to the configuration.\n * @param force If set to true, the configuration will be updated even if no changes are made.\n * Also concurrency checks are ignored and no change is emitted on the component.\n * Use with caution and only if you want to reset the configuration to some default.\n */\n updateConfig(change: Partial<ContextWidgetConfig>, force = false) {\n if (force) {\n this._currentConfig$.next({ ...this._currentConfig$.value, ...change });\n merge(this._assignedCurrentConfig$.value, change);\n return;\n }\n this.configChange$.next(change);\n }\n\n /**\n * Used to initialize the configuration of the selected widget.\n * @param config The configuration to set.\n */\n initConfig(config: ContextWidgetConfig) {\n this._currentConfig$.next(config);\n this._assignedCurrentConfig$.next(config);\n }\n\n /**\n * Select a widget\n * @param selected The widget to select.\n * @param identifier An optional unique identifier for the widget instance. Only used if the widget is not new.\n * @param isDeviceTypeDashboard Indicates if the selected widget is placed on a device-type dashboard. This is used to determine if the default asset selector should be shown.\n */\n selectWidget(\n selected: DynamicComponentDefinition,\n identifier: string = null,\n isDeviceTypeDashboard = false\n ) {\n this.selected$.next(selected);\n this._instanceId$.next(identifier);\n this._isDeviceTypeDashboard$.next(isDeviceTypeDashboard);\n }\n\n /**\n * Deselect the currently selected.\n */\n deselectWidget() {\n this.selected$.next(null);\n this.preview$.next(null);\n this.configChangeReset$.next();\n this._currentConfig$.next(null);\n this._assignedCurrentConfig$.next(null);\n this._instanceId$.next(null);\n }\n\n /**\n * Enables a preview.\n * @param preview If set to true, the view component of the current widget will be taken to render the preview.\n * If set to a DynamicComponentDefinition, the preview will be rendered with the given component.\n * If set to a TemplateRef, the preview will be rendered with the given template.\n */\n setPreview(preview: true | DynamicComponentDefinition | TemplateRef<any>) {\n this.preview$.next(preview);\n }\n\n /**\n * By default, no sections are added to the configuration. But to ensure\n * backwards compatibility with old plugins, we check if the default asset selector\n * and config section should be shown.\n * @param selectedWidget The currently selected widget.\n * @param config The used widget configuration.\n * @returns The default sections.\n */\n private getWidgetDefaultSections(\n selectedWidget: DynamicComponentDefinition,\n config: ContextWidgetConfig\n ): WidgetConfigSectionDefinition[] {\n const defaultWidgetConfigSections = [];\n if (this.isDefaultSettingSectionNeeded(selectedWidget)) {\n defaultWidgetConfigSections.push({\n widgetId: selectedWidget.id,\n label: gettext('Settings'),\n loadComponent: () => Promise.resolve(WidgetConfigGeneralComponent),\n initialState: {\n definition: selectedWidget\n },\n priority: 0,\n expanded: true\n });\n }\n // Adds a default device selector for old plugins\n if (this.isDefaultDeviceSelectorNeeded(selectedWidget, config)) {\n defaultWidgetConfigSections.push({\n widgetId: selectedWidget.id,\n label: gettext('Asset selection'),\n loadComponent: () => Promise.resolve(WidgetAssetSelectorComponent),\n priority: 100,\n initialState: {\n isRequired:\n !config.settings?.ng1?.options?.deviceTargetNotRequired &&\n !config.settings.deviceTargetNotRequired\n }\n });\n }\n\n return defaultWidgetConfigSections;\n }\n\n /**\n * Sections should not be added by default anymore. But to ensure backwards compatibility, we\n * check if the default selector should be shown. We assume that a default selector will be shown\n * when:\n * 1. The widget has a dynamic component for configuration (which is also deprecated).\n * OR\n * 2. The widget has not disabled the default selector.\n */\n private isDefaultDeviceSelectorNeeded(\n selectedWidget: DynamicComponentDefinition,\n config: ContextWidgetConfig\n ): boolean {\n if (!selectedWidget.loadConfigComponent && !selectedWidget.configComponent) {\n return false;\n }\n return !config.settings?.noDeviceTarget && !config.settings?.ng1?.options?.noDeviceTarget;\n }\n\n /**\n * Checks if a default setting section is needed.\n * @param selectedWidget The currently selected widget.\n * @returns true if one is needed.\n */\n private isDefaultSettingSectionNeeded(selectedWidget: DynamicComponentDefinition) {\n if (selectedWidget.data?.settings?.upgrade) {\n return (\n selectedWidget.data?.settings?.configComponent ||\n selectedWidget.data?.settings?.configTemplateUrl\n );\n }\n return selectedWidget.configComponent || selectedWidget.loadConfigComponent;\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { DASHBOARD_THEME_CLASSES, WIDGET_HEADER_CLASSES } from '../context-dashboard.model';\nimport { C8yTranslatePipe } from '@c8y/ngx-components';\nimport { FormsModule } from '@angular/forms';\nimport { NgForOf, NgIf } from '@angular/common';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\n\n@Component({\n selector: 'c8y-appearance-settings',\n templateUrl: './appearance-settings.component.html',\n standalone: true,\n imports: [NgIf, NgForOf, FormsModule, PopoverModule, C8yTranslatePipe]\n})\nexport class AppearanceSettingsComponent {\n @Input()\n themeClass = 'dashboard-theme-light';\n @Input()\n headerClass = 'panel-title-regular';\n @Input()\n defaultThemeClass: string;\n @Input()\n defaultHeaderClass: string;\n @Input()\n dashboardSettings: boolean;\n @Output()\n themeClassChange = new EventEmitter<string>();\n @Output()\n headerClassChange = new EventEmitter<string>();\n\n @Output()\n onChange = new EventEmitter<void>();\n\n @Input()\n possibleStylingTheme = DASHBOARD_THEME_CLASSES;\n\n @Input()\n possibleStylingHeader = WIDGET_HEADER_CLASSES;\n\n @Input()\n columns: 1 | 3 = 1;\n\n dashboardDefaultLabel = gettext('Dashboard default');\n\n themeClassClick(value) {\n value = this.resetToDefault(value, this.themeClass, this.defaultThemeClass);\n this.themeClass = value;\n this.themeClassChange.emit(value);\n this.onChange.emit();\n }\n\n headerClassClick(value) {\n value = this.resetToDefault(value, this.headerClass, this.defaultHeaderClass);\n this.headerClass = value;\n this.headerClassChange.emit(value);\n this.onChange.emit();\n }\n\n private resetToDefault(value: string, compareTo: string, defaultValue: string) {\n if (defaultValue && value === compareTo) {\n value = defaultValue;\n }\n return value;\n }\n}\n","<div class=\"row\">\n <div class=\"col-lg-{{ 12 / columns }} col-xs-12\">\n <fieldset class=\"c8y-fieldset c8y-fieldset--lg\">\n <legend *ngIf=\"dashboardSettings\">{{ 'Default theme' | translate }}</legend>\n <legend *ngIf=\"!dashboardSettings\">{{ 'Theme' | translate }}</legend>\n <ul class=\"list-group\">\n <li\n class=\"list-group-item d-flex a-i-center p-l-0 p-r-0 fit-w\"\n *ngFor=\"let themeClassItem of possibleStylingTheme; let i = index\"\n >\n <div\n class=\"list-item-checkbox\"\n style=\"max-width: calc(100% - 24px)\"\n >\n <label class=\"c8y-radio\">\n <input\n name=\"content\"\n type=\"radio\"\n [id]=\"'groupradiocontentclass' + i\"\n [value]=\"themeClassItem.class\"\n [ngModel]=\"themeClass\"\n (click)=\"themeClassClick(themeClassItem.class)\"\n />\n <span></span>\n <span\n class=\"text-truncate\"\n title=\"{{ themeClassItem.label | translate }}{{\n themeClassItem.class === defaultThemeClass\n ? ' | ' + (dashboardDefaultLabel | translate)\n : ''\n }}\"\n >\n <span>{{ themeClassItem.label | translate }}</span>\n <br />\n <small\n class=\"text-muted\"\n *ngIf=\"themeClassItem.class === defaultThemeClass\"\n >\n {{ dashboardDefaultLabel | translate }}\n </small>\n </span>\n </label>\n </div>\n\n <button\n class=\"btn-help btn-help--sm m-l-auto\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ themeClassItem.description | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </li>\n </ul>\n </fieldset>\n </div>\n <div class=\"col-lg-{{ 12 / columns }} col-xs-12\">\n <fieldset class=\"c8y-fieldset c8y-fieldset--lg\">\n <legend *ngIf=\"dashboardSettings\">\n {{ 'Default widget header style' | translate }}\n </legend>\n <legend *ngIf=\"!dashboardSettings\">\n {{ 'Widget header style' | translate }}\n </legend>\n <ul class=\"list-group\">\n <li\n class=\"list-group-item d-flex a-i-center p-l-0 p-r-0\"\n *ngFor=\"let headerClassItem of possibleStylingHeader; let i = index\"\n >\n <div\n class=\"list-item-checkbox\"\n style=\"max-width: calc(100% - 24px)\"\n >\n <label class=\"c8y-radio\">\n <input\n name=\"header\"\n type=\"radio\"\n [id]=\"'groupradioheaderclass' + i\"\n [value]=\"headerClassItem.class\"\n [ngModel]=\"headerClass\"\n (click)=\"headerClassClick(headerClassItem.class)\"\n />\n <span></span>\n <span\n class=\"text-truncate\"\n title=\"{{ headerClassItem.label | translate }}{{\n headerClassItem.class === defaultHeaderClass\n ? ' | ' + (dashboardDefaultLabel | translate)\n : ''\n }}\"\n >\n <span>{{ headerClassItem.label | translate }}</span>\n <br />\n <small\n class=\"text-muted\"\n *ngIf=\"headerClassItem.class === defaultHeaderClass\"\n >\n {{ dashboardDefaultLabel | translate }}\n </small>\n </span>\n </label>\n </div>\n <button\n class=\"btn-help btn-help--sm m-l-auto\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ headerClassItem.description | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </li>\n </ul>\n </fieldset>\n </div>\n <ng-content></ng-content>\n</div>\n","import { AsyncPipe, NgFor } from '@angular/common';\nimport { Component, inject } from '@angular/core';\nimport { WidgetConfigSectionComponent } from './widget-config-section.component';\nimport { WidgetConfigService } from '../widget-config.service';\n\n@Component({\n standalone: true,\n imports: [NgFor, WidgetConfigSectionComponent, AsyncPipe],\n selector: 'c8y-widget-config-root',\n templateUrl: './widget-config-root.component.html'\n})\nexport class WidgetConfigRootComponent {\n widgetConfigService = inject(WidgetConfigService);\n}\n","<ng-container\n *ngFor=\"let section of widgetConfigService.currentSections$ | async\"\n>\n <c8y-widget-config-section [section]=\"section\"></c8y-widget-config-section>\n</ng-container>\n","import { CommonModule, NgClass } from '@angular/common';\nimport { Component, Input, inject } from '@angular/core';\nimport { C8yTranslatePipe, CoreModule } from '@c8y/ngx-components';\nimport { WidgetConfigService } from '../widget-config.service';\nimport { WidgetConfigComponent } from '../widget-config.component';\n\n@Component({\n selector: 'c8y-widget-preview',\n templateUrl: './widget-preview.component.html',\n standalone: true,\n imports: [NgClass, C8yTranslatePipe, CommonModule, CoreModule]\n})\nexport class WidgetPreviewComponent {\n widgetConfigService = inject(WidgetConfigService);\n widgetConfig = inject(WidgetConfigComponent);\n\n @Input()\n previewClasses: { [key: string]: boolean } = {\n 'dashboard-theme-light': true,\n 'panel-title-regular': true\n };\n\n get translateWidgetTitle(): boolean {\n return this.widgetConfig?.mo.c8y_Dashboard.translateWidgetTitle ?? false;\n }\n}\n","<fieldset class=\"c8y-fieldset p-l-24 p-r-24 p-t-16 p-b-16\">\n <legend>{{ 'Preview' | translate }}</legend>\n <c8y-dashboard\n class=\"dashboard-preview-slot\"\n [columns]=\"1\"\n [ngClass]=\"previewClasses\"\n >\n <c8y-dashboard-child\n [isFrozen]=\"true\"\n [width]=\"1\"\n [height]=\"6\"\n >\n <c8y-dashboard-child-title>\n <span>\n {{\n (widgetConfigService.selected$ | async)?.data?.title\n | translate: { noTranslateRemoveContext: !translateWidgetTitle }\n }}\n </span>\n </c8y-dashboard-child-title>\n\n @if ((widgetConfigService.previewViewState$ | async) === 'noPreview') {\n <div class=\"fit-h d-flex d-col j-c-center a-i-center\">\n <c8y-ui-empty-state\n [icon]=\"'visibility-off'\"\n [title]=\"'No preview available.' | translate\"\n [subtitle]=\"'This widget does not provide any preview.' | translate\"\n [horizontal]=\"false\"\n ></c8y-ui-empty-state>\n </div>\n }\n\n @if ((widgetConfigService.previewViewState$ | async) === 'configPreview') {\n <c8y-dynamic-component\n [componentId]=\"(widgetConfigService.selected$ | async)?.id\"\n [config]=\"(widgetConfigService.currentConfig$ | async)?.config\"\n ></c8y-dynamic-component>\n }\n\n @if ((widgetConfigService.previewViewState$ | async) === 'templatePreview') {\n <ng-template [ngTemplateOutlet]=\"widgetConfigService.preview$ | async\"></ng-template>\n }\n </c8y-dashboard-child>\n </c8y-dashboard>\n</fieldset>\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { sortBy, cloneDeep, get, omit } from 'lodash-es';\nimport { DynamicComponentService, DynamicComponentDefinition, Widget } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ContextDashboardConfig, CONTEXT_DASHBOARD_CONFIG } from './context-dashboard.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WidgetService {\n widgets: DynamicComponentDefinition[];\n\n constructor(\n private dynamicComponentService: DynamicComponentService,\n private translateService: TranslateService,\n @Optional()\n @Inject(CONTEXT_DASHBOARD_CONFIG)\n public moduleConfig: ContextDashboardConfig | undefined\n ) {\n this.dynamicComponentService.items$.subscribe(widgets => {\n this.widgets = widgets;\n });\n }\n\n async getWidgetDefinition(componentId): Promise<DynamicComponentDefinition> {\n return this.dynamicComponentService.getById(componentId);\n }\n\n getWidgetDefinitions() {\n const translatedComponents = this.widgets.map(cmp => ({\n ...cmp,\n label: this.translateService.instant(cmp.label)\n }));\n\n // cloneDeep and injector lead to a performance issue. We removing the injectors here,\n // as they are not needed, to avoid use of a lot of CPU for cloning.\n const translatedComponentsWithoutInjector = translatedComponents.map(cmp =>\n omit(cmp, 'injector')\n );\n const filterFn: (component: DynamicComponentDefinition) => boolean =\n this.moduleConfig?.widgetFilter ||\n (({ data }) => !(data && data.settings && data.settings.noNewWidgets));\n return cloneDeep(sortBy(translatedComponentsWithoutInjector, 'label').filter(filterFn));\n }\n\n async mapLegacy(widget: Partial<Widget>): Promise<Widget> {\n const cmp = await this.getWidgetDefinition(widget.componentId || widget.name);\n widget = this.mapDisplaySettings(widget, cmp);\n\n if (get(cmp, 'data.settings.upgrade')) {\n widget.widgetComponent = cmp.data.settings.widgetComponent;\n widget.configComponent = cmp.data.settings.configComponent;\n widget.templateUrl = cmp.data.settings.templateUrl;\n widget.configTemplateUrl = cmp.data.settings.configTemplateUrl;\n widget.transformConfigWithContext =\n cmp.data.settings.componentTransformConfigWithContext ||\n cmp.data.settings.transformConfigWithContext ||\n widget.transformConfigWithContext;\n } else {\n delete widget.templateUrl;\n delete widget.configTemplateUrl;\n }\n return widget as Widget;\n }\n\n private mapDisplaySettings(\n widget: Partial<Widget>,\n cmp: DynamicComponentDefinition\n ): Partial<Widget> {\n if (cmp?.data?.displaySettings) {\n widget.config = { displaySettings: cmp.data.displaySettings, ...(widget.config || {}) };\n }\n return widget;\n }\n}\n","import { AsyncPipe, NgFor, NgIf } from '@angular/common';\nimport { AfterContentInit, Component, OnDestroy, ViewChild } from '@angular/core';\nimport { FormsModule, NgForm } from '@angular/forms';\nimport {\n BottomDrawerRef,\n C8yComponentOutlet,\n C8yTranslateDirective,\n C8yTranslatePipe,\n DynamicComponentDefinition,\n EmptyStateComponent,\n FormGroupComponent,\n HighlightComponent,\n IconDirective,\n ProductExperienceDirective,\n RequiredInputPlaceholderDirective,\n ResizableGridComponent,\n Widget,\n WIDGET_CONFIGURATION_GRID_SIZE\n} from '@c8y/ngx-components';\nimport { clone, cloneDeep, escapeRegExp, get, isNull, omit } from 'lodash-es';\nimport { iif, Subject, Subscription, timer } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\nimport {\n ContextDashboardManagedObject,\n ContextWidgetConfig,\n WIDGET_CONTENT_CLASSES,\n WIDGET_HEADER_CLASSES\n} from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { WidgetConfigService } from './widget-config.service';\nimport { AppearanceSettingsComponent } from './widget-config/appearance-settings.component';\nimport { WidgetConfigRootComponent } from './widget-config/widget-config-root.component';\nimport { WidgetPreviewComponent } from './widget-config/widget-preview.component';\nimport { WidgetService } from './widget.service';\n\n@Component({\n selector: 'c8y-widget-config',\n templateUrl: './widget-config.component.html',\n host: { class: 'd-contents' },\n imports: [\n NgIf,\n FormsModule,\n IconDirective,\n NgFor,\n C8yTranslateDirective,\n HighlightComponent,\n EmptyStateComponent,\n FormGroupComponent,\n RequiredInputPlaceholderDirective,\n C8yComponentOutlet,\n WidgetPreviewComponent,\n AppearanceSettingsComponent,\n ProductExperienceDirective,\n C8yTranslatePipe,\n AsyncPipe,\n ResizableGridComponent\n ],\n standalone: true\n})\nexport class WidgetConfigComponent implements AfterContentInit, OnDestroy {\n searchResult: DynamicComponentDefinition[];\n components: DynamicComponentDefinition[];\n selected: DynamicComponentDefinition;\n searchChange$ = new Subject();\n searchTerm = '';\n context: any;\n componentLabel: string;\n widgetTitle: string;\n mo: ContextDashboardManagedObject;\n identifier = crypto.randomUUID();\n styling = {\n headerClass: 'panel-title-regular',\n contentClass: 'panel-content-light'\n };\n defaultStyling = {\n headerClass: 'panel-title-regular',\n contentClass: 'panel-content-light'\n };\n current: any;\n widgetConfig: ContextWidgetConfig;\n isUpgrade = false;\n possibleStyling = { WIDGET_HEADER_CLASSES, WIDGET_CONTENT_CLASSES };\n WIDGET_CONFIGURATION_GRID_SIZE = WIDGET_CONFIGURATION_GRID_SIZE;\n\n @ViewChild('configForm', { static: false })\n configForm: NgForm;\n\n /**\n * Used as wrapper component to inject providers.\n */\n widgetConfigRoot = WidgetConfigRootComponent;\n\n get isEdit() {\n return !!this.current;\n }\n\n get isDeviceTypeDashboard(): boolean {\n return !!this.mo.c8y_Dashboard?.deviceType && !!this.mo.c8y_Dashboard?.deviceTypeValue;\n }\n\n result: Promise<Widget> = new Promise((resolve, reject) => {\n this._save = resolve;\n this._cancel = reject;\n });\n\n private searchSub: Subscription;\n private _save: (value: Widget) => void;\n private _cancel: (reason?: any) => void;\n\n constructor(\n private widgetService: WidgetService,\n private bottomDrawerRef: BottomDrawerRef<WidgetConfigComponent>,\n public contextDashboardService: ContextDashboardService,\n public widgetConfigService: WidgetConfigService\n ) {}\n\n async ngAfterContentInit(): Promise<void> {\n this.components = this.widgetService.getWidgetDefinitions();\n\n if (this.selected) {\n this.current = clone(this.selected);\n this.select(this.selected, this.isEdit ? 'config' : 'select');\n }\n\n this.searchSub = this.searchChange$\n .pipe(\n switchMap((event: KeyboardEvent) => iif(() => event.which !== 13, timer(200), timer(10)))\n )\n .subscribe(() => {\n this.search();\n });\n\n this.setStylings();\n }\n\n isSaveDisabled(): boolean {\n // If new section concept, the widget settings cannot be used to disable the device target.\n // Use the WidgetConfigAssetTargetComponent instead with the initialState set to isRequired.\n const isNewSectionConcept =\n !this.selected?.loadConfigComponent && !this.selected?.configComponent;\n\n return this.configForm?.invalid || (!isNewSectionConcept && this.checkIfDeviceRequired());\n }\n\n checkIfDeviceRequired() {\n const widgetConfig = this.widgetConfigService.currentConfig;\n return (\n !widgetConfig ||\n (!widgetConfig.settings?.deviceTargetNotRequired &&\n !widgetConfig.device &&\n !widgetConfig.settings?.noDeviceTarget)\n );\n }\n\n async save() {\n const canSave = await this.widgetConfigService.canSave();\n if (!canSave) {\n return;\n }\n\n const { _x, _y, _width, _height } = this.selected.data;\n\n if (\n this.widgetConfig &&\n this.widgetConfig.device &&\n // serializing will be handled by resolver\n !this.selected?.resolve?.device\n ) {\n const { id, name } = this.widgetConfig.device;\n this.widgetConfig.device = { id, name };\n }\n\n this.widgetConfig = {\n ...this.widgetConfigService.currentConfig,\n ...this.widgetConfig\n };\n\n const widget = {\n _x,\n _y,\n _width,\n _height,\n config: omit(this.widgetConfig, ['settings', 'displaySettings']),\n title: this.widgetTitle,\n componentId: this.selected.id,\n id: this.isEdit ? this.current.data.id : this.identifier,\n classes: this.getStyle(),\n ...(!this.isEdit ? this.widgetConfig.settings.widgetDefaults : {})\n } as Widget;\n this._save(widget);\n await this.bottomDrawerRef.close();\n this.widgetConfigService.deselectWidget();\n }\n\n select(cmp, mode: 'select' | 'config' = 'config') {\n if (mode === 'config' && this.configForm) {\n const formGroup = this.configForm.control;\n for (const control of Object.keys(formGroup.controls)) {\n formGroup.removeControl(control);\n }\n }\n\n cmp.data = cmp.data || {};\n this.selected = cmp;\n\n this.isUpgrade = !!get(cmp, 'data.settings.upgrade');\n this.contextDashboardService.formDisabled = this.isUpgrade;\n if (this.isEdit) {\n const { id, _x, _y, _width, _height, classes, title } = this.current.data;\n this.selected.data = { ...this.selected.data, _x, _y, _width, _height, classes, title };\n this.identifier = id;\n }\n\n this.widgetConfig = cloneDeep(this.composeWidgetConfig(this.selected, this.context));\n this.selected.data.title = this.selected.data.title || cmp.label;\n this.componentLabel = cmp.label;\n this.widgetTitle = isNull(this.widgetTitle) ? cmp.label : this.selected.data.title;\n\n this.widgetConfigService.initConfig(this.widgetConfig);\n this.widgetConfigService.selectWidget(\n this.selected,\n this.identifier,\n this.isDeviceTypeDashboard\n );\n }\n\n search() {\n if (this.searchTerm.length > 0) {\n this.searchResult = this.components.filter(cmp =>\n new RegExp(escapeRegExp(this.searchTerm.trim()), 'i').test(cmp.label)\n );\n } else {\n this.resetSearch();\n }\n }\n\n resetSearch() {\n this.searchTerm = '';\n this.searchResult = undefined;\n }\n\n backToWidgetSelection() {\n this.selected = null;\n this.widgetTitle = null;\n this.widgetConfigService.deselectWidget();\n }\n\n onWidgetTitleChange(newTitle: string) {\n if (this.selected?.data) {\n this.selected.data.title = newTitle;\n }\n }\n\n async close() {\n this._cancel();\n await this.bottomDrawerRef.close();\n this.widgetConfigService.deselectWidget();\n }\n\n getStyle(isPreview = false) {\n const cssClasses = {};\n if (isPreview || !this.isDashboardDefaultStyle(this.styling.headerClass)) {\n cssClasses[this.styling.headerClass] = true;\n }\n\n if (isPreview || !this.isDashboardDefaultStyle(this.styling.contentClass)) {\n cssClasses[this.styling.contentClass] = true;\n }\n\n if (isPreview) {\n cssClasses[`dashboard-theme-${this.defaultStyling.contentClass.split('-').pop()}`] = true;\n }\n\n return cssClasses;\n }\n\n ngOnDestroy(): void {\n this.contextDashboardService.formDisabled = true;\n if (this.searchSub) {\n this.searchSub.unsubscribe();\n }\n }\n\n private setStylings(): void {\n const dashboardClasses: string[] =\n (this.mo.c8y_Dashboard?.classes && Object.keys(this.mo.c8y_Dashboard.classes)) || [];\n const dashboardWidgetClasses: string[] =\n (this.mo.c8y_Dashboard?.widgetClasses && Object.keys(this.mo.c8y_Dashboard.widgetClasses)) ||\n [];\n const widgetClasses: string[] = this.isEdit ? Object.keys(this.current.data.classes) : [];\n\n this.styling = this.setDefaultStyle([\n ...dashboardClasses,\n ...dashboardWidgetClasses,\n ...widgetClasses\n ]);\n this.defaultStyling = this.setDefaultStyle([...dashboardClasses, ...dashboardWidgetClasses]);\n }\n\n private isDashboardDefaultStyle(className) {\n const allClasses = {\n ...this.mo.c8y_Dashboard.classes,\n ...this.mo.c8y_Dashboard.widgetClasses\n };\n const styles = Object.keys(allClasses).map(cssClass => ({ class: cssClass }));\n const style = this.contextDashboardService.getStyling(\n styles,\n className.split('-').pop(),\n undefined\n );\n return !!style;\n }\n\n private setDefaultStyle(setClasses: string[]) {\n let contentClass = this.styling.contentClass;\n let headerClass = this.styling.headerClass;\n const styles = this.contextDashboardService\n .getFilteredDashboardStyles(setClasses)\n .map(c => c.split('-').pop());\n styles.forEach(styleName => {\n contentClass = this.contextDashboardService.getStyling(\n WIDGET_CONTENT_CLASSES,\n styleName,\n contentClass\n );\n headerClass = this.contextDashboardService.getStyling(\n WIDGET_HEADER_CLASSES,\n styleName,\n headerClass\n );\n });\n\n return { headerClass, contentClass };\n }\n\n private composeWidgetConfig(selectedComponent, context = {}) {\n const setting = {\n settings: {\n ...selectedComponent.data.settings,\n ...get(selectedComponent.data.settings, 'ng1.options'),\n ...get(selectedComponent.data, 'ng1.options'),\n context,\n dashboardMo: this.mo.c8y_Dashboard\n },\n ...selectedComponent.data.config\n } as ContextWidgetConfig;\n return this.applyTargetIfDeviceDashboard(setting);\n }\n\n private applyTargetIfDeviceDashboard(widgetConfig: ContextWidgetConfig) {\n const isDeviceType = this.contextDashboardService.isDeviceType(this.mo);\n const noDeviceTarget = widgetConfig.settings.ng1\n ? widgetConfig.settings.ng1.options.noDeviceTarget\n : widgetConfig.settings.noDeviceTarget;\n\n const needsTargetAndIsDeviceType = isDeviceType && !noDeviceTarget && widgetConfig.device;\n const isNewWidgetWithContext = !this.isEdit && this.context?.id && !noDeviceTarget;\n\n if (needsTargetAndIsDeviceType || isNewWidgetWithContext) {\n widgetConfig.device = {\n id: this.context.id,\n name: this.context.name\n };\n }\n return widgetConfig;\n }\n}\n","<!-- select widget -->\n<ng-container *ngIf=\"!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search…' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n *ngFor=\"let cmp of searchResult || components\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n <ng-container *ngIf=\"!cmp.previewImage; else previewImage\">\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n </ng-container>\n <ng-template #previewImage>\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n </ng-template>\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"' Rephrase your search term.' | translate\"\n *ngIf=\"searchResult && searchResult.length === 0\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n</ng-container>\n\n<!-- widget configuration -->\n<ng-container *ngIf=\"!!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n <div\n class=\"p-t-8\"\n *ngIf=\"selected\"\n >\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n *ngIf=\"!(widgetConfigService.hasConfig$ | async)\"\n ></c8y-ui-empty-state>\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n <ng-container *ngIf=\"widgetConfigService.hasConfig$ | async\">\n <ng-container *ngIf=\"widgetConfigService.providers$ | async as providers\">\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n </ng-container>\n </ng-container>\n </form>\n </div>\n </div>\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</ng-container>\n","import { AsyncPipe } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n HostBinding,\n HostListener,\n Inject,\n input,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { IManagedObject } from '@c8y/client';\nimport {\n ActionBarItemComponent,\n ActionBarService,\n AlertService,\n BottomDrawerService,\n BreadcrumbItem,\n C8yTranslatePipe,\n CopyDashboardDisabledReason,\n DashboardChange,\n DashboardChildChange,\n DashboardChildComponent,\n DashboardCopyPermission,\n DynamicComponentDefinition,\n GainsightService,\n HelpComponent,\n IconDirective,\n memoize,\n ModalService,\n RevertChangeType,\n Status,\n TitleComponent,\n Widget,\n WidgetChange,\n WidgetsDashboardComponent\n} from '@c8y/ngx-components';\nimport { ContextDashboardStateService } from '@c8y/ngx-components/context-dashboard-state';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\nimport { cloneDeep, every, findIndex, kebabCase, keyBy, omit, some } from 'lodash-es';\nimport { PopoverDirective } from 'ngx-bootstrap/popover';\nimport { filter, Subject, Subscription } from 'rxjs';\nimport {\n CanDeactivateComponent,\n CONTEXT_DASHBOARD_CONFIG,\n ContextDashboard,\n ContextDashboardConfig,\n ContextDashboardManagedObject,\n DASHBOARD_CHILDREN_STATE_NAME,\n DashboardChildrenState,\n DashboardHistoryDescription,\n PRODUCT_EXPERIENCE,\n WIDGET_HEADER_CLASSES\n} from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { DashboardDetailComponent } from './dashboard-detail.component';\nimport { DashboardEditModeService } from './memento/dashboard-edit-mode.service';\nimport { WidgetConfigComponent } from './widget-config.component';\nimport { WidgetService } from './widget.service';\n\n/**\n * The context dashboard is a dashboard which resolves it data from the current context (device or group)\n * it is displayed on. It usually uses the route.data for it, but you can pass\n * a different managedObject to the [mo] input parameter to change that behavior.\n */\n@Component({\n selector: 'c8y-context-dashboard',\n templateUrl: './context-dashboard.component.html',\n host: {\n style: `\n display: block;\n `,\n class: 'dashboard c8y-grid-dashboard'\n },\n imports: [\n TitleComponent,\n ActionBarItemComponent,\n PopoverDirective,\n IconDirective,\n HelpComponent,\n DashboardDetailComponent,\n WidgetsDashboardComponent,\n C8yTranslatePipe,\n AsyncPipe\n ]\n})\nexport class ContextDashboardComponent implements OnInit, OnDestroy, CanDeactivateComponent {\n @Input()\n name: string;\n @Input()\n childrenClasses = '';\n @Input()\n context: any;\n @Input()\n setTitle = false;\n\n @Input()\n defaultWidgets: Widget[] = [];\n @Input('canCopy')\n _canCopy = true;\n @Input()\n canDelete = true;\n @Input()\n isLoading = true;\n @Input()\n breadcrumbSettings: BreadcrumbItem;\n @Input()\n showContextHelpButton = true;\n /** Whether to translate widget titles. However, dashboard's own setting takes precedence. It does not override dashboard's setting */\n @Input() translateWidgetTitle: boolean;\n /** Whether to translate dashboard title. However, dashboard's own setting takes precedence. It does not override dashboard's setting */\n @Input() translateDashboardTitle: boolean;\n /**\n * Hides dashboard availability selection.\n */\n @Input()\n hideAvailability = false;\n\n /** Explicitly set the dashboard in `disabled` state, e.g. to create read-only dashboard */\n isDisabled = input<boolean>(false, { alias: 'disabled' });\n\n @HostBinding('class')\n class = '';\n\n @ViewChild(DashboardDetailComponent, { static: true }) dashboardDetails: DashboardDetailComponent;\n @ViewChild(WidgetsDashboardComponent, { static: true })\n widgetsDashboard: WidgetsDashboardComponent;\n isNamedDashboard: boolean;\n\n get disabled(): boolean {\n return (\n !this.hasPermissionToEditDashboard || !this.dashboardDetails?.isCollapsed || this.isDisabled()\n );\n }\n\n widgets: Widget[] = [];\n mo: ContextDashboardManagedObject;\n dashboard: ContextDashboard;\n title: string;\n isCopyDisabled: DashboardCopyPermission;\n isReport: boolean;\n canCopy = true;\n readonly dashboardTypeLabel = gettext('Dashboard for \"{{ dashboardType }}\"');\n readonly dashboardTypePopover = gettext(`\n The layout and configuration of this dashboard is used by all other assets of model type\n <strong>{{ dashboardType }}</strong>. Any changes made to this dashboard instance will be applied to all\n other instances.`);\n private dataSub: Subscription;\n private hasPermissionToEditDashboard = false;\n private destroy$ = new Subject<void>();\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private contextDashboardService: ContextDashboardService,\n private alert: AlertService,\n private renderer: Renderer2,\n @Inject(CONTEXT_DASHBOARD_CONFIG) public moduleConfig: ContextDashboardConfig,\n private widgetService: WidgetService,\n private bottomDrawerService: BottomDrawerService,\n private gainsightService: GainsightService,\n private actionBarService: ActionBarService,\n private translateService: TranslateService,\n private modal: ModalService,\n private destroyRef: DestroyRef,\n public contextDashboardStateService: ContextDashboardStateService<{ [key: string]: any }>,\n public editModeService: DashboardEditModeService\n ) {}\n\n ngOnInit() {\n if (!this.name) {\n this.loadContextDashboard();\n return;\n }\n this.loadNamedDashboard();\n }\n\n ngAfterViewInit() {\n this.widgetsDashboard.editMode$\n .pipe(\n takeUntilDestroyed(this.destroyRef),\n filter(v => v)\n )\n .subscribe(() => {\n this.contextDashboardStateService.resetGlobalState();\n });\n }\n\n @HostListener('window:beforeunload', ['$event'])\n async beforeUnloadHandler($event: BeforeUnloadEvent) {\n const canDeactivate = await this.canDeactivate(true);\n if (!canDeactivate) {\n $event.returnValue = true;\n }\n }\n\n /**\n * Applies the current context to the widget\n * @param widget The widget to apply the context to.\n */\n applyDeviceTarget(widget) {\n if (widget.config.device) {\n widget.config.device = { id: this.context.id, name: this.context.name };\n }\n }\n\n /**\n * Removes the route listener.\n */\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n\n if (this.dataSub) {\n this.dataSub.unsubscribe();\n }\n\n this.contextDashboardStateService.setSelectedDashboard(null);\n }\n /**\n * Guards component from unintended navigation away or closing tab without saving changes.\n * Navigation continues if true is returned, and navigation is cancelled if returned value is false.\n * @param omitConfirm Omits confirm calls inside method body (without this param, when method is used in\n * on 'beforeunload' event handler, error is thrown in console because confirm is blocked by browser anyway and returns false)\n */\n async canDeactivate(omitConfirm = false): Promise<boolean> {\n const canDeactivate =\n (await this.dashboardDetails.canDeactivate(omitConfirm)) &&\n (await this.widgetsDashboard.canDeactivate(omitConfirm));\n\n // Needed in order to reset edit mode, otherwise when switching between dashboards, the edit mode is still enabled.\n if (canDeactivate) {\n await this.cancelEditMode(true);\n }\n return canDeactivate;\n }\n\n /**\n * Restores the dashboard widgets to the default widgets.\n */\n async restore() {\n const mesg = gettext(\n 'You are about to reset the widgets of this dashboard. All changes to the dashboard widgets will get lost and cannot be recovered. Do you want to proceed?'\n );\n\n try {\n await this.modal.confirm(gettext('Reset widgets'), mesg, Status.WARNING, {\n ok: gettext('Reset`dashboard`'),\n cancel: gettext('Cancel')\n });\n\n this.isLoading = true;\n this.mo.c8y_Dashboard.children = this.contextDashboardService.mapWidgets(this.defaultWidgets);\n this.mo.c8y_Dashboard.historyDescription = { changeType: 'reset' };\n await this.contextDashboardService.update(this.mo);\n await this.onLoad();\n\n this.contextDashboardStateService.dashboardSaved.next(this.mo);\n } catch (error) {\n if (error) {\n this.alert.addServerFailure(error);\n }\n } finally {\n this.isLoading = false;\n }\n }\n /**\n * Method called on every widgets dimensions or position change but also for adding new widget (because adding\n * widget causes layout changes). It recognizes what type of change has been done and updates current widgets state\n * accordingly.\n * @param child Change object.\n */\n positionOrWidgetDimensionChange(child: DashboardChildChange | DashboardChange): void {\n const currentState = this.editModeService.getCurrentState()?.children || {};\n const descriptionProp: keyof DashboardHistoryDescription['widgetChanges'] =\n child.children.length === Object.values(currentState).length ? 'arrangement' : 'added';\n let changeName: DashboardChildrenState['name'];\n let widgetsChanged: Widget[];\n if (descriptionProp === 'added') {\n changeName = DASHBOARD_CHILDREN_STATE_NAME.added;\n const addedWidget = child.children.find(c => !currentState[c.data.id]);\n widgetsChanged = [addedWidget.data];\n } else {\n changeName = DASHBOARD_CHILDREN_STATE_NAME.arrangement;\n widgetsChanged = child.children\n .map(c => {\n const lastStateChild = currentState[c.data.id];\n if (\n c.x != lastStateChild._x ||\n c.y != lastStateChild._y ||\n c.width != lastStateChild._width ||\n c.height != lastStateChild._height\n ) {\n return c.data;\n }\n })\n .filter(Boolean);\n }\n\n this.updateDashboardChildren(child, changeName, descriptionProp, widgetsChanged);\n }\n\n async revertChange(revertType: RevertChangeType): Promise<void> {\n let dashboardChildren: ContextDashboard['children'];\n if (revertType === 'undo') {\n dashboardChildren = this.editModeService.undo().children;\n } else {\n dashboardChildren = this.editModeService.redo().children;\n }\n await this.setWidgets(dashboardChildren);\n }\n\n /**\n * Updates all dashboards children's. Useful for position changes on the dashboard.\n * @param child The child to change.\n * @param changeName Name of the change to indicate it on undo/redo button.\n * @param descriptionProp Property to add to dashboard change history.\n * @param widgetsChanged List of changed widgets.\n */\n updateDashboardChildren(\n child: DashboardChildChange | DashboardChange,\n changeName: DashboardChildrenState['name'],\n descriptionProp: keyof DashboardHistoryDescription['widgetChanges'],\n widgetsChanged: Widget[]\n ): void {\n const { children } = child;\n const mappedChildren: { [id: string]: Widget } = keyBy(\n children.map(c => this.componentToWidget(c)),\n 'id'\n );\n this.setNewState(\n { name: changeName, children: mappedChildren },\n descriptionProp,\n widgetsChanged\n );\n }\n\n /**\n * Copies the dashboard and current context to a clipboard.\n */\n async copyDashboard() {\n const viewContext = this.route.parent.snapshot.data?.context;\n\n this.contextDashboardService.copyClipboard = {\n dashboardId: this.mo.id,\n dashboard: cloneDeep(this.mo.c8y_Dashboard),\n context: cloneDeep({ context: viewContext, contextData: this.context })\n };\n\n if (viewContext) {\n const ctx = viewContext.split('/').shift();\n const msg = this.translateService.instant(\n 'Dashboard copied. Navigate to the desired {{ ctx }} and select \"Paste dashboard\"',\n { ctx }\n );\n this.alert.success(msg);\n }\n this.actionBarService.refresh();\n }\n\n editDashboard() {\n const isEdit = !!this.mo.id;\n this.dashboardDetails.show(isEdit);\n }\n\n /**\n * Remove the complete dashboard and navigate away.\n */\n async deleteDashboard() {\n await this.contextDashboardService.delete(this.mo);\n if (this.route.parent) {\n const route = this.route.parent.snapshot.url.map(segment => segment.path).join('/');\n this.router.navigateByUrl(route);\n }\n await this.onDeleteGSEvent();\n }\n\n get isDeviceTypeDashboard(): boolean {\n return !!this.dashboard?.deviceType;\n }\n\n /**\n * Edits a widget on the dashboard.\n * @param change The widget change event.\n */\n async editWidget(change: WidgetChange) {\n const { x, y, width, height } = change.source;\n const component = await this.widgetService.getWidgetDefinition(\n change.widget.name || change.widget.componentId\n );\n if (!component) {\n this.addWidget();\n return;\n }\n await this.addWidget({\n ...component,\n data: { ...component.data, ...change.widget, _x: x, _y: y, _width: width, _height: height }\n });\n }\n\n /**\n * Adds a widget to the dashboard.\n * @param selected Define a selected component to switch to edit mode directly.\n */\n async addWidget(selected?: DynamicComponentDefinition) {\n const partialCloneSelected = selected\n ? { ...selected, data: cloneDeep(selected.data) }\n : selected;\n\n const activeContext = this.context.contextData ? this.context.contextData : this.context;\n const initialState: Partial<WidgetConfigComponent> = {\n mo: this.mo,\n context: this.context.c8y_Report ? {} : activeContext,\n selected: partialCloneSelected\n };\n\n const bottomDrawer = this.bottomDrawerService.openDrawer(WidgetConfigComponent, {\n initialState,\n closeOnNavigation: false,\n disableClickOutside: true\n });\n\n try {\n const newWidget = await bottomDrawer.instance.result;\n if (!this.mo.c8y_Dashboard.children) {\n this.mo.c8y_Dashboard.children = {};\n }\n newWidget.classes = this.mergeWidgetClasses(newWidget);\n await this.updateWidget(newWidget);\n // New state in edit mode is added only for widget update. When adding widget, layout change is always triggered,\n // so it's easier to set new state on layout change only\n if (selected) {\n const children = {\n ...this.editModeService.getCurrentState().children,\n [newWidget.id]: newWidget\n };\n this.setNewState({ name: DASHBOARD_CHILDREN_STATE_NAME.config, children }, 'config', [\n newWidget\n ]);\n }\n } catch (ex) {\n // intended empty\n }\n }\n\n async saveWidgetsToDashboard() {\n const currentState = this.editModeService.getCurrentState();\n\n const editedChildren = currentState.children;\n\n // first-time save (no `id` yet): create the dashboard, then immediately update it with the edited widgets\n if (!this.mo.id) {\n this.mo = await this.contextDashboardService.create(\n this.mo.c8y_Dashboard,\n this.context,\n this.name\n );\n }\n\n this.mo.c8y_Dashboard.children = editedChildren;\n this.mo.c8y_Dashboard.historyDescription = {\n changeType: 'update',\n widgetChanges: this.mapStateToHistoryDescription(currentState.changeHistory)\n };\n\n await this.contextDashboardService.update(this.mo);\n\n this.editModeService.reset();\n this.editModeService.init({\n name: DASHBOARD_CHILDREN_STATE_NAME.initial,\n children: editedChildren,\n changeHistory: {}\n });\n this.isCopyDisabled = this.getDashboardCopyPermissionState();\n\n this.contextDashboardStateService.dashboardSaved.next(this.mo);\n }\n\n async cancelEditMode(onDeactivate = false): Promise<void> {\n const dashboardChildren = this.editModeService.reset();\n if (this.dashboard) {\n this.dashboard.historyDescription = {};\n }\n this.widgetsDashboard.editMode$.next(false);\n if (!onDeactivate) {\n // when setWidgets is called during navigation from device to device, navigation fails\n await this.setWidgets(dashboardChildren.children);\n }\n }\n\n /**\n * Updates a widget or adds a new one if it doesn't exist on\n * the dashboard.\n * @param widget The new widget\n */\n async updateWidget(widget) {\n const index = findIndex(this.widgets, { id: widget.id });\n const isNew = index === -1;\n const mappedWidget = await this.widgetService.mapLegacy(widget);\n if (isNew) {\n this.widgets.push(mappedWidget);\n } else {\n this.widgets.splice(index, 1, mappedWidget);\n }\n }\n\n /**\n * Removes a widget and rearranges the remaining ones\n * if necessary.\n * @param change The change event.\n */\n async deleteWidget(change: WidgetChange) {\n try {\n const { widget, source } = change;\n const removed = this.widgets.find(({ id }) => id === widget.id);\n this.widgets.splice(this.widgets.indexOf(removed), 1);\n\n const { dashboard } = source;\n dashboard.children = dashboard.children.filter(c => c.data.id !== widget.id);\n\n // using setTimeout to give the component the chance to remove it.\n const sleep = timeout => new Promise(resolve => setTimeout(resolve, timeout));\n await sleep(0);\n\n const child = new DashboardChildChange(source);\n child.collapseUpAll();\n this.updateDashboardChildren(child, DASHBOARD_CHILDREN_STATE_NAME.removed, 'removed', [\n widget\n ]);\n } catch (e) {\n this.alert.addServerFailure(e);\n }\n }\n\n /**\n * This is a workaround to ensure that the dragged-element\n * (which is attached to the body) has the right styling.\n */\n addDashboardClassToBody() {\n this.class.split(' ').forEach(cssClass => {\n this.renderer.addClass(document.body, cssClass);\n });\n }\n\n /**\n * This is a workaround to ensure that the dragged-element\n * (which is attached to the body) has the right styling.\n */\n removeDashboardClassFromBody() {\n this.class.split(' ').forEach(cssClass => {\n this.renderer.removeClass(document.body, cssClass);\n });\n }\n\n async onLoad(trackExperience?: boolean) {\n this.isNamedDashboard = this.contextDashboardService.isNamed(this.mo);\n this.hasPermissionToEditDashboard = this.dashboard\n ? await this.contextDashboardService.canEditDashboard(this.mo)\n : false;\n this.canCopy =\n this._canCopy &&\n (this.contextDashboardService.isDeviceDashboard(this.mo) ||\n this.contextDashboardService.isDeviceType(this.mo) ||\n this.contextDashboardService.isGroupDashboard(this.mo));\n const dashboardChildren: ContextDashboard['children'] = cloneDeep(\n this.mo.c8y_Dashboard?.children\n );\n const dashboardClasses = {\n 'c8y-grid-dashboard': true,\n dashboard: true,\n ...this.dashboard?.classes\n };\n this.isCopyDisabled = this.dashboard\n ? this.getDashboardCopyPermissionState()\n : { state: false, reason: null };\n this.editModeService.init({\n name: gettext('Initial state'),\n children: dashboardChildren,\n changeHistory: {}\n });\n\n await this.setWidgets(dashboardChildren, trackExperience);\n this.class = Object.keys(dashboardClasses).join(' ');\n if (this.isReport) {\n this.addReportDashboardSettings();\n }\n this.isLoading = false;\n\n if (!this.dashboard) {\n this.dashboardDetails.show(false);\n } else {\n await this.onLoadGSEvent();\n }\n }\n\n async dashboardPreview(layoutChanges: ContextDashboard) {\n if (layoutChanges?.classes) {\n const dashboardClasses = {\n 'c8y-grid-dashboard': true,\n dashboard: true,\n ...layoutChanges.classes\n };\n this.class = Object.keys(dashboardClasses).join(' ');\n } else if (this.dashboard) {\n this.dashboard.widgetClasses = {\n ...this.dashboard.widgetClasses,\n ...layoutChanges.widgetClasses\n };\n }\n }\n\n async reloadDashboard(dashboardMo: ContextDashboardManagedObject) {\n this.dashboard = dashboardMo.c8y_Dashboard;\n this.mo = dashboardMo;\n await this.onLoad();\n }\n\n private async setWidgets(\n dashboardChildren: ContextDashboard['children'],\n trackExperience = false\n ): Promise<void> {\n const isDeviceType = this.contextDashboardService.isDeviceType(this.mo);\n this.widgets = await Promise.all<Widget>(\n Object.values(dashboardChildren || {}).map(widget => {\n widget.classes = this.mergeWidgetClasses(widget);\n if (isDeviceType) {\n this.applyDeviceTarget(widget);\n }\n if (trackExperience) {\n this.gainsightService.triggerEvent('loadWidget', {\n widgetName: widget.componentId || widget.name\n });\n }\n return this.widgetService.mapLegacy(widget);\n })\n );\n }\n\n private loadContextDashboard() {\n this.dataSub = this.route.data.subscribe(({ dashboard, isReport }) => {\n this.context = this.route.parent.snapshot.data.contextData || {};\n this.title = this.context?.name;\n this.mo = dashboard;\n this.contextDashboardStateService.setSelectedDashboard(this.mo);\n this.dashboard = this.mo.c8y_Dashboard;\n this.isReport = isReport || this.contextDashboardService.isReport(this.mo);\n if (this.isReport && this.dashboard && !this.dashboard?.name) {\n this.dashboard.name = this.title;\n }\n if (this.isReport && this.dashboard) {\n this.dashboard.c8y_IsNavigatorNode = this.context.c8y_IsNavigatorNode;\n }\n this.patchSensorPhoneDashboard(this.dashboard, this.mo.owner, this.context?.type);\n\n this.onLoad(true);\n });\n }\n\n /**\n * To enable translation for widgets within the dashboard, the \"translateWidgetTitle\" flag must be enabled.\n * The property needs to be patched, as the \"Sensor App\" does not provide this setting.\n */\n private patchSensorPhoneDashboard(dashboard: ContextDashboard, owner: string, type: string) {\n if (type === 'c8y_SensorPhone' && owner?.includes('device_phone')) {\n dashboard.translateWidgetTitle = true;\n }\n }\n\n private loadNamedDashboard() {\n this.dataSub = this.contextDashboardService\n .getDashboard(this.name, this.defaultWidgets)\n .subscribe(mo => {\n this.context = this.context || {};\n this.mo = mo;\n this.dashboard = this.mo.c8y_Dashboard;\n this.contextDashboardStateService.setSelectedDashboard(this.mo);\n\n this.onLoad(true);\n });\n }\n\n private mergeWidgetClasses(widget: Widget): Record<string, boolean> {\n const hasHeaderClass = WIDGET_HEADER_CLASSES.find(\n el => widget.classes && widget.classes[el.class]\n );\n const widgetClasses = hasHeaderClass\n ? { ...widget.classes }\n : { ...this.dashboard.widgetClasses, ...widget.classes };\n return {\n card: true,\n 'card-dashboard': true,\n [kebabCase(widget.componentId || widget.name)]: true,\n ...widgetClasses\n };\n }\n\n private componentToWidget(child: DashboardChildComponent) {\n return {\n ...omit(child.data, ['componentTransformConfigWithContext', 'transformConfigWithContext']), // remove legacy\n ...({ _x: child.x, _y: child.y, _width: child.width, _height: child.height } as Widget)\n };\n }\n\n private addReportDashboardSettings() {\n this.setTitle = true;\n this.title = this.context?.name || gettext('New report');\n this.breadcrumbSettings = { icon: 'th', label: 'Reports', path: 'reports' };\n this.canDelete = false;\n }\n\n private getDashboardCopyPermissionState(): DashboardCopyPermission {\n if (!this.contextDashboardService.hasPermissionsToCopyDashboard()) {\n return { state: false, reason: CopyDashboardDisabledReason.PERMISSIONS };\n }\n const allDashboardChildrenAreValid = every(this.mo.c8y_Dashboard.children, child => {\n const config = child.config || {};\n const dataPoints = config.datapoints || [];\n return !(\n (config.device && config.device.id !== this.context.id) ||\n some(dataPoints, dataPoint => dataPoint.__target?.id !== this.context.id)\n );\n });\n if (!allDashboardChildrenAreValid) {\n return { state: false, reason: CopyDashboardDisabledReason.WRONG_REFERENCE };\n }\n return { state: true };\n }\n\n private setNewState(\n state: Pick<DashboardChildrenState, 'name' | 'children'>,\n descriptionProp: keyof DashboardHistoryDescription['widgetChanges'],\n widgetsChanged: Widget[]\n ): void {\n const description = this.getDescriptionForNewState(descriptionProp, widgetsChanged);\n this.editModeService.newState({ ...state, changeHistory: description });\n }\n\n private getDescriptionForNewState(\n descriptionProp: keyof DashboardHistoryDescription['widgetChanges'],\n widgetsChanged: Widget[]\n ): DashboardChildrenState['changeHistory'] {\n const changeHistory = this.editModeService.getCurrentState().changeHistory;\n if (!changeHistory[descriptionProp]) {\n changeHistory[descriptionProp] = {};\n }\n widgetsChanged.forEach(w => {\n if (descriptionProp === 'removed' && changeHistory.added?.[w.id]) {\n // if widget was added during current edit session and then removed, it should not be at description at all\n delete changeHistory.added[w.id];\n if (changeHistory.config?.[w.id]) {\n delete changeHistory.config[w.id];\n }\n if (changeHistory.arrangement?.[w.id]) {\n delete changeHistory?.arrangement[w.id];\n }\n } else if (\n (descriptionProp === 'config' || descriptionProp === 'arrangement') &&\n changeHistory.added?.[w.id]\n ) {\n // if widget was added and then modified in current edit session, it should only be indicated as added\n } else {\n changeHistory[descriptionProp][w.id] = w;\n }\n });\n\n return changeHistory;\n }\n\n private mapStateToHistoryDescription(\n description: DashboardChildrenState['changeHistory']\n ): DashboardHistoryDescription['widgetChanges'] {\n const historyDescription: DashboardHistoryDescription['widgetChanges'] = {};\n for (const [key, value] of Object.entries(description)) {\n const widgets = Object.values(value);\n if (!widgets.length) {\n continue;\n }\n historyDescription[key] = Object.values(value).map(widget => widget.title);\n }\n return historyDescription;\n }\n\n private async onDeleteGSEvent() {\n const parentName = await this.convertStringToHash(this.context?.name);\n const dashboardName = await this.convertStringToHash(this.dashboard?.name);\n\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DELETE_DASHBOARD,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,\n name: dashboardName,\n id: this.mo.id,\n nameId: `${dashboardName}_${this.mo.id}`,\n isDashboardTemplate: this.mo.c8y_Dashboard.deviceType,\n parentAssetId: this.context?.id ? this.context.id : 'noContext',\n parentAssetName: this.context?.id ? parentName : 'noContext',\n parentAssetType: this.context?.id ? this.context.type : 'noContext',\n parentAssetNameId: this.context?.id ? `${parentName}_${this.context.id}` : 'noContext',\n parentAssetNameDashboardName: this.context?.id\n ? `${parentName}_${dashboardName}`\n : 'noContext',\n parentAssetIdDashboardId: this.context?.id ? `${this.context.id}_${this.mo.id}` : 'noContext',\n parentAssetNameDashboardId: this.context?.id ? `${parentName}_${this.mo.id}` : 'noContext',\n parentAssetNameIdDashboardNameId: this.context?.id\n ? `${parentName}_${this.context.id}_${dashboardName}_${this.mo.id}`\n : 'noContext',\n dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,\n context: this.contextDashboardService.getContextForGS(this.context)\n });\n }\n\n private async onLoadGSEvent() {\n const parentName = await this.convertStringToHash(this.context?.name);\n const dashboardName =\n (await this.convertStringToHash(this.dashboard?.name)) ??\n this.extractDefaultDashboardName(this.mo) ??\n 'none';\n\n this.gainsightService.triggerEvent(\n this.isReport\n ? PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS\n : PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS,\n {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_VIEW,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.LOAD,\n name: dashboardName,\n id: this.mo.id,\n isDashboardTemplate: this.mo.c8y_Dashboard.deviceType,\n nameId: `${dashboardName}_${this.mo.id}`,\n parentAssetId: this.context?.id ? this.context.id : 'noContext',\n parentAssetName: this.context?.id ? parentName : 'noContext',\n parentAssetType: this.context?.id ? this.context.type : 'noContext',\n parentAssetNameId: this.context?.id ? `${parentName}_${this.context.id}` : 'noContext',\n parentAssetNameDashboardName: this.context?.id\n ? `${parentName}_${dashboardName}`\n : 'noContext',\n parentAssetIdDashboardId: this.context?.id\n ? `${this.context.id}_${this.mo.id}`\n : 'noContext',\n parentAssetNameDashboardId: this.context?.id ? `${parentName}_${this.mo.id}` : 'noContext',\n parentAssetNameIdDashboardNameId: this.context?.id\n ? `${parentName}_${this.context.id}_${dashboardName}_${this.mo.id}`\n : 'noContext',\n dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,\n context: this.isReport\n ? PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT\n : this.contextDashboardService.getContextForGS(this.context)\n }\n );\n }\n\n private extractDefaultDashboardName(obj: IManagedObject): string | null {\n const nameKey = Object.keys(obj).find(key => key.startsWith('c8y_Dashboard!name!'));\n if (nameKey) {\n return nameKey.split('!').pop();\n }\n return null;\n }\n\n @memoize()\n private async convertStringToHash(str: string) {\n if (!str) {\n return null;\n }\n return (await this.gainsightService.shouldSendPiiData())\n ? str\n : this.gainsightService.hashGroupName(str);\n }\n}\n","@if (title) {\n <c8y-title>\n {{ title }}\n </c8y-title>\n}\n\n@if (dashboard?.deviceType && dashboard.deviceTypeValue) {\n <c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"10000\"\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\n@if (defaultWidgets.length > 0) {\n <c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-1\"\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 || !mo?.id || (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\n@if (showContextHelpButton) {\n <c8y-help src=\"/docs/cockpit/working-with-dashboards/#working-with-dashboards\"></c8y-help>\n}\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 [isNamedDashboard]=\"isNamedDashboard\"\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 [isSaveDisabled]=\"contextDashboardStateService.isSaveDisabled | async\"\n [settings]=\"{\n isLoading: isLoading,\n isDisabled: disabled,\n canDelete: canDelete && !!dashboard,\n translateWidgetTitle: dashboard?.translateWidgetTitle ?? translateWidgetTitle,\n translateDashboardTitle: dashboard?.translateDashboardTitle ?? translateDashboardTitle,\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)=\"editDashboard()\"\n (onCopyDashboard)=\"copyDashboard()\"\n (onDeleteDashboard)=\"deleteDashboard()\"\n></c8y-widgets-dashboard>\n","import { inject, Injectable } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { ContextRouteService, Tab, TabFactory, ViewContext } from '@c8y/ngx-components';\nimport {\n DASHBOARD_DETAILS_OUTLET,\n DASHBOARD_DETAILS_TABS_OUTLET_NAME,\n DashboardDetailsTabId\n} from './context-dashboard.model';\nimport { ActivatedRoute } from '@angular/router';\n\n@Injectable()\nexport class DashboardDetailsTabsFactory implements TabFactory {\n private activatedRoute = inject(ActivatedRoute);\n private contextRouteService = inject(ContextRouteService);\n private generalTab: Tab = {\n label: gettext('General'),\n featureId: DashboardDetailsTabId.GENERAL,\n icon: 'imac-settings',\n priority: 100,\n path: [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: DashboardDetailsTabId.GENERAL\n }\n }\n ],\n tabsOutlet: DASHBOARD_DETAILS_TABS_OUTLET_NAME\n };\n\n private appearanceTab: Tab = {\n label: gettext('Appearance'),\n featureId: DashboardDetailsTabId.APPEARANCE,\n icon: 'web-design',\n priority: 50,\n path: [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: DashboardDetailsTabId.APPEARANCE\n }\n }\n ],\n tabsOutlet: DASHBOARD_DETAILS_TABS_OUTLET_NAME\n };\n private versionHistoryTab: Tab = {\n label: gettext('Version history'),\n featureId: DashboardDetailsTabId.VERSIONHISTORY,\n icon: 'versions',\n priority: 10,\n path: [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: DashboardDetailsTabId.VERSIONHISTORY\n }\n }\n ],\n tabsOutlet: DASHBOARD_DETAILS_TABS_OUTLET_NAME\n };\n\n get() {\n const rootContext = this.contextRouteService.getRootContextOfChild(this.activatedRoute);\n if (rootContext === ViewContext.Dashboard) {\n return [this.generalTab, this.appearanceTab, this.versionHistoryTab];\n }\n return [];\n }\n}\n","import { Component, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n ViewContext,\n IconDirective,\n C8yTranslateDirective,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { DashboardContext } from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\n\n@Component({\n selector: 'c8y-paste-dashboard-action',\n template: `\n <ng-template #templatePaste>\n <li>\n <button\n class=\"btn btn-link\"\n title=\"{{ buttonTitle | translate }}\"\n type=\"button\"\n (click)=\"pasteDashboard()\"\n [disabled]=\"pasteDisabled\"\n >\n <i class=\"m-r-4\" c8yIcon=\"clipboard\"></i>\n <span ngNonBindable translate [translateParams]=\"{ dashboardName: dashboardName }\">\n Paste dashboard \"{{ dashboardName }}\"\n </span>\n </button>\n </li>\n </ng-template>\n `,\n imports: [IconDirective, C8yTranslateDirective, C8yTranslatePipe]\n})\nexport class PasteDashboardActionComponent implements OnInit {\n pasteDisabled = false;\n @ViewChild('templatePaste', { read: TemplateRef, static: true }) templatePaste;\n dashboardName = '';\n buttonTitle: string;\n private currentViewContext: ViewContext;\n private currentUrl: string;\n private contextMO: IManagedObject;\n private contextId: string;\n\n constructor(\n private vcRef: ViewContainerRef,\n private router: Router,\n private contextDashboardService: ContextDashboardService,\n private inventoryService: InventoryService\n ) {}\n\n async ngOnInit() {\n this.currentUrl = this.router.url;\n this.contextId = this.currentUrl.match(/\\d+/)[0];\n\n const isDevice: boolean = new RegExp(/device\\/\\d+/).test(this.currentUrl);\n const isGroup: boolean = new RegExp(/group\\/\\d+/).test(this.currentUrl);\n this.currentViewContext = isDevice ? ViewContext.Device : isGroup ? ViewContext.Group : null;\n await this.checkIfPasteIsAllowed();\n\n this.vcRef.createEmbeddedView(this.templatePaste);\n const clipboard = this.contextDashboardService.copyClipboard;\n if (clipboard) {\n this.dashboardName = clipboard.dashboard.name;\n }\n }\n\n async pasteDashboard() {\n if (!this.contextMO) {\n this.contextMO = await this.getContextMo(this.contextId);\n }\n const context: DashboardContext = {\n context: this.currentViewContext,\n contextData: this.contextMO\n };\n\n await this.contextDashboardService.pasteDashboard(context);\n }\n\n private async getContextMo(id: string): Promise<IManagedObject> {\n return (await this.inventoryService.detail(id)).data;\n }\n\n private async checkIfPasteIsAllowed(): Promise<void> {\n const clipboardViewContext = this.contextDashboardService.copyClipboard.context.context;\n const isTypeDashboard = this.contextDashboardService.copyClipboard?.dashboard?.deviceType;\n\n if (this.currentViewContext !== clipboardViewContext) {\n if (clipboardViewContext === ViewContext.Device) {\n this.buttonTitle = gettext('Device dashboards can only be copied into a device.');\n } else if (clipboardViewContext === ViewContext.Group) {\n this.buttonTitle = gettext('Group dashboards can only be copied into a group.');\n }\n this.pasteDisabled = true;\n return;\n } else if (isTypeDashboard) {\n this.contextMO = await this.getContextMo(this.contextId);\n const dashboardDeviceType =\n this.contextDashboardService.copyClipboard.dashboard.deviceTypeValue;\n if (dashboardDeviceType === this.contextMO.type) {\n this.buttonTitle = gettext(\n 'Dashboard template can only be copied into assets of a different type.'\n );\n this.pasteDisabled = true;\n return;\n }\n }\n\n this.buttonTitle = gettext('Paste dashboard');\n this.pasteDisabled = false;\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { InventoryService } from '@c8y/client';\nimport { ContextDashboardManagedObject } from '../context-dashboard.model';\nimport { AlertService, C8yTranslatePipe, DatePipe } from '@c8y/ngx-components';\nimport { NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-type-dashboard-info',\n templateUrl: './type-dashboard-info.component.html',\n standalone: true,\n imports: [C8yTranslatePipe, DatePipe, NgIf]\n})\nexport class TypeDashboardInfoComponent implements OnInit {\n @Input() deviceTypeValue: string;\n @Input() displayDeviceTypeValue: string;\n @Input() context: ContextDashboardManagedObject;\n deviceTypeInstancesCount: number;\n @Input() asyncRenderSuccess: () => void;\n @Input() asyncRenderFail: () => void;\n\n constructor(\n private inventory: InventoryService,\n private alert: AlertService\n ) {}\n\n async ngOnInit() {\n await this.updateDeviceTypeCount();\n }\n\n private async updateDeviceTypeCount(): Promise<void> {\n try {\n const count = await this.inventory.count({\n type: this.deviceTypeValue || this.context.c8y_Dashboard.deviceTypeValue\n });\n this.deviceTypeInstancesCount = count.data;\n this.asyncRenderSuccess?.();\n } catch (error) {\n this.alert.addServerFailure(error);\n this.asyncRenderFail?.();\n }\n }\n}\n","<ul class=\"list-unstyled small animated fadeIn\">\n <li class=\"p-t-4 p-b-4 d-flex separator-top-bottom text-nowrap\">\n <label class=\"small m-b-0 m-r-8\">{{ 'Target asset model' | translate }}</label>\n <span class=\"m-l-auto\">\n <span class=\"label label-info\">\n {{ displayDeviceTypeValue || context.c8y_Dashboard.deviceTypeValue }}\n </span>\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\">\n <label class=\"small m-b-0 m-r-8\">{{ 'Dashboard instances' | translate }}</label>\n <span class=\"m-l-auto\">{{ deviceTypeInstancesCount }}</span>\n </li>\n <ng-container *ngIf=\"context?.c8y_Dashboard\">\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\">\n <label class=\"small m-b-0 m-r-8\">{{ 'Created' | translate }}</label>\n <span class=\"m-l-auto\">\n {{ context.creationTime | c8yDate }} {{ 'by`user`' | translate }} {{ context.owner }}\n </span>\n </li>\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\"\n *ngIf=\"context?.c8y_DashboardHistory?.length\"\n >\n <label class=\"small m-b-0 m-r-8\">{{ 'Last modified' | translate }}</label>\n <span class=\"m-l-auto\">\n {{ context.c8y_DashboardHistory[0].created | c8yDate }} {{ 'by`user`' | translate }}\n {{ context.c8y_DashboardHistory[0].author }}\n </span>\n </li>\n </ng-container>\n</ul>\n","import { Component, inject, TemplateRef, ViewChild } from '@angular/core';\nimport { WidgetConfigService } from '../widget-config.service';\n\n@Component({\n selector: 'c8y-widget-preview-wrapper',\n template: '<ng-template #previewContent><ng-content></ng-content></ng-template>',\n standalone: true,\n imports: []\n})\nexport class WidgetPreviewWrapperComponent {\n widgetConfigService = inject(WidgetConfigService);\n\n @ViewChild('previewContent')\n set previewSet(template: TemplateRef<any>) {\n if (template) {\n this.widgetConfigService.setPreview(template);\n return;\n }\n this.widgetConfigService.setPreview(null);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CoreModule, hookRoute, hookTab, ViewContext } from '@c8y/ngx-components';\nimport { AssetSelectorModule } from '@c8y/ngx-components/assets-navigator';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { CollapseModule } from 'ngx-bootstrap/collapse';\nimport { BsDropdownModule } from 'ngx-bootstrap/dropdown';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { AddDashboardComponent } from './add-dashboard.component';\nimport { ContextDashboardComponent } from './context-dashboard.component';\nimport {\n CONTEXT_DASHBOARD_CONFIG,\n ContextDashboardConfig,\n DASHBOARD_DETAILS_OUTLET,\n DashboardDetailsTabId\n} from './context-dashboard.model';\nimport { DashboardDetailComponent } from './dashboard-detail.component';\nimport { DashboardDetailsTabsFactory } from './dashboard-details-tabs.factory';\nimport { PasteDashboardActionComponent } from './paste-dashboard-action.component';\nimport { TypeDashboardInfoComponent } from './type-dashboard-info/type-dashboard-info.component';\nimport { WidgetConfigComponent } from './widget-config.component';\nimport { AppearanceSettingsComponent } from './widget-config/appearance-settings.component';\nimport { WidgetConfigSectionComponent } from './widget-config/widget-config-section.component';\nimport { WidgetPreviewComponent } from './widget-config/widget-preview.component';\nimport { WidgetPreviewWrapperComponent } from './widget-config/widget-preview-wrapper.component';\n\nconst defaultConfig = {\n allowFullscreen: true\n} as const satisfies ContextDashboardConfig;\n\n/**\n * Module for the Context Dashboard feature.\n * This module provides components and configurations for managing dashboards,\n * {@link ContextDashboardComponent} is the main component for displaying the dashboard context.\n * {@link WidgetConfigComponent} allows for configuring widgets within the dashboard.\n * {@link DashboardDetailComponent} provides detailed views of individual dashboards.\n */\n@NgModule({\n imports: [\n CoreModule,\n TooltipModule,\n PopoverModule,\n AssetSelectorModule,\n IconSelectorModule,\n BsDropdownModule.forRoot(),\n CollapseModule.forRoot(),\n RouterModule,\n AppearanceSettingsComponent,\n TypeDashboardInfoComponent,\n WidgetPreviewComponent,\n WidgetConfigSectionComponent,\n WidgetPreviewWrapperComponent,\n ContextDashboardComponent,\n WidgetConfigComponent,\n DashboardDetailComponent,\n AddDashboardComponent,\n PasteDashboardActionComponent\n ],\n exports: [\n ContextDashboardComponent,\n WidgetConfigComponent,\n DashboardDetailComponent,\n TypeDashboardInfoComponent,\n WidgetConfigSectionComponent,\n AppearanceSettingsComponent,\n WidgetPreviewWrapperComponent\n ],\n providers: [\n {\n provide: CONTEXT_DASHBOARD_CONFIG,\n useValue: defaultConfig\n },\n hookTab(DashboardDetailsTabsFactory),\n hookRoute([\n {\n path: DashboardDetailsTabId.GENERAL,\n loadComponent: () =>\n import('./dashboard-settings/dashboard-general-settings.component').then(\n m => m.DashboardGeneralSettingsComponent\n ),\n outlet: DASHBOARD_DETAILS_OUTLET,\n context: ViewContext.Dashboard\n },\n {\n path: DashboardDetailsTabId.APPEARANCE,\n loadComponent: () =>\n import('./dashboard-settings/dashboard-appearance-settings.component').then(\n m => m.DashboardAppearanceSettingsComponent\n ),\n outlet: DASHBOARD_DETAILS_OUTLET,\n context: ViewContext.Dashboard\n },\n {\n path: DashboardDetailsTabId.VERSIONHISTORY,\n loadComponent: () =>\n import('./dashboard-settings/dashboard-version-history.component').then(\n m => m.DashboardVersionHistoryComponent\n ),\n outlet: DASHBOARD_DETAILS_OUTLET,\n context: ViewContext.Dashboard\n }\n ])\n ]\n})\nexport class ContextDashboardModule {\n static config(config: ContextDashboardConfig = {}): ModuleWithProviders<ContextDashboardModule> {\n return {\n ngModule: ContextDashboardModule,\n providers: [\n {\n provide: CONTEXT_DASHBOARD_CONFIG,\n useValue: { ...defaultConfig, ...config }\n },\n hookRoute(config.routes || [])\n ]\n };\n }\n}\n","import { inject } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ViewContext, ActionBarFactory, ActionBarItem } from '@c8y/ngx-components';\nimport { Observable } from 'rxjs';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { PasteDashboardActionComponent } from './paste-dashboard-action.component';\n\nexport abstract class DashboardActionBarFactory implements ActionBarFactory {\n protected abstract targetContext: ViewContext.Device | ViewContext.Group;\n routeChanges$: Observable<any>;\n\n private contextDashboardService = inject(ContextDashboardService);\n\n get(activeRoute: ActivatedRoute) {\n const actions = [];\n const data =\n !activeRoute.parent || activeRoute.snapshot.data.context\n ? activeRoute.snapshot.data\n : activeRoute.parent.snapshot.data;\n const { contextData } = data;\n const canPaste =\n contextData &&\n data.context === this.targetContext &&\n this.contextDashboardService.copyClipboard;\n\n if (canPaste) {\n actions.push({\n priority: -10,\n placement: 'more',\n template: PasteDashboardActionComponent\n } as ActionBarItem);\n }\n\n return actions;\n }\n}\n","import { AsyncPipe } from '@angular/common';\nimport { Component, inject, ViewChild } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { InventoryService } from '@c8y/client';\nimport { ContextData, PreviewService, TitleComponent, Widget } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\nimport { from, Subscription } from 'rxjs';\nimport { map, mergeMap, tap, toArray } from 'rxjs/operators';\nimport { ContextDashboardComponent } from '../context-dashboard.component';\nimport { CanDeactivateComponent } from '../context-dashboard.model';\nimport { WidgetService } from '../widget.service';\n\n@Component({\n selector: 'c8y-device-info-dashboard-dashboard',\n templateUrl: './device-info-dashboard.component.html',\n imports: [TitleComponent, ContextDashboardComponent, AsyncPipe]\n})\nexport class DeviceInfoDashboardComponent implements CanDeactivateComponent {\n isLoading = true;\n title: string;\n dashboardName = '';\n widgetsList: Widget[];\n currentContext: ContextData;\n contextSubscription: Subscription;\n widgetsSubscription: Subscription;\n @ViewChild(ContextDashboardComponent, { static: false })\n contextDashboard: ContextDashboardComponent;\n protected readonly previewFeatureService = inject(PreviewService);\n protected readonly previewEnabled$ =\n this.previewFeatureService.getState$('ui.dm-dashboard-manager');\n\n DEVICE_INFO_WIDGETS = [\n {\n name: 'deviceStatusWidget',\n title: gettext('Device status'),\n _x: 0,\n _y: 0,\n _height: 5,\n _width: 8\n },\n {\n name: 'Data points graph',\n title: gettext('Device and communication'),\n _x: 8,\n _y: 0,\n _height: 5,\n _width: 16,\n config: {\n interval: 'hours',\n aggregation: 'NONE',\n realtime: true,\n datapointsInitialDisplayLimit: 3,\n datapoints: [\n {\n fragment: 'c8y_Battery',\n series: 'level',\n label: this.translateService.instant('Battery: level'),\n unit: '%',\n renderType: 'min',\n lineType: 'line',\n color: '#5e07b3',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'rssi',\n label: this.translateService.instant('Signal: RSSI'),\n unit: 'dBm',\n renderType: 'min',\n lineType: 'line',\n color: '#a7d0f1',\n __active: true\n },\n {\n fragment: 'c8y_MemoryMeasurement',\n series: 'Used',\n label: this.translateService.instant('Memory: used'),\n unit: 'MB',\n renderType: 'min',\n lineType: 'line',\n color: '#f75229',\n __active: true\n },\n {\n fragment: 'c8y_CPUMeasurement',\n series: 'Workload',\n label: this.translateService.instant('CPU: workload'),\n unit: '%',\n renderType: 'min',\n lineType: 'line',\n color: '#b24f3e',\n __active: true\n },\n {\n fragment: 'c8y_NetworkStatistics',\n series: 'Upload',\n label: this.translateService.instant('Network: upload'),\n unit: 'KB/s',\n renderType: 'min',\n lineType: 'line',\n color: '#88c039',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RCSP',\n label: this.translateService.instant('Signal: RCSP'),\n renderType: 'min',\n lineType: 'line',\n color: '#5e2f19',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RSCP',\n label: this.translateService.instant('Signal: RSCP'),\n renderType: 'min',\n lineType: 'line',\n color: '#5e2f19',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RSRP',\n label: this.translateService.instant('Signal: RSRP'),\n renderType: 'min',\n lineType: 'line',\n color: '#43ba3b',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RSRQ',\n label: this.translateService.instant('Signal: RSRQ'),\n renderType: 'min',\n lineType: 'line',\n color: '#14b0b3',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'ber',\n label: this.translateService.instant('Signal: BER'),\n unit: '%',\n renderType: 'min',\n lineType: 'line',\n color: '#44ff33',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'ECN0',\n label: this.translateService.instant('Signal: ECN0'),\n renderType: 'min',\n lineType: 'line',\n color: '#873efa',\n __active: true\n },\n {\n fragment: 'c8y_NetworkStatistics',\n series: 'Download',\n label: this.translateService.instant('Network: download'),\n unit: 'KB/s',\n renderType: 'min',\n lineType: 'line',\n color: '#f27a45',\n __active: true\n },\n {\n fragment: 'c8y_MemoryMeasurement',\n series: 'Total',\n label: this.translateService.instant('Memory: total'),\n unit: 'MB',\n renderType: 'min',\n lineType: 'line',\n color: '#dadd8c',\n __active: true\n }\n ],\n alarmsEventsConfigs: [\n {\n label: 'c8y_LocationUpdate',\n timelineType: 'EVENT',\n color: '#6f6cd0',\n filters: {\n type: 'c8y_LocationUpdate'\n },\n __active: true\n },\n {\n label: 'c8y_UnavailabilityAlarm',\n timelineType: 'ALARM',\n color: '#375bf2',\n filters: {\n type: 'c8y_UnavailabilityAlarm'\n },\n __active: true\n }\n ]\n }\n },\n {\n name: 'Asset Properties',\n title: gettext('Device data'),\n config: {\n options: {\n properties: [\n {\n id: 'c8ySchema!!id',\n __active: true,\n keyPath: ['id'],\n type: 'string',\n label: 'ID'\n },\n {\n id: 'c8ySchema!!name',\n __active: true,\n keyPath: ['name'],\n type: 'string',\n label: 'Name'\n },\n {\n id: 'c8ySchema!!type',\n __active: true,\n keyPath: ['type'],\n type: 'string',\n label: 'Type'\n },\n {\n id: 'c8ySchema!!lastUpdated',\n __active: true,\n keyPath: ['lastUpdated'],\n type: 'string',\n label: 'Last Updated'\n },\n {\n id: 'c8ySchema!!creationTime',\n __active: true,\n keyPath: ['creationTime'],\n type: 'string',\n label: 'Creation Time'\n }\n ],\n allowDisplayAndEditKnownProperties: false,\n hiddenPropertiesKeyPaths: ['owner']\n }\n },\n _x: 0,\n _y: 5,\n _height: 8,\n _width: 8\n },\n {\n name: 'Alarm list',\n title: gettext('Active, critical alarms'),\n _x: 8,\n _y: 5,\n _height: 4,\n _width: 8,\n config: {\n widgetId: 'Asset Alarms',\n displayMode: 'config',\n aggregation: null,\n isAutoRefreshEnabled: true,\n refreshInterval: 30_000,\n refreshOption: 'live',\n dateTimeContext: {\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date().toISOString(),\n interval: 'custom'\n },\n options: {\n orderMode: 'ACTIVE_FIRST',\n severity: { CRITICAL: true },\n status: {\n ACTIVE: true,\n ACKNOWLEDGED: false,\n CLEARED: false\n },\n types: []\n }\n }\n },\n {\n name: 'deviceGroupAssignmentWidget',\n title: gettext('Group assignment'),\n _x: 16,\n _y: 5,\n _height: 4,\n _width: 8\n },\n {\n componentId: 'Map',\n title: gettext('Location'),\n _x: 8,\n _y: 9,\n _height: 4,\n _width: 16\n }\n ] as Widget[];\n\n constructor(\n private router: ActivatedRoute,\n private widgetService: WidgetService,\n private translateService: TranslateService,\n private inventoryService: InventoryService\n ) {}\n\n ngOnInit() {\n this.contextSubscription = this.router.parent.data\n .pipe(\n tap(({ contextData }) => {\n const contextNameValid = contextData.name && contextData.name.trim();\n this.title = contextNameValid ? contextData.name : contextData.id;\n this.dashboardName = `${contextData.id}-device-info`;\n })\n )\n .subscribe(async data => {\n this.currentContext = data as ContextData;\n this.addDeviceTargetForDP(data.contextData.id, data.contextData.name);\n });\n\n this.widgetsSubscription = from(this.DEVICE_INFO_WIDGETS)\n .pipe(\n mergeMap(widget => this.widgetService.mapLegacy(widget)),\n map(widget => {\n let device = this.router.parent.snapshot.data.contextData;\n if (device) {\n device = {\n name: device.name,\n id: device.id\n };\n }\n return {\n ...widget,\n config: {\n ...widget.config,\n device\n }\n };\n }),\n toArray()\n )\n .subscribe(async data => {\n await this.filterSupportedSeriesForDP(this.currentContext.contextData.id, data);\n this.widgetsList = data;\n this.isLoading = false;\n });\n }\n\n addDeviceTargetForDP(id: string | number, name: string) {\n const dpWidget = this.DEVICE_INFO_WIDGETS.filter(item => item.name == 'Data points graph')[0];\n // Add target to dataPoint config\n dpWidget.config.datapoints.map(item => (item['__target'] = { id, name }));\n // Add target to alarmEvents Config\n dpWidget.config.alarmsEventsConfigs.map(item => (item['__target'] = { id, name }));\n }\n\n async filterSupportedSeriesForDP(id: string | number, widgets: Widget[]) {\n const supportedMeasurements = await this.inventoryService.getMeasurementsAndSeries(id);\n const isDataPointSupported = dp =>\n supportedMeasurements.some(\n ({ fragment, series }) => dp.fragment === fragment && dp.series === series\n );\n const dpWidget = widgets.find(({ name }) => name === 'Data points graph');\n dpWidget.config.datapoints = dpWidget.config.datapoints.filter(isDataPointSupported);\n }\n\n ngOnDestroy() {\n this.widgetsSubscription.unsubscribe();\n this.contextSubscription.unsubscribe();\n }\n\n canDeactivate(): Promise<boolean> {\n return this.contextDashboard?.canDeactivate();\n }\n}\n","@if (!isLoading) {\n <div>\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 [disabled]=\"previewEnabled$ | async\"\n ></c8y-context-dashboard>\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { inject, NgModule } from '@angular/core';\nimport { CanActivateFn } from '@angular/router';\nimport { CoreModule, hookRoute, PreviewService, ViewContext } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { map, of, switchMap, take } from 'rxjs';\nimport { CanDeactivateComponent, ContextDashboardType } from '../context-dashboard.model';\nimport { ContextDashboardModule } from '../context-dashboard.module';\nimport { ContextDashboardService } from '../context-dashboard.service';\nimport { DeviceInfoDashboardComponent } from './device-info-dashboard.component';\n\nconst canActivateDeviceInfo: CanActivateFn = (route, _) => {\n const previewFeatureService = inject(PreviewService);\n const contextDashboardService = inject(ContextDashboardService);\n\n return previewFeatureService.getState$('ui.dm-dashboard-manager').pipe(\n switchMap(isPreviewEnabled => {\n return isPreviewEnabled\n ? contextDashboardService\n .activateDashboards(route, [ContextDashboardType.Device, ContextDashboardType.Type])\n .pipe(map(tabs => !(Array.isArray(tabs) && tabs.length > 0)))\n : of(true);\n }),\n take(1)\n );\n};\n\n@NgModule({\n imports: [CommonModule, CoreModule, ContextDashboardModule, DeviceInfoDashboardComponent],\n exports: [],\n providers: [\n hookRoute({\n context: ViewContext.Device,\n path: 'device-info',\n component: DeviceInfoDashboardComponent,\n canActivate: [canActivateDeviceInfo],\n label: gettext('Info'),\n priority: 10000,\n icon: 'asterisk',\n canDeactivate: [(component: CanDeactivateComponent) => component.canDeactivate()],\n rootContext: ViewContext.Dashboard\n })\n ]\n})\nexport class DeviceInfoDashboardModule {}\n","import { Component, OnInit, ViewChild } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Widget, TitleComponent, C8yTranslatePipe } from '@c8y/ngx-components';\nimport { CanDeactivateComponent } from '../context-dashboard.model';\nimport { WidgetService } from '../widget.service';\nimport { ContextDashboardComponent } from '../context-dashboard.component';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\n\n@Component({\n selector: 'c8y-device-management-home-dashboard',\n templateUrl: './device-management-home-dashboard.component.html',\n imports: [TitleComponent, ContextDashboardComponent, C8yTranslatePipe]\n})\nexport class DeviceManagementHomeDashboardComponent implements OnInit, CanDeactivateComponent {\n widgets = [];\n dashboardName = 'home-dm1';\n defaultWidgets = [\n {\n name: defaultWidgetIds.DEVICE_MANAGEMENT_WELCOME,\n title: gettext('Quick links'),\n _x: 0,\n _y: 0,\n _height: 4,\n _width: 12\n },\n {\n name: 'Recent Alarms',\n title: gettext('Recent alarms'),\n config: {\n widgetId: 'Recent Alarms',\n displayMode: 'config',\n aggregation: null,\n isAutoRefreshEnabled: true,\n refreshInterval: 30_000,\n refreshOption: 'live',\n dateTimeContext: {\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date().toISOString(),\n interval: 'custom'\n }\n },\n _x: 12,\n _y: 0,\n _height: 4,\n _width: 12\n }\n ] as Widget[];\n @ViewChild(ContextDashboardComponent, { static: true })\n contextDashboard: ContextDashboardComponent;\n\n constructor(private widgetService: WidgetService) {}\n\n ngOnInit() {\n this.defaultWidgets.map(async widget => {\n await this.widgetService\n .mapLegacy(widget)\n .then(transformedWidget => this.widgets.push(transformedWidget));\n });\n }\n\n canDeactivate(): Promise<boolean> {\n return this.contextDashboard?.canDeactivate();\n }\n}\n","<c8y-title>\n {{ 'Home' | translate }}\n</c8y-title>\n\n<c8y-context-dashboard\n [name]=\"dashboardName\"\n [defaultWidgets]=\"defaultWidgets\"\n [canDelete]=\"false\"\n [hideAvailability]=\"true\"\n></c8y-context-dashboard>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { CoreModule, hookNavigator, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { ContextDashboardModule } from '../context-dashboard.module';\nimport { DeviceManagementHomeDashboardComponent } from './device-management-home-dashboard.component';\nimport { CanDeactivateComponent } from '../context-dashboard.model';\n\n@NgModule({\n imports: [\n CommonModule,\n CoreModule,\n ContextDashboardModule,\n DeviceManagementHomeDashboardComponent\n ],\n exports: [],\n providers: [\n hookRoute({\n path: 'home',\n component: DeviceManagementHomeDashboardComponent,\n canDeactivate: [(component: CanDeactivateComponent) => component.canDeactivate()],\n rootContext: ViewContext.Dashboard\n }),\n hookNavigator({ label: gettext('Home'), icon: 'home', priority: 10000, path: '/home' })\n ]\n})\nexport class DeviceManagementHomeDashboardModule {}\n","import { Component, inject } from '@angular/core';\nimport { WIDGET_CONTENT_CLASSES, WIDGET_HEADER_CLASSES } from '../context-dashboard.model';\nimport { WidgetConfigComponent } from '../widget-config.component';\nimport { AppearanceSettingsComponent } from './appearance-settings.component';\nimport { NgIf } from '@angular/common';\nimport { WidgetPreviewComponent } from './widget-preview.component';\n\n@Component({\n standalone: true,\n imports: [AppearanceSettingsComponent, NgIf, WidgetPreviewComponent],\n selector: 'c8y-widget-config-appearance',\n templateUrl: 'widget-config-appearance.component.html'\n})\nexport class WidgetConfigAppearanceComponent {\n widgetConfig = inject(WidgetConfigComponent);\n possibleStyling = { WIDGET_HEADER_CLASSES, WIDGET_CONTENT_CLASSES };\n}\n","<div class=\"row\">\n <div class=\"col-xs-6\">\n <c8y-appearance-settings\n [(themeClass)]=\"widgetConfig.styling.contentClass\"\n [(headerClass)]=\"widgetConfig.styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"widgetConfig.defaultStyling.contentClass\"\n [defaultHeaderClass]=\"widgetConfig.defaultStyling.headerClass\"\n ></c8y-appearance-settings>\n </div>\n <div class=\"col-xs-6 sticky-header-top-0\">\n <c8y-widget-preview\n style=\"height: calc(100vh - 382px)\"\n [previewClasses]=\"widgetConfig.getStyle(true)\"\n ></c8y-widget-preview>\n </div>\n</div>\n","import { AsyncPipe, NgIf } from '@angular/common';\nimport { Component, inject, Input } from '@angular/core';\nimport { C8yTranslatePipe } from '@c8y/ngx-components';\nimport {\n GlobalContextEvent,\n GlobalContextWidgetWrapperComponent,\n WidgetControlsPresetConfig,\n WidgetControls\n} from '@c8y/ngx-components/global-context';\nimport { isEmpty } from 'lodash-es';\nimport { WidgetConfigService } from '../widget-config.service';\nimport { WidgetConfigFeedbackComponent } from './widget-config-feedback.component';\n\n@Component({\n selector: 'c8y-global-context-section',\n templateUrl: './global-context-section.component.html',\n standalone: true,\n imports: [\n GlobalContextWidgetWrapperComponent,\n AsyncPipe,\n WidgetConfigFeedbackComponent,\n C8yTranslatePipe,\n NgIf\n ]\n})\nexport class GlobalContextSectionComponent {\n widgetConfigService = inject(WidgetConfigService);\n @Input()\n widgetControls: WidgetControlsPresetConfig | WidgetControls;\n\n onGlobalContext(event: GlobalContextEvent): void {\n if (isEmpty(event.diff)) {\n return;\n }\n this.widgetConfigService.updateConfig(event.context);\n }\n}\n","<div>\n <c8y-global-context-widget-wrapper\n *ngIf=\"widgetControls\"\n [widgetControls]=\"widgetControls\"\n [displayMode]=\"'config'\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n</div>\n\n<c8y-widget-config-feedback>\n <span class=\"tag tag--info chip text-12 m-4\">\n <span\n class=\"text-truncate\"\n [title]=\"'The time context can only get changed in the configuration.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'config'\"\n translate\n >\n Configuration\n </span>\n <span\n [title]=\"'The widget is bound to the global time context.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'dashboard'\"\n translate\n >\n Dashboard\n </span>\n <span\n [title]=\"'The time context can be configured in the widget view mode.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'view_and_config'\"\n translate\n >\n Configuration and widget view\n </span>\n </span>\n</c8y-widget-config-feedback>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i4","map","i1.ContextDashboardService","i5","i6.DashboardDetailService","i1.DashboardOriginatorService","i2.DashboardCaretakerService","tap","mergeMap","shareReplay","rxjsMerge","merge","i1.WidgetConfigSectionService","i1.WidgetService","i3.ContextDashboardService","i4.WidgetConfigService","filter","i4.WidgetService","i7.DashboardEditModeService","i2.ContextDashboardService","i2.WidgetService","switchMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,MAAM,eAAe,GAAgB;AAC1C,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;AAC/B,IAAA,IAAI,EAAE,eAAe;;AAErB,IAAA,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,CAAC;;MAIA,iBAAiB,CAAA;AAG5B,IAAA,WAAW,CAAC,KAA6B,EAAA;QACvC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI;QACjE,IAAI,SAAS,EAAE;AACb,YAAA,MAAM,SAAS,GAA2C;AACxD,gBAAA,aAAa,EAAE;aAChB;AACD,YAAA,KAAK,CAAC,IAAI,GAAG,EAAE,SAAS,EAAE;QAC5B;AACA,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,GAAG;AACT,gBAAA,GAAG,eAAe;gBAClB,IAAI,EAAE,CAAC,SAAS;gBAChB,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,CAAC;aACnC;Q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,WAAA,EAAA,IAAA,EAEnC,6BAA6B,EAAA,QAAA,EAAA,4BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAE7B,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAHJ,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAET,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIP,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAZzC,SAAS;+BACE,4BAA4B,EAAA,UAAA,EAE1B,IAAI,EAAA,OAAA,EACP;wBACP,mCAAmC;wBACnC,SAAS;wBACT,6BAA6B;wBAC7B,gBAAgB;wBAChB;AACD,qBAAA,EAAA,QAAA,EAAA,6qCAAA,EAAA;;sBAIA;;;AE3BH;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-context-dashboard.mjs","sources":["../../context-dashboard/new-dashboard.guard.ts","../../context-dashboard/add-dashboard.component.ts","../../context-dashboard/add-dashboard.component.html","../../context-dashboard/add-dashboard.factory.ts","../../context-dashboard/context-dashboard.model.ts","../../context-dashboard/context-dashboard.service.ts","../../context-dashboard/dashboard-detail.service.ts","../../context-dashboard/dashboard-detail.component.ts","../../context-dashboard/dashboard-detail.component.html","../../context-dashboard/memento/dashboard-originator.service.ts","../../context-dashboard/memento/dashboard-caretaker.service.ts","../../context-dashboard/memento/dashboard-edit-mode.service.ts","../../context-dashboard/widget-config-hook/widget-config-hook.model.ts","../../context-dashboard/widget-config-hook/widget-config-hook.service.ts","../../context-dashboard/widget-config/widget-config-section.component.ts","../../context-dashboard/widget-config/widget-config-section.component.html","../../context-dashboard/widget-config/widget-config-feedback.component.ts","../../context-dashboard/widget-config/widget-config-feedback.component.html","../../context-dashboard/widget-config/widget-asset-selector.component.ts","../../context-dashboard/widget-config/widget-asset-selector.component.html","../../context-dashboard/widget-config/widget-config-general.component.ts","../../context-dashboard/widget-config/widget-config-general.component.html","../../context-dashboard/widget-config.service.ts","../../context-dashboard/widget-config/appearance-settings.component.ts","../../context-dashboard/widget-config/appearance-settings.component.html","../../context-dashboard/widget-config/widget-config-root.component.ts","../../context-dashboard/widget-config/widget-config-root.component.html","../../context-dashboard/widget-config/widget-preview.component.ts","../../context-dashboard/widget-config/widget-preview.component.html","../../context-dashboard/widget.service.ts","../../context-dashboard/widget-config.component.ts","../../context-dashboard/widget-config.component.html","../../context-dashboard/context-dashboard.component.ts","../../context-dashboard/context-dashboard.component.html","../../context-dashboard/dashboard-details-tabs.factory.ts","../../context-dashboard/paste-dashboard-action.component.ts","../../context-dashboard/type-dashboard-info/type-dashboard-info.component.ts","../../context-dashboard/type-dashboard-info/type-dashboard-info.component.html","../../context-dashboard/widget-config/widget-preview-wrapper.component.ts","../../context-dashboard/context-dashboard.module.ts","../../context-dashboard/dashboard-action-bar.factory.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.component.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.component.html","../../context-dashboard/device-info-dashboard/device-info-dashboard.module.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.component.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.component.html","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.module.ts","../../context-dashboard/widget-config/widget-config-appearance.component.ts","../../context-dashboard/widget-config/widget-config-appearance.component.html","../../context-dashboard/widget-config/global-context-section.component.ts","../../context-dashboard/widget-config/global-context-section.component.html","../../context-dashboard/c8y-ngx-components-context-dashboard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Tab } from '@c8y/ngx-components';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport { ContextDashboardManagedObject } from './context-dashboard.model';\n\nexport const newDashboardTab: Tab<string> = {\n featureId: 'newDashboard',\n icon: 'th',\n label: gettext('New dashboard'),\n path: 'new-dashboard',\n // place tab as last one and hide it so it won't be opened until user initiates adding new dashboard\n hide: true,\n priority: -Infinity\n};\n\n@Injectable({ providedIn: 'root' })\nexport class NewDashboardGuard {\n tab: Tab;\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean | Tab[]> {\n const tabActive = route.routeConfig.path === newDashboardTab.path;\n if (tabActive) {\n const dashboard: Partial<ContextDashboardManagedObject> = {\n c8y_Dashboard: null\n };\n route.data = { dashboard };\n }\n if (!this.tab) {\n this.tab = {\n ...newDashboardTab,\n hide: !tabActive,\n priority: tabActive ? Infinity : -Infinity\n };\n }\n return of([this.tab]);\n }\n}\n","import { Component } from '@angular/core';\nimport { TabsService, IconDirective, C8yTranslatePipe } from '@c8y/ngx-components';\nimport { Router } from '@angular/router';\nimport { newDashboardTab } from './new-dashboard.guard';\n\n@Component({\n selector: '[c8y-add-dashboard]',\n templateUrl: './add-dashboard.component.html',\n host: { class: 'd-flex a-i-stretch sticky-right' },\n imports: [IconDirective, C8yTranslatePipe]\n})\nexport class AddDashboardComponent {\n constructor(\n private tabsService: TabsService,\n private router: Router\n ) {}\n\n addDashboard() {\n const tempNewDashboardTab = [...this.tabsService.state].find(\n t => t.featureId === newDashboardTab.featureId\n );\n // navigate before tab is displayed, because in DashboardDetailComponent tab is hidden on navigation from it.\n this.router.navigate(\n typeof tempNewDashboardTab.path === 'string'\n ? [tempNewDashboardTab.path]\n : tempNewDashboardTab.path,\n { replaceUrl: true }\n );\n // show tab and make it appear as first one\n tempNewDashboardTab.hide = false;\n tempNewDashboardTab.priority = Infinity;\n this.tabsService.refresh();\n }\n}\n","<div class=\"d-flex a-i-stretch m-b-8 m-t-8 p-l-8 hidden-xs\">\n <button\n class=\"btn btn-default btn-sm p-l-8 p-r-8 fit-h p-b-0 p-t-0 d-flex a-i-center\"\n title=\"{{ 'Add dashboard' | translate }}\"\n type=\"button\"\n (click)=\"addDashboard()\"\n >\n <i\n class=\"icon-20 m-r-4\"\n c8yIcon=\"add-circle-outline\"\n ></i>\n <span>{{ 'Add dashboard' | translate }}</span>\n </button>\n <div class=\"p-r-sm-40\"></div>\n</div>\n","import { inject } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IIdentified } from '@c8y/client';\nimport {\n ContextData,\n ContextRouteService,\n ExtensionFactory,\n Permissions,\n Tab,\n ViewContext\n} from '@c8y/ngx-components';\nimport { AddDashboardComponent } from './add-dashboard.component';\n\nexport abstract class AddDashboardFactory implements ExtensionFactory<Tab> {\n protected abstract targetContext: ViewContext.Device | ViewContext.Group;\n currentContext: ContextData;\n\n private permissions = inject(Permissions);\n private contextRoute = inject(ContextRouteService);\n\n async get(activatedRoute?: ActivatedRoute): Promise<Tab | Tab[]> {\n this.currentContext = this.contextRoute.getContextData(activatedRoute);\n if (\n this.currentContext?.context === this.targetContext &&\n (await this.hasPermission(this.currentContext.contextData))\n ) {\n return [\n {\n component: AddDashboardComponent,\n priority: -Infinity,\n showAlways: true\n }\n ];\n }\n return [];\n }\n\n private async hasPermission(context: IIdentified) {\n if (context?.id) {\n return await this.permissions.canEdit(\n [\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ],\n context\n );\n }\n return this.permissions.hasAnyRole([\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ]);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport {\n Widget,\n DynamicComponentDefinition,\n Route,\n ViewContext,\n WidgetDisplaySettings,\n TabWithTemplate,\n WidgetSettings\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { SupportedIconsSuggestions } from '@c8y/ngx-components/icon-selector/icons';\n\nexport const CONTEXT_DASHBOARD_CONFIG = new InjectionToken<any>('ContextDashboardConfig');\nexport const DASHBOARD_SETTINGS_CHANGES = {\n classes: gettext('theme'),\n globalRolesIds: gettext('global roles'),\n widgetClasses: gettext('widget header style'),\n widgetMargin: gettext('widget margin'),\n icon: gettext('icon'),\n name: gettext('name'),\n priority: gettext('priority'),\n c8y_IsNavigatorNode: gettext('navigator item'),\n translateWidgetTitle: gettext('translate widget title'),\n translateDashboardTitle: gettext('translate dashboard title'),\n children: gettext('widgets')\n} as const satisfies Partial<Record<keyof ContextDashboard, string>>;\n\nexport interface ContextDashboardConfig {\n widgetFilter?: (component: DynamicComponentDefinition) => boolean;\n allowFullscreen?: boolean;\n /**\n * @deprecated\n */\n routes?: Route[];\n}\n\nexport interface ContextWidgetConfig {\n /**\n * Settings that define how the default config component is\n * displayed. They are static and will not be saved.\n */\n settings?: WidgetSettings;\n\n /**\n * Settings that are injected in any displaying component.\n */\n displaySettings?: WidgetDisplaySettings;\n\n /**\n * Whatever should be added to the configuration when a widget is created.\n */\n config?: {\n /**\n * Any other information that should be stored here.\n */\n [key: string]: any;\n };\n /**\n * The selected device or group (note: naming is inconsistent as group was added later\n * but must stay for already implemented widgets)\n */\n device?: {\n id?: string | number;\n name?: string;\n [key: string]: any;\n };\n /**\n * Method to export the widget configuration during dashboard export to a json file. It enhances the configuration with\n * additional data that can be used later by the `import` method to restore the widget configuration in a new context.\n * @param config Widget configuration\n * @return Enhanced widget configuration\n */\n export?: (config: any) => any | Promise<any>;\n /**\n * Method to import the widget configuration during dashboard import from a json file. It restores the widget configuration\n * with data exported by the `export` method.\n * @param config Widget configuration enhanced with export method\n * @param dashboardData Dashboard metadata\n * @return Restored widget configuration\n */\n import?: (config: any, dashboardData: DashboardMetadata) => any | Promise<any>;\n\n /**\n * Any other information that should be stored here.\n */\n [key: string]: any;\n}\n\nexport interface ContextDashboardManagedObject extends IManagedObject {\n c8y_Dashboard?: ContextDashboard;\n name?: string;\n c8y_DashboardHistory?: ContextDashboard[];\n}\n\nexport interface ContextDashboard {\n icon?: SupportedIconsSuggestions | null;\n name?: string | null;\n priority?: number | null;\n deviceType?: boolean | null;\n deviceTypeValue?: string | null;\n isFrozen?: boolean | null;\n classes?: { [key: string]: boolean } | null;\n widgetClasses?: { [key: string]: boolean } | null;\n widgetMargin?: number | null;\n translateWidgetTitle?: boolean | null;\n translateDashboardTitle?: boolean | null;\n global?: boolean | null;\n /**\n * The amount of columns on that dashboard.\n * Can be freely chosen, but product uses either 12 or 24.\n */\n columns?: number | null;\n children?: {\n [id: string]: Widget;\n };\n globalRolesIds?: DashboardGlobalRoles | null;\n c8y_IsNavigatorNode?: object | null;\n description?: string | null;\n historyDescription?: DashboardHistoryDescription | null;\n created?: string | null;\n author?: string | null;\n dashboardState?: { [key: string]: any };\n}\n/**\n * Object describing changes applied to dashboard settings and its widgets. Used to display user-friendly change log.\n */\nexport interface DashboardHistoryDescription {\n /**\n * Indicates type of dashboard change (or creation).\n */\n changeType?: 'reset' | 'create' | 'update' | null;\n /**\n * List of dashboard settings that has been changed.\n */\n dashboardSettingChanges?: (typeof DASHBOARD_SETTINGS_CHANGES)[keyof typeof DASHBOARD_SETTINGS_CHANGES][];\n /**\n * True if dashboard is typed dashboard, false if it's not.\n */\n deviceType?: boolean | null;\n /**\n * Object containing lists of widgets (by title) that has been changed, grouped by change type, e.g.:\n * ```ts\n * widgetChanges: {\n * removed: ['Applications'],\n * config?: ['Data points graph', 'Events list'],\n * },\n * ```\n */\n widgetChanges?: {\n removed?: string[];\n added?: string[];\n config?: string[];\n arrangement?: string[];\n } | null;\n /**\n * String used to display the date from which the state was restored.\n */\n restored?: string;\n}\n\nexport const DASHBOARD_CHILDREN_STATE_NAME = {\n initial: gettext('Initial state'),\n config: gettext('Widget configuration changed'),\n removed: gettext('Widget removed'),\n added: gettext('Widget added'),\n arrangement: gettext('Widgets rearranged')\n} as const satisfies Record<keyof DashboardHistoryDescription['widgetChanges'] | 'initial', string>;\n/**\n * Object representing state of dashboard widgets. Its main purpose is to allow to undo and redo changes\n * applied to dashboard children.\n */\nexport type DashboardChildrenState = {\n /**\n * Name of the change applied to dashboard that results in current state, e.g. 'widget removed'\n */\n name: (typeof DASHBOARD_CHILDREN_STATE_NAME)[keyof typeof DASHBOARD_CHILDREN_STATE_NAME];\n /**\n * Dashboard children in particular, immutable state.\n */\n children: ContextDashboard['children'];\n /**\n * Object describing changes applied to dashboard widgets that can be easily mapped to DashboardHistoryDescription widgetChanges.\n * ```ts\n * {\n * removed: {\n * 0969692617637703: { componentId: \"Data points graph\", config: {...}, classes: {...} ...}\n * },\n * config: {\n * 6347567345767653: { componentId: \"Applications\", config: {...}, classes: {...} ...},\n * 6456345634564566: { componentId: \"Events list\", config: {...}, classes: {...} ...},\n * }\n * }\n * ```\n */\n changeHistory: Partial<\n Record<\n keyof DashboardHistoryDescription['widgetChanges'],\n {\n [id: string]: Widget;\n }\n >\n >;\n};\n\nexport enum ContextDashboardType {\n Device = 'device',\n Type = 'type',\n Group = 'group',\n Named = 'name',\n Report = 'report'\n}\n\nexport enum DashboardDetailsTabId {\n GENERAL = 'general',\n APPEARANCE = 'appearance',\n VERSIONHISTORY = 'versionHistory'\n}\n\nexport type DashboardDetailsTabs = Record<\n DashboardDetailsTabId,\n TabWithTemplate<string> & { featureId: DashboardDetailsTabId }\n>;\n\nexport interface DashboardAndWidgetThemeDefinition {\n label: string;\n class: string;\n description: string;\n}\n\nexport const WIDGET_HEADER_CLASSES = [\n {\n label: gettext('Regular`style`'),\n class: 'panel-title-regular',\n description: gettext('The widget has no border between header and content.')\n },\n {\n label: gettext('Border`style`'),\n class: 'panel-title-border',\n description: gettext('The widget has a small separation border between header and content.')\n },\n {\n label: gettext('Overlay`style`'),\n class: 'panel-title-overlay',\n description: gettext('The widget content overlays the header.')\n },\n {\n label: gettext('Hidden`style`'),\n class: 'panel-title-hidden',\n description: gettext('The widget header is not shown.')\n }\n] as const satisfies DashboardAndWidgetThemeDefinition[];\n\nexport const WIDGET_CONTENT_CLASSES = [\n {\n label: gettext('Branded`style`'),\n class: 'panel-content-branded',\n description: gettext('The widget is styled with the main brand color.')\n },\n {\n label: gettext('Match dashboard`style`'),\n class: 'panel-content-light',\n description: gettext('The widget appearance matches the dashboard appearance.')\n },\n {\n label: gettext('Light`style`'),\n class: 'panel-content-white',\n description: gettext('The widget has light appearance, that is, dark text on light background.')\n },\n {\n label: gettext('Dark`style`'),\n class: 'panel-content-dark',\n description: gettext('The widget has dark appearance, that is, light text on dark background.')\n },\n {\n label: gettext('Transparent`style`'),\n class: 'panel-content-transparent',\n description: gettext('The widget has no background.')\n }\n] as const satisfies DashboardAndWidgetThemeDefinition[];\n\nexport const DASHBOARD_THEME_CLASSES = [\n {\n label: gettext('Match UI`theme`'),\n class: 'dashboard-theme-light',\n description: gettext('The dashboard appearance matches the UI appearance.')\n },\n {\n label: gettext('Light`theme`'),\n class: 'dashboard-theme-white',\n description: gettext(\n 'The dashboard has light appearance, that is, dark text on light background.'\n )\n },\n {\n label: gettext('Dark`theme`'),\n class: 'dashboard-theme-dark',\n description: gettext(\n 'The dashboard has dark appearance, that is, light text on dark background.'\n )\n },\n {\n label: gettext('Branded`theme`'),\n class: 'dashboard-theme-branded',\n description: gettext('The dashboard is styled using the brand palette.')\n }\n] as const satisfies DashboardAndWidgetThemeDefinition[];\n\nexport const STYLING_CLASS_PREFIXES = [\n 'dashboard-theme-',\n 'panel-title-',\n 'panel-content-'\n] as const;\n\nexport interface DashboardCopyClipboard {\n dashboardId: string;\n dashboard: ContextDashboard;\n context: DashboardContext;\n}\n\nexport interface DashboardContext {\n context: ViewContext;\n contextData: Partial<IManagedObject>;\n}\n\nexport const ALL_GLOBAL_ROLES_SELECTED = 'all' as const;\nexport type DashboardGlobalRoles = number[] | typeof ALL_GLOBAL_ROLES_SELECTED;\n\nexport const PRODUCT_EXPERIENCE = {\n DASHBOARD: {\n EVENTS: {\n DASHBOARDS: 'dashboards',\n REPORTS: 'reports',\n DASHBOARD_TEMPLATE: 'dashboardTemplate'\n },\n COMPONENTS: {\n DASHBOARD_VIEW: 'context-dashboard',\n DASHBOARD_AVAILABILITY: 'dashboard-availability',\n REPORTS_LIST: 'report-dashboard-list',\n ADD_REPORT: 'report-dashboard-list',\n ADD_DASHBOARD: 'add-dashboard',\n DELETE_DASHBOARD: 'context-dashboard',\n TYPED_DASHBOARD_SETTINGS: 'typed-dashboard-settings'\n },\n CONTEXT: {\n REPORT: 'report',\n DEVICE: 'device',\n ASSET: 'asset',\n GROUP: 'group'\n },\n ACTIONS: {\n APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges',\n DELETE: 'delete',\n LOAD: 'load',\n CREATE: 'create',\n ADD_REPORT: 'addReport',\n DUPLICATE_AS_REGULAR_DASHBOARD: 'duplicateAsRegularDashboard'\n }\n }\n} as const;\n\nexport interface CanDeactivateComponent {\n canDeactivate: () => boolean | Observable<boolean> | Promise<boolean>;\n}\n\nexport const REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY = 30;\n\nexport type AllowTypeDashboard = 'allow' | 'disallow' | 'allow_if_type_filled';\n\nexport const DASHBOARD_DETAILS_OUTLET = 'dashboard-details' as const;\nexport const DASHBOARD_DETAILS_TABS_OUTLET_NAME = 'dashboardTabs' as const;\n\nexport interface DashboardMetadata {\n isReport: boolean;\n isNamedDashboard: boolean;\n hideAvailability: boolean;\n dashboard: ContextDashboard;\n deviceTypeValue: string;\n displayDeviceTypeValue: string;\n mo: ContextDashboardManagedObject;\n allowTypeDashboard: AllowTypeDashboard;\n isDevice: boolean;\n context: any;\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { IManagedObject, InventoryService, IResultList, QueriesUtil } from '@c8y/client';\nimport {\n AlertService,\n ApplicationOptions,\n AppStateService,\n ContextData,\n ContextRouteService,\n DynamicComponentService,\n getActivatedRoute,\n GroupService,\n ModalService,\n NavigatorNode,\n NavigatorService,\n NEW_DASHBOARD_ROUTER_STATE_PROP,\n OptionsService,\n Permissions,\n Status,\n Tab,\n TabsService,\n ViewContext,\n Widget\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n assign,\n cloneDeep,\n forEach,\n get,\n has,\n isEmpty,\n keyBy,\n keys,\n pick,\n reduce,\n set,\n some\n} from 'lodash-es';\nimport { combineLatest, from, Observable, of, Subject } from 'rxjs';\nimport { catchError, filter, map, mergeMap, tap, throwIfEmpty, toArray } from 'rxjs/operators';\nimport {\n ALL_GLOBAL_ROLES_SELECTED,\n AllowTypeDashboard,\n ContextDashboard,\n ContextDashboardManagedObject,\n ContextDashboardType,\n DashboardContext,\n DashboardCopyClipboard,\n PRODUCT_EXPERIENCE,\n STYLING_CLASS_PREFIXES\n} from './context-dashboard.model';\n\n@Injectable({ providedIn: 'root' })\nexport class ContextDashboardService {\n dashboardTabs$: Observable<Tab[]>;\n formDisabled$: Observable<boolean>;\n readonly REPORT_PARTIAL_NAME = 'report_';\n copyClipboard: DashboardCopyClipboard;\n queriesUtil: QueriesUtil;\n readonly VERSION_HISTORY_SIZE_LIMIT = 10;\n private readonly INVENTORY_ROLES = [\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN\n ];\n private cache = new Map<string, ContextDashboardManagedObject>();\n private readonly DEFAULT_PAGESIZE = 1000;\n private readonly FRAGMENT_NAME = 'c8y_Dashboard';\n private readonly APPLIED_TO_FRAGMENT = 'c8y_AppliedToApplications';\n private readonly DASHBOARD_ROUTE_PATH = 'dashboard';\n private readonly INDEX_SPLIT = '!';\n private readonly CACHE_TIMEOUT = 500;\n private _formDisabled = true;\n private formDisabledSubject = new Subject<boolean>();\n private contextDashboardsCache: {\n query: string;\n result: Promise<IResultList<IManagedObject>>;\n timestamp: number;\n };\n private appName = '';\n private readonly HIDE_TYPE_DASHBOARD_FOR_ASSETS: keyof ApplicationOptions =\n 'hideTypeDashboardForAssets';\n\n get formDisabled() {\n return this._formDisabled;\n }\n\n set formDisabled(value) {\n this._formDisabled = value;\n this.formDisabledSubject.next(value);\n }\n\n constructor(\n private inventory: InventoryService,\n private tabs: TabsService,\n private modal: ModalService,\n private translateService: TranslateService,\n private router: Router,\n private navigator: NavigatorService,\n private permissions: Permissions,\n private alert: AlertService,\n private dynamicComponent: DynamicComponentService,\n private groupService: GroupService,\n private optionsService: OptionsService,\n private appStateService: AppStateService,\n private contextRouteService: ContextRouteService\n ) {\n this.formDisabled$ = this.formDisabledSubject.asObservable();\n this.queriesUtil = new QueriesUtil();\n }\n\n async create(dashboardCfg: ContextDashboard, context?: ContextData, name = '') {\n let dashboard: Partial<ContextDashboardManagedObject> = {};\n assign(\n dashboard,\n this.adjustDashboardFor24Columns({ c8y_Dashboard: dashboardCfg }),\n this.updateDashboardHistory(dashboard, dashboardCfg)\n );\n\n const [dashboardType, dashboardFragments] = this.getDashboardFragments(\n { c8y_Dashboard: dashboardCfg } as ContextDashboardManagedObject,\n context,\n name,\n false\n );\n dashboard = { ...dashboard, ...dashboardFragments };\n\n if (this.shouldSetGlobal(dashboard, context)) {\n assign(dashboard, { c8y_Global: {} });\n }\n dashboard.name = dashboard.c8y_Dashboard.name;\n if (this.appStateService?.currentApplication?.value) {\n dashboard[this.APPLIED_TO_FRAGMENT] = [this.appStateService?.currentApplication?.value.key];\n }\n\n const { data } =\n dashboardType === ContextDashboardType.Group ||\n dashboardType === ContextDashboardType.Device ||\n (context?.contextData?.id && dashboardType === ContextDashboardType.Named)\n ? await this.inventory.childAdditionsCreate(\n dashboard,\n (context?.contextData.id as string) || ''\n )\n : await this.inventory.create(dashboard);\n return data as ContextDashboardManagedObject;\n }\n\n async detail(dashboardMO: ContextDashboardManagedObject) {\n let { data } = await this.inventory.detail(dashboardMO);\n data = this.adjustDashboardFor24Columns(data as ContextDashboardManagedObject);\n this.cache.set(dashboardMO.id, data);\n return data;\n }\n\n async update(\n dashboard: ContextDashboardManagedObject,\n context?: ContextData\n ): Promise<ContextDashboardManagedObject> {\n const dashboardCfg = dashboard.c8y_Dashboard;\n dashboard.name = dashboard.c8y_Dashboard.name;\n assign(\n dashboard,\n this.adjustDashboardFor24Columns({ c8y_Dashboard: dashboardCfg }),\n this.updateDashboardHistory(dashboard, dashboardCfg)\n );\n\n const keepFragments = this.clean(\n pick(dashboard, [this.FRAGMENT_NAME, 'id', 'name', this.APPLIED_TO_FRAGMENT])\n );\n keepFragments.c8y_DashboardHistory = dashboard.c8y_DashboardHistory;\n await this.serializeWidgetConfigs(keepFragments);\n\n const [, dashboardTypeFragments] = this.getDashboardFragments(dashboard, context, '', true);\n keepFragments.c8y_Global = this.shouldSetGlobal({ ...dashboard, ...dashboardTypeFragments });\n const { data } = await this.inventory.update({ ...keepFragments, ...dashboardTypeFragments });\n this.cache.set(dashboard.id, data);\n return data;\n }\n\n async delete(dashboard: ContextDashboardManagedObject, withConfirmation = true) {\n try {\n if (withConfirmation) {\n let msg: string = gettext(\n `You are about to delete the dashboard \"{{ dashboardName }}\". Do you want to proceed?`\n );\n if (this.isDeviceType(dashboard)) {\n msg = gettext(\n `You are about to delete the dashboard \"{{ dashboardName }}\" from all devices of the type \"{{ deviceType }}\".\n Do you want to proceed?`\n );\n }\n await this.modal.confirm(\n gettext('Delete dashboard'),\n this.translateService.instant(msg, {\n dashboardName: dashboard.c8y_Dashboard.name,\n deviceType: dashboard.c8y_Dashboard.deviceTypeValue\n }),\n Status.DANGER,\n { ok: gettext('Delete'), cancel: gettext('Cancel') }\n );\n }\n await this.inventory.delete(dashboard);\n const tabToRemove = Array.from(this.tabs.state).find(tab => {\n if (typeof tab.path === 'string') {\n return tab.path.endsWith(`${this.DASHBOARD_ROUTE_PATH}/${dashboard.id}`);\n }\n });\n this.tabs.remove(tabToRemove);\n queueMicrotask(() => {\n this.tabs.refresh();\n });\n } catch (ex) {\n // intended empty\n }\n }\n\n updateDashboardHistory(\n dashboard: Partial<ContextDashboardManagedObject>,\n dashboardCfg: ContextDashboard\n ): Partial<ContextDashboardManagedObject> {\n if (!dashboard.c8y_DashboardHistory) {\n dashboard.c8y_DashboardHistory = [];\n }\n if (isEmpty(dashboardCfg?.historyDescription)) {\n dashboardCfg.historyDescription = { changeType: 'create' };\n }\n\n dashboardCfg.created = new Date().toISOString();\n dashboard.c8y_DashboardHistory = cloneDeep([dashboardCfg, ...dashboard.c8y_DashboardHistory]);\n\n if (dashboard.c8y_DashboardHistory.length > this.VERSION_HISTORY_SIZE_LIMIT) {\n dashboard.c8y_DashboardHistory = [\n ...dashboard.c8y_DashboardHistory.slice(0, this.VERSION_HISTORY_SIZE_LIMIT)\n ];\n }\n\n return dashboard;\n }\n\n activateDashboards(\n route: ActivatedRouteSnapshot,\n types: ContextDashboardType[]\n ): Observable<boolean | Tab[]> {\n const { dashboardId } = route.params;\n if (dashboardId) {\n return this.getDashboard$(dashboardId, types, route.parent.data.contextData).pipe(\n tap(dashboard => {\n route.data = { dashboard };\n }),\n map(() => true),\n catchError(() => {\n return of(false);\n })\n );\n }\n\n const { contextData: mo } = this.contextRouteService.getContextData(route);\n\n this.dashboardTabs$ = this.getTabs$(\n mo as ContextDashboardManagedObject,\n types,\n route?.parent?.data as ContextData\n );\n return this.dashboardTabs$;\n }\n\n getDashboard(name: string, defaultWidgets: Widget[]) {\n const children = this.mapWidgets(defaultWidgets);\n return this.getDashboard$(name, [ContextDashboardType.Named]).pipe(\n throwIfEmpty(),\n catchError(() => {\n if (!this.hasPermissionsToCopyDashboard()) {\n this.alert.warning(\n gettext(\n 'You are viewing a read-only dashboard because you don’t have the necessary permissions to modify it.'\n )\n );\n }\n\n return of(\n this.getDefaultDashboard({\n name,\n children,\n widgetClasses: { 'dashboard-theme-light': true, 'panel-title-regular': true }\n })\n );\n })\n );\n }\n\n updateNavigatorItem(mo: IManagedObject) {\n this.navigator.state.forEach(node => {\n if (node.path === `reports/${mo.id}`) {\n this.navigator.remove(node);\n }\n });\n if (mo.c8y_IsNavigatorNode) {\n const nodeToAdd = new NavigatorNode({\n label: mo.name,\n path: `reports/${mo.id}`,\n icon: mo.icon,\n priority: mo.priority,\n translateLabel: mo.translateDashboardTitle\n });\n this.navigator.add(nodeToAdd);\n }\n }\n\n async navigateToDashboard(dashboardMO: ContextDashboardManagedObject, isNewDashboard = false) {\n if (/\\/dashboard\\//.test(this.router.url)) {\n this.router.navigate(['..', dashboardMO.id], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n } else if (/^\\/(device|group)\\/[0-9]+$/.test(this.router.url)) {\n // in case the add dashboard button is the only tab on that route\n this.router.navigate(['.', this.DASHBOARD_ROUTE_PATH, dashboardMO.id], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n } else if (/^\\/(device|group)\\/[0-9]+\\/device-info$/.test(this.router.url)) {\n this.router.navigate(['.'], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n } else {\n this.router.navigate(['..', this.DASHBOARD_ROUTE_PATH, dashboardMO.id], {\n relativeTo: getActivatedRoute(this.router),\n ...(isNewDashboard && {\n state: { [NEW_DASHBOARD_ROUTER_STATE_PROP]: true }\n })\n });\n }\n }\n\n /**\n * Checks if user is able to edit dashboard according to his roles and dashboard ownership.\n *\n * @param mo - Dashboard managed object.\n * @returns True if user is able to edit dashboard, false if he cannot.\n */\n async canEditDashboard(mo: ContextDashboardManagedObject): Promise<boolean> {\n return await this.permissions.canEdit(this.INVENTORY_ROLES, mo);\n }\n\n /**\n * Checks if user has permissions to copy dashboard according to his roles.\n *\n * @returns True if user has permissions to copy dashboard, false if he cannot.\n */\n hasPermissionsToCopyDashboard(): boolean {\n return this.permissions.hasAnyRole([\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ]);\n }\n\n isNamed(dashboard: Partial<ContextDashboardManagedObject>) {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}`\n ).test(prop)\n );\n }\n\n isReport(dashboard: Partial<ContextDashboardManagedObject>) {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}${this.REPORT_PARTIAL_NAME}`\n ).test(prop)\n );\n }\n\n isDeviceType(dashboard: Partial<ContextDashboardManagedObject>) {\n return some(keys(dashboard), prop => {\n const matchingProp = new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Type}${this.INDEX_SPLIT}`\n ).test(prop);\n if (!matchingProp) {\n return false;\n } else {\n // there might be matching key, but its value can be {} or null\n return !!dashboard[prop];\n }\n });\n }\n\n isDeviceDashboard(dashboard: Partial<ContextDashboardManagedObject>): boolean {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Device}${this.INDEX_SPLIT}`\n ).test(prop)\n );\n }\n\n isGroupDashboard(dashboard: Partial<ContextDashboardManagedObject>): boolean {\n return some(keys(dashboard), prop =>\n new RegExp(\n `^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Group}${this.INDEX_SPLIT}`\n ).test(prop)\n );\n }\n\n getFilteredDashboardStyles(styleList: string[]) {\n return styleList.filter(c =>\n STYLING_CLASS_PREFIXES.some(classPrefix => c.startsWith(classPrefix))\n );\n }\n\n getStyling(styleList, styleName, defaultValue) {\n const styling = styleList.find(\n style => style && new RegExp(`-${styleName}$`, 'i').test(style.class)\n );\n return styling ? styling.class : defaultValue;\n }\n\n mapWidgets(widgets: Widget[]) {\n return keyBy(\n widgets.map(widget => {\n widget.id = String(Math.random()).substr(2);\n return widget;\n }),\n 'id'\n );\n }\n\n getDashboard$(dashboardIdOrName, dashboardType: ContextDashboardType[], mo?: IManagedObject) {\n const cache = this.cache.get(dashboardIdOrName);\n\n const dashboards = mo\n ? this.getContextDashboards(mo, dashboardType)\n : this.getNamedDashboard(dashboardIdOrName);\n\n const cacheRefresh = this.getContextDashboards$(dashboards).pipe(\n tap(dashboard => this.cacheDashboard(dashboard)),\n filter(\n dashboard =>\n dashboard.id === dashboardIdOrName ||\n has(\n dashboard,\n `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}${dashboardIdOrName}`\n )\n )\n );\n return cache ? of(cache) : cacheRefresh;\n }\n\n async pasteDashboard(newContext: DashboardContext): Promise<void> {\n if (this.copyClipboard) {\n try {\n const dashboardToPaste = this.createContextDashboardCopy(\n this.copyClipboard.dashboard,\n newContext.contextData,\n this.copyClipboard.context.contextData\n );\n const dashboard = await this.create(this.clean(dashboardToPaste), newContext);\n\n // linking childAdditions for e.g. to grant access to the images uploaded by the image widget for users with only inventory roles.\n const { data: childAdditions } = await this.inventory.childAdditionsList(\n this.copyClipboard.dashboardId,\n { pageSize: 2000 }\n );\n if (childAdditions.length) {\n await this.inventory.childAdditionsBulkAdd(childAdditions, dashboard.id);\n }\n\n this.copyClipboard = undefined;\n this.navigateToDashboard(dashboard);\n } catch {\n this.alert.warning(gettext('Insufficient permissions for this action.'));\n }\n }\n }\n\n /**\n * Creates fragment that associates dashboards with device/asset. It consists of three elements:\n * - FRAGMENT_NAME - static string\n * - dashboard type (e.g. 'group', 'device')\n * - fragment value ( id of device/asset if it is not typed dashboard; deviceTypeValue property of dashboard if it is type dashboard)\n * Example fragment for device dashboard: 'c8y_Dashboard!device!773200'\n * Example fragment for group dashboard: 'c8y_Dashboard!group!84129208'\n * Example fragment for typed device dashboard: 'c8y_Dashboard!type!c8y_lwm2m_connector_device'\n *\n * @param contextDashboardType Type of dashboard\n * @param value Fragment value\n * @returns Fragment for dashboard\n */\n createFragmentKey<T extends ContextDashboardType, V extends string>(\n contextDashboardType: T,\n value: V\n ) {\n return `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${contextDashboardType}${this.INDEX_SPLIT}${value}` as const;\n }\n\n /**\n * Indicates if dashboard can be set to type dashboard.\n * First, it checks if deviceTypeValue exists and if user has permission to set dashboard type.\n * Then, case from sensor app is checked- dashboard created with sensor app has deviceType set to true but\n * type fragment is missing- we do not support this combination.\n * @param mo Dashboard managed object\n * @param context {ContextData} Current context\n * @returns True if dashboard can be set to type dashboard, false if it is forbidden.\n */\n shouldAllowToSetDashboardType(\n mo: ContextDashboardManagedObject,\n context: ContextData\n ): AllowTypeDashboard {\n // disallow if dashboard managed object or context is missing or context is not device/asset/group\n if (\n !mo ||\n !context?.contextData ||\n (context.context !== ViewContext.Device && context.context !== ViewContext.Group)\n ) {\n return 'disallow';\n }\n\n // if context is asset/group and type dashboard feature is hidden for assets/groups or asset/group has no typ, return disallow\n const typeDashboardHiddenForAssets = this.optionsService.get(\n this.HIDE_TYPE_DASHBOARD_FOR_ASSETS,\n true\n );\n if (\n context.context === ViewContext.Group &&\n (typeDashboardHiddenForAssets || !context.contextData.type)\n ) {\n return 'disallow';\n }\n\n // if user has no permission to change dashboard, return disallow\n if (!this.permissions.hasAnyRole(this.INVENTORY_ROLES)) {\n return 'disallow';\n }\n\n // case from sensor app is checked- dashboard created with sensor app has deviceType set to true but\n // type fragment is missing- we do not support this combination.\n const typeFragment = this.createFragmentKey(\n ContextDashboardType.Type,\n context?.contextData?.type\n );\n if (\n mo?.c8y_Dashboard &&\n mo?.c8y_Dashboard.deviceType &&\n context?.contextData?.type &&\n !mo[typeFragment]\n ) {\n return 'disallow';\n }\n\n // if view context is Device and contextData of this device has no type yet but type dashboard can be set when type is filled,\n // return allow_if_type_filled\n if (\n !context?.contextData?.type &&\n context.context === ViewContext.Device &&\n this.permissions.hasAnyRole(this.INVENTORY_ROLES)\n ) {\n return 'allow_if_type_filled';\n }\n\n return 'allow';\n }\n\n createReport(reportCfg: Partial<IManagedObject>) {\n const report: Partial<IManagedObject> = {};\n Object.assign(report, reportCfg);\n Object.assign(report, { c8y_Report: {} });\n return this.inventory.create(report);\n }\n\n addReportNavigatorNode(report: IManagedObject): void {\n const node = new NavigatorNode({\n label: report.name,\n path: `reports/${report.id}`,\n icon: report.icon,\n priority: report.priority,\n translateLabel: report.translateDashboardTitle\n });\n this.navigator.add(node);\n }\n\n getContextForGS(mo: IManagedObject): string | null {\n if (this.groupService.isDevice(mo)) {\n return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.DEVICE;\n } else if (this.groupService.isAsset(mo)) {\n return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.ASSET;\n } else if (this.groupService.isGroup(mo)) {\n return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.GROUP;\n } else {\n return null;\n }\n }\n\n async getContextDashboards(\n mo: IManagedObject,\n dashboardType: ContextDashboardType[]\n ): Promise<IResultList<IManagedObject>> {\n const filterCriteria = dashboardType.map(t => ({\n // it's necessary to wrap fragment in quotes because dashboard type can contain spaces\n __has: `'${this.createDashboardFragment(mo, t)}'`\n }));\n\n // the has query above does not work for device type dashboards where the type contains a dot\n const typeFilterCriteria =\n dashboardType.includes(ContextDashboardType.Type) && mo.type\n ? {\n __and: [\n { 'c8y_Dashboard.deviceType': { __eq: true } },\n { 'c8y_Dashboard.deviceTypeValue': { __eq: mo.type } }\n ]\n }\n : undefined;\n const finalFilterCriteria = typeFilterCriteria\n ? [...filterCriteria, typeFilterCriteria]\n : filterCriteria;\n\n const query = this.queriesUtil.buildQuery({\n __filter: {\n __and: [{ __or: finalFilterCriteria }, this.appliedToFilter()]\n }\n });\n\n const now = Date.now();\n const cacheHasValidResponse =\n this.contextDashboardsCache &&\n this.contextDashboardsCache.query === query &&\n now - this.contextDashboardsCache.timestamp < this.CACHE_TIMEOUT;\n\n if (cacheHasValidResponse) {\n return this.contextDashboardsCache.result;\n } else {\n this.contextDashboardsCache = null;\n }\n\n this.contextDashboardsCache = {\n query,\n result: this.inventory.list({ query, pageSize: this.DEFAULT_PAGESIZE }),\n timestamp: now\n };\n return this.contextDashboardsCache.result;\n }\n\n appliedToFilter() {\n const key = this.appStateService?.currentApplication?.value?.key || '';\n\n if (!key) {\n return {};\n }\n\n return {\n __or: [\n { __not: { __has: this.APPLIED_TO_FRAGMENT } }, // legacy / unlabeled ⇒ show in all\n { [this.APPLIED_TO_FRAGMENT]: { __in: [key] } }\n ]\n };\n }\n\n /**\n * Creates a tuple describing the dashboard type and its fragments. For assets like devices and groups, it's possible\n * to have two fragments: one indicating this particular device/asset with its ID, and the second indicating\n * the device/asset type (if the dashboard is meant to be applied to all assets of this type).\n *\n * @param dashboardMO - Dashboard managed object.\n * @param context - Context data of asset.\n * @param name - Name of the dashboard.\n * @param isEdit - True if existing dashboard is updated, false when it's creation of new dashboard.\n * @returns Tuple of dashboard type and object containing dashboard fragments.\n */\n private getDashboardFragments(\n dashboardMO: ContextDashboardManagedObject,\n context: ContextData,\n name: string,\n isEdit: boolean\n ): [ContextDashboardType, Record<string, object>] {\n let dashboardType: ContextDashboardType;\n const id = (context?.contextData?.id as string) || '';\n const fragments: Record<string, object> = {};\n\n if (name) {\n // a named dashboard should not receive any other fragments\n dashboardType = ContextDashboardType.Named;\n const namedFragmentKey = this.createFragmentKey(ContextDashboardType.Named, name);\n fragments[namedFragmentKey] = {};\n } else if (context?.context === ViewContext.Device || context?.context === ViewContext.Group) {\n // get base type for device or group\n const defaultType =\n context.context === ViewContext.Device\n ? ContextDashboardType.Device\n : ContextDashboardType.Group;\n dashboardType = dashboardMO.c8y_Dashboard.deviceType\n ? ContextDashboardType.Type\n : defaultType;\n\n // clear fragments from other asset if current asset is not origin of this dashboard\n this.clearRedundantFragment(dashboardMO, defaultType, fragments);\n\n // add base fragment for particular asset\n const deviceOrGroupFragmentKey = this.createFragmentKey(defaultType, id);\n fragments[deviceOrGroupFragmentKey] = {};\n\n // add or clear type fragment\n if (dashboardMO.c8y_Dashboard.deviceType || isEdit) {\n const typeFragmentKey = this.createFragmentKey(\n ContextDashboardType.Type,\n dashboardMO.c8y_Dashboard.deviceTypeValue\n );\n fragments[typeFragmentKey] = dashboardMO.c8y_Dashboard.deviceType ? {} : null;\n }\n }\n\n return [dashboardType, fragments];\n }\n\n /**\n * Clears fragments that originates from other managed object.\n * E.g. typed dashboard is created for device A of type c8y_MQTTDevice and id 1, so it gets fragments object\n * ```ts\n * {\n * c8y_Dashboard!device!1: {},\n * c8y_Dashboard!type!c8y_MQTTDevice: {}\n * }\n *```\n * then, on device B of type c8y_MQTTDevice and id 2, which also has access to this dashboard, deviceType is set to\n * false, so dashboard is not typed dashboard anymore and now belongs to device B, therefore fragments should look like\n * ```ts\n * {\n * c8y_Dashboard!device!1: null, // this value is cleared because dashboard is doesn't belong to device A anymore\n * c8y_Dashboard!device!2: {}, // assign dashboard to device B\n * c8y_Dashboard!type!c8y_MQTTDevice: null // this value is cleared in getDashboardFragments method as it's not typed dashboard anymore\n * }\n * ```\n *\n * @param dashboardMO - Dashboard managed object.\n * @param type - Context dashboard type.\n * @param fragments - Fragments object.\n */\n private clearRedundantFragment(\n dashboardMO: ContextDashboardManagedObject,\n type: ContextDashboardType,\n fragments: Record<string, object>\n ): void {\n Object.keys(dashboardMO)\n .filter(key => key.startsWith(this.createFragmentKey(type, '')))\n .forEach(key => (fragments[key] = null));\n }\n\n /**\n * Used to migrate dashboards from previous 12 columns layout to 24 columns.\n */\n private adjustDashboardFor24Columns<T extends { c8y_Dashboard?: ContextDashboard }>(\n dashboards: T[]\n ): T[];\n private adjustDashboardFor24Columns<T extends { c8y_Dashboard?: ContextDashboard }>(\n dashboards: T\n ): T;\n private adjustDashboardFor24Columns<T extends { c8y_Dashboard?: ContextDashboard }>(\n dashboards: T | T[]\n ): T | T[] {\n if (Array.isArray(dashboards)) {\n return dashboards.map(dashboard => this.adjustDashboardFor24Columns(dashboard));\n }\n // if `columns` attribute exists, dashboard was already adjusted.\n if (dashboards.c8y_Dashboard.columns) {\n return dashboards;\n }\n\n dashboards.c8y_Dashboard.columns = 24;\n if (!dashboards.c8y_Dashboard.children) {\n return dashboards;\n }\n\n // Newly created NamedContextDashboards are still created with 12 columns for backwards compatibility.\n // Default widgets might be already configured for 24 columns.\n // If a widget is already configured for more than 12 columns, we should not adjust it.\n const alreadyHasWidgetsConfiguredForMoreThan12Columns = Object.values(\n dashboards.c8y_Dashboard.children\n ).some(widget => widget._x + widget._width > 12);\n if (alreadyHasWidgetsConfiguredForMoreThan12Columns) {\n return dashboards;\n }\n\n // we need to multiply both _width and _x attributes with 2 to migrate from 12 to 24 columns.\n Object.values(dashboards.c8y_Dashboard.children).forEach(widget => {\n if (widget._width) {\n widget._width = widget._width * 2;\n }\n if (widget._x) {\n widget._x = widget._x * 2;\n }\n });\n return dashboards;\n }\n\n private async serializeWidgetConfigs(dashboard: ContextDashboardManagedObject): Promise<void> {\n const children = cloneDeep(dashboard.c8y_Dashboard.children);\n if (!children) {\n return;\n }\n const configs = Object.values(children);\n const details = configs.map(({ componentId, config }) => ({ componentId, config }));\n const results = await this.dynamicComponent.serializeConfigs(details);\n results.forEach((result, index) => {\n Object.entries(result).forEach(([key, value]) => {\n set(details[index].config, key, value);\n });\n });\n dashboard.c8y_Dashboard.children = children;\n }\n\n private createContextDashboardCopy(\n dash: ContextDashboard,\n newContext: Partial<IManagedObject>,\n oldContext: Partial<IManagedObject>\n ): ContextDashboard {\n const children = reduce(\n dash.children,\n (_children, child) => {\n const { id } = child;\n const cfg = child.config;\n const propertiesToCopy = {\n device: device => this.replaceContextInObj(device, newContext, oldContext),\n datapoints: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext),\n dataPoints: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext),\n datapointsGauge: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext),\n datapointsLabels: dataPoints =>\n this.replaceContextInDataPoints(dataPoints, newContext, oldContext)\n };\n\n if (cfg) {\n this.copyProperties(cfg, propertiesToCopy);\n if (cfg.options) {\n this.copyProperties(cfg.options, propertiesToCopy);\n }\n }\n\n _children[id] = cloneDeep(child);\n return _children;\n },\n {}\n );\n\n dash.children = children;\n\n const isTypeDashboard = dash.deviceType && !!dash.deviceTypeValue;\n if (isTypeDashboard) {\n dash.deviceTypeValue = newContext.type;\n }\n return dash;\n }\n\n private copyProperties(obj, propertiesToCopy) {\n forEach(propertiesToCopy, (copyFn, property) => {\n if (obj[property]) {\n obj[property] = copyFn(obj[property]);\n }\n });\n }\n\n private replaceContextInDataPoints(\n dataPoints,\n newContext: Partial<IManagedObject>,\n oldContext: Partial<IManagedObject>\n ) {\n dataPoints.forEach(dp => {\n dp.__target = this.replaceContextInObj(dp.__target, newContext, oldContext);\n });\n return dataPoints;\n }\n\n private replaceContextInObj(\n obj: Partial<IManagedObject>,\n newContext: Partial<IManagedObject>,\n oldContext: Partial<IManagedObject>\n ) {\n if (obj && obj.id === oldContext.id) {\n Object.assign(obj, pick(newContext, ['id', 'name']));\n }\n return obj;\n }\n\n private getTabs$(\n mo: ContextDashboardManagedObject,\n dashboardType: ContextDashboardType[],\n context?: ContextData\n ) {\n const dashboards = this.getContextDashboards(mo, dashboardType);\n\n return this.getContextDashboards$(dashboards).pipe(\n mergeMap(dashboard => this.verifyDashboardAvailability$(dashboard)),\n // Due to MTM-62321 named context dashboards included fragments for device and groups.\n // therefore some device-info dashboards (from DM app) might occur in cockpit on device level.\n // We need to filter those out..\n filter(([dashboard]) => {\n // list all identifiers of the dashboard (name, device, group, type)\n const dashboardIdentifiers = Object.keys(dashboard)\n .filter(key => key.startsWith(`${this.FRAGMENT_NAME}${this.INDEX_SPLIT}`))\n .map(key => key.split(this.INDEX_SPLIT)[1]);\n // if dashboard is not named, it's safe to include it\n if (!dashboardIdentifiers.includes(ContextDashboardType.Named)) {\n return true;\n }\n // if dashboard is named, but also has a context identifier, we skip it\n if (\n dashboardIdentifiers.includes(ContextDashboardType.Device) ||\n dashboardIdentifiers.includes(ContextDashboardType.Group)\n ) {\n return false;\n }\n\n // all others are good..\n return true;\n }),\n mergeMap(([dashboard]) => this.removeDashboardMoProperty(dashboard)),\n tap(dashboard => this.cacheDashboard(dashboard)),\n map(dashboard => this.createDashboardTab(dashboard, context)),\n toArray()\n );\n }\n\n private verifyDashboardAvailability$(dashboard: ContextDashboardManagedObject) {\n const globalRolesIds = dashboard?.c8y_Dashboard?.globalRolesIds;\n const canEdit = from(\n this.permissions.canEdit(this.INVENTORY_ROLES, dashboard, { skipRequestCheck: true })\n );\n const hasAnyGlobalRole =\n !globalRolesIds || globalRolesIds === ALL_GLOBAL_ROLES_SELECTED\n ? of(true)\n : of(this.permissions.hasAnyGlobalRole(globalRolesIds));\n\n return combineLatest([of(dashboard), canEdit, hasAnyGlobalRole]).pipe(\n filter(([, canEdit, hasAnyGlobalRole]) => canEdit || hasAnyGlobalRole)\n );\n }\n\n private getContextDashboards$(request: Promise<IResultList<IManagedObject>>) {\n return from(request).pipe(\n mergeMap(response =>\n this.adjustDashboardFor24Columns(response.data as ContextDashboardManagedObject[])\n )\n );\n }\n\n /**\n * Cleans already corrupted dashboards from dashboardMo property.\n * Added to fix dashboards on the cloud instance (eu-latest).\n * @deprecated This is going to be removed after 1007.7.0.\n */\n private async removeDashboardMoProperty(\n dashboard: ContextDashboardManagedObject\n ): Promise<ContextDashboardManagedObject> {\n const dashboardCopy = cloneDeep(dashboard);\n const children = get(dashboardCopy, 'c8y_Dashboard.children');\n let updateDashboard = false;\n\n forEach(children, child => {\n if (get(child, 'componentTransformConfigWithContext')) {\n delete child.componentTransformConfigWithContext;\n updateDashboard = true;\n }\n if (get(child, 'config.dashboardMo')) {\n delete child.config.dashboardMo;\n updateDashboard = true;\n }\n });\n\n if (updateDashboard) {\n await this.update(dashboardCopy);\n }\n return dashboardCopy;\n }\n\n private cacheDashboard(dashboard: ContextDashboardManagedObject) {\n this.cache.set(dashboard.id, dashboard);\n }\n\n private createDashboardTab(dashboard: ContextDashboardManagedObject, context?: ContextData) {\n const { c8y_Dashboard: _dashboard, id } = dashboard;\n return {\n icon: _dashboard.icon,\n path: `${this.DASHBOARD_ROUTE_PATH}/${id}`,\n label: _dashboard.name,\n priority: _dashboard.priority,\n hide: this.isReport(dashboard),\n translateLabel: _dashboard.translateDashboardTitle,\n badge:\n _dashboard.deviceType && this.shouldAllowToSetDashboardType(dashboard, context)\n ? gettext('Dashboard template')\n : null,\n tooltipText: _dashboard.description || gettext('Dashboard template')\n } as Tab;\n }\n\n private clean(dashboard) {\n const jsonString = JSON.stringify(dashboard, (key, value) => {\n if (key === '$$hashKey' || key === 'klasses') {\n return undefined;\n }\n\n return value;\n });\n return JSON.parse(jsonString);\n }\n\n private getNamedDashboard(name: string) {\n return this.inventory.list({\n fragmentType: `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}${name}`,\n pageSize: 1\n });\n }\n\n private createDashboardFragment(mo: IManagedObject, type: ContextDashboardType) {\n let value;\n if (mo.c8y_Report) {\n value = `${this.REPORT_PARTIAL_NAME}${mo.id}`;\n } else {\n value = type === ContextDashboardType.Type ? mo.type : mo.id;\n }\n return `${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${type}${this.INDEX_SPLIT}${value}`;\n }\n\n private shouldSetGlobal(dashboard: Partial<ContextDashboardManagedObject>, context?) {\n if (\n (!context && this.isNamed(dashboard) && !this.isReport(dashboard)) ||\n this.isDeviceType(dashboard)\n ) {\n return {};\n }\n return null;\n }\n\n private getDefaultDashboard(dashboardCfg: ContextDashboard): ContextDashboardManagedObject {\n return {\n c8y_Dashboard: {\n ...dashboardCfg,\n name: dashboardCfg.name || 'Default Dashboard',\n description: gettext('This is a default dashboard.')\n },\n [`c8y_Dashboard!name!${dashboardCfg.name}`]: {}\n } as ContextDashboardManagedObject;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport {\n AllowTypeDashboard,\n ContextDashboard,\n DASHBOARD_DETAILS_TABS_OUTLET_NAME,\n DashboardDetailsTabId,\n DashboardGlobalRoles,\n DashboardMetadata\n} from './context-dashboard.model';\nimport { TranslateService } from '@ngx-translate/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Tab, TabsService } from '@c8y/ngx-components';\nimport { map } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nconst DEFAULT_DUPLICATE_WITHOUT_TYPE = () => {\n throw new Error('duplicateWithoutTypeFn Not implemented');\n};\n\nconst DEFAULT_PREVIEW_CHANGED = () => {\n throw new Error('previewChanged Not implemented');\n};\n\nconst DEFAULT_REVERT_TO_DASHBOARD = () => {\n throw new Error('revertToDashboard Not implemented');\n};\n\n@Injectable()\nexport class DashboardDetailService {\n dashboardDetailsForm: ReturnType<DashboardDetailService['createDashboardDetailsForm']>;\n details: DashboardMetadata;\n detailsTabs: Tab[];\n saveButtonDisabled = false;\n get generalSettingsForm() {\n return this.dashboardDetailsForm.get('generalSettingsForm');\n }\n get appearanceSettingsForm() {\n return this.dashboardDetailsForm.get('appearanceSettingsForm');\n }\n get widgetsForm() {\n return this.dashboardDetailsForm.get('widgetsForm');\n }\n\n styling = {\n themeClass: 'dashboard-theme-light',\n headerClass: 'panel-title-regular'\n };\n\n duplicateWithoutTypeFn: () => Promise<void> = DEFAULT_DUPLICATE_WITHOUT_TYPE;\n\n previewChangedFn: (\n dashboardClasses: Pick<ContextDashboard, 'classes' | 'widgetClasses'>\n ) => void = DEFAULT_PREVIEW_CHANGED;\n\n revertToDashboardFn: (dashboard: ContextDashboard) => Promise<void> = DEFAULT_REVERT_TO_DASHBOARD;\n\n readonly DEFAULT_DASHBOARD_MARGIN = 12;\n readonly DEFAULT_DASHBOARD_ICON = 'th';\n readonly DEFAULT_DASHBOARD_PRIORITY = 5000;\n\n constructor(\n private fb: FormBuilder,\n private translateService: TranslateService,\n private tabsService: TabsService\n ) {\n this.tabsService.items$\n .pipe(\n map(tabs => tabs.filter(tab => tab.tabsOutlet === DASHBOARD_DETAILS_TABS_OUTLET_NAME)),\n takeUntilDestroyed()\n )\n .subscribe(tabs => (this.detailsTabs = tabs));\n }\n\n getTabs(): Tab[] {\n let tabs = this.detailsTabs;\n const shouldHideGeneralTab = !(\n (!this.details?.isNamedDashboard && !this.details?.hideAvailability) ||\n this.details?.isReport\n );\n const shouldHideVersionHistoryTab = !this.details?.mo?.c8y_DashboardHistory;\n if (shouldHideGeneralTab) {\n tabs = tabs.filter(tab => tab.featureId !== DashboardDetailsTabId.GENERAL);\n }\n if (shouldHideVersionHistoryTab) {\n tabs = tabs.filter(tab => tab.featureId !== DashboardDetailsTabId.VERSIONHISTORY);\n }\n return tabs;\n }\n\n /**\n * Initializes dashboard details form.\n * @param dashboard Context dashboard object\n * @param isReport True if its report dashboard\n * @param allowTypeDashboard Allow to make dashboard type dashboard\n * @returns Dashboard details form\n */\n initForm(\n dashboard: ContextDashboard,\n isReport: boolean,\n allowTypeDashboard: AllowTypeDashboard\n ): void {\n this.dashboardDetailsForm = this.createDashboardDetailsForm(\n dashboard,\n isReport,\n allowTypeDashboard\n );\n }\n\n reset() {\n this.dashboardDetailsForm = null;\n this.details = null;\n this.duplicateWithoutTypeFn = DEFAULT_DUPLICATE_WITHOUT_TYPE;\n this.previewChangedFn = DEFAULT_PREVIEW_CHANGED;\n this.revertToDashboardFn = DEFAULT_REVERT_TO_DASHBOARD;\n }\n\n /**\n * Creates dashboard details form divided into two groups- general settings and appearance settings.\n * @param dashboard Context dashboard object\n * @param isReport True if its report dashboard\n * @param allowTypeDashboard Allow to make dashboard type dashboard\n * @returns Dashboard details form\n */\n private createDashboardDetailsForm(\n dashboard: ContextDashboard,\n isReport: boolean,\n allowTypeDashboard: AllowTypeDashboard\n ) {\n return this.fb.group({\n generalSettingsForm: this.createGeneralSettingsForm(dashboard, isReport, allowTypeDashboard),\n appearanceSettingsForm: this.createAppearanceSettingsForm(dashboard),\n widgetsForm: this.createWidgetsForm(dashboard)\n });\n }\n /**\n * Creates form group for general settings of dashboard.\n * @param dashboard Context dashboard object\n * @param isReport True if its report dashboard\n * @param allowTypeDashboard Allow to make dashboard type dashboard\n * @returns Dashboard general settings form\n */\n private createGeneralSettingsForm(\n dashboard: ContextDashboard,\n isReport: boolean,\n allowTypeDashboard: AllowTypeDashboard\n ) {\n const globalRolesIdsValue: DashboardGlobalRoles = !dashboard?.globalRolesIds\n ? null\n : Array.isArray(dashboard.globalRolesIds)\n ? [...dashboard.globalRolesIds]\n : dashboard.globalRolesIds;\n return this.fb.group({\n icon: [dashboard?.icon || this.DEFAULT_DASHBOARD_ICON, [Validators.minLength(1)]],\n priority: [\n dashboard?.priority || this.DEFAULT_DASHBOARD_PRIORITY,\n [Validators.min(-10000), Validators.max(10000), Validators.required]\n ],\n name: [\n dashboard?.name ||\n (isReport\n ? this.translateService.instant(gettext('Report'))\n : this.translateService.instant(gettext('Dashboard'))),\n [Validators.required, Validators.maxLength(512)]\n ],\n description: [dashboard?.description || null, [Validators.maxLength(1_000)]],\n globalRolesIds: this.fb.control<DashboardGlobalRoles>(globalRolesIdsValue), // calling this.fb.control to cast type\n c8y_IsNavigatorNode: [!!dashboard?.c8y_IsNavigatorNode],\n ...(allowTypeDashboard !== 'disallow' && {\n deviceType: [\n {\n value: dashboard?.deviceType ?? false,\n disabled: allowTypeDashboard === 'allow_if_type_filled'\n }\n ]\n })\n });\n }\n /**\n * Creates form group for appearance settings of dashboard.\n * @param dashboard Context dashboard object\n * @returns Dashboard appearance settings form\n */\n private createAppearanceSettingsForm(dashboard: ContextDashboard) {\n return this.fb.group({\n widgetMargin: [\n dashboard?.widgetMargin || this.DEFAULT_DASHBOARD_MARGIN,\n [Validators.min(0), Validators.max(50)]\n ],\n translateWidgetTitle: [!!dashboard?.translateWidgetTitle],\n translateDashboardTitle: [dashboard?.translateDashboardTitle ?? true],\n classes: dashboard?.classes || { [this.styling.themeClass]: true },\n widgetClasses: dashboard?.widgetClasses || { [this.styling.headerClass]: true }\n });\n }\n\n private createWidgetsForm(dashboard: ContextDashboard) {\n return this.fb.group({\n children: dashboard?.children || {}\n });\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AppStateService,\n ContextData,\n ContextRouteService,\n GainsightService,\n GroupService,\n memoize,\n ModalService,\n Status,\n Tab,\n TabsService,\n TabsOutletComponent,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { clone, cloneDeep, isEqual } from 'lodash-es';\nimport { Subject } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport {\n AllowTypeDashboard,\n ContextDashboard,\n ContextDashboardManagedObject,\n DASHBOARD_DETAILS_OUTLET,\n DASHBOARD_DETAILS_TABS_OUTLET_NAME,\n DASHBOARD_SETTINGS_CHANGES,\n DashboardHistoryDescription,\n PRODUCT_EXPERIENCE,\n REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY\n} from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { DashboardDetailService } from './dashboard-detail.service';\nimport { CollapseDirective } from 'ngx-bootstrap/collapse';\nimport { NgIf } from '@angular/common';\nimport { newDashboardTab } from './new-dashboard.guard';\n\n@Component({\n selector: 'c8y-dashboard-detail',\n templateUrl: './dashboard-detail.component.html',\n providers: [DashboardDetailService],\n imports: [CollapseDirective, NgIf, TabsOutletComponent, RouterOutlet, C8yTranslatePipe]\n})\nexport class DashboardDetailComponent implements OnInit, OnChanges, OnDestroy {\n isCollapsed = true;\n currentContext: ContextData;\n currentDashboard: ContextDashboard;\n @Input() isReport: boolean;\n @Input() deviceType: string;\n @Input() context: any;\n @Input() mo: ContextDashboardManagedObject;\n @Input() dashboard: ContextDashboard;\n @Input() isNamedDashboard: boolean;\n @Input() hideAvailability = false;\n deviceTypeValue: string;\n displayDeviceTypeValue: string;\n icons: string[];\n dashboardDetailsForm: ReturnType<DashboardDetailService['createDashboardDetailsForm']>;\n allowTypeDashboard: AllowTypeDashboard;\n isEdit: boolean;\n tabs: Tab[] = [];\n @Output() dashboardSaved = new EventEmitter<ContextDashboard>();\n @Output() previewChanged = new EventEmitter<any>();\n private destroy$: Subject<void> = new Subject();\n\n readonly TABS_OUTLET_NAME = DASHBOARD_DETAILS_TABS_OUTLET_NAME;\n\n constructor(\n private contextDashboardService: ContextDashboardService,\n private translateService: TranslateService,\n private contextRoute: ContextRouteService,\n private activatedRoute: ActivatedRoute,\n private tabsService: TabsService,\n private router: Router,\n private inventory: InventoryService,\n private route: ActivatedRoute,\n public dashboardDetailService: DashboardDetailService,\n private appState: AppStateService,\n private groupService: GroupService,\n private modal: ModalService,\n private gainsightService: GainsightService\n ) {}\n\n async ngOnInit() {\n this.currentContext = this.contextRoute.getContextData(this.activatedRoute);\n this.deviceTypeValue = this.context?.type;\n this.displayDeviceTypeValue =\n this.context &&\n this.groupService.isGroup(this.context) &&\n !this.groupService.isAsset(this.context)\n ? this.translateService.instant(gettext('Group'))\n : this.deviceTypeValue;\n\n this.updateAllowTypeDashboard();\n this.initForm();\n await this.clearNamedOutletPath(); // on init this component collapsed, but outlet may occur in URL when reloading page\n }\n\n ngOnChanges(): void {\n this.updateAllowTypeDashboard();\n this.refreshDashboardDetails();\n }\n\n ngAfterContentInit(): void {\n if (!this.isEdit) {\n this.initializeConfiguration();\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n this.dashboardDetailService.reset();\n }\n\n async save() {\n const oldDashboard = cloneDeep(this.dashboard);\n this.dashboard = {\n ...this.dashboard,\n ...this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').value,\n ...this.dashboardDetailService.dashboardDetailsForm.get('appearanceSettingsForm').value,\n ...this.dashboardDetailService.dashboardDetailsForm.get('widgetsForm').value,\n c8y_IsNavigatorNode: this.dashboardDetailService.dashboardDetailsForm.get(\n 'generalSettingsForm'\n ).value.c8y_IsNavigatorNode\n ? {}\n : this.currentDashboard\n ? null\n : undefined\n };\n const dashboardSettingChanges: string[] = Object.keys(this.dashboard).filter(key => {\n if (key === 'c8y_IsNavigatorNode') {\n return !!oldDashboard[key] !== !!this.dashboard[key];\n }\n return !isEqual(oldDashboard[key], this.dashboard[key]);\n });\n\n this.dashboard.author = this.appState.currentUser.value.userName;\n\n this.dashboard.deviceTypeValue ??= this.deviceTypeValue;\n this.dashboard.historyDescription =\n this.updateDashboardHistoryDescription(dashboardSettingChanges);\n\n if (!this.isEdit && !this.isReport) {\n await this.createNewDashboard();\n } else if (!this.isEdit && this.isReport) {\n await this.createNewReport();\n } else {\n await this.updateDashboard();\n this.mo.c8y_DashboardHistory = [\n this.dashboard,\n ...(this.mo?.c8y_DashboardHistory ? this.mo.c8y_DashboardHistory : [])\n ];\n }\n }\n\n updateDashboardHistoryDescription(dashboardChanges: string[]): DashboardHistoryDescription {\n return {\n changeType: this.isEdit ? 'update' : 'create',\n dashboardSettingChanges: dashboardChanges\n .filter(value => value !== 'deviceType')\n .map(value => DASHBOARD_SETTINGS_CHANGES[value] || value),\n deviceType: dashboardChanges.find(value => value === 'deviceType')\n ? this.dashboard.deviceType\n : undefined\n };\n }\n\n async cancel() {\n if (!this.isEdit && !this.isReport) {\n // dashboard creation in it's own tab- confirm and cleanup triggered in canDeactivate during routing\n this.tabsService.items$.pipe(first()).subscribe((tabs: Tab[]) => {\n const tab = tabs.find(t => t.featureId !== newDashboardTab.featureId);\n this.router.navigate(typeof tab.path === 'string' ? [tab.path] : tab.path, {\n replaceUrl: true\n });\n });\n return;\n } else if (!this.isEdit && this.isReport) {\n this.router.navigate(['reports']);\n return;\n } else if (\n this.dashboardDetailService.dashboardDetailsForm.dirty &&\n !(await this.confirmClosing())\n ) {\n return;\n }\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n }\n\n async canDeactivate(omitConfirm = false): Promise<boolean> {\n let canDeactivate: boolean;\n if (this.isCollapsed || !this.dashboardDetailService.dashboardDetailsForm.dirty) {\n canDeactivate = true;\n } else {\n if (omitConfirm) {\n canDeactivate = false;\n } else {\n canDeactivate = await this.confirmClosing();\n }\n }\n if (canDeactivate) {\n this.cleanupAfterDetailsClose();\n }\n return canDeactivate;\n }\n\n show(isEdit: boolean) {\n this.isEdit = isEdit;\n if (this.isEdit) {\n this.edit();\n }\n this.initForm();\n this.isCollapsed = false;\n this.refreshDashboardDetails();\n }\n\n async revertDashboard(dashboard: ContextDashboard) {\n this.dashboard = dashboard;\n this.dashboard.c8y_IsNavigatorNode = this.dashboard.c8y_IsNavigatorNode\n ? {}\n : this.currentDashboard\n ? null\n : undefined;\n await this.updateDashboard();\n }\n\n async duplicateWithoutType(): Promise<void> {\n const newDashboardName = this.translateService.instant(gettext('{{ dashboardName }} (copy)'), {\n dashboardName:\n this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').value.name\n });\n this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').patchValue({\n ...this.dashboardDetailService.dashboardDetailsForm.get('generalSettingsForm').value,\n deviceType: false,\n name: newDashboardName\n });\n // setting edition to false so new dashboard can be created as copy of current one\n this.isEdit = false;\n await this.save();\n }\n\n private updateAllowTypeDashboard(): void {\n this.allowTypeDashboard = this.contextDashboardService.shouldAllowToSetDashboardType(\n this.mo,\n this.currentContext\n );\n }\n\n private initForm(): void {\n this.dashboardDetailService.initForm(this.dashboard, this.isReport, this.allowTypeDashboard);\n this.dashboardDetailsForm = this.dashboardDetailService.dashboardDetailsForm;\n }\n\n private async confirmClosing(): Promise<boolean> {\n try {\n await this.modal.confirm(\n gettext('Close dashboard details'),\n gettext(\n 'Are you sure you want to close dashboard details? All unsaved changes will be lost.'\n ),\n Status.WARNING,\n {\n ok: gettext('Close'),\n cancel: gettext('Cancel')\n }\n );\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private async createNewDashboard() {\n const mo: ContextDashboardManagedObject = await this.contextDashboardService.create(\n this.dashboard,\n this.currentContext,\n this.isNamedDashboard ? this.dashboard.name : undefined\n );\n\n await this.onCreateGSEvent(mo);\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n await this.contextDashboardService.navigateToDashboard(mo, true);\n }\n\n private async onCreateGSEvent(mo: ContextDashboardManagedObject) {\n const parentName = await this.convertStringToHash(this.context?.name);\n const dashboardName = await this.convertStringToHash(this.dashboard?.name);\n\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_DASHBOARD,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,\n name: dashboardName,\n id: mo.id,\n nameId: `${dashboardName}_${this.mo.id}`,\n isDashboardTemplate: mo.c8y_Dashboard.deviceType,\n parentAssetId: this.context?.id ? this.context.id : 'noContext',\n parentAssetName: this.context?.id ? parentName : 'noContext',\n parentAssetType: this.context?.id ? this.context.type : 'noContext',\n parentAssetNameId: this.context?.id ? `${parentName}_${this.context.id}` : 'noContext',\n parentAssetNameDashboardName: this.context?.id\n ? `${parentName}_${dashboardName}`\n : 'noContext',\n parentAssetIdDashboardId: this.context?.id ? `${this.context.id}_${this.mo.id}` : 'noContext',\n parentAssetNameDashboardId: this.context?.id ? `${parentName}_${this.mo.id}` : 'noContext',\n parentAssetNameIdDashboardNameId: this.context?.id\n ? `${parentName}_${this.context.id}_${dashboardName}_${this.mo.id}`\n : 'noContext',\n dashboardType: mo.c8y_Dashboard.deviceType ? mo.c8y_Dashboard.deviceTypeValue : null,\n context: this.contextDashboardService.getContextForGS(\n this.currentContext?.contextData as IManagedObject\n )\n });\n }\n\n @memoize()\n private async convertStringToHash(str: string) {\n if (!str) {\n return null;\n }\n return (await this.gainsightService.shouldSendPiiData())\n ? str\n : await this.gainsightService.hashGroupName(str);\n }\n\n private async createNewReport() {\n try {\n const { name, icon, c8y_IsNavigatorNode, priority, description, translateDashboardTitle } =\n this.dashboard;\n const report = (\n await this.contextDashboardService.createReport({\n name,\n icon,\n c8y_IsNavigatorNode,\n priority,\n description,\n translateDashboardTitle\n } as Partial<IManagedObject>)\n ).data;\n\n await this.contextDashboardService.create(\n this.dashboard,\n undefined,\n `${this.contextDashboardService.REPORT_PARTIAL_NAME}${report.id}`\n );\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_REPORT,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,\n name: report.name,\n id: report.id,\n context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT\n });\n if (report.c8y_IsNavigatorNode) {\n this.contextDashboardService.addReportNavigatorNode(report);\n }\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n await this.router.navigate(['reports', report.id]);\n } catch (ex) {\n // intended empty\n }\n }\n\n private async updateDashboard() {\n try {\n const dashboardMO: ContextDashboardManagedObject = cloneDeep(this.mo);\n const cfg = this.dashboard;\n if (this.isReport) {\n const { name, icon, c8y_IsNavigatorNode, priority, description, translateDashboardTitle } =\n cfg;\n dashboardMO.c8y_Dashboard = cfg;\n await this.updateReport({\n id: this.context.id,\n name,\n icon,\n c8y_IsNavigatorNode,\n priority,\n description,\n translateDashboardTitle\n });\n } else {\n dashboardMO.c8y_Dashboard = cfg;\n }\n\n const updatedDashboardMo = await this.contextDashboardService.update(\n dashboardMO,\n this.currentContext\n );\n await this.clearNamedOutletPath();\n this.cleanupAfterDetailsClose();\n\n this.dashboardSaved.emit(updatedDashboardMo);\n } catch (ex) {\n // intended empty\n }\n }\n\n private edit() {\n if (this.isReport) {\n const { name, icon, priority, c8y_IsNavigatorNode, description } = this.context;\n Object.assign(this.dashboard, { name, icon, priority, c8y_IsNavigatorNode, description });\n }\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n const defaultDashboardCfg: Partial<ContextDashboard> = {\n name: this.translateService.instant(this.isReport ? gettext('Report') : gettext('Dashboard')),\n priority: this.isReport\n ? REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY\n : this.dashboardDetailService.DEFAULT_DASHBOARD_PRIORITY,\n icon: this.dashboardDetailService.DEFAULT_DASHBOARD_ICON,\n deviceTypeValue: this.deviceType,\n columns: 24\n };\n\n if (this.dashboard) {\n this.currentDashboard = clone(this.dashboard);\n } else {\n this.dashboard = defaultDashboardCfg;\n this.dashboardDetailService.dashboardDetailsForm.markAsDirty();\n }\n }\n\n private async updateReport(mo: Partial<IManagedObject>) {\n mo.c8y_IsNavigatorNode = mo.c8y_IsNavigatorNode ? {} : null;\n const res = await this.inventory.update(mo);\n this.context = res.data;\n if (this.route.parent) {\n this.route.parent.snapshot.data.contextData = this.context;\n }\n this.contextDashboardService.updateNavigatorItem(res.data);\n }\n\n private cleanupAfterDetailsClose() {\n this.isCollapsed = true;\n if (!this.isEdit) {\n const dashboardContext = this.route.snapshot.data.dashboard;\n // hide New dashboard tab\n const tmpNewDashboardTab = [...this.tabsService.state].find(\n t => t.featureId === newDashboardTab.featureId\n );\n // don't hide the new dashboard tab when clicking on the add dashboard button from another dashboard.\n if (!tmpNewDashboardTab || dashboardContext?.c8y_Dashboard) {\n return;\n }\n // hide tab and make it appear as last one to prevent navigating to it\n tmpNewDashboardTab.hide = true;\n tmpNewDashboardTab.priority = -Infinity;\n this.tabsService.refresh();\n }\n this.previewChanged.emit(this.dashboard);\n }\n\n private async clearNamedOutletPath() {\n if (\n this.activatedRoute.snapshot?.children?.[0]?.routeConfig.outlet === DASHBOARD_DETAILS_OUTLET\n ) {\n await this.router.navigate(\n [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: null\n }\n }\n ],\n { queryParamsHandling: 'preserve', relativeTo: this.activatedRoute }\n );\n }\n }\n\n private refreshDashboardDetails() {\n this.dashboardDetailService.details = {\n isReport: this.isReport,\n isNamedDashboard: this.isNamedDashboard,\n hideAvailability: this.hideAvailability,\n dashboard: this.dashboard,\n deviceTypeValue: this.deviceType,\n displayDeviceTypeValue: this.displayDeviceTypeValue,\n mo: this.mo,\n allowTypeDashboard: this.allowTypeDashboard,\n isDevice: !!this.context?.c8y_IsDevice,\n context: this.context\n };\n this.dashboardDetailService.duplicateWithoutTypeFn = () => this.duplicateWithoutType();\n this.dashboardDetailService.previewChangedFn = dashboardClasses =>\n this.previewChanged.emit(dashboardClasses);\n this.dashboardDetailService.revertToDashboardFn = dashboard => this.revertDashboard(dashboard);\n this.tabs = this.dashboardDetailService.getTabs();\n }\n}\n","<div\n class=\"collapse c8y-top-drawer\"\n [collapse]=\"isCollapsed\"\n [isAnimated]=\"true\"\n>\n <div class=\"p-t-16 p-b-16 p-l-24 p-r-24 separator-bottom\">\n <span class=\"h4\">{{ 'Dashboard settings' | translate }}</span>\n </div>\n\n <div\n class=\"d-flex\"\n *ngIf=\"!isCollapsed\"\n >\n <c8y-tabs-outlet\n class=\"c8y-top-drawer--tabs\"\n [tabs]=\"tabs\"\n [outletName]=\"TABS_OUTLET_NAME\"\n [orientation]=\"'vertical'\"\n [openFirstTab]=\"true\"\n ></c8y-tabs-outlet>\n\n <div\n class=\"inner-scroll c8y-top-drawer__tabs-container flex-grow p-l-24 p-r-lg-32 p-r-xs-24 p-r-sm-24\"\n >\n <router-outlet name=\"dashboard-details\"></router-outlet>\n </div>\n </div>\n\n <div class=\"c8y-top-drawer--footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"dashboard-detail--cancel-dashboard\"\n (click)=\"cancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n data-cy=\"dashboard-detail--save-dashboard\"\n (click)=\"save()\"\n [disabled]=\"((dashboardDetailsForm?.invalid || dashboardDetailsForm?.pristine) && this.isEdit) || dashboardDetailService.saveButtonDisabled\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</div>\n","import { Injectable } from '@angular/core';\nimport { DashboardChildrenState } from '../context-dashboard.model';\nimport { cloneDeep } from 'lodash-es';\n\n/**\n * Holds current state of dashboard children during edit mode.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DashboardOriginatorService {\n /**\n * Current dashboard children state name for indicating what change will be undone.\n */\n get currentStateName(): string {\n return this.state?.name;\n }\n /**\n * Current dashboard children state.\n * @private\n */\n private state: DashboardChildrenState;\n /**\n * Initializes dashboard children state on edit mode start.\n * @param state Dashboard children initial state.\n */\n initState(state: DashboardChildrenState): void {\n this.state = state;\n }\n /**\n * Updates dashboard children state when it is changed or restored with undo/redo.\n * @param state Dashboard children updated state.\n */\n setState(state: DashboardChildrenState): void {\n this.state = state;\n }\n /**\n * Returns copy of current state.\n */\n getState(): DashboardChildrenState {\n return cloneDeep(this.state);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DashboardChildrenState } from '../context-dashboard.model';\nimport { DashboardOriginatorService } from './dashboard-originator.service';\n\n/**\n * Caretaker is responsible for undo and redo functionalities.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DashboardCaretakerService {\n /**\n * Current undo stack length for defining undo button disable state.\n */\n get undoStackLength(): number {\n return this.undoStack.length;\n }\n /**\n * Redo stack latest item for defining redo button disable state and its' title.\n */\n get redoStackLastItem(): DashboardChildrenState {\n return this.redoStack[this.redoStack.length - 1];\n }\n /**\n * List of dashboard children changes.\n * @private\n */\n private undoStack: DashboardChildrenState[] = [];\n /**\n * List of dashboard children changes that were undone and can be redone back.\n * @private\n */\n private redoStack: DashboardChildrenState[] = [];\n\n constructor(private originator: DashboardOriginatorService) {}\n /**\n * Adds current dashboard children state to undo stack and clears redo stack.\n */\n backup(): void {\n this.undoStack.push(this.originator.getState());\n this.redoStack = [];\n }\n /**\n * Reverts last dashboard children change and puts it in redo stack.\n * @returns Current state of dashboard children after reverting last change.\n */\n undo(): DashboardChildrenState | undefined {\n if (!this.undoStack.length) {\n return;\n }\n const memento = this.undoStack.pop();\n this.redoStack.push(this.originator.getState());\n\n this.originator.setState(memento);\n return memento;\n }\n /**\n * Applies previously undone change.\n * @returns Current state of dashboard children after applying previously undone change.\n */\n redo(): DashboardChildrenState | undefined {\n if (!this.redoStack.length) {\n return;\n }\n this.undoStack.push(this.originator.getState());\n const memento = this.redoStack.pop();\n\n this.originator.setState(memento);\n return memento;\n }\n /**\n * Clears both undo and redo stack, sets current state as initial state and returns initial state.\n * @returns Initial state of dashboard children.\n */\n reset() {\n const initialItem = this.undoStack[0] || this.originator.getState();\n this.undoStack = [];\n this.redoStack = [];\n this.originator.initState(initialItem);\n return initialItem;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DashboardOriginatorService } from './dashboard-originator.service';\nimport { DashboardCaretakerService } from './dashboard-caretaker.service';\nimport { DashboardChildrenState } from '../context-dashboard.model';\n/**\n * Facade for implementation of Memento design pattern (caretaker, originator). Responsible for undo/redo feature\n * during edit mode of dashboard.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DashboardEditModeService {\n get undoButtonDisabled(): boolean {\n return this.caretaker.undoStackLength === 0;\n }\n /**\n * Current dashboard change name for undo button title.\n */\n get changeToUndoName(): string {\n return this.originator.currentStateName;\n }\n /**\n * Redo stack latest item for defining redo button disable state and its title.\n */\n get redoStackLastItem(): DashboardChildrenState {\n return this.caretaker.redoStackLastItem;\n }\n\n constructor(\n private originator: DashboardOriginatorService,\n private caretaker: DashboardCaretakerService\n ) {}\n /**\n * Initializes dashboard children state on edit mode start.\n * @param state Dashboard children initial state.\n */\n init(state: DashboardChildrenState) {\n this.originator.initState(state);\n }\n /**\n * Saves current state for further undo actions and sets new dashboard children state.\n * @param state Dashboard children updated state.\n */\n newState(state: DashboardChildrenState) {\n this.caretaker.backup();\n this.originator.setState(state);\n }\n /**\n * Returns copy of current state.\n */\n getCurrentState(): DashboardChildrenState {\n return this.originator.getState();\n }\n /**\n * Reverts last dashboard children change.\n * @returns Current state of dashboard children after reverting last change.\n */\n undo(): DashboardChildrenState {\n return this.caretaker.undo();\n }\n /**\n * Applies previously undone change.\n * @returns Current state of dashboard children after applying previously undone change.\n */\n redo(): DashboardChildrenState {\n return this.caretaker.redo();\n }\n /**\n * Resets dashboard children state to initial one and returns initial state.\n * @returns Initial state of dashboard children.\n */\n reset(): DashboardChildrenState {\n return this.caretaker.reset();\n }\n}\n","import { InjectionToken, Injector, Type } from '@angular/core';\nimport {\n ExtensionFactory,\n GenericHookOptions,\n GenericHookType,\n hookGeneric\n} from '@c8y/ngx-components';\n\n/**\n * A hook to add dynamic configurations to any widget configuration.\n * @deprecated Consider using the `hookWidgetConfig` function instead.\n */\nexport const HOOK_WIDGET_CONFIG = new InjectionToken<WidgetConfigSectionDefinition[]>(\n 'HOOK_WIDGET_CONFIG'\n);\n\n/**\n * An extension HOOK can use either a pure value:\n * ```typescript\n * { provide: HOOK_X, useValue: { ...hookValue }, multi: true }\n * ```\n *\n * Or an array to directly register multiple:\n * ```typescript\n * { provide: HOOK_X, useValue: [{ ...hookValue1 }, { ...hookValue2 }], multi: true }\n * ```\n *\n * Or an ExtensionFactory which allows to define a get() function. This function\n * gets called on each navigation with the current route and can return values\n * async (observable or promise).\n * ```typescript\n * { provide: HOOK_X, useFactory: { get: (route) => doSomethingAsync(route) }, multi: true }\n * ```\n */\nexport type WidgetConfigSectionExtension =\n | WidgetConfigSectionDefinition\n | WidgetConfigSectionDefinition[]\n | ExtensionFactory<WidgetConfigSectionDefinition>;\n\n/**\n * A hook to add dynamic components to the UI (e.g. widgets).\n *\n * You can either provide a single `DynamicComponentDefinition` as parameter:\n * ```typescript\n * hookWidgetConfig(...)\n * ```\n *\n * Or an array to directly register multiple:\n * ```typescript\n * hookWidgetConfig([...])\n * ```\n *\n * Or you provide an Service that implements `ExtensionFactory<DynamicComponentDefinition>`\n * ```typescript\n * export class MyDynamicComponentDefinitionFactory implements ExtensionFactory<DynamicComponentDefinition> {...}\n * ...\n * hookWidgetConfig(MyDynamicComponentDefinitionFactory)\n * ```\n * A typed alternative to `HOOK_WIDGET_CONFIG`.\n * @param components The `DynamicComponentDefinition`'s or `ExtensionFactory` to be provided.\n * @returns An `Provider` to be provided in your module.\n */\nexport function hookWidgetConfig<T = Type<any>>(\n components: GenericHookType<WidgetConfigSectionDefinition<T>>,\n options?: Partial<GenericHookOptions>\n) {\n return hookGeneric<WidgetConfigSectionDefinition<T>>(components, HOOK_WIDGET_CONFIG, options);\n}\n\nexport interface WidgetConfigSectionDefinition<T = any> extends WidgetConfigSectionBase<T> {\n /**\n * The dynamic component id this configuration applies to.\n */\n widgetId: string;\n\n /**\n * The component to load.\n */\n loadComponent: () => Promise<Type<T>>;\n}\n\nexport interface WidgetConfigSection<T = Type<any>> extends WidgetConfigSectionBase<T> {\n /**\n * The component to load.\n */\n component: T;\n providers?: Type<unknown>[];\n}\n\nexport interface WidgetConfigSectionBase<T> {\n /**\n * The label to show as headline of the section\n */\n label: string;\n /**\n * The priority. Default settings from hookWidget will have priority 0.\n */\n priority?: number;\n /**\n * Defines if the section should be by default expanded or collapsed.\n */\n expanded?: boolean;\n /**\n * The initial state.\n */\n initialState?: Partial<T>;\n /**\n * The injector to be used.\n */\n injector?: Injector;\n /**\n * Additional providers to be used only in scope of the configuration. If same Providers are\n * provided multiple times, only one is used.\n */\n providers?: Type<unknown>[] | (() => Promise<Type<unknown>[]>);\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n ExtensionPointForPlugins,\n fromTriggerOnce,\n getInjectedHooks,\n PluginsResolveService,\n stateToFactory\n} from '@c8y/ngx-components';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, shareReplay } from 'rxjs/operators';\nimport { HOOK_WIDGET_CONFIG, WidgetConfigSectionDefinition } from './widget-config-hook.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WidgetConfigSectionService extends ExtensionPointForPlugins<WidgetConfigSectionDefinition> {\n constructor(\n rootInjector: Injector,\n private router: Router,\n private plugins: PluginsResolveService\n ) {\n super(rootInjector, plugins);\n this.items$ = this.setupItemsObservable();\n }\n\n get state() {\n return this.state$.value;\n }\n\n add(component: WidgetConfigSectionDefinition) {\n this.state.add(component);\n this.emitNewState();\n }\n\n remove(component: WidgetConfigSectionDefinition) {\n this.state.delete(component);\n this.emitNewState();\n }\n\n protected setupItemsObservable(): Observable<WidgetConfigSectionDefinition[]> {\n return fromTriggerOnce<WidgetConfigSectionDefinition>(\n this.router,\n this.refresh$,\n [\n getInjectedHooks<WidgetConfigSectionDefinition>(HOOK_WIDGET_CONFIG, this.injectors),\n () => this.factories,\n stateToFactory(this.state$)\n ],\n false\n ).pipe(distinctUntilChanged(), shareReplay(1));\n }\n}\n","import { Component, Input, TemplateRef } from '@angular/core';\nimport {\n C8yComponentOutlet,\n ListGroupModule,\n IconDirective,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { WidgetConfigSection } from '../widget-config-hook/widget-config-hook.model';\nimport { CommonModule, NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'c8y-widget-config-section',\n templateUrl: './widget-config-section.component.html',\n standalone: true,\n imports: [\n ListGroupModule,\n C8yComponentOutlet,\n IconDirective,\n NgTemplateOutlet,\n CommonModule,\n C8yTranslatePipe\n ]\n})\nexport class WidgetConfigSectionComponent {\n @Input() section: WidgetConfigSection;\n\n feedbackTemplate: TemplateRef<any>;\n\n setFeedbackTemplate(template: TemplateRef<any>) {\n this.feedbackTemplate = template;\n }\n}\n","<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-grow flex-no-shrink\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n","import { AfterViewInit, Component, inject, TemplateRef, ViewChild } from '@angular/core';\nimport { WidgetConfigSectionComponent } from './widget-config-section.component';\n\n@Component({\n selector: 'c8y-widget-config-feedback',\n templateUrl: './widget-config-feedback.component.html',\n standalone: true,\n imports: [WidgetConfigSectionComponent]\n})\nexport class WidgetConfigFeedbackComponent implements AfterViewInit {\n widgetSection = inject(WidgetConfigSectionComponent);\n @ViewChild(TemplateRef) template: TemplateRef<any>;\n\n ngAfterViewInit(): void {\n this.widgetSection.setFeedbackTemplate(this.template);\n }\n}\n","<ng-template #tpl>\n <ng-content></ng-content>\n</ng-template>\n","import { AsyncPipe, NgClass, NgIf } from '@angular/common';\nimport { Component, inject, Input } from '@angular/core';\nimport { ControlContainer, FormsModule, NgForm } from '@angular/forms';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport {\n AlertService,\n C8yTranslateDirective,\n C8yTranslatePipe,\n IconDirective\n} from '@c8y/ngx-components';\nimport {\n AssetSelectionChangeEvent,\n AssetSelectorModule,\n AssetSelectorOptions\n} from '@c8y/ngx-components/assets-navigator';\nimport { ContextWidgetConfig } from '../context-dashboard.model';\nimport { WidgetConfigService } from '../widget-config.service';\nimport { WidgetConfigFeedbackComponent } from './widget-config-feedback.component';\nimport { WidgetConfigSectionComponent } from './widget-config-section.component';\nimport { gettext } from '@c8y/ngx-components/gettext';\n@Component({\n selector: 'c8y-widget-asset-selector',\n templateUrl: './widget-asset-selector.component.html',\n host: { class: 'bg-level-1' },\n standalone: true,\n imports: [\n AssetSelectorModule,\n AsyncPipe,\n WidgetConfigFeedbackComponent,\n NgIf,\n NgClass,\n C8yTranslatePipe,\n IconDirective,\n FormsModule,\n C8yTranslateDirective\n ],\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\n})\nexport class WidgetAssetSelectorComponent {\n widgetConfigService = inject(WidgetConfigService);\n sectionComponent = inject(WidgetConfigSectionComponent);\n inventoryService = inject(InventoryService);\n alertService = inject(AlertService);\n\n /**\n * If set to true, a device must be selected. Default is true.\n */\n @Input()\n isRequired = true;\n\n /**\n * If set to false, unassigned devices will not be shown in the asset selector.\n */\n @Input()\n showUnassigned: boolean;\n\n /**\n * If set to true, groups will be selectable in the asset selector.\n */\n @Input()\n groupsSelectable: boolean;\n\n /**\n * For advanced usage, the whole asset-selector-component configuration can be passed.\n */\n @Input()\n assetSelectorConfig: AssetSelectorOptions;\n\n /**\n * Defines the selected device.\n */\n @Input()\n selectedDevice: IManagedObject;\n\n /**\n * Template for displaying device names with their IDs.\n * @ignore\n */\n deviceWithIdTpl = gettext('Device {{ id }}');\n\n /**\n * @ignore\n */\n async ngOnInit(): Promise<void> {\n if (this.widgetConfigService.currentConfig.device) {\n try {\n if (this.widgetConfigService.currentConfig.device.self) {\n this.selectedDevice = this.widgetConfigService.currentConfig.device as IManagedObject;\n } else {\n this.selectedDevice = (\n await this.inventoryService.detail(this.widgetConfigService.currentConfig.device.id)\n ).data;\n }\n } catch (ex) {\n // intended empty catch block to handle cases where the device might not be found\n // error messages however will be displayed in the widget config feedback component\n }\n } else if (this.isRequired && !this.hasContext(this.widgetConfigService.currentConfig)) {\n this.sectionComponent.section.expanded = true;\n } else if (this.hasContext(this.widgetConfigService.currentConfig) && this.isRequired) {\n this.selectedDevice = this.widgetConfigService.currentConfig.settings?.context;\n }\n\n this.assetSelectorConfig = {\n view: 'miller',\n groupsSelectable:\n this.groupsSelectable || this.widgetConfigService.currentConfig.settings?.groupsSelectable,\n showChildDevices: true,\n columnHeaders: true,\n showUnassignedDevices: this.showUnassigned ?? true,\n search: !this.widgetConfigService.currentConfig.settings?.context?.additionParents,\n showFilter: true,\n showSelected: false,\n singleColumn: true,\n label: '',\n modelMode: 'full',\n preventInitialSelect: false,\n ...this.assetSelectorConfig\n };\n }\n\n /**\n * Returns true if a context is set.\n * @param value The current configuration of the widget.\n * @returns true if a context is set, false otherwise.\n */\n hasContext(value: ContextWidgetConfig): boolean {\n return value?.settings?.context && Object.keys(value.settings.context).length > 0;\n }\n\n /**\n * Update the configuration of the widget if the selection was changed.\n * @param $event The change event of the selection.\n */\n selectionChanged($event: AssetSelectionChangeEvent): void {\n if ($event.change.isSelected) {\n this.updateConfig($event.change.item);\n }\n }\n\n selectCurrentContext() {\n this.selectedDevice = this.widgetConfigService.currentConfig.settings?.context;\n this.updateConfig(this.selectedDevice);\n }\n\n updateConfig(device: IManagedObject) {\n this.widgetConfigService.updateConfig({ device });\n }\n}\n","<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n <div\n class=\"alert alert-info m-4\"\n *ngIf=\"widgetConfigService.isDeviceTypeDashboard$ | async\"\n >\n <i class=\"fa fa-info-circle m-r-4\"></i>\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n <div\n class=\"p-t-8\"\n *ngIf=\"!isRequired\"\n >\n <p translate>Asset selection is optional for this widget.</p>\n <button\n class=\"btn btn-primary btn-sm m-t-8\"\n *ngIf=\"!selectedDevice\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : { id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n <button\n class=\"btn btn-default btn-sm m-t-8\"\n *ngIf=\"selectedDevice\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n </div>\n </div>\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n *ngIf=\"!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n *ngIf=\"\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n \"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n *ngIf=\"selectedDevice\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n <span\n *ngIf=\"!selectedDevice\"\n translate\n >\n No asset selected\n </span>\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n","import { AsyncPipe } from '@angular/common';\nimport { AfterViewInit, Component, inject, Input, ViewChild } from '@angular/core';\nimport {\n DynamicComponentComponent,\n DynamicComponentDefinition,\n DynamicComponentModule\n} from '@c8y/ngx-components';\nimport { WidgetConfigService } from '../widget-config.service';\n\n@Component({\n standalone: true,\n imports: [AsyncPipe, DynamicComponentModule],\n selector: 'c8y-widget-config-general',\n templateUrl: './widget-config-general.component.html'\n})\nexport class WidgetConfigGeneralComponent implements AfterViewInit {\n widgetConfigService = inject(WidgetConfigService);\n\n @Input()\n definition: DynamicComponentDefinition;\n\n @ViewChild(DynamicComponentComponent)\n dynamicComponent: DynamicComponentComponent;\n\n ngAfterViewInit(): void {\n if (this.dynamicComponent) {\n this.widgetConfigService.selectedComponent$.next(this.dynamicComponent);\n this.widgetConfigService.addOnBeforeSave(() => this.dynamicComponent.callLifeCycleHooks());\n }\n }\n\n ngOnDestroy(): void {\n this.widgetConfigService.selectedComponent$.next(null);\n }\n}\n","<c8y-dynamic-component\n class=\"d-block p-l-16 p-r-16\"\n [componentId]=\"definition.id\"\n mode=\"config\"\n [config]=\"widgetConfigService.assignedCurrentConfig$ | async\"\n></c8y-dynamic-component>\n","import { Injectable, TemplateRef } from '@angular/core';\nimport {\n DynamicComponentComponent,\n DynamicComponentDefinition,\n isPromise,\n sortByPriority\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n from,\n isObservable,\n map,\n merge as rxjsMerge,\n mergeMap,\n Observable,\n of,\n scan,\n shareReplay,\n Subject,\n tap,\n withLatestFrom\n} from 'rxjs';\nimport { merge } from 'lodash-es';\nimport { ContextWidgetConfig } from './context-dashboard.model';\nimport {\n WidgetConfigSection,\n WidgetConfigSectionDefinition\n} from './widget-config-hook/widget-config-hook.model';\nimport { WidgetConfigSectionService } from './widget-config-hook/widget-config-hook.service';\nimport { WidgetAssetSelectorComponent } from './widget-config/widget-asset-selector.component';\nimport { WidgetConfigGeneralComponent } from './widget-config/widget-config-general.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WidgetConfigService {\n private _currentConfig$ = new BehaviorSubject<ContextWidgetConfig>(null);\n private _assignedCurrentConfig$ = new BehaviorSubject<ContextWidgetConfig>(null);\n private _instanceId$ = new BehaviorSubject<string | null>(null);\n private _isDeviceTypeDashboard$ = new BehaviorSubject<boolean>(false);\n\n /**\n * The unique identifier of the current widget instance.\n */\n instanceId$ = this._instanceId$.asObservable();\n\n /**\n * The preview of the currently selected widget. If `null` no preview is shown\n * (except if the selected widget has no configuration).\n */\n preview$ = new BehaviorSubject<true | DynamicComponentDefinition | TemplateRef<any>>(null);\n\n /**\n * The currently selected widget definition.\n */\n selected$ = new BehaviorSubject<DynamicComponentDefinition>(null);\n\n /**\n * The currently selected widget component.\n */\n selectedComponent$ = new BehaviorSubject<DynamicComponentComponent>(null);\n\n /**\n * The current configuration of the selected widget.\n * Only to read the value. Use `updateConfig` to update the configuration.\n **/\n get currentConfig() {\n return this._currentConfig$.value;\n }\n\n /**\n * Indicates if the selected widget is placed on a device type dashboard.\n */\n isDeviceTypeDashboard$ = this._isDeviceTypeDashboard$.asObservable();\n\n /**\n * The current configuration of the selected widget as observable.\n * Only to read the value. Use `updateConfig` to update the configuration.\n */\n currentConfig$ = this._currentConfig$.asObservable();\n\n /**\n * An observable that does not emit on each change. Instead the changes are only assigned.\n * This is used for legacy widgets that rely on mutating the config object.\n *\n * @deprecated Use `currentConfig$` instead.\n */\n assignedCurrentConfig$ = this._assignedCurrentConfig$.asObservable();\n\n /**\n * Returns all the current sections.\n *\n * A configuration section is a component that can be used to configure a widget.\n * Sections should be added via the `hookWidgetConfig`.\n */\n currentSections$: Observable<WidgetConfigSection[]> = this.selected$.pipe(\n tap(() => (this.beforeSaveCallbacks = [])),\n withLatestFrom(this._currentConfig$),\n mergeMap(([selectedWidget, config]) =>\n selectedWidget === null\n ? of([])\n : this.widgetConfigSectionService.items$.pipe(\n map(sections => [\n ...this.getWidgetDefaultSections(selectedWidget, config),\n ...sections.filter(section => section.widgetId === selectedWidget.id)\n ])\n )\n ),\n mergeMap((sections: WidgetConfigSectionDefinition[]) => {\n if (sections.length === 0) {\n return Promise.resolve([]);\n }\n return Promise.all(\n sections.map(async section => ({\n component: await section.loadComponent(),\n label: section.label,\n priority: section.priority || 0,\n expanded: section.expanded || false,\n initialState: section.initialState,\n injector: section.injector,\n providers: Array.isArray(section.providers)\n ? section.providers\n : section.providers\n ? await section.providers()\n : []\n }))\n );\n }),\n map(sections => sortByPriority(sections)),\n shareReplay(1)\n );\n\n /**\n * Returns a list of all unique providers used in the current sections.\n */\n providers$ = this.currentSections$.pipe(\n map(sections => Array.from(new Set(sections.flatMap(section => section.providers || []))))\n );\n\n /**\n * Indicates if the current selected widget has a configuration or not.\n */\n hasConfig$ = this.currentSections$.pipe(map(sections => sections.length > 0));\n\n /**\n * The view state of the preview. Can be one of:\n * - `noPreview`: No preview is shown and an empty state is shown.\n * - `configPreview`: The preview is shown with the view component of the selected widget.\n * - `templatePreview`: The preview is shown with any template passed with setPreview method.\n */\n previewViewState$ = combineLatest([this.hasConfig$, this.preview$]).pipe(\n map(([hasConfig, preview]) => {\n if (preview === null && hasConfig) {\n return 'noPreview';\n } else if (preview instanceof TemplateRef) {\n return 'templatePreview';\n } else if (preview === true || !hasConfig) {\n return 'configPreview';\n }\n })\n );\n\n private readonly STASH_CONFIG_DELAY = 300;\n private configChange$ = new Subject<ContextWidgetConfig>();\n private configChangeReset$ = new Subject<void>();\n\n private beforeSaveCallbacks: ((\n config?: ContextWidgetConfig\n ) => boolean | Promise<boolean> | Observable<boolean>)[] = [];\n\n constructor(private widgetConfigSectionService: WidgetConfigSectionService) {\n const add = value => state => ({ ...state, ...value });\n const clear = () => _state => ({});\n rxjsMerge(this.configChange$.pipe(map(add)), this.configChangeReset$.pipe(map(clear)))\n .pipe(\n scan((state, innerFn) => innerFn(state), {}),\n debounceTime(this.STASH_CONFIG_DELAY)\n )\n .subscribe(config => {\n if (!this._currentConfig$.value) {\n return;\n }\n\n this._currentConfig$.next({ ...this._currentConfig$.value, ...config });\n\n if (!this._assignedCurrentConfig$.value) {\n return;\n }\n Object.assign(this._assignedCurrentConfig$.value, config);\n if (this.selectedComponent$.value) {\n this.selectedComponent$.value.emitConfigChange(this._currentConfig$.value);\n }\n });\n }\n\n /**\n * Use this function to get a typed configuration of the selected widget.\n * @returns The current configuration of the selected widget or an empty object if no config is defined.\n */\n getWidgetConfig<T>(): Observable<T> {\n return this.currentConfig$.pipe(\n map(current => {\n return (current.config || {}) as T;\n })\n );\n }\n\n /**\n * Adds a callback which can check the configuration before saving.\n */\n addOnBeforeSave(\n callback: (config?: ContextWidgetConfig) => boolean | Promise<boolean> | Observable<boolean>\n ) {\n this.beforeSaveCallbacks.push(callback);\n }\n\n /**\n * Returns true if the configuration can be saved.\n */\n canSave(): Promise<boolean> {\n if (this.beforeSaveCallbacks.length === 0) {\n return Promise.resolve(true);\n }\n const config = this._currentConfig$.value;\n return combineLatest(\n this.beforeSaveCallbacks.map(cb => {\n const result = cb(config);\n if (isObservable(result)) {\n return result;\n }\n if (isPromise(result)) {\n return from(result);\n }\n return of(result);\n })\n )\n .pipe(map(results => results.every(result => result === true)))\n .toPromise();\n }\n\n /**\n * Updates the configuration of the selected widget.\n * @param change The change to apply to the configuration.\n * @param force If set to true, the configuration will be updated even if no changes are made.\n * Also concurrency checks are ignored and no change is emitted on the component.\n * Use with caution and only if you want to reset the configuration to some default.\n */\n updateConfig(change: Partial<ContextWidgetConfig>, force = false) {\n if (force) {\n this._currentConfig$.next({ ...this._currentConfig$.value, ...change });\n merge(this._assignedCurrentConfig$.value, change);\n return;\n }\n this.configChange$.next(change);\n }\n\n /**\n * Used to initialize the configuration of the selected widget.\n * @param config The configuration to set.\n */\n initConfig(config: ContextWidgetConfig) {\n this._currentConfig$.next(config);\n this._assignedCurrentConfig$.next(config);\n }\n\n /**\n * Select a widget\n * @param selected The widget to select.\n * @param identifier An optional unique identifier for the widget instance. Only used if the widget is not new.\n * @param isDeviceTypeDashboard Indicates if the selected widget is placed on a device-type dashboard. This is used to determine if the default asset selector should be shown.\n */\n selectWidget(\n selected: DynamicComponentDefinition,\n identifier: string = null,\n isDeviceTypeDashboard = false\n ) {\n this.selected$.next(selected);\n this._instanceId$.next(identifier);\n this._isDeviceTypeDashboard$.next(isDeviceTypeDashboard);\n }\n\n /**\n * Deselect the currently selected.\n */\n deselectWidget() {\n this.selected$.next(null);\n this.preview$.next(null);\n this.configChangeReset$.next();\n this._currentConfig$.next(null);\n this._assignedCurrentConfig$.next(null);\n this._instanceId$.next(null);\n }\n\n /**\n * Enables a preview.\n * @param preview If set to true, the view component of the current widget will be taken to render the preview.\n * If set to a DynamicComponentDefinition, the preview will be rendered with the given component.\n * If set to a TemplateRef, the preview will be rendered with the given template.\n */\n setPreview(preview: true | DynamicComponentDefinition | TemplateRef<any>) {\n this.preview$.next(preview);\n }\n\n /**\n * By default, no sections are added to the configuration. But to ensure\n * backwards compatibility with old plugins, we check if the default asset selector\n * and config section should be shown.\n * @param selectedWidget The currently selected widget.\n * @param config The used widget configuration.\n * @returns The default sections.\n */\n private getWidgetDefaultSections(\n selectedWidget: DynamicComponentDefinition,\n config: ContextWidgetConfig\n ): WidgetConfigSectionDefinition[] {\n const defaultWidgetConfigSections = [];\n if (this.isDefaultSettingSectionNeeded(selectedWidget)) {\n defaultWidgetConfigSections.push({\n widgetId: selectedWidget.id,\n label: gettext('Settings'),\n loadComponent: () => Promise.resolve(WidgetConfigGeneralComponent),\n initialState: {\n definition: selectedWidget\n },\n priority: 0,\n expanded: true\n });\n }\n // Adds a default device selector for old plugins\n if (this.isDefaultDeviceSelectorNeeded(selectedWidget, config)) {\n defaultWidgetConfigSections.push({\n widgetId: selectedWidget.id,\n label: gettext('Asset selection'),\n loadComponent: () => Promise.resolve(WidgetAssetSelectorComponent),\n priority: 100,\n initialState: {\n isRequired:\n !config.settings?.ng1?.options?.deviceTargetNotRequired &&\n !config.settings.deviceTargetNotRequired\n }\n });\n }\n\n return defaultWidgetConfigSections;\n }\n\n /**\n * Sections should not be added by default anymore. But to ensure backwards compatibility, we\n * check if the default selector should be shown. We assume that a default selector will be shown\n * when:\n * 1. The widget has a dynamic component for configuration (which is also deprecated).\n * OR\n * 2. The widget has not disabled the default selector.\n */\n private isDefaultDeviceSelectorNeeded(\n selectedWidget: DynamicComponentDefinition,\n config: ContextWidgetConfig\n ): boolean {\n if (!selectedWidget.loadConfigComponent && !selectedWidget.configComponent) {\n return false;\n }\n return !config.settings?.noDeviceTarget && !config.settings?.ng1?.options?.noDeviceTarget;\n }\n\n /**\n * Checks if a default setting section is needed.\n * @param selectedWidget The currently selected widget.\n * @returns true if one is needed.\n */\n private isDefaultSettingSectionNeeded(selectedWidget: DynamicComponentDefinition) {\n if (selectedWidget.data?.settings?.upgrade) {\n return (\n selectedWidget.data?.settings?.configComponent ||\n selectedWidget.data?.settings?.configTemplateUrl\n );\n }\n return selectedWidget.configComponent || selectedWidget.loadConfigComponent;\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { DASHBOARD_THEME_CLASSES, WIDGET_HEADER_CLASSES } from '../context-dashboard.model';\nimport { C8yTranslatePipe } from '@c8y/ngx-components';\nimport { FormsModule } from '@angular/forms';\nimport { NgForOf, NgIf } from '@angular/common';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\n\n@Component({\n selector: 'c8y-appearance-settings',\n templateUrl: './appearance-settings.component.html',\n standalone: true,\n imports: [NgIf, NgForOf, FormsModule, PopoverModule, C8yTranslatePipe]\n})\nexport class AppearanceSettingsComponent {\n @Input()\n themeClass = 'dashboard-theme-light';\n @Input()\n headerClass = 'panel-title-regular';\n @Input()\n defaultThemeClass: string;\n @Input()\n defaultHeaderClass: string;\n @Input()\n dashboardSettings: boolean;\n @Output()\n themeClassChange = new EventEmitter<string>();\n @Output()\n headerClassChange = new EventEmitter<string>();\n\n @Output()\n onChange = new EventEmitter<void>();\n\n @Input()\n possibleStylingTheme = DASHBOARD_THEME_CLASSES;\n\n @Input()\n possibleStylingHeader = WIDGET_HEADER_CLASSES;\n\n @Input()\n columns: 1 | 3 = 1;\n\n dashboardDefaultLabel = gettext('Dashboard default');\n\n themeClassClick(value) {\n value = this.resetToDefault(value, this.themeClass, this.defaultThemeClass);\n this.themeClass = value;\n this.themeClassChange.emit(value);\n this.onChange.emit();\n }\n\n headerClassClick(value) {\n value = this.resetToDefault(value, this.headerClass, this.defaultHeaderClass);\n this.headerClass = value;\n this.headerClassChange.emit(value);\n this.onChange.emit();\n }\n\n private resetToDefault(value: string, compareTo: string, defaultValue: string) {\n if (defaultValue && value === compareTo) {\n value = defaultValue;\n }\n return value;\n }\n}\n","<div class=\"row\">\n <div class=\"col-lg-{{ 12 / columns }} col-xs-12\">\n <fieldset class=\"c8y-fieldset c8y-fieldset--lg\">\n <legend *ngIf=\"dashboardSettings\">{{ 'Default theme' | translate }}</legend>\n <legend *ngIf=\"!dashboardSettings\">{{ 'Theme' | translate }}</legend>\n <ul class=\"list-group\">\n <li\n class=\"list-group-item d-flex a-i-center p-l-0 p-r-0 fit-w\"\n *ngFor=\"let themeClassItem of possibleStylingTheme; let i = index\"\n >\n <div\n class=\"list-item-checkbox\"\n style=\"max-width: calc(100% - 24px)\"\n >\n <label class=\"c8y-radio\">\n <input\n name=\"content\"\n type=\"radio\"\n [id]=\"'groupradiocontentclass' + i\"\n [value]=\"themeClassItem.class\"\n [ngModel]=\"themeClass\"\n (click)=\"themeClassClick(themeClassItem.class)\"\n />\n <span></span>\n <span\n class=\"text-truncate\"\n title=\"{{ themeClassItem.label | translate }}{{\n themeClassItem.class === defaultThemeClass\n ? ' | ' + (dashboardDefaultLabel | translate)\n : ''\n }}\"\n >\n <span>{{ themeClassItem.label | translate }}</span>\n <br />\n <small\n class=\"text-muted\"\n *ngIf=\"themeClassItem.class === defaultThemeClass\"\n >\n {{ dashboardDefaultLabel | translate }}\n </small>\n </span>\n </label>\n </div>\n\n <button\n class=\"btn-help btn-help--sm m-l-auto\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ themeClassItem.description | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </li>\n </ul>\n </fieldset>\n </div>\n <div class=\"col-lg-{{ 12 / columns }} col-xs-12\">\n <fieldset class=\"c8y-fieldset c8y-fieldset--lg\">\n <legend *ngIf=\"dashboardSettings\">\n {{ 'Default widget header style' | translate }}\n </legend>\n <legend *ngIf=\"!dashboardSettings\">\n {{ 'Widget header style' | translate }}\n </legend>\n <ul class=\"list-group\">\n <li\n class=\"list-group-item d-flex a-i-center p-l-0 p-r-0\"\n *ngFor=\"let headerClassItem of possibleStylingHeader; let i = index\"\n >\n <div\n class=\"list-item-checkbox\"\n style=\"max-width: calc(100% - 24px)\"\n >\n <label class=\"c8y-radio\">\n <input\n name=\"header\"\n type=\"radio\"\n [id]=\"'groupradioheaderclass' + i\"\n [value]=\"headerClassItem.class\"\n [ngModel]=\"headerClass\"\n (click)=\"headerClassClick(headerClassItem.class)\"\n />\n <span></span>\n <span\n class=\"text-truncate\"\n title=\"{{ headerClassItem.label | translate }}{{\n headerClassItem.class === defaultHeaderClass\n ? ' | ' + (dashboardDefaultLabel | translate)\n : ''\n }}\"\n >\n <span>{{ headerClassItem.label | translate }}</span>\n <br />\n <small\n class=\"text-muted\"\n *ngIf=\"headerClassItem.class === defaultHeaderClass\"\n >\n {{ dashboardDefaultLabel | translate }}\n </small>\n </span>\n </label>\n </div>\n <button\n class=\"btn-help btn-help--sm m-l-auto\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ headerClassItem.description | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </li>\n </ul>\n </fieldset>\n </div>\n <ng-content></ng-content>\n</div>\n","import { AsyncPipe, NgFor } from '@angular/common';\nimport { Component, inject } from '@angular/core';\nimport { WidgetConfigSectionComponent } from './widget-config-section.component';\nimport { WidgetConfigService } from '../widget-config.service';\n\n@Component({\n standalone: true,\n imports: [NgFor, WidgetConfigSectionComponent, AsyncPipe],\n selector: 'c8y-widget-config-root',\n templateUrl: './widget-config-root.component.html'\n})\nexport class WidgetConfigRootComponent {\n widgetConfigService = inject(WidgetConfigService);\n}\n","<ng-container\n *ngFor=\"let section of widgetConfigService.currentSections$ | async\"\n>\n <c8y-widget-config-section [section]=\"section\"></c8y-widget-config-section>\n</ng-container>\n","import { CommonModule, NgClass } from '@angular/common';\nimport { Component, Input, inject } from '@angular/core';\nimport { C8yTranslatePipe, CoreModule } from '@c8y/ngx-components';\nimport { WidgetConfigService } from '../widget-config.service';\nimport { WidgetConfigComponent } from '../widget-config.component';\n\n@Component({\n selector: 'c8y-widget-preview',\n templateUrl: './widget-preview.component.html',\n standalone: true,\n imports: [NgClass, C8yTranslatePipe, CommonModule, CoreModule]\n})\nexport class WidgetPreviewComponent {\n widgetConfigService = inject(WidgetConfigService);\n widgetConfig = inject(WidgetConfigComponent);\n\n @Input()\n previewClasses: { [key: string]: boolean } = {\n 'dashboard-theme-light': true,\n 'panel-title-regular': true\n };\n\n get translateWidgetTitle(): boolean {\n return this.widgetConfig?.mo.c8y_Dashboard.translateWidgetTitle ?? false;\n }\n}\n","<fieldset class=\"c8y-fieldset p-l-24 p-r-24 p-t-16 p-b-16\">\n <legend>{{ 'Preview' | translate }}</legend>\n <c8y-dashboard\n class=\"dashboard-preview-slot\"\n [columns]=\"1\"\n [ngClass]=\"previewClasses\"\n >\n <c8y-dashboard-child\n [isFrozen]=\"true\"\n [width]=\"1\"\n [height]=\"6\"\n >\n <c8y-dashboard-child-title>\n <span>\n {{\n (widgetConfigService.selected$ | async)?.data?.title\n | translate: { noTranslateRemoveContext: !translateWidgetTitle }\n }}\n </span>\n </c8y-dashboard-child-title>\n\n @if ((widgetConfigService.previewViewState$ | async) === 'noPreview') {\n <div class=\"fit-h d-flex d-col j-c-center a-i-center\">\n <c8y-ui-empty-state\n [icon]=\"'visibility-off'\"\n [title]=\"'No preview available.' | translate\"\n [subtitle]=\"'This widget does not provide any preview.' | translate\"\n [horizontal]=\"false\"\n ></c8y-ui-empty-state>\n </div>\n }\n\n @if ((widgetConfigService.previewViewState$ | async) === 'configPreview') {\n <c8y-dynamic-component\n [componentId]=\"(widgetConfigService.selected$ | async)?.id\"\n [config]=\"(widgetConfigService.currentConfig$ | async)?.config\"\n ></c8y-dynamic-component>\n }\n\n @if ((widgetConfigService.previewViewState$ | async) === 'templatePreview') {\n <ng-template [ngTemplateOutlet]=\"widgetConfigService.preview$ | async\"></ng-template>\n }\n </c8y-dashboard-child>\n </c8y-dashboard>\n</fieldset>\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { sortBy, cloneDeep, get, omit } from 'lodash-es';\nimport { DynamicComponentService, DynamicComponentDefinition, Widget } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ContextDashboardConfig, CONTEXT_DASHBOARD_CONFIG } from './context-dashboard.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WidgetService {\n widgets: DynamicComponentDefinition[];\n\n constructor(\n private dynamicComponentService: DynamicComponentService,\n private translateService: TranslateService,\n @Optional()\n @Inject(CONTEXT_DASHBOARD_CONFIG)\n public moduleConfig: ContextDashboardConfig | undefined\n ) {\n this.dynamicComponentService.items$.subscribe(widgets => {\n this.widgets = widgets;\n });\n }\n\n async getWidgetDefinition(componentId): Promise<DynamicComponentDefinition> {\n return this.dynamicComponentService.getById(componentId);\n }\n\n getWidgetDefinitions() {\n const translatedComponents = this.widgets.map(cmp => ({\n ...cmp,\n label: this.translateService.instant(cmp.label)\n }));\n\n // cloneDeep and injector lead to a performance issue. We removing the injectors here,\n // as they are not needed, to avoid use of a lot of CPU for cloning.\n const translatedComponentsWithoutInjector = translatedComponents.map(cmp =>\n omit(cmp, 'injector')\n );\n const filterFn: (component: DynamicComponentDefinition) => boolean =\n this.moduleConfig?.widgetFilter ||\n (({ data }) => !(data && data.settings && data.settings.noNewWidgets));\n return cloneDeep(sortBy(translatedComponentsWithoutInjector, 'label').filter(filterFn));\n }\n\n async mapLegacy(widget: Partial<Widget>): Promise<Widget> {\n const cmp = await this.getWidgetDefinition(widget.componentId || widget.name);\n widget = this.mapDisplaySettings(widget, cmp);\n\n if (get(cmp, 'data.settings.upgrade')) {\n widget.widgetComponent = cmp.data.settings.widgetComponent;\n widget.configComponent = cmp.data.settings.configComponent;\n widget.templateUrl = cmp.data.settings.templateUrl;\n widget.configTemplateUrl = cmp.data.settings.configTemplateUrl;\n widget.transformConfigWithContext =\n cmp.data.settings.componentTransformConfigWithContext ||\n cmp.data.settings.transformConfigWithContext ||\n widget.transformConfigWithContext;\n } else {\n delete widget.templateUrl;\n delete widget.configTemplateUrl;\n }\n return widget as Widget;\n }\n\n private mapDisplaySettings(\n widget: Partial<Widget>,\n cmp: DynamicComponentDefinition\n ): Partial<Widget> {\n if (cmp?.data?.displaySettings) {\n widget.config = { displaySettings: cmp.data.displaySettings, ...(widget.config || {}) };\n }\n return widget;\n }\n}\n","import { AsyncPipe, NgFor, NgIf } from '@angular/common';\nimport { AfterContentInit, Component, OnDestroy, ViewChild } from '@angular/core';\nimport { FormsModule, NgForm } from '@angular/forms';\nimport {\n BottomDrawerRef,\n C8yComponentOutlet,\n C8yTranslateDirective,\n C8yTranslatePipe,\n DynamicComponentDefinition,\n EmptyStateComponent,\n FormGroupComponent,\n HighlightComponent,\n IconDirective,\n ProductExperienceDirective,\n RequiredInputPlaceholderDirective,\n ResizableGridComponent,\n Widget,\n WIDGET_CONFIGURATION_GRID_SIZE\n} from '@c8y/ngx-components';\nimport { clone, cloneDeep, escapeRegExp, get, isNull, omit } from 'lodash-es';\nimport { iif, Subject, Subscription, timer } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\nimport {\n ContextDashboardManagedObject,\n ContextWidgetConfig,\n WIDGET_CONTENT_CLASSES,\n WIDGET_HEADER_CLASSES\n} from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { WidgetConfigService } from './widget-config.service';\nimport { AppearanceSettingsComponent } from './widget-config/appearance-settings.component';\nimport { WidgetConfigRootComponent } from './widget-config/widget-config-root.component';\nimport { WidgetPreviewComponent } from './widget-config/widget-preview.component';\nimport { WidgetService } from './widget.service';\n\n@Component({\n selector: 'c8y-widget-config',\n templateUrl: './widget-config.component.html',\n host: { class: 'd-contents' },\n imports: [\n NgIf,\n FormsModule,\n IconDirective,\n NgFor,\n C8yTranslateDirective,\n HighlightComponent,\n EmptyStateComponent,\n FormGroupComponent,\n RequiredInputPlaceholderDirective,\n C8yComponentOutlet,\n WidgetPreviewComponent,\n AppearanceSettingsComponent,\n ProductExperienceDirective,\n C8yTranslatePipe,\n AsyncPipe,\n ResizableGridComponent\n ],\n standalone: true\n})\nexport class WidgetConfigComponent implements AfterContentInit, OnDestroy {\n searchResult: DynamicComponentDefinition[];\n components: DynamicComponentDefinition[];\n selected: DynamicComponentDefinition;\n searchChange$ = new Subject();\n searchTerm = '';\n context: any;\n componentLabel: string;\n widgetTitle: string;\n mo: ContextDashboardManagedObject;\n identifier = crypto.randomUUID();\n styling = {\n headerClass: 'panel-title-regular',\n contentClass: 'panel-content-light'\n };\n defaultStyling = {\n headerClass: 'panel-title-regular',\n contentClass: 'panel-content-light'\n };\n current: any;\n widgetConfig: ContextWidgetConfig;\n isUpgrade = false;\n possibleStyling = { WIDGET_HEADER_CLASSES, WIDGET_CONTENT_CLASSES };\n WIDGET_CONFIGURATION_GRID_SIZE = WIDGET_CONFIGURATION_GRID_SIZE;\n\n @ViewChild('configForm', { static: false })\n configForm: NgForm;\n\n /**\n * Used as wrapper component to inject providers.\n */\n widgetConfigRoot = WidgetConfigRootComponent;\n\n get isEdit() {\n return !!this.current;\n }\n\n get isDeviceTypeDashboard(): boolean {\n return !!this.mo.c8y_Dashboard?.deviceType && !!this.mo.c8y_Dashboard?.deviceTypeValue;\n }\n\n result: Promise<Widget> = new Promise((resolve, reject) => {\n this._save = resolve;\n this._cancel = reject;\n });\n\n private searchSub: Subscription;\n private _save: (value: Widget) => void;\n private _cancel: (reason?: any) => void;\n\n constructor(\n private widgetService: WidgetService,\n private bottomDrawerRef: BottomDrawerRef<WidgetConfigComponent>,\n public contextDashboardService: ContextDashboardService,\n public widgetConfigService: WidgetConfigService\n ) {}\n\n async ngAfterContentInit(): Promise<void> {\n this.components = this.widgetService.getWidgetDefinitions();\n\n if (this.selected) {\n this.current = clone(this.selected);\n this.select(this.selected, this.isEdit ? 'config' : 'select');\n }\n\n this.searchSub = this.searchChange$\n .pipe(\n switchMap((event: KeyboardEvent) => iif(() => event.which !== 13, timer(200), timer(10)))\n )\n .subscribe(() => {\n this.search();\n });\n\n this.setStylings();\n }\n\n isSaveDisabled(): boolean {\n // If new section concept, the widget settings cannot be used to disable the device target.\n // Use the WidgetConfigAssetTargetComponent instead with the initialState set to isRequired.\n const isNewSectionConcept =\n !this.selected?.loadConfigComponent && !this.selected?.configComponent;\n\n return this.configForm?.invalid || (!isNewSectionConcept && this.checkIfDeviceRequired());\n }\n\n checkIfDeviceRequired() {\n const widgetConfig = this.widgetConfigService.currentConfig;\n return (\n !widgetConfig ||\n (!widgetConfig.settings?.deviceTargetNotRequired &&\n !widgetConfig.device &&\n !widgetConfig.settings?.noDeviceTarget)\n );\n }\n\n async save() {\n const canSave = await this.widgetConfigService.canSave();\n if (!canSave) {\n return;\n }\n\n const { _x, _y, _width, _height } = this.selected.data;\n\n if (\n this.widgetConfig &&\n this.widgetConfig.device &&\n // serializing will be handled by resolver\n !this.selected?.resolve?.device\n ) {\n const { id, name } = this.widgetConfig.device;\n this.widgetConfig.device = { id, name };\n }\n\n this.widgetConfig = {\n ...this.widgetConfigService.currentConfig,\n ...this.widgetConfig\n };\n\n const widget = {\n _x,\n _y,\n _width,\n _height,\n config: omit(this.widgetConfig, ['settings', 'displaySettings']),\n title: this.widgetTitle,\n componentId: this.selected.id,\n id: this.isEdit ? this.current.data.id : this.identifier,\n classes: this.getStyle(),\n ...(!this.isEdit ? this.widgetConfig.settings.widgetDefaults : {})\n } as Widget;\n this._save(widget);\n await this.bottomDrawerRef.close();\n this.widgetConfigService.deselectWidget();\n }\n\n select(cmp, mode: 'select' | 'config' = 'config') {\n if (mode === 'config' && this.configForm) {\n const formGroup = this.configForm.control;\n for (const control of Object.keys(formGroup.controls)) {\n formGroup.removeControl(control);\n }\n }\n\n cmp.data = cmp.data || {};\n this.selected = cmp;\n\n this.isUpgrade = !!get(cmp, 'data.settings.upgrade');\n this.contextDashboardService.formDisabled = this.isUpgrade;\n if (this.isEdit) {\n const { id, _x, _y, _width, _height, classes, title } = this.current.data;\n this.selected.data = { ...this.selected.data, _x, _y, _width, _height, classes, title };\n this.identifier = id;\n }\n\n this.widgetConfig = cloneDeep(this.composeWidgetConfig(this.selected, this.context));\n this.selected.data.title = this.selected.data.title || cmp.label;\n this.componentLabel = cmp.label;\n this.widgetTitle = isNull(this.widgetTitle) ? cmp.label : this.selected.data.title;\n\n this.widgetConfigService.initConfig(this.widgetConfig);\n this.widgetConfigService.selectWidget(\n this.selected,\n this.identifier,\n this.isDeviceTypeDashboard\n );\n }\n\n search() {\n if (this.searchTerm.length > 0) {\n this.searchResult = this.components.filter(cmp =>\n new RegExp(escapeRegExp(this.searchTerm.trim()), 'i').test(cmp.label)\n );\n } else {\n this.resetSearch();\n }\n }\n\n resetSearch() {\n this.searchTerm = '';\n this.searchResult = undefined;\n }\n\n backToWidgetSelection() {\n this.selected = null;\n this.widgetTitle = null;\n this.widgetConfigService.deselectWidget();\n }\n\n onWidgetTitleChange(newTitle: string) {\n if (this.selected?.data) {\n this.selected.data.title = newTitle;\n }\n }\n\n async close() {\n this._cancel();\n await this.bottomDrawerRef.close();\n this.widgetConfigService.deselectWidget();\n }\n\n getStyle(isPreview = false) {\n const cssClasses = {};\n if (isPreview || !this.isDashboardDefaultStyle(this.styling.headerClass)) {\n cssClasses[this.styling.headerClass] = true;\n }\n\n if (isPreview || !this.isDashboardDefaultStyle(this.styling.contentClass)) {\n cssClasses[this.styling.contentClass] = true;\n }\n\n if (isPreview) {\n cssClasses[`dashboard-theme-${this.defaultStyling.contentClass.split('-').pop()}`] = true;\n }\n\n return cssClasses;\n }\n\n ngOnDestroy(): void {\n this.contextDashboardService.formDisabled = true;\n if (this.searchSub) {\n this.searchSub.unsubscribe();\n }\n }\n\n private setStylings(): void {\n const dashboardClasses: string[] =\n (this.mo.c8y_Dashboard?.classes && Object.keys(this.mo.c8y_Dashboard.classes)) || [];\n const dashboardWidgetClasses: string[] =\n (this.mo.c8y_Dashboard?.widgetClasses && Object.keys(this.mo.c8y_Dashboard.widgetClasses)) ||\n [];\n const widgetClasses: string[] = this.isEdit ? Object.keys(this.current.data.classes) : [];\n\n this.styling = this.setDefaultStyle([\n ...dashboardClasses,\n ...dashboardWidgetClasses,\n ...widgetClasses\n ]);\n this.defaultStyling = this.setDefaultStyle([...dashboardClasses, ...dashboardWidgetClasses]);\n }\n\n private isDashboardDefaultStyle(className) {\n const allClasses = {\n ...this.mo.c8y_Dashboard.classes,\n ...this.mo.c8y_Dashboard.widgetClasses\n };\n const styles = Object.keys(allClasses).map(cssClass => ({ class: cssClass }));\n const style = this.contextDashboardService.getStyling(\n styles,\n className.split('-').pop(),\n undefined\n );\n return !!style;\n }\n\n private setDefaultStyle(setClasses: string[]) {\n let contentClass = this.styling.contentClass;\n let headerClass = this.styling.headerClass;\n const styles = this.contextDashboardService\n .getFilteredDashboardStyles(setClasses)\n .map(c => c.split('-').pop());\n styles.forEach(styleName => {\n contentClass = this.contextDashboardService.getStyling(\n WIDGET_CONTENT_CLASSES,\n styleName,\n contentClass\n );\n headerClass = this.contextDashboardService.getStyling(\n WIDGET_HEADER_CLASSES,\n styleName,\n headerClass\n );\n });\n\n return { headerClass, contentClass };\n }\n\n private composeWidgetConfig(selectedComponent, context = {}) {\n const setting = {\n settings: {\n ...selectedComponent.data.settings,\n ...get(selectedComponent.data.settings, 'ng1.options'),\n ...get(selectedComponent.data, 'ng1.options'),\n context,\n dashboardMo: this.mo.c8y_Dashboard\n },\n ...selectedComponent.data.config\n } as ContextWidgetConfig;\n return this.applyTargetIfDeviceDashboard(setting);\n }\n\n private applyTargetIfDeviceDashboard(widgetConfig: ContextWidgetConfig) {\n const isDeviceType = this.contextDashboardService.isDeviceType(this.mo);\n const noDeviceTarget = widgetConfig.settings.ng1\n ? widgetConfig.settings.ng1.options.noDeviceTarget\n : widgetConfig.settings.noDeviceTarget;\n\n const needsTargetAndIsDeviceType = isDeviceType && !noDeviceTarget && widgetConfig.device;\n const isNewWidgetWithContext = !this.isEdit && this.context?.id && !noDeviceTarget;\n\n if (needsTargetAndIsDeviceType || isNewWidgetWithContext) {\n widgetConfig.device = {\n id: this.context.id,\n name: this.context.name\n };\n }\n return widgetConfig;\n }\n}\n","<!-- select widget -->\n<ng-container *ngIf=\"!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search…' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n *ngFor=\"let cmp of searchResult || components\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n <ng-container *ngIf=\"!cmp.previewImage; else previewImage\">\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n </ng-container>\n <ng-template #previewImage>\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n </ng-template>\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"' Rephrase your search term.' | translate\"\n *ngIf=\"searchResult && searchResult.length === 0\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n</ng-container>\n\n<!-- widget configuration -->\n<ng-container *ngIf=\"!!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n <div\n class=\"p-t-8\"\n *ngIf=\"selected\"\n >\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n *ngIf=\"!(widgetConfigService.hasConfig$ | async)\"\n ></c8y-ui-empty-state>\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n <ng-container *ngIf=\"widgetConfigService.hasConfig$ | async\">\n <ng-container *ngIf=\"widgetConfigService.providers$ | async as providers\">\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n </ng-container>\n </ng-container>\n </form>\n </div>\n </div>\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</ng-container>\n","import { AsyncPipe } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n HostBinding,\n HostListener,\n Inject,\n input,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { IManagedObject } from '@c8y/client';\nimport {\n ActionBarItemComponent,\n ActionBarService,\n AlertService,\n BottomDrawerService,\n BreadcrumbItem,\n C8yTranslatePipe,\n CopyDashboardDisabledReason,\n DashboardChange,\n DashboardChildChange,\n DashboardChildComponent,\n DashboardCopyPermission,\n DynamicComponentDefinition,\n GainsightService,\n HelpComponent,\n IconDirective,\n memoize,\n ModalService,\n RevertChangeType,\n Status,\n TitleComponent,\n Widget,\n WidgetChange,\n WidgetsDashboardComponent\n} from '@c8y/ngx-components';\nimport { ContextDashboardStateService } from '@c8y/ngx-components/context-dashboard-state';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\nimport { cloneDeep, every, findIndex, kebabCase, keyBy, omit, some } from 'lodash-es';\nimport { PopoverDirective } from 'ngx-bootstrap/popover';\nimport { filter, Subject, Subscription } from 'rxjs';\nimport {\n CanDeactivateComponent,\n CONTEXT_DASHBOARD_CONFIG,\n ContextDashboard,\n ContextDashboardConfig,\n ContextDashboardManagedObject,\n DASHBOARD_CHILDREN_STATE_NAME,\n DashboardChildrenState,\n DashboardHistoryDescription,\n PRODUCT_EXPERIENCE,\n WIDGET_HEADER_CLASSES\n} from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { DashboardDetailComponent } from './dashboard-detail.component';\nimport { DashboardEditModeService } from './memento/dashboard-edit-mode.service';\nimport { WidgetConfigComponent } from './widget-config.component';\nimport { WidgetService } from './widget.service';\n\n/**\n * The context dashboard is a dashboard which resolves it data from the current context (device or group)\n * it is displayed on. It usually uses the route.data for it, but you can pass\n * a different managedObject to the [mo] input parameter to change that behavior.\n */\n@Component({\n selector: 'c8y-context-dashboard',\n templateUrl: './context-dashboard.component.html',\n host: {\n style: `\n display: block;\n `,\n class: 'dashboard c8y-grid-dashboard'\n },\n imports: [\n TitleComponent,\n ActionBarItemComponent,\n PopoverDirective,\n IconDirective,\n HelpComponent,\n DashboardDetailComponent,\n WidgetsDashboardComponent,\n C8yTranslatePipe,\n AsyncPipe\n ]\n})\nexport class ContextDashboardComponent implements OnInit, OnDestroy, CanDeactivateComponent {\n @Input()\n name: string;\n @Input()\n childrenClasses = '';\n @Input()\n context: any;\n @Input()\n setTitle = false;\n\n @Input()\n defaultWidgets: Widget[] = [];\n @Input('canCopy')\n _canCopy = true;\n @Input()\n canDelete = true;\n @Input()\n isLoading = true;\n @Input()\n breadcrumbSettings: BreadcrumbItem;\n @Input()\n showContextHelpButton = true;\n /** Whether to translate widget titles. However, dashboard's own setting takes precedence. It does not override dashboard's setting */\n @Input() translateWidgetTitle: boolean;\n /** Whether to translate dashboard title. However, dashboard's own setting takes precedence. It does not override dashboard's setting */\n @Input() translateDashboardTitle: boolean;\n /**\n * Hides dashboard availability selection.\n */\n @Input()\n hideAvailability = false;\n\n /** Explicitly set the dashboard in `disabled` state, e.g. to create read-only dashboard */\n isDisabled = input<boolean>(false, { alias: 'disabled' });\n\n @HostBinding('class')\n class = '';\n\n @ViewChild(DashboardDetailComponent, { static: true }) dashboardDetails: DashboardDetailComponent;\n @ViewChild(WidgetsDashboardComponent, { static: true })\n widgetsDashboard: WidgetsDashboardComponent;\n isNamedDashboard: boolean;\n\n get disabled(): boolean {\n return (\n !this.hasPermissionToEditDashboard || !this.dashboardDetails?.isCollapsed || this.isDisabled()\n );\n }\n\n widgets: Widget[] = [];\n mo: ContextDashboardManagedObject;\n dashboard: ContextDashboard;\n title: string;\n isCopyDisabled: DashboardCopyPermission;\n isReport: boolean;\n canCopy = true;\n readonly dashboardTypeLabel = gettext('Dashboard for \"{{ dashboardType }}\"');\n readonly dashboardTypePopover = gettext(`\n The layout and configuration of this dashboard is used by all other assets of model type\n <strong>{{ dashboardType }}</strong>. Any changes made to this dashboard instance will be applied to all\n other instances.`);\n private dataSub: Subscription;\n private hasPermissionToEditDashboard = false;\n private destroy$ = new Subject<void>();\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private contextDashboardService: ContextDashboardService,\n private alert: AlertService,\n private renderer: Renderer2,\n @Inject(CONTEXT_DASHBOARD_CONFIG) public moduleConfig: ContextDashboardConfig,\n private widgetService: WidgetService,\n private bottomDrawerService: BottomDrawerService,\n private gainsightService: GainsightService,\n private actionBarService: ActionBarService,\n private translateService: TranslateService,\n private modal: ModalService,\n private destroyRef: DestroyRef,\n public contextDashboardStateService: ContextDashboardStateService<{ [key: string]: any }>,\n public editModeService: DashboardEditModeService\n ) {}\n\n ngOnInit() {\n if (!this.name) {\n this.loadContextDashboard();\n return;\n }\n this.loadNamedDashboard();\n }\n\n ngAfterViewInit() {\n this.widgetsDashboard.editMode$\n .pipe(\n takeUntilDestroyed(this.destroyRef),\n filter(v => v)\n )\n .subscribe(() => {\n this.contextDashboardStateService.resetGlobalState();\n });\n }\n\n @HostListener('window:beforeunload', ['$event'])\n async beforeUnloadHandler($event: BeforeUnloadEvent) {\n const canDeactivate = await this.canDeactivate(true);\n if (!canDeactivate) {\n $event.returnValue = true;\n }\n }\n\n /**\n * Applies the current context to the widget\n * @param widget The widget to apply the context to.\n */\n applyDeviceTarget(widget) {\n if (widget.config.device) {\n widget.config.device = { id: this.context.id, name: this.context.name };\n }\n }\n\n /**\n * Removes the route listener.\n */\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n\n if (this.dataSub) {\n this.dataSub.unsubscribe();\n }\n\n this.contextDashboardStateService.setSelectedDashboard(null);\n }\n /**\n * Guards component from unintended navigation away or closing tab without saving changes.\n * Navigation continues if true is returned, and navigation is cancelled if returned value is false.\n * @param omitConfirm Omits confirm calls inside method body (without this param, when method is used in\n * on 'beforeunload' event handler, error is thrown in console because confirm is blocked by browser anyway and returns false)\n */\n async canDeactivate(omitConfirm = false): Promise<boolean> {\n const canDeactivate =\n (await this.dashboardDetails.canDeactivate(omitConfirm)) &&\n (await this.widgetsDashboard.canDeactivate(omitConfirm));\n\n // Needed in order to reset edit mode, otherwise when switching between dashboards, the edit mode is still enabled.\n if (canDeactivate) {\n await this.cancelEditMode(true);\n }\n return canDeactivate;\n }\n\n /**\n * Restores the dashboard widgets to the default widgets.\n */\n async restore() {\n const mesg = gettext(\n 'You are about to reset the widgets of this dashboard. All changes to the dashboard widgets will get lost and cannot be recovered. Do you want to proceed?'\n );\n\n try {\n await this.modal.confirm(gettext('Reset widgets'), mesg, Status.WARNING, {\n ok: gettext('Reset`dashboard`'),\n cancel: gettext('Cancel')\n });\n\n this.isLoading = true;\n this.mo.c8y_Dashboard.children = this.contextDashboardService.mapWidgets(this.defaultWidgets);\n this.mo.c8y_Dashboard.historyDescription = { changeType: 'reset' };\n await this.contextDashboardService.update(this.mo);\n await this.onLoad();\n\n this.contextDashboardStateService.dashboardSaved.next(this.mo);\n } catch (error) {\n if (error) {\n this.alert.addServerFailure(error);\n }\n } finally {\n this.isLoading = false;\n }\n }\n /**\n * Method called on every widgets dimensions or position change but also for adding new widget (because adding\n * widget causes layout changes). It recognizes what type of change has been done and updates current widgets state\n * accordingly.\n * @param child Change object.\n */\n positionOrWidgetDimensionChange(child: DashboardChildChange | DashboardChange): void {\n const currentState = this.editModeService.getCurrentState()?.children || {};\n const descriptionProp: keyof DashboardHistoryDescription['widgetChanges'] =\n child.children.length === Object.values(currentState).length ? 'arrangement' : 'added';\n let changeName: DashboardChildrenState['name'];\n let widgetsChanged: Widget[];\n if (descriptionProp === 'added') {\n changeName = DASHBOARD_CHILDREN_STATE_NAME.added;\n const addedWidget = child.children.find(c => !currentState[c.data.id]);\n widgetsChanged = [addedWidget.data];\n } else {\n changeName = DASHBOARD_CHILDREN_STATE_NAME.arrangement;\n widgetsChanged = child.children\n .map(c => {\n const lastStateChild = currentState[c.data.id];\n if (\n c.x != lastStateChild._x ||\n c.y != lastStateChild._y ||\n c.width != lastStateChild._width ||\n c.height != lastStateChild._height\n ) {\n return c.data;\n }\n })\n .filter(Boolean);\n }\n\n this.updateDashboardChildren(child, changeName, descriptionProp, widgetsChanged);\n }\n\n async revertChange(revertType: RevertChangeType): Promise<void> {\n let dashboardChildren: ContextDashboard['children'];\n if (revertType === 'undo') {\n dashboardChildren = this.editModeService.undo().children;\n } else {\n dashboardChildren = this.editModeService.redo().children;\n }\n await this.setWidgets(dashboardChildren);\n }\n\n /**\n * Updates all dashboards children's. Useful for position changes on the dashboard.\n * @param child The child to change.\n * @param changeName Name of the change to indicate it on undo/redo button.\n * @param descriptionProp Property to add to dashboard change history.\n * @param widgetsChanged List of changed widgets.\n */\n updateDashboardChildren(\n child: DashboardChildChange | DashboardChange,\n changeName: DashboardChildrenState['name'],\n descriptionProp: keyof DashboardHistoryDescription['widgetChanges'],\n widgetsChanged: Widget[]\n ): void {\n const { children } = child;\n const mappedChildren: { [id: string]: Widget } = keyBy(\n children.map(c => this.componentToWidget(c)),\n 'id'\n );\n this.setNewState(\n { name: changeName, children: mappedChildren },\n descriptionProp,\n widgetsChanged\n );\n }\n\n /**\n * Copies the dashboard and current context to a clipboard.\n */\n async copyDashboard() {\n const viewContext = this.route.parent.snapshot.data?.context;\n\n this.contextDashboardService.copyClipboard = {\n dashboardId: this.mo.id,\n dashboard: cloneDeep(this.mo.c8y_Dashboard),\n context: cloneDeep({ context: viewContext, contextData: this.context })\n };\n\n if (viewContext) {\n const ctx = viewContext.split('/').shift();\n const msg = this.translateService.instant(\n 'Dashboard copied. Navigate to the desired {{ ctx }} and select \"Paste dashboard\"',\n { ctx }\n );\n this.alert.success(msg);\n }\n this.actionBarService.refresh();\n }\n\n editDashboard() {\n const isEdit = !!this.mo.id;\n this.dashboardDetails.show(isEdit);\n }\n\n /**\n * Remove the complete dashboard and navigate away.\n */\n async deleteDashboard() {\n await this.contextDashboardService.delete(this.mo);\n if (this.route.parent) {\n const route = this.route.parent.snapshot.url.map(segment => segment.path).join('/');\n this.router.navigateByUrl(route);\n }\n await this.onDeleteGSEvent();\n }\n\n get isDeviceTypeDashboard(): boolean {\n return !!this.dashboard?.deviceType;\n }\n\n /**\n * Edits a widget on the dashboard.\n * @param change The widget change event.\n */\n async editWidget(change: WidgetChange) {\n const { x, y, width, height } = change.source;\n const component = await this.widgetService.getWidgetDefinition(\n change.widget.name || change.widget.componentId\n );\n if (!component) {\n this.addWidget();\n return;\n }\n await this.addWidget({\n ...component,\n data: { ...component.data, ...change.widget, _x: x, _y: y, _width: width, _height: height }\n });\n }\n\n /**\n * Adds a widget to the dashboard.\n * @param selected Define a selected component to switch to edit mode directly.\n */\n async addWidget(selected?: DynamicComponentDefinition) {\n const partialCloneSelected = selected\n ? { ...selected, data: cloneDeep(selected.data) }\n : selected;\n\n const activeContext = this.context.contextData ? this.context.contextData : this.context;\n const initialState: Partial<WidgetConfigComponent> = {\n mo: this.mo,\n context: this.context.c8y_Report ? {} : activeContext,\n selected: partialCloneSelected\n };\n\n const bottomDrawer = this.bottomDrawerService.openDrawer(WidgetConfigComponent, {\n initialState,\n closeOnNavigation: false,\n disableClickOutside: true\n });\n\n try {\n const newWidget = await bottomDrawer.instance.result;\n if (!this.mo.c8y_Dashboard.children) {\n this.mo.c8y_Dashboard.children = {};\n }\n newWidget.classes = this.mergeWidgetClasses(newWidget);\n await this.updateWidget(newWidget);\n // New state in edit mode is added only for widget update. When adding widget, layout change is always triggered,\n // so it's easier to set new state on layout change only\n if (selected) {\n const children = {\n ...this.editModeService.getCurrentState().children,\n [newWidget.id]: newWidget\n };\n this.setNewState({ name: DASHBOARD_CHILDREN_STATE_NAME.config, children }, 'config', [\n newWidget\n ]);\n }\n } catch (ex) {\n // intended empty\n }\n }\n\n async saveWidgetsToDashboard() {\n const currentState = this.editModeService.getCurrentState();\n\n const editedChildren = currentState.children;\n\n // first-time save (no `id` yet): create the dashboard, then immediately update it with the edited widgets\n if (!this.mo.id) {\n this.mo = await this.contextDashboardService.create(\n this.mo.c8y_Dashboard,\n this.context,\n this.name\n );\n }\n\n this.mo.c8y_Dashboard.children = editedChildren;\n this.mo.c8y_Dashboard.historyDescription = {\n changeType: 'update',\n widgetChanges: this.mapStateToHistoryDescription(currentState.changeHistory)\n };\n\n await this.contextDashboardService.update(this.mo);\n\n this.editModeService.reset();\n this.editModeService.init({\n name: DASHBOARD_CHILDREN_STATE_NAME.initial,\n children: editedChildren,\n changeHistory: {}\n });\n this.isCopyDisabled = this.getDashboardCopyPermissionState();\n\n this.contextDashboardStateService.dashboardSaved.next(this.mo);\n }\n\n async cancelEditMode(onDeactivate = false): Promise<void> {\n const dashboardChildren = this.editModeService.reset();\n if (this.dashboard) {\n this.dashboard.historyDescription = {};\n }\n this.widgetsDashboard.editMode$.next(false);\n if (!onDeactivate) {\n // when setWidgets is called during navigation from device to device, navigation fails\n await this.setWidgets(dashboardChildren.children);\n }\n }\n\n /**\n * Updates a widget or adds a new one if it doesn't exist on\n * the dashboard.\n * @param widget The new widget\n */\n async updateWidget(widget) {\n const index = findIndex(this.widgets, { id: widget.id });\n const isNew = index === -1;\n const mappedWidget = await this.widgetService.mapLegacy(widget);\n if (isNew) {\n this.widgets.push(mappedWidget);\n } else {\n this.widgets.splice(index, 1, mappedWidget);\n }\n }\n\n /**\n * Removes a widget and rearranges the remaining ones\n * if necessary.\n * @param change The change event.\n */\n async deleteWidget(change: WidgetChange) {\n try {\n const { widget, source } = change;\n const removed = this.widgets.find(({ id }) => id === widget.id);\n this.widgets.splice(this.widgets.indexOf(removed), 1);\n\n const { dashboard } = source;\n dashboard.children = dashboard.children.filter(c => c.data.id !== widget.id);\n\n // using setTimeout to give the component the chance to remove it.\n const sleep = timeout => new Promise(resolve => setTimeout(resolve, timeout));\n await sleep(0);\n\n const child = new DashboardChildChange(source);\n child.collapseUpAll();\n this.updateDashboardChildren(child, DASHBOARD_CHILDREN_STATE_NAME.removed, 'removed', [\n widget\n ]);\n } catch (e) {\n this.alert.addServerFailure(e);\n }\n }\n\n /**\n * This is a workaround to ensure that the dragged-element\n * (which is attached to the body) has the right styling.\n */\n addDashboardClassToBody() {\n this.class.split(' ').forEach(cssClass => {\n this.renderer.addClass(document.body, cssClass);\n });\n }\n\n /**\n * This is a workaround to ensure that the dragged-element\n * (which is attached to the body) has the right styling.\n */\n removeDashboardClassFromBody() {\n this.class.split(' ').forEach(cssClass => {\n this.renderer.removeClass(document.body, cssClass);\n });\n }\n\n async onLoad(trackExperience?: boolean) {\n this.isNamedDashboard = this.contextDashboardService.isNamed(this.mo);\n this.hasPermissionToEditDashboard = this.dashboard\n ? await this.contextDashboardService.canEditDashboard(this.mo)\n : false;\n this.canCopy =\n this._canCopy &&\n (this.contextDashboardService.isDeviceDashboard(this.mo) ||\n this.contextDashboardService.isDeviceType(this.mo) ||\n this.contextDashboardService.isGroupDashboard(this.mo));\n const dashboardChildren: ContextDashboard['children'] = cloneDeep(\n this.mo.c8y_Dashboard?.children\n );\n const dashboardClasses = {\n 'c8y-grid-dashboard': true,\n dashboard: true,\n ...this.dashboard?.classes\n };\n this.isCopyDisabled = this.dashboard\n ? this.getDashboardCopyPermissionState()\n : { state: false, reason: null };\n this.editModeService.init({\n name: gettext('Initial state'),\n children: dashboardChildren,\n changeHistory: {}\n });\n\n await this.setWidgets(dashboardChildren, trackExperience);\n this.class = Object.keys(dashboardClasses).join(' ');\n if (this.isReport) {\n this.addReportDashboardSettings();\n }\n this.isLoading = false;\n\n if (!this.dashboard) {\n this.dashboardDetails.show(false);\n } else {\n await this.onLoadGSEvent();\n }\n }\n\n async dashboardPreview(layoutChanges: ContextDashboard) {\n if (layoutChanges?.classes) {\n const dashboardClasses = {\n 'c8y-grid-dashboard': true,\n dashboard: true,\n ...layoutChanges.classes\n };\n this.class = Object.keys(dashboardClasses).join(' ');\n } else if (this.dashboard) {\n this.dashboard.widgetClasses = {\n ...this.dashboard.widgetClasses,\n ...layoutChanges.widgetClasses\n };\n }\n }\n\n async reloadDashboard(dashboardMo: ContextDashboardManagedObject) {\n this.dashboard = dashboardMo.c8y_Dashboard;\n this.mo = dashboardMo;\n await this.onLoad();\n }\n\n private async setWidgets(\n dashboardChildren: ContextDashboard['children'],\n trackExperience = false\n ): Promise<void> {\n const isDeviceType = this.contextDashboardService.isDeviceType(this.mo);\n this.widgets = await Promise.all<Widget>(\n Object.values(dashboardChildren || {}).map(widget => {\n widget.classes = this.mergeWidgetClasses(widget);\n if (isDeviceType) {\n this.applyDeviceTarget(widget);\n }\n if (trackExperience) {\n this.gainsightService.triggerEvent('loadWidget', {\n widgetName: widget.componentId || widget.name\n });\n }\n return this.widgetService.mapLegacy(widget);\n })\n );\n }\n\n private loadContextDashboard() {\n this.dataSub = this.route.data.subscribe(({ dashboard, isReport }) => {\n this.context = this.route.parent.snapshot.data.contextData || {};\n this.title = this.context?.name;\n this.mo = dashboard;\n this.contextDashboardStateService.setSelectedDashboard(this.mo);\n this.dashboard = this.mo.c8y_Dashboard;\n this.isReport = isReport || this.contextDashboardService.isReport(this.mo);\n if (this.isReport && this.dashboard && !this.dashboard?.name) {\n this.dashboard.name = this.title;\n }\n if (this.isReport && this.dashboard) {\n this.dashboard.c8y_IsNavigatorNode = this.context.c8y_IsNavigatorNode;\n }\n this.patchSensorPhoneDashboard(this.dashboard, this.mo.owner, this.context?.type);\n\n this.onLoad(true);\n });\n }\n\n /**\n * To enable translation for widgets within the dashboard, the \"translateWidgetTitle\" flag must be enabled.\n * The property needs to be patched, as the \"Sensor App\" does not provide this setting.\n */\n private patchSensorPhoneDashboard(dashboard: ContextDashboard, owner: string, type: string) {\n if (type === 'c8y_SensorPhone' && owner?.includes('device_phone')) {\n dashboard.translateWidgetTitle = true;\n }\n }\n\n private loadNamedDashboard() {\n this.dataSub = this.contextDashboardService\n .getDashboard(this.name, this.defaultWidgets)\n .subscribe(mo => {\n this.context = this.context || {};\n this.mo = mo;\n this.dashboard = this.mo.c8y_Dashboard;\n this.contextDashboardStateService.setSelectedDashboard(this.mo);\n\n this.onLoad(true);\n });\n }\n\n private mergeWidgetClasses(widget: Widget): Record<string, boolean> {\n const hasHeaderClass = WIDGET_HEADER_CLASSES.find(\n el => widget.classes && widget.classes[el.class]\n );\n const widgetClasses = hasHeaderClass\n ? { ...widget.classes }\n : { ...this.dashboard.widgetClasses, ...widget.classes };\n return {\n card: true,\n 'card-dashboard': true,\n [kebabCase(widget.componentId || widget.name)]: true,\n ...widgetClasses\n };\n }\n\n private componentToWidget(child: DashboardChildComponent) {\n return {\n ...omit(child.data, ['componentTransformConfigWithContext', 'transformConfigWithContext']), // remove legacy\n ...({ _x: child.x, _y: child.y, _width: child.width, _height: child.height } as Widget)\n };\n }\n\n private addReportDashboardSettings() {\n this.setTitle = true;\n this.title = this.context?.name || gettext('New report');\n this.breadcrumbSettings = { icon: 'th', label: 'Reports', path: 'reports' };\n this.canDelete = false;\n }\n\n private getDashboardCopyPermissionState(): DashboardCopyPermission {\n if (!this.contextDashboardService.hasPermissionsToCopyDashboard()) {\n return { state: false, reason: CopyDashboardDisabledReason.PERMISSIONS };\n }\n const allDashboardChildrenAreValid = every(this.mo.c8y_Dashboard.children, child => {\n const config = child.config || {};\n const dataPoints = config.datapoints || [];\n return !(\n (config.device && config.device.id !== this.context.id) ||\n some(dataPoints, dataPoint => dataPoint.__target?.id !== this.context.id)\n );\n });\n if (!allDashboardChildrenAreValid) {\n return { state: false, reason: CopyDashboardDisabledReason.WRONG_REFERENCE };\n }\n return { state: true };\n }\n\n private setNewState(\n state: Pick<DashboardChildrenState, 'name' | 'children'>,\n descriptionProp: keyof DashboardHistoryDescription['widgetChanges'],\n widgetsChanged: Widget[]\n ): void {\n const description = this.getDescriptionForNewState(descriptionProp, widgetsChanged);\n this.editModeService.newState({ ...state, changeHistory: description });\n }\n\n private getDescriptionForNewState(\n descriptionProp: keyof DashboardHistoryDescription['widgetChanges'],\n widgetsChanged: Widget[]\n ): DashboardChildrenState['changeHistory'] {\n const changeHistory = this.editModeService.getCurrentState().changeHistory;\n if (!changeHistory[descriptionProp]) {\n changeHistory[descriptionProp] = {};\n }\n widgetsChanged.forEach(w => {\n if (descriptionProp === 'removed' && changeHistory.added?.[w.id]) {\n // if widget was added during current edit session and then removed, it should not be at description at all\n delete changeHistory.added[w.id];\n if (changeHistory.config?.[w.id]) {\n delete changeHistory.config[w.id];\n }\n if (changeHistory.arrangement?.[w.id]) {\n delete changeHistory?.arrangement[w.id];\n }\n } else if (\n (descriptionProp === 'config' || descriptionProp === 'arrangement') &&\n changeHistory.added?.[w.id]\n ) {\n // if widget was added and then modified in current edit session, it should only be indicated as added\n } else {\n changeHistory[descriptionProp][w.id] = w;\n }\n });\n\n return changeHistory;\n }\n\n private mapStateToHistoryDescription(\n description: DashboardChildrenState['changeHistory']\n ): DashboardHistoryDescription['widgetChanges'] {\n const historyDescription: DashboardHistoryDescription['widgetChanges'] = {};\n for (const [key, value] of Object.entries(description)) {\n const widgets = Object.values(value);\n if (!widgets.length) {\n continue;\n }\n historyDescription[key] = Object.values(value).map(widget => widget.title);\n }\n return historyDescription;\n }\n\n private async onDeleteGSEvent() {\n const parentName = await this.convertStringToHash(this.context?.name);\n const dashboardName = await this.convertStringToHash(this.dashboard?.name);\n\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DELETE_DASHBOARD,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,\n name: dashboardName,\n id: this.mo.id,\n nameId: `${dashboardName}_${this.mo.id}`,\n isDashboardTemplate: this.mo.c8y_Dashboard.deviceType,\n parentAssetId: this.context?.id ? this.context.id : 'noContext',\n parentAssetName: this.context?.id ? parentName : 'noContext',\n parentAssetType: this.context?.id ? this.context.type : 'noContext',\n parentAssetNameId: this.context?.id ? `${parentName}_${this.context.id}` : 'noContext',\n parentAssetNameDashboardName: this.context?.id\n ? `${parentName}_${dashboardName}`\n : 'noContext',\n parentAssetIdDashboardId: this.context?.id ? `${this.context.id}_${this.mo.id}` : 'noContext',\n parentAssetNameDashboardId: this.context?.id ? `${parentName}_${this.mo.id}` : 'noContext',\n parentAssetNameIdDashboardNameId: this.context?.id\n ? `${parentName}_${this.context.id}_${dashboardName}_${this.mo.id}`\n : 'noContext',\n dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,\n context: this.contextDashboardService.getContextForGS(this.context)\n });\n }\n\n private async onLoadGSEvent() {\n const parentName = await this.convertStringToHash(this.context?.name);\n const dashboardName =\n (await this.convertStringToHash(this.dashboard?.name)) ??\n this.extractDefaultDashboardName(this.mo) ??\n 'none';\n\n this.gainsightService.triggerEvent(\n this.isReport\n ? PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS\n : PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS,\n {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_VIEW,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.LOAD,\n name: dashboardName,\n id: this.mo.id,\n isDashboardTemplate: this.mo.c8y_Dashboard.deviceType,\n nameId: `${dashboardName}_${this.mo.id}`,\n parentAssetId: this.context?.id ? this.context.id : 'noContext',\n parentAssetName: this.context?.id ? parentName : 'noContext',\n parentAssetType: this.context?.id ? this.context.type : 'noContext',\n parentAssetNameId: this.context?.id ? `${parentName}_${this.context.id}` : 'noContext',\n parentAssetNameDashboardName: this.context?.id\n ? `${parentName}_${dashboardName}`\n : 'noContext',\n parentAssetIdDashboardId: this.context?.id\n ? `${this.context.id}_${this.mo.id}`\n : 'noContext',\n parentAssetNameDashboardId: this.context?.id ? `${parentName}_${this.mo.id}` : 'noContext',\n parentAssetNameIdDashboardNameId: this.context?.id\n ? `${parentName}_${this.context.id}_${dashboardName}_${this.mo.id}`\n : 'noContext',\n dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,\n context: this.isReport\n ? PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT\n : this.contextDashboardService.getContextForGS(this.context)\n }\n );\n }\n\n private extractDefaultDashboardName(obj: IManagedObject): string | null {\n const nameKey = Object.keys(obj).find(key => key.startsWith('c8y_Dashboard!name!'));\n if (nameKey) {\n return nameKey.split('!').pop();\n }\n return null;\n }\n\n @memoize()\n private async convertStringToHash(str: string) {\n if (!str) {\n return null;\n }\n return (await this.gainsightService.shouldSendPiiData())\n ? str\n : this.gainsightService.hashGroupName(str);\n }\n}\n","@if (title) {\n <c8y-title>\n {{ title }}\n </c8y-title>\n}\n\n@if (dashboard?.deviceType && dashboard.deviceTypeValue) {\n <c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"10000\"\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\n@if (defaultWidgets.length > 0) {\n <c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-1\"\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 || !mo?.id || (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\n@if (showContextHelpButton) {\n <c8y-help src=\"/docs/cockpit/working-with-dashboards/#working-with-dashboards\"></c8y-help>\n}\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 [isNamedDashboard]=\"isNamedDashboard\"\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 [isSaveDisabled]=\"contextDashboardStateService.isSaveDisabled | async\"\n [settings]=\"{\n isLoading: isLoading,\n isDisabled: disabled,\n canDelete: canDelete && !!dashboard,\n translateWidgetTitle: dashboard?.translateWidgetTitle ?? translateWidgetTitle,\n translateDashboardTitle: dashboard?.translateDashboardTitle ?? translateDashboardTitle,\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)=\"editDashboard()\"\n (onCopyDashboard)=\"copyDashboard()\"\n (onDeleteDashboard)=\"deleteDashboard()\"\n></c8y-widgets-dashboard>\n","import { inject, Injectable } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { ContextRouteService, Tab, TabFactory, ViewContext } from '@c8y/ngx-components';\nimport {\n DASHBOARD_DETAILS_OUTLET,\n DASHBOARD_DETAILS_TABS_OUTLET_NAME,\n DashboardDetailsTabId\n} from './context-dashboard.model';\nimport { ActivatedRoute } from '@angular/router';\n\n@Injectable()\nexport class DashboardDetailsTabsFactory implements TabFactory {\n private activatedRoute = inject(ActivatedRoute);\n private contextRouteService = inject(ContextRouteService);\n private generalTab: Tab = {\n label: gettext('General'),\n featureId: DashboardDetailsTabId.GENERAL,\n icon: 'imac-settings',\n priority: 100,\n path: [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: DashboardDetailsTabId.GENERAL\n }\n }\n ],\n tabsOutlet: DASHBOARD_DETAILS_TABS_OUTLET_NAME\n };\n\n private appearanceTab: Tab = {\n label: gettext('Appearance'),\n featureId: DashboardDetailsTabId.APPEARANCE,\n icon: 'web-design',\n priority: 50,\n path: [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: DashboardDetailsTabId.APPEARANCE\n }\n }\n ],\n tabsOutlet: DASHBOARD_DETAILS_TABS_OUTLET_NAME\n };\n private versionHistoryTab: Tab = {\n label: gettext('Version history'),\n featureId: DashboardDetailsTabId.VERSIONHISTORY,\n icon: 'versions',\n priority: 10,\n path: [\n {\n outlets: {\n [DASHBOARD_DETAILS_OUTLET]: DashboardDetailsTabId.VERSIONHISTORY\n }\n }\n ],\n tabsOutlet: DASHBOARD_DETAILS_TABS_OUTLET_NAME\n };\n\n get() {\n const rootContext = this.contextRouteService.getRootContextOfChild(this.activatedRoute);\n if (rootContext === ViewContext.Dashboard) {\n return [this.generalTab, this.appearanceTab, this.versionHistoryTab];\n }\n return [];\n }\n}\n","import { Component, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n ViewContext,\n IconDirective,\n C8yTranslateDirective,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport { DashboardContext } from './context-dashboard.model';\nimport { ContextDashboardService } from './context-dashboard.service';\n\n@Component({\n selector: 'c8y-paste-dashboard-action',\n template: `\n <ng-template #templatePaste>\n <li>\n <button\n class=\"btn btn-link\"\n title=\"{{ buttonTitle | translate }}\"\n type=\"button\"\n (click)=\"pasteDashboard()\"\n [disabled]=\"pasteDisabled\"\n >\n <i class=\"m-r-4\" c8yIcon=\"clipboard\"></i>\n <span ngNonBindable translate [translateParams]=\"{ dashboardName: dashboardName }\">\n Paste dashboard \"{{ dashboardName }}\"\n </span>\n </button>\n </li>\n </ng-template>\n `,\n imports: [IconDirective, C8yTranslateDirective, C8yTranslatePipe]\n})\nexport class PasteDashboardActionComponent implements OnInit {\n pasteDisabled = false;\n @ViewChild('templatePaste', { read: TemplateRef, static: true }) templatePaste;\n dashboardName = '';\n buttonTitle: string;\n private currentViewContext: ViewContext;\n private currentUrl: string;\n private contextMO: IManagedObject;\n private contextId: string;\n\n constructor(\n private vcRef: ViewContainerRef,\n private router: Router,\n private contextDashboardService: ContextDashboardService,\n private inventoryService: InventoryService\n ) {}\n\n async ngOnInit() {\n this.currentUrl = this.router.url;\n this.contextId = this.currentUrl.match(/\\d+/)[0];\n\n const isDevice: boolean = new RegExp(/device\\/\\d+/).test(this.currentUrl);\n const isGroup: boolean = new RegExp(/group\\/\\d+/).test(this.currentUrl);\n this.currentViewContext = isDevice ? ViewContext.Device : isGroup ? ViewContext.Group : null;\n await this.checkIfPasteIsAllowed();\n\n this.vcRef.createEmbeddedView(this.templatePaste);\n const clipboard = this.contextDashboardService.copyClipboard;\n if (clipboard) {\n this.dashboardName = clipboard.dashboard.name;\n }\n }\n\n async pasteDashboard() {\n if (!this.contextMO) {\n this.contextMO = await this.getContextMo(this.contextId);\n }\n const context: DashboardContext = {\n context: this.currentViewContext,\n contextData: this.contextMO\n };\n\n await this.contextDashboardService.pasteDashboard(context);\n }\n\n private async getContextMo(id: string): Promise<IManagedObject> {\n return (await this.inventoryService.detail(id)).data;\n }\n\n private async checkIfPasteIsAllowed(): Promise<void> {\n const clipboardViewContext = this.contextDashboardService.copyClipboard.context.context;\n const isTypeDashboard = this.contextDashboardService.copyClipboard?.dashboard?.deviceType;\n\n if (this.currentViewContext !== clipboardViewContext) {\n if (clipboardViewContext === ViewContext.Device) {\n this.buttonTitle = gettext('Device dashboards can only be copied into a device.');\n } else if (clipboardViewContext === ViewContext.Group) {\n this.buttonTitle = gettext('Group dashboards can only be copied into a group.');\n }\n this.pasteDisabled = true;\n return;\n } else if (isTypeDashboard) {\n this.contextMO = await this.getContextMo(this.contextId);\n const dashboardDeviceType =\n this.contextDashboardService.copyClipboard.dashboard.deviceTypeValue;\n if (dashboardDeviceType === this.contextMO.type) {\n this.buttonTitle = gettext(\n 'Dashboard template can only be copied into assets of a different type.'\n );\n this.pasteDisabled = true;\n return;\n }\n }\n\n this.buttonTitle = gettext('Paste dashboard');\n this.pasteDisabled = false;\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { InventoryService } from '@c8y/client';\nimport { ContextDashboardManagedObject } from '../context-dashboard.model';\nimport { AlertService, C8yTranslatePipe, DatePipe } from '@c8y/ngx-components';\nimport { NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-type-dashboard-info',\n templateUrl: './type-dashboard-info.component.html',\n standalone: true,\n imports: [C8yTranslatePipe, DatePipe, NgIf]\n})\nexport class TypeDashboardInfoComponent implements OnInit {\n @Input() deviceTypeValue: string;\n @Input() displayDeviceTypeValue: string;\n @Input() context: ContextDashboardManagedObject;\n deviceTypeInstancesCount: number;\n @Input() asyncRenderSuccess: () => void;\n @Input() asyncRenderFail: () => void;\n\n constructor(\n private inventory: InventoryService,\n private alert: AlertService\n ) {}\n\n async ngOnInit() {\n await this.updateDeviceTypeCount();\n }\n\n private async updateDeviceTypeCount(): Promise<void> {\n try {\n const count = await this.inventory.count({\n type: this.deviceTypeValue || this.context.c8y_Dashboard.deviceTypeValue\n });\n this.deviceTypeInstancesCount = count.data;\n this.asyncRenderSuccess?.();\n } catch (error) {\n this.alert.addServerFailure(error);\n this.asyncRenderFail?.();\n }\n }\n}\n","<ul class=\"list-unstyled small animated fadeIn\">\n <li class=\"p-t-4 p-b-4 d-flex separator-top-bottom text-nowrap\">\n <label class=\"small m-b-0 m-r-8\">{{ 'Target asset model' | translate }}</label>\n <span class=\"m-l-auto\">\n <span class=\"label label-info\">\n {{ displayDeviceTypeValue || context.c8y_Dashboard.deviceTypeValue }}\n </span>\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\">\n <label class=\"small m-b-0 m-r-8\">{{ 'Dashboard instances' | translate }}</label>\n <span class=\"m-l-auto\">{{ deviceTypeInstancesCount }}</span>\n </li>\n <ng-container *ngIf=\"context?.c8y_Dashboard\">\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\">\n <label class=\"small m-b-0 m-r-8\">{{ 'Created' | translate }}</label>\n <span class=\"m-l-auto\">\n {{ context.creationTime | c8yDate }} {{ 'by`user`' | translate }} {{ context.owner }}\n </span>\n </li>\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\"\n *ngIf=\"context?.c8y_DashboardHistory?.length\"\n >\n <label class=\"small m-b-0 m-r-8\">{{ 'Last modified' | translate }}</label>\n <span class=\"m-l-auto\">\n {{ context.c8y_DashboardHistory[0].created | c8yDate }} {{ 'by`user`' | translate }}\n {{ context.c8y_DashboardHistory[0].author }}\n </span>\n </li>\n </ng-container>\n</ul>\n","import { Component, inject, TemplateRef, ViewChild } from '@angular/core';\nimport { WidgetConfigService } from '../widget-config.service';\n\n@Component({\n selector: 'c8y-widget-preview-wrapper',\n template: '<ng-template #previewContent><ng-content></ng-content></ng-template>',\n standalone: true,\n imports: []\n})\nexport class WidgetPreviewWrapperComponent {\n widgetConfigService = inject(WidgetConfigService);\n\n @ViewChild('previewContent')\n set previewSet(template: TemplateRef<any>) {\n if (template) {\n this.widgetConfigService.setPreview(template);\n return;\n }\n this.widgetConfigService.setPreview(null);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CoreModule, hookRoute, hookTab, ViewContext } from '@c8y/ngx-components';\nimport { AssetSelectorModule } from '@c8y/ngx-components/assets-navigator';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { CollapseModule } from 'ngx-bootstrap/collapse';\nimport { BsDropdownModule } from 'ngx-bootstrap/dropdown';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { AddDashboardComponent } from './add-dashboard.component';\nimport { ContextDashboardComponent } from './context-dashboard.component';\nimport {\n CONTEXT_DASHBOARD_CONFIG,\n ContextDashboardConfig,\n DASHBOARD_DETAILS_OUTLET,\n DashboardDetailsTabId\n} from './context-dashboard.model';\nimport { DashboardDetailComponent } from './dashboard-detail.component';\nimport { DashboardDetailsTabsFactory } from './dashboard-details-tabs.factory';\nimport { PasteDashboardActionComponent } from './paste-dashboard-action.component';\nimport { TypeDashboardInfoComponent } from './type-dashboard-info/type-dashboard-info.component';\nimport { WidgetConfigComponent } from './widget-config.component';\nimport { AppearanceSettingsComponent } from './widget-config/appearance-settings.component';\nimport { WidgetConfigSectionComponent } from './widget-config/widget-config-section.component';\nimport { WidgetPreviewComponent } from './widget-config/widget-preview.component';\nimport { WidgetPreviewWrapperComponent } from './widget-config/widget-preview-wrapper.component';\n\nconst defaultConfig = {\n allowFullscreen: true\n} as const satisfies ContextDashboardConfig;\n\n/**\n * Module for the Context Dashboard feature.\n * This module provides components and configurations for managing dashboards,\n * {@link ContextDashboardComponent} is the main component for displaying the dashboard context.\n * {@link WidgetConfigComponent} allows for configuring widgets within the dashboard.\n * {@link DashboardDetailComponent} provides detailed views of individual dashboards.\n */\n@NgModule({\n imports: [\n CoreModule,\n TooltipModule,\n PopoverModule,\n AssetSelectorModule,\n IconSelectorModule,\n BsDropdownModule.forRoot(),\n CollapseModule.forRoot(),\n RouterModule,\n AppearanceSettingsComponent,\n TypeDashboardInfoComponent,\n WidgetPreviewComponent,\n WidgetConfigSectionComponent,\n WidgetPreviewWrapperComponent,\n ContextDashboardComponent,\n WidgetConfigComponent,\n DashboardDetailComponent,\n AddDashboardComponent,\n PasteDashboardActionComponent\n ],\n exports: [\n ContextDashboardComponent,\n WidgetConfigComponent,\n DashboardDetailComponent,\n TypeDashboardInfoComponent,\n WidgetConfigSectionComponent,\n AppearanceSettingsComponent,\n WidgetPreviewWrapperComponent\n ],\n providers: [\n {\n provide: CONTEXT_DASHBOARD_CONFIG,\n useValue: defaultConfig\n },\n hookTab(DashboardDetailsTabsFactory),\n hookRoute([\n {\n path: DashboardDetailsTabId.GENERAL,\n loadComponent: () =>\n import('./dashboard-settings/dashboard-general-settings.component').then(\n m => m.DashboardGeneralSettingsComponent\n ),\n outlet: DASHBOARD_DETAILS_OUTLET,\n context: ViewContext.Dashboard\n },\n {\n path: DashboardDetailsTabId.APPEARANCE,\n loadComponent: () =>\n import('./dashboard-settings/dashboard-appearance-settings.component').then(\n m => m.DashboardAppearanceSettingsComponent\n ),\n outlet: DASHBOARD_DETAILS_OUTLET,\n context: ViewContext.Dashboard\n },\n {\n path: DashboardDetailsTabId.VERSIONHISTORY,\n loadComponent: () =>\n import('./dashboard-settings/dashboard-version-history.component').then(\n m => m.DashboardVersionHistoryComponent\n ),\n outlet: DASHBOARD_DETAILS_OUTLET,\n context: ViewContext.Dashboard\n }\n ])\n ]\n})\nexport class ContextDashboardModule {\n static config(config: ContextDashboardConfig = {}): ModuleWithProviders<ContextDashboardModule> {\n return {\n ngModule: ContextDashboardModule,\n providers: [\n {\n provide: CONTEXT_DASHBOARD_CONFIG,\n useValue: { ...defaultConfig, ...config }\n },\n hookRoute(config.routes || [])\n ]\n };\n }\n}\n","import { inject } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ViewContext, ActionBarFactory, ActionBarItem } from '@c8y/ngx-components';\nimport { Observable } from 'rxjs';\nimport { ContextDashboardService } from './context-dashboard.service';\nimport { PasteDashboardActionComponent } from './paste-dashboard-action.component';\n\nexport abstract class DashboardActionBarFactory implements ActionBarFactory {\n protected abstract targetContext: ViewContext.Device | ViewContext.Group;\n routeChanges$: Observable<any>;\n\n private contextDashboardService = inject(ContextDashboardService);\n\n get(activeRoute: ActivatedRoute) {\n const actions = [];\n const data =\n !activeRoute.parent || activeRoute.snapshot.data.context\n ? activeRoute.snapshot.data\n : activeRoute.parent.snapshot.data;\n const { contextData } = data;\n const canPaste =\n contextData &&\n data.context === this.targetContext &&\n this.contextDashboardService.copyClipboard;\n\n if (canPaste) {\n actions.push({\n priority: -10,\n placement: 'more',\n template: PasteDashboardActionComponent\n } as ActionBarItem);\n }\n\n return actions;\n }\n}\n","import { AsyncPipe } from '@angular/common';\nimport { Component, inject, ViewChild } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { InventoryService } from '@c8y/client';\nimport { ContextData, PreviewService, TitleComponent, Widget } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { TranslateService } from '@ngx-translate/core';\nimport { from, Subscription } from 'rxjs';\nimport { map, mergeMap, tap, toArray } from 'rxjs/operators';\nimport { ContextDashboardComponent } from '../context-dashboard.component';\nimport { CanDeactivateComponent } from '../context-dashboard.model';\nimport { WidgetService } from '../widget.service';\n\n@Component({\n selector: 'c8y-device-info-dashboard-dashboard',\n templateUrl: './device-info-dashboard.component.html',\n imports: [TitleComponent, ContextDashboardComponent, AsyncPipe]\n})\nexport class DeviceInfoDashboardComponent implements CanDeactivateComponent {\n isLoading = true;\n title: string;\n dashboardName = '';\n widgetsList: Widget[];\n currentContext: ContextData;\n contextSubscription: Subscription;\n widgetsSubscription: Subscription;\n @ViewChild(ContextDashboardComponent, { static: false })\n contextDashboard: ContextDashboardComponent;\n protected readonly previewFeatureService = inject(PreviewService);\n protected readonly previewEnabled$ =\n this.previewFeatureService.getState$('ui.dm-dashboard-manager');\n\n DEVICE_INFO_WIDGETS = [\n {\n name: 'deviceStatusWidget',\n title: gettext('Device status'),\n _x: 0,\n _y: 0,\n _height: 5,\n _width: 8\n },\n {\n name: 'Data points graph',\n title: gettext('Device and communication'),\n _x: 8,\n _y: 0,\n _height: 5,\n _width: 16,\n config: {\n interval: 'hours',\n aggregation: 'NONE',\n realtime: true,\n datapointsInitialDisplayLimit: 3,\n datapoints: [\n {\n fragment: 'c8y_Battery',\n series: 'level',\n label: this.translateService.instant('Battery: level'),\n unit: '%',\n renderType: 'min',\n lineType: 'line',\n color: '#5e07b3',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'rssi',\n label: this.translateService.instant('Signal: RSSI'),\n unit: 'dBm',\n renderType: 'min',\n lineType: 'line',\n color: '#a7d0f1',\n __active: true\n },\n {\n fragment: 'c8y_MemoryMeasurement',\n series: 'Used',\n label: this.translateService.instant('Memory: used'),\n unit: 'MB',\n renderType: 'min',\n lineType: 'line',\n color: '#f75229',\n __active: true\n },\n {\n fragment: 'c8y_CPUMeasurement',\n series: 'Workload',\n label: this.translateService.instant('CPU: workload'),\n unit: '%',\n renderType: 'min',\n lineType: 'line',\n color: '#b24f3e',\n __active: true\n },\n {\n fragment: 'c8y_NetworkStatistics',\n series: 'Upload',\n label: this.translateService.instant('Network: upload'),\n unit: 'KB/s',\n renderType: 'min',\n lineType: 'line',\n color: '#88c039',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RCSP',\n label: this.translateService.instant('Signal: RCSP'),\n renderType: 'min',\n lineType: 'line',\n color: '#5e2f19',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RSCP',\n label: this.translateService.instant('Signal: RSCP'),\n renderType: 'min',\n lineType: 'line',\n color: '#5e2f19',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RSRP',\n label: this.translateService.instant('Signal: RSRP'),\n renderType: 'min',\n lineType: 'line',\n color: '#43ba3b',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'RSRQ',\n label: this.translateService.instant('Signal: RSRQ'),\n renderType: 'min',\n lineType: 'line',\n color: '#14b0b3',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'ber',\n label: this.translateService.instant('Signal: BER'),\n unit: '%',\n renderType: 'min',\n lineType: 'line',\n color: '#44ff33',\n __active: true\n },\n {\n fragment: 'c8y_SignalStrength',\n series: 'ECN0',\n label: this.translateService.instant('Signal: ECN0'),\n renderType: 'min',\n lineType: 'line',\n color: '#873efa',\n __active: true\n },\n {\n fragment: 'c8y_NetworkStatistics',\n series: 'Download',\n label: this.translateService.instant('Network: download'),\n unit: 'KB/s',\n renderType: 'min',\n lineType: 'line',\n color: '#f27a45',\n __active: true\n },\n {\n fragment: 'c8y_MemoryMeasurement',\n series: 'Total',\n label: this.translateService.instant('Memory: total'),\n unit: 'MB',\n renderType: 'min',\n lineType: 'line',\n color: '#dadd8c',\n __active: true\n }\n ],\n alarmsEventsConfigs: [\n {\n label: 'c8y_LocationUpdate',\n timelineType: 'EVENT',\n color: '#6f6cd0',\n filters: {\n type: 'c8y_LocationUpdate'\n },\n __active: true\n },\n {\n label: 'c8y_UnavailabilityAlarm',\n timelineType: 'ALARM',\n color: '#375bf2',\n filters: {\n type: 'c8y_UnavailabilityAlarm'\n },\n __active: true\n }\n ]\n }\n },\n {\n name: 'Asset Properties',\n title: gettext('Device data'),\n config: {\n options: {\n properties: [\n {\n id: 'c8ySchema!!id',\n __active: true,\n keyPath: ['id'],\n type: 'string',\n label: 'ID'\n },\n {\n id: 'c8ySchema!!name',\n __active: true,\n keyPath: ['name'],\n type: 'string',\n label: 'Name'\n },\n {\n id: 'c8ySchema!!type',\n __active: true,\n keyPath: ['type'],\n type: 'string',\n label: 'Type'\n },\n {\n id: 'c8ySchema!!lastUpdated',\n __active: true,\n keyPath: ['lastUpdated'],\n type: 'string',\n label: 'Last Updated'\n },\n {\n id: 'c8ySchema!!creationTime',\n __active: true,\n keyPath: ['creationTime'],\n type: 'string',\n label: 'Creation Time'\n }\n ],\n allowDisplayAndEditKnownProperties: false,\n hiddenPropertiesKeyPaths: ['owner']\n }\n },\n _x: 0,\n _y: 5,\n _height: 8,\n _width: 8\n },\n {\n name: 'Alarm list',\n title: gettext('Active, critical alarms'),\n _x: 8,\n _y: 5,\n _height: 4,\n _width: 8,\n config: {\n widgetId: 'Asset Alarms',\n displayMode: 'config',\n aggregation: null,\n isAutoRefreshEnabled: true,\n refreshInterval: 30_000,\n refreshOption: 'live',\n dateTimeContext: {\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date().toISOString(),\n interval: 'custom'\n },\n options: {\n orderMode: 'ACTIVE_FIRST',\n severity: { CRITICAL: true },\n status: {\n ACTIVE: true,\n ACKNOWLEDGED: false,\n CLEARED: false\n },\n types: []\n }\n }\n },\n {\n name: 'deviceGroupAssignmentWidget',\n title: gettext('Group assignment'),\n _x: 16,\n _y: 5,\n _height: 4,\n _width: 8\n },\n {\n componentId: 'Map',\n title: gettext('Location'),\n _x: 8,\n _y: 9,\n _height: 4,\n _width: 16\n }\n ] as Widget[];\n\n constructor(\n private router: ActivatedRoute,\n private widgetService: WidgetService,\n private translateService: TranslateService,\n private inventoryService: InventoryService\n ) {}\n\n ngOnInit() {\n this.contextSubscription = this.router.parent.data\n .pipe(\n tap(({ contextData }) => {\n const contextNameValid = contextData.name && contextData.name.trim();\n this.title = contextNameValid ? contextData.name : contextData.id;\n this.dashboardName = `${contextData.id}-device-info`;\n })\n )\n .subscribe(async data => {\n this.currentContext = data as ContextData;\n this.addDeviceTargetForDP(data.contextData.id, data.contextData.name);\n });\n\n this.widgetsSubscription = from(this.DEVICE_INFO_WIDGETS)\n .pipe(\n mergeMap(widget => this.widgetService.mapLegacy(widget)),\n map(widget => {\n let device = this.router.parent.snapshot.data.contextData;\n if (device) {\n device = {\n name: device.name,\n id: device.id\n };\n }\n return {\n ...widget,\n config: {\n ...widget.config,\n device\n }\n };\n }),\n toArray()\n )\n .subscribe(async data => {\n await this.filterSupportedSeriesForDP(this.currentContext.contextData.id, data);\n this.widgetsList = data;\n this.isLoading = false;\n });\n }\n\n addDeviceTargetForDP(id: string | number, name: string) {\n const dpWidget = this.DEVICE_INFO_WIDGETS.filter(item => item.name == 'Data points graph')[0];\n // Add target to dataPoint config\n dpWidget.config.datapoints.map(item => (item['__target'] = { id, name }));\n // Add target to alarmEvents Config\n dpWidget.config.alarmsEventsConfigs.map(item => (item['__target'] = { id, name }));\n }\n\n async filterSupportedSeriesForDP(id: string | number, widgets: Widget[]) {\n const supportedMeasurements = await this.inventoryService.getMeasurementsAndSeries(id);\n const isDataPointSupported = dp =>\n supportedMeasurements.some(\n ({ fragment, series }) => dp.fragment === fragment && dp.series === series\n );\n const dpWidget = widgets.find(({ name }) => name === 'Data points graph');\n dpWidget.config.datapoints = dpWidget.config.datapoints.filter(isDataPointSupported);\n }\n\n ngOnDestroy() {\n this.widgetsSubscription.unsubscribe();\n this.contextSubscription.unsubscribe();\n }\n\n canDeactivate(): Promise<boolean> {\n return this.contextDashboard?.canDeactivate();\n }\n}\n","@if (!isLoading) {\n <div>\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 [disabled]=\"previewEnabled$ | async\"\n ></c8y-context-dashboard>\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { inject, NgModule } from '@angular/core';\nimport { CanActivateFn } from '@angular/router';\nimport { CoreModule, hookRoute, PreviewService, ViewContext } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { map, of, switchMap, take } from 'rxjs';\nimport { CanDeactivateComponent, ContextDashboardType } from '../context-dashboard.model';\nimport { ContextDashboardModule } from '../context-dashboard.module';\nimport { ContextDashboardService } from '../context-dashboard.service';\nimport { DeviceInfoDashboardComponent } from './device-info-dashboard.component';\n\nconst canActivateDeviceInfo: CanActivateFn = (route, _) => {\n const previewFeatureService = inject(PreviewService);\n const contextDashboardService = inject(ContextDashboardService);\n\n return previewFeatureService.getState$('ui.dm-dashboard-manager').pipe(\n switchMap(isPreviewEnabled => {\n return isPreviewEnabled\n ? contextDashboardService\n .activateDashboards(route, [ContextDashboardType.Device, ContextDashboardType.Type])\n .pipe(map(tabs => !(Array.isArray(tabs) && tabs.length > 0)))\n : of(true);\n }),\n take(1)\n );\n};\n\n@NgModule({\n imports: [CommonModule, CoreModule, ContextDashboardModule, DeviceInfoDashboardComponent],\n exports: [],\n providers: [\n hookRoute({\n context: ViewContext.Device,\n path: 'device-info',\n component: DeviceInfoDashboardComponent,\n canActivate: [canActivateDeviceInfo],\n label: gettext('Info'),\n priority: 10000,\n icon: 'asterisk',\n canDeactivate: [(component: CanDeactivateComponent) => component.canDeactivate()],\n rootContext: ViewContext.Dashboard\n })\n ]\n})\nexport class DeviceInfoDashboardModule {}\n","import { Component, OnInit, ViewChild } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Widget, TitleComponent, C8yTranslatePipe } from '@c8y/ngx-components';\nimport { CanDeactivateComponent } from '../context-dashboard.model';\nimport { WidgetService } from '../widget.service';\nimport { ContextDashboardComponent } from '../context-dashboard.component';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\n\n@Component({\n selector: 'c8y-device-management-home-dashboard',\n templateUrl: './device-management-home-dashboard.component.html',\n imports: [TitleComponent, ContextDashboardComponent, C8yTranslatePipe]\n})\nexport class DeviceManagementHomeDashboardComponent implements OnInit, CanDeactivateComponent {\n widgets = [];\n dashboardName = 'home-dm1';\n defaultWidgets = [\n {\n name: defaultWidgetIds.DEVICE_MANAGEMENT_WELCOME,\n title: gettext('Quick links'),\n _x: 0,\n _y: 0,\n _height: 4,\n _width: 12\n },\n {\n name: 'Recent Alarms',\n title: gettext('Recent alarms'),\n config: {\n widgetId: 'Recent Alarms',\n displayMode: 'config',\n aggregation: null,\n isAutoRefreshEnabled: true,\n refreshInterval: 30_000,\n refreshOption: 'live',\n dateTimeContext: {\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date().toISOString(),\n interval: 'custom'\n }\n },\n _x: 12,\n _y: 0,\n _height: 4,\n _width: 12\n }\n ] as Widget[];\n @ViewChild(ContextDashboardComponent, { static: true })\n contextDashboard: ContextDashboardComponent;\n\n constructor(private widgetService: WidgetService) {}\n\n ngOnInit() {\n this.defaultWidgets.map(async widget => {\n await this.widgetService\n .mapLegacy(widget)\n .then(transformedWidget => this.widgets.push(transformedWidget));\n });\n }\n\n canDeactivate(): Promise<boolean> {\n return this.contextDashboard?.canDeactivate();\n }\n}\n","<c8y-title>\n {{ 'Home' | translate }}\n</c8y-title>\n\n<c8y-context-dashboard\n [name]=\"dashboardName\"\n [defaultWidgets]=\"defaultWidgets\"\n [canDelete]=\"false\"\n [hideAvailability]=\"true\"\n></c8y-context-dashboard>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { CoreModule, hookNavigator, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { ContextDashboardModule } from '../context-dashboard.module';\nimport { DeviceManagementHomeDashboardComponent } from './device-management-home-dashboard.component';\nimport { CanDeactivateComponent } from '../context-dashboard.model';\n\n@NgModule({\n imports: [\n CommonModule,\n CoreModule,\n ContextDashboardModule,\n DeviceManagementHomeDashboardComponent\n ],\n exports: [],\n providers: [\n hookRoute({\n path: 'home',\n component: DeviceManagementHomeDashboardComponent,\n canDeactivate: [(component: CanDeactivateComponent) => component.canDeactivate()],\n rootContext: ViewContext.Dashboard\n }),\n hookNavigator({ label: gettext('Home'), icon: 'home', priority: 10000, path: '/home' })\n ]\n})\nexport class DeviceManagementHomeDashboardModule {}\n","import { Component, inject } from '@angular/core';\nimport { WIDGET_CONTENT_CLASSES, WIDGET_HEADER_CLASSES } from '../context-dashboard.model';\nimport { WidgetConfigComponent } from '../widget-config.component';\nimport { AppearanceSettingsComponent } from './appearance-settings.component';\nimport { NgIf } from '@angular/common';\nimport { WidgetPreviewComponent } from './widget-preview.component';\n\n@Component({\n standalone: true,\n imports: [AppearanceSettingsComponent, NgIf, WidgetPreviewComponent],\n selector: 'c8y-widget-config-appearance',\n templateUrl: 'widget-config-appearance.component.html'\n})\nexport class WidgetConfigAppearanceComponent {\n widgetConfig = inject(WidgetConfigComponent);\n possibleStyling = { WIDGET_HEADER_CLASSES, WIDGET_CONTENT_CLASSES };\n}\n","<div class=\"row\">\n <div class=\"col-xs-6\">\n <c8y-appearance-settings\n [(themeClass)]=\"widgetConfig.styling.contentClass\"\n [(headerClass)]=\"widgetConfig.styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"widgetConfig.defaultStyling.contentClass\"\n [defaultHeaderClass]=\"widgetConfig.defaultStyling.headerClass\"\n ></c8y-appearance-settings>\n </div>\n <div class=\"col-xs-6 sticky-header-top-0\">\n <c8y-widget-preview\n style=\"height: calc(100vh - 382px)\"\n [previewClasses]=\"widgetConfig.getStyle(true)\"\n ></c8y-widget-preview>\n </div>\n</div>\n","import { AsyncPipe } from '@angular/common';\nimport { Component, inject, Input } from '@angular/core';\nimport { C8yTranslatePipe } from '@c8y/ngx-components';\nimport {\n ConfigModeControlsComponent,\n GlobalContextEvent,\n GlobalContextState,\n GlobalContextWidgetWrapperComponent,\n PresetDefinition,\n PresetName,\n WidgetControlsPresetConfig,\n WidgetControls\n} from '@c8y/ngx-components/global-context';\nimport { isEmpty } from 'lodash-es';\nimport { WidgetConfigService } from '../widget-config.service';\nimport { WidgetConfigFeedbackComponent } from './widget-config-feedback.component';\n\n@Component({\n selector: 'c8y-global-context-section',\n templateUrl: './global-context-section.component.html',\n standalone: true,\n imports: [\n GlobalContextWidgetWrapperComponent,\n ConfigModeControlsComponent,\n AsyncPipe,\n WidgetConfigFeedbackComponent,\n C8yTranslatePipe\n ]\n})\nexport class GlobalContextSectionComponent {\n widgetConfigService = inject(WidgetConfigService);\n\n /** @deprecated Use `controls` instead */\n @Input()\n widgetControls: WidgetControlsPresetConfig | WidgetControls;\n\n /** Controls configuration (preset name or full definition) */\n @Input()\n controls: PresetName | PresetDefinition;\n\n /** Whether to use the new controls-based approach */\n get useControls(): boolean {\n return !!this.controls;\n }\n\n onGlobalContext(event: GlobalContextEvent): void {\n if (isEmpty(event.diff)) {\n return;\n }\n this.widgetConfigService.updateConfig(event.context);\n }\n\n onConfigChange(event: { context: GlobalContextState; diff: GlobalContextState }): void {\n if (isEmpty(event.diff)) {\n return;\n }\n this.widgetConfigService.updateConfig(event.context);\n }\n}\n","<div>\n @if (useControls) {\n <c8y-config-mode-controls\n [controls]=\"controls\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (configChange)=\"onConfigChange($event)\"\n ></c8y-config-mode-controls>\n } @else if (widgetControls) {\n <c8y-global-context-widget-wrapper\n [widgetControls]=\"widgetControls\"\n [displayMode]=\"'config'\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n }\n</div>\n\n<c8y-widget-config-feedback>\n <span class=\"tag tag--info chip text-12 m-4\">\n @if (widgetConfigService.currentConfig.displayMode === 'config') {\n <span\n class=\"text-truncate\"\n [title]=\"'The time context can only get changed in the configuration.' | translate\"\n translate\n >\n Configuration\n </span>\n }\n @if (widgetConfigService.currentConfig.displayMode === 'dashboard') {\n <span\n [title]=\"'The widget is bound to the global time context.' | translate\"\n translate\n >\n Dashboard\n </span>\n }\n @if (widgetConfigService.currentConfig.displayMode === 'view_and_config') {\n <span\n [title]=\"'The time context can be configured in the widget view mode.' | translate\"\n translate\n >\n Configuration and widget view\n </span>\n }\n </span>\n</c8y-widget-config-feedback>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i4","map","i1.ContextDashboardService","i5","i6.DashboardDetailService","i1.DashboardOriginatorService","i2.DashboardCaretakerService","tap","mergeMap","shareReplay","rxjsMerge","merge","i1.WidgetConfigSectionService","i1.WidgetService","i3.ContextDashboardService","i4.WidgetConfigService","filter","i4.WidgetService","i7.DashboardEditModeService","i2.ContextDashboardService","i2.WidgetService","switchMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,MAAM,eAAe,GAAgB;AAC1C,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;AAC/B,IAAA,IAAI,EAAE,eAAe;;AAErB,IAAA,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,CAAC;;MAIA,iBAAiB,CAAA;AAG5B,IAAA,WAAW,CAAC,KAA6B,EAAA;QACvC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI;QACjE,IAAI,SAAS,EAAE;AACb,YAAA,MAAM,SAAS,GAA2C;AACxD,gBAAA,aAAa,EAAE;aAChB;AACD,YAAA,KAAK,CAAC,IAAI,GAAG,EAAE,SAAS,EAAE;QAC5B;AACA,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,GAAG;AACT,gBAAA,GAAG,eAAe;gBAClB,IAAI,EAAE,CAAC,SAAS;gBAChB,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,CAAC;aACnC;QACH;QACA,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB;+GAnBW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAA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