@gooddata/sdk-ui-dashboard 11.70.0-alpha.4 → 11.70.0

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 (314) hide show
  1. package/NOTICE +49 -49
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.d.ts.map +1 -1
  4. package/esm/__version.js +1 -1
  5. package/esm/_staging/automation/index.d.ts +1 -0
  6. package/esm/_staging/automation/index.d.ts.map +1 -1
  7. package/esm/_staging/automation/index.js +16 -5
  8. package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts +9 -3
  9. package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts.map +1 -1
  10. package/esm/_staging/dashboard/absoluteGranularityDateFilters.js +22 -13
  11. package/esm/_staging/dashboard/dashboardFilterContext.d.ts.map +1 -1
  12. package/esm/_staging/dashboard/dashboardFilterContext.js +11 -1
  13. package/esm/_staging/dashboard/dashboardFilterContextValidation.d.ts.map +1 -1
  14. package/esm/_staging/dashboard/dashboardFilterContextValidation.js +9 -9
  15. package/esm/_staging/dashboard/dashboardFilterConverter.d.ts +3 -3
  16. package/esm/_staging/dashboard/dashboardFilterConverter.d.ts.map +1 -1
  17. package/esm/_staging/dashboard/dashboardFilterConverter.js +14 -2
  18. package/esm/_staging/dashboard/parameterizedDateFilters.d.ts +9 -0
  19. package/esm/_staging/dashboard/parameterizedDateFilters.d.ts.map +1 -1
  20. package/esm/_staging/dashboard/parameterizedDateFilters.js +27 -0
  21. package/esm/_staging/exportUtils/filterUtils.d.ts.map +1 -1
  22. package/esm/_staging/exportUtils/filterUtils.js +5 -3
  23. package/esm/_staging/sharedHooks/useFiltersNamings.d.ts.map +1 -1
  24. package/esm/_staging/sharedHooks/useFiltersNamings.js +9 -7
  25. package/esm/index.d.ts +8 -8
  26. package/esm/index.d.ts.map +1 -1
  27. package/esm/index.js +5 -5
  28. package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
  29. package/esm/kdaDialog/dialog/KdaDialog.js +15 -11
  30. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts +17 -0
  31. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts.map +1 -1
  32. package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.js +44 -2
  33. package/esm/model/DashboardTester.d.ts.map +1 -1
  34. package/esm/model/DashboardTester.js +0 -2
  35. package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts +2 -0
  36. package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts.map +1 -1
  37. package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.js +6 -1
  38. package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.d.ts.map +1 -1
  39. package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.js +7 -3
  40. package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.d.ts.map +1 -1
  41. package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.js +9 -4
  42. package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
  43. package/esm/model/commandHandlers/dashboard/common/filterViews.js +23 -11
  44. package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.d.ts.map +1 -1
  45. package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.js +7 -8
  46. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
  47. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +6 -3
  48. package/esm/model/commandHandlers/drill/common/sourceDrillFilters.js +2 -2
  49. package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
  50. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +18 -6
  51. package/esm/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.d.ts.map +1 -1
  52. package/esm/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.js +3 -5
  53. package/esm/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.d.ts.map +1 -1
  54. package/esm/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.js +3 -5
  55. package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.d.ts.map +1 -1
  56. package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.js +3 -5
  57. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
  58. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +21 -42
  59. package/esm/model/commandHandlers/filterContext/common.d.ts +2 -2
  60. package/esm/model/commandHandlers/filterContext/common.d.ts.map +1 -1
  61. package/esm/model/commandHandlers/filterContext/common.js +16 -1
  62. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts +2 -1
  63. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
  64. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +56 -34
  65. package/esm/model/commandHandlers/filterContext/filterViewHandler.d.ts.map +1 -1
  66. package/esm/model/commandHandlers/filterContext/filterViewHandler.js +8 -3
  67. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts +8 -0
  68. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -1
  69. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +42 -9
  70. package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.d.ts.map +1 -1
  71. package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.js +2 -1
  72. package/esm/model/commandHandlers/index.d.ts.map +1 -1
  73. package/esm/model/commandHandlers/index.js +6 -1
  74. package/esm/model/commandHandlers/layout/undoLayoutChangesHandler.d.ts.map +1 -1
  75. package/esm/model/commandHandlers/layout/undoLayoutChangesHandler.js +3 -1
  76. package/esm/model/commandHandlers/parameters/addParametersHandler.d.ts +6 -0
  77. package/esm/model/commandHandlers/parameters/addParametersHandler.d.ts.map +1 -0
  78. package/esm/model/commandHandlers/parameters/addParametersHandler.js +43 -0
  79. package/esm/model/commandHandlers/parameters/removeParametersHandler.d.ts +6 -0
  80. package/esm/model/commandHandlers/parameters/removeParametersHandler.d.ts.map +1 -0
  81. package/esm/model/commandHandlers/parameters/removeParametersHandler.js +29 -0
  82. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
  83. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +10 -4
  84. package/esm/model/commandHandlers/widgets/addVisualizationToSwitcherWidgetHandler.d.ts.map +1 -1
  85. package/esm/model/commandHandlers/widgets/addVisualizationToSwitcherWidgetHandler.js +3 -1
  86. package/esm/model/commandHandlers/widgets/changeInsightWidgetInsightHandler.d.ts.map +1 -1
  87. package/esm/model/commandHandlers/widgets/changeInsightWidgetInsightHandler.js +2 -0
  88. package/esm/model/commandHandlers/widgets/refreshInsightWidgetHandler.d.ts.map +1 -1
  89. package/esm/model/commandHandlers/widgets/refreshInsightWidgetHandler.js +2 -0
  90. package/esm/model/commands/base.d.ts +1 -1
  91. package/esm/model/commands/base.d.ts.map +1 -1
  92. package/esm/model/commands/filters.d.ts +88 -4
  93. package/esm/model/commands/filters.d.ts.map +1 -1
  94. package/esm/model/commands/filters.js +33 -21
  95. package/esm/model/commands/index.d.ts +3 -3
  96. package/esm/model/commands/index.d.ts.map +1 -1
  97. package/esm/model/commands/parameters.d.ts +78 -1
  98. package/esm/model/commands/parameters.d.ts.map +1 -1
  99. package/esm/model/commands/parameters.js +47 -0
  100. package/esm/model/events/base.d.ts +1 -1
  101. package/esm/model/events/base.d.ts.map +1 -1
  102. package/esm/model/events/filters.d.ts +70 -1
  103. package/esm/model/events/filters.d.ts.map +1 -1
  104. package/esm/model/events/filters.js +36 -0
  105. package/esm/model/events/index.d.ts +3 -3
  106. package/esm/model/events/index.d.ts.map +1 -1
  107. package/esm/model/events/parameters.d.ts +43 -1
  108. package/esm/model/events/parameters.d.ts.map +1 -1
  109. package/esm/model/events/parameters.js +26 -0
  110. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts.map +1 -1
  111. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.js +5 -0
  112. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.d.ts.map +1 -1
  113. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.js +5 -0
  114. package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
  115. package/esm/model/react/useInitializeDashboardStore.js +0 -2
  116. package/esm/model/react/useWidgetFilters.d.ts.map +1 -1
  117. package/esm/model/react/useWidgetFilters.js +5 -2
  118. package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
  119. package/esm/model/store/filtering/dashboardFilterSelectors.js +10 -2
  120. package/esm/model/store/meta/metaSelectors.js +3 -3
  121. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +31 -2
  122. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
  123. package/esm/model/store/tabs/filterContext/filterContextReducers.js +66 -12
  124. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts +29 -3
  125. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts.map +1 -1
  126. package/esm/model/store/tabs/filterContext/filterContextSelectors.js +29 -3
  127. package/esm/model/store/tabs/filterContext/filterContextState.d.ts +2 -2
  128. package/esm/model/store/tabs/filterContext/filterContextState.d.ts.map +1 -1
  129. package/esm/model/store/tabs/filterContext/filterContextUtils.d.ts.map +1 -1
  130. package/esm/model/store/tabs/filterContext/filterContextUtils.js +80 -24
  131. package/esm/model/store/tabs/filterContext/filterSync.d.ts +7 -1
  132. package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
  133. package/esm/model/store/tabs/filterContext/filterSync.js +58 -21
  134. package/esm/model/store/tabs/layout/layoutSelectors.js +2 -2
  135. package/esm/model/utils/widgetFilters.js +2 -2
  136. package/esm/plugins/customizationApis/customizationBuilder.d.ts.map +1 -1
  137. package/esm/plugins/customizationApis/customizationBuilder.js +3 -1
  138. package/esm/plugins/customizationApis/dateFiltersCustomizer.d.ts +4 -3
  139. package/esm/plugins/customizationApis/dateFiltersCustomizer.d.ts.map +1 -1
  140. package/esm/plugins/customizationApis/dateFiltersCustomizer.js +23 -41
  141. package/esm/plugins/customizer.d.ts +16 -1
  142. package/esm/plugins/customizer.d.ts.map +1 -1
  143. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  144. package/esm/presentation/automations/connectors/AlertingConnector.js +14 -1
  145. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
  146. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +14 -1
  147. package/esm/presentation/automations/connectors/hooks/useAbsoluteGranularityDateFilterBlocksAutomation.d.ts +8 -0
  148. package/esm/presentation/automations/connectors/hooks/useAbsoluteGranularityDateFilterBlocksAutomation.d.ts.map +1 -0
  149. package/esm/presentation/automations/connectors/hooks/useAbsoluteGranularityDateFilterBlocksAutomation.js +16 -0
  150. package/esm/presentation/automations/shared/components/AbsoluteGranularityDateFilterNotSupportedDialog.d.ts +13 -0
  151. package/esm/presentation/automations/shared/components/AbsoluteGranularityDateFilterNotSupportedDialog.d.ts.map +1 -0
  152. package/esm/presentation/automations/shared/components/AbsoluteGranularityDateFilterNotSupportedDialog.js +29 -0
  153. package/esm/presentation/automations/shared/exportUtils/filterUtils.d.ts.map +1 -1
  154. package/esm/presentation/automations/shared/exportUtils/filterUtils.js +4 -2
  155. package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
  156. package/esm/presentation/automations/shared/utils/automationUtils.js +10 -4
  157. package/esm/presentation/componentDefinition/types.d.ts +3 -3
  158. package/esm/presentation/componentDefinition/types.d.ts.map +1 -1
  159. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.d.ts.map +1 -1
  160. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.js +56 -20
  161. package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
  162. package/esm/presentation/dashboard/components/DashboardRenderer.js +1 -1
  163. package/esm/presentation/dashboard/hooks/useDashboard.d.ts +2 -2
  164. package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
  165. package/esm/presentation/dashboard/hooks/useDashboard.js +8 -3
  166. package/esm/presentation/dashboard/types.d.ts +12 -1
  167. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  168. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -2
  169. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
  170. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -1
  171. package/esm/presentation/dashboardContexts/types.d.ts +13 -2
  172. package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
  173. package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts +4 -4
  174. package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts.map +1 -1
  175. package/esm/presentation/dragAndDrop/useFilterDeleteDrop.d.ts.map +1 -1
  176. package/esm/presentation/dragAndDrop/useFilterDeleteDrop.js +6 -4
  177. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
  178. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +10 -2
  179. package/esm/presentation/drill/DrillSelect/WithDrillSelect.d.ts.map +1 -1
  180. package/esm/presentation/drill/DrillSelect/WithDrillSelect.js +15 -7
  181. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.d.ts.map +1 -1
  182. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.js +62 -6
  183. package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
  184. package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +3 -2
  185. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts +2 -2
  186. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
  187. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +30 -14
  188. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilterComponentSetFactory.d.ts +2 -2
  189. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilterComponentSetFactory.d.ts.map +1 -1
  190. package/esm/presentation/filterBar/dateFilter/dateFilterOfAnyTypeProvider.d.ts +7 -0
  191. package/esm/presentation/filterBar/dateFilter/dateFilterOfAnyTypeProvider.d.ts.map +1 -0
  192. package/esm/presentation/filterBar/dateFilter/dateFilterOfAnyTypeProvider.js +40 -0
  193. package/esm/presentation/filterBar/dateFilter/types.d.ts +43 -1
  194. package/esm/presentation/filterBar/dateFilter/types.d.ts.map +1 -1
  195. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.d.ts.map +1 -1
  196. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.js +13 -5
  197. package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
  198. package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +3 -1
  199. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +2 -2
  200. package/esm/presentation/filterBar/filterBar/ShowAllFiltersButton.d.ts.map +1 -1
  201. package/esm/presentation/filterBar/filterBar/ShowAllFiltersButton.js +1 -1
  202. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
  203. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +21 -3
  204. package/esm/presentation/filterBar/filterBar/types.d.ts +3 -3
  205. package/esm/presentation/filterBar/filterBar/types.d.ts.map +1 -1
  206. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts +3 -3
  207. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts.map +1 -1
  208. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.js +3 -3
  209. package/esm/presentation/filterBar/parameterFilter/DashboardParameterPicker.d.ts.map +1 -1
  210. package/esm/presentation/filterBar/parameterFilter/DashboardParameterPicker.js +11 -13
  211. package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts.map +1 -1
  212. package/esm/presentation/insightEditor/filterContext/dateFilters.js +2 -1
  213. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +2 -0
  214. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  215. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +2 -0
  216. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +2 -0
  217. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  218. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +2 -0
  219. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +2 -0
  220. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  221. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +2 -0
  222. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +52 -0
  223. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  224. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +52 -0
  225. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +2 -0
  226. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  227. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +2 -0
  228. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +2 -0
  229. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  230. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +2 -0
  231. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +2 -0
  232. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  233. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +2 -0
  234. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +2 -0
  235. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  236. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +2 -0
  237. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +2 -0
  238. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  239. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +2 -0
  240. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +2 -0
  241. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  242. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +2 -0
  243. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +2 -0
  244. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  245. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +2 -0
  246. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +2 -0
  247. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  248. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +2 -0
  249. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +2 -0
  250. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  251. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +2 -0
  252. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +2 -0
  253. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  254. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +2 -0
  255. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +2 -0
  256. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  257. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +2 -0
  258. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +2 -0
  259. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  260. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +2 -0
  261. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +2 -0
  262. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  263. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +2 -0
  264. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +2 -0
  265. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  266. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +2 -0
  267. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +2 -0
  268. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  269. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +2 -0
  270. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +2 -0
  271. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  272. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +2 -0
  273. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +2 -0
  274. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  275. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +2 -0
  276. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +2 -0
  277. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  278. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +2 -0
  279. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +2 -0
  280. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  281. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +2 -0
  282. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +2 -0
  283. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  284. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +3 -1
  285. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +2 -0
  286. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  287. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +2 -0
  288. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +2 -0
  289. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  290. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +2 -0
  291. package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
  292. package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +33 -6
  293. package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.d.ts.map +1 -1
  294. package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.js +2 -2
  295. package/esm/presentation/widget/description/DescriptionClickTrigger.d.ts.map +1 -1
  296. package/esm/presentation/widget/description/DescriptionClickTrigger.js +19 -3
  297. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.d.ts.map +1 -1
  298. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.js +19 -1
  299. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -1
  300. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +12 -5
  301. package/esm/sdk-ui-dashboard.d.ts +451 -16
  302. package/package.json +23 -23
  303. package/styles/css/filterBar.css +5 -0
  304. package/styles/css/filterBar.css.map +1 -1
  305. package/styles/css/main.css +6 -3
  306. package/styles/css/main.css.map +1 -1
  307. package/styles/css/timezoneIndicator.css +1 -3
  308. package/styles/css/timezoneIndicator.css.map +1 -1
  309. package/styles/scss/filterBar.scss +4 -0
  310. package/styles/scss/timezoneIndicator.scss +1 -3
  311. package/esm/assets/timezone.svg +0 -1
  312. package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.d.ts +0 -3
  313. package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.d.ts.map +0 -1
  314. package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.js +0 -26
