@masterteam/dashboard-builder 0.0.84 → 0.0.86
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 +458 -456
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.mjs → masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-YD5LrCCJ.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-Bcn8YzoD.mjs} +48 -32
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-Bcn8YzoD.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +2 -2
- package/types/masterteam-dashboard-builder.d.ts +19 -9
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-YD5LrCCJ.mjs.map +0 -1
|
@@ -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, r as resolveDashboardDialogHeader, b as DashboardDialogHeader } from './masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
7
|
+
import { D as DashboardItemStoreService, F as FilterUtilsService, a as DashboardItem, r as resolveDashboardDialogHeader, b as DashboardDialogHeader } from './masterteam-dashboard-builder-masterteam-dashboard-builder-Bcn8YzoD.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Dashboard Dialog Component
|
|
@@ -129,4 +129,4 @@ function openDashboardDialog(modalService, config, params, options) {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
export { DashboardDialogComponent, openDashboardDialog };
|
|
132
|
-
//# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-
|
|
132
|
+
//# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.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\nimport {\r\n DashboardDialogHeader,\r\n resolveDashboardDialogHeader,\r\n} from './dashboard-dialog-header';\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 // Same header contract as ActionService.showDialog: title + icon come from\r\n // the dialog's own config unless the caller overrides the title.\r\n const resolved = resolveDashboardDialogHeader(config);\r\n const header = { ...resolved, title: options?.title || resolved.title };\r\n\r\n const inputValues = {\r\n config,\r\n params: params || {},\r\n title: header.title,\r\n reportId: options?.reportId ?? null,\r\n };\r\n return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: header.title,\r\n styleClass: sizeClass,\r\n ...(header.icon ? { templates: { header: DashboardDialogHeader } } : {}),\r\n data: { ...inputValues, dialogHeader: header },\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;AAuBH;;;;;;;;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,EAA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AAA,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;;;AAIxB,IAAA,MAAM,QAAQ,GAAG,4BAA4B,CAAC,MAAM,CAAC;AACrD,IAAA,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE;AAEvE,IAAA,MAAM,WAAW,GAAG;QAClB,MAAM;QACN,MAAM,EAAE,MAAM,IAAI,EAAE;QACpB,KAAK,EAAE,MAAM,CAAC,KAAK;AACnB,QAAA,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;KACpC;AACD,IAAA,OAAO,YAAY,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE;QAChE,MAAM,EAAE,MAAM,CAAC,KAAK;AACpB,QAAA,UAAU,EAAE,SAAS;QACrB,IAAI,MAAM,CAAC,IAAI,GAAG,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,EAAE,GAAG,EAAE,CAAC;QACxE,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE;QAC9C,WAAW;AACZ,KAAA,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.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\nimport {\r\n DashboardDialogHeader,\r\n resolveDashboardDialogHeader,\r\n} from './dashboard-dialog-header';\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 // Same header contract as ActionService.showDialog: title + icon come from\r\n // the dialog's own config unless the caller overrides the title.\r\n const resolved = resolveDashboardDialogHeader(config);\r\n const header = { ...resolved, title: options?.title || resolved.title };\r\n\r\n const inputValues = {\r\n config,\r\n params: params || {},\r\n title: header.title,\r\n reportId: options?.reportId ?? null,\r\n };\r\n return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: header.title,\r\n styleClass: sizeClass,\r\n ...(header.icon ? { templates: { header: DashboardDialogHeader } } : {}),\r\n data: { ...inputValues, dialogHeader: header },\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;AAuBH;;;;;;;;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,GAAG,MAAM,CAAsB,EAAE,mFAAC;;AAG9C,IAAA,YAAY,GAAG,QAAQ,CAAC,OAAO;QACtC,GAAG,IAAI,CAAC,MAAM,EAAE;QAChB,GAAG,IAAI,CAAC,YAAY,EAAE;AACvB,KAAA,CAAC,mFAAC;AAEM,IAAA,eAAe,GAA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Q,GAAG,4BAA4B,CAAC,MAAM,CAAC;AACrD,IAAA,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE;AAEvE,IAAA,MAAM,WAAW,GAAG;QAClB,MAAM;QACN,MAAM,EAAE,MAAM,IAAI,EAAE;QACpB,KAAK,EAAE,MAAM,CAAC,KAAK;AACnB,QAAA,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;KACpC;AACD,IAAA,OAAO,YAAY,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE;QAChE,MAAM,EAAE,MAAM,CAAC,KAAK;AACpB,QAAA,UAAU,EAAE,SAAS;QACrB,IAAI,MAAM,CAAC,IAAI,GAAG,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,EAAE,GAAG,EAAE,CAAC;QACxE,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE;QAC9C,WAAW;AACZ,KAAA,CAAC;AACJ;;;;"}
|
|
@@ -14473,6 +14473,7 @@ class BarChartHandler {
|
|
|
14473
14473
|
return acc.concat(categoryData.bars || []);
|
|
14474
14474
|
}, []);
|
|
14475
14475
|
const noData = allBars.length === 0;
|
|
14476
|
+
const barKey = (bar) => this.resolveBarKey(bar);
|
|
14476
14477
|
// Build maps for colors and labels (needed before grouped mode check)
|
|
14477
14478
|
const colorMap = new Map();
|
|
14478
14479
|
const labelMap = new Map();
|
|
@@ -14497,13 +14498,15 @@ class BarChartHandler {
|
|
|
14497
14498
|
if (isGrouped && !noData) {
|
|
14498
14499
|
return this.buildGroupedBarChart(dataResponse, config, allBars, barTypes, colorMap, labelMap, isHorizontal, isPercentage, barOverride);
|
|
14499
14500
|
}
|
|
14500
|
-
// Use bar labels as xAxis data
|
|
14501
|
-
|
|
14501
|
+
// Use bar labels as xAxis data. `overrideLabels` is the user's own column
|
|
14502
|
+
// name and outranks anything the response supplies — same precedence the
|
|
14503
|
+
// series `name` below already uses.
|
|
14504
|
+
let xAxisData = allBars.map((bar, index) => overrideLabels?.[index]?.[languageCode] ||
|
|
14505
|
+
bar?.label ||
|
|
14502
14506
|
bar?.name ||
|
|
14503
14507
|
bar?.display ||
|
|
14504
|
-
labelMap?.get(bar
|
|
14505
|
-
|
|
14506
|
-
bar?.key ||
|
|
14508
|
+
labelMap?.get(barKey(bar).toLowerCase()) ||
|
|
14509
|
+
barKey(bar) ||
|
|
14507
14510
|
'');
|
|
14508
14511
|
let seriesData = allBars.map((bar, index) => {
|
|
14509
14512
|
let colorBarByStatus;
|
|
@@ -14540,7 +14543,7 @@ class BarChartHandler {
|
|
|
14540
14543
|
colorBarByStatus ||
|
|
14541
14544
|
configAsType?.['defaultColors']?.[index] ||
|
|
14542
14545
|
bar.color ||
|
|
14543
|
-
colorMap.get(bar.
|
|
14546
|
+
colorMap.get(barKey(bar).toLowerCase()) ||
|
|
14544
14547
|
defaultColor,
|
|
14545
14548
|
},
|
|
14546
14549
|
name: statusItem?.value?.name ||
|
|
@@ -14552,10 +14555,10 @@ class BarChartHandler {
|
|
|
14552
14555
|
bar?.label ||
|
|
14553
14556
|
bar?.name ||
|
|
14554
14557
|
bar?.display ||
|
|
14555
|
-
labelMap?.get(bar
|
|
14556
|
-
bar
|
|
14558
|
+
labelMap?.get(barKey(bar).toLowerCase()) ||
|
|
14559
|
+
barKey(bar) ||
|
|
14557
14560
|
'',
|
|
14558
|
-
key: bar
|
|
14561
|
+
key: barKey(bar) || overrideLabels?.[index]?.[languageCode] || '',
|
|
14559
14562
|
extraValues: bar.extraValues,
|
|
14560
14563
|
groupValues: bar.groupValues,
|
|
14561
14564
|
};
|
|
@@ -14946,7 +14949,7 @@ class BarChartHandler {
|
|
|
14946
14949
|
// Populate series data from values
|
|
14947
14950
|
(dataResponse.values || []).forEach((categoryData) => {
|
|
14948
14951
|
(categoryData.bars || []).forEach((bar) => {
|
|
14949
|
-
const seriesArray = seriesMap.get(bar
|
|
14952
|
+
const seriesArray = seriesMap.get(this.resolveBarKey(bar));
|
|
14950
14953
|
if (seriesArray) {
|
|
14951
14954
|
seriesArray.push({
|
|
14952
14955
|
value: bar.value,
|
|
@@ -15076,15 +15079,11 @@ class BarChartHandler {
|
|
|
15076
15079
|
const values = {};
|
|
15077
15080
|
allBars.forEach((bar, index) => {
|
|
15078
15081
|
// Use barType from the response (this is the series key)
|
|
15079
|
-
const key =
|
|
15082
|
+
const key = this.resolveBarKey(bar) || `property_${index}`;
|
|
15080
15083
|
// Determine label - priority: overrideLabels (by index) > labelMap > barType
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
}
|
|
15085
|
-
else if (labelMap.get(key?.toLowerCase())) {
|
|
15086
|
-
label = labelMap.get(key?.toLowerCase());
|
|
15087
|
-
}
|
|
15084
|
+
const label = overrideLabels?.[index]?.[languageCode] ||
|
|
15085
|
+
labelMap.get(key.toLowerCase()) ||
|
|
15086
|
+
key;
|
|
15088
15087
|
// Format the value using the configured format
|
|
15089
15088
|
const formattedValue = formatValue(bar.value, clientConfig?.['format'], languageCode);
|
|
15090
15089
|
// Get color from barTypes array or defaultColors
|
|
@@ -15106,6 +15105,18 @@ class BarChartHandler {
|
|
|
15106
15105
|
});
|
|
15107
15106
|
return { values };
|
|
15108
15107
|
}
|
|
15108
|
+
/**
|
|
15109
|
+
* #1549 — a bar in the chart response is identified by `barType`, not `key`.
|
|
15110
|
+
* `ChartTypesServiceV2.BuildSingleCategoryChart` emits
|
|
15111
|
+
* `{ barType, value, color, extraValues }` and matches it against
|
|
15112
|
+
* `barTypes[].key`. Reading `key` alone made every lookup miss: the category
|
|
15113
|
+
* axis rendered a row of empty strings, the response's per-bar colors were
|
|
15114
|
+
* dropped, and grouped mode discarded every bar. `key` stays as the fallback
|
|
15115
|
+
* for the older, entity-shaped payloads that do carry it.
|
|
15116
|
+
*/
|
|
15117
|
+
resolveBarKey(bar) {
|
|
15118
|
+
return String(bar?.barType ?? bar?.key ?? '');
|
|
15119
|
+
}
|
|
15109
15120
|
normalizeLegendPosition(position) {
|
|
15110
15121
|
return position === 'top' ||
|
|
15111
15122
|
position === 'right' ||
|
|
@@ -15585,7 +15596,11 @@ class PieChartHandler {
|
|
|
15585
15596
|
// replace the ECharts legend with another renderer. Hiding the canvas
|
|
15586
15597
|
// legend here made type/font controls appear broken in Style Studio.
|
|
15587
15598
|
const hasCanvasLegend = showLegend;
|
|
15588
|
-
|
|
15599
|
+
// The `Show labels` toggle owns slice-label visibility — a visible legend
|
|
15600
|
+
// must not silently overrule it. Duplication with the legend text is already
|
|
15601
|
+
// avoided by `resolvePieLabelFormatter`, which prints the value only (never
|
|
15602
|
+
// the slice name) whenever a canvas legend is present.
|
|
15603
|
+
const showSliceLabels = configAsType?.['label']?.show ?? true;
|
|
15589
15604
|
// Chart settings
|
|
15590
15605
|
const chartSettings = {
|
|
15591
15606
|
radius: [
|
|
@@ -15694,7 +15709,10 @@ class PieChartHandler {
|
|
|
15694
15709
|
radius: chartSettings.radius,
|
|
15695
15710
|
center: ['50%', '45%'], // default; might be overridden below
|
|
15696
15711
|
padAngle: pieOverride?.padAngle || 0,
|
|
15697
|
-
|
|
15712
|
+
// No angle floor: crowding is handled by `avoidLabelOverlap` +
|
|
15713
|
+
// `labelLayout.hideOverlap`. Gating this on the legend used to drop
|
|
15714
|
+
// labels on small slices the moment a legend was shown.
|
|
15715
|
+
minShowLabelAngle: 0,
|
|
15698
15716
|
avoidLabelOverlap: true,
|
|
15699
15717
|
itemStyle: {
|
|
15700
15718
|
borderRadius: pieOverride?.borderRadius ?? 8,
|
|
@@ -15703,9 +15721,7 @@ class PieChartHandler {
|
|
|
15703
15721
|
hideOverlap: true,
|
|
15704
15722
|
},
|
|
15705
15723
|
label: {
|
|
15706
|
-
show:
|
|
15707
|
-
? false
|
|
15708
|
-
: (configAsType?.['label']?.show ?? true),
|
|
15724
|
+
show: showSliceLabels,
|
|
15709
15725
|
position: labelPosition,
|
|
15710
15726
|
formatter: chartSettings.labelFormatter,
|
|
15711
15727
|
fontFamily: generalConfiguration?.fontConfig?.fontFamily,
|
|
@@ -15713,7 +15729,7 @@ class PieChartHandler {
|
|
|
15713
15729
|
},
|
|
15714
15730
|
emphasis: {
|
|
15715
15731
|
label: {
|
|
15716
|
-
show:
|
|
15732
|
+
show: showSliceLabels,
|
|
15717
15733
|
fontSize: '16',
|
|
15718
15734
|
fontWeight: 'bold',
|
|
15719
15735
|
},
|
|
@@ -15725,7 +15741,8 @@ class PieChartHandler {
|
|
|
15725
15741
|
noData: seriesData.length === 0 ||
|
|
15726
15742
|
seriesData.every((d) => d.value === 0 || d.isStaticProperty),
|
|
15727
15743
|
};
|
|
15728
|
-
|
|
15744
|
+
// Leader lines only make sense for labels drawn outside the ring.
|
|
15745
|
+
if (!showSliceLabels || labelPosition === 'inside') {
|
|
15729
15746
|
baseConfig.series[0].labelLine = { show: false };
|
|
15730
15747
|
}
|
|
15731
15748
|
const genericLegendPosition = this.normalizeLegendPosition(configAsType?.['legend']?.position);
|
|
@@ -15867,11 +15884,10 @@ class PieChartHandler {
|
|
|
15867
15884
|
series.avoidLabelOverlap = pieOverride.avoidLabelOverlap;
|
|
15868
15885
|
if (pieOverride.labelPosition) {
|
|
15869
15886
|
series.label.position = labelPosition;
|
|
15870
|
-
series.label.show = !suppressCanvasSliceLabels;
|
|
15871
15887
|
}
|
|
15872
15888
|
if (pieOverride.labelFontColor)
|
|
15873
15889
|
series.label.color = pieOverride.labelFontColor;
|
|
15874
|
-
if (
|
|
15890
|
+
if (!showSliceLabels || labelPosition === 'inside') {
|
|
15875
15891
|
series.labelLine = { show: false };
|
|
15876
15892
|
}
|
|
15877
15893
|
else if (pieOverride.showLabelLine !== undefined) {
|
|
@@ -23561,7 +23577,7 @@ class ActionService {
|
|
|
23561
23577
|
// "Dialog header"), not from the chart that opened it.
|
|
23562
23578
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
23563
23579
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
23564
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23580
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.mjs').then(({ DashboardDialogComponent }) => {
|
|
23565
23581
|
// Open dialog using ModalService
|
|
23566
23582
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
23567
23583
|
header: header.title,
|
|
@@ -47260,7 +47276,7 @@ class DashboardList {
|
|
|
47260
47276
|
},
|
|
47261
47277
|
},
|
|
47262
47278
|
{
|
|
47263
|
-
key: 'versionNumber',
|
|
47279
|
+
key: 'dashboardConfig.versionNumber',
|
|
47264
47280
|
label: this.transloco.translate('dashboardBuilder.dashboard.version'),
|
|
47265
47281
|
},
|
|
47266
47282
|
], ...(ngDevMode ? [{ debugName: "tableColumns" }] : /* istanbul ignore next */ []));
|
|
@@ -47418,11 +47434,11 @@ class DashboardList {
|
|
|
47418
47434
|
this.dashboards.reload();
|
|
47419
47435
|
}
|
|
47420
47436
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47421
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
47437
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
47422
47438
|
}
|
|
47423
47439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, decorators: [{
|
|
47424
47440
|
type: Component,
|
|
47425
|
-
args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n" }]
|
|
47441
|
+
args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\r\n" }]
|
|
47426
47442
|
}], propDecorators: { nameTpl: [{ type: i0.ViewChild, args: ['nameTpl', { isSignal: true }] }], isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], baseRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseRoute", required: false }] }], showCreateButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCreateButton", required: false }] }], showViewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViewButton", required: false }] }], showEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButton", required: false }] }], dashboardAction: [{ type: i0.Output, args: ["dashboardAction"] }], dashboardCreated: [{ type: i0.Output, args: ["dashboardCreated"] }] } });
|
|
47427
47443
|
|
|
47428
47444
|
/**
|
|
@@ -50438,4 +50454,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
50438
50454
|
*/
|
|
50439
50455
|
|
|
50440
50456
|
export { ComparisonChartHandler as $, EntityPreviewCardComponent as A, ListStatisticCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, SkeletonCardComponent as G, HeaderCardComponent as H, resolveStatisticIconPlacement as I, StatisticCardComponent as J, TopbarCardComponent as K, LastHistoryLevelCardComponent as L, ChartDataService as M, BarChartHandler as N, PieChartHandler as O, PropertiesCardComponent as P, StackBarChartHandler as Q, axisFormatters as R, StaticFiltersComponent as S, TableCardComponent as T, groupDatesByYearAndMonth as U, GaugeChartHandler as V, TableViewHandler as W, OverviewCardHandler as X, TimelineHandler as Y, LineChartHandler as Z, SnapshotHandler as _, DashboardItem as a, GetChartActionsPipe as a$, SplitterChartHandler as a0, LevelCardHandler as a1, MapChartHandler as a2, RingGaugeChartHandler as a3, SPlusChartHandler as a4, PhaseGateStepperHandler as a5, formatCurrency as a6, getCurrencySuffix as a7, formatPercentage as a8, formatNumber as a9, StackBarControlUi as aA, ManageItem as aB, CHART_TYPES as aC, ManageItemService as aD, GeneralSettings as aE, DataSourceSettings as aF, ActionsSettings as aG, ChartViewer as aH, StyleStudioDrawer as aI, StyleSettingsRenderer as aJ, expandResetPatches as aK, StyleField as aL, SegmentedField as aM, ColorListField as aN, ArrayBuilderField as aO, KeyValueMapField as aP, LegendOrderField as aQ, ItemCardMenuComponent as aR, ChartFilterDrawer as aS, ItemContextToolbarComponent as aT, ItemConfigPopoverComponent as aU, GuidedConfigDialogComponent as aV, FilterChipsBarComponent as aW, FilterBuilderComponent as aX, DatasourcePanelComponent as aY, SchemaControlRendererComponent as aZ, FilterByGroupPipe as a_, formatDate as aa, createAxisFormatter as ab, createTooltipFormatter as ac, formatAxisLabel as ad, formatWordsUnderBar as ae, formatXAxis as af, handleFiltersForCustom as ag, handleFilterForCard as ah, handleFilterForSnapshot as ai, DashboardList as aj, MODULE_CLASSIFICATION_LOG as ak, MODULE_CLASSIFICATION_LOG_NAME as al, isLogClassification as am, HTTPMethod as an, DashboardBuilderService as ao, DashboardStoreService as ap, isManagePagesDeleteResult as aq, ManagePages as ar, ManageBreadcrumb as as, ManageFilterOnPage as at, DynamicFiltersConfig as au, ChartSettingsDrawer as av, DisplaySettings as aw, DefaultControlUi as ax, PieControlUi as ay, BarControlUi as az, DashboardDialogHeader as b, ItemGuidanceService as b$, CHART_CAPABILITIES as b0, getCapabilityById as b1, resolveCapability as b2, toBackendChartType as b3, normalizeChartTypeForRequest as b4, normalizeFilterOperation as b5, normalizeAggregateFunction as b6, normalizeFilters as b7, selectorFromLegacy as b8, moduleIdFromSelector as b9, STYLE_PRESETS as bA, presetsForCapability as bB, findPreset as bC, validate as bD, hasBlockingIssues as bE, groupIssuesByDomain as bF, parseAdvancedJson as bG, deepMerge$1 as bH, formatForEditor as bI, readByPath$1 as bJ, setByPath as bK, applyControlPatchToPersisted as bL, applyControlPatchesToPersisted as bM, getControlSchema as bN, listControlSchemaIds as bO, listControlSchemas as bP, getFallbackControlSchema as bQ, flattenSchema as bR, resolveDisplayFields as bS, buildDisplayFieldPredicate as bT, bindingKey as bU, getBinding as bV, listBindings as bW, listBindingsForChart as bX, readBoundValue as bY, ITEM_GUIDANCE_REGISTRY as bZ, describeGuidance as b_, toBackendSourceLink as ba, toFormSourceLink as bb, normalizeOnLoad as bc, normalizeBeforeSave as bd, normalizeBeforeRequest as be, CONFIG_DOMAINS as bf, domainsForCapability as bg, findDomain as bh, POPOVER_TABS as bi, POPOVER_TAB_SPECS as bj, titleToUi as bk, applyTitleToPersisted as bl, datasourceToUi as bm, fieldsToUi as bn, filtersToUi as bo, styleToUi as bp, applyStyleToPersisted as bq, layoutToUi as br, applyLayoutToPersisted as bs, labelLegendFormatToUi as bt, applyLabelLegendFormatToPersisted as bu, behaviorToUi as bv, applyBehaviorToPersisted as bw, applyFilterChipsToPersisted as bx, persistedToUi as by, buildAssembly as bz, cloneDeep$1 as c, DashboardBuilder as d, DashboardViewer as e, switchAllKeysSmall$1 as f, getNestedData as g, dynamicTextReplace as h, dynamicReorder as i, generalConfiguration as j, formatValue as k, getLocalizedTitle as l, sortChartData as m, addCommasToNumber as n, sortDataTableView as o, isMobilePlatform$1 as p, getColorFromConditions as q, resolveDashboardDialogHeader as r, switchAllKeysToLower as s, CardFilterComponent as t, DynamicFiltersComponent as u, CardInfoComponent as v, ChartCardComponent as w, resolveEntityUserPhoto as x, EntityInfoComponent as y, normalizeDashboardCardEntityValue as z };
|
|
50441
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
50457
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-Bcn8YzoD.mjs.map
|