@gooddata/sdk-ui-dashboard 11.71.0-alpha.0 → 11.71.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 (312) hide show
  1. package/NOTICE +49 -49
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts +0 -7
  5. package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts.map +1 -1
  6. package/esm/_staging/dashboard/absoluteGranularityDateFilters.js +0 -17
  7. package/esm/_staging/dashboard/dashboardFilterContext.d.ts.map +1 -1
  8. package/esm/_staging/dashboard/dashboardFilterContext.js +9 -1
  9. package/esm/_staging/dashboard/dashboardFilterConverter.d.ts.map +1 -1
  10. package/esm/_staging/dashboard/dashboardFilterConverter.js +13 -5
  11. package/esm/_staging/dashboard/parameterizedDateFilters.d.ts +1 -6
  12. package/esm/_staging/dashboard/parameterizedDateFilters.d.ts.map +1 -1
  13. package/esm/_staging/dashboard/parameterizedDateFilters.js +1 -13
  14. package/esm/_staging/dateFilterConfig/periodPresets.d.ts +11 -0
  15. package/esm/_staging/dateFilterConfig/periodPresets.d.ts.map +1 -0
  16. package/esm/_staging/dateFilterConfig/periodPresets.js +15 -0
  17. package/esm/_staging/sharedHooks/useDateFiltersTitles.d.ts +2 -2
  18. package/esm/_staging/sharedHooks/useDateFiltersTitles.d.ts.map +1 -1
  19. package/esm/_staging/sharedHooks/useDateFiltersTitles.js +7 -5
  20. package/esm/_staging/sharedHooks/useFiltersNamings.d.ts.map +1 -1
  21. package/esm/_staging/sharedHooks/useFiltersNamings.js +18 -10
  22. package/esm/index.d.ts +4 -4
  23. package/esm/index.d.ts.map +1 -1
  24. package/esm/index.js +3 -3
  25. package/esm/kdaDialog/components/KdaSummaryHeadline.d.ts.map +1 -1
  26. package/esm/kdaDialog/components/KdaSummaryHeadline.js +3 -1
  27. package/esm/kdaDialog/components/bars/DateBar.js +1 -1
  28. package/esm/kdaDialog/composition/KeyDriversPanel.d.ts.map +1 -1
  29. package/esm/kdaDialog/composition/KeyDriversPanel.js +5 -2
  30. package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
  31. package/esm/kdaDialog/dialog/KdaDialog.js +4 -3
  32. package/esm/kdaDialog/dialog/KdaDialogActionButtons.d.ts +5 -1
  33. package/esm/kdaDialog/dialog/KdaDialogActionButtons.d.ts.map +1 -1
  34. package/esm/kdaDialog/dialog/KdaDialogActionButtons.js +33 -5
  35. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts +5 -1
  36. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts.map +1 -1
  37. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.js +2 -2
  38. package/esm/kdaDialog/dialog/KdaReplaceConfirmationDialog.d.ts.map +1 -1
  39. package/esm/kdaDialog/dialog/KdaReplaceConfirmationDialog.js +9 -1
  40. package/esm/kdaDialog/utils.d.ts +6 -1
  41. package/esm/kdaDialog/utils.d.ts.map +1 -1
  42. package/esm/kdaDialog/utils.js +7 -2
  43. package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.d.ts.map +1 -1
  44. package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.js +5 -10
  45. package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.d.ts.map +1 -1
  46. package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.js +8 -6
  47. package/esm/model/commandHandlers/dashboard/changeDateFilterWithDimensionModeHandler.d.ts.map +1 -1
  48. package/esm/model/commandHandlers/dashboard/changeDateFilterWithDimensionModeHandler.js +10 -6
  49. package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
  50. package/esm/model/commandHandlers/dashboard/common/filterViews.js +28 -29
  51. package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts.map +1 -1
  52. package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +7 -8
  53. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
  54. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +0 -6
  55. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts +1 -2
  56. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts.map +1 -1
  57. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.js +1 -2
  58. package/esm/model/commandHandlers/drill/crossFilteringHandler.d.ts.map +1 -1
  59. package/esm/model/commandHandlers/drill/crossFilteringHandler.js +1 -0
  60. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +5 -6
  61. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
  62. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +81 -64
  63. package/esm/model/commandHandlers/filterContext/dateFilter/addDateFilterHandler.js +2 -2
  64. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
  65. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +2 -6
  66. package/esm/model/commandHandlers/filterContext/dateFilter/moveDateFilterHandler.d.ts.map +1 -1
  67. package/esm/model/commandHandlers/filterContext/dateFilter/moveDateFilterHandler.js +8 -4
  68. package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.d.ts.map +1 -1
  69. package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.js +21 -17
  70. package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.d.ts +2 -2
  71. package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.d.ts.map +1 -1
  72. package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.js +2 -2
  73. package/esm/model/commandHandlers/filterContext/filterViewHandler.d.ts.map +1 -1
  74. package/esm/model/commandHandlers/filterContext/filterViewHandler.js +1 -11
  75. package/esm/model/commandHandlers/filterContext/removeRestrictedFiltersHandler.d.ts.map +1 -1
  76. package/esm/model/commandHandlers/filterContext/removeRestrictedFiltersHandler.js +3 -3
  77. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -1
  78. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +13 -6
  79. package/esm/model/commandHandlers/widgets/changeInsightWidgetFilterSettingsHandler.d.ts.map +1 -1
  80. package/esm/model/commandHandlers/widgets/changeInsightWidgetFilterSettingsHandler.js +2 -2
  81. package/esm/model/commandHandlers/widgets/changeRichTextWidgetFilterSettingsHandler.d.ts.map +1 -1
  82. package/esm/model/commandHandlers/widgets/changeRichTextWidgetFilterSettingsHandler.js +2 -2
  83. package/esm/model/commandHandlers/widgets/common/filterOperations.d.ts +3 -3
  84. package/esm/model/commandHandlers/widgets/common/filterOperations.d.ts.map +1 -1
  85. package/esm/model/commandHandlers/widgets/common/filterOperations.js +14 -14
  86. package/esm/model/commandHandlers/widgets/common/filterReferences.d.ts +2 -2
  87. package/esm/model/commandHandlers/widgets/common/filterReferences.d.ts.map +1 -1
  88. package/esm/model/commandHandlers/widgets/common/filterReferences.js +1 -1
  89. package/esm/model/commandHandlers/widgets/validation/filterValidation.d.ts +2 -2
  90. package/esm/model/commandHandlers/widgets/validation/filterValidation.d.ts.map +1 -1
  91. package/esm/model/commandHandlers/widgets/validation/filterValidation.js +4 -4
  92. package/esm/model/commands/filters.d.ts +1 -2
  93. package/esm/model/commands/filters.d.ts.map +1 -1
  94. package/esm/model/events/base.d.ts +1 -1
  95. package/esm/model/events/base.d.ts.map +1 -1
  96. package/esm/model/events/filters.d.ts +107 -0
  97. package/esm/model/events/filters.d.ts.map +1 -1
  98. package/esm/model/events/filters.js +54 -0
  99. package/esm/model/events/index.d.ts +2 -2
  100. package/esm/model/events/index.d.ts.map +1 -1
  101. package/esm/model/events/insight.d.ts +12 -2
  102. package/esm/model/events/insight.d.ts.map +1 -1
  103. package/esm/model/events/insight.js +2 -1
  104. package/esm/model/events/richText.d.ts +12 -2
  105. package/esm/model/events/richText.d.ts.map +1 -1
  106. package/esm/model/events/richText.js +2 -1
  107. package/esm/model/react/useWidgetFilters.d.ts.map +1 -1
  108. package/esm/model/react/useWidgetFilters.js +8 -10
  109. package/esm/model/store/config/configSelectors.d.ts +6 -0
  110. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  111. package/esm/model/store/config/configSelectors.js +8 -0
  112. package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
  113. package/esm/model/store/filtering/dashboardFilterSelectors.js +20 -39
  114. package/esm/model/store/insights/insightsSelectors.d.ts.map +1 -1
  115. package/esm/model/store/insights/insightsSelectors.js +9 -3
  116. package/esm/model/store/meta/metaSelectors.js +3 -3
  117. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +28 -2
  118. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
  119. package/esm/model/store/tabs/filterContext/filterContextReducers.js +36 -25
  120. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts +43 -3
  121. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts.map +1 -1
  122. package/esm/model/store/tabs/filterContext/filterContextSelectors.js +53 -9
  123. package/esm/model/store/tabs/filterContext/filterContextUtils.d.ts.map +1 -1
  124. package/esm/model/store/tabs/filterContext/filterContextUtils.js +18 -20
  125. package/esm/model/store/tabs/filterContext/filterSync.d.ts +7 -0
  126. package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
  127. package/esm/model/store/tabs/filterContext/filterSync.js +32 -44
  128. package/esm/model/utils/widgetFilters.d.ts.map +1 -1
  129. package/esm/model/utils/widgetFilters.js +4 -3
  130. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  131. package/esm/presentation/automations/connectors/AlertingConnector.js +6 -0
  132. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
  133. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +6 -0
  134. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts +1 -0
  135. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts.map +1 -1
  136. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.js +56 -2
  137. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  138. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +4 -1
  139. package/esm/presentation/automations/connectors/hooks/useParameterizedDateFilterBlocksAutomation.d.ts +10 -0
  140. package/esm/presentation/automations/connectors/hooks/useParameterizedDateFilterBlocksAutomation.d.ts.map +1 -0
  141. package/esm/presentation/automations/connectors/hooks/useParameterizedDateFilterBlocksAutomation.js +20 -0
  142. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +2 -0
  143. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  144. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts.map +1 -1
  145. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.js +5 -3
  146. package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts.map +1 -1
  147. package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.js +6 -4
  148. package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts +2 -1
  149. package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts.map +1 -1
  150. package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.js +43 -7
  151. package/esm/presentation/automations/shared/components/ParameterizedDateFilterNotSupportedDialog.d.ts +12 -0
  152. package/esm/presentation/automations/shared/components/ParameterizedDateFilterNotSupportedDialog.d.ts.map +1 -0
  153. package/esm/presentation/automations/shared/components/ParameterizedDateFilterNotSupportedDialog.js +31 -0
  154. package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -1
  155. package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +1 -0
  156. package/esm/presentation/constants/automations.d.ts +1 -0
  157. package/esm/presentation/constants/automations.d.ts.map +1 -1
  158. package/esm/presentation/constants/automations.js +19 -0
  159. package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
  160. package/esm/presentation/dashboard/components/DashboardInner.js +18 -10
  161. package/esm/presentation/dragAndDrop/draggableDateFilter/DefaultDateFilterDraggingComponent.d.ts.map +1 -1
  162. package/esm/presentation/dragAndDrop/draggableDateFilter/DefaultDateFilterDraggingComponent.js +3 -2
  163. package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts +3 -3
  164. package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts.map +1 -1
  165. package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.js +1 -1
  166. package/esm/presentation/dragAndDrop/draggableFilterDropZone/DraggableFilterDropZoneHint.d.ts.map +1 -1
  167. package/esm/presentation/dragAndDrop/draggableFilterDropZone/DraggableFilterDropZoneHint.js +2 -2
  168. package/esm/presentation/dragAndDrop/types.d.ts +2 -2
  169. package/esm/presentation/dragAndDrop/types.d.ts.map +1 -1
  170. package/esm/presentation/dragAndDrop/useFilterDeleteDrop.d.ts.map +1 -1
  171. package/esm/presentation/dragAndDrop/useFilterDeleteDrop.js +2 -2
  172. package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.d.ts.map +1 -1
  173. package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.js +3 -3
  174. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.d.ts +15 -3
  175. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.d.ts.map +1 -1
  176. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.js +27 -31
  177. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.d.ts +3 -3
  178. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.d.ts.map +1 -1
  179. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.js +3 -2
  180. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.d.ts +2 -2
  181. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.d.ts.map +1 -1
  182. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/AddLimitingItemDialog.d.ts +2 -2
  183. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/AddLimitingItemDialog.d.ts.map +1 -1
  184. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/DateFiltersPage.d.ts +2 -2
  185. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/DateFiltersPage.d.ts.map +1 -1
  186. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/DateFiltersPage.js +1 -1
  187. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.d.ts +2 -2
  188. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.d.ts.map +1 -1
  189. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.d.ts +3 -3
  190. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.d.ts.map +1 -1
  191. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.js +2 -4
  192. package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
  193. package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +42 -20
  194. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
  195. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +10 -7
  196. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.d.ts.map +1 -1
  197. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.js +3 -3
  198. package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
  199. package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +13 -4
  200. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.d.ts.map +1 -1
  201. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +9 -8
  202. package/esm/presentation/filterBar/filterBar/filterGroupUtils.js +3 -3
  203. package/esm/presentation/filterBar/filterBar/filterViews/FilterViews.d.ts.map +1 -1
  204. package/esm/presentation/filterBar/filterBar/filterViews/FilterViews.js +13 -2
  205. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
  206. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +5 -1
  207. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts +3 -3
  208. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts.map +1 -1
  209. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.js +9 -9
  210. package/esm/presentation/filterBar/utils.d.ts.map +1 -1
  211. package/esm/presentation/filterBar/utils.js +2 -2
  212. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +13 -0
  213. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  214. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +20 -7
  215. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +13 -0
  216. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  217. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +13 -0
  218. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +13 -0
  219. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  220. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +15 -2
  221. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +20 -0
  222. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  223. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +20 -0
  224. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +13 -0
  225. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  226. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +14 -1
  227. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +13 -0
  228. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  229. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +15 -2
  230. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +13 -0
  231. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  232. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +13 -0
  233. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +13 -0
  234. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  235. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +16 -3
  236. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +13 -0
  237. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  238. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +16 -3
  239. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +13 -0
  240. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  241. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +13 -0
  242. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +13 -0
  243. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  244. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +17 -4
  245. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +13 -0
  246. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  247. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +13 -0
  248. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +13 -0
  249. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  250. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +14 -1
  251. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +13 -0
  252. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  253. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +17 -4
  254. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +13 -0
  255. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  256. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +13 -0
  257. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +13 -0
  258. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  259. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +15 -2
  260. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +13 -0
  261. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  262. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +20 -7
  263. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +13 -0
  264. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  265. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +13 -0
  266. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +13 -0
  267. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  268. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +13 -0
  269. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +13 -0
  270. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  271. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +13 -0
  272. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +13 -0
  273. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  274. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +13 -0
  275. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +13 -0
  276. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  277. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +13 -0
  278. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +13 -0
  279. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  280. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +13 -0
  281. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +13 -0
  282. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  283. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +22 -9
  284. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +13 -0
  285. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  286. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +14 -1
  287. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +13 -0
  288. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  289. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +17 -4
  290. package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
  291. package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +33 -6
  292. package/esm/presentation/widget/common/configuration/DateDatasetFilter.js +2 -2
  293. package/esm/presentation/widget/common/configuration/FilterConfiguration.d.ts.map +1 -1
  294. package/esm/presentation/widget/common/configuration/FilterConfiguration.js +5 -4
  295. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.d.ts.map +1 -1
  296. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +9 -2
  297. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
  298. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +3 -21
  299. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getDrillDialogInsightDescription.d.ts +6 -0
  300. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getDrillDialogInsightDescription.d.ts.map +1 -0
  301. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getDrillDialogInsightDescription.js +24 -0
  302. package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.d.ts.map +1 -1
  303. package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.js +3 -3
  304. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.d.ts.map +1 -1
  305. package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.js +5 -4
  306. package/esm/sdk-ui-dashboard.d.ts +231 -14
  307. package/package.json +23 -23
  308. package/styles/css/kdaDialog.css +7 -0
  309. package/styles/css/kdaDialog.css.map +1 -1
  310. package/styles/css/main.css +17 -0
  311. package/styles/css/main.css.map +1 -1
  312. package/styles/scss/kdaDialog.scss +11 -0