@@ -1,8 +1,10 @@
1
1
  // (C) 2021-2026 GoodData Corporation
2
2
  import { call, put, select } from "redux-saga/effects";
3
3
  import { invariant } from "ts-invariant";
4
- import { areObjRefsEqual, dashboardAbsoluteGranularityDateFilterToDateFilterByWidget, dashboardAttributeFilterItemToAttributeFilter, dashboardDateFilterToDateFilterByWidget, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterToMeasureValueFilter, insightMeasures, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardMeasureValueFilter, isDateFilterOfAnyType, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
4
+ import { areObjRefsEqual, dashboardAbsoluteGranularityDateFilterToDateFilterByWidget, dashboardAttributeFilterItemToAttributeFilter, dashboardDateFilterToDateFilterByWidget, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterToMeasureValueFilter, insightMeasures, isDashboardAbsoluteGranularityDateFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDateFilterOfAnyType, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
5
5
  import { _compact, _isEmpty, _isEqual } from "@gooddata/util";
6
+ import { ABSOLUTE_GRANULARITY_DATE_FILTER_DRILL_TO_DASHBOARD_NOT_SUPPORTED } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
7
+ import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../_staging/dashboard/parameterizedDateFilters.js";
6
8
  import { switchDashboardTab } from "../../commands/tabs.js";
7
9
  import { drillToDashboardRequested, drillToDashboardResolved, } from "../../events/drill.js";
8
10
  import { generateFilterLocalIdentifier } from "../../store/_infra/generators.js";
@@ -11,7 +13,7 @@ import { selectCatalogDateAttributes } from "../../store/catalog/catalogSelector
11
13
  import { selectRestrictedDashboardFilterLocalIdentifiers } from "../../store/filtering/dashboardFilterSelectors.js";
12
14
  import { selectInsightByRef } from "../../store/insights/insightsSelectors.js";
13
15
  import { selectAttributeFilterConfigsDisplayAsLabelMap, selectAttributeFilterConfigsOverrides, } from "../../store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
14
- import { selectFilterContextAttributeFilterItems, selectFilterContextDateFilter, selectFilterContextDraggableFilterItems, selectFilterContextMeasureValueFilters, } from "../../store/tabs/filterContext/filterContextSelectors.js";
16
+ import { selectFilterContextAttributeFilterItems, selectFilterContextDateFilterOfAnyType, selectFilterContextDraggableFilterItems, selectFilterContextMeasureValueFilters, } from "../../store/tabs/filterContext/filterContextSelectors.js";
15
17
  import { selectAnalyticalWidgetByRef } from "../../store/tabs/layout/layoutSelectors.js";
16
18
  import { selectActiveTabDrillParameters } from "../../store/tabs/parameters/parametersSelectors.js";
17
19
  import { convertIntersectionToAttributeFilters, removeIgnoredValuesFromDrillIntersection, } from "./common/intersectionUtils.js";
@@ -30,8 +32,14 @@ export function* drillToDashboardHandler(ctx, cmd) {
30
32
  const ignoredDashboardFilterIds = new Set(cmd.payload.drillDefinition.ignoredDashboardFilters ?? []);
31
33
  const shouldUseDateFilter = !!widget.dateDataSet && !isDateFilterDisabled(insight);
32
34
  // widget's dateDataSet is not needed in common date filter because target dashboard widget's will use their own dateDataSet
33
- const commonDateFilter = shouldUseDateFilter
34
- ? removeIgnoredDashboardFilters([yield select(selectDrillingDateFilter)], ignoredDashboardFilterIds)[0]
35
+ const drillingDateFilter = shouldUseDateFilter
36
+ ? yield select(selectDrillingDateFilter)
37
+ : undefined;
38
+ if (isDashboardAbsoluteGranularityDateFilter(drillingDateFilter)) {
39
+ console.warn(`${ABSOLUTE_GRANULARITY_DATE_FILTER_DRILL_TO_DASHBOARD_NOT_SUPPORTED} The target dashboard keeps its date filter.`);
40
+ }
41
+ const commonDateFilter = drillingDateFilter && !isDashboardAbsoluteGranularityDateFilter(drillingDateFilter)
42
+ ? removeIgnoredDashboardFilters([drillingDateFilter], ignoredDashboardFilterIds)[0]
35
43
  : undefined;
36
44
  // get proper attr filters
37
45
  const isDrillingToSelf = areObjRefsEqual(ctx.dashboardRef, cmd.payload.drillDefinition.target);
@@ -122,9 +130,9 @@ function transformToPrimaryLabelFilters(drillIntersectionFilters, filtersCount =
122
130
  });
123
131
  return [transformedFilters, attributeFilterConfigs];
124
132
  }
125
- // result needs to be IDashboardDateFilter to allow optional dateDataSet
133
+ // result needs to be a dashboard date filter to allow optional dateDataSet
126
134
  function selectDrillingDateFilter(state) {
127
- const globalDateFilter = selectFilterContextDateFilter(state);
135
+ const globalDateFilter = selectFilterContextDateFilterOfAnyType(state);
128
136
  return globalDateFilter ?? newAllTimeDashboardDateFilter();
129
137
  }
130
138
  function selectAllAttributeFilters(state) {
@@ -149,6 +157,10 @@ function convertFilterItemsToFilters(filter, widget) {
149
157
  if (isDashboardAttributeFilterItem(filter)) {
150
158
  return dashboardAttributeFilterItemToAttributeFilter(filter);
151
159
  }
160
+ if (isDashboardParameterizedDateFilter(filter)) {
161
+ console.warn(`Skipping a dashboard filter. ${PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED}`, filter);
162
+ return undefined;
163
+ }
152
164
  const unknownFilter = filter;
153
165
  console.warn("Skipping a filter of an unknown type.", unknownFilter);
154
166
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"addAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAId,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAexE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,wBAAiB,yBAAyB,CACtC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,IAAI,GAAE,QAAQ,GAAG,aAAwB,GAC1C,YAAY,CAAC,IAAI,CAAC,CAyJpB;AAED,wBAAiB,uBAAuB,CACpC,GAAG,EAAE,gBAAgB,EACrB,oBAAoB,EAAE,MAAM,EAC5B,cAAc,EAAE,yBAAyB;;;;;;sLAqC5C"}
1
+ {"version":3,"file":"addAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAcxE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,wBAAiB,yBAAyB,CACtC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,IAAI,GAAE,QAAQ,GAAG,aAAwB,GAC1C,YAAY,CAAC,IAAI,CAAC,CAwJpB;AAED,wBAAiB,uBAAuB,CACpC,GAAG,EAAE,gBAAgB,EACrB,oBAAoB,EAAE,MAAM,EAC5B,cAAc,EAAE,yBAAyB;;;;;;sLAqC5C"}
@@ -2,7 +2,7 @@
2
2
  import { batchActions } from "redux-batched-actions";
3
3
  import { all, call, put, select } from "redux-saga/effects";
4
4
  import { invariant } from "ts-invariant";
5
- import { DashboardAttributeFilterSelectionTypeValues, areObjRefsEqual, isInsightWidget, objRefToString, } from "@gooddata/sdk-model";
5
+ import { DashboardAttributeFilterSelectionTypeValues, areObjRefsEqual, objRefToString, } from "@gooddata/sdk-model";
6
6
  import { _isEmpty } from "@gooddata/util";
7
7
  import { attributeFilterAdded } from "../../../events/filters.js";
8
8
  import { invalidArgumentsProvided } from "../../../events/general.js";
@@ -11,9 +11,8 @@ import { selectBackendCapabilities } from "../../../store/backendCapabilities/ba
11
11
  import { selectCrossFilteringFiltersLocalIdentifiers } from "../../../store/drill/drillSelectors.js";
12
12
  import { selectAttributeFilterDisplayFormsMap, selectCanAddMoreFilters, selectFilterContextAttributeFilterByDisplayForm, selectFilterContextAttributeFilterByLocalId, selectFilterContextAttributeFilterItems, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
13
13
  import { tabsActions } from "../../../store/tabs/index.js";
14
- import { selectAllAnalyticalWidgets } from "../../../store/tabs/layout/layoutSelectors.js";
15
14
  import { resolveDisplayFormMetadata } from "../../../utils/displayFormResolver.js";
16
- import { validateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
15
+ import { revalidateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
17
16
  import { dispatchFilterContextChanged } from "../common.js";
18
17
  import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./validation/computedAttributesEnabledValidation.js";
19
18
  import { canFilterBeAdded } from "./validation/uniqueFiltersValidation.js";
@@ -84,8 +83,7 @@ export function* addAttributeFilterHandler(ctx, cmd, type = "normal") {
84
83
  }
85
84
  yield dispatchDashboardEvent(attributeFilterAdded(ctx, addedFilter, cmd.payload.index, cmd.correlationId));
86
85
  yield call(dispatchFilterContextChanged, ctx, cmd);
87
- const widgets = yield select(selectAllAnalyticalWidgets);
88
- yield call(validateDrillToCustomUrlParams, widgets.filter(isInsightWidget));
86
+ yield call(revalidateDrillToCustomUrlParams);
89
87
  }
90
88
  export function* getConnectingAttributes(ctx, addedFilterAttribute, neighborFilter) {
91
89
  const { backend, workspace } = ctx;
@@ -1 +1 @@
1
- {"version":3,"file":"addTextAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAa/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAW5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CA2GpB"}
1
+ {"version":3,"file":"addTextAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAY/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAU5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CA0GpB"}
@@ -2,14 +2,13 @@
2
2
  import { batchActions } from "redux-batched-actions";
3
3
  import { call, put, select } from "redux-saga/effects";
4
4
  import { invariant } from "ts-invariant";
5
- import { DashboardAttributeFilterSelectionTypeValues, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, isInsightWidget, objRefToString, } from "@gooddata/sdk-model";
5
+ import { DashboardAttributeFilterSelectionTypeValues, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, objRefToString, } from "@gooddata/sdk-model";
6
6
  import { _isEmpty } from "@gooddata/util";
7
7
  import { invalidArgumentsProvided } from "../../../events/general.js";
8
8
  import { selectBackendCapabilities } from "../../../store/backendCapabilities/backendCapabilitiesSelectors.js";
9
9
  import { selectCanAddMoreFilters, selectFilterContextAttributeFilterItemByDisplayForm, selectFilterContextAttributeFilterItemByLocalId, selectFilterContextAttributeFilterItems, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
10
10
  import { tabsActions } from "../../../store/tabs/index.js";
11
- import { selectAllAnalyticalWidgets } from "../../../store/tabs/layout/layoutSelectors.js";
12
- import { validateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
11
+ import { revalidateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
13
12
  import { dispatchFilterContextChanged } from "../common.js";
14
13
  import { resolveAndRegisterDisplayFormMetadata } from "./resolveDisplayFormMetadata.js";
15
14
  import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./validation/computedAttributesEnabledValidation.js";
@@ -65,6 +64,5 @@ export function* addTextAttributeFilterHandler(ctx, cmd) {
65
64
  yield put(batchActions(configActions));
66
65
  }
67
66
  yield call(dispatchFilterContextChanged, ctx, cmd);
68
- const widgets = yield select(selectAllAnalyticalWidgets);
69
- yield call(validateDrillToCustomUrlParams, widgets.filter(isInsightWidget));
67
+ yield call(revalidateDrillToCustomUrlParams);
70
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"removeAttributeFiltersHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAY/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAO5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAmFpB"}
1
+ {"version":3,"file":"removeAttributeFiltersHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAM5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAkFpB"}
@@ -2,15 +2,14 @@
2
2
  import { difference } from "lodash-es";
3
3
  import { batchActions } from "redux-batched-actions";
4
4
  import { call, put, select } from "redux-saga/effects";
5
- import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemLocalIdentifier, isInsightWidget, } from "@gooddata/sdk-model";
5
+ import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemLocalIdentifier, } from "@gooddata/sdk-model";
6
6
  import { _partition } from "@gooddata/util";
7
7
  import { attributeFilterRemoved } from "../../../events/filters.js";
8
8
  import { invalidArgumentsProvided } from "../../../events/general.js";
9
9
  import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
10
10
  import { selectFilterContextAttributeFilterItems } from "../../../store/tabs/filterContext/filterContextSelectors.js";
11
11
  import { tabsActions } from "../../../store/tabs/index.js";
12
- import { selectAllAnalyticalWidgets } from "../../../store/tabs/layout/layoutSelectors.js";
13
- import { validateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
12
+ import { revalidateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
14
13
  import { dispatchFilterContextChanged } from "../common.js";
15
14
  export function* removeAttributeFiltersHandler(ctx, cmd) {
16
15
  const { filterLocalIds } = cmd.payload;
@@ -61,6 +60,5 @@ export function* removeAttributeFiltersHandler(ctx, cmd) {
61
60
  yield dispatchDashboardEvent(attributeFilterRemoved(ctx, removedFilter, affectedChildren, cmd.correlationId));
62
61
  }
63
62
  yield call(dispatchFilterContextChanged, ctx, cmd);
64
- const widgets = yield select(selectAllAnalyticalWidgets);
65
- yield call(validateDrillToCustomUrlParams, widgets.filter(isInsightWidget));
63
+ yield call(revalidateDrillToCustomUrlParams);
66
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"changeFilterContextSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAgD/C,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAuC9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiOnE,wBAAiB,mCAAmC,CAChD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,4BAA4B,GAClC,YAAY,CAAC,IAAI,CAAC,CAgQpB"}
1
+ {"version":3,"file":"changeFilterContextSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmD/C,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAuC9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAkOnE,wBAAiB,mCAAmC,CAChD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,4BAA4B,GAClC,YAAY,CAAC,IAAI,CAAC,CAqQpB"}
@@ -1,9 +1,9 @@
1
1
  // (C) 2021-2026 GoodData Corporation
2
2
  import { all, call, put, select } from "redux-saga/effects";
3
3
  import { NotSupported } from "@gooddata/sdk-backend-spi";
4
- import { areObjRefsEqual, attributeElementsIsEmpty, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardMeasureValueFilterLocalIdentifier, getAttributeElementsItems, isAbsoluteGranularityDateFilter, isAllTimeDashboardDateFilter, isDashboardAbsoluteGranularityDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardDateFilterOfAnyType, isDashboardMeasureValueFilter, isDashboardTextAttributeFilter, isParameterizedDateFilter, isSingleSelectionFilter, isUriRef, objRefToString, serializeObjRef, updateAttributeElementsItems, } from "@gooddata/sdk-model";
4
+ import { areObjRefsEqual, attributeElementsIsEmpty, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardMeasureValueFilterLocalIdentifier, getAttributeElementsItems, isAllTimeDashboardDateFilter, isDashboardAbsoluteGranularityDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilterOfAnyType, isDashboardDateFilterOfAnyType, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDashboardTextAttributeFilter, isParameterizedDateFilter, isSingleSelectionFilter, isUriRef, objRefToString, serializeObjRef, updateAttributeElementsItems, } from "@gooddata/sdk-model";
5
5
  import { _compact, _partition, _uniqBy } from "@gooddata/util";
6
- import { ABSOLUTE_GRANULARITY_DATE_FILTER_NOT_SUPPORTED } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
6
+ import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
7
7
  import { dashboardFilterToFilterContextItem } from "../../../_staging/dashboard/dashboardFilterContext.js";
8
8
  import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../_staging/dashboard/parameterizedDateFilters.js";
9
9
  import { invalidArgumentsProvided } from "../../events/general.js";
@@ -21,6 +21,7 @@ import { resolveDisplayFormMetadata, } from "../../utils/displayFormResolver.js"
21
21
  import { resolveAndRegisterDisplayFormMetadata } from "./attributeFilter/resolveDisplayFormMetadata.js";
22
22
  import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./attributeFilter/validation/computedAttributesEnabledValidation.js";
23
23
  import { canApplyDateFilter } from "./common.js";
24
+ import { toUpsertDateFilterPayload } from "./tabSync/tabSyncRules.js";
24
25
  import { beginTabSync, endTabSync, putTabSynced } from "./tabSync/tabSyncSaga.js";
25
26
  import { writtenFiltersOf } from "./tabSync/writtenTargets.js";
26
27
  function classifyRestore(type, restoresOriginal) {
@@ -134,11 +135,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
134
135
  return;
135
136
  }
136
137
  }
137
- if (filters.some((filter) => isDashboardAbsoluteGranularityDateFilter(filter) || isAbsoluteGranularityDateFilter(filter))) {
138
- yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_NOT_SUPPORTED));
139
- return;
140
- }
141
- if (filters.some(isParameterizedDateFilter)) {
138
+ if (filters.some((filter) => isDashboardParameterizedDateFilter(filter) || isParameterizedDateFilter(filter))) {
142
139
  yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED));
143
140
  return;
144
141
  }
@@ -180,6 +177,10 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
180
177
  return dashboardFilterToFilterContextItem(filter, !!ctx.backend.capabilities.supportsMultipleDateFilters);
181
178
  })).filter((filter) => !((isDashboardAttributeFilterItem(filter) || isDashboardMeasureValueFilter(filter)) &&
182
179
  isDashboardFilterUsingRestrictedObject(filter, unavailableObjects)) && !(matchByLocalIdentifier && addressesRestrictedFilter(filter)));
