@gooddata/sdk-ui-dashboard 11.62.0-alpha.1 → 11.62.0-alpha.3

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 (192) hide show
  1. package/NOTICE +40 -618
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/_staging/dashboard/dashboardFilterContext.d.ts.map +1 -1
  5. package/esm/_staging/dashboard/dashboardFilterContext.js +4 -2
  6. package/esm/_staging/dashboard/dashboardFilterContextValidation.js +1 -1
  7. package/esm/index.d.ts +5 -3
  8. package/esm/index.d.ts.map +1 -1
  9. package/esm/index.js +1 -1
  10. package/esm/kdaDialog/composition/KdaAttributesDropdown.d.ts +2 -1
  11. package/esm/kdaDialog/composition/KdaAttributesDropdown.d.ts.map +1 -1
  12. package/esm/kdaDialog/composition/KdaAttributesDropdown.js +4 -5
  13. package/esm/kdaDialog/composition/KeyDriversFooter.d.ts.map +1 -1
  14. package/esm/kdaDialog/composition/KeyDriversFooter.js +12 -4
  15. package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts +3 -2
  16. package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
  17. package/esm/model/commandHandlers/dashboard/common/filterViews.js +12 -6
  18. package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts.map +1 -1
  19. package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +5 -6
  20. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
  21. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +1 -1
  22. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadUnavailableReferences.d.ts.map +1 -1
  23. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadUnavailableReferences.js +2 -0
  24. package/esm/model/commandHandlers/dashboard/resetDashboardHandler.d.ts.map +1 -1
  25. package/esm/model/commandHandlers/dashboard/resetDashboardHandler.js +3 -1
  26. package/esm/model/commandHandlers/dashboard/saveDashboardHandler.d.ts.map +1 -1
  27. package/esm/model/commandHandlers/dashboard/saveDashboardHandler.js +27 -10
  28. package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
  29. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +4 -1
  30. package/esm/model/commandHandlers/drill/keyDriverAnalysisHandler.d.ts.map +1 -1
  31. package/esm/model/commandHandlers/drill/keyDriverAnalysisHandler.js +5 -3
  32. package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.d.ts +21 -1
  33. package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.d.ts.map +1 -1
  34. package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.js +56 -54
  35. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.d.ts.map +1 -1
  36. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.js +17 -4
  37. package/esm/model/commandHandlers/filterContext/attributeFilter/replaceAttributeFilterItemSelectionHandler.d.ts.map +1 -1
  38. package/esm/model/commandHandlers/filterContext/attributeFilter/replaceAttributeFilterItemSelectionHandler.js +6 -1
  39. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
  40. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +188 -70
  41. package/esm/model/commandHandlers/filterContext/common.d.ts +14 -2
  42. package/esm/model/commandHandlers/filterContext/common.d.ts.map +1 -1
  43. package/esm/model/commandHandlers/filterContext/common.js +43 -6
  44. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
  45. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +13 -3
  46. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.d.ts.map +1 -1
  47. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.js +11 -2
  48. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.d.ts.map +1 -1
  49. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.js +3 -0
  50. package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts +10 -2
  51. package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts.map +1 -1
  52. package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.js +20 -3
  53. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
  54. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +21 -4
  55. package/esm/model/commandHandlers/tabs/createDashboardTabHandler.d.ts.map +1 -1
  56. package/esm/model/commandHandlers/tabs/createDashboardTabHandler.js +27 -3
  57. package/esm/model/commands/filters.d.ts +16 -1
  58. package/esm/model/commands/filters.d.ts.map +1 -1
  59. package/esm/model/commands/filters.js +4 -3
  60. package/esm/model/commands/parameters.d.ts +4 -3
  61. package/esm/model/commands/parameters.d.ts.map +1 -1
  62. package/esm/model/commands/parameters.js +3 -2
  63. package/esm/model/events/dashboard.d.ts +17 -1
  64. package/esm/model/events/dashboard.d.ts.map +1 -1
  65. package/esm/model/events/dashboard.js +2 -1
  66. package/esm/model/store/drill/drillSelectors.d.ts +6 -0
  67. package/esm/model/store/drill/drillSelectors.d.ts.map +1 -1
  68. package/esm/model/store/drill/drillSelectors.js +9 -0
  69. package/esm/model/store/filtering/dashboardFilterSelectors.d.ts +6 -1
  70. package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
  71. package/esm/model/store/filtering/dashboardFilterSelectors.js +21 -19
  72. package/esm/model/store/filtering/restrictedFilterUtils.d.ts +26 -1
  73. package/esm/model/store/filtering/restrictedFilterUtils.d.ts.map +1 -1
  74. package/esm/model/store/filtering/restrictedFilterUtils.js +74 -6
  75. package/esm/model/store/meta/metaSelectors.d.ts +6 -0
  76. package/esm/model/store/meta/metaSelectors.d.ts.map +1 -1
  77. package/esm/model/store/meta/metaSelectors.js +13 -3
  78. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +48 -0
  79. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
  80. package/esm/model/store/tabs/filterContext/filterContextReducers.js +362 -102
  81. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts +74 -1
  82. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts.map +1 -1
  83. package/esm/model/store/tabs/filterContext/filterContextSelectors.js +27 -21
  84. package/esm/model/store/tabs/filterContext/filterSync.d.ts +101 -0
  85. package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -0
  86. package/esm/model/store/tabs/filterContext/filterSync.js +361 -0
  87. package/esm/model/store/tabs/index.d.ts +2 -0
  88. package/esm/model/store/tabs/index.d.ts.map +1 -1
  89. package/esm/model/store/tabs/parameters/parametersReducers.d.ts +5 -0
  90. package/esm/model/store/tabs/parameters/parametersReducers.d.ts.map +1 -1
  91. package/esm/model/store/tabs/parameters/parametersReducers.js +9 -5
  92. package/esm/model/store/tabs/tabsReducers.d.ts +6 -0
  93. package/esm/model/store/tabs/tabsReducers.d.ts.map +1 -1
  94. package/esm/model/store/tabs/tabsReducers.js +14 -6
  95. package/esm/model/store/tabs/tabsState.d.ts +10 -0
  96. package/esm/model/store/tabs/tabsState.d.ts.map +1 -1
  97. package/esm/model/store/tabs/tabsState.js +20 -0
  98. package/esm/model/store/unavailableObjects/copyBlockingReferences.d.ts +5 -3
  99. package/esm/model/store/unavailableObjects/copyBlockingReferences.d.ts.map +1 -1
  100. package/esm/model/store/unavailableObjects/copyBlockingReferences.js +9 -16
  101. package/esm/model/store/unavailableObjects/unavailableObjectsSelectors.d.ts +0 -16
  102. package/esm/model/store/unavailableObjects/unavailableObjectsSelectors.d.ts.map +1 -1
  103. package/esm/model/store/unavailableObjects/unavailableObjectsSelectors.js +0 -18
  104. package/esm/model/utils/attributeFilterMatching.d.ts +38 -0
  105. package/esm/model/utils/attributeFilterMatching.d.ts.map +1 -0
  106. package/esm/model/utils/attributeFilterMatching.js +110 -0
  107. package/esm/model/utils/attributeFilterSelectionTypeCompatibility.d.ts.map +1 -0
  108. package/esm/presentation/automations/alerting/state/types.d.ts +2 -2
  109. package/esm/presentation/automations/alerting/state/types.d.ts.map +1 -1
  110. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  111. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +7 -3
  112. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +6 -2
  113. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  114. package/esm/presentation/automations/scheduledEmail/state/types.d.ts +2 -2
  115. package/esm/presentation/automations/scheduledEmail/state/types.d.ts.map +1 -1
  116. package/esm/presentation/automations/scheduledEmail/types.d.ts +2 -2
  117. package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
  118. package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts +11 -1
  119. package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts.map +1 -1
  120. package/esm/presentation/automations/shared/automationFilters/automationParameters.js +2 -0
  121. package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts +3 -3
  122. package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts.map +1 -1
  123. package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.js +3 -13
  124. package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.d.ts +1 -1
  125. package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.d.ts.map +1 -1
  126. package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.js +1 -1
  127. package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
  128. package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +1 -1
  129. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts +2 -2
  130. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
  131. package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts +6 -2
  132. package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map +1 -1
  133. package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts.map +1 -1
  134. package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.js +2 -2
  135. package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
  136. package/esm/presentation/automations/shared/automationFilters/utils.js +8 -0
  137. package/esm/presentation/automations/shared/filters/conversions.d.ts +1 -1
  138. package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -1
  139. package/esm/presentation/automations/shared/filters/conversions.js +5 -3
  140. package/esm/presentation/automations/shared/slots/types.d.ts +2 -2
  141. package/esm/presentation/automations/shared/slots/types.d.ts.map +1 -1
  142. package/esm/presentation/dashboardSettingsDialog/useDialogData.js +1 -1
  143. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.d.ts.map +1 -1
  144. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +1 -4
  145. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.d.ts +2 -11
  146. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.d.ts.map +1 -1
  147. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.js +17 -16
  148. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/staticListItems.d.ts +11 -0
  149. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/staticListItems.d.ts.map +1 -0
  150. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/staticListItems.js +7 -0
  151. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/useMetricDropdownItems.d.ts +2 -11
  152. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/useMetricDropdownItems.d.ts.map +1 -1
  153. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/useMetricDropdownItems.js +0 -6
  154. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/useParameterDropdownItems.d.ts +34 -0
  155. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/useParameterDropdownItems.d.ts.map +1 -0
  156. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/useParameterDropdownItems.js +41 -0
  157. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useLimitingItemsConfiguration.d.ts.map +1 -1
  158. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useLimitingItemsConfiguration.js +4 -17
  159. package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
  160. package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +4 -13
  161. package/esm/presentation/filterBar/attributeFilter/useParentFilters.d.ts.map +1 -1
  162. package/esm/presentation/filterBar/attributeFilter/useParentFilters.js +3 -10
  163. package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.d.ts.map +1 -1
  164. package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js +0 -9
  165. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.d.ts.map +1 -1
  166. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +15 -3
  167. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
  168. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +4 -0
  169. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +8 -0
  170. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  171. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +8 -0
  172. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogExportDropdown.d.ts.map +1 -1
  173. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogExportDropdown.js +1 -1
  174. package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.d.ts +2 -3
  175. package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.d.ts.map +1 -1
  176. package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.js +29 -133
  177. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.d.ts.map +1 -1
  178. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.js +1 -1
  179. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceInsightFilterToOption.d.ts.map +1 -1
  180. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceInsightFilterToOption.js +1 -1
  181. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceMeasureFilterToOption.d.ts.map +1 -1
  182. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceMeasureFilterToOption.js +1 -1
  183. package/esm/sdk-ui-dashboard.d.ts +151 -13
  184. package/package.json +23 -23
  185. package/styles/css/drillDialog.css +4 -0
  186. package/styles/css/drillDialog.css.map +1 -1
  187. package/styles/css/main.css +8 -0
  188. package/styles/css/main.css.map +1 -1
  189. package/styles/scss/drillDialog.scss +5 -0
  190. package/esm/model/commandHandlers/dashboard/common/attributeFilterSelectionTypeCompatibility.d.ts.map +0 -1
  191. /package/esm/model/{commandHandlers/dashboard/common → utils}/attributeFilterSelectionTypeCompatibility.d.ts +0 -0
  192. /package/esm/model/{commandHandlers/dashboard/common → utils}/attributeFilterSelectionTypeCompatibility.js +0 -0
