@masterteam/dashboard-builder 0.0.49 → 0.0.50

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,2 +1,2 @@
1
- export { aw as ActionsSettings, aE as ArrayBuilderField, G as BarChartHandler, ap as BarControlUi, aS as CHART_CAPABILITIES, as as CHART_TYPES, b5 as CONFIG_DOMAINS, C as CardContentComponent, q as CardFilterComponent, t as CardInfoComponent, u as ChartCardComponent, B as ChartDataService, aI as ChartFilterDrawer, al as ChartSettingsDrawer, ax as ChartViewer, aD as ColorListField, W as ComparisonChartHandler, b as DashboardBuilder, af as DashboardBuilderService, a as DashboardItem, D as DashboardItemStoreService, ad as DashboardList, ag as DashboardStoreService, d as DashboardViewer, av as DataSourceSettings, aO as DatasourcePanelComponent, an as DefaultControlUi, am as DisplaySettings, r as DynamicFiltersComponent, ak as DynamicFiltersConfig, E as EChartComponent, P as EntitiesPreviewCardComponent, v as EntityInfoComponent, w as EntityPreviewCardComponent, aN as FilterBuilderComponent, aQ as FilterByGroupPipe, aM as FilterChipsBarComponent, N as GaugeChartHandler, au as GeneralSettings, aR as GetChartActionsPipe, aL as GuidedConfigDialogComponent, ae as HTTPMethod, H as HeaderCardComponent, bP as ITEM_GUIDANCE_REGISTRY, aH as ItemCardMenuComponent, aK as ItemConfigPopoverComponent, aJ as ItemContextToolbarComponent, bR as ItemGuidanceService, aF as KeyValueMapField, L as LastHistoryLevelCardComponent, aG as LegendOrderField, Y as LevelCardHandler, U as LineChartHandler, x as ListStatisticCardComponent, ai as ManageBreadcrumb, aj as ManageFilterOnPage, ar as ManageItem, at as ManageItemService, ah as ManagePages, Z as MapChartHandler, Q as OverviewCardHandler, b8 as POPOVER_TABS, b9 as POPOVER_TAB_SPECS, a0 as PhaseGateStepperHandler, I as PieChartHandler, ao as PieControlUi, P as PropertiesCardComponent, _ as RingGaugeChartHandler, $ as SPlusChartHandler, bq as STYLE_PRESETS, aP as SchemaControlRendererComponent, aC as SegmentedField, y as SkeletonCardComponent, V as SnapshotHandler, X as SplitterChartHandler, J as StackBarChartHandler, aq as StackBarControlUi, S as StaticFiltersComponent, z as StatisticCardComponent, aB as StyleField, az as StyleSettingsRenderer, ay as StyleStudioDrawer, T as TableCardComponent, O as TableViewHandler, R as TimelineHandler, A as TopbarCardComponent, m as addCommasToNumber, bm as applyBehaviorToPersisted, bB as applyControlPatchToPersisted, bC as applyControlPatchesToPersisted, bn as applyFilterChipsToPersisted, bk as applyLabelLegendFormatToPersisted, bi as applyLayoutToPersisted, bg as applyStyleToPersisted, bb as applyTitleToPersisted, K as axisFormatters, bl as behaviorToUi, bK as bindingKey, bp as buildAssembly, bJ as buildDisplayFieldPredicate, c as cloneDeep, a6 as createAxisFormatter, a7 as createTooltipFormatter, bc as datasourceToUi, bx as deepMerge, bQ as describeGuidance, b6 as domainsForCapability, h as dynamicReorder, f as dynamicTextReplace, aA as expandResetPatches, bd as fieldsToUi, be as filtersToUi, b7 as findDomain, bs as findPreset, bH as flattenSchema, a1 as formatCurrency, a5 as formatDate, by as formatForEditor, a4 as formatNumber, a3 as formatPercentage, j as formatValue, a8 as formatWordsUnderBar, a9 as formatXAxis, i as generalConfiguration, bL as getBinding, aT as getCapabilityById, p as getColorFromConditions, bD as getControlSchema, a2 as getCurrencySuffix, bG as getFallbackControlSchema, k as getLocalizedTitle, g as getNestedData, M as groupDatesByYearAndMonth, bv as groupIssuesByDomain, ab as handleFilterForCard, ac as handleFilterForSnapshot, aa as handleFiltersForCustom, bu as hasBlockingIssues, o as isMobilePlatform, bj as labelLegendFormatToUi, bh as layoutToUi, bM as listBindings, bN as listBindingsForChart, bE as listControlSchemaIds, bF as listControlSchemas, a$ as moduleIdFromSelector, aY as normalizeAggregateFunction, b4 as normalizeBeforeRequest, b3 as normalizeBeforeSave, aW as normalizeChartTypeForRequest, aX as normalizeFilterOperation, aZ as normalizeFilters, b2 as normalizeOnLoad, bw as parseAdvancedJson, bo as persistedToUi, br as presetsForCapability, bO as readBoundValue, bz as readByPath, aU as resolveCapability, bI as resolveDisplayFields, a_ as selectorFromLegacy, bA as setByPath, l as sortChartData, n as sortDataTableView, bf as styleToUi, e as switchAllKeysSmall, s as switchAllKeysToLower, ba as titleToUi, aV as toBackendChartType, b0 as toBackendSourceLink, b1 as toFormSourceLink, bt as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-BdAlTss1.mjs';
1
+ export { aw as ActionsSettings, aE as ArrayBuilderField, G as BarChartHandler, ap as BarControlUi, aS as CHART_CAPABILITIES, as as CHART_TYPES, b5 as CONFIG_DOMAINS, C as CardContentComponent, q as CardFilterComponent, t as CardInfoComponent, u as ChartCardComponent, B as ChartDataService, aI as ChartFilterDrawer, al as ChartSettingsDrawer, ax as ChartViewer, aD as ColorListField, W as ComparisonChartHandler, b as DashboardBuilder, af as DashboardBuilderService, a as DashboardItem, D as DashboardItemStoreService, ad as DashboardList, ag as DashboardStoreService, d as DashboardViewer, av as DataSourceSettings, aO as DatasourcePanelComponent, an as DefaultControlUi, am as DisplaySettings, r as DynamicFiltersComponent, ak as DynamicFiltersConfig, E as EChartComponent, P as EntitiesPreviewCardComponent, v as EntityInfoComponent, w as EntityPreviewCardComponent, aN as FilterBuilderComponent, aQ as FilterByGroupPipe, aM as FilterChipsBarComponent, N as GaugeChartHandler, au as GeneralSettings, aR as GetChartActionsPipe, aL as GuidedConfigDialogComponent, ae as HTTPMethod, H as HeaderCardComponent, bP as ITEM_GUIDANCE_REGISTRY, aH as ItemCardMenuComponent, aK as ItemConfigPopoverComponent, aJ as ItemContextToolbarComponent, bR as ItemGuidanceService, aF as KeyValueMapField, L as LastHistoryLevelCardComponent, aG as LegendOrderField, Y as LevelCardHandler, U as LineChartHandler, x as ListStatisticCardComponent, ai as ManageBreadcrumb, aj as ManageFilterOnPage, ar as ManageItem, at as ManageItemService, ah as ManagePages, Z as MapChartHandler, Q as OverviewCardHandler, b8 as POPOVER_TABS, b9 as POPOVER_TAB_SPECS, a0 as PhaseGateStepperHandler, I as PieChartHandler, ao as PieControlUi, P as PropertiesCardComponent, _ as RingGaugeChartHandler, $ as SPlusChartHandler, bq as STYLE_PRESETS, aP as SchemaControlRendererComponent, aC as SegmentedField, y as SkeletonCardComponent, V as SnapshotHandler, X as SplitterChartHandler, J as StackBarChartHandler, aq as StackBarControlUi, S as StaticFiltersComponent, z as StatisticCardComponent, aB as StyleField, az as StyleSettingsRenderer, ay as StyleStudioDrawer, T as TableCardComponent, O as TableViewHandler, R as TimelineHandler, A as TopbarCardComponent, m as addCommasToNumber, bm as applyBehaviorToPersisted, bB as applyControlPatchToPersisted, bC as applyControlPatchesToPersisted, bn as applyFilterChipsToPersisted, bk as applyLabelLegendFormatToPersisted, bi as applyLayoutToPersisted, bg as applyStyleToPersisted, bb as applyTitleToPersisted, K as axisFormatters, bl as behaviorToUi, bK as bindingKey, bp as buildAssembly, bJ as buildDisplayFieldPredicate, c as cloneDeep, a6 as createAxisFormatter, a7 as createTooltipFormatter, bc as datasourceToUi, bx as deepMerge, bQ as describeGuidance, b6 as domainsForCapability, h as dynamicReorder, f as dynamicTextReplace, aA as expandResetPatches, bd as fieldsToUi, be as filtersToUi, b7 as findDomain, bs as findPreset, bH as flattenSchema, a1 as formatCurrency, a5 as formatDate, by as formatForEditor, a4 as formatNumber, a3 as formatPercentage, j as formatValue, a8 as formatWordsUnderBar, a9 as formatXAxis, i as generalConfiguration, bL as getBinding, aT as getCapabilityById, p as getColorFromConditions, bD as getControlSchema, a2 as getCurrencySuffix, bG as getFallbackControlSchema, k as getLocalizedTitle, g as getNestedData, M as groupDatesByYearAndMonth, bv as groupIssuesByDomain, ab as handleFilterForCard, ac as handleFilterForSnapshot, aa as handleFiltersForCustom, bu as hasBlockingIssues, o as isMobilePlatform, bj as labelLegendFormatToUi, bh as layoutToUi, bM as listBindings, bN as listBindingsForChart, bE as listControlSchemaIds, bF as listControlSchemas, a$ as moduleIdFromSelector, aY as normalizeAggregateFunction, b4 as normalizeBeforeRequest, b3 as normalizeBeforeSave, aW as normalizeChartTypeForRequest, aX as normalizeFilterOperation, aZ as normalizeFilters, b2 as normalizeOnLoad, bw as parseAdvancedJson, bo as persistedToUi, br as presetsForCapability, bO as readBoundValue, bz as readByPath, aU as resolveCapability, bI as resolveDisplayFields, a_ as selectorFromLegacy, bA as setByPath, l as sortChartData, n as sortDataTableView, bf as styleToUi, e as switchAllKeysSmall, s as switchAllKeysToLower, ba as titleToUi, aV as toBackendChartType, b0 as toBackendSourceLink, b1 as toFormSourceLink, bt as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-YVu_-WlK.mjs';
2
2
  //# sourceMappingURL=masterteam-dashboard-builder.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/dashboard-builder",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/dashboard-builder",
6
6
  "linkDirectory": true,
@@ -21,9 +21,9 @@
21
21
  "primeng": "21.1.5",
22
22
  "rxjs": "^7.8.2",
23
23
  "tailwindcss": "^4.2.2",
24
- "@masterteam/components": "^0.0.213",
25
24
  "@masterteam/timeline": "^0.0.16",
26
- "@masterteam/icons": "^0.0.17"
25
+ "@masterteam/icons": "^0.0.17",
26
+ "@masterteam/components": "^0.0.210"
27
27
  },
28
28
  "dependencies": {
29
29
  "tslib": "^2.8.1",
@@ -1,6 +1,6 @@
1
1
  import * as _masterteam_dashboard_builder from '@masterteam/dashboard-builder';
2
2
  import * as _angular_core from '@angular/core';
3
- import { OnInit, OnDestroy, ElementRef, AfterViewInit, OnChanges, SimpleChanges, TemplateRef, PipeTransform } from '@angular/core';
3
+ import { OnInit, OnDestroy, AfterViewInit, OnChanges, SimpleChanges, TemplateRef, PipeTransform } from '@angular/core';
4
4
  import { GridsterItem, GridsterConfig } from 'angular-gridster2';
5
5
  import { ContextMenu } from 'primeng/contextmenu';
6
6
  import { MenuItem } from 'primeng/api';
@@ -532,7 +532,7 @@ interface CustomApi {
532
532
  /**
533
533
  * Action emitted from the kebab menu. The host (`dashboard-builder`)
534
534
  * routes each id to a single concrete owner (ManageItem, ChartSettingsDrawer,
535
- * ChartFilterDrawer, inline title input, or destructive action).
535
+ * ChartFilterDrawer, host title editor dialog, or destructive action).
536
536
  */
537
537
  type ItemCardMenuAction = {
538
538
  type: 'configure-datasource';
@@ -1218,6 +1218,16 @@ interface ControlField {
1218
1218
  type: ControlFieldType;
1219
1219
  /** Persisted dotted path (read/write target). */
1220
1220
  path: string;
1221
+ /**
1222
+ * Additional dotted paths to MIRROR the value into on every write. Used when
1223
+ * different chart types' renderers read the same logical style from different
1224
+ * persisted paths (e.g. card-content reads the title color from
1225
+ * `configAsType.headerCardConfig.headerColor` while statistic-card reads it
1226
+ * from `displayConfig.StyleConfig.color`). The value is written to `path` and
1227
+ * every `mirrorPaths` entry so one control reflects across all chart types.
1228
+ * Reads fall back to the first non-empty path among `[path, ...mirrorPaths]`.
1229
+ */
1230
+ mirrorPaths?: string[];
1221
1231
  /**
1222
1232
  * Default value applied when the field is missing on the persisted shape.
1223
1233
  * The default is *only* read for display — it is never silently written.
@@ -1590,8 +1600,6 @@ interface ItemGuidanceDescriptor {
1590
1600
  secondaryAction?: ItemGuidanceAction;
1591
1601
  /** Whether to render the center primary CTA card. */
1592
1602
  showCenterCta: boolean;
1593
- /** Whether the inline title editor should be visible (builder mode). */
1594
- showTitleEdit: boolean;
1595
1603
  /** Whether the top-end "More actions" kebab should be visible (builder). */
1596
1604
  showTopEndMenu: boolean;
1597
1605
  }
@@ -2371,7 +2379,7 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2371
2379
  * No surface duplicates another. There is no other code path that opens
2372
2380
  * a separate popover/wizard.
2373
2381
  */
2374
- onItemCardMenuAction(chart: DashboardChartItem, action: ItemCardMenuAction): void;
2382
+ onItemCardMenuAction(chart: DashboardChartItem, action: ItemCardMenuAction, parentItem?: DashboardChartItem): void;
2375
2383
  requestLayoutTitleEdit(chart: DashboardChartItem, event: Event): void;
2376
2384
  private openTitleEditor;
2377
2385
  /** Whether the chart has a linked dialog (Manage menu shows dialog entries). */
@@ -2384,6 +2392,14 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2384
2392
  showContextToolbar(chart: DashboardChartItem): boolean;
2385
2393
  isPropertiesListChart(chart: DashboardChartItem): boolean;
2386
2394
  isTopbarChart(chart: DashboardChartItem): boolean;
2395
+ getGroupChildren(groupItem: DashboardChartItem): DashboardChartItem[];
2396
+ getSelectedGroupChild(groupItem: DashboardChartItem): DashboardChartItem | null;
2397
+ getItemTitle(item: DashboardChartItem, fallbackIndex?: number): string;
2398
+ getGroupTitle(groupItem: DashboardChartItem): string;
2399
+ getGroupHeaderConfig(groupItem: DashboardChartItem): Record<string, any> | null;
2400
+ getGroupCardStyleConfig(groupItem: DashboardChartItem): Record<string, any> | null;
2401
+ getGroupStyleConfig(groupItem: DashboardChartItem): Record<string, any> | null;
2402
+ selectGroupChild(groupItem: DashboardChartItem, index: number, event?: Event): void;
2387
2403
  editItem(chart: DashboardChartItem, parentItem?: DashboardChartItem, defaultTab?: 'general' | 'dataSource' | 'actions'): void;
2388
2404
  deleteItem(chart: DashboardChartItem): void;
2389
2405
  /**
@@ -2415,7 +2431,7 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2415
2431
  */
2416
2432
  addWidgetByType(widgetType: ChartTypeConfig): void;
2417
2433
  /**
2418
- * Pass-2: persist an inline title edit committed from the chart card.
2434
+ * Persist a title update reported by an item renderer.
2419
2435
  * Updates `clientConfig.title.{en,ar}` for the matched chart.
2420
2436
  */
2421
2437
  onChartTitleEdited(chart: DashboardChartItem, newTitle: string): void;
@@ -3040,7 +3056,7 @@ declare class DashboardItem implements OnInit, OnDestroy {
3040
3056
  readonly ignoreQueryFilter: _angular_core.InputSignal<boolean>;
3041
3057
  /**
3042
3058
  * Whether the host is rendering in builder mode (not viewer). Enables
3043
- * the inline title edit + Configure datasource CTA on the chart card.
3059
+ * builder-only guidance actions such as Configure datasource.
3044
3060
  */
3045
3061
  readonly builderMode: _angular_core.InputSignal<boolean>;
3046
3062
  /** Emitted when an action is triggered (useful for dialog communication) */
@@ -3052,8 +3068,8 @@ declare class DashboardItem implements OnInit, OnDestroy {
3052
3068
  */
3053
3069
  readonly configureRequested: _angular_core.OutputEmitterRef<void>;
3054
3070
  /**
3055
- * Emitted when the user inline-edits the chart title. Host (dashboard-builder)
3056
- * should persist the new title into clientConfig.title.{en,ar}.
3071
+ * Emitted when a child renderer reports a title change. Normal builder title
3072
+ * edits are handled by the host edit-title action/modal.
3057
3073
  */
3058
3074
  readonly titleEdited: _angular_core.OutputEmitterRef<string>;
3059
3075
  /** Dashboard ID - derived from config or chartTypeId */
@@ -3070,8 +3086,6 @@ declare class DashboardItem implements OnInit, OnDestroy {
3070
3086
  readonly languageCode: _angular_core.Signal<string>;
3071
3087
  /** Chart type from service config */
3072
3088
  readonly chartType: _angular_core.Signal<string | undefined>;
3073
- /** Whether the inline title input should be shown in the needs-config overlay. */
3074
- readonly titleEditableEnabled: _angular_core.Signal<boolean>;
3075
3089
  /** Current title in active language (or English / Arabic fallback). */
3076
3090
  readonly currentTitle: _angular_core.Signal<string>;
3077
3091
  /**
@@ -3159,9 +3173,9 @@ declare class DashboardItem implements OnInit, OnDestroy {
3159
3173
  */
3160
3174
  onSecondaryRequested(): void;
3161
3175
  /**
3162
- * Handle inline title edit committed by the chart card. Forwarded to host
3163
- * to persist into clientConfig.title.{en,ar}. We also patch the local
3164
- * store so the change shows immediately.
3176
+ * Handle title updates reported by child layout renderers. Forwarded to host
3177
+ * to persist into clientConfig.title.{en,ar}. We also patch the local store
3178
+ * so the change shows immediately.
3165
3179
  */
3166
3180
  onTitleChange(newTitle: string): void;
3167
3181
  doActions(eventData: any, eventType: string): void;
@@ -3185,6 +3199,7 @@ interface HeaderCardConfig$1 {
3185
3199
  }
3186
3200
  interface CardBorderStyleConfig {
3187
3201
  'border-width'?: number;
3202
+ 'border-color'?: string;
3188
3203
  'border-top-show'?: boolean;
3189
3204
  'border-top-color'?: string;
3190
3205
  'border-right-show'?: boolean;
@@ -3230,6 +3245,11 @@ declare class CardContentComponent {
3230
3245
  * key fall back to `comfortable` via the absence-of-attribute baseline.
3231
3246
  */
3232
3247
  readonly density: _angular_core.InputSignal<string | null>;
3248
+ /**
3249
+ * Optional card body padding in px (from `configAsType.padding`). When unset,
3250
+ * the CSS-class baseline padding applies — so existing cards are unchanged.
3251
+ */
3252
+ readonly padding: _angular_core.InputSignal<number | null>;
3233
3253
  /** Whether to show header */
3234
3254
  readonly showHeader: _angular_core.InputSignal<boolean>;
3235
3255
  /** Whether header is clickable */
@@ -3241,19 +3261,12 @@ declare class CardContentComponent {
3241
3261
  /** Header click event */
3242
3262
  readonly headerClick: _angular_core.OutputEmitterRef<void>;
3243
3263
  /**
3244
- * Whether the title is click-to-edit (builder mode only). Falsy by
3245
- * default so view-mode cards keep their existing behavior.
3264
+ * Deprecated compatibility input. Card titles are display-only here; builder
3265
+ * title changes are owned by the host edit-title action/modal.
3246
3266
  */
3247
3267
  readonly titleEditable: _angular_core.InputSignal<boolean>;
3248
- /** Emitted when the user commits an edited title (Enter / blur). */
3268
+ /** Deprecated compatibility output; title edits are host-owned. */
3249
3269
  readonly titleChange: _angular_core.OutputEmitterRef<string>;
3250
- /** Internal: whether the title input is currently being edited. */
3251
- readonly editingTitle: _angular_core.WritableSignal<boolean>;
3252
- /** Internal: draft text while editing. */
3253
- readonly titleDraft: _angular_core.WritableSignal<string>;
3254
- /** Reference to the inline title input (if visible). */
3255
- readonly titleInputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
3256
- constructor();
3257
3270
  /** Computed show header */
3258
3271
  readonly showHeaderState: _angular_core.Signal<boolean>;
3259
3272
  /** Computed header clickable */
@@ -3265,20 +3278,8 @@ declare class CardContentComponent {
3265
3278
  /** Computed border radius style */
3266
3279
  readonly borderRadiusStyle: _angular_core.Signal<string>;
3267
3280
  onHeaderClick(): void;
3268
- /**
3269
- * Begin inline title editing. Only triggered when `titleEditable` is true.
3270
- * The title text is replaced by an `<input>` until Enter/blur (commit) or
3271
- * Escape (cancel).
3272
- */
3273
- onStartEditTitle(event: Event): void;
3274
- /** Commit the in-progress title edit. */
3275
- onCommitTitle(): void;
3276
- /** Cancel the in-progress title edit. */
3277
- onCancelTitle(): void;
3278
- /** Track input changes during edit. */
3279
- onTitleInput(value: string): void;
3280
3281
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardContentComponent, never>;
3281
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardContentComponent, "mt-card-content", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "inGroup": { "alias": "inGroup"; "required": false; "isSignal": true; }; "headerConfig": { "alias": "headerConfig"; "required": false; "isSignal": true; }; "styleConfig": { "alias": "styleConfig"; "required": false; "isSignal": true; }; "cardStyleConfig": { "alias": "cardStyleConfig"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "headerClickable": { "alias": "headerClickable"; "required": false; "isSignal": true; }; "isNoTopEnd": { "alias": "isNoTopEnd"; "required": false; "isSignal": true; }; "isChart": { "alias": "isChart"; "required": false; "isSignal": true; }; "titleEditable": { "alias": "titleEditable"; "required": false; "isSignal": true; }; }, { "headerClick": "headerClick"; "titleChange": "titleChange"; }, never, ["[topEnd]", "[body]", "[footer]"], true, never>;
3282
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardContentComponent, "mt-card-content", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "inGroup": { "alias": "inGroup"; "required": false; "isSignal": true; }; "headerConfig": { "alias": "headerConfig"; "required": false; "isSignal": true; }; "styleConfig": { "alias": "styleConfig"; "required": false; "isSignal": true; }; "cardStyleConfig": { "alias": "cardStyleConfig"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "headerClickable": { "alias": "headerClickable"; "required": false; "isSignal": true; }; "isNoTopEnd": { "alias": "isNoTopEnd"; "required": false; "isSignal": true; }; "isChart": { "alias": "isChart"; "required": false; "isSignal": true; }; "titleEditable": { "alias": "titleEditable"; "required": false; "isSignal": true; }; }, { "headerClick": "headerClick"; "titleChange": "titleChange"; }, never, ["[topEnd]", "[body]", "[footer]"], true, never>;
3282
3283
  }
3283
3284
 
3284
3285
  declare class CardFilterComponent implements OnInit {
@@ -3598,7 +3599,7 @@ declare class ChartCardComponent implements OnInit, OnDestroy {
3598
3599
  readonly inGroup: _angular_core.InputSignal<boolean>;
3599
3600
  /** Config mode flag (drawer preview) */
3600
3601
  readonly isConfigMode: _angular_core.InputSignal<boolean>;
3601
- /** Whether title is click-to-edit (builder mode only). */
3602
+ /** Builder-mode flag retained for legacy configure CTA behavior. */
3602
3603
  readonly titleEditable: _angular_core.InputSignal<boolean>;
3603
3604
  /** Action event output */
3604
3605
  readonly onAction: _angular_core.OutputEmitterRef<{
@@ -3607,7 +3608,7 @@ declare class ChartCardComponent implements OnInit, OnDestroy {
3607
3608
  }>;
3608
3609
  /** Emitted when the empty card "Configure datasource" CTA is clicked. */
3609
3610
  readonly onConfigure: _angular_core.OutputEmitterRef<void>;
3610
- /** Emitted when title is edited inline. */
3611
+ /** Deprecated compatibility output; title edits are host-owned. */
3611
3612
  readonly onTitleChange: _angular_core.OutputEmitterRef<string>;
3612
3613
  /** Configuration item */
3613
3614
  readonly configurationItem: _angular_core.WritableSignal<ItemConfig | null>;
@@ -3658,6 +3659,8 @@ declare class ChartCardComponent implements OnInit, OnDestroy {
3658
3659
  readonly timelineResources: _angular_core.Signal<any[]>;
3659
3660
  readonly timelineLabels: _angular_core.Signal<any[]>;
3660
3661
  readonly timelineLegendIconType: _angular_core.Signal<string>;
3662
+ /** Timeline legend visibility — honors the Style Studio "Show legend" toggle. */
3663
+ readonly timelineLegendShow: _angular_core.Signal<boolean>;
3661
3664
  readonly timelineHeaderBgColor: _angular_core.Signal<string | null>;
3662
3665
  readonly timelineHeaderTextColor: _angular_core.Signal<string | null>;
3663
3666
  readonly timelineMode: _angular_core.WritableSignal<TimelineScaleMode>;
@@ -3736,6 +3739,9 @@ declare class EChartComponent implements OnInit, AfterViewInit, OnChanges, OnDes
3736
3739
  private chart;
3737
3740
  private resizeObserver;
3738
3741
  private echarts;
3742
+ private legendSelectedState;
3743
+ private pendingCustomLegendSelection;
3744
+ private readonly handleLegendSelectionChanged;
3739
3745
  /** Dashboard ID */
3740
3746
  readonly dashboardId: _angular_core.InputSignal<string | number>;
3741
3747
  /** Chart configuration/data - can be ECharts option directly or wrapped format */
@@ -3791,6 +3797,14 @@ declare class EChartComponent implements OnInit, AfterViewInit, OnChanges, OnDes
3791
3797
  */
3792
3798
  private processLegends;
3793
3799
  private hasPieSeries;
3800
+ private applyLegendSelectionToOption;
3801
+ private readLegendSelectedMap;
3802
+ private storeLegendSelection;
3803
+ private syncLegendItems;
3804
+ private updatePieCenterTotal;
3805
+ private getFirstPieSeries;
3806
+ private getCenterGraphicGroup;
3807
+ private hasCenterGraphicChildren;
3794
3808
  /**
3795
3809
  * Toggle legend item visibility
3796
3810
  */
@@ -3849,6 +3863,8 @@ declare class EChartComponent implements OnInit, AfterViewInit, OnChanges, OnDes
3849
3863
  private getResponsiveGridOffsets;
3850
3864
  private applyResponsiveLegend;
3851
3865
  private applyConfiguredLegend;
3866
+ private applyLegendOverrideOrder;
3867
+ private orderSeriesDataByLegend;
3852
3868
  private mapLegendConfig;
3853
3869
  private applyLegendSideCoordinates;
3854
3870
  private estimateCategoryCount;
@@ -3865,6 +3881,7 @@ interface EntityData {
3865
3881
  settings?: any;
3866
3882
  showInfoUser?: boolean;
3867
3883
  displayAreas?: any[];
3884
+ statusColor?: string;
3868
3885
  }
3869
3886
  declare class EntityInfoComponent {
3870
3887
  /** Entity data to display */
@@ -3960,6 +3977,8 @@ declare class PropertiesCardComponent implements OnInit, OnDestroy {
3960
3977
  readonly currentTabItems: _angular_core.Signal<DashboardTabItem[]>;
3961
3978
  readonly selectedProperties: _angular_core.Signal<string[]>;
3962
3979
  readonly propsConfigAsIndex: _angular_core.Signal<PropertyRuntimeConfig[]>;
3980
+ readonly propertyColorOverrides: _angular_core.Signal<unknown>;
3981
+ readonly numberFormat: _angular_core.Signal<unknown>;
3963
3982
  readonly legacyHiddenPropertyKeys: _angular_core.Signal<string[]>;
3964
3983
  readonly tabOptions: _angular_core.Signal<DashboardCardTabOption[]>;
3965
3984
  readonly showTabs: _angular_core.Signal<boolean>;
@@ -3986,6 +4005,28 @@ declare class PropertiesCardComponent implements OnInit, OnDestroy {
3986
4005
  private resolveTabLabel;
3987
4006
  private readString;
3988
4007
  private resolveEntityName;
4008
+ /**
4009
+ * Resolve a per-property label override from
4010
+ * configAsType.overrideSelectedPropertiesLabels[propKey][lang]. The map may be
4011
+ * stored with original-case keys, so match the property key case-insensitively.
4012
+ */
4013
+ private resolveLabelOverride;
4014
+ /**
4015
+ * Resolve a per-property color override from
4016
+ * configAsType.overrideSelectedPropertiesColors. Shape is
4017
+ * `{ [targetPropKey]: { selectedKey: sourcePropKeyOrColor } }` — the color is
4018
+ * sourced from another property's value (matching the ring-gauge handler) or,
4019
+ * when `selectedKey` is a literal color, used directly. Case-insensitive on
4020
+ * the property key. Returns '' when no override applies.
4021
+ */
4022
+ private resolvePropertyColorOverride;
4023
+ /**
4024
+ * Apply Style Studio "Number format" (clientConfig.format) to numeric entity
4025
+ * values (percentage / currency / number). Gated: only formats string/number
4026
+ * scalar values for those view types; absent format or non-scalar values pass
4027
+ * through unchanged so existing dashboards keep their current rendering.
4028
+ */
4029
+ private applyNumberFormat;
3989
4030
  private readLocalizedText;
3990
4031
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertiesCardComponent, never>;
3991
4032
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PropertiesCardComponent, "mt-properties-card, mt-entities-preview-card", never, { "dashboardId": { "alias": "dashboardId"; "required": true; "isSignal": true; }; "inGroup": { "alias": "inGroup"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
@@ -4010,6 +4051,28 @@ declare class EntityPreviewCardComponent implements OnInit, OnDestroy {
4010
4051
  private readLegacyHiddenPropertyKeys;
4011
4052
  private mapViewType;
4012
4053
  private resolveEntityName;
4054
+ /**
4055
+ * Resolve a per-property label override from
4056
+ * configAsType.overrideSelectedPropertiesLabels[propKey][lang]. The map may be
4057
+ * stored with original-case keys, so match the property key case-insensitively.
4058
+ */
4059
+ private resolveLabelOverride;
4060
+ /**
4061
+ * Resolve a per-property color override from
4062
+ * configAsType.overrideSelectedPropertiesColors. Shape is
4063
+ * `{ [targetPropKey]: { selectedKey: sourcePropKeyOrColor } }` — the color is
4064
+ * sourced from another property's value (matching the ring-gauge handler) or,
4065
+ * when `selectedKey` is a literal color, used directly. Case-insensitive on
4066
+ * the property key. Returns '' when no override applies.
4067
+ */
4068
+ private resolvePropertyColorOverride;
4069
+ /**
4070
+ * Apply Style Studio "Number format" (clientConfig.format) to numeric entity
4071
+ * values (percentage / currency / number). Gated: only formats string/number
4072
+ * scalar values for those view types; absent format or non-scalar values pass
4073
+ * through unchanged so existing dashboards keep their current rendering.
4074
+ */
4075
+ private applyNumberFormat;
4013
4076
  private readLocalizedText;
4014
4077
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreviewCardComponent, never>;
4015
4078
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreviewCardComponent, "mt-entity-preview-card", never, { "dashboardId": { "alias": "dashboardId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -4079,6 +4142,24 @@ declare class HeaderCardComponent implements OnInit, OnDestroy {
4079
4142
  readonly containerStyles: _angular_core.Signal<any>;
4080
4143
  /** Card styles */
4081
4144
  readonly cardStyles: _angular_core.Signal<any>;
4145
+ /**
4146
+ * Header text alignment, written by the `textAlign` control as
4147
+ * `clientConfig.displayConfig.StyleConfig['justify-content']`
4148
+ * (values: start | center | end). When `isHeaderCentered` is set it forces
4149
+ * `center`. Returns '' when nothing is configured so the existing layout is
4150
+ * preserved.
4151
+ */
4152
+ readonly headerJustify: _angular_core.Signal<string>;
4153
+ /**
4154
+ * Center the header block
4155
+ * (configAsType.headerCardConfig.isHeaderCentered === true).
4156
+ */
4157
+ readonly isHeaderCentered: _angular_core.Signal<boolean>;
4158
+ /**
4159
+ * Hide the header band
4160
+ * (configAsType.headerCardConfig.isHeaderHidden === true).
4161
+ */
4162
+ readonly isHeaderHidden: _angular_core.Signal<boolean>;
4082
4163
  /** Status indicators */
4083
4164
  readonly statuses: _angular_core.WritableSignal<StatusItem[]>;
4084
4165
  readonly editingTitle: _angular_core.WritableSignal<boolean>;
@@ -4141,6 +4222,11 @@ declare class ListStatisticCardComponent implements OnInit, OnDestroy {
4141
4222
  private readonly subscription;
4142
4223
  /** Dashboard ID */
4143
4224
  readonly dashboardId: _angular_core.InputSignal<string | number>;
4225
+ /** Action output — routed through dashboard-item.doActions -> ActionService. */
4226
+ readonly onAction: _angular_core.OutputEmitterRef<{
4227
+ type: string;
4228
+ data: any;
4229
+ }>;
4144
4230
  /** Configuration item - matches OLD: ConfigurationItem */
4145
4231
  readonly configurationItem: _angular_core.WritableSignal<ItemConfig | null>;
4146
4232
  /** Handled data - matches OLD: DataHandled - receives direct format from handler */
@@ -4155,7 +4241,7 @@ declare class ListStatisticCardComponent implements OnInit, OnDestroy {
4155
4241
  */
4156
4242
  doActions(event: any, type: string): void;
4157
4243
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListStatisticCardComponent, never>;
4158
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListStatisticCardComponent, "mt-list-statistic-card", never, { "dashboardId": { "alias": "dashboardId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
4244
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListStatisticCardComponent, "mt-list-statistic-card", never, { "dashboardId": { "alias": "dashboardId"; "required": true; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
4159
4245
  }
4160
4246
 
4161
4247
  interface SkeletonConfig {
@@ -4218,6 +4304,10 @@ declare class StatisticCardComponent implements OnInit {
4218
4304
  }>;
4219
4305
  /** Card styles */
4220
4306
  readonly cardStyles: _angular_core.Signal<Record<string, any>>;
4307
+ /** Center the title/header block (configAsType.headerCardConfig.isHeaderCentered). */
4308
+ readonly isHeaderCentered: _angular_core.Signal<boolean>;
4309
+ /** Hide the title row (configAsType.headerCardConfig.isHeaderHidden / showHeader === false). */
4310
+ readonly isHeaderHidden: _angular_core.Signal<boolean>;
4221
4311
  /** Border top style */
4222
4312
  readonly borderTopStyle: _angular_core.Signal<{
4223
4313
  'border-top'?: undefined;
@@ -4269,7 +4359,19 @@ interface TableStyleConfig {
4269
4359
  groupBackgroundColor?: string;
4270
4360
  hiddenColumns?: string[];
4271
4361
  hideTableSubheader?: boolean;
4362
+ /** When true, skip currency formatting and render the raw numeric value. */
4363
+ disableCurrencyFormat?: boolean;
4272
4364
  hideIndex?: boolean;
4365
+ /** Alternating-row shading. */
4366
+ striped?: boolean;
4367
+ /** Default sort applied on load. */
4368
+ sortConfig?: {
4369
+ column?: string;
4370
+ direction?: 'asc' | 'desc';
4371
+ };
4372
+ /** Render percentage cells as a progress bar / status dot. */
4373
+ showPercentageAsProgressBar?: boolean;
4374
+ showPercentageStatus?: boolean;
4273
4375
  }
4274
4376
  interface TableVirtualRow {
4275
4377
  trackId: string;
@@ -4323,6 +4425,32 @@ declare class TableCardComponent implements OnInit, OnDestroy {
4323
4425
  readonly title: _angular_core.Signal<string>;
4324
4426
  /** Table style config */
4325
4427
  readonly tableStyleConfig: _angular_core.Signal<TableStyleConfig | null>;
4428
+ /**
4429
+ * Hide the table's column-header (subheader) row.
4430
+ * Reads `clientConfig.tableFormat.hideTableSubheader`. Gated: defaults to
4431
+ * showing the header (current behavior) unless the flag is explicitly true.
4432
+ */
4433
+ readonly hideSubheader: _angular_core.Signal<boolean>;
4434
+ /**
4435
+ * Whether to skip currency formatting on cells.
4436
+ * Reads `clientConfig.tableFormat.disableCurrencyFormat`. Gated: only true
4437
+ * when the flag is explicitly set.
4438
+ */
4439
+ readonly disableCurrencyFormat: _angular_core.Signal<boolean>;
4440
+ /** "% status color" toggle — color percentage cells by the row's status. */
4441
+ readonly showPercentageStatus: _angular_core.Signal<boolean>;
4442
+ /**
4443
+ * Resolve the row's status colour from the column whose viewType is 'status'
4444
+ * (e.g. Delayed -> red, Completed -> green). Used to tint percentage cells.
4445
+ */
4446
+ private getRowStatusColor;
4447
+ /**
4448
+ * Extra-columns-from-lookup config persisted at `clientConfig.tableCoulmns`
4449
+ * (misspelling preserved on purpose). Shape: { extraCoulmnFromLookup,
4450
+ * lookupId, groupedBy, propKey }. Read here so the renderer can react to it;
4451
+ * the data-join itself is performed in buildTable when present.
4452
+ */
4453
+ readonly extraColumnsConfig: _angular_core.Signal<any>;
4326
4454
  /** Whether to show index column */
4327
4455
  readonly showIndex: _angular_core.Signal<boolean>;
4328
4456
  /** Whether table is grouped */
@@ -4365,6 +4493,13 @@ declare class TableCardComponent implements OnInit, OnDestroy {
4365
4493
  * Build flat (non-grouped) table
4366
4494
  */
4367
4495
  private buildFlatTable;
4496
+ /**
4497
+ * Apply the configured default sort (tableFormat.sortConfig) on load. The
4498
+ * configured column is a selected-property key; match it against the built
4499
+ * columns (by keyPure / key prefix, case-insensitive) and sort the flat rows.
4500
+ * No-op when no sortConfig.column is set.
4501
+ */
4502
+ private applyDefaultSort;
4368
4503
  /**
4369
4504
  * Build grouped table
4370
4505
  */
@@ -4733,6 +4868,12 @@ declare class PieChartHandler {
4733
4868
 
4734
4869
  declare class StackBarChartHandler {
4735
4870
  private readonly storeService;
4871
+ /**
4872
+ * Clamp a configured series label position to a valid ECharts bar label
4873
+ * position. Returns the fallback unchanged when the config value is absent
4874
+ * or not a recognized position (keeps existing behavior).
4875
+ */
4876
+ private resolveBarLabelPosition;
4736
4877
  private resolveStackBarBorderRadius;
4737
4878
  /**
4738
4879
  * Helper method to convert legend position based on language
@@ -4965,6 +5106,7 @@ declare class ComparisonChartHandler {
4965
5106
  }
4966
5107
 
4967
5108
  declare class SplitterChartHandler {
5109
+ private readonly storeService;
4968
5110
  /**
4969
5111
  * handleSplitterChart - matches functionName from CHART_TYPES
4970
5112
  * Returns data directly in the format:
@@ -5057,6 +5199,18 @@ declare class MapChartHandler {
5057
5199
  * Returns data directly as array of grouped records
5058
5200
  */
5059
5201
  handleLeafletMap(dataResponse: any, config: ItemConfig): any;
5202
+ /**
5203
+ * Reads the Style Studio map controls from the persisted clientConfig exactly
5204
+ * as the schema writes them and returns only the keys that are present.
5205
+ *
5206
+ * Schema write paths (control-schema.registry.ts MAP_SECTION):
5207
+ * - mapRegion -> clientConfig.map
5208
+ * - tileLayer -> clientConfig.configAsType.mapChart.tileLayer
5209
+ * - showClusters -> clientConfig.configAsType.mapChart.showClusters
5210
+ * - minZoom -> clientConfig.configAsType.mapChart.minZoom
5211
+ * - maxZoom -> clientConfig.configAsType.mapChart.maxZoom
5212
+ */
5213
+ private buildMapConfig;
5060
5214
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MapChartHandler, never>;
5061
5215
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MapChartHandler>;
5062
5216
  }
@@ -7893,6 +8047,7 @@ declare class StyleStudioDrawer {
7893
8047
  /** Free-text "find a setting" filter. */
7894
8048
  readonly searchControl: FormControl<string>;
7895
8049
  readonly search: _angular_core.Signal<string>;
8050
+ private readonly activeLang;
7896
8051
  /** Section the rail highlights as active (scroll-spy). */
7897
8052
  readonly activeSection: _angular_core.WritableSignal<string>;
7898
8053
  /**
@@ -7975,6 +8130,8 @@ interface RenderSection {
7975
8130
  * the persisted config (one-way data flow → the live preview reacts).
7976
8131
  */
7977
8132
  declare class StyleSettingsRenderer {
8133
+ private readonly transloco;
8134
+ private readonly activeLang;
7978
8135
  readonly schema: _angular_core.InputSignal<ControlSchema>;
7979
8136
  readonly persisted: _angular_core.InputSignal<_masterteam_dashboard_builder.ItemConfig | null>;
7980
8137
  readonly capability: _angular_core.InputSignal<ChartCapability | null>;
@@ -7990,6 +8147,7 @@ declare class StyleSettingsRenderer {
7990
8147
  readonly isEmpty: _angular_core.Signal<boolean>;
7991
8148
  /** Composite/full-width field types span both grid columns. */
7992
8149
  isComposite(field: ControlField): boolean;
8150
+ message(key: string, fallback: string): string;
7993
8151
  sectionId(section: ControlSection): string;
7994
8152
  onPatch(patch: ControlPatch): void;
7995
8153
  /** Clear every visible field in a section back to its (unset) default. */
@@ -8004,7 +8162,7 @@ declare class StyleSettingsRenderer {
8004
8162
  * `cardStyleConfig.shadows` array, so a reset must clear BOTH or the rendered
8005
8163
  * box-shadow lingers. Shared by resetSection() and resetAll().
8006
8164
  */
8007
- declare function expandResetPatches(path: string): ControlPatch[];
8165
+ declare function expandResetPatches(path: string, mirrorPaths?: string[]): ControlPatch[];
8008
8166
  /**
8009
8167
  * Renders ONE schema `ControlField` as the appropriate `mt-*` control using
8010
8168
  * reactive forms (no ngModel). Scalar types own a `FormControl` synced from the
@@ -8024,11 +8182,15 @@ declare class StyleField {
8024
8182
  readonly jsonControl: FormControl<string>;
8025
8183
  readonly jsonError: _angular_core.WritableSignal<string | null>;
8026
8184
  private readonly destroyRef;
8185
+ private readonly transloco;
8186
+ private readonly activeLang;
8027
8187
  private syncing;
8028
8188
  private syncingJson;
8029
8189
  /** True for types that own their own state (controlled, no FormControl). */
8030
8190
  readonly isComposite: _angular_core.Signal<boolean>;
8031
8191
  readonly currentValue: _angular_core.Signal<unknown>;
8192
+ /** Read the field value from `path`, falling back to the first non-empty mirror. */
8193
+ private readCurrent;
8032
8194
  constructor();
8033
8195
  options(): ControlOption[];
8034
8196
  /** select uses a search box once the list is long enough to need one. */
@@ -8037,6 +8199,7 @@ declare class StyleField {
8037
8199
  get numberMin(): number;
8038
8200
  get numberMax(): number;
8039
8201
  conditionFields(): ControlField[];
8202
+ addLabel(fallback: string): string;
8040
8203
  mapKeys(): ControlOption[];
8041
8204
  readArray(): unknown[];
8042
8205
  readColors(): string[];
@@ -8117,6 +8280,7 @@ declare class ArrayBuilderField {
8117
8280
  readonly valueChange: _angular_core.OutputEmitterRef<unknown[]>;
8118
8281
  readonly rows: _angular_core.WritableSignal<ArrayRow[]>;
8119
8282
  private readonly destroyRef;
8283
+ private readonly transloco;
8120
8284
  /** Subscriptions for the current row set; torn down on every rebuild. */
8121
8285
  private rowSubs;
8122
8286
  private nextId;
@@ -1 +0,0 @@
1
- {"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-DLFdrQGx.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\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 },\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 return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: options?.title || '',\r\n styleClass: sizeClass,\r\n data: {\r\n config,\r\n params: params || {},\r\n title: options?.title,\r\n },\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 [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":"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"}