@gooddata/sdk-ui-dashboard 11.44.0-alpha.0 → 11.44.0-alpha.2

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.
Files changed (166) hide show
  1. package/NOTICE +75 -75
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/index.d.ts +1 -1
  5. package/esm/index.d.ts.map +1 -1
  6. package/esm/index.js +1 -1
  7. package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
  8. package/esm/kdaDialog/dialog/KdaDialog.js +2 -1
  9. package/esm/kdaDialog/dialog/KdaDialogActionButtons.d.ts +2 -1
  10. package/esm/kdaDialog/dialog/KdaDialogActionButtons.d.ts.map +1 -1
  11. package/esm/kdaDialog/dialog/KdaDialogActionButtons.js +9 -6
  12. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts +4 -2
  13. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts.map +1 -1
  14. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.js +4 -4
  15. package/esm/kdaDialog/dialog/hooks/useKdaDialogAccessibility.d.ts +1 -0
  16. package/esm/kdaDialog/dialog/hooks/useKdaDialogAccessibility.d.ts.map +1 -1
  17. package/esm/kdaDialog/dialog/hooks/useKdaDialogAccessibility.js +6 -4
  18. package/esm/model/commandHandlers/dashboard/common/parameterHydration.js +2 -2
  19. package/esm/model/commands/executionResults.d.ts +18 -0
  20. package/esm/model/commands/executionResults.d.ts.map +1 -1
  21. package/esm/model/commands/executionResults.js +22 -0
  22. package/esm/model/react/useWidgetExecutionsHandler.d.ts.map +1 -1
  23. package/esm/model/react/useWidgetExecutionsHandler.js +18 -3
  24. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +58 -6
  25. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
  26. package/esm/model/store/tabs/parameters/parametersHelpers.js +114 -22
  27. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +16 -1
  28. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
  29. package/esm/model/store/tabs/parameters/parametersSelectors.js +51 -19
  30. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts +27 -0
  31. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -0
  32. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +107 -0
  33. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -1
  34. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +16 -55
  35. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  36. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +7 -1
  37. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +15 -0
  38. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts +8 -0
  39. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map +1 -0
  40. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +102 -0
  41. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.d.ts +2 -0
  42. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.d.ts.map +1 -0
  43. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +156 -0
  44. package/esm/presentation/automations/connectors/hooks/useCommandAsPromise.d.ts +26 -0
  45. package/esm/presentation/automations/connectors/hooks/useCommandAsPromise.d.ts.map +1 -0
  46. package/esm/presentation/automations/connectors/hooks/useCommandAsPromise.js +47 -0
  47. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +2 -0
  48. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  49. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +54 -0
  50. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -0
  51. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +11 -0
  52. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
  53. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +11 -37
  54. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +6 -5
  55. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
  56. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +7 -23
  57. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts.map +1 -1
  58. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.js +2 -7
  59. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.d.ts.map +1 -1
  60. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js +37 -37
  61. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.d.ts.map +1 -1
  62. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.js +3 -4
  63. package/esm/presentation/automations/scheduledEmail/types.d.ts +5 -3
  64. package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
  65. package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +2 -0
  66. package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts.map +1 -1
  67. package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.js +2 -2
  68. package/esm/presentation/dashboard/components/ToastMessages.d.ts.map +1 -1
  69. package/esm/presentation/dashboard/components/ToastMessages.js +3 -1
  70. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewsList.d.ts.map +1 -1
  71. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewsList.js +3 -2
  72. package/esm/presentation/filterBar/parameterFilter/useParameterToastMessages.d.ts +12 -0
  73. package/esm/presentation/filterBar/parameterFilter/useParameterToastMessages.d.ts.map +1 -0
  74. package/esm/presentation/filterBar/parameterFilter/useParameterToastMessages.js +51 -0
  75. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +4 -0
  76. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  77. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +4 -0
  78. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +4 -0
  79. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  80. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +4 -0
  81. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +4 -0
  82. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  83. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +4 -0
  84. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +12 -0
  85. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  86. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +12 -0
  87. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +4 -0
  88. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  89. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +4 -0
  90. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +4 -0
  91. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  92. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +4 -0
  93. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +4 -0
  94. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  95. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +4 -0
  96. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +4 -0
  97. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  98. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +4 -0
  99. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +4 -0
  100. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  101. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +4 -0
  102. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +4 -0
  103. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  104. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +4 -0
  105. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +4 -0
  106. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  107. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +4 -0
  108. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +4 -0
  109. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  110. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +4 -0
  111. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +4 -0
  112. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  113. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +4 -0
  114. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +4 -0
  115. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  116. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +4 -0
  117. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +4 -0
  118. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  119. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +4 -0
  120. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +4 -0
  121. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  122. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +4 -0
  123. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +4 -0
  124. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  125. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +4 -0
  126. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +4 -0
  127. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  128. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +4 -0
  129. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +4 -0
  130. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  131. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +4 -0
  132. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +4 -0
  133. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  134. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +4 -0
  135. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +4 -0
  136. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  137. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +4 -0
  138. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +4 -0
  139. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  140. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +4 -0
  141. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +4 -0
  142. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  143. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +4 -0
  144. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +4 -0
  145. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  146. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +4 -0
  147. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +4 -0
  148. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  149. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +4 -0
  150. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +4 -0
  151. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  152. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +4 -0
  153. package/esm/sdk-ui-dashboard.d.ts +23 -1
  154. package/package.json +20 -20
  155. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useCreateScheduledEmail.d.ts +0 -11
  156. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useCreateScheduledEmail.d.ts.map +0 -1
  157. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useCreateScheduledEmail.js +0 -27
  158. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useUpdateScheduledEmail.d.ts +0 -11
  159. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useUpdateScheduledEmail.d.ts.map +0 -1
  160. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useUpdateScheduledEmail.js +0 -27
  161. package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts +0 -3
  162. package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts.map +0 -1
  163. package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.js +0 -5
  164. package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.d.ts +0 -2
  165. package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.d.ts.map +0 -1
  166. package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js +0 -45