@@ -1,9 +1,9 @@
1
1
  // (C) 2020-2026 GoodData Corporation
2
- import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, isDashboardDateFilterWithDimension, isDashboardMeasureValueFilter, isLocalIdRef, measureAlias, measureFilters, measureLocalId, measureTitle, serializeObjRef, } from "@gooddata/sdk-model";
2
+ import { areObjRefsEqual, isDashboardDateFilterWithDimension, isDashboardMeasureValueFilter, isLocalIdRef, measureAlias, measureFilters, measureLocalId, measureTitle, serializeObjRef, } from "@gooddata/sdk-model";
3
3
  import { buildMeasureTitles } from "@gooddata/sdk-ui/internal";
4
4
  import { sourceInsightFilterObjRefValue } from "../../../../../_staging/drills/drillingUtils.js";
5
- import { canApplyFilterTypeToTarget } from "../../../../../model/commandHandlers/dashboard/common/attributeFilterSelectionTypeCompatibility.js";
6
- import { findDashboardAttributeFilterByAttributeDisplayForms, findDashboardAttributeFilterByDisplayForm, findDashboardAttributeFilterByIncomingDisplayAsLabel, findDashboardAttributeFilterByTargetDisplayAsLabel, } from "../../../../../model/utils/filterContextUtils.js";
5
+ import { findAttributeFilterCounterpart, } from "../../../../../model/utils/attributeFilterMatching.js";
6
+ import { findDashboardAttributeFilterByDisplayForm } from "../../../../../model/utils/filterContextUtils.js";
7
7
  import { messages } from "./messages.js";
