@masterteam/dashboard-builder 0.0.47 → 0.0.48

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-DysRF9eN.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-78XZqtjp.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.47",
3
+ "version": "0.0.48",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/dashboard-builder",
6
6
  "linkDirectory": true,
@@ -22,8 +22,8 @@
22
22
  "rxjs": "^7.8.2",
23
23
  "tailwindcss": "^4.2.2",
24
24
  "@masterteam/components": "^0.0.210",
25
- "@masterteam/timeline": "^0.0.16",
26
- "@masterteam/icons": "^0.0.17"
25
+ "@masterteam/icons": "^0.0.17",
26
+ "@masterteam/timeline": "^0.0.16"
27
27
  },
28
28
  "dependencies": {
29
29
  "tslib": "^2.8.1",
@@ -1271,6 +1271,11 @@ interface ControlField {
1271
1271
  * A single sub-field with `path: ''` stores a scalar per key.
1272
1272
  */
1273
1273
  valueFields?: ControlField[];
1274
+ /**
1275
+ * For `keyValueMap`: persist a POSITIONAL array aligned to the key order
1276
+ * (e.g. `propsConfigAsIndex`) instead of a `{ key: value }` map.
1277
+ */
1278
+ asArray?: boolean;
1274
1279
  }
1275
1280
  /** A logical group of fields in the popover. */
1276
1281
  interface ControlSection {
@@ -2427,6 +2432,10 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2427
2432
  private newChartWithSize;
2428
2433
  openBreadcrumb(item: DashboardChartItem): void;
2429
2434
  openManageFilter(): void;
2435
+ private resolveManageFilterSelectionContext;
2436
+ private deriveWorkspaceFromSelections;
2437
+ private deriveWorkspaceFromLevelSelector;
2438
+ private firstSelector;
2430
2439
  private applyBulkSelectionFilters;
2431
2440
  private applyBulkSelectionFiltersToItem;
2432
2441
  private applyBulkPropertyTranslations;
@@ -3283,7 +3292,7 @@ declare class CardFilterComponent implements OnInit {
3283
3292
  /** Language code */
3284
3293
  readonly langCode: _angular_core.Signal<string>;
3285
3294
  /** Filter type */
3286
- readonly filterType: _angular_core.Signal<"text" | "select" | "multiselect" | "date" | "multiSelect" | "daterange">;
3295
+ readonly filterType: _angular_core.Signal<"date" | "text" | "select" | "multiselect" | "multiSelect" | "daterange">;
3287
3296
  /** Filter options */
3288
3297
  readonly options: _angular_core.Signal<_masterteam_dashboard_builder.FilterOption[]>;
3289
3298
  /** Placeholder text */
@@ -3359,6 +3368,8 @@ interface FilterSelectionItem {
3359
3368
  interface FilterFieldConfiguration {
3360
3369
  payload?: {
3361
3370
  dashboardId: number;
3371
+ workspaceId?: string | number | null;
3372
+ workspace?: string | null;
3362
3373
  selection: FilterSelectionItem[];
3363
3374
  chartType: string;
3364
3375
  query: {
@@ -4421,7 +4432,7 @@ declare class TopbarCardComponent implements OnInit, OnDestroy {
4421
4432
  readonly iconColor: _angular_core.Signal<any>;
4422
4433
  readonly iconBackgroundColor: _angular_core.Signal<any>;
4423
4434
  readonly borderColor: _angular_core.Signal<any>;
4424
- readonly borderWidth: _angular_core.Signal<1 | 0>;
4435
+ readonly borderWidth: _angular_core.Signal<0 | 1>;
4425
4436
  readonly padding: _angular_core.Signal<number>;
4426
4437
  readonly titleFontSize: _angular_core.Signal<number>;
4427
4438
  readonly subtitleFontSize: _angular_core.Signal<number>;
@@ -5905,6 +5916,10 @@ declare class ManageFilterOnPage implements OnInit {
5905
5916
  private ref;
5906
5917
  /** Input: Initial filters data */
5907
5918
  readonly data: _angular_core.InputSignal<FilterField[]>;
5919
+ /** Workspace metadata scope reused by dropdown-by-selection fields */
5920
+ readonly workspaceId: _angular_core.InputSignal<string | number | null>;
5921
+ /** Template/workspace selector that scopes hierarchical Level selections */
5922
+ readonly chartWorkspace: _angular_core.InputSignal<string | null>;
5908
5923
  /** Input: Available lookups for dropdown */
5909
5924
  readonly lookups: _angular_core.InputSignal<any[]>;
5910
5925
  /** Input: Available level schemas */
@@ -5928,7 +5943,7 @@ declare class ManageFilterOnPage implements OnInit {
5928
5943
  /** Cancel and close the dialog */
5929
5944
  close(): void;
5930
5945
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ManageFilterOnPage, never>;
5931
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ManageFilterOnPage, "mt-manage-filter-on-page", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "levelsSchema": { "alias": "levelsSchema"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5946
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ManageFilterOnPage, "mt-manage-filter-on-page", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "workspaceId": { "alias": "workspaceId"; "required": false; "isSignal": true; }; "chartWorkspace": { "alias": "chartWorkspace"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "levelsSchema": { "alias": "levelsSchema"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5932
5947
  }
5933
5948
 
5934
5949
  interface ModuleProperties$1 {
@@ -5953,6 +5968,10 @@ declare class DynamicFiltersConfig implements ControlValueAccessor {
5953
5968
  readonly levelLogs: _angular_core.InputSignal<any[]>;
5954
5969
  /** Product type to filter available field types */
5955
5970
  readonly productType: _angular_core.InputSignal<string>;
5971
+ /** Workspace metadata scope used by the shared datasource selection editor. */
5972
+ readonly workspaceId: _angular_core.InputSignal<string | number | null>;
5973
+ /** Template/workspace selector used to scope hierarchical Level modules. */
5974
+ readonly chartWorkspace: _angular_core.InputSignal<string | null>;
5956
5975
  /** Emit when level logs need to be loaded for a specific schema level */
5957
5976
  readonly loadLevelLogs: _angular_core.OutputEmitterRef<number>;
5958
5977
  /** Filter fields data */
@@ -6016,6 +6035,8 @@ declare class DynamicFiltersConfig implements ControlValueAccessor {
6016
6035
  hasTypeConfiguration(field: FilterField): boolean;
6017
6036
  getDropdownSelections(field: FilterField): ISelection[];
6018
6037
  getSelectedProperties(field: FilterField): string[];
6038
+ getDropdownWorkspaceId(field: FilterField): string | number | null;
6039
+ getDropdownChartWorkspace(field: FilterField): string | null;
6019
6040
  getModulesPropertiesForField(index: number): ModuleProperties$1[];
6020
6041
  getPropertiesFlatForField(index: number): IProperty[];
6021
6042
  getDropdownSummary(field: FilterField): string;
@@ -6028,11 +6049,14 @@ declare class DynamicFiltersConfig implements ControlValueAccessor {
6028
6049
  private setFieldModulesProperties;
6029
6050
  private extractModuleTypeFromSelector;
6030
6051
  private normalizeSelections;
6052
+ private applyDropdownPayloadContext;
6053
+ private resolveDefaultService;
6054
+ private resolveSelectionService;
6031
6055
  private getSelectionSignature;
6032
6056
  private removeCachedFieldState;
6033
6057
  private resetDropdownCaches;
6034
6058
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicFiltersConfig, never>;
6035
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicFiltersConfig, "mt-dynamic-filters-config", never, { "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "levelsSchema": { "alias": "levelsSchema"; "required": false; "isSignal": true; }; "levelLogs": { "alias": "levelLogs"; "required": false; "isSignal": true; }; "productType": { "alias": "productType"; "required": false; "isSignal": true; }; }, { "loadLevelLogs": "loadLevelLogs"; }, never, never, true, never>;
6059
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicFiltersConfig, "mt-dynamic-filters-config", never, { "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "levelsSchema": { "alias": "levelsSchema"; "required": false; "isSignal": true; }; "levelLogs": { "alias": "levelLogs"; "required": false; "isSignal": true; }; "productType": { "alias": "productType"; "required": false; "isSignal": true; }; "workspaceId": { "alias": "workspaceId"; "required": false; "isSignal": true; }; "chartWorkspace": { "alias": "chartWorkspace"; "required": false; "isSignal": true; }; }, { "loadLevelLogs": "loadLevelLogs"; }, never, never, true, never>;
6036
6060
  }
6037
6061
 
6038
6062
  interface DefaultControlConfig {
@@ -7357,7 +7381,7 @@ declare class DataSourceSettings {
7357
7381
  * Active tab within the selection cycle: Selection (pick modules) · Source
7358
7382
  * Links (joins, only with >1 selection) · Query (fields).
7359
7383
  */
7360
- readonly activeSection: _angular_core.WritableSignal<"selection" | "query" | "sourceLinks">;
7384
+ readonly activeSection: _angular_core.WritableSignal<"selection" | "sourceLinks" | "query">;
7361
7385
  /** Selection mode inside the selection tab (informative authoring). */
7362
7386
  readonly selectionMode: _angular_core.WritableSignal<"advanced" | "context">;
7363
7387
  readonly contextTargetSelector: _angular_core.WritableSignal<string | null>;
@@ -7397,6 +7421,19 @@ declare class DataSourceSettings {
7397
7421
  readonly chartWorkspace: _angular_core.WritableSignal<string | null>;
7398
7422
  /** Inline "change workspace" confirmation visibility. */
7399
7423
  readonly confirmingWorkspaceChange: _angular_core.WritableSignal<boolean>;
7424
+ /**
7425
+ * True when the chart workspace was auto-detected from OLD data (the chart had
7426
+ * selections/workspaceId but no stored `serviceConfig.workspace`). Drives the
7427
+ * "auto-detected — Save to keep it / Clear" notice. Cleared once the user
7428
+ * picks deliberately or clears it.
7429
+ */
7430
+ readonly workspaceAutoDetected: _angular_core.WritableSignal<boolean>;
7431
+ /**
7432
+ * Set once the user explicitly clears an auto-detected workspace, so the
7433
+ * derive effect doesn't immediately re-detect the same one (which would make
7434
+ * Clear a no-op). Reset on a deliberate pick.
7435
+ */
7436
+ private readonly userClearedWorkspace;
7400
7437
  private readonly workspaceServiceName;
7401
7438
  /**
7402
7439
  * The hierarchical "Level" module + its owning service (searches all loaded
@@ -7483,6 +7520,8 @@ declare class DataSourceSettings {
7483
7520
  onSourceLinksChange(links: SourceLink[]): void;
7484
7521
  /** Pick the single chart workspace (Template root). Opens the tabs. */
7485
7522
  onWorkspacePick(selector: string): void;
7523
+ /** Numeric workspace id parsed from a Template selector ("Template:48" -> 48). */
7524
+ private parseWorkspaceId;
7486
7525
  /** Ask to change workspace (shows the inline confirm). */
7487
7526
  requestChangeWorkspace(): void;
7488
7527
  /** Dismiss the change-workspace confirm. */
@@ -7494,6 +7533,19 @@ declare class DataSourceSettings {
7494
7533
  confirmChangeWorkspace(): void;
7495
7534
  /** Load the modules tree into the local signal (cache-first). */
7496
7535
  private loadWorkspaceTree;
7536
+ /**
7537
+ * Best-effort workspace selector for OLD charts that never stored
7538
+ * `serviceConfig.workspace`. Tries, in order: an existing numeric
7539
+ * `workspaceId` (mapped to a known Template option, else synthesized), a
7540
+ * Level selection mapped through the tree, then a workspaceId carried on any
7541
+ * selection. Returns null when nothing can be inferred.
7542
+ */
7543
+ private deriveChartWorkspace;
7544
+ /**
7545
+ * Discard an auto-detected workspace without wiping the (still valid)
7546
+ * selections — re-opens the picker so the user can choose deliberately.
7547
+ */
7548
+ clearAutoDetectedWorkspace(): void;
7497
7549
  /** Reverse-map a Level selector to its Template root (for legacy restore). */
7498
7550
  private deriveWorkspaceFromLevel;
7499
7551
  /** Workspace metadata filter for tree values (roots and children alike). */
@@ -7773,9 +7825,16 @@ declare class ChartViewer {
7773
7825
  readonly chartTypeId: _angular_core.InputSignal<string>;
7774
7826
  /** Loading state for refresh */
7775
7827
  readonly loading: _angular_core.WritableSignal<boolean>;
7828
+ private readonly destroyRef;
7829
+ private loadingTimer;
7830
+ constructor();
7776
7831
  /** Preview only renders when the selected capability has enough config. */
7777
7832
  readonly canPreview: _angular_core.Signal<boolean>;
7778
- /** Refresh the preview */
7833
+ /**
7834
+ * Refresh the preview — flashes the loading spinner. Called by the manual
7835
+ * refresh button AND on every config change in the Style Studio, so edits
7836
+ * get the same "refreshing" feedback. Coalesces rapid calls into one window.
7837
+ */
7779
7838
  refresh(): void;
7780
7839
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartViewer, never>;
7781
7840
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartViewer, "mt-chart-viewer", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "chartTypeId": { "alias": "chartTypeId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -7828,7 +7887,17 @@ declare class StyleStudioDrawer {
7828
7887
  readonly search: _angular_core.Signal<string>;
7829
7888
  /** Section the rail highlights as active (scroll-spy). */
7830
7889
  readonly activeSection: _angular_core.WritableSignal<string>;
7890
+ /**
7891
+ * Isolated preview id so editing here NEVER mutates the real dashboard
7892
+ * chart's store entry. The preview renders from this id; Cancel leaves the
7893
+ * real chart untouched.
7894
+ */
7895
+ readonly previewId: string;
7896
+ /** The live preview viewer — driven to flash its loading on every change. */
7897
+ private readonly previewViewer;
7831
7898
  constructor();
7899
+ /** Re-process + push the working config into the isolated preview store. */
7900
+ private syncPreviewStore;
7832
7901
  readonly itemConfig: _angular_core.Signal<ItemConfig | null>;
7833
7902
  readonly capability: _angular_core.Signal<_masterteam_dashboard_builder.ChartCapability | null>;
7834
7903
  readonly schema: _angular_core.Signal<_masterteam_dashboard_builder.ControlSchema>;
@@ -7842,19 +7911,19 @@ declare class StyleStudioDrawer {
7842
7911
  readonly navSections: _angular_core.Signal<ControlSection[]>;
7843
7912
  /** Rail sections grouped under friendly category headers. */
7844
7913
  readonly navGroups: _angular_core.Signal<NavGroup[]>;
7845
- readonly presets: _angular_core.Signal<readonly StylePreset[]>;
7846
7914
  readonly scopeOptions: _angular_core.Signal<{
7847
7915
  label: string;
7848
7916
  value: string;
7849
7917
  }[]>;
7918
+ /** Working config re-keyed to the isolated preview id (drives ChartViewer). */
7919
+ readonly previewConfig: _angular_core.Signal<ItemConfig | null>;
7850
7920
  /** Chart-type id handed to the live ChartViewer (renders ALL widget types). */
7851
7921
  readonly previewChartTypeId: _angular_core.Signal<string>;
7852
7922
  readonly previewTitle: _angular_core.Signal<string>;
7853
7923
  /**
7854
- * Preview data — the source for the legend-order entries. Prefer the data
7855
- * the chart ACTUALLY rendered from (`DataHandled`, computed in the proper
7856
- * render context); only fall back to re-processing the raw `DataResponse`
7857
- * when no handled data is cached (re-processing here can lose legend names).
7924
+ * Preview data — the source for the legend-order entries. Reads the isolated
7925
+ * preview store, which `syncPreviewStore()` keeps re-processed against the
7926
+ * working config on every edit.
7858
7927
  */
7859
7928
  readonly previewData: _angular_core.Signal<ChartDataHandled | null>;
7860
7929
  /** Legend entries (ordered by the saved override) for the legendOrder control. */
@@ -7869,7 +7938,6 @@ declare class StyleStudioDrawer {
7869
7938
  private extractLegendItems;
7870
7939
  onScopeChange(value: unknown): void;
7871
7940
  onPatch(patch: ControlPatch): void;
7872
- applyPreset(preset: StylePreset): void;
7873
7941
  scrollTo(section: ControlSection): void;
7874
7942
  /** Scroll-spy: highlight the top-most section currently in view. */
7875
7943
  onScroll(): void;
@@ -7877,8 +7945,6 @@ declare class StyleStudioDrawer {
7877
7945
  resetAll(): void;
7878
7946
  apply(): void;
7879
7947
  close(): void;
7880
- /** Map a preset's friendly fields to the persisted paths the schema uses. */
7881
- private presetPatches;
7882
7948
  private t;
7883
7949
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StyleStudioDrawer, never>;
7884
7950
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StyleStudioDrawer, "mt-style-studio-drawer", never, {}, {}, never, never, true, never>;
@@ -7967,6 +8033,8 @@ declare class StyleField {
7967
8033
  readArray(): unknown[];
7968
8034
  readColors(): string[];
7969
8035
  readMap(): Record<string, unknown>;
8036
+ /** keyValueMap accepts either a map or a positional array (asArray mode). */
8037
+ readMapOrArray(): Record<string, unknown> | unknown[];
7970
8038
  readJson(): string;
7971
8039
  emitValue(value: unknown): void;
7972
8040
  onJsonInput(raw: string): void;
@@ -8066,17 +8134,26 @@ interface MapRow {
8066
8134
  group: FormGroup;
8067
8135
  }
8068
8136
  /**
8069
- * Per-key value editor — replaces raw-JSON maps such as per-property
8070
- * translations (`{ key: { en, ar } }`) or per-property colors
8071
- * (`{ key: { color } }`). Keys come from `keys` (e.g. the chart's selected
8072
- * properties); each key renders the scalar `valueFields` as `mt-*` controls.
8073
- * Controlled: `value` (Record) in, `valueChange` (Record) out.
8137
+ * Per-key value editor for the chart's selected properties. Two storage modes:
8138
+ *
8139
+ * - default (map): `{ [propKey]: { ...valueFields } }` — e.g. per-property
8140
+ * translations / colors (`overrideSelectedPropertiesLabels`).
8141
+ * - `asArray`: a POSITIONAL array aligned to the key order — e.g.
8142
+ * `propsConfigAsIndex` where the runtime reads `array[index]` for the
8143
+ * property at that index. One row per key is always emitted to keep the
8144
+ * array aligned.
8145
+ *
8146
+ * Keys come from `keys` (the chart's selected properties); each renders the
8147
+ * scalar `valueFields` as `mt-*` controls (text / number / color / select /
8148
+ * boolean). Controlled: `value` in, `valueChange` out.
8074
8149
  */
8075
8150
  declare class KeyValueMapField {
8076
- readonly value: _angular_core.InputSignal<Record<string, unknown> | null>;
8151
+ readonly value: _angular_core.InputSignal<unknown[] | Record<string, unknown> | null>;
8077
8152
  readonly keys: _angular_core.InputSignal<ControlOption[]>;
8078
8153
  readonly valueFields: _angular_core.InputSignal<ControlField[]>;
8079
- readonly valueChange: _angular_core.OutputEmitterRef<Record<string, unknown>>;
8154
+ /** When true, store/read a positional array aligned to `keys` order. */
8155
+ readonly asArray: _angular_core.InputSignal<boolean>;
8156
+ readonly valueChange: _angular_core.OutputEmitterRef<unknown[] | Record<string, unknown>>;
8080
8157
  readonly rows: _angular_core.WritableSignal<MapRow[]>;
8081
8158
  private readonly destroyRef;
8082
8159
  /** Subscriptions for the current row set; torn down on every rebuild. */
@@ -8085,11 +8162,12 @@ declare class KeyValueMapField {
8085
8162
  constructor();
8086
8163
  options(field: ControlField): ControlOption[];
8087
8164
  control(row: MapRow, key: string): FormControl;
8165
+ private existingFor;
8166
+ private clean;
8088
8167
  private emit;
8089
- /** True when the existing rows already represent (keys, map, fields). */
8090
8168
  private matchesCurrent;
8091
8169
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KeyValueMapField, never>;
8092
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KeyValueMapField, "mt-key-value-map-field", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "keys": { "alias": "keys"; "required": false; "isSignal": true; }; "valueFields": { "alias": "valueFields"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
8170
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KeyValueMapField, "mt-key-value-map-field", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "keys": { "alias": "keys"; "required": false; "isSignal": true; }; "valueFields": { "alias": "valueFields"; "required": false; "isSignal": true; }; "asArray": { "alias": "asArray"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
8093
8171
  }
8094
8172
 
8095
8173
  /**