@@ -1,4 +1,4 @@
1
- import { type IDashboardExportParameter, type IDashboardParameter, type IDashboardTab, type IInsight, type IInsightDefinition, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef } from "@gooddata/sdk-model";
1
+ import { type IDashboardExportParameter, type IDashboardParameter, type IDashboardTab, type IInsight, type IInsightDefinition, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef, type ObjRef } from "@gooddata/sdk-model";
2
2
  import { type ObjRefMap } from "../../../../_staging/metadata/objRefMap.js";
3
3
  import { type IInsightWidgetTabContext } from "../layout/layoutSelectors.js";
4
4
  import { type ITabState } from "../tabsState.js";
@@ -16,14 +16,17 @@ export declare const EMPTY_EXPORT_PARAMETERS_BY_TAB: Record<string, IDashboardEx
16
16
  export declare function collectReferencedParameterRefs(insight: IInsightDefinition, measureParameters: Record<string, IdentifierRef[]>): IdentifierRef[];
17
17
  /**
18
18
  * Effective execution parameters, limited to `referencedRefs`. Precedence per ref: the dashboard
19
- * `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace default).
19
+ * `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace
20
+ * default). An out-of-range value from either source is replaced by the workspace default (recovery),
21
+ * so the backend never receives a bad value.
20
22
  *
21
23
  * @internal
22
24
  */
23
- export declare function resolveEffectiveParameterValuesForRefs(entries: IDashboardParameterEntry[], referencedRefs: IdentifierRef[], insightParameterValues: IInsightParameterValue[]): IInsightParameterValue[];
25
+ export declare function resolveEffectiveParameterValuesForRefs(entries: IDashboardParameterEntry[], referencedRefs: IdentifierRef[], insightParameterValues: IInsightParameterValue[], workspaceParameterByRef: Map<string, IParameterMetadataObject>): IInsightParameterValue[];
24
26
  interface IParameterResolutionContext {
25
27
  entries: IDashboardParameterEntry[];
26
28
  measureParameters: Record<string, IdentifierRef[]>;
29
+ workspaceParameterByRef: Map<string, IParameterMetadataObject>;
27
30
  }
28
31
  /**
29
32
  * Effective execution parameters for `insight` given a widget's parameter context: resolves the refs
@@ -41,19 +44,64 @@ export declare function resolveEffectiveParameterValuesForInsight(context: IPara
41
44
  */
42
45
  export declare function collectChangedParameterValues(entries: IDashboardParameterEntry[], workspaceParameters: IParameterMetadataObject[]): IInsightParameterValue[];
43
46
  /**
44
- * The value hydration seeds into `runtimeOverride`: the persisted dashboard `value`, else the
47
+ * The value hydration seeds into `runtimeOverride`: the dashboard parameter's `value`, else the
45
48
  * workspace number default, else `undefined`. Single source of truth for the hydrated baseline so
46
49
  * override detection here and in `hydrateParameterEntries` cannot drift apart.
47
50
  *
48
51
  * @internal
49
52
  */
50
53
  export declare function computeHydratedRuntimeOverride(parameter: IDashboardParameter, workspaceParameter: IParameterMetadataObject | undefined): number | undefined;
54
+ /**
55
+ * Why a dashboard parameter no longer matches its workspace catalog entry:
56
+ * - `removed`: the workspace has no parameter for this ref.
57
+ * - `incompatible`: the workspace parameter is a different type (e.g. STRING, not NUMBER).
58
+ * - `reset`: same type, but the value is outside the workspace constraints.
59
+ *
60
+ * @internal
61
+ */
62
+ export type ParameterReconciliation = "reset" | "removed" | "incompatible";
63
+ /**
64
+ * A mismatched dashboard parameter surfaced to the load-time toast: the ref, a display name, and
65
+ * the kind of mismatch.
66
+ *
67
+ * @internal
68
+ */
69
+ export interface IParameterReconciliationEntry {
70
+ ref: ObjRef;
71
+ name: string;
72
+ kind: ParameterReconciliation;
73
+ }
74
+ /**
75
+ * Classifies one dashboard parameter against its workspace catalog entry — the single source of
76
+ * truth for the reconciliation kinds.
77
+ *
78
+ * Callers must only classify once the catalog is loaded: before load every `workspaceParameter` is
79
+ * `undefined`, which would classify as `removed` and flag every parameter. The reconciliation
80
+ * selectors own that gate (`isCatalogLoaded`).
81
+ *
82
+ * @internal
83
+ */
84
+ export declare function classifyParameterReconciliation(dashboardParameter: IDashboardParameter, workspaceParameter: IParameterMetadataObject | undefined): ParameterReconciliation | undefined;
85
+ /**
86
+ * Collects the entries that no longer reconcile, deduped by ref — the first failing entry per ref
87
+ * wins, so a ref in range on one tab but out of range on another is still surfaced. Callers pass
88
+ * entries from a known-loaded catalog.
89
+ *
90
+ * @internal
91
+ */
92
+ export declare function collectParameterReconciliations(entries: IDashboardParameterEntry[], workspaceParameters: IParameterMetadataObject[]): IParameterReconciliationEntry[];
93
+ /**
94
+ * Display title for a dashboard parameter: `parameter.label` → workspace title → `ref.identifier`.
95
+ *
96
+ * @internal
97
+ */
98
+ export declare function resolveParameterTitle(parameter: IDashboardParameter, workspaceParameter: IParameterMetadataObject | undefined): string;
51
99
  /**
52
100
  * Indexes the workspace parameter catalog by ref string for O(1) lookup.
53
101
  *
54
102
  * @internal
55
103
  */
