@masterteam/dashboard-builder 0.0.76 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-DTm4d6HX.mjs → masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-DTm4d6HX.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-iLvC1OvH.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs} +84 -18
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +4 -4
- package/types/masterteam-dashboard-builder.d.ts +36 -3
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-iLvC1OvH.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -296,11 +296,31 @@ Dashboard filters have two independent scopes:
|
|
|
296
296
|
workspace's `currentId`). They are merged after page and chart values, so a
|
|
297
297
|
same-key runtime value cannot replace or clear the host's scope.
|
|
298
298
|
- Builder and viewer hosts pass the same client-form metadata through
|
|
299
|
-
`[lookups]` and `[
|
|
300
|
-
the host lookup names, runtime Status options accept
|
|
301
|
-
definitions or legacy flat level statuses, and
|
|
302
|
-
configuration is derived from the shared
|
|
303
|
-
`Level` module.
|
|
299
|
+
`[lookups]`, `[statuses]`, and `[levelsSchema]`. Lookup configuration labels
|
|
300
|
+
are normalized from the host lookup names, runtime Status options accept
|
|
301
|
+
canonical nested status definitions or legacy flat level statuses, and
|
|
302
|
+
Status/Phase Gate schema configuration is derived from the shared
|
|
303
|
+
hierarchical metadata tree's `Level` module. `[levelsSchema]` is the host's
|
|
304
|
+
levels collection; runtime Phase Gate and Schema Settings options read it,
|
|
305
|
+
and it replaces the legacy `pplus.settings` localStorage cache for hosts that
|
|
306
|
+
never wrote one.
|
|
307
|
+
- A Status filter's "Log" options are scoped to the row's selected level, so
|
|
308
|
+
two Status filters on different levels never share one list. They resolve in
|
|
309
|
+
this order:
|
|
310
|
+
1. `GET Modules?LevelId={levelId}`, filtered to the `Log` classification
|
|
311
|
+
(`ModuleClassificationEnum.Log = 0`; `Process` modules are not logs) and
|
|
312
|
+
cached per level for the session. This is the authoritative source — it is
|
|
313
|
+
the same call the control panel's Modules page makes.
|
|
314
|
+
2. The level's own `logs` collection, when the host levels schema carries one
|
|
315
|
+
(the legacy PPlus4 settings contract).
|
|
316
|
+
3. Status metadata: every definition scoped to that level that names a
|
|
317
|
+
`moduleId`. This derivation is the exact inverse of the runtime read
|
|
318
|
+
(`getStatuses(logId, 'Log')` matches on `moduleId`), so every offered
|
|
319
|
+
option resolves to real status values. Labels come from the metadata
|
|
320
|
+
tree's `Module` values, falling back to the status property name.
|
|
321
|
+
|
|
322
|
+
Sources 2 and 3 need no request, so the select stays populated for hosts that
|
|
323
|
+
cannot reach the `Modules` endpoint.
|
|
304
324
|
|
|
305
325
|
Both drawers edit a private draft. Apply commits and refreshes the relevant
|
|
306
326
|
scope; closing without Apply discards the draft. Clear replaces only the keys
|
|
@@ -4,7 +4,7 @@ import { CommonModule } from '@angular/common';
|
|
|
4
4
|
import { TranslocoService, TranslocoDirective } from '@jsverse/transloco';
|
|
5
5
|
import { ModalService } from '@masterteam/components/modal';
|
|
6
6
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
7
|
-
import { D as DashboardItemStoreService, F as FilterUtilsService, a as DashboardItem } from './masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
7
|
+
import { D as DashboardItemStoreService, F as FilterUtilsService, a as DashboardItem } from './masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Dashboard Dialog Component
|
|
@@ -124,4 +124,4 @@ function openDashboardDialog(modalService, config, params, options) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export { DashboardDialogComponent, openDashboardDialog };
|
|
127
|
-
//# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-
|
|
127
|
+
//# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-DTm4d6HX.mjs","sources":["../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.ts","../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.html"],"sourcesContent":["/**\r\n * Dashboard Dialog Component\r\n *\r\n * A flexible dialog wrapper that renders a DashboardItem inside.\r\n * Uses the same ItemConfig structure - maximum code reuse.\r\n *\r\n * The dialog simply wraps DashboardItem, so any chart/table/card\r\n * that works inline will work in a dialog too.\r\n */\r\n\r\nimport {\r\n Component,\r\n inject,\r\n input,\r\n signal,\r\n computed,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ItemConfig } from '../../../models/dashboard.model';\r\nimport { DashboardItemStoreService } from '../../services/item-store.service';\r\nimport { FilterUtilsService } from '../../services/filter-utils.service';\r\nimport { DashboardItem } from '../../dashboard-item';\r\n\r\n/**\r\n * Dashboard Dialog Component\r\n *\r\n * Opened via ModalService, renders a DashboardItem inside.\r\n * Usage:\r\n * this.modalService.open(DashboardDialogComponent, {\r\n * data: { config: itemConfig, params: queryParams }\r\n * });\r\n */\r\n@Component({\r\n selector: 'mt-dashboard-dialog',\r\n standalone: true,\r\n imports: [CommonModule, TranslocoDirective, DashboardItem],\r\n templateUrl: './dashboard-dialog.component.html',\r\n})\r\nexport class DashboardDialogComponent implements OnInit {\r\n private readonly itemStore = inject(DashboardItemStoreService);\r\n private readonly filterUtils = inject(FilterUtilsService);\r\n private readonly transloco = inject(TranslocoService);\r\n readonly modal = inject(ModalService);\r\n private readonly ref = inject(ModalRef);\r\n\r\n // Inputs from modal data\r\n readonly config = input<ItemConfig | null>(null);\r\n readonly params = input<Record<string, any>>({});\r\n readonly title = input<string | null>(null);\r\n readonly reportId = input<string | number | null>(null);\r\n\r\n // State\r\n readonly dialogConfig = signal<ItemConfig | null>(null);\r\n readonly actionParams = signal<Record<string, any>>({});\r\n\r\n // Computed\r\n readonly mergedParams = computed(() => ({\r\n ...this.params(),\r\n ...this.actionParams(),\r\n }));\r\n\r\n readonly processedConfig = computed(() => {\r\n const config = this.dialogConfig();\r\n if (!config) return null;\r\n\r\n // Deep clone and process filters\r\n const cloned = JSON.parse(JSON.stringify(config)) as ItemConfig;\r\n\r\n // Apply filter processing if service config exists\r\n if (cloned.serviceConfig) {\r\n const processed = this.filterUtils.handleFiltersForCustom(\r\n cloned.serviceConfig,\r\n this.mergedParams(),\r\n );\r\n cloned.serviceConfig = processed;\r\n }\r\n return cloned;\r\n });\r\n\r\n ngOnInit(): void {\r\n // Set config from input\r\n const config = this.config();\r\n if (config) {\r\n this.dialogConfig.set(config);\r\n }\r\n\r\n // Set params from input\r\n const params = this.params();\r\n if (params) {\r\n this.actionParams.set(params);\r\n }\r\n }\r\n\r\n /**\r\n * Close dialog\r\n */\r\n close(result?: any): void {\r\n this.ref.close(result);\r\n }\r\n\r\n /**\r\n * Handle actions from the inner DashboardItem\r\n */\r\n onItemAction(event: any): void {\r\n // If it's a close action, close the dialog\r\n if (event?.type === 'closeDialog') {\r\n this.close(event?.data);\r\n return;\r\n }\r\n\r\n // For navigation actions, close dialog and let parent handle\r\n if (event?.type === 'navigate' || event?.type === 'navigateTo') {\r\n this.close(event);\r\n return;\r\n }\r\n\r\n // For other action types, the inner mt-dashboard-item already\r\n // dispatches via ActionService — nothing more to do at the dialog host.\r\n }\r\n}\r\n\r\n/**\r\n * Helper service for opening dashboard dialogs\r\n */\r\nexport function openDashboardDialog(\r\n modalService: ModalService,\r\n config: ItemConfig,\r\n params?: Record<string, any>,\r\n options?: {\r\n title?: string;\r\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\r\n reportId?: string | number | null;\r\n },\r\n): ModalRef {\r\n const sizeClass = {\r\n sm: 'max-w-md',\r\n md: 'max-w-2xl',\r\n lg: 'max-w-4xl',\r\n xl: 'max-w-6xl',\r\n full: 'max-w-[95vw]',\r\n }[options?.size || 'lg'];\r\n\r\n const inputValues = {\r\n config,\r\n params: params || {},\r\n title: options?.title,\r\n reportId: options?.reportId ?? null,\r\n };\r\n return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: options?.title || '',\r\n styleClass: sizeClass,\r\n data: inputValues,\r\n inputValues,\r\n });\r\n}\r\n","<!--\r\n Inline height is intentional: the global `.mt-dialog .p-dialog-content\r\n .mt-modal-content { height:100% }` rule (common.css, unlayered) overrides any\r\n `h-[80vh]` class, and `.p-dialog` itself has no definite height, so a\r\n class-based height collapses to content. An inline style beats the unlayered\r\n rule, and `80vh` is viewport-relative (definite regardless of ancestors),\r\n giving the inner item -> table the bounded height it needs to scroll.\r\n padding-bottom is zeroed (the global 5rem reserves space for a footer this\r\n dialog does not render).\r\n-->\r\n<div\r\n [class]=\"modal.contentClass + ' flex min-h-[300px] flex-col p-0'\"\r\n style=\"height: 80vh; padding-bottom: 0\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Dashboard Item renders whatever the config specifies. A definite height\r\n lets the inner table own its scroll (its virtual window depends on the\r\n scroll container, not the outer dialog). -->\r\n @if (processedConfig()) {\r\n <mt-dashboard-item\r\n class=\"block min-h-0 flex-1\"\r\n [config]=\"processedConfig()!\"\r\n [queryParams]=\"mergedParams()\"\r\n [reportId]=\"reportId()\"\r\n [isDialog]=\"true\"\r\n (actionTriggered)=\"onItemAction($event)\"\r\n />\r\n } @else if (config()) {\r\n <!-- Config provided but still being processed -->\r\n <div class=\"flex flex-1 items-center justify-center\">\r\n <i class=\"pi pi-spin pi-spinner text-4xl text-primary\"></i>\r\n </div>\r\n } @else {\r\n <!-- No dialog config could be resolved (linked dialog deleted or failed to\r\n load). Show an explicit unavailable state instead of silently\r\n rendering the wrong widget. -->\r\n <div\r\n class=\"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center\"\r\n >\r\n <i class=\"pi pi-exclamation-triangle text-4xl text-surface-400\"></i>\r\n <p class=\"text-surface-600 dark:text-surface-300\">\r\n {{ t(\"dialogUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n</div>\r\n<!--\r\n<div [class]=\"modal.footerClass\" *transloco=\"let t; prefix: 'dashboard'\">\r\n <mt-button [label]=\"t('close')\" severity=\"secondary\" (onClick)=\"close()\" />\r\n</div> -->\r\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAmBH;;;;;;;;AAQG;MAOU,wBAAwB,CAAA;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7C,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACxC,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,IAAA,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;;AAG9B,IAAA,MAAM,GAAG,KAAK,CAAoB,IAAI,6EAAC;AACvC,IAAA,MAAM,GAAG,KAAK,CAAsB,EAAE,6EAAC;AACvC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAClC,IAAA,QAAQ,GAAG,KAAK,CAAyB,IAAI,+EAAC;;AAG9C,IAAA,YAAY,GAAG,MAAM,CAAoB,IAAI,mFAAC;AAC9C,IAAA,YAAY,GA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AACd,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,IAAI,EAAE,cAAc;AACrB,KAAA,CAAC,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC;AAExB,IAAA,MAAM,WAAW,GAAG;QAClB,MAAM;QACN,MAAM,EAAE,MAAM,IAAI,EAAE;QACpB,KAAK,EAAE,OAAO,EAAE,KAAK;AACrB,QAAA,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;KACpC;AACD,IAAA,OAAO,YAAY,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE;AAChE,QAAA,MAAM,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;AAC5B,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,IAAI,EAAE,WAAW;QACjB,WAAW;AACZ,KAAA,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs","sources":["../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.ts","../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.html"],"sourcesContent":["/**\r\n * Dashboard Dialog Component\r\n *\r\n * A flexible dialog wrapper that renders a DashboardItem inside.\r\n * Uses the same ItemConfig structure - maximum code reuse.\r\n *\r\n * The dialog simply wraps DashboardItem, so any chart/table/card\r\n * that works inline will work in a dialog too.\r\n */\r\n\r\nimport {\r\n Component,\r\n inject,\r\n input,\r\n signal,\r\n computed,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ItemConfig } from '../../../models/dashboard.model';\r\nimport { DashboardItemStoreService } from '../../services/item-store.service';\r\nimport { FilterUtilsService } from '../../services/filter-utils.service';\r\nimport { DashboardItem } from '../../dashboard-item';\r\n\r\n/**\r\n * Dashboard Dialog Component\r\n *\r\n * Opened via ModalService, renders a DashboardItem inside.\r\n * Usage:\r\n * this.modalService.open(DashboardDialogComponent, {\r\n * data: { config: itemConfig, params: queryParams }\r\n * });\r\n */\r\n@Component({\r\n selector: 'mt-dashboard-dialog',\r\n standalone: true,\r\n imports: [CommonModule, TranslocoDirective, DashboardItem],\r\n templateUrl: './dashboard-dialog.component.html',\r\n})\r\nexport class DashboardDialogComponent implements OnInit {\r\n private readonly itemStore = inject(DashboardItemStoreService);\r\n private readonly filterUtils = inject(FilterUtilsService);\r\n private readonly transloco = inject(TranslocoService);\r\n readonly modal = inject(ModalService);\r\n private readonly ref = inject(ModalRef);\r\n\r\n // Inputs from modal data\r\n readonly config = input<ItemConfig | null>(null);\r\n readonly params = input<Record<string, any>>({});\r\n readonly title = input<string | null>(null);\r\n readonly reportId = input<string | number | null>(null);\r\n\r\n // State\r\n readonly dialogConfig = signal<ItemConfig | null>(null);\r\n readonly actionParams = signal<Record<string, any>>({});\r\n\r\n // Computed\r\n readonly mergedParams = computed(() => ({\r\n ...this.params(),\r\n ...this.actionParams(),\r\n }));\r\n\r\n readonly processedConfig = computed(() => {\r\n const config = this.dialogConfig();\r\n if (!config) return null;\r\n\r\n // Deep clone and process filters\r\n const cloned = JSON.parse(JSON.stringify(config)) as ItemConfig;\r\n\r\n // Apply filter processing if service config exists\r\n if (cloned.serviceConfig) {\r\n const processed = this.filterUtils.handleFiltersForCustom(\r\n cloned.serviceConfig,\r\n this.mergedParams(),\r\n );\r\n cloned.serviceConfig = processed;\r\n }\r\n return cloned;\r\n });\r\n\r\n ngOnInit(): void {\r\n // Set config from input\r\n const config = this.config();\r\n if (config) {\r\n this.dialogConfig.set(config);\r\n }\r\n\r\n // Set params from input\r\n const params = this.params();\r\n if (params) {\r\n this.actionParams.set(params);\r\n }\r\n }\r\n\r\n /**\r\n * Close dialog\r\n */\r\n close(result?: any): void {\r\n this.ref.close(result);\r\n }\r\n\r\n /**\r\n * Handle actions from the inner DashboardItem\r\n */\r\n onItemAction(event: any): void {\r\n // If it's a close action, close the dialog\r\n if (event?.type === 'closeDialog') {\r\n this.close(event?.data);\r\n return;\r\n }\r\n\r\n // For navigation actions, close dialog and let parent handle\r\n if (event?.type === 'navigate' || event?.type === 'navigateTo') {\r\n this.close(event);\r\n return;\r\n }\r\n\r\n // For other action types, the inner mt-dashboard-item already\r\n // dispatches via ActionService — nothing more to do at the dialog host.\r\n }\r\n}\r\n\r\n/**\r\n * Helper service for opening dashboard dialogs\r\n */\r\nexport function openDashboardDialog(\r\n modalService: ModalService,\r\n config: ItemConfig,\r\n params?: Record<string, any>,\r\n options?: {\r\n title?: string;\r\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\r\n reportId?: string | number | null;\r\n },\r\n): ModalRef {\r\n const sizeClass = {\r\n sm: 'max-w-md',\r\n md: 'max-w-2xl',\r\n lg: 'max-w-4xl',\r\n xl: 'max-w-6xl',\r\n full: 'max-w-[95vw]',\r\n }[options?.size || 'lg'];\r\n\r\n const inputValues = {\r\n config,\r\n params: params || {},\r\n title: options?.title,\r\n reportId: options?.reportId ?? null,\r\n };\r\n return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: options?.title || '',\r\n styleClass: sizeClass,\r\n data: inputValues,\r\n inputValues,\r\n });\r\n}\r\n","<!--\r\n Inline height is intentional: the global `.mt-dialog .p-dialog-content\r\n .mt-modal-content { height:100% }` rule (common.css, unlayered) overrides any\r\n `h-[80vh]` class, and `.p-dialog` itself has no definite height, so a\r\n class-based height collapses to content. An inline style beats the unlayered\r\n rule, and `80vh` is viewport-relative (definite regardless of ancestors),\r\n giving the inner item -> table the bounded height it needs to scroll.\r\n padding-bottom is zeroed (the global 5rem reserves space for a footer this\r\n dialog does not render).\r\n-->\r\n<div\r\n [class]=\"modal.contentClass + ' flex min-h-[300px] flex-col p-0'\"\r\n style=\"height: 80vh; padding-bottom: 0\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Dashboard Item renders whatever the config specifies. A definite height\r\n lets the inner table own its scroll (its virtual window depends on the\r\n scroll container, not the outer dialog). -->\r\n @if (processedConfig()) {\r\n <mt-dashboard-item\r\n class=\"block min-h-0 flex-1\"\r\n [config]=\"processedConfig()!\"\r\n [queryParams]=\"mergedParams()\"\r\n [reportId]=\"reportId()\"\r\n [isDialog]=\"true\"\r\n (actionTriggered)=\"onItemAction($event)\"\r\n />\r\n } @else if (config()) {\r\n <!-- Config provided but still being processed -->\r\n <div class=\"flex flex-1 items-center justify-center\">\r\n <i class=\"pi pi-spin pi-spinner text-4xl text-primary\"></i>\r\n </div>\r\n } @else {\r\n <!-- No dialog config could be resolved (linked dialog deleted or failed to\r\n load). Show an explicit unavailable state instead of silently\r\n rendering the wrong widget. -->\r\n <div\r\n class=\"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center\"\r\n >\r\n <i class=\"pi pi-exclamation-triangle text-4xl text-surface-400\"></i>\r\n <p class=\"text-surface-600 dark:text-surface-300\">\r\n {{ t(\"dialogUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n</div>\r\n<!--\r\n<div [class]=\"modal.footerClass\" *transloco=\"let t; prefix: 'dashboard'\">\r\n <mt-button [label]=\"t('close')\" severity=\"secondary\" (onClick)=\"close()\" />\r\n</div> -->\r\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAmBH;;;;;;;;AAQG;MAOU,wBAAwB,CAAA;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7C,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACxC,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,IAAA,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,QAA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S;+BACE,qBAAqB,EAAA,UAAA,EACnB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,kBAAkB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,kvEAAA,EAAA;;AAsF5D;;AAEG;AACG,SAAU,mBAAmB,CACjC,YAA0B,EAC1B,MAAkB,EAClB,MAA4B,EAC5B,OAIC,EAAA;AAED,IAAA,MAAM,SAAS,GAAG;AAChB,QAAA,EAAE,EAAE,UAAU;AACd,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,IAAI,EAAE,cAAc;AACrB,KAAA,CAAC,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC;AAExB,IAAA,MAAM,WAAW,GAAG;QAClB,MAAM;QACN,MAAM,EAAE,MAAM,IAAI,EAAE;QACpB,KAAK,EAAE,OAAO,EAAE,KAAK;AACrB,QAAA,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;KACpC;AACD,IAAA,OAAO,YAAY,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE;AAChE,QAAA,MAAM,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;AAC5B,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,IAAI,EAAE,WAAW;QACjB,WAAW;AACZ,KAAA,CAAC;AACJ;;;;"}
|
|
@@ -70,6 +70,23 @@ import { Table } from '@masterteam/components/table';
|
|
|
70
70
|
import * as i2$5 from 'primeng/inputnumber';
|
|
71
71
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* `ModuleClassificationEnum.Log`. The backend serializes enums as numbers, so
|
|
75
|
+
* a level's logs are its modules with `classification === 0`; `1` is `Process`.
|
|
76
|
+
*/
|
|
77
|
+
const MODULE_CLASSIFICATION_LOG = 0;
|
|
78
|
+
/**
|
|
79
|
+
* HTTP methods for custom API
|
|
80
|
+
*/
|
|
81
|
+
var HTTPMethod;
|
|
82
|
+
(function (HTTPMethod) {
|
|
83
|
+
HTTPMethod["GET"] = "GET";
|
|
84
|
+
HTTPMethod["POST"] = "POST";
|
|
85
|
+
HTTPMethod["PUT"] = "PUT";
|
|
86
|
+
HTTPMethod["DELETE"] = "DELETE";
|
|
87
|
+
HTTPMethod["PATCH"] = "PATCH";
|
|
88
|
+
})(HTTPMethod || (HTTPMethod = {}));
|
|
89
|
+
|
|
73
90
|
/** Add the displayName expected by the filter configuration select. */
|
|
74
91
|
function normalizeDashboardFilterLookups(lookups) {
|
|
75
92
|
return lookups.map((lookup) => ({
|
|
@@ -290,6 +307,8 @@ class DashboardBuilderService {
|
|
|
290
307
|
/** Module tree requests are shared per services/workspace key. */
|
|
291
308
|
modulesTreeCache = new Map();
|
|
292
309
|
modulesTreeDataCache = new Map();
|
|
310
|
+
/** `Modules?LevelId=` responses, shared per level for the session. */
|
|
311
|
+
levelLogsCache = new Map();
|
|
293
312
|
/** HTTP context for gateway requests */
|
|
294
313
|
gatewayContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
295
314
|
useBaseUrl: true,
|
|
@@ -727,13 +746,36 @@ class DashboardBuilderService {
|
|
|
727
746
|
this.asArray(this.getClientSettings()?.data?.levels?.schema));
|
|
728
747
|
}
|
|
729
748
|
/**
|
|
730
|
-
* Logs of a level,
|
|
749
|
+
* Logs of a level, resolved from cached metadata only. Prefers the level's
|
|
731
750
|
* own `logs` collection (legacy contract) and otherwise derives them from the
|
|
732
751
|
* level-scoped status metadata — see `buildDashboardLevelLogOptions`.
|
|
752
|
+
* `fetchLevelLogs` is the authoritative source; this is the offline fallback.
|
|
733
753
|
*/
|
|
734
754
|
getLevelLogsByLevelId(levelId, moduleNamesById = new Map()) {
|
|
735
755
|
return buildDashboardLevelLogOptions(this.getLevelsSchema(), this.getStatusMetadata(), moduleNamesById, levelId);
|
|
736
756
|
}
|
|
757
|
+
/**
|
|
758
|
+
* Authoritative logs of a level: `GET Modules?LevelId={levelId}` filtered to
|
|
759
|
+
* the `Log` classification (`ModuleClassificationEnum.Log = 0`; Process
|
|
760
|
+
* modules are not logs). Cached per level for the session — the filter
|
|
761
|
+
* configuration only asks once per level the author touches.
|
|
762
|
+
*/
|
|
763
|
+
fetchLevelLogs(levelId) {
|
|
764
|
+
const cacheKey = String(levelId);
|
|
765
|
+
const cached = this.levelLogsCache.get(cacheKey);
|
|
766
|
+
if (cached)
|
|
767
|
+
return cached;
|
|
768
|
+
const request$ = this.http
|
|
769
|
+
.get(`Modules?LevelId=${encodeURIComponent(cacheKey)}`)
|
|
770
|
+
.pipe(map((response) => (response.data ?? [])
|
|
771
|
+
.filter((module) => module.classification === MODULE_CLASSIFICATION_LOG)
|
|
772
|
+
.map((module) => ({
|
|
773
|
+
id: module.id,
|
|
774
|
+
description: module.name?.display || module.name?.en || module.key || '',
|
|
775
|
+
}))), catchError(() => of([])), shareReplay({ bufferSize: 1, refCount: false }));
|
|
776
|
+
this.levelLogsCache.set(cacheKey, request$);
|
|
777
|
+
return request$;
|
|
778
|
+
}
|
|
737
779
|
/** Available lookups for the page-filter "Lookup" dropdown. */
|
|
738
780
|
getLookups() {
|
|
739
781
|
const lookups = this.filterLookups() ??
|
|
@@ -5162,6 +5204,9 @@ class DynamicFiltersConfig {
|
|
|
5162
5204
|
}, ...(ngDevMode ? [{ debugName: "levelSchemaOptions" }] : /* istanbul ignore next */ []));
|
|
5163
5205
|
/** Module display names from the shared metadata tree, keyed by module id. */
|
|
5164
5206
|
moduleNames = computed(() => buildDashboardModuleNames(this.modulesTree()), ...(ngDevMode ? [{ debugName: "moduleNames" }] : /* istanbul ignore next */ []));
|
|
5207
|
+
/** Logs fetched from `Modules?LevelId=`, keyed by level id. */
|
|
5208
|
+
fetchedLevelLogs = signal({}, ...(ngDevMode ? [{ debugName: "fetchedLevelLogs" }] : /* istanbul ignore next */ []));
|
|
5209
|
+
requestedLevelLogs = new Set();
|
|
5165
5210
|
/**
|
|
5166
5211
|
* Logs per level id, memoized so repeated template reads keep returning the
|
|
5167
5212
|
* same array reference. Keyed access also keeps every status row on its own
|
|
@@ -5220,6 +5265,7 @@ class DynamicFiltersConfig {
|
|
|
5220
5265
|
this.filterFields.set(fields);
|
|
5221
5266
|
fields.forEach((field) => {
|
|
5222
5267
|
if (field.type === 'status' && field.configuration?.schemaLevelId) {
|
|
5268
|
+
this.ensureLevelLogsLoaded(field.configuration.schemaLevelId);
|
|
5223
5269
|
this.loadLevelLogs.emit(field.configuration.schemaLevelId);
|
|
5224
5270
|
}
|
|
5225
5271
|
});
|
|
@@ -5324,15 +5370,47 @@ class DynamicFiltersConfig {
|
|
|
5324
5370
|
schemaLevelId === '') {
|
|
5325
5371
|
return this.emptyLevelLogs;
|
|
5326
5372
|
}
|
|
5327
|
-
const
|
|
5373
|
+
const key = String(schemaLevelId);
|
|
5374
|
+
const fetched = this.fetchedLevelLogs()[key];
|
|
5375
|
+
if (fetched?.length)
|
|
5376
|
+
return fetched;
|
|
5377
|
+
const resolved = this.levelLogsByLevelId()(key);
|
|
5328
5378
|
return resolved.length ? resolved : this.levelLogs();
|
|
5329
5379
|
}
|
|
5380
|
+
/**
|
|
5381
|
+
* Load a level's logs from `Modules?LevelId=` once. Called when a status row
|
|
5382
|
+
* gains a level (edit or hydrate) — never from the template, so it stays out
|
|
5383
|
+
* of change detection.
|
|
5384
|
+
*/
|
|
5385
|
+
ensureLevelLogsLoaded(schemaLevelId) {
|
|
5386
|
+
if (schemaLevelId === null ||
|
|
5387
|
+
schemaLevelId === undefined ||
|
|
5388
|
+
schemaLevelId === '') {
|
|
5389
|
+
return;
|
|
5390
|
+
}
|
|
5391
|
+
const key = String(schemaLevelId);
|
|
5392
|
+
if (this.requestedLevelLogs.has(key))
|
|
5393
|
+
return;
|
|
5394
|
+
this.requestedLevelLogs.add(key);
|
|
5395
|
+
this.dashboardService
|
|
5396
|
+
.fetchLevelLogs(key)
|
|
5397
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
5398
|
+
.subscribe((logs) => {
|
|
5399
|
+
if (!logs.length)
|
|
5400
|
+
return;
|
|
5401
|
+
this.fetchedLevelLogs.update((current) => ({
|
|
5402
|
+
...current,
|
|
5403
|
+
[key]: logs,
|
|
5404
|
+
}));
|
|
5405
|
+
});
|
|
5406
|
+
}
|
|
5330
5407
|
/** Handle schema level change for status/phaseGate */
|
|
5331
5408
|
onSchemaLevelChange(index, schemaLevelId) {
|
|
5332
5409
|
this.updateFieldConfig(index, 'schemaLevelId', schemaLevelId);
|
|
5333
|
-
// Clear log ID and
|
|
5410
|
+
// Clear log ID and load the newly selected level's logs
|
|
5334
5411
|
this.updateFieldConfig(index, 'logId', null);
|
|
5335
5412
|
if (schemaLevelId) {
|
|
5413
|
+
this.ensureLevelLogsLoaded(schemaLevelId);
|
|
5336
5414
|
this.loadLevelLogs.emit(schemaLevelId);
|
|
5337
5415
|
}
|
|
5338
5416
|
}
|
|
@@ -22980,7 +23058,7 @@ class ActionService {
|
|
|
22980
23058
|
dialogConfig?.clientConfig?.title?.['ar'] ||
|
|
22981
23059
|
'';
|
|
22982
23060
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
22983
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23061
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs').then(({ DashboardDialogComponent }) => {
|
|
22984
23062
|
// Open dialog using ModalService
|
|
22985
23063
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
22986
23064
|
header: title,
|
|
@@ -34686,18 +34764,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34686
34764
|
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('sourceLinks')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"addSourceLink()\"\r\n [disabled]=\"disabled\"\r\n [pTooltip]=\"t('addSourceLink')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\r\n <div formArrayName=\"sourceLinks\">\r\n @for (\r\n link of sourceLinksArray.controls;\r\n track trackByIndex(i);\r\n let i = $index;\r\n let first = $first\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"link.invalid\"\r\n [class.border-surface-200]=\"!link.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Link Header with Type Tabs -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-3\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n\r\n <!-- Link Type Tabs (only show for non-first links) -->\r\n @if (!first) {\r\n <mt-tabs\r\n [active]=\"getLinkType(i)\"\r\n (activeChange)=\"onLinkTypeChange(i, $event)\"\r\n [options]=\"getLinkTypeOptions(i)\"\r\n size=\"small\"\r\n />\r\n } @else {\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n {{ t(\"selectionToSelection\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSourceLink(i)\"\r\n />\r\n </div>\r\n\r\n <!-- Source Selections based on link type -->\r\n @if (getLinkType(i) === \"selection\") {\r\n <!-- Selection to Selection Mode -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source1')\"\r\n formControlName=\"source1SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- Chained Mode: Previous Link to Selection -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source Link (previous link) -->\r\n <mt-select-field\r\n [label]=\"t('previousLink')\"\r\n formControlName=\"sourceLinkId\"\r\n [options]=\"getAvailableSourceLinks(i)\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"index\"\r\n [placeholder]=\"t('selectPreviousLink')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Link Properties -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Property -->\r\n <mt-select-field\r\n [label]=\"t('source1LinkProperty')\"\r\n formControlName=\"source1PropertyKey\"\r\n [options]=\"getSource1PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n\r\n <!-- Source 2 Property -->\r\n <mt-select-field\r\n [label]=\"t('source2LinkProperty')\"\r\n formControlName=\"source2PropertyKey\"\r\n [options]=\"getSource2PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Join Options -->\r\n <div class=\"flex items-center gap-6\">\r\n <mt-toggle-field\r\n [label]=\"t('isLeftJoin')\"\r\n formControlName=\"isLeftJoin\"\r\n />\r\n <mt-toggle-field\r\n [label]=\"t('isFilterLinkage')\"\r\n formControlName=\"isFilterLinkage\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (sourceLinksArray.length === 0) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSourceLink')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSourceLink()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</div>\r\n" }]
|
|
34687
34765
|
}], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
|
|
34688
34766
|
|
|
34689
|
-
/**
|
|
34690
|
-
* HTTP methods for custom API
|
|
34691
|
-
*/
|
|
34692
|
-
var HTTPMethod;
|
|
34693
|
-
(function (HTTPMethod) {
|
|
34694
|
-
HTTPMethod["GET"] = "GET";
|
|
34695
|
-
HTTPMethod["POST"] = "POST";
|
|
34696
|
-
HTTPMethod["PUT"] = "PUT";
|
|
34697
|
-
HTTPMethod["DELETE"] = "DELETE";
|
|
34698
|
-
HTTPMethod["PATCH"] = "PATCH";
|
|
34699
|
-
})(HTTPMethod || (HTTPMethod = {}));
|
|
34700
|
-
|
|
34701
34767
|
/**
|
|
34702
34768
|
* Custom API Configuration Component
|
|
34703
34769
|
*
|
|
@@ -49731,5 +49797,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
49731
49797
|
* Generated bundle index. Do not edit.
|
|
49732
49798
|
*/
|
|
49733
49799
|
|
|
49734
|
-
export { LevelCardHandler as $, SkeletonCardComponent as A, resolveStatisticIconPlacement as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, StatisticCardComponent as G, HeaderCardComponent as H, TopbarCardComponent as I, ChartDataService as J, BarChartHandler as K, LastHistoryLevelCardComponent as L, PieChartHandler as M, StackBarChartHandler as N, axisFormatters as O, PropertiesCardComponent as P, groupDatesByYearAndMonth as Q, GaugeChartHandler as R, StaticFiltersComponent as S, TableCardComponent as T, TableViewHandler as U, OverviewCardHandler as V, TimelineHandler as W, LineChartHandler as X, SnapshotHandler as Y, ComparisonChartHandler as Z, SplitterChartHandler as _, DashboardItem as a,
|
|
49735
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
49800
|
+
export { LevelCardHandler as $, SkeletonCardComponent as A, resolveStatisticIconPlacement as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, StatisticCardComponent as G, HeaderCardComponent as H, TopbarCardComponent as I, ChartDataService as J, BarChartHandler as K, LastHistoryLevelCardComponent as L, PieChartHandler as M, StackBarChartHandler as N, axisFormatters as O, PropertiesCardComponent as P, groupDatesByYearAndMonth as Q, GaugeChartHandler as R, StaticFiltersComponent as S, TableCardComponent as T, TableViewHandler as U, OverviewCardHandler as V, TimelineHandler as W, LineChartHandler as X, SnapshotHandler as Y, ComparisonChartHandler as Z, SplitterChartHandler as _, DashboardItem as a, toBackendChartType as a$, MapChartHandler as a0, RingGaugeChartHandler as a1, SPlusChartHandler as a2, PhaseGateStepperHandler as a3, formatCurrency as a4, getCurrencySuffix as a5, formatPercentage as a6, formatNumber as a7, formatDate as a8, createAxisFormatter as a9, GeneralSettings as aA, DataSourceSettings as aB, ActionsSettings as aC, ChartViewer as aD, StyleStudioDrawer as aE, StyleSettingsRenderer as aF, expandResetPatches as aG, StyleField as aH, SegmentedField as aI, ColorListField as aJ, ArrayBuilderField as aK, KeyValueMapField as aL, LegendOrderField as aM, ItemCardMenuComponent as aN, ChartFilterDrawer as aO, ItemContextToolbarComponent as aP, ItemConfigPopoverComponent as aQ, GuidedConfigDialogComponent as aR, FilterChipsBarComponent as aS, FilterBuilderComponent as aT, DatasourcePanelComponent as aU, SchemaControlRendererComponent as aV, FilterByGroupPipe as aW, GetChartActionsPipe as aX, CHART_CAPABILITIES as aY, getCapabilityById as aZ, resolveCapability as a_, createTooltipFormatter as aa, formatAxisLabel as ab, formatWordsUnderBar as ac, formatXAxis as ad, handleFiltersForCustom as ae, handleFilterForCard as af, handleFilterForSnapshot as ag, DashboardList as ah, MODULE_CLASSIFICATION_LOG as ai, HTTPMethod as aj, DashboardBuilderService as ak, DashboardStoreService as al, isManagePagesDeleteResult as am, ManagePages as an, ManageBreadcrumb as ao, ManageFilterOnPage as ap, DynamicFiltersConfig as aq, ChartSettingsDrawer as ar, DisplaySettings as as, DefaultControlUi as at, PieControlUi as au, BarControlUi as av, StackBarControlUi as aw, ManageItem as ax, CHART_TYPES as ay, ManageItemService as az, DashboardBuilder as b, normalizeChartTypeForRequest as b0, normalizeFilterOperation as b1, normalizeAggregateFunction as b2, normalizeFilters as b3, selectorFromLegacy as b4, moduleIdFromSelector as b5, toBackendSourceLink as b6, toFormSourceLink as b7, normalizeOnLoad as b8, normalizeBeforeSave as b9, hasBlockingIssues as bA, groupIssuesByDomain as bB, parseAdvancedJson as bC, deepMerge$1 as bD, formatForEditor as bE, readByPath$1 as bF, setByPath as bG, applyControlPatchToPersisted as bH, applyControlPatchesToPersisted as bI, getControlSchema as bJ, listControlSchemaIds as bK, listControlSchemas as bL, getFallbackControlSchema as bM, flattenSchema as bN, resolveDisplayFields as bO, buildDisplayFieldPredicate as bP, bindingKey as bQ, getBinding as bR, listBindings as bS, listBindingsForChart as bT, readBoundValue as bU, ITEM_GUIDANCE_REGISTRY as bV, describeGuidance as bW, ItemGuidanceService as bX, normalizeBeforeRequest as ba, CONFIG_DOMAINS as bb, domainsForCapability as bc, findDomain as bd, POPOVER_TABS as be, POPOVER_TAB_SPECS as bf, titleToUi as bg, applyTitleToPersisted as bh, datasourceToUi as bi, fieldsToUi as bj, filtersToUi as bk, styleToUi as bl, applyStyleToPersisted as bm, layoutToUi as bn, applyLayoutToPersisted as bo, labelLegendFormatToUi as bp, applyLabelLegendFormatToPersisted as bq, behaviorToUi as br, applyBehaviorToPersisted as bs, applyFilterChipsToPersisted as bt, persistedToUi as bu, buildAssembly as bv, STYLE_PRESETS as bw, presetsForCapability as bx, findPreset as by, validate as bz, cloneDeep$1 as c, DashboardViewer as d, switchAllKeysSmall$1 as e, dynamicTextReplace as f, getNestedData as g, dynamicReorder as h, generalConfiguration as i, formatValue as j, getLocalizedTitle as k, sortChartData as l, addCommasToNumber as m, sortDataTableView as n, isMobilePlatform$1 as o, getColorFromConditions as p, CardFilterComponent as q, DynamicFiltersComponent as r, switchAllKeysToLower as s, CardInfoComponent as t, ChartCardComponent as u, resolveEntityUserPhoto as v, EntityInfoComponent as w, normalizeDashboardCardEntityValue as x, EntityPreviewCardComponent as y, ListStatisticCardComponent as z };
|
|
49801
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs.map
|