@@ -34,6 +34,7 @@ export function KdaDialog({ className, showCloseButton = true, parentOverlayCont
34
34
  const metric = state.definition?.metric.measure;
35
35
  const title = metric?.alias ?? metric?.title ?? "";
36
36
  const detailsId = useId();
37
+ const toggleButtonId = useId();
37
38
  const minimizedAlignPoints = useMemo(() => (isMinimized ? [{ align: "tc tc", offset: { x: 0, y: 30 } }] : undefined), [isMinimized]);
38
39
  const accessibilityConfig = useKdaDialogAccessibility(title, isMinimized, titleElementId);
39
40
  const dialogBaseClassName = cx(accessibilityConfig.dialogId, className);
@@ -47,18 +48,18 @@ export function KdaDialog({ className, showCloseButton = true, parentOverlayCont
47
48
  useChangeAnalysis();
48
49
  useValidAttributes();
49
50
  const closeOnEscape = useCloseOnEscape();
50
- return (_jsxs(OverlayControllerProvider, { overlayController: effectiveOverlayController, children: [_jsx(KdaDialogStatusAnnouncer, { dialogTitle: accessibilityConfig.title, status: status, isMinimized: isMinimized }), isMinimized ? (_jsx(Dialog, { autofocusOnOpen: true, initialFocus: accessibilityConfig.descriptionElementId, className: cx(dialogBaseClassName, "gd-kda-dialog--minimized", {
51
+ return (_jsxs(OverlayControllerProvider, { overlayController: effectiveOverlayController, children: [_jsx(KdaDialogStatusAnnouncer, { dialogTitle: accessibilityConfig.title, status: status, isMinimized: isMinimized }), isMinimized ? (_jsx(Dialog, { autofocusOnOpen: true, initialFocus: toggleButtonId, className: cx(dialogBaseClassName, "gd-kda-dialog--minimized", {
51
52
  [`gd-kda-dialog--minimized--${status}`]: true,
52
53
  }), closeOnEscape: false, isModal: false, alignPoints: minimizedAlignPoints, accessibilityConfig: {
53
54
  ...accessibilityConfig,
54
55
  titleElementId: accessibilityConfig.labelElementId,
55
56
  title: undefined,
56
- }, displayCloseButton: displayCloseButton, onClose: onClose, CloseButton: KdaDialogControls, dataTestId: KDA_DIALOG_MINIMIZED_DATA_TEST_ID, children: _jsx(KdaDialogFloatingStatusBar, { labelElementId: accessibilityConfig.labelElementId, dialogTitle: accessibilityConfig.title, descriptionElementId: accessibilityConfig.descriptionElementId, status: status, onClose: onClose }) })) : (_jsx(Dialog, { className: cx(dialogBaseClassName, "gd-kda-dialog--expanded"), closeOnEscape: closeOnEscape, isModal: true, accessibilityConfig: {
57
+ }, displayCloseButton: displayCloseButton, onClose: onClose, CloseButton: KdaDialogControls, dataTestId: KDA_DIALOG_MINIMIZED_DATA_TEST_ID, children: _jsx(KdaDialogFloatingStatusBar, { labelElementId: accessibilityConfig.labelElementId, dialogTitle: accessibilityConfig.title, descriptionElementId: accessibilityConfig.descriptionElementId, status: status, toggleButtonId: toggleButtonId, onClose: onClose }) }, "minimized")) : (_jsx(Dialog, { className: cx(dialogBaseClassName, "gd-kda-dialog--expanded"), closeOnEscape: closeOnEscape, isModal: true, accessibilityConfig: {
57
58
  ...accessibilityConfig,
58
59
  title: undefined,
59
60
  // The visible header title names the expanded dialog. It is not used as
60
61
  // a description, so the header controls do not repeat it on every focus.
61
62
  titleElementId: accessibilityConfig.descriptionElementId,
62
63
  descriptionElementId: undefined,
63
- }, displayCloseButton: displayCloseButton, onClose: onClose, CloseButton: KdaDialogControls, dataTestId: KDA_DIALOG_EXPANDED_DATA_TEST_ID, children: _jsx(KdaDialogSections, { header: _jsx(KdaHeader, { titleId: accessibilityConfig.descriptionElementId, title: accessibilityConfig.title, bars: _jsxs(_Fragment, { children: [_jsx(MetricsBar, {}), _jsx(FiltersBar, {})] }) }), content: _jsx(KdaContent, { contentError: (err) => (_jsx(KdaErrorComponent, { type: KdaErrorType.Items, error: err })), leftContent: _jsx(KeyDriversPanel, { detailsId: detailsId }), leftLoader: _jsx(KeyDriversPanel, { detailsId: detailsId, loading: true }), rightContent: _jsx(KeyDriversOverview, { detailsId: detailsId }), rightLoader: _jsx(KeyDriversOverview, { loading: true }), rightError: (err) => (_jsx(KdaErrorComponent, { type: KdaErrorType.Details, error: err })) }), footer: _jsx(KdaFooter, { content: _jsx(KeyDriversFooter, {}), onClose: onClose }) }) }))] }));
64
+ }, displayCloseButton: displayCloseButton, onClose: onClose, CloseButton: KdaDialogControls, dataTestId: KDA_DIALOG_EXPANDED_DATA_TEST_ID, children: _jsx(KdaDialogSections, { header: _jsx(KdaHeader, { titleId: accessibilityConfig.descriptionElementId, title: accessibilityConfig.title, bars: _jsxs(_Fragment, { children: [_jsx(MetricsBar, {}), _jsx(FiltersBar, {})] }) }), content: _jsx(KdaContent, { contentError: (err) => (_jsx(KdaErrorComponent, { type: KdaErrorType.Items, error: err })), leftContent: _jsx(KeyDriversPanel, { detailsId: detailsId }), leftLoader: _jsx(KeyDriversPanel, { detailsId: detailsId, loading: true }), rightContent: _jsx(KeyDriversOverview, { detailsId: detailsId }), rightLoader: _jsx(KeyDriversOverview, { loading: true }), rightError: (err) => (_jsx(KdaErrorComponent, { type: KdaErrorType.Details, error: err })) }), footer: _jsx(KdaFooter, { content: _jsx(KeyDriversFooter, {}), onClose: onClose }) }) }, "expanded"))] }));
64
65
  }
@@ -4,6 +4,10 @@ export interface IKdaDialogActionButtonsProps {
4
4
  status?: "done" | "error" | string;
5
5
  titleElementId?: string;
6
6
  toggleAriaDescribedBy?: string;
7
+ /**
8
+ * Id of the expand / minimize toggle button.
9
+ */
10
+ toggleButtonId?: string;
7
11
  onClose?: () => void;
8
12
  className?: string;
9
13
  }
@@ -12,5 +16,5 @@ export interface IKdaDialogActionButtonsProps {
12
16
  *
13
17
  * @internal
14
18
  */
15
- export declare function KdaDialogActionButtons({ size, onClose, className, status, titleElementId, toggleAriaDescribedBy, }: IKdaDialogActionButtonsProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function KdaDialogActionButtons({ size, onClose, className, status, titleElementId, toggleAriaDescribedBy, toggleButtonId, }: IKdaDialogActionButtonsProps): import("react/jsx-runtime").JSX.Element;
16
20
  //# sourceMappingURL=KdaDialogActionButtons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KdaDialogActionButtons.d.ts","sourceRoot":"","sources":["../../../src/kdaDialog/dialog/KdaDialogActionButtons.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,0BAA0B,CAAC;IAEjC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAc,EACd,qBAAqB,GACxB,EAAE,4BAA4B,2CA4B9B"}
1
+ {"version":3,"file":"KdaDialogActionButtons.d.ts","sourceRoot":"","sources":["../../../src/kdaDialog/dialog/KdaDialogActionButtons.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,0BAA0B,CAAC;IAEjC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,cAAc,GACjB,EAAE,4BAA4B,2CA6B9B"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2025-2026 GoodData Corporation
3
+ import { useCallback, useRef } from "react";
3
4
  import cx from "classnames";
4
5
  import { defineMessages, useIntl } from "react-intl";
5
6
  import { UiButton, UiIconButton } from "@gooddata/sdk-ui-kit";
@@ -9,7 +10,7 @@ import { useKdaState } from "../providers/KdaState.js";
9
10
  *
10
11
  * @internal
11
12
  */
12
- export function KdaDialogActionButtons({ size, onClose, className, status, titleElementId, toggleAriaDescribedBy, }) {
13
+ export function KdaDialogActionButtons({ size, onClose, className, status, titleElementId, toggleAriaDescribedBy, toggleButtonId, }) {
13
14
  const intl = useIntl();
14
15
  const { state, setState } = useKdaState();
15
16
  const { isMinimized } = state;
@@ -19,23 +20,50 @@ export function KdaDialogActionButtons({ size, onClose, className, status, title
19
20
  const handleToggle = () => {
20
21
  setState({ isMinimized: !isMinimized });
21
22
  };
22
- return (_jsx(KdaDialogActionButtonsView, { className: className, status: status, size: size, titleElementId: titleElementId, toggleAriaDescribedBy: toggleAriaDescribedBy, isMinimized: isMinimized, expandLabel: expandLabel, shrinkLabel: shrinkLabel, closeLabel: closeLabel, onToggle: handleToggle, onClose: onClose }));
23
+ return (_jsx(KdaDialogActionButtonsView, { className: className, status: status, size: size, titleElementId: titleElementId, toggleAriaDescribedBy: toggleAriaDescribedBy, toggleButtonId: toggleButtonId, isMinimized: isMinimized, expandLabel: expandLabel, shrinkLabel: shrinkLabel, closeLabel: closeLabel, onToggle: handleToggle, onClose: onClose }));
23
24
  }
24
25
  // oxlint-disable-next-line typescript-eslint/no-redundant-type-constituents
25
26
  const buttonMessages = defineMessages({
26
27
  done: { id: "kdaDialog.floatingStatus.done.opener" },
27
28
  error: { id: "kdaDialog.floatingStatus.error.opener" },
28
29
  });
30
+ /**
31
+ * When the analysis finishes while the dialog is minimized, the toggle button is replaced
32
+ * (the expand icon button becomes the Open button). If the replaced button had focus, move
33
+ * focus to its replacement so keyboard users do not lose their place. Focus elsewhere is left alone.
34
+ *
35
+ * Focus is handed over in the same commit, as the replacement mounts. The shared autofocus
36
+ * (`useUiAutofocusConnectors`) cannot be used here: it focuses in a later animation frame, so focus
37
+ * would drop to the page body in between and screen readers would re-enter and re-announce the dialog.
38
+ */
39
+ function useToggleFocusKeeper() {
40
+ const elementRef = useRef(null);
41
+ const hadFocusRef = useRef(false);
42
+ return useCallback((element) => {
43
+ if (element) {
44
+ elementRef.current = element;
45
+ if (hadFocusRef.current) {
46
+ hadFocusRef.current = false;
47
+ element.focus();
48
+ }
49
+ return;
50
+ }
51
+ // React detaches the ref before it removes the button from the DOM, so it still has focus here.
52
+ hadFocusRef.current = !!elementRef.current && elementRef.current === document.activeElement;
53
+ elementRef.current = null;
54
+ }, []);
55
+ }
29
56
  function KdaDialogActionButtonsView(props) {
30
- const { size, status, isMinimized, expandLabel, titleElementId, toggleAriaDescribedBy, shrinkLabel, closeLabel, onToggle, onClose, className, } = props;
57
+ const { size, status, isMinimized, expandLabel, titleElementId, toggleAriaDescribedBy, toggleButtonId, shrinkLabel, closeLabel, onToggle, onClose, className, } = props;
31
58
  const intl = useIntl();
32
59
  const text = status && buttonMessages[status] ? intl.formatMessage(buttonMessages[status]) : "";
33
60
  const isFinished = status === "done" || status === "error";
61
+ const toggleRef = useToggleFocusKeeper();
34
62
  const toggleDescribedBy = toggleAriaDescribedBy ?? titleElementId;
35
63
  const expandedHeaderDescribedBy = isMinimized ? undefined : toggleDescribedBy;
36
- return (_jsxs("div", { className: cx("gd-kda-dialog-action-buttons", `gd-kda-dialog-action-buttons--size-${size}`, className), children: [_jsx("div", { className: cx("gd-kda-dialog-action-buttons__button", isMinimized ? "s-kda-dialog-expand-button" : "s-kda-dialog-minimize-button", status), children: isMinimized && isFinished ? (_jsx("div", { className: "gd-kda-dialog-action-buttons__button__open", children: _jsx(UiButton, { label: text, accessibilityConfig: {
64
+ return (_jsxs("div", { className: cx("gd-kda-dialog-action-buttons", `gd-kda-dialog-action-buttons--size-${size}`, className), children: [_jsx("div", { className: cx("gd-kda-dialog-action-buttons__button", isMinimized ? "s-kda-dialog-expand-button" : "s-kda-dialog-minimize-button", status), children: isMinimized && isFinished ? (_jsx("div", { className: "gd-kda-dialog-action-buttons__button__open", children: _jsx(UiButton, { ref: toggleRef, id: toggleButtonId, label: text, accessibilityConfig: {
37
65
  ariaDescribedBy: toggleDescribedBy,
38
- }, variant: "tooltip", size: "medium", onClick: onToggle }) })) : (_jsx(UiIconButton, { label: isMinimized ? expandLabel : shrinkLabel, icon: isMinimized ? "expand" : "shrink", accessibilityConfig: {
66
+ }, variant: "tooltip", size: "medium", onClick: onToggle }) })) : (_jsx(UiIconButton, { ref: toggleRef, id: toggleButtonId, label: isMinimized ? expandLabel : shrinkLabel, icon: isMinimized ? "expand" : "shrink", accessibilityConfig: {
39
67
  ariaDescribedBy: toggleDescribedBy,
40
68
  ariaLabel: isMinimized ? expandLabel : shrinkLabel,
41
69
  }, iconColor: "complementary-7", variant: "tertiary", size: size, onClick: onToggle })) }), _jsx("div", { className: cx("gd-kda-dialog-action-buttons__divider", status) }), _jsx("div", { className: cx("gd-kda-dialog-action-buttons__button", "s-dialog-close-button", "s-kda-dialog-close-button", status), children: _jsx(UiIconButton, { label: closeLabel, icon: "cross", variant: "tertiary", size: size, onClick: onClose, accessibilityConfig: expandedHeaderDescribedBy ? { ariaDescribedBy: expandedHeaderDescribedBy } : undefined, iconColor: isFinished ? "complementary-0" : "complementary-7" }) })] }));
@@ -5,12 +5,16 @@ interface IKdaDialogFloatingStatusBarProps {
5
5
  dialogTitle: string;
6
6
  descriptionElementId: string;
7
7
  status: KdaFloatingStatus;
8
+ /**
9
+ * Id of the expand (Open) button, so the minimized dialog can focus it.
10
+ */
11
+ toggleButtonId?: string;
8
12
  onClose?: () => void;
9
13
  }
10
14
  /**
11
15
  * @internal
12
16
  */
13
- export declare function KdaDialogFloatingStatusBar({ onClose, status, labelElementId, dialogTitle, descriptionElementId, }: IKdaDialogFloatingStatusBarProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function KdaDialogFloatingStatusBar({ onClose, status, toggleButtonId, labelElementId, dialogTitle, descriptionElementId, }: IKdaDialogFloatingStatusBarProps): import("react/jsx-runtime").JSX.Element;
14
18
  interface IKdaDialogStatusAnnouncerProps {
15
19
  dialogTitle: string;
16
20
  status: KdaFloatingStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"KdaDialogFloatingStatusBar.d.ts","sourceRoot":"","sources":["../../../src/kdaDialog/dialog/KdaDialogFloatingStatusBar.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,KAAK,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAShE,UAAU,gCAAgC;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,OAAO,EACP,MAAM,EACN,cAAc,EACd,WAAW,EACX,oBAAoB,GACvB,EAAE,gCAAgC,2CAyBlC;AAUD,UAAU,8BAA8B;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;CACxB;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,WAAW,EACX,MAAM,EACN,WAAW,GACd,EAAE,8BAA8B,2CAkChC;AAYD,wBAAgB,iBAAiB,CAC7B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,cAAc,EAC3B,cAAc,EAAE,cAAc,GAC/B,iBAAiB,CAgBnB"}
1
+ {"version":3,"file":"KdaDialogFloatingStatusBar.d.ts","sourceRoot":"","sources":["../../../src/kdaDialog/dialog/KdaDialogFloatingStatusBar.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,KAAK,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAShE,UAAU,gCAAgC;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,OAAO,EACP,MAAM,EACN,cAAc,EACd,cAAc,EACd,WAAW,EACX,oBAAoB,GACvB,EAAE,gCAAgC,2CA0BlC;AAUD,UAAU,8BAA8B;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;CACxB;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,WAAW,EACX,MAAM,EACN,WAAW,GACd,EAAE,8BAA8B,2CAkChC;AAYD,wBAAgB,iBAAiB,CAC7B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,cAAc,EAC3B,cAAc,EAAE,cAAc,GAC/B,iBAAiB,CAgBnB"}
@@ -13,10 +13,10 @@ const floatingStatusMessages = defineMessages({
13
13
  /**
14
14
  * @internal
15
15
  */
16
- export function KdaDialogFloatingStatusBar({ onClose, status, labelElementId, dialogTitle, descriptionElementId, }) {
16
+ export function KdaDialogFloatingStatusBar({ onClose, status, toggleButtonId, labelElementId, dialogTitle, descriptionElementId, }) {
17
17
  const intl = useIntl();
18
18
  const statusText = intl.formatMessage(floatingStatusMessages[status]);
19
- return (_jsxs("div", { className: "gd-kda-floating-status-bar", children: [_jsx("span", { id: labelElementId, className: "sr-only", children: dialogTitle }), _jsxs("div", { className: "gd-kda-floating-status-bar__content", children: [_jsx(StatusIndicator, { status: status }), _jsx("p", { className: "gd-kda-floating-status-bar__text", id: descriptionElementId, tabIndex: 0, children: statusText })] }), _jsx(KdaDialogActionButtons, { size: "small", status: status, titleElementId: descriptionElementId, toggleAriaDescribedBy: `${labelElementId} ${descriptionElementId}`, onClose: onClose })] }));
19
+ return (_jsxs("div", { className: "gd-kda-floating-status-bar", children: [_jsx("span", { id: labelElementId, className: "sr-only", children: dialogTitle }), _jsxs("div", { className: "gd-kda-floating-status-bar__content", children: [_jsx(StatusIndicator, { status: status }), _jsx("p", { className: "gd-kda-floating-status-bar__text", id: descriptionElementId, children: statusText })] }), _jsx(KdaDialogActionButtons, { size: "small", toggleButtonId: toggleButtonId, status: status, titleElementId: descriptionElementId, toggleAriaDescribedBy: `${labelElementId} ${descriptionElementId}`, onClose: onClose })] }));
20
20
  }
21
21
  const announcementMessages = defineMessages({
22
22
  announcement: { id: "kdaDialog.floatingStatus.announcement" },
@@ -1 +1 @@
1
- {"version":3,"file":"KdaReplaceConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/kdaDialog/dialog/KdaReplaceConfirmationDialog.tsx"],"names":[],"mappings":"AAUA,UAAU,kCAAkC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,kCAAkC,kDAuBrF"}
1
+ {"version":3,"file":"KdaReplaceConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/kdaDialog/dialog/KdaReplaceConfirmationDialog.tsx"],"names":[],"mappings":"AAYA,UAAU,kCAAkC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,kCAAkC,kDAqCrF"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // (C) 2025-2026 GoodData Corporation
3
+ import { useId, useMemo } from "react";
3
4
  import { useIntl } from "react-intl";
4
5
  import { ConfirmDialog, OverlayController, OverlayControllerProvider } from "@gooddata/sdk-ui-kit";
5
6
  import { KDA_DIALOG_REPLACE_CONFIRMATION_OVERS_Z_INDEX } from "../const.js";
@@ -7,8 +8,15 @@ const overlayController = OverlayController.getInstance(KDA_DIALOG_REPLACE_CONFI
7
8
  export function KdaReplaceConfirmationDialog(props) {
8
9
  const { isOpen, onCancel, onConfirm } = props;
9
10
  const intl = useIntl();
11
+ const messageElementId = useId();
12
+ const accessibilityConfig = useMemo(() => ({
13
+ // The message describes the dialog. The dialog close button, which gets the initial
14
+ // focus, uses the same description, so the message is read when focus enters the dialog
15
+ // and the title is not repeated as the button's description.
16
+ descriptionElementId: messageElementId,
17
+ }), [messageElementId]);
10
18
  if (!isOpen) {
11
19
  return null;
12
20
  }
13
- return (_jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(ConfirmDialog, { headline: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.headline" }), cancelButtonText: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.stay" }), submitButtonText: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.runAnyway" }), isPositive: false, onCancel: onCancel, onClose: onCancel, onSubmit: onConfirm, children: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.message" }) }) }));
21
+ return (_jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(ConfirmDialog, { headline: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.headline" }), cancelButtonText: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.stay" }), submitButtonText: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.runAnyway" }), isPositive: false, accessibilityConfig: accessibilityConfig, onCancel: onCancel, onClose: onCancel, onSubmit: onConfirm, children: _jsx("span", { id: messageElementId, children: intl.formatMessage({ id: "kdaDialog.replaceConfirmation.message" }) }) }) }));
14
22
  }
@@ -4,9 +4,14 @@ import { type IKdaState } from "./internalTypes.js";
4
4
  import { type DeepReadonly, type IKdaDataPoint, type IKdaDefinition } from "./types.js";
5
5
  export declare function formatValue(definition: DeepReadonly<IKdaDefinition>, value: number, separators?: ISeparators): string;
6
6
  /**
7
+ * Formats the analysis dates using the date attribute's pattern and the active locale.
8
+ *
9
+ * @param range - analysis date range
10
+ * @param splitter - separator between range endpoints
11
+ * @param locale - active UI locale; falls back to the range's locale, then English
7
12
  * @beta
8
13
  */
9
- export declare function formatKeyDriverAnalysisDateRange(range: DeepReadonly<[IKdaDataPoint, IKdaDataPoint]> | undefined, splitter: string): string;
14
+ export declare function formatKeyDriverAnalysisDateRange(range: DeepReadonly<[IKdaDataPoint, IKdaDataPoint]> | undefined, splitter: string, locale?: string): string;
10
15
  export declare function getOnlyRelevantFilters(all: DashboardAttributeFilterItem[], relevantAttrs: ICatalogAttribute[]): DashboardAttributeFilterItem[];
11
16
  export declare function createNewAttributeFilter(attr: ICatalogAttribute, displayForm: ObjRef, id: string, value?: string): IDashboardAttributeFilter;
12
17
  export declare function updateExistingAttributeFilter(f: DashboardAttributeFilterItem, val: string, primaryDisplayForm?: ObjRef): DashboardAttributeFilterItem;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/kdaDialog/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAQd,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAIxF,wBAAgB,WAAW,CACvB,UAAU,EAAE,YAAY,CAAC,cAAc,CAAC,EACxC,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,WAAW,UAS3B;AAID;;GAEG;AACH,wBAAgB,gCAAgC,CAC5C,KAAK,EAAE,YAAY,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,GAAG,SAAS,EAC/D,QAAQ,EAAE,MAAM,GACjB,MAAM,CAoBR;AAID,wBAAgB,sBAAsB,CAClC,GAAG,EAAE,4BAA4B,EAAE,EACnC,aAAa,EAAE,iBAAiB,EAAE,kCAUrC;AAED,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,iBAAiB,EACvB,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,MAAM,6BAmBjB;AAED,wBAAgB,6BAA6B,CACzC,CAAC,EAAE,4BAA4B,EAC/B,GAAG,EAAE,MAAM,EACX,kBAAkB,CAAC,EAAE,MAAM,GAC5B,4BAA4B,CA0C9B;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAOrG"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/kdaDialog/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAQd,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAIxF,wBAAgB,WAAW,CACvB,UAAU,EAAE,YAAY,CAAC,cAAc,CAAC,EACxC,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,WAAW,UAS3B;AAID;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC5C,KAAK,EAAE,YAAY,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,GAAG,SAAS,EAC/D,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,GAChB,MAAM,CAqBR;AAID,wBAAgB,sBAAsB,CAClC,GAAG,EAAE,4BAA4B,EAAE,EACnC,aAAa,EAAE,iBAAiB,EAAE,kCAUrC;AAED,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,iBAAiB,EACvB,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,MAAM,6BAmBjB;AAED,wBAAgB,6BAA6B,CACzC,CAAC,EAAE,4BAA4B,EAC/B,GAAG,EAAE,MAAM,EACX,kBAAkB,CAAC,EAAE,MAAM,GAC5B,4BAA4B,CA0C9B;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAOrG"}
@@ -12,9 +12,14 @@ export function formatValue(definition, value, separators) {
12
12
  }
13
13
  //Format title
14
14
  /**
15
+ * Formats the analysis dates using the date attribute's pattern and the active locale.
16
+ *
17
+ * @param range - analysis date range
18
+ * @param splitter - separator between range endpoints
19
+ * @param locale - active UI locale; falls back to the range's locale, then English
15
20
  * @beta
16
21
  */
17
- export function formatKeyDriverAnalysisDateRange(range, splitter) {
22
+ export function formatKeyDriverAnalysisDateRange(range, splitter, locale) {
18
23
  const [from, to] = range ?? [null, null];
19
24
  // Not defined
20
25
  if (!from || !to) {
@@ -25,7 +30,7 @@ export function formatKeyDriverAnalysisDateRange(range, splitter) {
25
30
  const pattern = toIsoPattern(from.format?.pattern ?? "yyyy-MM-dd");
26
31
  // The dates carry the backend wall-clock in UTC (see IKdaDataPoint.date), so they are formatted in UTC
27
32
  // to show it unchanged in every browser timezone.
28
- return DateFilterHelpers.formatAbsoluteDateRange(new TZDate(from.date, "UTC"), new TZDate(to.date, "UTC"), pattern, splitter);
33
+ return DateFilterHelpers.formatAbsoluteDateRange(new TZDate(from.date, "UTC"), new TZDate(to.date, "UTC"), pattern, splitter, locale ?? from.format?.locale);
29
34
  }
30
35
  //Attribute filters
31
36
  export function getOnlyRelevantFilters(all, relevantAttrs) {
@@ -1 +1 @@
1
- {"version":3,"file":"changeDashboardDefinitionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAsB/C,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,KAAK,2BAA2B,EAA8B,MAAM,2BAA2B,CAAC;AAgBzG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiDnE,wBAAiB,gCAAgC,CAC7C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,0BAA0B,GAChC,YAAY,CAAC,2BAA2B,CAAC,CA2J3C"}
1
+ {"version":3,"file":"changeDashboardDefinitionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAc/C,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,KAAK,2BAA2B,EAA8B,MAAM,2BAA2B,CAAC;AAezG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiDnE,wBAAiB,gCAAgC,CAC7C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,0BAA0B,GAChC,YAAY,CAAC,2BAA2B,CAAC,CAqJ3C"}
@@ -3,11 +3,8 @@ import { uniqWith } from "lodash-es";
3
3
  import { batchActions } from "redux-batched-actions";
4
4
  import { call, put, select } from "redux-saga/effects";
5
5
  import { areObjRefsEqual, } from "@gooddata/sdk-model";
6
- import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, dashboardContainsAbsoluteGranularityDateFilterWithDataSet, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
7
- import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED, dashboardContainsParameterizedDateFilter, } from "../../../_staging/dashboard/parameterizedDateFilters.js";
8
6
  import { deriveAbsoluteFormGranularitiesFromRelativeForm } from "../../../_staging/dateFilterConfig/merge.js";
9
7
  import { dashboardDefinitionChanged } from "../../events/dashboard.js";
10
- import { invalidArgumentsProvided } from "../../events/general.js";
11
8
  import { selectAllCatalogDisplayFormsMap, selectCatalogParameters, } from "../../store/catalog/catalogSelectors.js";
12
9
  import { selectDateFilterConfig, selectEnableImmediateAttributeFilterDisplayAsLabelMigration, selectSettings, } from "../../store/config/configSelectors.js";
13
10
  import { selectDashboardDescriptor, selectPersistedDashboard } from "../../store/meta/metaSelectors.js";
@@ -44,12 +41,6 @@ export function* changeDashboardDefinitionHandler(ctx, cmd) {
44
41
  enablePersistentFiltersAcrossTabs: currentDescriptor.enablePersistentFiltersAcrossTabs,
45
42
  }
46
43
  : cmd.payload.dashboard;
47
- if (dashboardContainsAbsoluteGranularityDateFilterWithDataSet(dashboard)) {
48
- throw invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED);
49
- }
50
- if (dashboardContainsParameterizedDateFilter(dashboard)) {
51
- throw invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED);
52
- }
53
44
  const effectiveReferences = providedReferences ?? (payloadInsights ? { insights: [...payloadInsights] } : {});
54
45
  const providedInsights = effectiveReferences.insights ?? [];
55
46
  const settings = yield select(selectSettings);
@@ -100,7 +91,11 @@ export function* changeDashboardDefinitionHandler(ctx, cmd) {
100
91
  ? currentActiveTabId
101
92
  : (dashboard.tabs?.[0]?.localIdentifier ?? DEFAULT_TAB_ID);
102
93
  const attributesWithReferences = yield select(selectPreloadedAttributesWithReferences);
103
- const batch = yield call(actionsToInitializeExistingDashboard, ctx, dashboard, allInsights, settings, isImmediateAttributeFilterMigrationEnabled, effectiveOriginalFilterContext, migratedAttributeFilters, effectiveAttributeFilterConfigs, dateFilterConfig, tabsDateFilterConfigSource, displayForms, persistedDashboard ?? dashboard, effectiveActiveTabId, workspaceParameters, unavailableReferences, attributesWithReferences);
94
+ // Keep the baseline for saved dashboards and refinements of the same draft.
95
+ // Opening a different unsaved draft must also replace the identity used by Save.
96
+ const sameDashboard = ctx.dashboardRef || persistedDashboard?.identifier === dashboard.identifier;
97
+ const dashboardBaseline = sameDashboard ? (persistedDashboard ?? dashboard) : dashboard;
98
+ const batch = yield call(actionsToInitializeExistingDashboard, ctx, dashboard, allInsights, settings, isImmediateAttributeFilterMigrationEnabled, effectiveOriginalFilterContext, migratedAttributeFilters, effectiveAttributeFilterConfigs, dateFilterConfig, tabsDateFilterConfigSource, displayForms, dashboardBaseline, effectiveActiveTabId, workspaceParameters, unavailableReferences, attributesWithReferences);
104
99
  batch.push(unavailableObjectsActions.setUnavailableObjects(unavailableReferences));
105
100
  yield put(batchActions(batch, "@@GDC.DASH/CHANGE_DEFINITION"));
106
101
  const finalReferences = {
@@ -1 +1 @@
1
- {"version":3,"file":"changeDateFilterTitleHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/changeDateFilterTitleHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAW7E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,yBAAyB,GAC/B,YAAY,CAAC,IAAI,CAAC,CAiEpB"}
1
+ {"version":3,"file":"changeDateFilterTitleHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/changeDateFilterTitleHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAW7E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,yBAAyB,GAC/B,YAAY,CAAC,IAAI,CAAC,CAqEpB"}
@@ -1,30 +1,32 @@
1
1
  // (C) 2022-2026 GoodData Corporation
2
2
  import { call, put, select } from "redux-saga/effects";
3
3
  import { invariant } from "ts-invariant";
4
- import { isDashboardDateFilter } from "@gooddata/sdk-model";
4
+ import { areObjRefsEqual, isDashboardDateFilter } from "@gooddata/sdk-model";
5
5
  import { dateFilterOfAnyTypeTitleChanged, dateFilterTitleChanged } from "../../events/filters.js";
6
6
  import { invalidArgumentsProvided } from "../../events/general.js";
7
7
  import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
8
8
  import { selectDateFilterConfigOverrides } from "../../store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
9
9
  import { selectDateFilterConfigsOverrides } from "../../store/tabs/dateFilterConfigs/dateFilterConfigsSelectors.js";
10
- import { selectFilterContextDateFilterByDataSet, selectFilterContextDateFilterOfAnyType, } from "../../store/tabs/filterContext/filterContextSelectors.js";
10
+ import { selectFilterContextDateFilterOfAnyType, selectFilterContextDateFilterOfAnyTypeByDataSet, } from "../../store/tabs/filterContext/filterContextSelectors.js";
11
11
  import { tabsActions } from "../../store/tabs/index.js";
12
12
  import { dispatchFilterContextChanged } from "../filterContext/common.js";
13
13
  export function* changeDateFilterTitleHandler(ctx, cmd) {
14
14
  const { dataSet } = cmd.payload;
15
15
  if (dataSet) {
16
16
  // validate dataSet
17
- const affectedFilter = yield select(selectFilterContextDateFilterByDataSet(dataSet));
17
+ const affectedFilter = yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet));
18
18
  if (!affectedFilter) {
19
19
  throw invalidArgumentsProvided(ctx, cmd, `Filter with data set ${dataSet} not found.`);
20
20
  }
21
21
  yield put(tabsActions.changeDateFilterConfigsTitle(cmd.payload));
22
- const changedFilter = yield select(selectFilterContextDateFilterByDataSet(dataSet));
22
+ const changedFilter = yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet));
23
23
  const filterConfigs = yield select(selectDateFilterConfigsOverrides);
24
- const changedFilterConfig = filterConfigs.find((item) => item.dateDataSet === dataSet);
24
+ const changedFilterConfig = filterConfigs.find((item) => areObjRefsEqual(item.dateDataSet, dataSet));
25
25
  invariant(changedFilter, "Inconsistent state in changeDateFilterTitleHandler, cannot update date filter for given data set.");
26
26
  invariant(changedFilterConfig, "Inconsistent state in changeDateFilterTitleHandler, cannot update date filter config for given data set.");
27
- yield dispatchDashboardEvent(dateFilterTitleChanged(ctx, changedFilter, changedFilterConfig.config));
27
+ if (isDashboardDateFilter(changedFilter)) {
28
+ yield dispatchDashboardEvent(dateFilterTitleChanged(ctx, changedFilter, changedFilterConfig.config));
29
+ }
28
30
  yield dispatchDashboardEvent(dateFilterOfAnyTypeTitleChanged(ctx, changedFilter, changedFilterConfig.config));
29
31
  }
30
32
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"changeDateFilterWithDimensionModeHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/changeDateFilterWithDimensionModeHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,8CAA8C,EAAE,MAAM,6BAA6B,CAAC;AAOlG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,wBAAiB,wCAAwC,CACrD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,8CAA8C,GACpD,YAAY,CAAC,IAAI,CAAC,CAkCpB"}
1
+ {"version":3,"file":"changeDateFilterWithDimensionModeHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/changeDateFilterWithDimensionModeHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,KAAK,8CAA8C,EAAE,MAAM,6BAA6B,CAAC;AAOlG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,wBAAiB,wCAAwC,CACrD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,8CAA8C,GACpD,YAAY,CAAC,IAAI,CAAC,CAsCpB"}
@@ -1,26 +1,30 @@
1
1
  // (C) 2023-2026 GoodData Corporation
2
2
  import { call, put, select } from "redux-saga/effects";
3
3
  import { invariant } from "ts-invariant";
4
- import { dateFilterModeChanged } from "../../events/filters.js";
4
+ import { areObjRefsEqual, isDashboardDateFilter } from "@gooddata/sdk-model";
5
+ import { dateFilterModeChanged, dateFilterOfAnyTypeModeChanged } from "../../events/filters.js";
5
6
  import { invalidArgumentsProvided } from "../../events/general.js";
6
7
  import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
7
8
  import { selectDateFilterConfigsOverrides } from "../../store/tabs/dateFilterConfigs/dateFilterConfigsSelectors.js";
8
- import { selectFilterContextDateFilterByDataSet } from "../../store/tabs/filterContext/filterContextSelectors.js";
9
+ import { selectFilterContextDateFilterOfAnyTypeByDataSet } from "../../store/tabs/filterContext/filterContextSelectors.js";
9
10
  import { tabsActions } from "../../store/tabs/index.js";
10
11
  import { dispatchFilterContextChanged } from "../filterContext/common.js";
11
12
  export function* changeDateFilterWithDimensionModeHandler(ctx, cmd) {
12
13
  const { dataSet } = cmd.payload;
13
14
  // validate dataSet
14
- const affectedFilter = yield select(selectFilterContextDateFilterByDataSet(dataSet));
15
+ const affectedFilter = yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet));
15
16
  if (!affectedFilter) {
16
17
  throw invalidArgumentsProvided(ctx, cmd, `Filter with data set ${dataSet} not found.`);
17
18
  }
18
19
  yield put(tabsActions.changeDateFilterConfigsMode(cmd.payload));
19
- const changedFilter = yield select(selectFilterContextDateFilterByDataSet(dataSet));
20
+ const changedFilter = yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet));
20
21
  const filterConfigs = yield select(selectDateFilterConfigsOverrides);
21
- const changedFilterConfig = filterConfigs.find((item) => item.dateDataSet === dataSet);
22
+ const changedFilterConfig = filterConfigs.find((item) => areObjRefsEqual(item.dateDataSet, dataSet));
22
23
  invariant(changedFilter, "Inconsistent state in changeDateModeHandler, cannot update date filter for given data set.");
23
24
  invariant(changedFilterConfig, "Inconsistent state in changeDateModeHandler, cannot update date filter config for given data set.");
24
- yield dispatchDashboardEvent(dateFilterModeChanged(ctx, changedFilter, changedFilterConfig.config));
25
+ if (isDashboardDateFilter(changedFilter)) {
26
+ yield dispatchDashboardEvent(dateFilterModeChanged(ctx, changedFilter, changedFilterConfig.config));
27
+ }
28
+ yield dispatchDashboardEvent(dateFilterOfAnyTypeModeChanged(ctx, changedFilter, changedFilterConfig.config));
25
29
  yield call(dispatchFilterContextChanged, ctx, cmd);
26
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"filterViews.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/common/filterViews.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGH,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAGf,KAAK,+BAA+B,EAEpC,KAAK,oBAAoB,EAGzB,KAAK,cAAc,EACnB,KAAK,MAAM,EAsBd,MAAM,qBAAqB,CAAC;AAW7B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAgQvD,KAAK,oBAAoB,GAAG;IAAE,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAkBnE,UAAU,6BAA6B;IACnC,aAAa,EAAE,cAAc,CAAC;IAC9B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,4BAA4B,kBACtB,cAAc,qBACV,iBAAiB,EAAE,8BACV,WAAW,CAAC,MAAM,CAAC,2BACtB,+BAA+B,EAAE,KAC3D,6BAqKF,CAAC;AAIF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C;;;OAGG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,CAAC;CAClE;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAC/C,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,oBAAoB,EAAE,EACnC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,8BAA8B,GACxC,OAAO,CAUT;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACpC,WAAW,EAAE,oBAAoB,EAAE,EACnC,kBAAkB,EAAE,MAAM,EAC1B,UAAU,EAAE,OAAO,GACpB,oBAAoB,GAAG,SAAS,CAQlC;AAuBD;;;;GAIG;AACH,wBAAgB,mCAAmC,CAC/C,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,oBAAoB,EAAE,EACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,kBAAkB,EAAE,aAAa,CAAC,8BAA8B,CAAC,EACjE,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,8BAA8B,GACzC,UAAU,CAIZ;AAED,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,oBAAoB,EAAE,EACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,kBAAkB,EAAE,aAAa,CAAC,8BAA8B,CAAC,EACjE,OAAO,GAAE,8BAAmC,GAC7C,UAAU,CAuDZ"}
1
+ {"version":3,"file":"filterViews.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/common/filterViews.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAIH,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAGf,KAAK,+BAA+B,EACpC,KAAK,oBAAoB,EAGzB,KAAK,cAAc,EACnB,KAAK,MAAM,EA2Bd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAuQvD,KAAK,oBAAoB,GAAG;IAAE,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAkBnE,UAAU,6BAA6B;IACnC,aAAa,EAAE,cAAc,CAAC;IAC9B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,4BAA4B,kBACtB,cAAc,qBACV,iBAAiB,EAAE,8BACV,WAAW,CAAC,MAAM,CAAC,2BACtB,+BAA+B,EAAE,KAC3D,6BA+KF,CAAC;AAIF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C;;;OAGG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,CAAC;CAClE;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAC/C,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,oBAAoB,EAAE,EACnC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,8BAA8B,GACxC,OAAO,CAUT;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACpC,WAAW,EAAE,oBAAoB,EAAE,EACnC,kBAAkB,EAAE,MAAM,EAC1B,UAAU,EAAE,OAAO,GACpB,oBAAoB,GAAG,SAAS,CAQlC;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAC/C,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,oBAAoB,EAAE,EACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,kBAAkB,EAAE,aAAa,CAAC,8BAA8B,CAAC,EACjE,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,8BAA8B,GACzC,UAAU,CAIZ;AAED,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,oBAAoB,EAAE,EACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,kBAAkB,EAAE,aAAa,CAAC,8BAA8B,CAAC,EACjE,OAAO,GAAE,8BAAmC,GAC7C,UAAU,CAuDZ"}
@@ -1,11 +1,9 @@
1
1
  // (C) 2024-2026 GoodData Corporation
2
- import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemTitle, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterLocalIdentifier, isDashboardAbsoluteGranularityDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilterOfAnyType, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isDashboardTextAttributeFilter, isExportOverrideFilterContext, isFilterContext, isSingleSelectionFilter, } from "@gooddata/sdk-model";
2
+ import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemTitle, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardMeasureValueFilterLocalIdentifier, isDashboardAbsoluteGranularityDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilterOfAnyType, isDashboardDateFilter, isDashboardDateFilterOfAnyType, isDashboardDateFilterWithDimensionOfAnyType, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDashboardTextAttributeFilter, isExportOverrideFilterContext, isFilterContext, isSingleSelectionFilter, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
3
3
  import { _isEqual, _omit } from "@gooddata/util";
4
- import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../../_staging/dashboard/absoluteGranularityDateFilters.js";
5
- import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED, containsDashboardParameterizedDateFilter, } from "../../../../_staging/dashboard/parameterizedDateFilters.js";
6
4
  import { filterLocalIdentifiers } from "../../../store/filtering/dashboardFilterSelectors.js";
7
5
  import { getRestrictedDashboardFilters } from "../../../store/filtering/restrictedFilterUtils.js";
8
- import { applyMirroredFilterValue, findCounterpartFilter, targetAcceptsAttributeFilterValue, withCommonDateFilterLocalIdentifier, } from "../../../store/tabs/filterContext/filterSync.js";
6
+ import { applyMirroredFilterValue, findCounterpartFilter, targetAcceptsAttributeFilterValue, withCommonDateFilterLocalIdentifier, withDateFilterIdentity, } from "../../../store/tabs/filterContext/filterSync.js";
9
7
  import { isFilterTypeCompatibleWithSelectionType } from "../../../utils/attributeFilterSelectionTypeCompatibility.js";
10
8
  const findMatchingAttributeFilterByLocalIdentifier = (filter, viewFilters) => viewFilters.find((item) => isDashboardAttributeFilter(item) &&
11
9
  item.attributeFilter.localIdentifier === filter.attributeFilter.localIdentifier);
@@ -20,9 +18,12 @@ const findMatchingTextFilterByLocalIdentifier = (filter, viewFilters) => {
20
18
  const findMatchingAttributeFilterItemByLocalIdentifier = (localId, viewFilters) => viewFilters.find((item) => isDashboardAttributeFilterItem(item) &&
21
19
  dashboardAttributeFilterItemLocalIdentifier(item) === localId);
22
20
  // date filters do not have localIdentifier set, compare them by dataSet instead
23
- const findMatchingDateFilterByDataSet = (filter, viewFilters) => viewFilters.find((item) => isDashboardDateFilter(item) &&
24
- ((item.dateFilter.dataSet === undefined && filter.dateFilter.dataSet === undefined) ||
25
- areObjRefsEqual(item.dateFilter.dataSet, filter.dateFilter.dataSet)));
21
+ const findMatchingDateFilterByDataSet = (filter, viewFilters) => {
22
+ const dataSet = dashboardFilterObjRef(filter);
23
+ return viewFilters.find((item) => isDashboardDateFilterOfAnyType(item) &&
24
+ ((dashboardFilterObjRef(item) === undefined && dataSet === undefined) ||
25
+ areObjRefsEqual(dashboardFilterObjRef(item), dataSet)));
26
+ };
26
27
  // MVF: match only when both localIdentifier and the referenced metric agree.
27
28
  // The metric ref is set in edit mode and not changeable in view mode, so a localId
28
29
  // collision with a different metric must not import stale conditions.
@@ -107,6 +108,8 @@ const createResetTextFilter = (filter) => {
107
108
  };
108
109
  };
109
110
  const isCommonDateFilter = (filter) => isDashboardCommonDateFilterOfAnyType(filter);
111
+ // whole periods and periods have no granularity and range to copy, the view filter replaces them as a whole
112
+ const isReplacedAsWhole = (filter) => isDashboardAbsoluteGranularityDateFilter(filter) || isDashboardParameterizedDateFilter(filter);
110
113
  const handleCommonDateFilter = (filterContextFilters, filterViewFilters, mergedFilters) => {
111
114
  // If common date is set to All, it is not included in filter context filters.
112
115
  // Common filter differs from date filters by not having date dataset (it is provided by widget).
@@ -175,14 +178,24 @@ export const changeFilterContextSelection = (filterContext, filterViewFilters, r
175
178
  if (restrictedLocalIdentifiers.has(dashboardFilterLocalIdentifier(filter) ?? "")) {
176
179
  return filter;
177
180
  }
178
- // whole periods replace the filter as a whole, the common filter without one in the view is removed below
181
+ // replaced as a whole, a common filter without one in the view is removed below
179
182
  if (isDashboardCommonDateFilterOfAnyType(filter) &&
180
- (isDashboardAbsoluteGranularityDateFilter(filter) ||
181
- isDashboardAbsoluteGranularityDateFilter(viewCommonDateFilter))) {
183
+ (isReplacedAsWhole(filter) || isReplacedAsWhole(viewCommonDateFilter))) {
182
184
  return viewCommonDateFilter
183
185
  ? withCommonDateFilterLocalIdentifier(viewCommonDateFilter, dashboardFilterLocalIdentifier(filter))
184
186
  : filter;
185
187
  }
188
+ // a date filter with a dimension is replaced as a whole too
189
+ if (isDashboardDateFilterWithDimensionOfAnyType(filter)) {
190
+ const viewFilter = findMatchingDateFilterByDataSet(filter, filterViewFilters);
191
+ if (isReplacedAsWhole(filter) || isReplacedAsWhole(viewFilter)) {
192
+ const dataSet = dashboardFilterObjRef(filter);
193
+ const localIdentifier = dashboardFilterLocalIdentifier(filter);
194
+ return viewFilter
195
+ ? withDateFilterIdentity(viewFilter, localIdentifier, dataSet)
196
+ : newAllTimeDashboardDateFilter(dataSet, localIdentifier);
197
+ }
198
+ }
186
199
  if (isDashboardAttributeFilter(filter)) {
187
200
  const filterLocalId = filter.attributeFilter.localIdentifier;
188
201
  const filterConfig = filterLocalId ? configsMap.get(filterLocalId) : undefined;
@@ -228,7 +241,7 @@ export const changeFilterContextSelection = (filterContext, filterViewFilters, r
228
241
  }
229
242
  else if (isDashboardDateFilter(filter)) {
230
243
  const viewFilter = findMatchingDateFilterByDataSet(filter, filterViewFilters);
231
- if (viewFilter) {
244
+ if (isDashboardDateFilter(viewFilter)) {
232
245
  return {
233
246
  dateFilter: {
234
247
  ...filter.dateFilter,
@@ -331,23 +344,9 @@ export function isDefaultFilterViewSharedAcrossTabs(dashboard, filterViews, rend
331
344
  export function findTabDefaultFilterView(filterViews, tabLocalIdentifier, isFirstTab) {
332
345
  const tabDefaultView = filterViews.find((view) => view.isDefault && view.tabLocalIdentifier === tabLocalIdentifier);
333
346
  if (tabDefaultView || !isFirstTab) {
334
- return supportedDefaultFilterView(tabDefaultView);
335
- }
336
- return supportedDefaultFilterView(filterViews.find((view) => view.isDefault && !view.tabLocalIdentifier));
337
- }
338
- /**
339
- * A default view the dashboard cannot apply in full is skipped, so the dashboard opens with its own filters.
340
- */
341
- function supportedDefaultFilterView(view) {
342
- if (view && containsAbsoluteGranularityDateFilterWithDataSet(view.filterContext.filters)) {
343
- console.warn(`The default filter view "${view.name}" was not applied. ${ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED}`);
344
- return undefined;
345
- }
346
- if (view && containsDashboardParameterizedDateFilter(view.filterContext.filters)) {
347
- console.warn(`The default filter view "${view.name}" was not applied. ${PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED}`);
348
- return undefined;
347
+ return tabDefaultView;
349
348
  }
350
- return view;
349
+ return filterViews.find((view) => view.isDefault && !view.tabLocalIdentifier);
351
350
  }
352
351
  /**
353
352
  * Applies the user's default filter view for the given render mode. The view is the user's own starting
@@ -378,7 +377,7 @@ export function applyDefaultFilterView(dashboard, filterViews, exportId, unavail
378
377
  };
379
378
  }
380
379
  // Legacy behavior: apply default view to root-level filter context
381
- const defaultFilterView = supportedDefaultFilterView(filterViews.find((view) => view.isDefault));
380
+ const defaultFilterView = filterViews.find((view) => view.isDefault);
382
381
  if (defaultFilterView && isFilterContext(dashboard.filterContext)) {
383
382
  const { filterContext: updatedFilterContext, configUpdates } = changeFilterContextSelection(dashboard.filterContext, defaultFilterView.filterContext.filters, filterLocalIdentifiers(getRestrictedDashboardFilters(dashboard.filterContext.filters, unavailableObjects)), dashboard.attributeFilterConfigs);
384
383
  return {
@@ -480,7 +479,7 @@ function mirrorTabSelection(sourceBefore, sourceAfter, target, filterView, unava
480
479
  * The filter of the same tab that `filter` was before a filter view changed its value.
481
480
  */
482
481
  function findSameTabFilter(filters, filter) {
483
- if (isDashboardDateFilter(filter)) {
482
+ if (isDashboardDateFilterOfAnyType(filter)) {
484
483
  return findMatchingDateFilterByDataSet(filter, filters);
485
484
  }
486
485
  const localIdentifier = dashboardFilterLocalIdentifier(filter);
@@ -1 +1 @@
1
- {"version":3,"file":"stateInitializers.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/common/stateInitializers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EAEtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEH,KAAK,mCAAmC,EACxC,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EAKpC,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,SAAS,EAGd,KAAK,MAAM,EAOd,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAoB5E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AAoKvC,wBAAiB,+BAA+B,CAC5C,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,SAAS,EACnB,gBAAgB,EAAE,iBAAiB,EACnC,YAAY,CAAC,EAAE,SAAS,CAAC,mCAAmC,CAAC,EAC7D,YAAY,CAAC,EAAE,MAAM,EACrB,mBAAmB,GAAE,8BAA8B,EAAO,GAC3D,YAAY,CAAC;IACZ,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC,CA6GD;AAwJD,wBAAgB,YAAY,CACxB,GAAG,EAAE,gBAAgB,EACrB,WAAW,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAInC;AAgGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAiB,oCAAoC,CACjD,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,SAAS,EACnB,0CAA0C,EAAE,OAAO,EACnD,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC,GAAG,SAAS,EAEjG,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,EACjF,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,CAAC,EACjF,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC/D,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC,EACrE,YAAY,CAAC,EAAE,SAAS,CAAC,mCAAmC,CAAC,EAC7D,kBAAkB,CAAC,EAAE,UAAU,EAC/B,wBAAwB,CAAC,EAAE,MAAM,EACjC,mBAAmB,GAAE,8BAA8B,EAAO,EAC1D,0BAA0B,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,EAC1E,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,GACtD,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CA6NzC"}
1
+ {"version":3,"file":"stateInitializers.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/common/stateInitializers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EAEtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEH,KAAK,mCAAmC,EACxC,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EAKpC,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,SAAS,EAGd,KAAK,MAAM,EAQd,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAoB5E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AAoKvC,wBAAiB,+BAA+B,CAC5C,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,SAAS,EACnB,gBAAgB,EAAE,iBAAiB,EACnC,YAAY,CAAC,EAAE,SAAS,CAAC,mCAAmC,CAAC,EAC7D,YAAY,CAAC,EAAE,MAAM,EACrB,mBAAmB,GAAE,8BAA8B,EAAO,GAC3D,YAAY,CAAC;IACZ,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC,CA6GD;AA0JD,wBAAgB,YAAY,CACxB,GAAG,EAAE,gBAAgB,EACrB,WAAW,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAInC;AA6FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAiB,oCAAoC,CACjD,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,SAAS,EACnB,0CAA0C,EAAE,OAAO,EACnD,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC,GAAG,SAAS,EAEjG,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,EACjF,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,CAAC,EACjF,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC/D,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC,EACrE,YAAY,CAAC,EAAE,SAAS,CAAC,mCAAmC,CAAC,EAC7D,kBAAkB,CAAC,EAAE,UAAU,EAC/B,wBAAwB,CAAC,EAAE,MAAM,EACjC,mBAAmB,GAAE,8BAA8B,EAAO,EAC1D,0BAA0B,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,EAC1E,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,GACtD,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CA6NzC"}
@@ -2,7 +2,7 @@
2
2
  import { update } from "lodash-es";
3
3
  import { call, select } from "redux-saga/effects";
4
4
  import { walkLayout, } from "@gooddata/sdk-backend-spi";
5
- import { areObjRefsEqual, isDashboardAttributeFilter, isDashboardDateFilterWithDimension, isIdentifierRef, isInsightWidget, isObjRef, } from "@gooddata/sdk-model";
5
+ import { areObjRefsEqual, dashboardFilterObjRef, isDashboardAttributeFilter, isDashboardDateFilterOfAnyType, isIdentifierRef, isInsightWidget, isObjRef, } from "@gooddata/sdk-model";
6
6
  import { _cloneDeep, _compact, _isEmpty } from "@gooddata/util";
7
7
  import { dashboardFilterContextDefinition, dashboardFilterContextIdentity, } from "../../../../_staging/dashboard/dashboardFilterContext.js";
8
8
  import { dashboardLayoutSanitize } from "../../../../_staging/dashboard/dashboardLayout.js";
@@ -286,14 +286,16 @@ function* actionsToInitializeOrFillNewDashboard(ctx, settings, dateFilterConfig,
286
286
  initialContent: !!ctx.config?.initialContent,
287
287
  };
288
288
  }
289
+ // the date dataset of a date filter of any type, undefined for the common date filter
290
+ const dateFilterDataSet = (filter) => isDashboardDateFilterOfAnyType(filter) ? dashboardFilterObjRef(filter) : undefined;
289
291
  const keepOnlyFiltersWithValidRef = (filter, availableDfRefs, validDataSetIds, unavailableObjects) => {
290
292
  if (isDashboardFilterUsingRestrictedObject(filter, unavailableObjects)) {
291
293
  return true;
292
294
  }
293
295
  if (!isDashboardAttributeFilter(filter)) {
294
- if (isDashboardDateFilterWithDimension(filter)) {
295
- return (isIdentifierRef(filter.dateFilter.dataSet) &&
296
- validDataSetIds.includes(filter.dateFilter.dataSet?.identifier));
296
+ const dataSet = dateFilterDataSet(filter);
297
+ if (dataSet) {
298
+ return isIdentifierRef(dataSet) && validDataSetIds.includes(dataSet.identifier);
297
299
  }
298
300
  return true; // common date filter is kept always
299
301
  }
@@ -340,10 +342,7 @@ function* sanitizeFilterContext(ctx, filterContext, dataSets = [], displayForms,
340
342
  // full catalog may not be available here, just related datasets to the dashboard
341
343
  // -- find out if some datasets are still missing and if needed, fetch them
342
344
  // additional date filters, let them validate
343
- const additionalDateFilters = filterContext.filters
344
- .filter((filter) => !isDashboardAttributeFilter(filter))
345
- .filter(isDashboardDateFilterWithDimension)
346
- .map((filter) => filter.dateFilter.dataSet);
345
+ const additionalDateFilters = filterContext.filters.map(dateFilterDataSet).filter(isObjRef);
347
346
  // check which are missing and load them
348
347
  const missingDataSets = additionalDateFilters
349
348
  .filter(isIdentifierRef)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACH,KAAK,wBAAwB,EAIhC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,UAAU,EAKf,KAAK,sBAAsB,EAG3B,KAAK,MAAM,EAOd,MAAM,qBAAqB,CAAC;AAW7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AA0B1E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AA+JvC,KAAK,0BAA0B,GAAG;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wBAAwB,EAAE,wBAAwB,EAAE,CAAC;CACxD,CAAC;AAiZF,wBAAiB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB;;;uIAyB9E;AAuCD;;;;GAIG;AACH,wBAAiB,2BAA2B,CACxC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,0BAA0B;;;0IAiBzC;AAED,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,sNAW3D;AAqCD,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CA0CzG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACH,KAAK,wBAAwB,EAIhC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,UAAU,EAKf,KAAK,sBAAsB,EAG3B,KAAK,MAAM,EAOd,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AA0B1E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AA+JvC,KAAK,0BAA0B,GAAG;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wBAAwB,EAAE,wBAAwB,EAAE,CAAC;CACxD,CAAC;AAuYF,wBAAiB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB;;;uIAyB9E;AAuCD;;;;GAIG;AACH,wBAAiB,2BAA2B,CACxC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,0BAA0B;;;0IAiBzC;AAED,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,sNAW3D;AAqCD,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CA0CzG"}