@masterteam/dashboard-builder 0.0.122 → 0.0.124

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,3 +1,3 @@
1
- export { b1 as ActionsSettings, b9 as ArrayBuilderField, a6 as BarChartHandler, aW as BarControlUi, bn as CHART_CAPABILITIES, aZ as CHART_TYPES, bC as CONFIG_DOMAINS, c4 as CUSTOM_COLOR_OPTION, c as CardContentComponent, B as CardFilterComponent, H as CardInfoComponent, I as ChartCardComponent, a2 as ChartDataService, bd as ChartFilterDrawer, aS as ChartSettingsDrawer, b2 as ChartViewer, b8 as ColorListField, aj as ComparisonChartHandler, co as DASHBOARD_BUILDER_ASSIST, a5 as DASHBOARD_ITEM_VISIBILITY, W as DEFAULT_MAP_REGION_KEY, l as DashboardBuilder, aK as DashboardBuilderService, e as DashboardItem, D as DashboardItemStoreService, aE as DashboardList, aL as DashboardStoreService, m as DashboardViewer, b0 as DataSourceSettings, bj as DatasourcePanelComponent, aU as DefaultControlUi, aT as DisplaySettings, G as DynamicFiltersComponent, aR as DynamicFiltersConfig, J as EChartComponent, P as EntitiesPreviewCardComponent, E as EntityInfoComponent, Q as EntityPreviewCardComponent, bi as FilterBuilderComponent, bl as FilterByGroupPipe, bh as FilterChipsBarComponent, ad as GaugeChartHandler, a$ as GeneralSettings, bm as GetChartActionsPipe, bg as GuidedConfigDialogComponent, aI as HTTPMethod, R as HeaderCardComponent, cl as ITEM_GUIDANCE_REGISTRY, bc as ItemCardMenuComponent, bf as ItemConfigPopoverComponent, be as ItemContextToolbarComponent, cn as ItemGuidanceService, ba as KeyValueMapField, T as LastHistoryLevelCardComponent, bb as LegendOrderField, al as LevelCardHandler, ah as LineChartHandler, U as ListStatisticCardComponent, V as MAP_REGIONS, aF as MODULE_CLASSIFICATION_LOG, aG as MODULE_CLASSIFICATION_LOG_NAME, aP as ManageBreadcrumb, aQ as ManageFilterOnPage, aY as ManageItem, a_ as ManageItemService, aO as ManagePages, am as MapChartHandler, Y as MapViewComponent, af as OverviewCardHandler, bF as POPOVER_TABS, bG as POPOVER_TAB_SPECS, ap as PhaseGateStepperHandler, a9 as PieChartHandler, aV as PieControlUi, P as PropertiesCardComponent, an as RingGaugeChartHandler, ao as SPlusChartHandler, bX as STYLE_PRESETS, bk as SchemaControlRendererComponent, b7 as SegmentedField, Z as SkeletonCardComponent, ai as SnapshotHandler, ak as SplitterChartHandler, aa as StackBarChartHandler, aX as StackBarControlUi, S as StaticFiltersComponent, $ as StatisticCardComponent, b6 as StyleField, b4 as StyleSettingsRenderer, b3 as StyleStudioDrawer, ae as TableViewHandler, ag as TimelineHandler, a1 as TopbarCardComponent, cp as WIDGET_PALETTE_TILE_HOST, x as addCommasToNumber, bT as applyBehaviorToPersisted, aD as applyBuiltInConditions, c7 as applyControlPatchToPersisted, c8 as applyControlPatchesToPersisted, bU as applyFilterChipsToPersisted, bR as applyLabelLegendFormatToPersisted, bP as applyLayoutToPersisted, bN as applyStyleToPersisted, bI as applyTitleToPersisted, ab as axisFormatters, bS as behaviorToUi, cg as bindingKey, bW as buildAssembly, cf as buildDisplayFieldPredicate, k as cloneDeep, aJ as copyName, av as createAxisFormatter, aw as createTooltipFormatter, cq as dashboardLevelOptions, bJ as datasourceToUi, M as dateDisplayRawValue, c2 as deepMerge, cm as describeGuidance, bD as domainsForCapability, d as dynamicReorder, t as dynamicTextReplace, b5 as expandResetPatches, bK as fieldsToUi, bL as filtersToUi, bE as findDomain, bZ as findPreset, cr as firstFreePosition, cd as flattenSchema, ax as formatAxisLabel, aq as formatCurrency, au as formatDate, c3 as formatForEditor, at as formatNumber, as as formatPercentage, f as formatValue, ay as formatWordsUnderBar, az as formatXAxis, u as generalConfiguration, ch as getBinding, bo as getCapabilityById, A as getColorFromConditions, c9 as getControlSchema, ar as getCurrencySuffix, cc as getFallbackControlSchema, v as getLocalizedTitle, q as getNestedData, ac as groupDatesByYearAndMonth, c0 as groupIssuesByDomain, aB as handleFilterForCard, aC as handleFilterForSnapshot, aA as handleFiltersForCustom, b$ as hasBlockingIssues, aH as isLogClassification, aM as isManagePagesDeleteResult, aN as isManagePagesDuplicateResult, z as isMobilePlatform, bQ as labelLegendFormatToUi, bO as layoutToUi, ci as listBindings, cj as listBindingsForChart, ca as listControlSchemaIds, cb as listControlSchemas, a4 as loadImmediately, a0 as loadTableCard, O as mergePropertyAppearance, bw as moduleIdFromSelector, bt as normalizeAggregateFunction, bB as normalizeBeforeRequest, bA as normalizeBeforeSave, br as normalizeChartTypeForRequest, N as normalizeDashboardCardEntityValue, bs as normalizeFilterOperation, bu as normalizeFilters, bz as normalizeOnLoad, a3 as observeNearViewport, c1 as parseAdvancedJson, bV as persistedToUi, bY as presetsForCapability, ck as readBoundValue, c5 as readByPath, bp as resolveCapability, ce as resolveDisplayFields, L as resolveEntityCheckbox, K as resolveEntityUserPhoto, X as resolveMapRegion, a8 as resolvePieInnerRadius, a7 as resolvePieShape, _ as resolveStatisticIconPlacement, bv as selectorFromLegacy, c6 as setByPath, w as sortChartData, y as sortDataTableView, bM as styleToUi, p as switchAllKeysSmall, s as switchAllKeysToLower, bH as titleToUi, bq as toBackendChartType, bx as toBackendSourceLink, by as toFormSourceLink, b_ as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-r4HI2aa1.mjs';
1
+ export { b1 as ActionsSettings, b9 as ArrayBuilderField, a6 as BarChartHandler, aW as BarControlUi, bn as CHART_CAPABILITIES, aZ as CHART_TYPES, bC as CONFIG_DOMAINS, c4 as CUSTOM_COLOR_OPTION, c as CardContentComponent, B as CardFilterComponent, H as CardInfoComponent, I as ChartCardComponent, a2 as ChartDataService, bd as ChartFilterDrawer, aS as ChartSettingsDrawer, b2 as ChartViewer, b8 as ColorListField, aj as ComparisonChartHandler, co as DASHBOARD_BUILDER_ASSIST, a5 as DASHBOARD_ITEM_VISIBILITY, W as DEFAULT_MAP_REGION_KEY, l as DashboardBuilder, aK as DashboardBuilderService, e as DashboardItem, D as DashboardItemStoreService, aE as DashboardList, aL as DashboardStoreService, m as DashboardViewer, b0 as DataSourceSettings, bj as DatasourcePanelComponent, aU as DefaultControlUi, aT as DisplaySettings, G as DynamicFiltersComponent, aR as DynamicFiltersConfig, J as EChartComponent, P as EntitiesPreviewCardComponent, E as EntityInfoComponent, Q as EntityPreviewCardComponent, bi as FilterBuilderComponent, bl as FilterByGroupPipe, bh as FilterChipsBarComponent, ad as GaugeChartHandler, a$ as GeneralSettings, bm as GetChartActionsPipe, bg as GuidedConfigDialogComponent, aI as HTTPMethod, R as HeaderCardComponent, cl as ITEM_GUIDANCE_REGISTRY, bc as ItemCardMenuComponent, bf as ItemConfigPopoverComponent, be as ItemContextToolbarComponent, cn as ItemGuidanceService, ba as KeyValueMapField, T as LastHistoryLevelCardComponent, bb as LegendOrderField, al as LevelCardHandler, ah as LineChartHandler, U as ListStatisticCardComponent, V as MAP_REGIONS, aF as MODULE_CLASSIFICATION_LOG, aG as MODULE_CLASSIFICATION_LOG_NAME, aP as ManageBreadcrumb, aQ as ManageFilterOnPage, aY as ManageItem, a_ as ManageItemService, aO as ManagePages, am as MapChartHandler, Y as MapViewComponent, af as OverviewCardHandler, bF as POPOVER_TABS, bG as POPOVER_TAB_SPECS, ap as PhaseGateStepperHandler, a9 as PieChartHandler, aV as PieControlUi, P as PropertiesCardComponent, an as RingGaugeChartHandler, ao as SPlusChartHandler, bX as STYLE_PRESETS, bk as SchemaControlRendererComponent, b7 as SegmentedField, Z as SkeletonCardComponent, ai as SnapshotHandler, ak as SplitterChartHandler, aa as StackBarChartHandler, aX as StackBarControlUi, S as StaticFiltersComponent, $ as StatisticCardComponent, b6 as StyleField, b4 as StyleSettingsRenderer, b3 as StyleStudioDrawer, ae as TableViewHandler, ag as TimelineHandler, a1 as TopbarCardComponent, cp as WIDGET_PALETTE_TILE_HOST, x as addCommasToNumber, bT as applyBehaviorToPersisted, aD as applyBuiltInConditions, c7 as applyControlPatchToPersisted, c8 as applyControlPatchesToPersisted, bU as applyFilterChipsToPersisted, bR as applyLabelLegendFormatToPersisted, bP as applyLayoutToPersisted, bN as applyStyleToPersisted, bI as applyTitleToPersisted, ab as axisFormatters, bS as behaviorToUi, cg as bindingKey, bW as buildAssembly, cf as buildDisplayFieldPredicate, k as cloneDeep, aJ as copyName, av as createAxisFormatter, aw as createTooltipFormatter, cq as dashboardLevelOptions, bJ as datasourceToUi, M as dateDisplayRawValue, c2 as deepMerge, cm as describeGuidance, bD as domainsForCapability, d as dynamicReorder, t as dynamicTextReplace, b5 as expandResetPatches, bK as fieldsToUi, bL as filtersToUi, bE as findDomain, bZ as findPreset, cr as firstFreePosition, cd as flattenSchema, ax as formatAxisLabel, aq as formatCurrency, au as formatDate, c3 as formatForEditor, at as formatNumber, as as formatPercentage, f as formatValue, ay as formatWordsUnderBar, az as formatXAxis, u as generalConfiguration, ch as getBinding, bo as getCapabilityById, A as getColorFromConditions, c9 as getControlSchema, ar as getCurrencySuffix, cc as getFallbackControlSchema, v as getLocalizedTitle, q as getNestedData, ac as groupDatesByYearAndMonth, c0 as groupIssuesByDomain, aB as handleFilterForCard, aC as handleFilterForSnapshot, aA as handleFiltersForCustom, b$ as hasBlockingIssues, aH as isLogClassification, aM as isManagePagesDeleteResult, aN as isManagePagesDuplicateResult, z as isMobilePlatform, bQ as labelLegendFormatToUi, bO as layoutToUi, ci as listBindings, cj as listBindingsForChart, ca as listControlSchemaIds, cb as listControlSchemas, a4 as loadImmediately, a0 as loadTableCard, O as mergePropertyAppearance, bw as moduleIdFromSelector, bt as normalizeAggregateFunction, bB as normalizeBeforeRequest, bA as normalizeBeforeSave, br as normalizeChartTypeForRequest, N as normalizeDashboardCardEntityValue, bs as normalizeFilterOperation, bu as normalizeFilters, bz as normalizeOnLoad, a3 as observeNearViewport, c1 as parseAdvancedJson, bV as persistedToUi, bY as presetsForCapability, ck as readBoundValue, c5 as readByPath, bp as resolveCapability, ce as resolveDisplayFields, L as resolveEntityCheckbox, K as resolveEntityUserPhoto, X as resolveMapRegion, a8 as resolvePieInnerRadius, a7 as resolvePieShape, _ as resolveStatisticIconPlacement, bv as selectorFromLegacy, c6 as setByPath, w as sortChartData, y as sortDataTableView, bM as styleToUi, p as switchAllKeysSmall, s as switchAllKeysToLower, bH as titleToUi, bq as toBackendChartType, bx as toBackendSourceLink, by as toFormSourceLink, b_ as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-87vk_c3c.mjs';
2
2
  export * from '@masterteam/dashboard-builder/access';
3
3
  //# 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.122",
3
+ "version": "0.0.124",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/dashboard-builder",
6
6
  "linkDirectory": true,
@@ -23,12 +23,12 @@
23
23
  "quill": "^2.0.3",
24
24
  "rxjs": "^7.8.2",
25
25
  "tailwindcss": "^4.2.2",
26
- "@masterteam/components": "^0.0.346",
26
+ "@masterteam/components": "^0.0.347",
27
27
  "@masterteam/data-table": "^0.0.10",
28
- "@masterteam/timeline": "^0.0.24",
29
28
  "@masterteam/icons": "^0.0.17",
29
+ "@masterteam/data-grid": "^0.0.6",
30
30
  "@masterteam/faris": "^0.2.0",
31
- "@masterteam/data-grid": "^0.0.6"
31
+ "@masterteam/timeline": "^0.0.24"
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.8.1",
@@ -574,6 +574,39 @@ interface BulkLinkChartResponse {
574
574
  configration: string;
575
575
  order: number;
576
576
  }
577
+ /**
578
+ * A whole dashboard in one piece, as a draft holds it
579
+ * (`api/reports/builder/{id}/draft`). Same fields the builder saves today:
580
+ * `dashboardConfig` as in `PUT reports/{id}`, `chartLinks[].configration` as in
581
+ * `POST reports/charts/link`. A chart with the empty GUID gets a new id.
582
+ */
583
+ interface DashboardDraftContent {
584
+ name: LocalizedName;
585
+ icon?: string | null;
586
+ url?: string | null;
587
+ isActive: boolean;
588
+ showInMenu: boolean;
589
+ dashboardConfig: ReportDashboardConfig;
590
+ chartLinks: Array<{
591
+ chartComponentId: string;
592
+ configration: ChartLinkConfiguration | string;
593
+ order: number;
594
+ }>;
595
+ }
596
+ /** The one draft of a dashboard, saved apart from what readers see. */
597
+ interface DashboardDraft {
598
+ reportId: number;
599
+ /** Send back as `expectedRevision` on the next save / apply. */
600
+ revision: number;
601
+ baseVersionNumber: number;
602
+ /** Someone changed the live dashboard after this draft started. */
603
+ liveChangedSinceDraft: boolean;
604
+ updatedBy?: string | null;
605
+ updatedByName?: string | null;
606
+ createdAt: string;
607
+ updatedAt: string;
608
+ content: DashboardDraftContent;
609
+ }
577
610
  /**
578
611
  * Request payload for unlinking a chart from a report
579
612
  */
@@ -2668,8 +2701,17 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2668
2701
  readonly previewDocument: _angular_core.WritableSignal<DashboardBuilderData | null>;
2669
2702
  readonly isReadonly: _angular_core.Signal<boolean>;
2670
2703
  readonly pendingWidgetType: _angular_core.WritableSignal<ChartTypeConfig | null>;
2671
- /** Whether the most recent action can be reverted (drives the Undo button). */
2704
+ /** Whether an unsaved action can be reverted (drives the Undo button). */
2672
2705
  readonly canUndo: _angular_core.WritableSignal<boolean>;
2706
+ /** Whether an undone action can be re-applied (drives the Redo button). */
2707
+ readonly canRedo: _angular_core.WritableSignal<boolean>;
2708
+ /**
2709
+ * The document differs from the last load or explicit Save. Drives every
2710
+ * "leave with unsaved changes" guard. Not `canUndo`: after undoing some of
2711
+ * several edits there is still unsaved work, and after undoing all of them
2712
+ * there is none.
2713
+ */
2714
+ readonly hasUnsavedChanges: _angular_core.WritableSignal<boolean>;
2673
2715
  /** Reference to widget palette drawer */
2674
2716
  private widgetPaletteRef;
2675
2717
  /** Reference to chart settings drawer */
@@ -2702,7 +2744,40 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2702
2744
  */
2703
2745
  private readonly lastItemGeometry;
2704
2746
  private readonly undoStack;
2747
+ private readonly redoStack;
2705
2748
  private readonly HISTORY_LIMIT;
2749
+ /** Signature of the document as last loaded or explicitly saved. */
2750
+ private savedSignature;
2751
+ /** The draft routes answered for this dashboard, so edits go to a draft. */
2752
+ readonly draftMode: _angular_core.WritableSignal<boolean>;
2753
+ readonly draftStatus: _angular_core.WritableSignal<"error" | "idle" | "saving" | "saved" | "conflict">;
2754
+ /** Who saved the draft and when, and whether live changed since it began. */
2755
+ readonly draftInfo: _angular_core.WritableSignal<{
2756
+ updatedAt: string;
2757
+ updatedByName?: string | null;
2758
+ liveChangedSinceDraft: boolean;
2759
+ } | null>;
2760
+ /**
2761
+ * Tooltip of the toolbar's "Discard changes" button: that changes save
2762
+ * automatically but readers don't see them yet, who saved them and when, and
2763
+ * what discarding does. The UI says "changes", not "draft" (user decision
2764
+ * 2026-11-23); the code keeps the backend's "draft" name.
2765
+ */
2766
+ readonly draftTooltip: _angular_core.Signal<string>;
2767
+ /** A change has not reached the draft yet (pending, in flight or failed). */
2768
+ readonly draftUnsaved: _angular_core.WritableSignal<boolean>;
2769
+ /** The live report as loaded, before a draft was laid over it. */
2770
+ private livePage;
2771
+ /** Bumped on every page load so a late draft response is ignored. */
2772
+ private draftEpoch;
2773
+ private draftRevision;
2774
+ /** Signature of the document the last successful draft save sent. */
2775
+ private lastDraftSignature;
2776
+ private draftSaveTimer;
2777
+ private draftSaveInFlight;
2778
+ private draftSaveQueued;
2779
+ private draftSaveWaiters;
2780
+ private readonly DRAFT_SAVE_DELAY;
2706
2781
  /** Set by "Save and leave": leave once that explicit save commits. */
2707
2782
  private leaveAfterSave;
2708
2783
  private committedSnapshot;
@@ -2718,6 +2793,12 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2718
2793
  private removeEventListeners;
2719
2794
  private loadCurrentPageIfNeeded;
2720
2795
  loadPage(id: string | number): void;
2796
+ /**
2797
+ * Builder items from saved chart links (a report's `chartLinks` or a draft's
2798
+ * `content.chartLinks`). Dialog links (chartTypeId 'dialog') are NOT canvas
2799
+ * charts — they back chart "Open dialog" actions — so they are split out.
2800
+ */
2801
+ private itemsFromLinks;
2721
2802
  /**
2722
2803
  * Persist the dashboard.
2723
2804
  *
@@ -2731,6 +2812,25 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2731
2812
  saveDash(options?: {
2732
2813
  silent?: boolean;
2733
2814
  }): void;
2815
+ /**
2816
+ * One saved link per chart and per dialog, in canvas order. Used by the
2817
+ * legacy link-by-link save and by the draft content.
2818
+ *
2819
+ * Every config goes through `normalizeBeforeSave` from the registry so
2820
+ * backend payload is always canonical:
2821
+ * - filter operation `Equal` → `Equals`
2822
+ * - legacy `fuctionName` typo dropped (functionName remains)
2823
+ * - source links mapped to BE DTO field names
2824
+ * - runtime-only `__substituted` and root `repeaterDashboardId` stripped
2825
+ * - selection.selector backfilled from legacy moduleType:moduleId
2826
+ */
2827
+ private buildLinkRequests;
2828
+ /**
2829
+ * Write the ids the backend gave saved links back onto the charts and
2830
+ * dialogs, matched by the local `dashboardId` kept in each configration, so
2831
+ * the next save updates those links instead of creating new ones.
2832
+ */
2833
+ private patchLinkIds;
2734
2834
  private savePage;
2735
2835
  /**
2736
2836
  * The builder's own save message. The link requests are silent: their
@@ -2765,6 +2865,8 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2765
2865
  * the empty default the drawer carries — stays authoritative.
2766
2866
  */
2767
2867
  private applyPageSettings;
2868
+ /** The document differs from the live dashboard (draft or not). */
2869
+ private differsFromLiveNow;
2768
2870
  deleteReport(): void;
2769
2871
  onItemResize(item: GridsterItem, itemComponent: any): void;
2770
2872
  /**
@@ -2801,10 +2903,17 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
2801
2903
  onDrop(event: DragEvent, item: GridsterItem): void;
2802
2904
  /**
2803
2905
  * Edits — a Style Apply included — live in the document until the top Save
2804
- * writes them. `canUndo` is true exactly while there are such edits (an
2805
- * explicit save clears it), so leaving then asks first (#1883).
2906
+ * writes them, so leaving with any of them asks first (#1883). The check is
2907
+ * "differs from the last save" (`hasUnsavedChanges`), never `canUndo`: an
2908
+ * undo of one of several edits leaves unsaved work behind.
2806
2909
  */
2807
2910
  onBeforeUnload(event: BeforeUnloadEvent): void;
2911
+ /**
2912
+ * Work that leaving would lose, counting an edit still inside the history
2913
+ * debounce. In draft mode the draft keeps the work, so only a change that
2914
+ * has not reached the draft yet (pending, in flight or failed) counts.
2915
+ */
2916
+ private unsavedChangesNow;
2808
2917
  onBackClick(): void;
2809
2918
  /**
2810
2919
  * "Save and leave": run the normal explicit save and leave only once it has
@@ -3008,12 +3117,16 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
3008
3117
  */
3009
3118
  private scheduleHistoryCapture;
3010
3119
  private captureHistory;
3120
+ private pushUndo;
3121
+ /** Mirror the stacks and the saved baseline into the toolbar signals. */
3122
+ private syncHistoryState;
3011
3123
  /** Commit a still-pending capture immediately (used right before an undo). */
3012
3124
  private flushPendingHistory;
3013
3125
  /** Drop all recorded history — called whenever a whole new document loads. */
3014
3126
  private resetHistory;
3015
3127
  /**
3016
- * Revert the most recent UNSAVED action (issue #1192).
3128
+ * Revert the most recent UNSAVED action (issue #1192), one step per call, up
3129
+ * to HISTORY_LIMIT steps back.
3017
3130
  *
3018
3131
  * Undo is a pre-save operation: it restores the previous local state and
3019
3132
  * never writes to the backend. Pressing Save is the commit point — a
@@ -3026,6 +3139,56 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
3026
3139
  * which is a bug in its own right rather than part of the undone state.
3027
3140
  */
3028
3141
  undo(): void;
3142
+ /**
3143
+ * Re-apply the most recently undone action. A new edit after an undo clears
3144
+ * what can be redone (captureHistory). Same ghost-link rule as undo: an item
3145
+ * the redo drops is unlinked; an item it brings back is linked again by the
3146
+ * next save.
3147
+ */
3148
+ redo(): void;
3149
+ private restoreHistoryStep;
3150
+ /** The dashboard's draft, or "drafts unavailable" when the routes fail. */
3151
+ private readDraft;
3152
+ /** Called on every page load: decide the mode and lay the draft over live. */
3153
+ private enterDraftMode;
3154
+ private toDraftInfo;
3155
+ /**
3156
+ * Show the draft instead of live. "Saved" (the unsaved-changes baseline)
3157
+ * stays the live document, so the draft reads as not yet saved to readers.
3158
+ */
3159
+ private applyDraftContent;
3160
+ /** The whole dashboard as the draft routes take it. */
3161
+ private buildDraftContent;
3162
+ private scheduleDraftSave;
3163
+ private clearDraftTimer;
3164
+ /**
3165
+ * Write the current document to the draft now. Back at the live document,
3166
+ * the draft is removed instead (nothing would be left to apply). A conflict
3167
+ * stops auto-save until the author resolves it from the banner.
3168
+ */
3169
+ private saveDraftNow;
3170
+ private finishDraftSave;
3171
+ /** Completes with whether every pending change reached the draft. */
3172
+ private flushDraft;
3173
+ private resolveDraftWaiters;
3174
+ private isConflict;
3175
+ /**
3176
+ * Save in draft mode: flush the draft, then apply it to the live dashboard.
3177
+ * Readers see it at once (when published); the backend records a version
3178
+ * and removes the draft. Visibility (Publish / Active) is untouched.
3179
+ */
3180
+ private saveDraftToLive;
3181
+ /** Banner action: drop the draft and show the live dashboard again. */
3182
+ discardDraft(): void;
3183
+ /** Banner action after a 409: take the other version, or overwrite it. */
3184
+ resolveDraftConflict(choice: 'theirs' | 'mine'): void;
3185
+ /** Banner action after a failed draft save. */
3186
+ retryDraftSave(): void;
3187
+ /**
3188
+ * Drawer visibility edits in draft mode: Publish / Active are never applied
3189
+ * from a draft, so they go to the live report straight away.
3190
+ */
3191
+ private syncLiveVisibility;
3029
3192
  private applyHistorySnapshot;
3030
3193
  /**
3031
3194
  * Remove backend links for items the revert dropped.
@@ -3040,7 +3203,12 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
3040
3203
  * writing back `id` / `chartComponentId` is not seen as a user change.
3041
3204
  */
3042
3205
  private historySignature;
3043
- /** Shallow copy of an item without the `id` / `chartComponentId` link keys. */
3206
+ /**
3207
+ * Shallow copy of an item without the `id` / `chartComponentId` link keys and
3208
+ * the runtime-only flags (`loading`, `quickManage`), which are never saved.
3209
+ * `reRenderItem` sets `loading` on every restored chart, so leaving it in
3210
+ * made a fully undone document look different from the saved one.
3211
+ */
3044
3212
  private stripLinkIds;
3045
3213
  constructor();
3046
3214
  private applyDashboardData;
@@ -3890,7 +4058,7 @@ declare class CardFilterComponent implements OnInit {
3890
4058
  /** Language code */
3891
4059
  readonly langCode: _angular_core.Signal<string>;
3892
4060
  /** Filter type */
3893
- readonly filterType: _angular_core.Signal<"date" | "text" | "select" | "multiselect" | "multiSelect" | "daterange">;
4061
+ readonly filterType: _angular_core.Signal<"select" | "text" | "date" | "multiselect" | "multiSelect" | "daterange">;
3894
4062
  /** Filter options */
3895
4063
  readonly options: _angular_core.Signal<_masterteam_dashboard_builder.FilterOption[]>;
3896
4064
  /** Placeholder text */
@@ -6705,6 +6873,11 @@ declare class DashboardBuilderService {
6705
6873
  private http;
6706
6874
  /** Control-panel hosts read drafts through the builder routes (#1838). */
6707
6875
  private readonly reportsRead;
6876
+ /**
6877
+ * Drafts are builder-only routes (CONTROL_PANEL): only control-panel hosts
6878
+ * (`provideDashboardBuilderAccess()`) try them.
6879
+ */
6880
+ readonly draftsSupported: boolean;
6708
6881
  /** Subject for processing items */
6709
6882
  private processOnItem;
6710
6883
  readonly processOnItem$: Observable<{
@@ -6858,6 +7031,13 @@ declare class DashboardBuilderService {
6858
7031
  * Delete a report
6859
7032
  */
6860
7033
  deleteReport(id: string | number): Observable<ApiResponse<void>>;
7034
+ private draftUrl;
7035
+ /** The draft, or `data: null` when the dashboard has none. */
7036
+ getDraft(reportId: string | number): Observable<ApiResponse<DashboardDraft | null>>;
7037
+ saveDraft(reportId: string | number, content: DashboardDraftContent, expectedRevision: number | null): Observable<ApiResponse<DashboardDraft>>;
7038
+ /** Make the draft what readers see. Visibility (Publish / Active) is kept. */
7039
+ applyDraft(reportId: string | number, expectedRevision: number | null): Observable<ApiResponse<unknown>>;
7040
+ discardDraft(reportId: string | number): Observable<ApiResponse<boolean>>;
6861
7041
  /**
6862
7042
  * Copy a saved dashboard: a new report with the same page settings and
6863
7043
  * every chart and dialog link.
@@ -9948,4 +10128,4 @@ declare function firstFreePosition(items: readonly {
9948
10128
  };
9949
10129
 
9950
10130
  export { ActionsSettings, ArrayBuilderField, BarChartHandler, BarControlUi, CHART_CAPABILITIES, CHART_TYPES, CONFIG_DOMAINS, CUSTOM_COLOR_OPTION, CardContentComponent, CardFilterComponent, CardInfoComponent, ChartCardComponent, ChartDataService, ChartFilterDrawer, ChartSettingsDrawer, ChartViewer, ColorListField, ComparisonChartHandler, DASHBOARD_BUILDER_ASSIST, DASHBOARD_ITEM_VISIBILITY, DEFAULT_MAP_REGION_KEY, DashboardBuilder, DashboardBuilderService, DashboardItem, DashboardItemStoreService, DashboardList, DashboardStoreService, DashboardViewer, DataSourceSettings, DatasourcePanelComponent, DefaultControlUi, DisplaySettings, DynamicFiltersComponent, DynamicFiltersConfig, EChartComponent, PropertiesCardComponent as EntitiesPreviewCardComponent, EntityInfoComponent, EntityPreviewCardComponent, FilterBuilderComponent, FilterByGroupPipe, FilterChipsBarComponent, GaugeChartHandler, GeneralSettings, GetChartActionsPipe, GuidedConfigDialogComponent, HTTPMethod, HeaderCardComponent, ITEM_GUIDANCE_REGISTRY, ItemCardMenuComponent, ItemConfigPopoverComponent, ItemContextToolbarComponent, ItemGuidanceService, KeyValueMapField, LastHistoryLevelCardComponent, LegendOrderField, LevelCardHandler, LineChartHandler, ListStatisticCardComponent, MAP_REGIONS, MODULE_CLASSIFICATION_LOG, MODULE_CLASSIFICATION_LOG_NAME, ManageBreadcrumb, ManageFilterOnPage, ManageItem, ManageItemService, ManagePages, MapChartHandler, MapViewComponent, OverviewCardHandler, POPOVER_TABS, POPOVER_TAB_SPECS, PhaseGateStepperHandler, PieChartHandler, PieControlUi, PropertiesCardComponent, RingGaugeChartHandler, SPlusChartHandler, STYLE_PRESETS, SchemaControlRendererComponent, SegmentedField, SkeletonCardComponent, SnapshotHandler, SplitterChartHandler, StackBarChartHandler, StackBarControlUi, StaticFiltersComponent, StatisticCardComponent, StyleField, StyleSettingsRenderer, StyleStudioDrawer, TableCardComponent, TableViewHandler, TimelineHandler, TopbarCardComponent, WIDGET_PALETTE_TILE_HOST, addCommasToNumber, applyBehaviorToPersisted, applyBuiltInConditions, applyControlPatchToPersisted, applyControlPatchesToPersisted, applyFilterChipsToPersisted, applyLabelLegendFormatToPersisted, applyLayoutToPersisted, applyStyleToPersisted, applyTitleToPersisted, axisFormatters, behaviorToUi, bindingKey, buildAssembly, buildDisplayFieldPredicate, cloneDeep, copyName, createAxisFormatter, createTooltipFormatter, dashboardLevelOptions, datasourceToUi, dateDisplayRawValue, deepMerge, describeGuidance, domainsForCapability, dynamicReorder, dynamicTextReplace, expandResetPatches, fieldsToUi, filtersToUi, findDomain, findPreset, firstFreePosition, flattenSchema, formatAxisLabel, formatCurrency, formatDate, formatForEditor, formatNumber, formatPercentage, formatValue, formatWordsUnderBar, formatXAxis, generalConfiguration, getBinding, getCapabilityById, getColorFromConditions, getControlSchema, getCurrencySuffix, getFallbackControlSchema, getLocalizedTitle, getNestedData, groupDatesByYearAndMonth, groupIssuesByDomain, handleFilterForCard, handleFilterForSnapshot, handleFiltersForCustom, hasBlockingIssues, isLogClassification, isManagePagesDeleteResult, isManagePagesDuplicateResult, isMobilePlatform, labelLegendFormatToUi, layoutToUi, listBindings, listBindingsForChart, listControlSchemaIds, listControlSchemas, loadImmediately, loadTableCard, mergePropertyAppearance, moduleIdFromSelector, normalizeAggregateFunction, normalizeBeforeRequest, normalizeBeforeSave, normalizeChartTypeForRequest, normalizeDashboardCardEntityValue, normalizeFilterOperation, normalizeFilters, normalizeOnLoad, observeNearViewport, parseAdvancedJson, persistedToUi, presetsForCapability, readBoundValue, readByPath, resolveCapability, resolveDisplayFields, resolveEntityCheckbox, resolveEntityUserPhoto, resolveMapRegion, resolvePieInnerRadius, resolvePieShape, resolveStatisticIconPlacement, selectorFromLegacy, setByPath, sortChartData, sortDataTableView, styleToUi, switchAllKeysSmall, switchAllKeysToLower, titleToUi, toBackendChartType, toBackendSourceLink, toFormSourceLink, validate };
9951
- export type { ActionConfig, ApiResponse, AxisLabelWrapConfig, AxisLabelWrapMode, AxisLabelWrapOptions, BackendChartType, BarChartData, BehaviorUi, BindingScope, BreadcrumbItem, BulkLinkChartRequest, BulkLinkChartResponse, BulkPropertiesRequest, BulkPropertiesResponse, BulkPropertiesResponseItem, BulkPropertiesResponseItemDto, BulkPropertyRequestItem, CardBorderStyleConfig, CardInfoConfig$1 as CardInfoConfig, CardStyleConfig$1 as CardStyleConfig, CatalogPropertyDto, ChartActionEvent, ChartActionsContext, ChartCapability, ChartCapabilityLegacyAliases, RequestType$1 as ChartCapabilityRequestType, ChartData, ChartDataHandled, ChartDomainSupport, ChartLabel, ChartLinkConfiguration, ChartTypeConfig, ClientConfig, ComponentType, ConfigDomainKey, ConfigDomainSpec, ConfigLookupShape, ConfigViewAssembly, ControlBinding, ControlBindingIndex, ControlBindingValueAdapter, ControlDomain, ControlField, ControlFieldType, ControlOption, ControlPatch, ControlSchema, ControlSection, ControlSectionScope, ControlVisiblePredicate, CustomApi, DashboardBuilderAssist, DashboardBuilderData, DashboardChartDraft, DashboardChartItem, DashboardChartTemplate, DashboardDialogItem, DashboardDocumentLoadOptions, DashboardFilterLevelLog, DashboardFilterLevelSchema, DashboardFilterLocalizedText, DashboardFilterLookup, DashboardFilterLookupItem, DashboardFilterStatus, DashboardFilterStatusDefinition, DashboardFilterStatusItem, DashboardInformativeContext, DashboardItemMark, DashboardItemStore, DashboardItemVisibility, DashboardLevelLogsResolver, DashboardLevelModule, DashboardLevelOption, DashboardListEvent, DashboardPage, DashboardSaveRequestOptions, DashboardTargetOption, DashboardTargetPathStep, DashboardTargetTemplateFilter, DashboardTargetTemplateSelection, DashboardTargetTemplateSourceLink, DashboardTargetsContextInfo, DashboardTargetsResponse, DatasourceUi, DisplayConfig, DisplayField, DisplayFieldQuery, DisplaySchema, EChartSeriesItem, ExcelSheet, FieldAssignment, FieldsUi, FilterChip, FilterConfig, FilterOperator, FilterOption, FilterScope, FilterSource, FiltersUi, FlattenedControl, FormatXAxisConfig$1 as FormatXAxisConfig, GroupedModuleOption, GroupedParentOption, GuidanceInput, GuidedConfigDialogData, GuidedConfigDialogResult, GuidedStep, HandleAction, HeaderCardConfig$1 as HeaderCardConfig, IModule, IModuleType, IProperty, IPropertyWithGroup, ISelection, ItemCardMenuAction, ItemConfig, ItemConfigPopoverData, ItemConfigPopoverResult, ItemContextAction, ItemGuidanceAction, ItemGuidanceDescriptor, ItemGuidanceSeverity, ItemGuidanceState, LabelLegendFormatUi, LayoutUi, LegendOrderItem, LevelCardData, LevelCardProperty, LinkChartRequest, LocalizedLegendLabelChange, LocalizedName, ManageFilterOnPageResult, ManagePagesDeleteResult, ManagePagesDuplicateResult, MapRegion, MapViewConfig, MapViewGroup, MapViewPoint, ModuleItem, ModuleSelectOption, ModuleType, ModuleValue, ModuleValueExtra, ModulesTreeRequest, ModulesTreeResponse, ParentSelectOption, ParseResult, PersistedItemConfig, PhaseGateStepperData, PhaseGateStepperStep, PieChartData, PieShape, PopoverTab, PopoverTabSpec, Product, PropertiesResponse, PropertyItem, PropertyItemOption, PropertyItemsResponse, QueryEditorKind, QueryField, QuerySchema, QuickManageType, RendererKey, Report, ReportChartLink, ReportDashboardConfig, ReportExcelConfig, ReportType, ReportUrl, RequestType, RuntimeItemConfig, SelectionFilter, ServiceConfig, ServiceItem, SnapshotLevelDataOption, SourceLink, StaticFilterConfig, StaticFilterItem, StatisticCardData, StatisticIconPlacement, StyleConfig, StylePreset, StylePresetKey, StyleUi, TableColumn$1 as TableColumn, TableViewData, TimelineData, TimelineItem, TitleUi, UiItemConfig, UnlinkChartRequest, ValidateOptions, ValidationIssue, ValidationSeverity, WidgetPaletteTileHost };
10131
+ export type { ActionConfig, ApiResponse, AxisLabelWrapConfig, AxisLabelWrapMode, AxisLabelWrapOptions, BackendChartType, BarChartData, BehaviorUi, BindingScope, BreadcrumbItem, BulkLinkChartRequest, BulkLinkChartResponse, BulkPropertiesRequest, BulkPropertiesResponse, BulkPropertiesResponseItem, BulkPropertiesResponseItemDto, BulkPropertyRequestItem, CardBorderStyleConfig, CardInfoConfig$1 as CardInfoConfig, CardStyleConfig$1 as CardStyleConfig, CatalogPropertyDto, ChartActionEvent, ChartActionsContext, ChartCapability, ChartCapabilityLegacyAliases, RequestType$1 as ChartCapabilityRequestType, ChartData, ChartDataHandled, ChartDomainSupport, ChartLabel, ChartLinkConfiguration, ChartTypeConfig, ClientConfig, ComponentType, ConfigDomainKey, ConfigDomainSpec, ConfigLookupShape, ConfigViewAssembly, ControlBinding, ControlBindingIndex, ControlBindingValueAdapter, ControlDomain, ControlField, ControlFieldType, ControlOption, ControlPatch, ControlSchema, ControlSection, ControlSectionScope, ControlVisiblePredicate, CustomApi, DashboardBuilderAssist, DashboardBuilderData, DashboardChartDraft, DashboardChartItem, DashboardChartTemplate, DashboardDialogItem, DashboardDocumentLoadOptions, DashboardDraft, DashboardDraftContent, DashboardFilterLevelLog, DashboardFilterLevelSchema, DashboardFilterLocalizedText, DashboardFilterLookup, DashboardFilterLookupItem, DashboardFilterStatus, DashboardFilterStatusDefinition, DashboardFilterStatusItem, DashboardInformativeContext, DashboardItemMark, DashboardItemStore, DashboardItemVisibility, DashboardLevelLogsResolver, DashboardLevelModule, DashboardLevelOption, DashboardListEvent, DashboardPage, DashboardSaveRequestOptions, DashboardTargetOption, DashboardTargetPathStep, DashboardTargetTemplateFilter, DashboardTargetTemplateSelection, DashboardTargetTemplateSourceLink, DashboardTargetsContextInfo, DashboardTargetsResponse, DatasourceUi, DisplayConfig, DisplayField, DisplayFieldQuery, DisplaySchema, EChartSeriesItem, ExcelSheet, FieldAssignment, FieldsUi, FilterChip, FilterConfig, FilterOperator, FilterOption, FilterScope, FilterSource, FiltersUi, FlattenedControl, FormatXAxisConfig$1 as FormatXAxisConfig, GroupedModuleOption, GroupedParentOption, GuidanceInput, GuidedConfigDialogData, GuidedConfigDialogResult, GuidedStep, HandleAction, HeaderCardConfig$1 as HeaderCardConfig, IModule, IModuleType, IProperty, IPropertyWithGroup, ISelection, ItemCardMenuAction, ItemConfig, ItemConfigPopoverData, ItemConfigPopoverResult, ItemContextAction, ItemGuidanceAction, ItemGuidanceDescriptor, ItemGuidanceSeverity, ItemGuidanceState, LabelLegendFormatUi, LayoutUi, LegendOrderItem, LevelCardData, LevelCardProperty, LinkChartRequest, LocalizedLegendLabelChange, LocalizedName, ManageFilterOnPageResult, ManagePagesDeleteResult, ManagePagesDuplicateResult, MapRegion, MapViewConfig, MapViewGroup, MapViewPoint, ModuleItem, ModuleSelectOption, ModuleType, ModuleValue, ModuleValueExtra, ModulesTreeRequest, ModulesTreeResponse, ParentSelectOption, ParseResult, PersistedItemConfig, PhaseGateStepperData, PhaseGateStepperStep, PieChartData, PieShape, PopoverTab, PopoverTabSpec, Product, PropertiesResponse, PropertyItem, PropertyItemOption, PropertyItemsResponse, QueryEditorKind, QueryField, QuerySchema, QuickManageType, RendererKey, Report, ReportChartLink, ReportDashboardConfig, ReportExcelConfig, ReportType, ReportUrl, RequestType, RuntimeItemConfig, SelectionFilter, ServiceConfig, ServiceItem, SnapshotLevelDataOption, SourceLink, StaticFilterConfig, StaticFilterItem, StatisticCardData, StatisticIconPlacement, StyleConfig, StylePreset, StylePresetKey, StyleUi, TableColumn$1 as TableColumn, TableViewData, TimelineData, TimelineItem, TitleUi, UiItemConfig, UnlinkChartRequest, ValidateOptions, ValidationIssue, ValidationSeverity, WidgetPaletteTileHost };