180
+ if (containsAbsoluteGranularityDateFilterWithDataSet(normalizedFilters)) {
181
+ yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED));
182
+ return;
183
+ }
183
184
  const disabledComputedAttributeRef = yield call(findDisabledComputedAttributeRef, [
184
185
  ...normalizedFilters
185
186
  .filter(isDashboardAttributeFilterItem)
@@ -197,7 +198,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
197
198
  .filter((f) => dashboardAttributeFilterItemLocalIdentifier(f))
198
199
  .slice()
199
200
  .reverse(), (f) => dashboardAttributeFilterItemLocalIdentifier(f)).reverse();
200
- const supportedFilters = normalizedFilters.filter((filter) => isDashboardAttributeFilter(filter) || isDashboardDateFilter(filter));
201
+ const supportedFilters = normalizedFilters.filter((filter) => isDashboardAttributeFilter(filter) || isDashboardDateFilterOfAnyType(filter));
201
202
  // Measure value filters use whole-condition replacement keyed by localIdentifier; deduplicate
202
203
  // by localIdentifier (last occurrence wins, mirroring text attribute filter handling).
203
204
  const measureValueFilters = _uniqBy(normalizedFilters.filter(isDashboardMeasureValueFilter).slice().reverse(), (f) => dashboardMeasureValueFilterLocalIdentifier(f)).reverse();
@@ -212,7 +213,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
212
213
  }