56
- export declare function workspaceParametersByRef(workspaceParameters: IParameterMetadataObject[]): Map<string, IParameterMetadataObject>;
104
+ export declare function buildWorkspaceParametersByRef(workspaceParameters: IParameterMetadataObject[]): Map<string, IParameterMetadataObject>;
57
105
  /**
58
106
  * Folds an entry's ephemeral `runtimeOverride` into the persisted parameter shape's `value`.
59
107
  *
@@ -67,6 +115,10 @@ export declare function applyRuntimeOverride(entry: IDashboardParameterEntry): I
67
115
  * by the backend; sending a row in those cases would override the backend's resolution with a stale
68
116
  * FE snapshot (matches the live-render path in `selectEffectiveParameterValuesForWidget`).
69
117
  *
118
+ * An out-of-range value is replaced by the workspace default (recovery): unlike the live AFM, an
119
+ * omitted export override falls back to the *persisted* (bad) value, so the default must be sent
120
+ * explicitly to override it.
121
+ *
70
122
  * Title precedence (when a row is emitted): `parameter.label` → workspace title → `ref.identifier`.
71
123
  *
72
124
  * @internal
@@ -117,7 +169,7 @@ export declare function computeParameterResetTargets(entries: IDashboardParamete
117
169
  export declare function collectExportOverrides(tabRefSelections: ReadonlyArray<{
118
170
  tab: ITabState;
119
171
  allowedRefs?: Set<string>;
120
- }>, workspaceByRef: Map<string, IParameterMetadataObject>): Record<string, IDashboardExportParameter[]>;
172
+ }>, workspaceParameterByRef: Map<string, IParameterMetadataObject>): Record<string, IDashboardExportParameter[]>;
121
173
  /**
122
174
  * Builds per-tab ref selections for a widget-scope export: each widget's owning tab is restricted
123
175
  * to refs referenced by the widget's insight metrics. Multiple widgets on the same tab union their
@@ -1 +1 @@
1
- {"version":3,"file":"parametersHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAMrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAI9B;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAM,CAAC;AAE9F;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC1C,OAAO,EAAE,kBAAkB,EAC3B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,GACnD,aAAa,EAAE,CAmBjB;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAClD,OAAO,EAAE,wBAAwB,EAAE,EACnC,cAAc,EAAE,aAAa,EAAE,EAC/B,sBAAsB,EAAE,sBAAsB,EAAE,GACjD,sBAAsB,EAAE,CAwB1B;AAED,UAAU,2BAA2B;IACjC,OAAO,EAAE,wBAAwB,EAAE,CAAC;IACpC,iBAAiB,EAAE,MAAM,CAAC,M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,EAAE,OAAO,GACtB,MAAM,GAAG,SAAS,CAapB;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CACxC,OAAO,EAAE,wBAAwB,EAAE,EACnC,mBAAmB,EAAE,wBAAwB,EAAE,EAC/C,YAAY,EAAE,OAAO,GACtB;IAAE,GAAG,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAAE,CAiBpF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAClC,gBAAgB,EAAE,aAAa,CAAC;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,EAC9E,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,GACtD,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAa7C;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC5C,cAAc,EAAE,aAAa,CAAC,wBAAwB,CAAC,EACvD,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC7B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,GACnD;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,EAAE,CAuBhD"}
1
+ {"version":3,"file":"parametersHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EAOd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CAuBhD"}
@@ -1,5 +1,5 @@
1
1
  // (C) 2026 GoodData Corporation
2
- import { DashboardParameterModeValues, insightMeasures, insightParameters, isMeasureDefinition, isNumberParameterDefinition, objRefToString, } from "@gooddata/sdk-model";
2
+ import { DashboardParameterModeValues, insightMeasures, insightParameters, isMeasureDefinition, isNumberParameterDefinition, isValidNumberParameterValue, objRefToString, } from "@gooddata/sdk-model";
3
3
  import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
4
4
  const EMPTY_PARAMETERS = [];
5
5
  const EMPTY_PARAMETER_VALUES = [];
@@ -35,23 +35,29 @@ export function collectReferencedParameterRefs(insight, measureParameters) {
35
35
  }
36
36
  /**
37
37
  * Effective execution parameters, limited to `referencedRefs`. Precedence per ref: the dashboard
38
- * `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace default).
38
+ * `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace
39
+ * default). An out-of-range value from either source is replaced by the workspace default (recovery),
40
+ * so the backend never receives a bad value.
39
41
  *
40
42
  * @internal
41
43
  */