8
8
  /**
9
9
  * Strip filter description suffix baked in by AD
@@ -88,23 +88,6 @@ export function getCatalogMeasureTitle(measureRef, allCatalogMeasures) {
88
88
  export function hasMatchingTargetDashboardAttributeFilterDisplayForm(displayFormRef, targetDashboardAttributeFilters) {
89
89
  return !!findDashboardAttributeFilterByDisplayForm(targetDashboardAttributeFilters, displayFormRef);
90
90
  }
91
- export function hasMatchingTargetDashboardAttributeFilter(dashboardFilter, sourceDashboardAttributeFilterConfigs, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, allCatalogDisplayFormsMap) {
92
- const displayFormRef = dashboardFilter.attributeFilter.displayForm;
93
- if (hasMatchingTargetDashboardAttributeFilterDisplayForm(displayFormRef, targetDashboardAttributeFilters)) {
94
- return true;
95
- }
96
- const sourceDisplayForm = allCatalogDisplayFormsMap.get(displayFormRef);
97
- if (sourceDisplayForm) {
98
- const attributeDisplayForms = Array.from(allCatalogDisplayFormsMap.values()).filter((displayForm) => areObjRefsEqual(displayForm.attribute, sourceDisplayForm.attribute));
99
- if (findDashboardAttributeFilterByAttributeDisplayForms(targetDashboardAttributeFilters, attributeDisplayForms)) {
100
- return true;
101
- }
102
- }
103
- if (findDashboardAttributeFilterByIncomingDisplayAsLabel(dashboardFilter, sourceDashboardAttributeFilterConfigs, targetDashboardAttributeFilters)) {
104
- return true;
105
- }
106
- return !!findDashboardAttributeFilterByTargetDisplayAsLabel(displayFormRef, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs);
107
- }
108
91
  export function hasMatchingTargetDashboardDateFilter(datasetRef, targetDashboardFilters) {
109
92
  return targetDashboardFilters.some((targetDashboardFilter) => isDashboardDateFilterWithDimension(targetDashboardFilter) &&
110
93
  areObjRefsEqual(datasetRef, targetDashboardFilter.dateFilter.dataSet));
@@ -122,93 +105,26 @@ export function hasCompatibleTargetInsightMeasureValueFilter(measureRef, targetI
122
105
  export function isDateIntersectionAttribute(displayFormRef, allCatalogDateAttributeDisplayForms) {
123
106
  return allCatalogDateAttributeDisplayForms.some((displayForm) => areObjRefsEqual(displayForm.ref, displayFormRef));
124
107
  }
125
- function getConfigSelectionType(targetFilterLocalId, targetDashboardAttributeFilterConfigs) {
126
- return targetDashboardAttributeFilterConfigs.find((c) => c.localIdentifier === targetFilterLocalId)
127
- ?.selectionType;
128
- }
129
- /**
130
- * Finds a matching text filter on the target dashboard by displayForm.
131
- * Checks the source filter's displayForm and optionally its displayAsLabel from config.
132
- */
133
- function findMatchingTargetTextFilter(displayFormRef, sourceDashboardAttributeFilterConfigs, sourceFilterLocalId, targetDashboardTextAttributeFilters) {
134
- // Direct displayForm match
135
- const directMatch = targetDashboardTextAttributeFilters.find((textFilter) => areObjRefsEqual(dashboardAttributeFilterItemDisplayForm(textFilter), displayFormRef));
136
- if (directMatch) {
137
- return directMatch;
138
- }
139
- // Check source's displayAsLabel from config
140
- if (sourceFilterLocalId) {
141
- const sourceConfig = sourceDashboardAttributeFilterConfigs.find((c) => c.localIdentifier === sourceFilterLocalId);
142
- if (sourceConfig?.displayAsLabel) {
143
- return targetDashboardTextAttributeFilters.find((textFilter) => areObjRefsEqual(dashboardAttributeFilterItemDisplayForm(textFilter), sourceConfig.displayAsLabel));
144
- }
145
- }
146
- return undefined;
147
- }
148
- /**
149
- * Finds a matching list filter on the target dashboard for a text source filter.
150
- * Text filter has only displayForm. List filter has primary displayForm + displayAsLabel in config.
151
- * Match if text filter's displayForm equals either of those.
152
- */
153
- function findMatchingTargetListFilterForTextSource(textFilterDisplayFormRef, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs) {
154
- // Direct displayForm match
155
- const directMatch = findDashboardAttributeFilterByDisplayForm(targetDashboardAttributeFilters, textFilterDisplayFormRef);
156
- if (directMatch) {
157
- return directMatch;
158
- }
159
- // Check target's displayAsLabel — find a config whose displayAsLabel matches the text filter's displayForm
160
- return findDashboardAttributeFilterByTargetDisplayAsLabel(textFilterDisplayFormRef, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs);
161
- }
162
108
  /**
163
109
  * Checks if a list-type dashboard attribute filter can be transferred to the target dashboard,
164
110
  * considering both list and text filters on the target, and selection type config.
165
111
  */
166
112
  export function canTransferDashboardAttributeFilter(sourceFilter, sourceDashboardAttributeFilterConfigs, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap) {
167
- // 1. Same-type match against list filters — always OK
168
- if (hasMatchingTargetDashboardAttributeFilter(sourceFilter, sourceDashboardAttributeFilterConfigs, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, allCatalogDisplayFormsMap)) {
169
- return "transferable";
170
- }
171
- // 2. Cross-type match against text filters on target
172
- const matchingTextFilter = findMatchingTargetTextFilter(sourceFilter.attributeFilter.displayForm, sourceDashboardAttributeFilterConfigs, sourceFilter.attributeFilter.localIdentifier, targetDashboardTextAttributeFilters);
173
- if (!matchingTextFilter) {
174
- return "notFound";
175
- }
176
- // 3. Check if the target text filter's selection type allows list type
177
- const textFilterLocalId = dashboardAttributeFilterItemLocalIdentifier(matchingTextFilter);
178
- if (!textFilterLocalId) {
179
- return "notFound";
180
- }
181
- const configSelectionType = getConfigSelectionType(textFilterLocalId, targetDashboardAttributeFilterConfigs);
182
- return canApplyFilterTypeToTarget("list", configSelectionType, matchingTextFilter)
183
- ? "transferable"
184
- : "notCompatible";
113
+ return toFilterTransferResult(findAttributeFilterCounterpart(sourceFilter, [...targetDashboardAttributeFilters, ...targetDashboardTextAttributeFilters], {
114
+ sourceFilterConfigs: sourceDashboardAttributeFilterConfigs,
115
+ targetFilterConfigs: targetDashboardAttributeFilterConfigs,
116
+ displayForms: Array.from(allCatalogDisplayFormsMap.values()),
117
+ }));
185
118
  }