213
214
  const identification = isDashboardAttributeFilter(filter)
214
215
  ? dashboardAttributeFilterItemDisplayForm(filter)
215
- : filter.dateFilter.dataSet;
216
+ : dashboardFilterObjRef(filter);
216
217
  let config;
217
218
  if (isDashboardAttributeFilter(filter)) {
218
219
  config = attributeFilterConfigs.find((config) => config.localIdentifier === dashboardAttributeFilterItemLocalIdentifier(filter));
@@ -223,12 +224,12 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
223
224
  ? objRefToString(identification) + secondaryIdentification
224
225
  : identification + secondaryIdentification;
225
226
  });
226
- const [dateFilters, attributeFilters] = _partition(uniqueFilters, isDashboardDateFilter);
227
- const [[commonDateFilter], dateFiltersWithDimension] = _partition(dateFilters, isDashboardCommonDateFilter);
227
+ const [dateFilters, attributeFilters] = _partition(uniqueFilters, isDashboardDateFilterOfAnyType);
228
+ const [[commonDateFilter], dateFiltersWithDimension] = _partition(dateFilters, isDashboardCommonDateFilterOfAnyType);
228
229
  const selectionTypeMap = yield call(selectAttributeFilterConfigsSelectionTypeMapTabAware, tabLocalIdentifier);