42
- export function resolveEffectiveParameterValuesForRefs(entries, referencedRefs, insightParameterValues) {
44
+ export function resolveEffectiveParameterValuesForRefs(entries, referencedRefs, insightParameterValues, workspaceParameterByRef) {
43
45
  const referencedKeys = new Set(referencedRefs.map(objRefToString));
44
46
  const result = [];
45
47
  const seen = new Set();
46
48
  for (const entry of entries) {
47
- if (entry.runtimeOverride === undefined) {
49
+ const { runtimeOverride } = entry;
50
+ if (runtimeOverride === undefined) {
48
51
  continue;
49
52
  }
50
53
  const refKey = objRefToString(entry.parameter.ref);
51
54
  if (!referencedKeys.has(refKey)) {
52
55
  continue;
53
56
  }
54
- result.push({ ref: entry.parameter.ref, value: entry.runtimeOverride });
57
+ result.push({
58
+ ref: entry.parameter.ref,
59
+ value: recoverParameterExecutionValue(runtimeOverride, workspaceParameterByRef.get(refKey)),
60
+ });
55
61
  seen.add(refKey);
56
62
  }
57
63
  for (const insightParameterValue of insightParameterValues) {
@@ -59,7 +65,10 @@ export function resolveEffectiveParameterValuesForRefs(entries, referencedRefs,
59
65
  if (!referencedKeys.has(refKey) || seen.has(refKey)) {
60
66
  continue;
61
67
  }
62
- result.push(insightParameterValue);
68
+ result.push({
69
+ ref: insightParameterValue.ref,
70
+ value: recoverParameterExecutionValue(insightParameterValue.value, workspaceParameterByRef.get(refKey)),
71
+ });
63
72
  seen.add(refKey);
64
73
  }
65
74
  return result.length === 0 ? EMPTY_PARAMETER_VALUES : result;
@@ -75,7 +84,7 @@ export function resolveEffectiveParameterValuesForInsight(context, insight) {
75
84
  return EMPTY_PARAMETER_VALUES;
76
85
  }
77
86
  const referencedRefs = collectReferencedParameterRefs(insight, context.measureParameters);
78
- return resolveEffectiveParameterValuesForRefs(context.entries, referencedRefs, insightParameters(insight));
87
+ return resolveEffectiveParameterValuesForRefs(context.entries, referencedRefs, insightParameters(insight), context.workspaceParameterByRef);
79
88
  }
80
89
  /**
81
90
  * Returns the entries whose `runtimeOverride` deviates from the hydrated baseline
@@ -85,14 +94,14 @@ export function resolveEffectiveParameterValuesForInsight(context, insight) {
85
94
  * @internal
86
95
  */
87
96
  export function collectChangedParameterValues(entries, workspaceParameters) {
88
- const workspaceByRef = workspaceParametersByRef(workspaceParameters);
97
+ const workspaceParameterByRef = buildWorkspaceParametersByRef(workspaceParameters);
89
98
  const result = [];
90
99
  for (const entry of entries) {
91
100
  const { runtimeOverride } = entry;
92
101
  if (runtimeOverride === undefined) {
93
102
  continue;
94
103
  }
95
- const workspaceParameter = workspaceByRef.get(objRefToString(entry.parameter.ref));
104
+ const workspaceParameter = workspaceParameterByRef.get(objRefToString(entry.parameter.ref));
96
105
  if (runtimeOverride === computeHydratedRuntimeOverride(entry.parameter, workspaceParameter)) {
97
106
  continue;
98
107
  }
@@ -101,7 +110,7 @@ export function collectChangedParameterValues(entries, workspaceParameters) {
101
110
  return result;
102
111
  }
103
112
  /**
104
- * The value hydration seeds into `runtimeOverride`: the persisted dashboard `value`, else the
113
+ * The value hydration seeds into `runtimeOverride`: the dashboard parameter's `value`, else the
105
114
  * workspace number default, else `undefined`. Single source of truth for the hydrated baseline so
106
115
  * override detection here and in `hydrateParameterEntries` cannot drift apart.
107
116
  *
@@ -115,12 +124,91 @@ export function computeHydratedRuntimeOverride(parameter, workspaceParameter) {
115
124
  ? workspaceParameter.definition.defaultValue
116
125
  : undefined;
117
126
  }
127
+ /**
128
+ * The value to execute for a runtime override: an out-of-range NUMBER value is replaced by the
129
+ * workspace default so the dashboard renders the default instead of failing (recovery), while the
130
+ * chip keeps showing the user's saved value. In-range values, and values with no NUMBER definition to
131
+ * validate against (removed / incompatible — meant to surface as the standard widget error), pass
132
+ * through unchanged.
133
+ *
134
+ * @internal
135
+ */
136
+ function recoverParameterExecutionValue(runtimeOverride, workspaceParameter) {
137
+ if (workspaceParameter && isNumberParameterDefinition(workspaceParameter.definition)) {
138
+ const { defaultValue, constraints } = workspaceParameter.definition;
139
+ if (!isValidNumberParameterValue(runtimeOverride, constraints)) {
140
+ return defaultValue;
141
+ }
142
+ }
143
+ return runtimeOverride;
144
+ }
145
+ /**
146
+ * Classifies one dashboard parameter against its workspace catalog entry — the single source of
147
+ * truth for the reconciliation kinds.
148
+ *
149
+ * Callers must only classify once the catalog is loaded: before load every `workspaceParameter` is
150
+ * `undefined`, which would classify as `removed` and flag every parameter. The reconciliation
151
+ * selectors own that gate (`isCatalogLoaded`).
152
+ *
153
+ * @internal
154
+ */
155
+ export function classifyParameterReconciliation(dashboardParameter, workspaceParameter) {
156
+ if (!workspaceParameter) {
157
+ return "removed";
158
+ }
159
+ if (!isNumberParameterDefinition(workspaceParameter.definition)) {
160
+ return "incompatible";
161
+ }
162
+ if (dashboardParameter.value !== undefined &&
163
+ !isValidNumberParameterValue(dashboardParameter.value, workspaceParameter.definition.constraints)) {
164
+ return "reset";
165
+ }
166
+ return undefined;
167
+ }
168
+ /**
169
+ * Collects the entries that no longer reconcile, deduped by ref — the first failing entry per ref
170
+ * wins, so a ref in range on one tab but out of range on another is still surfaced. Callers pass
171
+ * entries from a known-loaded catalog.
172
+ *
173
+ * @internal
174
+ */
175
+ export function collectParameterReconciliations(entries, workspaceParameters) {
176
+ const workspaceParameterByRef = buildWorkspaceParametersByRef(workspaceParameters);
177
+ const result = [];
178
+ const seen = new Set();
179
+ for (const entry of entries) {
180
+ const refKey = objRefToString(entry.parameter.ref);
181
+ if (seen.has(refKey)) {
182
+ continue;
183
+ }
184
+ const workspaceParameter = workspaceParameterByRef.get(refKey);
185
+ const kind = classifyParameterReconciliation(entry.parameter, workspaceParameter);
186
+ if (kind === undefined) {
187
+ continue;
188
+ }
189
+ seen.add(refKey);
190
+ result.push({
191
+ ref: entry.parameter.ref,
192
+ name: resolveParameterTitle(entry.parameter, workspaceParameter),
193
+ kind,
194
+ });
195
+ }
196
+ return result;
197
+ }
198
+ /**
199
+ * Display title for a dashboard parameter: `parameter.label` → workspace title → `ref.identifier`.
200
+ *
201
+ * @internal
202
+ */
203
+ export function resolveParameterTitle(parameter, workspaceParameter) {
204
+ return parameter.label || workspaceParameter?.title || parameter.ref.identifier;
205
+ }
118
206
  /**
119
207
  * Indexes the workspace parameter catalog by ref string for O(1) lookup.
120
208
  *
121
209
  * @internal
122
210
  */
123
- export function workspaceParametersByRef(workspaceParameters) {
211
+ export function buildWorkspaceParametersByRef(workspaceParameters) {
124
212
  return new Map(workspaceParameters.map((parameter) => [objRefToString(parameter.ref), parameter]));
125
213
  }
126
214
  /**
@@ -141,19 +229,23 @@ export function applyRuntimeOverride(entry) {
141
229
  * by the backend; sending a row in those cases would override the backend's resolution with a stale
142
230
  * FE snapshot (matches the live-render path in `selectEffectiveParameterValuesForWidget`).
143
231
  *
232
+ * An out-of-range value is replaced by the workspace default (recovery): unlike the live AFM, an
233
+ * omitted export override falls back to the *persisted* (bad) value, so the default must be sent
234
+ * explicitly to override it.
235
+ *
144
236
  * Title precedence (when a row is emitted): `parameter.label` → workspace title → `ref.identifier`.
145
237
  *
146
238
  * @internal
147
239
  */
148
240
  export function formatDashboardParameter(entry, workspaceParameter) {
149
- if (entry.runtimeOverride === undefined) {
241
+ const { runtimeOverride } = entry;
242
+ if (runtimeOverride === undefined) {
150
243
  return undefined;
151
244
  }
152
- const ref = entry.parameter.ref;
153
245
  return {
154
- id: ref.identifier,
155
- value: String(entry.runtimeOverride),
156
- title: entry.parameter.label || workspaceParameter?.title || ref.identifier,
246
+ id: entry.parameter.ref.identifier,
247
+ value: String(recoverParameterExecutionValue(runtimeOverride, workspaceParameter)),
248
+ title: resolveParameterTitle(entry.parameter, workspaceParameter),
157
249
  };
158
250
  }
159
251
  /**
@@ -227,7 +319,7 @@ export function computeParameterResetValue(entry, workspaceParameter, isInEditMo
227
319
  * @internal
228
320
  */
229
321
  export function computeParameterResetTargets(entries, workspaceParameters, isInEditMode) {
230
- const workspaceByRef = workspaceParametersByRef(workspaceParameters);
322
+ const workspaceParameterByRef = buildWorkspaceParametersByRef(workspaceParameters);
231
323
  const result = [];
232
324
  for (const entry of entries) {
233
325
  if (entry.parameter.mode !== DashboardParameterModeValues.ACTIVE) {
@@ -236,7 +328,7 @@ export function computeParameterResetTargets(entries, workspaceParameters, isInE
236
328
  if (entry.runtimeOverride === undefined) {
237
329
  continue;
238
330
  }
239
- const workspaceParameter = workspaceByRef.get(objRefToString(entry.parameter.ref));
331
+ const workspaceParameter = workspaceParameterByRef.get(objRefToString(entry.parameter.ref));
240
332
  const resetValue = computeParameterResetValue(entry, workspaceParameter, isInEditMode);
241
333
  if (resetValue !== undefined && resetValue !== entry.runtimeOverride) {
242
334
  result.push({ ref: entry.parameter.ref, value: resetValue });
@@ -252,14 +344,14 @@ export function computeParameterResetTargets(entries, workspaceParameters, isInE
252
344
  *
253
345
  * @internal
254
346
  */
255
- export function collectExportOverrides(tabRefSelections, workspaceByRef) {
347
+ export function collectExportOverrides(tabRefSelections, workspaceParameterByRef) {
256
348
  const result = {};
257
349
  for (const { tab, allowedRefs } of tabRefSelections) {
258
350
  const entries = tab.parameters?.parameters ?? parametersInitialState.parameters;
259
351
  const scoped = allowedRefs
260
352
  ? entries.filter((entry) => allowedRefs.has(objRefToString(entry.parameter.ref)))
261
353
  : entries;
262
- const rows = formatEntries(scoped, workspaceByRef);
354
+ const rows = formatEntries(scoped, workspaceParameterByRef);
263
355
  if (rows.length > 0) {
264
356
  result[tab.localIdentifier] = rows;
265
357
  }
@@ -297,10 +389,10 @@ export function buildWidgetScopeTabRefSelections(widgetContexts, widgetIds, insi
297
389
  }
298
390
  return [...byTab.values()];
299
391
  }
300
- function formatEntries(entries, workspaceByRef) {
392
+ function formatEntries(entries, workspaceParameterByRef) {
301
393
  const rows = [];
302
394
  for (const entry of entries) {
303
- const workspaceParameter = workspaceByRef.get(objRefToString(entry.parameter.ref));
395
+ const workspaceParameter = workspaceParameterByRef.get(objRefToString(entry.parameter.ref));
304
396
  const row = formatDashboardParameter(entry, workspaceParameter);
305
397
  if (row !== undefined) {
306
398
  rows.push(row);
@@ -1,5 +1,6 @@
1
- import { type IDashboardExportParameter, type IDashboardParameter, type IInsightParameterValue, type IdentifierRef, type ObjRef } from "@gooddata/sdk-model";
1
+ import { type IDashboardExportParameter, type IDashboardParameter, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef, type ObjRef } from "@gooddata/sdk-model";
2
2
  import { type DashboardSelector } from "../../types.js";
3
+ import { type IParameterReconciliationEntry, type ParameterReconciliation } from "./parametersHelpers.js";
3
4
  import { type IDashboardParameterEntry } from "./parametersState.js";
4
5
  /**
5
6
  * Returns the persisted-shape parameter entries currently held by the active tab.
@@ -89,9 +90,23 @@ export declare const selectActiveTabParameterResetTargets: DashboardSelector<{
89
90
  * @alpha
90
91
  */
91
92
  export declare const selectHasAnyResettableParameterOnActiveTab: DashboardSelector<boolean>;
93
+ /**
94
+ * Dashboard-wide list of parameters that no longer reconcile against the workspace parameters
95
+ * (per {@link classifyParameterReconciliation}), deduped by ref across tabs.
96
+ *
97
+ * @internal
98
+ */
99
+ export declare const selectParameterReconciliations: DashboardSelector<IParameterReconciliationEntry[]>;
100
+ /**
101
+ * Per-ref reconciliation status for the active tab's parameter chip (per {@link classifyParameterReconciliation}).
102
+ *
103
+ * @internal
104
+ */
105
+ export declare const selectParameterReconciliationByRef: (ref: ObjRef) => DashboardSelector<ParameterReconciliation | undefined>;
92
106
  interface IWidgetParameterContext {
93
107
  entries: IDashboardParameterEntry[];
94
108
  measureParameters: Record<string, IdentifierRef[]>;
109
+ workspaceParameterByRef: Map<string, IParameterMetadataObject>;
95
110
  widgetInsightRef: ObjRef;
96
111
  }
97
112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"parametersSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,MAAM,EAId,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAkBxD,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAmB9B;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,CAG9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,CAG/E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,wBAAwB,EAAE,CAGzF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,GAAG,SAAS,CAMtF,CAAC;AAEP;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,EAAE,CAC7C,GAAG,EAAE,MAAM,KACV,iBAAiB,CAAC,wBAAwB,GAAG,SAAS,CAI1D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AG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,sBAAsB,EAAE,CAW9C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2CAA2C,EAAE,CACtD,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,mBAAmB,EAAE,CAe3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,+BAA+B,EAAE,CAC1C,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,KAC9B,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAGX,CAAC;AA6DxD;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAI1F,CAAC"}
1
+ {"version":3,"file":"parametersSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EAId,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKxD,OAAO,EAEH,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAa/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAyB9B;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,CAG9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,CAG/E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,wBAAwB,EAAE,CAGzF,CAAC;AA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AAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;IAEnD,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IAE/D,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,CACvC,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,uBAAuB,GAAG,SAAS,CAyBzD,CAAC;AAmBF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uCAAuC,EAAE,CAClD,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,sBAAsB,EAAE,CAa9C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+CAA+C,EAAE,CAC1D,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,sBAAsB,EAAE,CAa9C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2CAA2C,EAAE,CACtD,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,mBAAmB,EAAE,CAe3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,+BAA+B,EAAE,CAC1C,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,KAC9B,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAGX,CAAC;AAuDxD;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAI1F,CAAC"}
@@ -10,16 +10,20 @@ import { selectIsInEditMode } from "../../renderMode/renderModeSelectors.js";
10
10
  import { selectAllTabsInsightWidgetContexts } from "../layout/layoutSelectors.js";
11
11
  import { selectActiveOrDefaultTabLocalIdentifier, selectActiveTab, selectTabs } from "../tabsSelectors.js";
12
12
  import { DEFAULT_TAB_ID } from "../tabsState.js";
13
- import { EMPTY_EXPORT_PARAMETERS_BY_TAB, applyRuntimeOverride, buildPersistedByTabAndRef, buildWidgetScopeTabRefSelections, collectExportOverrides, collectReferencedParameterRefs, computeParameterResetTargets, computeParameterResetValue, resolveEffectiveParameterValuesForRefs, smartPersistResolvedEntry, workspaceParametersByRef, } from "./parametersHelpers.js";
13
+ import { EMPTY_EXPORT_PARAMETERS_BY_TAB, applyRuntimeOverride, buildPersistedByTabAndRef, buildWidgetScopeTabRefSelections, buildWorkspaceParametersByRef, classifyParameterReconciliation, collectExportOverrides, collectParameterReconciliations, collectReferencedParameterRefs, computeParameterResetTargets, computeParameterResetValue, resolveEffectiveParameterValuesForRefs, smartPersistResolvedEntry, } from "./parametersHelpers.js";
14
14
  import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
15
15
  const EMPTY_PARAMETERS = [];
16
16
  const EMPTY_EXPORT_PARAMETERS = [];
17
17
  const EMPTY_PARAMETER_VALUES = [];
18
18
  const EMPTY_TABS = [];
19
19
  const EMPTY_RESET_TARGETS = [];
20
+ const EMPTY_RECONCILIATIONS = [];
20
21
  const selectParametersState = createSelector(selectActiveTab, (activeTab) => activeTab?.parameters ?? parametersInitialState);
21
22
  const selectPersistedParametersFromMeta = (state) => state.meta?.persistedDashboard?.parameters ?? EMPTY_PARAMETERS;
22
23
  const selectPersistedDashboardTabsRaw = (state) => state.meta?.persistedDashboard?.tabs ?? EMPTY_TABS;
24
+ // Built once and shared by reference, so the per-widget execution selectors don't each
25
+ // reconstruct an identical catalog-by-ref map.
26
+ const selectWorkspaceParametersByRef = createSelector(selectCatalogParameters, buildWorkspaceParametersByRef);
23
27
  /**
24
28
  * Returns the persisted-shape parameter entries currently held by the active tab.
25
29
  *
@@ -93,19 +97,20 @@ export const selectParameterResetValueByRef = createMemoizedSelector((ref) => cr
93
97
  *
94
98
  * @internal
95
99
  */
96
- export const selectSmartPersistedTabsParameters = createSelector(selectTabs, selectCatalogParameters, selectCatalogParametersIsLoaded, selectPersistedDashboardTabsRaw, selectPersistedParametersFromMeta, (tabs, workspaceParameters, isCatalogLoaded, persistedTabs, rootPersistedParameters) => {
100
+ export const selectSmartPersistedTabsParameters = createSelector(selectTabs, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, selectPersistedDashboardTabsRaw, selectPersistedParametersFromMeta, (tabs, workspaceParameterByRef, isCatalogLoaded, persistedTabs, rootPersistedParameters) => {
97
101
  const result = {};
98
102
  if (!tabs) {
99
103
  return result;
100
104
  }
101
- const workspaceByRef = workspaceParametersByRef(workspaceParameters);
102
105
  const persistedByTabAndRef = buildPersistedByTabAndRef(persistedTabs, rootPersistedParameters);
103
106
  for (const tab of tabs) {
104
107
  const entries = tab.parameters?.parameters ?? [];
105
108
  const persistedForTab = persistedByTabAndRef.get(tab.localIdentifier) ?? new Map();
106
109
  result[tab.localIdentifier] = entries.map((entry) => {
107
110
  const refKey = objRefToString(entry.parameter.ref);
108
- const workspaceParameter = isCatalogLoaded ? workspaceByRef.get(refKey) : undefined;
111
+ const workspaceParameter = isCatalogLoaded
112
+ ? workspaceParameterByRef.get(refKey)
113
+ : undefined;
109
114
  if (!workspaceParameter) {
110
115
  return persistedForTab.get(refKey) ?? entry.parameter;
111
116
  }
@@ -172,12 +177,37 @@ export const selectActiveTabParameterResetTargets = createSelector(selectDashboa
172
177
  * @alpha
173
178
  */
174
179
  export const selectHasAnyResettableParameterOnActiveTab = createSelector(selectActiveTabParameterResetTargets, (targets) => targets.length > 0);
180
+ /**
181
+ * Dashboard-wide list of parameters that no longer reconcile against the workspace parameters
182
+ * (per {@link classifyParameterReconciliation}), deduped by ref across tabs.
183
+ *
184
+ * @internal
185
+ */
186
+ export const selectParameterReconciliations = createSelector(selectTabs, selectCatalogParameters, selectCatalogParametersIsLoaded, selectEnableParameters, (tabs, workspaceParameters, isCatalogLoaded, isEnabled) => {
187
+ if (!isEnabled || !isCatalogLoaded || !tabs) {
188
+ return EMPTY_RECONCILIATIONS;
189
+ }
190
+ const entries = tabs.flatMap((tab) => tab.parameters?.parameters ?? []);
191
+ const result = collectParameterReconciliations(entries, workspaceParameters);
192
+ return result.length === 0 ? EMPTY_RECONCILIATIONS : result;
193
+ });
194
+ /**
195
+ * Per-ref reconciliation status for the active tab's parameter chip (per {@link classifyParameterReconciliation}).
196
+ *
197
+ * @internal
198
+ */
199
+ export const selectParameterReconciliationByRef = createMemoizedSelector((ref) => createSelector(selectDashboardParameterEntryByRef(ref), selectCatalogParameterByRef(ref), selectCatalogParametersIsLoaded, selectEnableParameters, (entry, workspaceParameter, isCatalogLoaded, isEnabled) => {
200
+ if (!isEnabled || !isCatalogLoaded || !entry) {
201
+ return undefined;
202
+ }
203
+ return classifyParameterReconciliation(entry.parameter, workspaceParameter);
204
+ }));
175
205
  /**
176
206
  * Owning-tab parameter entries and the metric → parameter map for a widget, keyed by ref.
177
207
  *
178
208
  * @internal
179
209
  */
180
- export const selectWidgetParameterContext = createMemoizedSelector((ref) => createSelector(selectAllTabsInsightWidgetContexts, selectEnableParameters, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, (contexts, isEnabled, measureParameters, measureParametersStatus) => {
210
+ export const selectWidgetParameterContext = createMemoizedSelector((ref) => createSelector(selectAllTabsInsightWidgetContexts, selectEnableParameters, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, selectWorkspaceParametersByRef, (contexts, isEnabled, measureParameters, measureParametersStatus, workspaceParameterByRef) => {
181
211
  if (!isEnabled || !ref || measureParametersStatus !== "loaded") {
182
212
  return undefined;
183
213
  }
@@ -186,7 +216,12 @@ export const selectWidgetParameterContext = createMemoizedSelector((ref) => crea
186
216
  return undefined;
187
217
  }
188
218
  const entries = context.tab.parameters?.parameters ?? parametersInitialState.parameters;
189
- return { entries, measureParameters, widgetInsightRef: context.widget.insight };
219
+ return {
220
+ entries,
221
+ measureParameters,
222
+ workspaceParameterByRef,
223
+ widgetInsightRef: context.widget.insight,
224
+ };
190
225
  }));
191
226
  // Adds the widget's *own* insight and referenced refs for the ref-based selectors below (alerting and
192
227
  // CSV export, which always concern the widget itself — never a drill target).
@@ -194,13 +229,13 @@ const selectWidgetInsightAndReferencedRefs = createMemoizedSelector((ref) => cre
194
229
  if (!resolved) {
195
230
  return undefined;
196
231
  }
197
- const { entries, measureParameters, widgetInsightRef } = resolved;
232
+ const { entries, measureParameters, workspaceParameterByRef, widgetInsightRef } = resolved;
198
233
  const insight = insights.get(widgetInsightRef);
199
234
  if (!insight) {
200
235
  return undefined;
201
236
  }
202
237
  const referencedRefs = collectReferencedParameterRefs(insight, measureParameters);
203
- return { insight, referencedRefs, entries };
238
+ return { insight, referencedRefs, entries, workspaceParameterByRef };
204
239
  }));
205
240
  /**
206
241
  * Returns the parameter values to inject into the widget's `IExecutionConfig.parameterValues`.
@@ -223,8 +258,8 @@ export const selectEffectiveParameterValuesForWidget = createMemoizedSelector((r
223
258
  if (!resolved) {
224
259
  return EMPTY_PARAMETER_VALUES;
225
260
  }
226
- const { insight, referencedRefs, entries } = resolved;
227
- return resolveEffectiveParameterValuesForRefs(entries, referencedRefs, insightParameters(insight));
261
+ const { insight, referencedRefs, entries, workspaceParameterByRef } = resolved;
262
+ return resolveEffectiveParameterValuesForRefs(entries, referencedRefs, insightParameters(insight), workspaceParameterByRef);
228
263
  }));
229
264
  /**
230
265
  * The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
@@ -241,9 +276,8 @@ export const selectReferencedInsightParameterValuesForWidget = createMemoizedSel
241
276
  if (!resolved) {
242
277
  return EMPTY_PARAMETER_VALUES;
243
278
  }
244
- const { insight, referencedRefs } = resolved;
245
- const result = insightParameters(insight).filter((parameter) => referencedRefs.some((ref) => areObjRefsEqual(ref, parameter.ref)));
246
- return result.length === 0 ? EMPTY_PARAMETER_VALUES : result;
279
+ const { insight, referencedRefs, workspaceParameterByRef } = resolved;
280
+ return resolveEffectiveParameterValuesForRefs([], referencedRefs, insightParameters(insight), workspaceParameterByRef);
247
281
  }));
248
282
  /**
249
283
  * Returns the effective dashboard parameters (persisted shape with any `runtimeOverride` folded
@@ -286,20 +320,18 @@ export const selectEffectiveDashboardParametersForWidget = createMemoizedSelecto
286
320
  export const selectExportEffectiveParameters = (widgetIds) => widgetIds?.length
287
321
  ? selectExportEffectiveParametersForWidgets(widgetIds)
288
322
  : selectExportEffectiveParametersDashboardScope;
289
- const selectExportEffectiveParametersDashboardScope = createSelector(selectTabs, selectEnableParameters, selectCatalogParameters, selectCatalogParametersIsLoaded, (tabs, isEnabled, catalogParameters, isCatalogLoaded) => {
323
+ const selectExportEffectiveParametersDashboardScope = createSelector(selectTabs, selectEnableParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, (tabs, isEnabled, workspaceParameterByRef, isCatalogLoaded) => {
290
324
  if (!isEnabled || !isCatalogLoaded || !tabs?.length) {
291
325
  return EMPTY_EXPORT_PARAMETERS_BY_TAB;
292
326
  }
293
- const workspaceByRef = new Map(catalogParameters.map((parameter) => [objRefToString(parameter.ref), parameter]));
294
- return collectExportOverrides(tabs.map((tab) => ({ tab })), workspaceByRef);
327
+ return collectExportOverrides(tabs.map((tab) => ({ tab })), workspaceParameterByRef);
295
328
  });
296
- const selectExportEffectiveParametersForWidgets = createMemoizedSelector((widgetIds) => createSelector(selectAllTabsInsightWidgetContexts, selectInsightsMap, selectEnableParameters, selectCatalogParameters, selectCatalogParametersIsLoaded, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, (widgetContexts, insights, isEnabled, catalogParameters, isCatalogLoaded, measureParameters, measureParametersStatus) => {
329
+ const selectExportEffectiveParametersForWidgets = createMemoizedSelector((widgetIds) => createSelector(selectAllTabsInsightWidgetContexts, selectInsightsMap, selectEnableParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, (widgetContexts, insights, isEnabled, workspaceParameterByRef, isCatalogLoaded, measureParameters, measureParametersStatus) => {
297
330
  if (!isEnabled || !isCatalogLoaded || measureParametersStatus !== "loaded") {
298
331
  return EMPTY_EXPORT_PARAMETERS_BY_TAB;
299
332
  }
300
- const workspaceByRef = new Map(catalogParameters.map((parameter) => [objRefToString(parameter.ref), parameter]));
301
333
  const tabRefSelections = buildWidgetScopeTabRefSelections(widgetContexts, widgetIds, insights, measureParameters);
302
- return collectExportOverrides(tabRefSelections, workspaceByRef);
334
+ return collectExportOverrides(tabRefSelections, workspaceParameterByRef);
303
335
  }));
304
336
  /**
305
337
  * Active-tab slice of {@link selectExportEffectiveParameters}.
@@ -0,0 +1,27 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ /**
3
+ * Provides AutomationsContext to its children, built from dashboard Redux state.
4
+ * Wraps the scheduled-email dialog subtree (both the create/edit and management dialogs reach
5
+ * AutomationsContext through this provider).
6
+ *
7
+ * @internal
8
+ */
9
+ export declare function ScheduledEmailAutomationsProvider({ children }: {
10
+ children: ReactNode;
11
+ }): ReactElement;
12
+ /**
13
+ * Connector component that reads from the dashboard Redux store and wires up
14
+ * the scheduled-email dialog tree (create/edit and management) via context providers.
15
+ *
16
+ * This is the primary bridge between dashboard store state and the scheduled-email
17
+ * dialog tree. The dialog still reads the store directly at this point —
18
+ * contexts are provided but not yet consumed. Store reads migrate off the dialog
19
+ * in subsequent Phase 2 tasks (A2/A3).
20
+ *
21
+ * AutomationsContext is provided by ScheduledEmailAutomationsProvider, which wraps this
22
+ * connector (see ScheduledEmailAutomationsProvider in DashboardHeader).
23
+ *
24
+ * @internal
25
+ */
26
+ export declare function ScheduledEmailConnector(): ReactElement | null;
27
+ //# sourceMappingURL=ScheduledEmailConnector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduledEmailConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/ScheduledEmailConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA4B1D;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAGrG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,YAAY,GAAG,IAAI,CAM7D"}