186
119
  /**
187
120
  * Checks if a text-type dashboard attribute filter can be transferred to the target dashboard,
188
121
  * considering both text and list filters on the target, and selection type config.
189
122
  */
190
- export function canTransferTextAttributeFilter(sourceFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters) {
191
- const sourceDisplayFormRef = dashboardAttributeFilterItemDisplayForm(sourceFilter);
192
- // 1. Same-type match against text filters — always OK
193
- const matchingTextFilter = targetDashboardTextAttributeFilters.find((textFilter) => areObjRefsEqual(dashboardAttributeFilterItemDisplayForm(textFilter), sourceDisplayFormRef));
194
- if (matchingTextFilter) {
195
- return "transferable";
196
- }
197
- // 2. Cross-type match against list filters on target
198
- // Text filter has only displayForm; list filter has primary displayForm + displayAsLabel in config
199
- const matchingListFilter = findMatchingTargetListFilterForTextSource(sourceDisplayFormRef, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs);
200
- if (!matchingListFilter) {
201
- return "notFound";
202
- }
203
- // 3. Check if the target list filter's selection type allows text type
204
- const listFilterLocalId = matchingListFilter.attributeFilter.localIdentifier;
205
- if (!listFilterLocalId) {
206
- return "notFound";
207
- }
208
- const configSelectionType = getConfigSelectionType(listFilterLocalId, targetDashboardAttributeFilterConfigs);
209
- return canApplyFilterTypeToTarget("text", configSelectionType, matchingListFilter)
210
- ? "transferable"
211
- : "notCompatible";
123
+ export function canTransferTextAttributeFilter(sourceFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap) {
124
+ return toFilterTransferResult(findAttributeFilterCounterpart(sourceFilter, [...targetDashboardTextAttributeFilters, ...targetDashboardAttributeFilters], {
125
+ targetFilterConfigs: targetDashboardAttributeFilterConfigs,
126
+ displayForms: Array.from(allCatalogDisplayFormsMap.values()),
127
+ }));
212
128
  }
213
129
  /**
214
130
  * Checks if a source insight/measure attribute filter (by displayForm) can be transferred,
@@ -221,40 +137,20 @@ export function canTransferTextAttributeFilter(sourceFilter, targetDashboardAttr
221
137
  * @param targetDashboardAttributeFilterConfigs - attribute filter configs on the target dashboard
222
138
  * @param targetDashboardTextAttributeFilters - text filters on the target dashboard
223
139
  */
224
- export function canTransferAttributeFilterByDisplayForm(displayFormRef, isSourceTextFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters) {
225
- if (isSourceTextFilter) {
226
- // Text source: check text targets first, then list targets with selection type
227
- const matchingTextFilter = targetDashboardTextAttributeFilters.find((textFilter) => areObjRefsEqual(dashboardAttributeFilterItemDisplayForm(textFilter), displayFormRef));
228
- if (matchingTextFilter) {
229
- return "transferable";
230
- }
231
- const matchingListFilter = findMatchingTargetListFilterForTextSource(displayFormRef, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs);
232
- if (!matchingListFilter) {
233
- return "notFound";
234
- }
235
- const listFilterLocalId = matchingListFilter.attributeFilter.localIdentifier;
236
- if (!listFilterLocalId) {
237
- return "notFound";
238
- }
239
- const configSelectionType = getConfigSelectionType(listFilterLocalId, targetDashboardAttributeFilterConfigs);
240
- return canApplyFilterTypeToTarget("text", configSelectionType, matchingListFilter)
241
- ? "transferable"
242
- : "notCompatible";
243
- }
244
- // List source: check list targets first, then text targets with selection type
245
- if (hasMatchingTargetDashboardAttributeFilterDisplayForm(displayFormRef, targetDashboardAttributeFilters)) {
246
- return "transferable";
247
- }
248
- const matchingTextFilter = targetDashboardTextAttributeFilters.find((textFilter) => areObjRefsEqual(dashboardAttributeFilterItemDisplayForm(textFilter), displayFormRef));
249
- if (!matchingTextFilter) {
250
- return "notFound";
251
- }
252
- const textFilterLocalId = dashboardAttributeFilterItemLocalIdentifier(matchingTextFilter);
253
- if (!textFilterLocalId) {
254
- return "notFound";
255
- }
256
- const configSelectionType = getConfigSelectionType(textFilterLocalId, targetDashboardAttributeFilterConfigs);
257
- return canApplyFilterTypeToTarget("list", configSelectionType, matchingTextFilter)
258
- ? "transferable"
259
- : "notCompatible";
140
+ export function canTransferAttributeFilterByDisplayForm(displayFormRef, isSourceTextFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap) {
141
+ const source = {
142
+ displayForm: displayFormRef,
143
+ type: isSourceTextFilter ? "text" : "list",
144
+ };
145
+ const targets = [
146
+ ...targetDashboardAttributeFilters,
147
+ ...targetDashboardTextAttributeFilters,
148
+ ];
149
+ return toFilterTransferResult(findAttributeFilterCounterpart(source, targets, {
150
+ targetFilterConfigs: targetDashboardAttributeFilterConfigs,
151
+ displayForms: Array.from(allCatalogDisplayFormsMap.values()),
152
+ }));
153
+ }
154
+ function toFilterTransferResult(result) {
155
+ return result.status === "matched" ? "transferable" : result.status;
260
156
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mapDashboardFilterToOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,MAAM,EAUd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAelF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,UAAU,iCAAiC;IACvC,eAAe,EAAE,iBAAiB,CAAC;IACnC,yBAAyB,EAAE,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC1E,kBAAkB,EAAE,eAAe,EAAE,CAAC;IACtC,sBAAsB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC5E,wBAAwB,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACjE,6BAA6B,EAAE,8BAA8B,EAAE,CAAC;IAChE,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,yBAAyB,EAAE,CAAC;IAC7D,mCAAmC,EAAE,4BAA4B,EAAE,CAAC;IACpE,kCAAkC,EAAE,4BAA4B,EAAE,CAAC;IACnE,0CAA0C,EAAE,4BAA4B,EAAE,CAAC;IAC3E,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,EACvC,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,qCAAqC,EACrC,sBAAsB,EACtB,+BAA+B,EAC/B,mCAAmC,EACnC,kCAAkC,EAClC,0CAA0C,EAC1C,qCAAqC,EACrC,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,IAAI,GACP,EAAE,iCAAiC,GAAG,yBAAyB,GAAG,SAAS,CAgI3E"}
1
+ {"version":3,"file":"mapDashboardFilterToOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,MAAM,EAUd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAelF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,UAAU,iCAAiC;IACvC,eAAe,EAAE,iBAAiB,CAAC;IACnC,yBAAyB,EAAE,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC1E,kBAAkB,EAAE,eAAe,EAAE,CAAC;IACtC,sBAAsB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC5E,wBAAwB,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACjE,6BAA6B,EAAE,8BAA8B,EAAE,CAAC;IAChE,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,yBAAyB,EAAE,CAAC;IAC7D,mCAAmC,EAAE,4BAA4B,EAAE,CAAC;IACpE,kCAAkC,EAAE,4BAA4B,EAAE,CAAC;IACnE,0CAA0C,EAAE,4BAA4B,EAAE,CAAC;IAC3E,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,EACvC,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,qCAAqC,EACrC,sBAAsB,EACtB,+BAA+B,EAC/B,mCAAmC,EACnC,kCAAkC,EAClC,0CAA0C,EAC1C,qCAAqC,EACrC,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,IAAI,GACP,EAAE,iCAAiC,GAAG,yBAAyB,GAAG,SAAS,CAiI3E"}
@@ -16,7 +16,7 @@ export function mapDashboardFilterToOption({ dashboardFilter, allCatalogDisplayF
16
16
  // This considers both list and text filters on the target, and selection type config.
17
17
  const transferResult = isDashboardAttributeFilter(dashboardFilter)
18
18
  ? canTransferDashboardAttributeFilter(dashboardFilter, sourceDashboardAttributeFilterConfigs, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap)
19
- : canTransferTextAttributeFilter(dashboardFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters);
19
+ : canTransferTextAttributeFilter(dashboardFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap);
20
20
  return {
21
21
  id: localIdentifier,
22
22
  title: customTitle ??
@@ -1 +1 @@
1
- {"version":3,"file":"mapSourceInsightFilterToOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceInsightFilterToOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EAKd,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAalF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,UAAU,qCAAqC;IAC3C,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yBAAyB,EAAE,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC1E,sBAAsB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC5E,qBAAqB,EAAE,QAAQ,EAAE,CAAC;IAClC,kBAAkB,EAAE,eAAe,EAAE,CAAC;IACtC,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,yBAAyB,EAAE,CAAC;IAC7D,mCAAmC,EAAE,4BAA4B,EAAE,CAAC;IACpE,kCAAkC,EAAE,4BAA4B,EAAE,CAAC;IACnE,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,wBAAwB,EAAE,OAAO,CAAC;IAClC,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,EAC3C,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,+BAA+B,EAC/B,mCAAmC,EACnC,kCAAkC,EAClC,qCAAqC,EACrC,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,IAAI,GACP,EAAE,qCAAqC,GAAG,yBAAyB,GAAG,SAAS,CAyI/E"}
1
+ {"version":3,"file":"mapSourceInsightFilterToOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceInsightFilterToOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EAKd,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAalF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,UAAU,qCAAqC;IAC3C,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yBAAyB,EAAE,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC1E,sBAAsB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC5E,qBAAqB,EAAE,QAAQ,EAAE,CAAC;IAClC,kBAAkB,EAAE,eAAe,EAAE,CAAC;IACtC,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,yBAAyB,EAAE,CAAC;IAC7D,mCAAmC,EAAE,4BAA4B,EAAE,CAAC;IACpE,kCAAkC,EAAE,4BAA4B,EAAE,CAAC;IACnE,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,wBAAwB,EAAE,OAAO,CAAC;IAClC,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,EAC3C,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,+BAA+B,EAC/B,mCAAmC,EACnC,kCAAkC,EAClC,qCAAqC,EACrC,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,IAAI,GACP,EAAE,qCAAqC,GAAG,yBAAyB,GAAG,SAAS,CA0I/E"}
@@ -20,7 +20,7 @@ export function mapSourceInsightFilterToOption({ sourceInsightFilter, allCatalog
20
20
  return undefined;
21
21
  }
22
22
  const isSourceTextFilter = isArbitraryAttributeFilter(sourceInsightFilter) || isMatchAttributeFilter(sourceInsightFilter);
23
- const transferResult = canTransferAttributeFilterByDisplayForm(displayFormRef, isSourceTextFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters);
23
+ const transferResult = canTransferAttributeFilterByDisplayForm(displayFormRef, isSourceTextFilter, targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap);
24
24
  return {
25
25
  id: sourceFilterOptionId(sourceFilterObjRef),
26
26
  title: getDisplayFormTitle({
@@ -1 +1 @@
1
- {"version":3,"file":"mapSourceMeasureFilterToOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceMeasureFilterToOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,OAAO,EACZ,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAWlF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,UAAU,qCAAqC;IAC3C,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yBAAyB,EAAE,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC1E,sBAAsB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC5E,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,yBAAyB,EAAE,CAAC;IAC7D,mCAAmC,EAAE,4BAA4B,EAAE,CAAC;IACpE,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,EAC3C,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,kBAAkB,EAClB,IAAI,GACP,EAAE,qCAAqC,GAAG,yBAAyB,GAAG,SAAS,CA2D/E"}
1
+ {"version":3,"file":"mapSourceMeasureFilterToOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapSourceMeasureFilterToOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,OAAO,EACZ,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAWlF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,UAAU,qCAAqC;IAC3C,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yBAAyB,EAAE,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAC1E,sBAAsB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC5E,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,yBAAyB,EAAE,CAAC;IAC7D,mCAAmC,EAAE,4BAA4B,EAAE,CAAC;IACpE,qCAAqC,EAAE,+BAA+B,EAAE,CAAC;IACzE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,EAC3C,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,kBAAkB,EAClB,IAAI,GACP,EAAE,qCAAqC,GAAG,yBAAyB,GAAG,SAAS,CA4D/E"}
@@ -15,7 +15,7 @@ export function mapSourceMeasureFilterToOption({ sourceMeasureFilter, allCatalog
15
15
  }
16
16
  // Measure filters are always list-type attribute filters (from execution model)
17
17
  const transferResult = canTransferAttributeFilterByDisplayForm(displayFormRef, false, // measure filters are list-type
18
- targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters);
18
+ targetDashboardAttributeFilters, targetDashboardAttributeFilterConfigs, targetDashboardTextAttributeFilters, allCatalogDisplayFormsMap);
19
19
  return {
20
20
  id: sourceFilterOptionId(sourceFilterObjRef),
21
21
  title: getDisplayFormTitle({
@@ -1604,7 +1604,7 @@ export declare function changeFilterContextSelection(filters: (IDashboardFilter
1604
1604
  * TODO: next major release can remove ByParams suffix and use this implementation instead of original cmd creator + other creators can be rewritten to use params object
1605
1605
  * https://gooddata.atlassian.net/browse/STL-700
1606
1606
  */
1607
- export declare function changeFilterContextSelectionByParams({ filters, attributeFilterConfigs, resetOthers, correlationId, tabLocalIdentifier, matchByLocalIdentifier, }: ChangeFilterContextSelectionParams): ChangeFilterContextSelection;
1607
+ export declare function changeFilterContextSelectionByParams({ filters, attributeFilterConfigs, resetOthers, correlationId, tabLocalIdentifier, matchByLocalIdentifier, restorePerTabOriginals, }: ChangeFilterContextSelectionParams): ChangeFilterContextSelection;
1608
1608
 
1609
1609
  /**
1610
1610
  * Params for {@link changeFilterContextSelectionByParams} command.
@@ -1628,6 +1628,13 @@ export declare type ChangeFilterContextSelectionParams = {
1628
1628
  * as a fallback. See {@link ChangeFilterContextSelectionPayload}. Defaults to false.
1629
1629
  */
1630
1630
  matchByLocalIdentifier?: boolean;
1631
+ /**
1632
+ * When true, other tabs restore their own saved initial filter values.
1633
+ * See {@link ChangeFilterContextSelectionPayload.restorePerTabOriginals}.
1634
+ *
1635
+ * @internal
1636
+ */
1637
+ restorePerTabOriginals?: boolean;
1631
1638
  };
1632
1639
 
1633
1640
  /**
@@ -1671,6 +1678,14 @@ export declare type ChangeFilterContextSelectionPayload = {
1671
1678
  * payload carries localIdentifiers.
1672
1679
  */
1673
1680
  matchByLocalIdentifier?: boolean;
1681
+ /**
1682
+ * When true, tabs other than the one this command addresses keep their own saved initial
1683
+ * filter values instead of receiving this payload. Used by filter reset when filters are
1684
+ * persisted across tabs.
1685
+ *
1686
+ * @internal
1687
+ */
1688
+ restorePerTabOriginals?: boolean;
1674
1689
  };
1675
1690
 
1676
1691
  /**
@@ -1999,8 +2014,9 @@ export declare function changeNestedLayoutSectionHeader(index: ILayoutSectionPat
1999
2014
  *
2000
2015
  * @remarks
2001
2016
  * Dispatching this command sets the provided parameter values as runtime overrides on the
2002
- * currently active tab. Only parameters already present on the active tab are affected; values
2003
- * for unknown parameter refs are ignored.
2017
+ * target tab, or the active tab when none is named. When persistent filters across tabs are
2018
+ * enabled, the same values are written to every tab that already defines the parameter.
2019
+ * Unknown parameter refs are ignored.
2004
2020
  *
2005
2021
  * Mirrors {@link changeFilterContextSelectionByParams} for parameters, so drill targets can
2006
2022
  * inherit the source dashboard's active parameter overrides.
@@ -2306,6 +2322,14 @@ export declare function createScheduledEmail(scheduledEmail: IAutomationMetadata
2306
2322
  */
2307
2323
  export declare function crossFiltering(insight: IInsight, drillDefinition: ICrossFiltering_2, drillEvent: IDashboardDrillEvent, correlationId?: string): ICrossFiltering;
2308
2324
 
2325
+ /**
2326
+ * Local identifiers of cross-filtering virtual filters keyed by tab local identifier.
2327
+ * Sourced from the drill slice, which reducers of the tabs slice cannot read.
2328
+ *
2329
+ * @internal
2330
+ */
2331
+ export declare type CrossFilteringLocalIdsByTab = Readonly<Record<string, readonly string[]>>;
2332
+
2309
2333
  /**
2310
2334
  * Type of a replacement for the alerting create/edit dialog — the shape expected by the
2311
2335
  * `AlertingDialogComponent` dashboard prop.
@@ -4006,6 +4030,22 @@ export declare type DashboardSavedPayload = {
4006
4030
  * If false, an existing dashboard was updated.
4007
4031
  */
4008
4032
  readonly newDashboard: boolean;
4033
+ /**
4034
+ * Identifier of the dashboard definition before it was persisted. This is present when an AI
4035
+ * dashboard draft was saved and can differ from the identifier of dashboard.
4036
+ *
4037
+ * @internal
4038
+ */
4039
+ readonly originalDashboardId?: string;
4040
+ /**
4041
+ * Draft insights persisted as part of the dashboard save.
4042
+ *
4043
+ * @internal
4044
+ */
4045
+ readonly savedInsights?: ReadonlyArray<{
4046
+ readonly originalInsightId: string;
4047
+ readonly savedInsightId: string;
4048
+ }>;
4009
4049
  };
4010
4050
 
4011
4051
  /**
@@ -6384,6 +6424,20 @@ export declare interface IAccessibleDashboardsState extends EntityState<IListedD
6384
6424
  isLoaded: boolean;
6385
6425
  }
6386
6426
 
6427
+ /**
6428
+ * Addable workspace parameter the dropdown's "parameters" tab offers (automation dialogs only).
6429
+ * `isFromDashboard` marks the ones with a control on the dashboard tab so they list first, `tags`
6430
+ * drive the tag groups.
6431
+ *
6432
+ * @internal
6433
+ */
6434
+ export declare interface IAddableParameter {
6435
+ ref: IdentifierRef;
6436
+ title: string;
6437
+ isFromDashboard: boolean;
6438
+ tags: string[];
6439
+ }
6440
+
6387
6441
  /**
6388
6442
  * @beta
6389
6443
  */
@@ -6948,7 +7002,7 @@ export declare interface IAlertFiltersContextValue {
6948
7002
  /**
6949
7003
  * Workspace parameters addable via the "+" menu. Empty when the feature is off.
6950
7004
  */
6951
- availableParameters: IAutomationParameter[];
7005
+ availableParameters: IAvailableAutomationParameter[];
6952
7006
  /**
6953
7007
  * Sets a parameter's value.
6954
7008
  */
@@ -7715,6 +7769,11 @@ export declare interface IApplyFilterViewPayload {
7715
7769
  */
7716
7770
  export declare interface IApplyWorkingSelectionPayload {
7717
7771
  readonly enableImmediateAttributeFilterDisplayAsLabelMigration?: boolean;
7772
+ /**
7773
+ * Cross-filtering virtual filters per tab. They are not mirrored to or from other tabs.
7774
+ */
7775
+ readonly crossFilteringLocalIdsByTab?: CrossFilteringLocalIdsByTab;
7776
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
7718
7777
  }
7719
7778
 
7720
7779
  /**
@@ -7819,7 +7878,7 @@ export declare interface IAttributeHierarchyModified extends IDashboardCommand {
7819
7878
  */
7820
7879
  export declare interface IAttributesDropdownProps extends IDashboardAttributeFilterPlaceholderProps {
7821
7880
  /** Addable workspace parameters (automation dialogs only). Renders a "parameters" tab. */
7822
- parameters?: IParameterDropdownListItem[];
7881
+ parameters?: IAddableParameter[];
7823
7882
  onParameterSelect?: (ref: IdentifierRef) => void;
7824
7883
  }
7825
7884
 
@@ -7964,7 +8023,7 @@ export declare interface IAutomationDialogFiltersProps {
7964
8023
  /**
7965
8024
  * Workspace parameters addable via the "+" menu.
7966
8025
  */
7967
- availableParameters?: IAutomationParameter[];
8026
+ availableParameters?: IAvailableAutomationParameter[];
7968
8027
  /**
7969
8028
  * Called when a parameter is added from the "+" menu.
7970
8029
  */
@@ -8230,8 +8289,12 @@ export declare interface IAutomationsContextValue {
8230
8289
  hiddenFilters: FilterContextItem[];
8231
8290
  /** Dashboard's applied filters with cross-filtering filters removed; from selectAllDashboardFiltersWithoutCrossFiltering. */
8232
8291
  availableFilters: FilterContextItem[];
8233
- /** Whether the user may not read the object a filter filters by. Such a filter is kept in the automation, but the filter bar reports it as a count instead of rendering it. */
8234
- isFilterRestricted: (filter: FilterContextItem) => boolean;
8292
+ /**
8293
+ * Whether a filter of the given tab (the active one when omitted) is restricted: it uses an object the
8294
+ * user may not read, or its parent filter is restricted. Such a filter is kept in the automation, but
8295
+ * the filter bar reports it as a count instead of rendering it.
8296
+ */
8297
+ isFilterRestricted: (filter: FilterContextItem, tabId?: string) => boolean;
8235
8298
  /** Automation-available filters structured per dashboard tab, for whole-dashboard automations on a tabbed dashboard; from selectAutomationFiltersByTab. */
8236
8299
  automationFiltersByTab: IAutomationFiltersTab[];
8237
8300
  /** Automation-available filters with empty (all-values) filters removed, except restricted ones; preselects filters for a new automation. From selectAutomationDefaultSelectedFilters. */
@@ -8410,6 +8473,17 @@ export declare interface IAutomationsState {
8410
8473
  allAutomationsCount: number;
8411
8474
  }
8412
8475
 
8476
+ /**
8477
+ * A workspace parameter the "+" menu offers; `isFromDashboard` marks the ones with a control on
8478
+ * the dashboard tab so the menu can list them first, `tags` drive the menu's tag groups.
8479
+ *
8480
+ * @internal
8481
+ */
8482
+ export declare interface IAvailableAutomationParameter extends IAutomationParameter {
8483
+ isFromDashboard: boolean;
8484
+ tags: string[];
8485
+ }
8486
+
8413
8487
  /**
8414
8488
  * @beta
8415
8489
  */
@@ -9022,6 +9096,11 @@ export declare type IChangeMeasureValueFilterConditionReducerPayload = {
9022
9096
  readonly localIdentifier: string;
9023
9097
  readonly conditions?: MeasureValueFilterCondition[];
9024
9098
  readonly isWorkingSelectionChange?: boolean;
9099
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
9100
+ /**
9101
+ * When true, other tabs restore their own saved initial condition instead of this payload.
9102
+ */
9103
+ readonly restoreTargetOriginal?: boolean;
9025
9104
  };
9026
9105
 
9027
9106
  /**
@@ -9033,7 +9112,7 @@ export declare interface IChangeMeasureValueFilterConfigModePayload {
9033
9112
  }
9034
9113
 
9035
9114
  /**
9036
- * Command for setting runtime parameter overrides on the currently active tab.
9115
+ * Command for setting runtime parameter overrides.
9037
9116
  *
9038
9117
  * @remarks
9039
9118
  * See {@link changeParameterValues} for a factory function that will help you create this command.
@@ -9179,6 +9258,15 @@ export declare interface IClearAttributeFiltersSelectionPayload {
9179
9258
  * If not provided, the active tab will be used.
9180
9259
  */
9181
9260
  readonly tabLocalIdentifier?: string;
9261
+ /**
9262
+ * When true, other tabs restore their own saved initial selection instead of clearing to All.
9263
+ */
9264
+ readonly restoreTargetOriginal?: boolean;
9265
+ /**
9266
+ * Cross-filtering virtual filters per tab. They are not mirrored to or from other tabs.
9267
+ */
9268
+ readonly crossFilteringLocalIdsByTab?: CrossFilteringLocalIdsByTab;
9269
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
9182
9270
  }
9183
9271
 
9184
9272
  /**
@@ -18261,7 +18349,7 @@ export declare interface IObjRefMapConfig<T> {
18261
18349
  }
18262
18350
 
18263
18351
  /**
18264
- * Addable workspace parameter offered in the dropdown's "parameters" tab (automation dialogs only).
18352
+ * Parameter row rendered in the dropdown's "parameters" tab.
18265
18353
  *
18266
18354
  * @internal
18267
18355
  */
@@ -19038,11 +19126,20 @@ export declare interface IReplaceAttributeFilterItemPayload {
19038
19126
  readonly filter: DashboardAttributeFilterItem;
19039
19127
  readonly isWorkingSelectionChange?: boolean;
19040
19128
  readonly isSelectionInvalid?: boolean;
19129
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
19041
19130
  /**
19042
19131
  * Optional tab local identifier to target a specific tab.
19043
19132
  * If not provided, the active tab will be used.
19044
19133
  */
19045
19134
  readonly tabLocalIdentifier?: string;
19135
+ /**
19136
+ * When true, other tabs restore their own saved initial filter instead of this payload.
19137
+ */
19138
+ readonly restoreTargetOriginal?: boolean;
19139
+ /**
19140
+ * Cross-filtering virtual filters per tab. They are not mirrored to or from other tabs.
19141
+ */
19142
+ readonly crossFilteringLocalIdsByTab?: CrossFilteringLocalIdsByTab;
19046
19143
  }
19047
19144
 
19048
19145
  /**
@@ -19877,7 +19974,7 @@ export declare interface IScheduledEmailDialogFiltersProps extends IAutomationDi
19877
19974
  /**
19878
19975
  * Addable workspace parameters per tab (by-tab mode).
19879
19976
  */
19880
- availableParametersByTab?: Record<string, IAutomationParameter[]>;
19977
+ availableParametersByTab?: Record<string, IAvailableAutomationParameter[]>;
19881
19978
  /**
19882
19979
  * Called when a parameter is added in a tab section (by-tab mode).
19883
19980
  */
@@ -20666,7 +20763,7 @@ export declare interface IScheduledExportFiltersContextValue {
20666
20763
  /**
20667
20764
  * Per-tab workspace parameters addable via the "+" menu.
20668
20765
  */
20669
- availableParametersByTab: Record<string, IAutomationParameter[]>;
20766
+ availableParametersByTab: Record<string, IAvailableAutomationParameter[]>;
20670
20767
  /**
20671
20768
  * The tab the flat (non-tabbed) UI edits; undefined for multi-tab dashboards or when no
20672
20769
  * parameter context applies.
@@ -22468,8 +22565,13 @@ export declare interface ISetParameterRuntimeValuesPayload {
22468
22565
  values: IParameterValueChange[];
22469
22566
  /**
22470
22567
  * Target tab. When omitted, the active tab is used.
22568
+ * With `enablePersistentFiltersAcrossTabs`, this tab is the source and every other tab is written too.
22471
22569
  */
22472
22570
  tabLocalIdentifier?: string;
22571
+ /**
22572
+ * When true, write the values onto every tab. A tab that does not define the parameter is unchanged.
22573
+ */
22574
+ enablePersistentFiltersAcrossTabs?: boolean;
22473
22575
  }
22474
22576
 
22475
22577
  /**
@@ -23519,6 +23621,15 @@ export declare interface IUpdateAttributeFilterSelectionPayload {
23519
23621
  * If not provided, the active tab will be used.
23520
23622
  */
23521
23623
  readonly tabLocalIdentifier?: string;
23624
+ /**
23625
+ * When true, other tabs restore their own saved initial selection instead of this payload.
23626
+ */
23627
+ readonly restoreTargetOriginal?: boolean;
23628
+ /**
23629
+ * Cross-filtering virtual filters per tab. They are not mirrored to or from other tabs.
23630
+ */
23631
+ readonly crossFilteringLocalIdsByTab?: CrossFilteringLocalIdsByTab;
23632
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
23522
23633
  }
23523
23634
 
23524
23635
  /**
@@ -23553,11 +23664,16 @@ export declare interface IUpsertDateFilterAllTimePayload {
23553
23664
  readonly isWorkingSelectionChange?: boolean;
23554
23665
  readonly localIdentifier?: string;
23555
23666
  readonly emptyValueHandling?: EmptyValues;
23667
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
23556
23668
  /**
23557
23669
  * Optional tab local identifier to target a specific tab.
23558
23670
  * If not provided, the active tab will be used.
23559
23671
  */
23560
23672
  readonly tabLocalIdentifier?: string;
23673
+ /**
23674
+ * When true, other tabs restore their own saved initial date filter instead of this payload.
23675
+ */
23676
+ readonly restoreTargetOriginal?: boolean;
23561
23677
  }
23562
23678
 
23563
23679
  /**
@@ -23573,11 +23689,16 @@ export declare interface IUpsertDateFilterNonAllTimePayload {
23573
23689
  readonly localIdentifier?: string;
23574
23690
  readonly boundedFilter?: IUpperBoundedFilter | ILowerBoundedFilter;
23575
23691
  readonly emptyValueHandling?: EmptyValues;
23692
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
23576
23693
  /**
23577
23694
  * Optional tab local identifier to target a specific tab.
23578
23695
  * If not provided, the active tab will be used.
23579
23696
  */
23580
23697
  readonly tabLocalIdentifier?: string;
23698
+ /**
23699
+ * When true, other tabs restore their own saved initial date filter instead of this payload.
23700
+ */
23701
+ readonly restoreTargetOriginal?: boolean;
23581
23702
  }
23582
23703
 
23583
23704
  /**
@@ -28249,6 +28370,13 @@ export declare const selectDeleteVisible: DashboardSelector<boolean>;
28249
28370
  */
28250
28371
  export declare const selectDisableDashboardCrossFiltering: DashboardSelector<boolean>;
28251
28372
 
28373
+ /**
28374
+ * Selects whether dashboard persisted filters are disabled.
28375
+ *
28376
+ * @alpha
28377
+ */
28378
+ export declare const selectDisableDashboardPersistentFiltersAcrossTabs: DashboardSelector<boolean>;
28379
+
28252
28380
  /**
28253
28381
  * Selects whether user filter reset is disabled.
28254
28382
  *
@@ -28626,6 +28754,13 @@ export declare const selectEnableOrchestratedTabularExports: DashboardSelector<b
28626
28754
  */
28627
28755
  export declare const selectEnableParameters: DashboardSelector<boolean>;
28628
28756
 
28757
+ /**
28758
+ * Selects whether persistent filters across tabs are enabled.
28759
+ *
28760
+ * @alpha
28761
+ */
28762
+ export declare const selectEnablePersistentFiltersAcrossTabs: DashboardSelector<boolean>;
28763
+
28629
28764
  /**
28630
28765
  * Returns whether rich text widget filter configuration is enabled.
28631
28766
  *
@@ -30344,7 +30479,8 @@ export declare const selectRenderMode: DashboardSelector<RenderMode>;
30344
30479
  export declare const selectRestrictedDashboardFilterCount: DashboardSelector<number>;
30345
30480
 
30346
30481
  /**
30347
- * Selects local identifiers of filters the current user is forbidden to access.
30482
+ * Selects local identifiers of filters the current user is forbidden to access: the ones using an object
30483
+ * the user may not read and, transitively, their child filters.
30348
30484
  *
30349
30485
  * @alpha
30350
30486
  */
@@ -31531,6 +31667,8 @@ readonly setMeasureValueFilterDimensionality: (state: WritableDraft<ITabsState>,
31531
31667
  payload: {
31532
31668
  readonly localIdentifier: string;
31533
31669
  readonly dimensionality?: ObjRef[];
31670
+ readonly restoreTargetOriginal?: boolean;
31671
+ readonly enablePersistentFiltersAcrossTabs?: boolean;
31534
31672
  };
31535
31673
  type: string;
31536
31674
  }) => void | ITabsState | WritableDraft<ITabsState>;