229
230
  const [attributeFilterResult, commonDateFilterUpdateActions, dateFiltersUpdateActions, measureValueFilterUpdateActions,] = yield all([
230
231
  call(getAttributeFiltersUpdateActions, [...attributeFilters].reverse(), textAttributeFilters, attributeFilterConfigs, resetOthers, ctx, tabLocalIdentifier, selectionTypeMap, matchByLocalIdentifier),
231
- call(getDateFilterUpdateActions, commonDateFilter, resetOthers, tabLocalIdentifier),
232
+ call(getDateFilterUpdateActions, commonDateFilter, resetOthers, restorePerTabOriginals, tabLocalIdentifier),
232
233
  call(getDateFiltersUpdateActions, dateFiltersWithDimension, resetOthers, tabLocalIdentifier),
233
234
  call(getMeasureValueFiltersUpdateActions, measureValueFilters, resetOthers, tabLocalIdentifier),
234
235
  ]);
@@ -649,40 +650,18 @@ function* getAttributeFiltersUpdateActions(attributeFilters, textAttributeFilter
649
650
  }
650
651
  return { actions: updateActions, displayFormsToResolve };
651
652
  }
652
- function* getDateFilterUpdateActions(dateFilter, resetOthers, tabLocalIdentifier) {
653
+ function* getDateFilterUpdateActions(dateFilter, resetOthers, restorePerTabOriginals, tabLocalIdentifier) {
653
654
  if (dateFilter) {
654
- const canApply = yield call(canApplyDateFilter, dateFilter);
655
+ // a reset restores the stored filter with granularity, which loads without the check too
656
+ const canApply = restorePerTabOriginals && isDashboardAbsoluteGranularityDateFilter(dateFilter)
657
+ ? true
658
+ : yield call(canApplyDateFilter, dateFilter);
655
659
  if (!canApply) {
656
660
  return [];
657
661
  }
658
- const localIdentifierObj = dateFilter.dateFilter.localIdentifier
659
- ? { localIdentifier: dateFilter.dateFilter.localIdentifier }
660
- : {};
661
- const emptyValueHandlingObj = dateFilter.dateFilter.emptyValueHandling
662
- ? { emptyValueHandling: dateFilter.dateFilter.emptyValueHandling }
663
- : {};
664
- const upsertPayload = isAllTimeDashboardDateFilter(dateFilter)
665
- ? {
666
- type: "allTime",
667
- dataSet: dateFilter.dateFilter.dataSet,
668
- ...localIdentifierObj,
669
- ...emptyValueHandlingObj,
670
- tabLocalIdentifier,
671
- }
672
- : {
673
- type: dateFilter.dateFilter.type,
674
- granularity: dateFilter.dateFilter.granularity,
675
- from: dateFilter.dateFilter.from,
676
- to: dateFilter.dateFilter.to,
677
- dataSet: dateFilter.dateFilter.dataSet,
678
- ...localIdentifierObj,
679
- ...(dateFilter.dateFilter.boundedFilter
680
- ? { boundedFilter: dateFilter.dateFilter.boundedFilter }
681
- : {}),
682
- ...emptyValueHandlingObj,
683
- tabLocalIdentifier,
684
- };
685
- return [tabsActions.upsertDateFilter(upsertPayload)];
662
+ return [
663
+ tabsActions.upsertDateFilter({ ...toUpsertDateFilterPayload(dateFilter), tabLocalIdentifier }),
664
+ ];
686
665
  }
687
666
  else if (resetOthers) {
688
667
  return [
@@ -1,5 +1,5 @@
1
1
  import { type SagaIterator } from "redux-saga";
2
- import { type IDashboardAttributeFilterConfig, type IDashboardDateFilter, type IFilterContextDefinition } from "@gooddata/sdk-model";
2
+ import { type DashboardDateFilterOfAnyType, type IDashboardAttributeFilterConfig, type IFilterContextDefinition } from "@gooddata/sdk-model";
3
3
  import { type IDashboardCommand } from "../../commands/base.js";
4
4
  import { type IWorkingFilterContextDefinition } from "../../store/tabs/filterContext/filterContextState.js";
5
5
  import { type DashboardContext } from "../../types/commonTypes.js";
@@ -19,7 +19,7 @@ export declare function captureFilterContextByTabSnapshot(): SagaIterator<IFilte
19
19
  */
20
20
  export declare function dispatchFilterContextChangedForMutatedTabs(ctx: DashboardContext, cmd: IDashboardCommand, snapshot: IFilterContextByTabSnapshot, skippedTabId?: string): SagaIterator<void>;
21
21
  export declare function dispatchFilterContextChanged(ctx: DashboardContext, cmd: IDashboardCommand, tabLocalIdentifier?: string): SagaIterator<void>;
22
- export declare function canApplyDateFilter(dateFilter: IDashboardDateFilter): SagaIterator<boolean>;
22
+ export declare function canApplyDateFilter(dateFilter: DashboardDateFilterOfAnyType): SagaIterator<boolean>;
23
23
  export declare function resetCrossFiltering(cmd: IDashboardCommand): Generator<import("redux-saga/effects").PutEffect<import("../../commands/filters.js").IRemoveAttributeFilters> | import("redux-saga/effects").PutEffect<{
24
24
  payload: string | undefined;
25
25
  type: "drill/resetCrossFiltering";
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/common.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,+BAA+B,EACpC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAChC,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAqBhE,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAI5G,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAE,KAAK,eAAe,EAA0C,MAAM,0BAA0B,CAAC;AAExG;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC,CAAC;IAC9E,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,GAAG,SAAS,CAAC,CAAC;IAC5F,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,CAAC,CAAC;CACtF;AAED,wBAAiB,iCAAiC,IAAI,YAAY,CAAC,2BAA2B,CAAC,CAU9F;AAED;;GAEG;AACH,wBAAiB,0CAA0C,CACvD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,QAAQ,EAAE,2BAA2B,EACrC,YAAY,CAAC,EAAE,MAAM,GACtB,YAAY,CAAC,IAAI,CAAC,CAwBpB;AAED,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAC5B,YAAY,CAAC,IAAI,CAAC,CAkCpB;AAED,wBAAiB,kBAAkB,CAAC,UAAU,EAAE,oBAAoB,GAAG,YAAY,CAAC,OAAO,CAAC,CAuB3F;AAED,wBAAiB,mBAAmB,CAAC,GAAG,EAAE,iBAAiB;;;yEAU1D;AAED,wBAAiB,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,8YA4B1F;AAED,wBAAiB,4BAA4B;;;mBAE5C"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/common.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAGhC,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAwBhE,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAI5G,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAE,KAAK,eAAe,EAA0C,MAAM,0BAA0B,CAAC;AAExG;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC,CAAC;IAC9E,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,GAAG,SAAS,CAAC,CAAC;IAC5F,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,CAAC,CAAC;CACtF;AAED,wBAAiB,iCAAiC,IAAI,YAAY,CAAC,2BAA2B,CAAC,CAU9F;AAED;;GAEG;AACH,wBAAiB,0CAA0C,CACvD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,QAAQ,EAAE,2BAA2B,EACrC,YAAY,CAAC,EAAE,MAAM,GACtB,YAAY,CAAC,IAAI,CAAC,CAwBpB;AAED,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAC5B,YAAY,CAAC,IAAI,CAAC,CAkCpB;AAED,wBAAiB,kBAAkB,CAAC,UAAU,EAAE,4BAA4B,GAAG,YAAY,CAAC,OAAO,CAAC,CAyCnG;AAED,wBAAiB,mBAAmB,CAAC,GAAG,EAAE,iBAAiB;;;yEAU1D;AAED,wBAAiB,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,8YA4B1F;AAED,wBAAiB,4BAA4B;;;mBAE5C"}
@@ -1,12 +1,13 @@
1
1
  // (C) 2021-2026 GoodData Corporation
2
2
  import { call, put, select } from "redux-saga/effects";
3
3
  import { invariant } from "ts-invariant";
4
+ import { isDashboardAbsoluteGranularityDateFilter, isDashboardParameterizedDateFilter, } from "@gooddata/sdk-model";
4
5
  import { _isEqual } from "@gooddata/util";
5
6
  import { findDateFilterOptionByValue } from "../../../_staging/dateFilterConfig/dateFilterOptionMapping.js";
6
7
  import { removeAttributeFilters } from "../../commands/filters.js";
7
8
  import { filterContextChanged, filterContextWorkingSelectionApplied } from "../../events/filters.js";
8
9
  import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
9
- import { selectEnableImmediateAttributeFilterDisplayAsLabelMigration } from "../../store/config/configSelectors.js";
10
+ import { selectEnableImmediateAttributeFilterDisplayAsLabelMigration, selectSettings, } from "../../store/config/configSelectors.js";
10
11
  import { selectCrossFilteringFiltersLocalIdentifiers, selectIsCrossFiltering, } from "../../store/drill/drillSelectors.js";
11
12
  import { drillActions } from "../../store/drill/index.js";
12
13
  import { selectAttributeFilterConfigsOverrides, selectAttributeFilterConfigsOverridesByTab, } from "../../store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
@@ -63,6 +64,20 @@ export function* dispatchFilterContextChanged(ctx, cmd, tabLocalIdentifier) {
63
64
  }
64
65
  export function* canApplyDateFilter(dateFilter) {
65
66
  const effectiveDateFilterOptions = yield select(selectEffectiveDateFilterOptions);
67
+ if (isDashboardAbsoluteGranularityDateFilter(dateFilter)) {
68
+ const settings = yield select(selectSettings);
69
+ const absoluteForm = effectiveDateFilterOptions?.absoluteForm;
70
+ const { granularity } = dateFilter.dashboardAbsoluteGranularityDateFilter;
71
+ // the configuration lists the week as the US week
72
+ const tab = granularity === "GDC.time.week" ? "GDC.time.week_us" : granularity;
73
+ return (!!settings.enableAbsoluteDateFilterGranularity &&
74
+ !!absoluteForm?.visible &&
75
+ !!absoluteForm.availableGranularities?.includes(tab));
76
+ }
77
+ // periods are not among the date filter options yet
78
+ if (isDashboardParameterizedDateFilter(dateFilter)) {
79
+ return false;
80
+ }
66
81
  const targetOption = findDateFilterOptionByValue(dateFilter, effectiveDateFilterOptions);
67
82
  if (!targetOption) {
68
83
  if (dateFilter.dateFilter.type === "absolute") {
@@ -1,5 +1,6 @@
1
1
  import { type SagaIterator } from "redux-saga";
2
- import { type ChangeDateFilterSelection } from "../../../commands/filters.js";
2
+ import { type ChangeDateFilterSelection, type ChangeDateFilterSelectionOfAnyType } from "../../../commands/filters.js";
3
3
  import { type DashboardContext } from "../../../types/commonTypes.js";
4
4
  export declare function changeDateFilterSelectionHandler(ctx: DashboardContext, cmd: ChangeDateFilterSelection): SagaIterator<void>;
5
+ export declare function changeDateFilterSelectionOfAnyTypeHandler(ctx: DashboardContext, cmd: ChangeDateFilterSelectionOfAnyType): SagaIterator<void>;
5
6
  //# sourceMappingURL=changeDateFilterSelectionHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"changeDateFilterSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAU/C,OAAO,EAAE,KAAK,yBAAyB,EAA4B,MAAM,8BAA8B,CAAC;AAWxG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,wBAAiB,gCAAgC,CAC7C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,yBAAyB,GAC/B,YAAY,CAAC,IAAI,CAAC,CAsEpB"}
1
+ {"version":3,"file":"changeDateFilterSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB/C,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EAE1C,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKtE,wBAAiB,gCAAgC,CAC7C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,yBAAyB,GAC/B,YAAY,CAAC,IAAI,CAAC,CAgDpB;AAED,wBAAiB,yCAAyC,CACtD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,kCAAkC,GACxC,YAAY,CAAC,IAAI,CAAC,CA+BpB"}
@@ -1,15 +1,18 @@
1
1
  // (C) 2021-2026 GoodData Corporation
2
2
  import { toNumber } from "lodash-es";
3
3
  import { call, select } from "redux-saga/effects";
4
- import { newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, } from "@gooddata/sdk-model";
5
- import { dateFilterChanged } from "../../../events/filters.js";
4
+ import { dashboardFilterObjRef, isDashboardDateFilter, isDashboardParameterizedDateFilter, newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, } from "@gooddata/sdk-model";
5
+ import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../../_staging/dashboard/absoluteGranularityDateFilters.js";
6
+ import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../../_staging/dashboard/parameterizedDateFilters.js";
7
+ import { dateFilterChanged, dateFilterOfAnyTypeChanged } from "../../../events/filters.js";
6
8
  import { invalidArgumentsProvided } from "../../../events/general.js";
7
9
  import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
8
10
  import { selectIsApplyFiltersAllAtOnceEnabledAndSet } from "../../../store/config/configSelectors.js";
9
11
  import { selectIsCrossFiltering } from "../../../store/drill/drillSelectors.js";
10
- import { selectFilterContextDateFilter, selectFilterContextDateFilterByDataSet, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
12
+ import { selectFilterContextDateFilterByDataSet, selectFilterContextDateFilterOfAnyType, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
11
13
  import { tabsActions } from "../../../store/tabs/index.js";
12
14
  import { canApplyDateFilter, resetCrossFiltering } from "../common.js";
15
+ import { toUpsertDateFilterPayload } from "../tabSync/tabSyncRules.js";
13
16
  import { beginTabSync, endTabSync, putTabSynced } from "../tabSync/tabSyncSaga.js";
14
17
  export function* changeDateFilterSelectionHandler(ctx, cmd) {
15
18
  const isAllTime = cmd.payload.type === "relative" &&
@@ -18,38 +21,54 @@ export function* changeDateFilterSelectionHandler(ctx, cmd) {
18
21
  cmd.payload.to === undefined;
19
22
  const canApply = yield call(canApplyDateFilter, dateFilterSelectionToDateFilter(cmd.payload));
20
23
  if (!canApply) {
21
- throw invalidArgumentsProvided(ctx, cmd, `Cannot apply a date filter that is invalid by the current dateFilterConfig.`);
24
+ throw invalidArgumentsProvided(ctx, cmd, INVALID_BY_DATE_FILTER_CONFIG);
22
25
  }
23
- const session = yield call(beginTabSync);
24
- const isApplyAllAtOnceEnabledAndSet = yield select(selectIsApplyFiltersAllAtOnceEnabledAndSet);
25
- const isWorkingSelectionChange = cmd.payload.isWorkingSelectionChange && isApplyAllAtOnceEnabledAndSet;
26
26
  const localIdentifierObj = cmd.payload.localIdentifier
27
27
  ? { localIdentifier: cmd.payload.localIdentifier }
28
28
  : {};
29
+ const emptyValueHandlingObj = cmd.payload.emptyValueHandling
30
+ ? { emptyValueHandling: cmd.payload.emptyValueHandling }
31
+ : {};
32
+ const upsertPayload = isAllTime
33
+ ? {
34
+ type: "allTime",
35
+ dataSet: cmd.payload.dataSet,
36
+ ...localIdentifierObj,
37
+ ...emptyValueHandlingObj,
38
+ }
39
+ : {
40
+ type: cmd.payload.type,
41
+ granularity: cmd.payload.granularity,
42
+ from: cmd.payload.from,
43
+ to: cmd.payload.to,
44
+ dataSet: cmd.payload.dataSet,
45
+ ...localIdentifierObj,
46
+ ...(cmd.payload.boundedFilter ? { boundedFilter: cmd.payload.boundedFilter } : {}),
47
+ ...emptyValueHandlingObj,
48
+ };
49
+ yield call(upsertDateFilterSelection, ctx, cmd, upsertPayload, cmd.payload.dataSet, cmd.payload.dateFilterOptionLocalId, cmd.payload.isWorkingSelectionChange);
50
+ }
51
+ export function* changeDateFilterSelectionOfAnyTypeHandler(ctx, cmd) {
52
+ const { filter, dateFilterOptionLocalId, isWorkingSelectionChange } = cmd.payload;
53
+ if (containsAbsoluteGranularityDateFilterWithDataSet(filter ? [filter] : [])) {
54
+ throw invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED);
55
+ }
56
+ if (isDashboardParameterizedDateFilter(filter)) {
57
+ throw invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED);
58
+ }
59
+ const canApply = yield call(canApplyDateFilter, filter ?? newAllTimeDashboardDateFilter());
60
+ if (!canApply) {
61
+ throw invalidArgumentsProvided(ctx, cmd, INVALID_BY_DATE_FILTER_CONFIG);
62
+ }
63
+ yield call(upsertDateFilterSelection, ctx, cmd, filter ? toUpsertDateFilterPayload(filter) : { type: "allTime" }, filter ? dashboardFilterObjRef(filter) : undefined, dateFilterOptionLocalId, isWorkingSelectionChange);
64
+ }
65
+ const INVALID_BY_DATE_FILTER_CONFIG = "Cannot apply a date filter that is invalid by the current dateFilterConfig.";
66
+ function* upsertDateFilterSelection(ctx, cmd, upsertPayload, dataSet, dateFilterOptionLocalId, requestedWorkingSelectionChange) {
67
+ const session = yield call(beginTabSync);
68
+ const isApplyAllAtOnceEnabledAndSet = yield select(selectIsApplyFiltersAllAtOnceEnabledAndSet);
69
+ const isWorkingSelectionChange = requestedWorkingSelectionChange && isApplyAllAtOnceEnabledAndSet;
29
70
  yield call(putTabSynced, session, [
30
- tabsActions.upsertDateFilter(isAllTime
31
- ? {
32
- type: "allTime",
33
- dataSet: cmd.payload.dataSet,
34
- isWorkingSelectionChange,
35
- ...localIdentifierObj,
36
- ...(cmd.payload.emptyValueHandling
37
- ? { emptyValueHandling: cmd.payload.emptyValueHandling }
38
- : {}),
39
- }
40
- : {
41
- type: cmd.payload.type,
42
- granularity: cmd.payload.granularity,
43
- from: cmd.payload.from,
44
- to: cmd.payload.to,
45
- dataSet: cmd.payload.dataSet,
46
- isWorkingSelectionChange,
47
- ...localIdentifierObj,
48
- ...(cmd.payload.boundedFilter ? { boundedFilter: cmd.payload.boundedFilter } : {}),
49
- ...(cmd.payload.emptyValueHandling
50
- ? { emptyValueHandling: cmd.payload.emptyValueHandling }
51
- : {}),
52
- }),
71
+ tabsActions.upsertDateFilter({ ...upsertPayload, isWorkingSelectionChange }),
53
72
  ]);
54
73
  if (!isWorkingSelectionChange) {
55
74
  const isCrossFiltering = yield select(selectIsCrossFiltering);
@@ -57,10 +76,13 @@ export function* changeDateFilterSelectionHandler(ctx, cmd) {
57
76
  yield call(resetCrossFiltering, cmd);
58
77
  }
59
78
  }
60
- const affectedFilter = cmd.payload.dataSet
61
- ? yield select(selectFilterContextDateFilterByDataSet(cmd.payload.dataSet))
62
- : yield select(selectFilterContextDateFilter);
63
- yield dispatchDashboardEvent(dateFilterChanged(ctx, affectedFilter, cmd.payload.dateFilterOptionLocalId, cmd.correlationId));
79
+ const affectedFilter = dataSet
80
+ ? yield select(selectFilterContextDateFilterByDataSet(dataSet))
81
+ : yield select(selectFilterContextDateFilterOfAnyType);
82
+ if (!affectedFilter || isDashboardDateFilter(affectedFilter)) {
83
+ yield dispatchDashboardEvent(dateFilterChanged(ctx, affectedFilter, dateFilterOptionLocalId, cmd.correlationId));
84
+ }
85
+ yield dispatchDashboardEvent(dateFilterOfAnyTypeChanged(ctx, affectedFilter, dateFilterOptionLocalId, cmd.correlationId));
64
86
  yield call(endTabSync, ctx, cmd, session);
65
87
  }
66
88
  function dateFilterSelectionToDateFilter(dateFilterSelection) {
@@ -1 +1 @@
1
- {"version":3,"file":"filterViewHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/filterViewHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB/C,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAoClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiBnE,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,CAqEtG;AAMD,wBAAiB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAsB1G;AAOD,wBAAiB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAiBxG;AA6DD;;;;;;;GAOG;AACH,wBAAiB,qCAAqC,CAClD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,kBAAkB,EAAE,MAAM,GAC3B,YAAY,CAAC,IAAI,CAAC,CAyCpB;AAMD,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAuBpB;AAED,wBAAiB,wBAAwB,CAAC,GAAG,EAAE,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAcnF"}
1
+ {"version":3,"file":"filterViewHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/filterViewHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAuB/C,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAoClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiBnE,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,CAqEtG;AAMD,wBAAiB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAsB1G;AAOD,wBAAiB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAsBxG;AA6DD;;;;;;;GAOG;AACH,wBAAiB,qCAAqC,CAClD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,kBAAkB,EAAE,MAAM,GAC3B,YAAY,CAAC,IAAI,CAAC,CAyCpB;AAMD,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAuBpB;AAED,wBAAiB,wBAAwB,CAAC,GAAG,EAAE,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAcnF"}
@@ -2,7 +2,8 @@
2
2
  import { call, put, select } from "redux-saga/effects";
3
3
  import { areObjRefsEqual, isDashboardAttributeFilter, } from "@gooddata/sdk-model";
4
4
  import { defaultErrorHandler } from "@gooddata/sdk-ui";
5
- import { ABSOLUTE_GRANULARITY_DATE_FILTER_NOT_SUPPORTED, containsAbsoluteGranularityDateFilter, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
5
+ import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
6
+ import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED, containsDashboardParameterizedDateFilter, } from "../../../_staging/dashboard/parameterizedDateFilters.js";
6
7
  import { changeFilterContextSelectionByParams, } from "../../commands/filters.js";
7
8
  import { changeParameterValues } from "../../commands/parameters.js";
8
9
  import { filterViewApplicationFailed, filterViewApplicationSucceeded, filterViewCreationFailed, filterViewCreationSucceeded, filterViewDefaultStatusChangeFailed, filterViewDefaultStatusChangeSucceeded, filterViewDeletionFailed, filterViewDeletionSucceeded, } from "../../events/filters.js";
@@ -98,8 +99,12 @@ function* findFilterView(ref) {
98
99
  }
99
100
  export function* applyFilterViewHandler(ctx, cmd) {
100
101
  const filterView = yield call(findFilterView, cmd.payload.ref);
101
- if (filterView && containsAbsoluteGranularityDateFilter(filterView.filterContext.filters)) {
102
- console.warn(`The filter view "${filterView.name}" was not applied. ${ABSOLUTE_GRANULARITY_DATE_FILTER_NOT_SUPPORTED}`);
102
+ if (filterView && containsAbsoluteGranularityDateFilterWithDataSet(filterView.filterContext.filters)) {
103
+ console.warn(`The filter view "${filterView.name}" was not applied. ${ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED}`);
104
+ yield put(filterViewApplicationFailed(ctx));
105
+ }
106
+ else if (filterView && containsDashboardParameterizedDateFilter(filterView.filterContext.filters)) {
107
+ console.warn(`The filter view "${filterView.name}" was not applied. ${PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED}`);
103
108
  yield put(filterViewApplicationFailed(ctx));
104
109
  }
105
110
  else if (filterView) {
@@ -1,5 +1,13 @@
1
+ import { type DashboardDateFilterOfAnyType } from "@gooddata/sdk-model";
2
+ import { type IUpsertDateFilterPayload } from "../../../store/tabs/filterContext/filterContextReducers.js";
1
3
  import { type TabSyncActionsRule } from "./tabSyncScope.js";
2
4
  type AnyTabSyncRule = TabSyncActionsRule<any>;
5
+ /**
6
+ * The upsert payload that writes the date filter.
7
+ *
8
+ * @internal
9
+ */
10
+ export declare function toUpsertDateFilterPayload(filter: DashboardDateFilterOfAnyType): IUpsertDateFilterPayload;
3
11
  /**
4
12
  * Tabs slice actions that are mirrored to other tabs when filters persist across tabs, keyed by action type.
5
13
  * Actions without a rule apply to their own tab only, which includes every filter configuration change.
@@ -1 +1 @@
1
- {"version":3,"file":"tabSyncRules.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncRules.ts"],"names":[],"mappings":"AAsCA,OAAO,EAA4B,KAAK,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAExG,KAAK,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAwlB9C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAG3D,CAAC"}
1
+ {"version":3,"file":"tabSyncRules.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncRules.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,4BAA4B,EAmBpC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,KAAK,wBAAwB,EAEhC,MAAM,4DAA4D,CAAC;AAepE,OAAO,EAA4B,KAAK,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAExG,KAAK,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;AA4N9C;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,4BAA4B,GAAG,wBAAwB,CAkCxG;AAsXD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAG3D,CAAC"}