@gooddata/sdk-ui-dashboard 11.56.0-alpha.7 → 11.56.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 (308) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.d.ts.map +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/_staging/catalog/computedAttributes.d.ts +43 -0
  5. package/esm/_staging/catalog/computedAttributes.d.ts.map +1 -0
  6. package/esm/_staging/catalog/computedAttributes.js +93 -0
  7. package/esm/_staging/catalog/displayFormMap.d.ts +3 -2
  8. package/esm/_staging/catalog/displayFormMap.d.ts.map +1 -1
  9. package/esm/_staging/catalog/displayFormMap.js +9 -3
  10. package/esm/_staging/metadata/objRefMap.d.ts.map +1 -1
  11. package/esm/_staging/metadata/objRefMap.js +11 -1
  12. package/esm/index.d.ts +9 -5
  13. package/esm/index.d.ts.map +1 -1
  14. package/esm/index.js +7 -3
  15. package/esm/kdaDialog/composition/hooks/useKdaValidAttributes.js +2 -2
  16. package/esm/kdaDialog/dialog/hooks/useValidAttributes.d.ts.map +1 -1
  17. package/esm/kdaDialog/dialog/hooks/useValidAttributes.js +21 -6
  18. package/esm/kdaDialog/hooks/useAttribute.d.ts.map +1 -1
  19. package/esm/kdaDialog/hooks/useAttribute.js +16 -8
  20. package/esm/locales.d.ts +3 -0
  21. package/esm/locales.d.ts.map +1 -1
  22. package/esm/locales.js +3 -0
  23. package/esm/model/commandHandlers/dashboard/common/loadAvailableDisplayFormRefs.d.ts.map +1 -1
  24. package/esm/model/commandHandlers/dashboard/common/loadAvailableDisplayFormRefs.js +15 -6
  25. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts +2 -3
  26. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
  27. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +26 -17
  28. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadCatalog.d.ts +6 -1
  29. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadCatalog.d.ts.map +1 -1
  30. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadCatalog.js +37 -4
  31. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.d.ts +7 -2
  32. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.d.ts.map +1 -1
  33. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.js +15 -3
  34. package/esm/model/commandHandlers/filterContext/attributeFilter/validation/filterDisplayFormValidation.d.ts.map +1 -1
  35. package/esm/model/commandHandlers/filterContext/attributeFilter/validation/filterDisplayFormValidation.js +10 -3
  36. package/esm/model/commandHandlers/filterContext/attributeFilter/validation/uniqueFiltersValidation.d.ts.map +1 -1
  37. package/esm/model/commandHandlers/filterContext/attributeFilter/validation/uniqueFiltersValidation.js +24 -14
  38. package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.js +2 -2
  39. package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.js +2 -2
  40. package/esm/model/commandHandlers/widgets/attributeHierarchyModifiedHandler.d.ts.map +1 -1
  41. package/esm/model/commandHandlers/widgets/attributeHierarchyModifiedHandler.js +6 -0
  42. package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.d.ts.map +1 -1
  43. package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.js +2 -2
  44. package/esm/model/commandHandlers/widgets/exportRawInsightWidgetHandler.js +2 -2
  45. package/esm/model/queries/base.d.ts +1 -1
  46. package/esm/model/queries/base.d.ts.map +1 -1
  47. package/esm/model/queries/base.js +1 -1
  48. package/esm/model/queries/computedAttributeExpression.d.ts +27 -0
  49. package/esm/model/queries/computedAttributeExpression.d.ts.map +1 -0
  50. package/esm/model/queries/computedAttributeExpression.js +21 -0
  51. package/esm/model/queries/connectedAttributes.d.ts +19 -1
  52. package/esm/model/queries/connectedAttributes.d.ts.map +1 -1
  53. package/esm/model/queries/connectedAttributes.js +3 -1
  54. package/esm/model/queries/index.d.ts +2 -1
  55. package/esm/model/queries/index.d.ts.map +1 -1
  56. package/esm/model/queryServices/index.d.ts +1 -1
  57. package/esm/model/queryServices/index.d.ts.map +1 -1
  58. package/esm/model/queryServices/index.js +2 -0
  59. package/esm/model/queryServices/queryAttributeByDisplayForm.d.ts.map +1 -1
  60. package/esm/model/queryServices/queryAttributeByDisplayForm.js +12 -3
  61. package/esm/model/queryServices/queryAttributeDataset.d.ts.map +1 -1
  62. package/esm/model/queryServices/queryAttributeDataset.js +9 -1
  63. package/esm/model/queryServices/queryComputedAttributeExpression.d.ts +4 -0
  64. package/esm/model/queryServices/queryComputedAttributeExpression.d.ts.map +1 -0
  65. package/esm/model/queryServices/queryComputedAttributeExpression.js +17 -0
  66. package/esm/model/queryServices/queryConnectedAttributes.d.ts.map +1 -1
  67. package/esm/model/queryServices/queryConnectedAttributes.js +20 -5
  68. package/esm/model/queryServices/queryInsightAttributesMeta.d.ts.map +1 -1
  69. package/esm/model/queryServices/queryInsightAttributesMeta.js +20 -11
  70. package/esm/model/react/useIsWidgetRestricted.d.ts +9 -0
  71. package/esm/model/react/useIsWidgetRestricted.d.ts.map +1 -0
  72. package/esm/model/react/useIsWidgetRestricted.js +14 -0
  73. package/esm/model/store/catalog/catalogReducers.d.ts +2 -1
  74. package/esm/model/store/catalog/catalogReducers.d.ts.map +1 -1
  75. package/esm/model/store/catalog/catalogReducers.js +2 -1
  76. package/esm/model/store/catalog/catalogSelectors.d.ts +21 -1
  77. package/esm/model/store/catalog/catalogSelectors.d.ts.map +1 -1
  78. package/esm/model/store/catalog/catalogSelectors.js +26 -2
  79. package/esm/model/store/catalog/catalogState.d.ts +8 -1
  80. package/esm/model/store/catalog/catalogState.d.ts.map +1 -1
  81. package/esm/model/store/catalog/catalogState.js +1 -0
  82. package/esm/model/store/config/configSelectors.d.ts +11 -0
  83. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  84. package/esm/model/store/config/configSelectors.js +13 -0
  85. package/esm/model/store/insights/insightsSelectors.js +3 -3
  86. package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts.map +1 -1
  87. package/esm/model/store/tabs/filterContext/filterContextSelectors.js +8 -4
  88. package/esm/model/store/unavailableObjects/unavailableObjectsSelectors.d.ts +8 -0
  89. package/esm/model/store/unavailableObjects/unavailableObjectsSelectors.d.ts.map +1 -1
  90. package/esm/model/store/unavailableObjects/unavailableObjectsSelectors.js +8 -0
  91. package/esm/model/utils/displayFormResolver.d.ts.map +1 -1
  92. package/esm/model/utils/displayFormResolver.js +11 -1
  93. package/esm/plugins/customizationApis/customizationBuilder.d.ts.map +1 -1
  94. package/esm/plugins/customizationApis/customizationBuilder.js +1 -0
  95. package/esm/plugins/customizationApis/insightCustomizer.d.ts +4 -2
  96. package/esm/plugins/customizationApis/insightCustomizer.d.ts.map +1 -1
  97. package/esm/plugins/customizationApis/insightCustomizer.js +43 -3
  98. package/esm/plugins/customizer.d.ts +14 -1
  99. package/esm/plugins/customizer.d.ts.map +1 -1
  100. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
  101. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +1 -1
  102. package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts.map +1 -1
  103. package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.js +23 -58
  104. package/esm/presentation/automations/alerting/state/useAlertDraftFilterWrites.d.ts +33 -0
  105. package/esm/presentation/automations/alerting/state/useAlertDraftFilterWrites.d.ts.map +1 -0
  106. package/esm/presentation/automations/alerting/state/useAlertDraftFilterWrites.js +61 -0
  107. package/esm/presentation/automations/alerting/state/useAlertFiltersModel.d.ts +3 -17
  108. package/esm/presentation/automations/alerting/state/useAlertFiltersModel.d.ts.map +1 -1
  109. package/esm/presentation/automations/alerting/state/useAlertFiltersModel.js +3 -52
  110. package/esm/presentation/automations/alerting/state/useAlertFormState.js +1 -1
  111. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +2 -2
  112. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
  113. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +1 -1
  114. package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.js +2 -5
  115. package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map +1 -1
  116. package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js +22 -40
  117. package/esm/presentation/automations/scheduledEmail/state/useSaveScheduledEmailToBackend.d.ts.map +1 -1
  118. package/esm/presentation/automations/scheduledEmail/state/useSaveScheduledEmailToBackend.js +14 -3
  119. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailDraftFilterWrites.d.ts +27 -0
  120. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailDraftFilterWrites.d.ts.map +1 -0
  121. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailDraftFilterWrites.js +142 -0
  122. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.d.ts +4 -6
  123. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.d.ts.map +1 -1
  124. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.js +9 -151
  125. package/esm/presentation/automations/shared/filters/conversions.d.ts +4 -0
  126. package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -1
  127. package/esm/presentation/automations/shared/filters/conversions.js +28 -24
  128. package/esm/presentation/automations/shared/hooks/useShallowStable.d.ts +10 -0
  129. package/esm/presentation/automations/shared/hooks/useShallowStable.d.ts.map +1 -0
  130. package/esm/presentation/automations/shared/hooks/useShallowStable.js +18 -0
  131. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
  132. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +17 -4
  133. package/esm/presentation/dashboard/DashboardSidebar/SidebarCollapseToggle.d.ts +10 -0
  134. package/esm/presentation/dashboard/DashboardSidebar/SidebarCollapseToggle.d.ts.map +1 -0
  135. package/esm/presentation/dashboard/DashboardSidebar/SidebarCollapseToggle.js +19 -0
  136. package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.d.ts.map +1 -1
  137. package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.js +8 -2
  138. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.d.ts.map +1 -1
  139. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.js +4 -2
  140. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.d.ts +8 -3
  141. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.d.ts.map +1 -1
  142. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.js +65 -25
  143. package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
  144. package/esm/presentation/dashboard/components/DashboardInner.js +4 -4
  145. package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
  146. package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
  147. package/esm/presentation/dashboard/hooks/useDashboard.d.ts +2 -1
  148. package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
  149. package/esm/presentation/dashboard/hooks/useDashboard.js +7 -1
  150. package/esm/presentation/dashboard/types.d.ts +14 -1
  151. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  152. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -1
  153. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
  154. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -0
  155. package/esm/presentation/dashboardContexts/types.d.ts +20 -0
  156. package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
  157. package/esm/presentation/dragAndDrop/draggableAttributeFilter/DefaultAttributeFilterDraggingComponent.d.ts.map +1 -1
  158. package/esm/presentation/dragAndDrop/draggableAttributeFilter/DefaultAttributeFilterDraggingComponent.js +4 -3
  159. package/esm/presentation/export/useExportData.js +2 -2
  160. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltip.d.ts.map +1 -1
  161. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltip.js +8 -2
  162. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltipContent.d.ts +12 -1
  163. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltipContent.d.ts.map +1 -1
  164. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltipContent.js +19 -2
  165. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/displayForms/AttributeDisplayFormsDropdown.d.ts.map +1 -1
  166. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/displayForms/AttributeDisplayFormsDropdown.js +3 -2
  167. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useComputedAttributeExpression.d.ts +14 -0
  168. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useComputedAttributeExpression.d.ts.map +1 -0
  169. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useComputedAttributeExpression.js +28 -0
  170. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDisplayFormConfiguration.js +2 -2
  171. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useValidNeighbourAttributes.d.ts.map +1 -1
  172. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useValidNeighbourAttributes.js +12 -2
  173. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.d.ts.map +1 -1
  174. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.js +6 -5
  175. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/parentFilters/ParentFiltersDisabledItem.js +2 -2
  176. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +2 -2
  177. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.js +2 -2
  178. package/esm/presentation/filterBar/measureValueFilter/useDashboardMeasureValueFilterData.d.ts.map +1 -1
  179. package/esm/presentation/filterBar/measureValueFilter/useDashboardMeasureValueFilterData.js +55 -17
  180. package/esm/presentation/flexibleLayout/DashboardLayoutWidget.d.ts.map +1 -1
  181. package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js +6 -1
  182. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +5 -0
  183. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  184. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +5 -0
  185. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +5 -0
  186. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  187. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +5 -0
  188. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +5 -0
  189. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  190. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +5 -0
  191. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +40 -0
  192. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  193. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +40 -0
  194. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +5 -0
  195. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  196. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +5 -0
  197. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +5 -0
  198. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  199. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +5 -0
  200. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +5 -0
  201. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  202. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +5 -0
  203. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +5 -0
  204. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  205. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +5 -0
  206. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +5 -0
  207. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  208. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +5 -0
  209. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +5 -0
  210. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  211. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +5 -0
  212. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +5 -0
  213. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  214. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +5 -0
  215. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +5 -0
  216. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  217. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +5 -0
  218. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +5 -0
  219. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  220. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +5 -0
  221. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +5 -0
  222. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  223. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +5 -0
  224. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +5 -0
  225. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  226. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +5 -0
  227. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +5 -0
  228. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  229. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +5 -0
  230. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +5 -0
  231. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  232. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +5 -0
  233. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +5 -0
  234. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  235. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +5 -0
  236. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +5 -0
  237. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  238. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +5 -0
  239. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +5 -0
  240. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  241. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +5 -0
  242. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +5 -0
  243. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  244. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +5 -0
  245. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +5 -0
  246. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  247. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +5 -0
  248. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +5 -0
  249. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  250. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +5 -0
  251. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +5 -0
  252. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  253. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +5 -0
  254. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +5 -0
  255. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  256. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +5 -0
  257. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +5 -0
  258. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  259. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +5 -0
  260. package/esm/presentation/widget/common/RestrictedPlaceholder.d.ts +54 -0
  261. package/esm/presentation/widget/common/RestrictedPlaceholder.d.ts.map +1 -0
  262. package/esm/presentation/widget/common/RestrictedPlaceholder.js +49 -0
  263. package/esm/presentation/widget/common/configuration/DateDatasetFilter.d.ts +6 -1
  264. package/esm/presentation/widget/common/configuration/DateDatasetFilter.d.ts.map +1 -1
  265. package/esm/presentation/widget/common/configuration/DateDatasetFilter.js +2 -2
  266. package/esm/presentation/widget/common/configuration/DateFilterCheckbox.d.ts +6 -1
  267. package/esm/presentation/widget/common/configuration/DateFilterCheckbox.d.ts.map +1 -1
  268. package/esm/presentation/widget/common/configuration/DateFilterCheckbox.js +10 -3
  269. package/esm/presentation/widget/insight/DefaultInsightBody/DefaultInsightBody.js +2 -2
  270. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +2 -2
  271. package/esm/presentation/widget/insight/configuration/InsightDateDataSetFilter.d.ts.map +1 -1
  272. package/esm/presentation/widget/insight/configuration/InsightDateDataSetFilter.js +1 -1
  273. package/esm/presentation/widget/insight/configuration/InsightDrillConfigList.d.ts +6 -1
  274. package/esm/presentation/widget/insight/configuration/InsightDrillConfigList.d.ts.map +1 -1
  275. package/esm/presentation/widget/insight/configuration/InsightDrillConfigList.js +13 -2
  276. package/esm/presentation/widget/insight/configuration/InsightDrillConfigPanel/InsightDrillConfigPanel.d.ts.map +1 -1
  277. package/esm/presentation/widget/insight/configuration/InsightDrillConfigPanel/InsightDrillConfigPanel.js +5 -1
  278. package/esm/presentation/widget/insight/configuration/useDrillTargetTypeItems.d.ts +1 -1
  279. package/esm/presentation/widget/insight/configuration/useDrillTargetTypeItems.d.ts.map +1 -1
  280. package/esm/presentation/widget/insight/configuration/useDrillTargetTypeItems.js +2 -2
  281. package/esm/presentation/widget/richText/configuration/RichTextDateDataSetFilter.d.ts.map +1 -1
  282. package/esm/presentation/widget/richText/configuration/RichTextDateDataSetFilter.js +1 -1
  283. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
  284. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +8 -0
  285. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcherRestricted.d.ts +16 -0
  286. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcherRestricted.d.ts.map +1 -0
  287. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcherRestricted.js +19 -0
  288. package/esm/presentation/widget/widget/InsightWidget/DashboardWidgetInsightGuard.d.ts.map +1 -1
  289. package/esm/presentation/widget/widget/InsightWidget/DashboardWidgetInsightGuard.js +11 -1
  290. package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +2 -2
  291. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -1
  292. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +25 -12
  293. package/esm/sdk-ui-dashboard.d.ts +201 -3
  294. package/package.json +21 -21
  295. package/styles/css/configurationPanel.css +1 -5
  296. package/styles/css/configurationPanel.css.map +1 -1
  297. package/styles/css/filterBar.css +29 -0
  298. package/styles/css/filterBar.css.map +1 -1
  299. package/styles/css/main.css +203 -5
  300. package/styles/css/main.css.map +1 -1
  301. package/styles/css/sidebar.css +165 -0
  302. package/styles/css/sidebar.css.map +1 -1
  303. package/styles/css/visualizationSwitcherWidget.css +8 -0
  304. package/styles/css/visualizationSwitcherWidget.css.map +1 -1
  305. package/styles/scss/configurationPanel.scss +1 -7
  306. package/styles/scss/filterBar.scss +38 -0
  307. package/styles/scss/sidebar.scss +215 -0
  308. package/styles/scss/visualizationSwitcherWidget.scss +9 -0
@@ -1,5 +1,5 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { useCallback, useState } from "react";
2
+ import { useCallback, useRef, useState } from "react";
3
3
  import { omit } from "lodash-es";
4
4
  import { useIntl } from "react-intl";
5
5
  import { isAllValuesAttributeFilter, isAllValuesDashboardAttributeFilter, isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, } from "@gooddata/sdk-model";
@@ -20,11 +20,16 @@ export function useSaveScheduledEmailToBackend({ onCreateSuccess, onCreateError,
20
20
  const [isSavingScheduledEmail, setIsSavingScheduledEmail] = useState(false);
21
21
  const { createScheduledEmail, saveScheduledEmail } = useScheduledEmailDialogContext();
22
22
  const { editedAutomation } = useScheduledExportDraft();
23
+ const submitInFlight = useRef(false);
23
24
  const handleCreateScheduledEmail = useCallback(async (scheduledEmail) => {
24
- const sanitizedAutomation = sanitizeAutomation(scheduledEmail, intl);
25
+ if (submitInFlight.current) {
26
+ return;
27
+ }
28
+ submitInFlight.current = true;
25
29
  setSavingErrorMessage(undefined);
26
30
  setIsSavingScheduledEmail(true);
27
31
  try {
32
+ const sanitizedAutomation = sanitizeAutomation(scheduledEmail, intl);
28
33
  const created = await createScheduledEmail(sanitizedAutomation);
29
34
  onCreateSuccess?.(created);
30
35
  }
@@ -41,14 +46,19 @@ export function useSaveScheduledEmailToBackend({ onCreateSuccess, onCreateError,
41
46
  }
42
47
  }
43
48
  finally {
49
+ submitInFlight.current = false;
44
50
  setIsSavingScheduledEmail(false);
45
51
  }
46
52
  }, [createScheduledEmail, intl, onCreateSuccess, onCreateError]);
47
53
  const handleUpdateScheduledEmail = useCallback(async (scheduledEmail) => {
48
- const sanitizedAutomation = sanitizeAutomation(scheduledEmail, intl);
54
+ if (submitInFlight.current) {
55
+ return;
56
+ }
57
+ submitInFlight.current = true;
49
58
  setSavingErrorMessage(undefined);
50
59
  setIsSavingScheduledEmail(true);
51
60
  try {
61
+ const sanitizedAutomation = sanitizeAutomation(scheduledEmail, intl);
52
62
  const saved = await saveScheduledEmail(sanitizedAutomation);
53
63
  onUpdateSuccess?.(saved);
54
64
  }
@@ -65,6 +75,7 @@ export function useSaveScheduledEmailToBackend({ onCreateSuccess, onCreateError,
65
75
  }
66
76
  }
67
77
  finally {
78
+ submitInFlight.current = false;
68
79
  setIsSavingScheduledEmail(false);
69
80
  }
70
81
  }, [saveScheduledEmail, intl, onUpdateSuccess, onUpdateError]);
@@ -0,0 +1,27 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ import { type FilterContextItem, type IAutomationMetadataObjectDefinition, type IAutomationVisibleFilter, type IInsight, type IWidget } from "@gooddata/sdk-model";
3
+ import type { IAutomationFiltersTab } from "../../../../model/store/filtering/types.js";
4
+ /**
5
+ * Props for {@link useScheduledEmailDraftFilterWrites}.
6
+ * @internal
7
+ */
8
+ export interface IUseScheduledEmailDraftFilterWritesProps {
9
+ setEditedAutomation: Dispatch<SetStateAction<IAutomationMetadataObjectDefinition>>;
10
+ widget?: IWidget;
11
+ insight?: IInsight;
12
+ storeFilters: boolean;
13
+ availableFiltersAsVisibleFilters?: IAutomationVisibleFilter[] | undefined;
14
+ availableFiltersAsVisibleFiltersByTab?: Record<string, IAutomationVisibleFilter[]>;
15
+ filtersByTab?: IAutomationFiltersTab[] | undefined;
16
+ }
17
+ /**
18
+ * Owns the scheduled-export draft's filter writes: reconciling a new flat or per-tab filter
19
+ * selection into the edited automation's export definitions and metadata.
20
+ *
21
+ * @internal
22
+ */
23
+ export declare function useScheduledEmailDraftFilterWrites({ setEditedAutomation, widget, insight, storeFilters, availableFiltersAsVisibleFilters, availableFiltersAsVisibleFiltersByTab, filtersByTab, }: IUseScheduledEmailDraftFilterWritesProps): {
24
+ applyFiltersToDraft: (filters: FilterContextItem[], storeFiltersParam?: boolean) => void;
25
+ applyFiltersByTabToDraft: (newFiltersByTab: Record<string, FilterContextItem[]>, storeFiltersParam?: boolean) => void;
26
+ };
27
+ //# sourceMappingURL=useScheduledEmailDraftFilterWrites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScheduledEmailDraftFilterWrites.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailDraftFilterWrites.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAC;AAExE,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,OAAO,EAIf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AASxF;;;GAGG;AACH,MAAM,WAAW,wCAAwC;IACrD,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,qCAAqC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAC;CACtD;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,EAC/C,mBAAmB,EACnB,MAAM,EACN,OAAO,EACP,YAAY,EACZ,gCAAgC,EAChC,qCAAqC,EACrC,YAAY,GACf,EAAE,wCAAwC,GAAG;IAC1C,mBAAmB,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,iBAAiB,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzF,wBAAwB,EAAE,CACtB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,EACpD,iBAAiB,CAAC,EAAE,OAAO,KAC1B,IAAI,CAAC;CACb,CA8LA"}
@@ -0,0 +1,142 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useCallback } from "react";
3
+ import { isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, isInsightWidget, } from "@gooddata/sdk-model";
4
+ import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
5
+ import { getAppliedDashboardFilters, getAppliedWidgetFilters, getVisibleFiltersByFilters, getVisibleFiltersByFiltersByTab, } from "../../shared/filters/index.js";
6
+ /**
7
+ * Owns the scheduled-export draft's filter writes: reconciling a new flat or per-tab filter
8
+ * selection into the edited automation's export definitions and metadata.
9
+ *
10
+ * @internal
11
+ */
12
+ export function useScheduledEmailDraftFilterWrites({ setEditedAutomation, widget, insight, storeFilters, availableFiltersAsVisibleFilters, availableFiltersAsVisibleFiltersByTab, filtersByTab, }) {
13
+ const { hiddenFilters: dashboardHiddenFilters, commonDateFilterId } = useScheduledEmailDialogContext();
14
+ // Re-derived locally (not passed as a prop) so that the `if (isWidget)` branch below narrows
15
+ // `widget`/`insight` via TS's aliased-condition control-flow analysis — this requires the boolean
16
+ // to be declared from those exact variables in this same scope, same as in the parent.
17
+ const isWidget = !!widget && !!insight;
18
+ const applyFiltersToDraft = useCallback((filters, storeFiltersParam) => {
19
+ const shouldStoreFilters = storeFiltersParam ?? storeFilters;
20
+ if (isWidget) {
21
+ if (!isInsightWidget(widget)) {
22
+ return;
23
+ }
24
+ setEditedAutomation((s) => {
25
+ const appliedDashboardFilters = getAppliedDashboardFilters(filters, dashboardHiddenFilters, true);
26
+ const appliedWidgetFiltersWithInsight = getAppliedWidgetFilters(filters, dashboardHiddenFilters, widget, insight, commonDateFilterId, true);
27
+ const appliedWidgetFiltersWithoutInsight = getAppliedWidgetFilters(filters, dashboardHiddenFilters, widget, insight, commonDateFilterId, false);
28
+ const visibleFilters = getVisibleFiltersByFilters(filters, availableFiltersAsVisibleFilters, true);
29
+ return {
30
+ ...s,
31
+ exportDefinitions: s.exportDefinitions?.map((exportDefinition) => {
32
+ if (isExportDefinitionVisualizationObjectRequestPayload(exportDefinition.requestPayload)) {
33
+ const format = exportDefinition.requestPayload.format;
34
+ const shouldUseWidgetFiltersWithInsight = format === "CSV";
35
+ const shouldUseWidgetFiltersWithoutInsight = format === "CSV_RAW";
36
+ const appliedFilters = shouldUseWidgetFiltersWithInsight
37
+ ? appliedWidgetFiltersWithInsight
38
+ : shouldUseWidgetFiltersWithoutInsight
39
+ ? appliedWidgetFiltersWithoutInsight
40
+ : appliedDashboardFilters;
41
+ return {
42
+ ...exportDefinition,
43
+ requestPayload: {
44
+ ...exportDefinition.requestPayload,
45
+ content: {
46
+ ...exportDefinition.requestPayload.content,
47
+ filters: appliedFilters,
48
+ },
49
+ },
50
+ };
51
+ }
52
+ else {
53
+ return exportDefinition;
54
+ }
55
+ }),
56
+ metadata: {
57
+ ...s.metadata,
58
+ visibleFilters,
59
+ },
60
+ };
61
+ });
62
+ }
63
+ else {
64
+ setEditedAutomation((s) => {
65
+ const appliedFilters = getAppliedDashboardFilters(filters, dashboardHiddenFilters, shouldStoreFilters);
66
+ const visibleFilters = getVisibleFiltersByFilters(filters, availableFiltersAsVisibleFilters, shouldStoreFilters);
67
+ return {
68
+ ...s,
69
+ exportDefinitions: s.exportDefinitions?.map((exportDefinition) => {
70
+ if (isExportDefinitionDashboardRequestPayload(exportDefinition.requestPayload)) {
71
+ return {
72
+ ...exportDefinition,
73
+ requestPayload: {
74
+ ...exportDefinition.requestPayload,
75
+ content: {
76
+ ...exportDefinition.requestPayload.content,
77
+ filters: appliedFilters,
78
+ },
79
+ },
80
+ };
81
+ }
82
+ else {
83
+ return exportDefinition;
84
+ }
85
+ }),
86
+ metadata: {
87
+ ...s.metadata,
88
+ visibleFilters,
89
+ },
90
+ };
91
+ });
92
+ }
93
+ }, [
94
+ setEditedAutomation,
95
+ dashboardHiddenFilters,
96
+ availableFiltersAsVisibleFilters,
97
+ storeFilters,
98
+ widget,
99
+ insight,
100
+ isWidget,
101
+ commonDateFilterId,
102
+ ]);
103
+ // Callback for per-tab filter changes - updates state AND syncs to export definitions
104
+ const applyFiltersByTabToDraft = useCallback((newFiltersByTab, storeFiltersParam) => {
105
+ const shouldStoreFilters = storeFiltersParam ?? storeFilters;
106
+ const newEffectiveFiltersByTab = shouldStoreFilters
107
+ ? Object.entries(newFiltersByTab).reduce((acc, [tabId, filters]) => {
108
+ const tabHiddenFilters = filtersByTab?.find((tab) => tab.tabId === tabId)?.hiddenFilters ?? [];
109
+ const appliedFilters = getAppliedDashboardFilters(filters ?? [], tabHiddenFilters, true);
110
+ if (appliedFilters) {
111
+ acc[tabId] = appliedFilters;
112
+ }
113
+ return acc;
114
+ }, {})
115
+ : undefined;
116
+ const newVisibleFiltersByTab = getVisibleFiltersByFiltersByTab(newFiltersByTab, availableFiltersAsVisibleFiltersByTab, shouldStoreFilters);
117
+ // Sync to export definitions AND metadata
118
+ setEditedAutomation((s) => ({
119
+ ...s,
120
+ exportDefinitions: s.exportDefinitions?.map((exportDefinition) => {
121
+ if (isExportDefinitionDashboardRequestPayload(exportDefinition.requestPayload)) {
122
+ return {
123
+ ...exportDefinition,
124
+ requestPayload: {
125
+ ...exportDefinition.requestPayload,
126
+ content: {
127
+ ...exportDefinition.requestPayload.content,
128
+ filtersByTab: newEffectiveFiltersByTab,
129
+ },
130
+ },
131
+ };
132
+ }
133
+ return exportDefinition;
134
+ }),
135
+ metadata: {
136
+ ...s.metadata,
137
+ visibleFiltersByTab: newVisibleFiltersByTab,
138
+ },
139
+ }));
140
+ }, [storeFilters, setEditedAutomation, availableFiltersAsVisibleFiltersByTab, filtersByTab]);
141
+ return { applyFiltersToDraft, applyFiltersByTabToDraft };
142
+ }
@@ -1,9 +1,7 @@
1
- import { type Dispatch, type SetStateAction } from "react";
2
- import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationVisibleFilter, type IDashboardExportParameter, type IInsight, type IWidget } from "@gooddata/sdk-model";
1
+ import { type FilterContextItem, type IAutomationMetadataObject, type IDashboardExportParameter, type IInsight, type IWidget } from "@gooddata/sdk-model";
3
2
  import type { IAutomationFiltersTab } from "../../../../model/store/filtering/types.js";
4
3
  import { type IScheduledExportFiltersContextValue } from "./types.js";
5
4
  export interface IUseScheduledEmailFiltersModelProps {
6
- setEditedAutomation: Dispatch<SetStateAction<IAutomationMetadataObjectDefinition>>;
7
5
  scheduledExportToEdit?: IAutomationMetadataObject;
8
6
  widget?: IWidget;
9
7
  insight?: IInsight;
@@ -12,13 +10,13 @@ export interface IUseScheduledEmailFiltersModelProps {
12
10
  editedAutomationFiltersByTab?: Record<string, FilterContextItem[]>;
13
11
  setEditedAutomationFiltersByTab?: (filters: Record<string, FilterContextItem[]>) => void;
14
12
  availableFilters?: FilterContextItem[];
15
- availableFiltersAsVisibleFilters?: IAutomationVisibleFilter[] | undefined;
16
- availableFiltersAsVisibleFiltersByTab?: Record<string, IAutomationVisibleFilter[]>;
17
13
  filtersByTab?: IAutomationFiltersTab[] | undefined;
18
14
  storeFilters: boolean;
19
15
  setStoreFilters: (storeFilters: boolean) => void;
20
16
  filtersForNewAutomation: FilterContextItem[];
21
17
  setParametersWire: (wire: Record<string, IDashboardExportParameter[]> | undefined) => void;
18
+ applyFiltersToDraft: (filters: FilterContextItem[], storeFiltersParam?: boolean) => void;
19
+ applyFiltersByTabToDraft: (newFiltersByTab: Record<string, FilterContextItem[]>, storeFiltersParam?: boolean) => void;
22
20
  }
23
21
  /**
24
22
  * The scheduled-email dialog's single filter model: the current selection and available filters
@@ -34,5 +32,5 @@ export interface IUseScheduledEmailFiltersModelProps {
34
32
  *
35
33
  * @internal
36
34
  */
37
- export declare function useScheduledEmailFiltersModel({ setEditedAutomation, scheduledExportToEdit, widget, insight, editedAutomationFilters, setEditedAutomationFilters, editedAutomationFiltersByTab, setEditedAutomationFiltersByTab, availableFilters, availableFiltersAsVisibleFilters, availableFiltersAsVisibleFiltersByTab, filtersByTab, storeFilters, setStoreFilters, filtersForNewAutomation, setParametersWire, }: IUseScheduledEmailFiltersModelProps): IScheduledExportFiltersContextValue;
35
+ export declare function useScheduledEmailFiltersModel({ scheduledExportToEdit, widget, insight, editedAutomationFilters, setEditedAutomationFilters, editedAutomationFiltersByTab, setEditedAutomationFiltersByTab, availableFilters, filtersByTab, storeFilters, setStoreFilters, filtersForNewAutomation, setParametersWire, applyFiltersToDraft, applyFiltersByTabToDraft, }: IUseScheduledEmailFiltersModelProps): IScheduledExportFiltersContextValue;
38
36
  //# sourceMappingURL=useScheduledEmailFiltersModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useScheduledEmailFiltersModel.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAEhF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,OAAO,EAIf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAYxF,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,WAAW,mCAAmC;IAChD,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC;IACnF,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,4BAA4B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACnE,+BAA+B,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,KAAK,IAAI,CAAC;IACzF,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,qCAAqC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAC;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CAC9F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,mBAAmB,EACnB,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,gBAAgB,EAChB,gCAAgC,EAChC,qCAAqC,EACrC,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,iBAAiB,GACpB,EAAE,mCAAmC,GAAG,mCAAmC,CAiR3E"}
1
+ {"version":3,"file":"useScheduledEmailFiltersModel.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAOxF,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,WAAW,mCAAmC;IAChD,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,4BAA4B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACnE,+BAA+B,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,KAAK,IAAI,CAAC;IACzF,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,YAAY,CAAC,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAC;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3F,mBAAmB,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,iBAAiB,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzF,wBAAwB,EAAE,CACtB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,EACpD,iBAAiB,CAAC,EAAE,OAAO,KAC1B,IAAI,CAAC;CACb;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,GAC3B,EAAE,mCAAmC,GAAG,mCAAmC,CA2F3E"}
@@ -1,12 +1,10 @@
1
1
  // (C) 2026 GoodData Corporation
2
- import { useCallback, useRef } from "react";
3
- import { isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, isInsightWidget, } from "@gooddata/sdk-model";
4
- import { shallowEqualObjects } from "@gooddata/util";
2
+ import { useCallback } from "react";
5
3
  import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
6
4
  import { useValidateExistingAutomationFilters } from "../../shared/automationFilters/hooks/useValidateExistingAutomationFilters.js";
7
5
  import { useAutomationExportParameters } from "../../shared/automationFilters/useAutomationExportParameters.js";
8
6
  import { getDefaultSelectedFiltersFromFiltersByTab } from "../../shared/automationFilters/useAutomationFiltersSelect.js";
9
- import { getAppliedDashboardFilters, getAppliedWidgetFilters, getVisibleFiltersByFilters, getVisibleFiltersByFiltersByTab, } from "../../shared/filters/index.js";
7
+ import { useShallowStable } from "../../shared/hooks/useShallowStable.js";
10
8
  /**
11
9
  * The scheduled-email dialog's single filter model: the current selection and available filters
12
10
  * (flat and per-tab), the handlers that mutate them and mirror the result into the draft, the
@@ -21,145 +19,18 @@ import { getAppliedDashboardFilters, getAppliedWidgetFilters, getVisibleFiltersB
21
19
  *
22
20
  * @internal
23
21
  */
24
- export function useScheduledEmailFiltersModel({ setEditedAutomation, scheduledExportToEdit, widget, insight, editedAutomationFilters, setEditedAutomationFilters, editedAutomationFiltersByTab, setEditedAutomationFiltersByTab, availableFilters, availableFiltersAsVisibleFilters, availableFiltersAsVisibleFiltersByTab, filtersByTab, storeFilters, setStoreFilters, filtersForNewAutomation, setParametersWire, }) {
25
- const { hiddenFilters: dashboardHiddenFilters, commonDateFilterId, exportParametersByTab, } = useScheduledEmailDialogContext();
26
- // Re-derived locally (not passed as a prop) so that the `if (isWidget)` branch below narrows
27
- // `widget`/`insight` via TS's aliased-condition control-flow analysis — this requires the boolean
28
- // to be declared from those exact variables in this same scope, same as in the parent.
29
- const isWidget = !!widget && !!insight;
22
+ export function useScheduledEmailFiltersModel({ scheduledExportToEdit, widget, insight, editedAutomationFilters, setEditedAutomationFilters, editedAutomationFiltersByTab, setEditedAutomationFiltersByTab, availableFilters, filtersByTab, storeFilters, setStoreFilters, filtersForNewAutomation, setParametersWire, applyFiltersToDraft, applyFiltersByTabToDraft, }) {
23
+ const { exportParametersByTab } = useScheduledEmailDialogContext();
30
24
  const onFiltersChange = useCallback((filters, storeFiltersParam) => {
31
25
  setEditedAutomationFilters(filters);
32
- const shouldStoreFilters = storeFiltersParam ?? storeFilters;
33
- if (isWidget) {
34
- if (!isInsightWidget(widget)) {
35
- return;
36
- }
37
- setEditedAutomation((s) => {
38
- const appliedDashboardFilters = getAppliedDashboardFilters(filters, dashboardHiddenFilters, true);
39
- const appliedWidgetFiltersWithInsight = getAppliedWidgetFilters(filters, dashboardHiddenFilters, widget, insight, commonDateFilterId, true);
40
- const appliedWidgetFiltersWithoutInsight = getAppliedWidgetFilters(filters, dashboardHiddenFilters, widget, insight, commonDateFilterId, false);
41
- const visibleFilters = getVisibleFiltersByFilters(filters, availableFiltersAsVisibleFilters, true);
42
- return {
43
- ...s,
44
- exportDefinitions: s.exportDefinitions?.map((exportDefinition) => {
45
- if (isExportDefinitionVisualizationObjectRequestPayload(exportDefinition.requestPayload)) {
46
- const format = exportDefinition.requestPayload.format;
47
- const shouldUseWidgetFiltersWithInsight = format === "CSV";
48
- const shouldUseWidgetFiltersWithoutInsight = format === "CSV_RAW";
49
- const appliedFilters = shouldUseWidgetFiltersWithInsight
50
- ? appliedWidgetFiltersWithInsight
51
- : shouldUseWidgetFiltersWithoutInsight
52
- ? appliedWidgetFiltersWithoutInsight
53
- : appliedDashboardFilters;
54
- return {
55
- ...exportDefinition,
56
- requestPayload: {
57
- ...exportDefinition.requestPayload,
58
- content: {
59
- ...exportDefinition.requestPayload.content,
60
- filters: appliedFilters,
61
- },
62
- },
63
- };
64
- }
65
- else {
66
- return exportDefinition;
67
- }
68
- }),
69
- metadata: {
70
- ...s.metadata,
71
- visibleFilters,
72
- },
73
- };
74
- });
75
- }
76
- else {
77
- setEditedAutomation((s) => {
78
- const appliedFilters = getAppliedDashboardFilters(filters, dashboardHiddenFilters, shouldStoreFilters);
79
- const visibleFilters = getVisibleFiltersByFilters(filters, availableFiltersAsVisibleFilters, shouldStoreFilters);
80
- return {
81
- ...s,
82
- exportDefinitions: s.exportDefinitions?.map((exportDefinition) => {
83
- if (isExportDefinitionDashboardRequestPayload(exportDefinition.requestPayload)) {
84
- return {
85
- ...exportDefinition,
86
- requestPayload: {
87
- ...exportDefinition.requestPayload,
88
- content: {
89
- ...exportDefinition.requestPayload.content,
90
- filters: appliedFilters,
91
- },
92
- },
93
- };
94
- }
95
- else {
96
- return exportDefinition;
97
- }
98
- }),
99
- metadata: {
100
- ...s.metadata,
101
- visibleFilters,
102
- },
103
- };
104
- });
105
- }
106
- }, [
107
- setEditedAutomationFilters,
108
- setEditedAutomation,
109
- dashboardHiddenFilters,
110
- availableFiltersAsVisibleFilters,
111
- storeFilters,
112
- widget,
113
- insight,
114
- isWidget,
115
- commonDateFilterId,
116
- ]);
117
- // Callback for per-tab filter changes - updates state AND syncs to export definitions
26
+ applyFiltersToDraft(filters, storeFiltersParam);
27
+ }, [setEditedAutomationFilters, applyFiltersToDraft]);
28
+ // Callback for per-tab filter changes - updates state and forwards the draft write
118
29
  const onFiltersByTabChange = useCallback((newFiltersByTab, storeFiltersParam) => {
119
30
  // Update the editedFiltersByTab state
120
31
  setEditedAutomationFiltersByTab?.(newFiltersByTab);
121
- const shouldStoreFilters = storeFiltersParam ?? storeFilters;
122
- const newEffectiveFiltersByTab = shouldStoreFilters
123
- ? Object.entries(newFiltersByTab).reduce((acc, [tabId, filters]) => {
124
- const tabHiddenFilters = filtersByTab?.find((tab) => tab.tabId === tabId)?.hiddenFilters ?? [];
125
- const appliedFilters = getAppliedDashboardFilters(filters ?? [], tabHiddenFilters, true);
126
- if (appliedFilters) {
127
- acc[tabId] = appliedFilters;
128
- }
129
- return acc;
130
- }, {})
131
- : undefined;
132
- const newVisibleFiltersByTab = getVisibleFiltersByFiltersByTab(newFiltersByTab, availableFiltersAsVisibleFiltersByTab, shouldStoreFilters);
133
- // Sync to export definitions AND metadata
134
- setEditedAutomation((s) => ({
135
- ...s,
136
- exportDefinitions: s.exportDefinitions?.map((exportDefinition) => {
137
- if (isExportDefinitionDashboardRequestPayload(exportDefinition.requestPayload)) {
138
- return {
139
- ...exportDefinition,
140
- requestPayload: {
141
- ...exportDefinition.requestPayload,
142
- content: {
143
- ...exportDefinition.requestPayload.content,
144
- filtersByTab: newEffectiveFiltersByTab,
145
- },
146
- },
147
- };
148
- }
149
- return exportDefinition;
150
- }),
151
- metadata: {
152
- ...s.metadata,
153
- visibleFiltersByTab: newVisibleFiltersByTab,
154
- },
155
- }));
156
- }, [
157
- setEditedAutomationFiltersByTab,
158
- storeFilters,
159
- setEditedAutomation,
160
- availableFiltersAsVisibleFiltersByTab,
161
- filtersByTab,
162
- ]);
32
+ applyFiltersByTabToDraft(newFiltersByTab, storeFiltersParam);
33
+ }, [setEditedAutomationFiltersByTab, applyFiltersByTabToDraft]);
163
34
  const onApplyCurrentFilters = useCallback(() => {
164
35
  // Widget schedules should never use per-tab filters, only dashboard schedules can have tabs
165
36
  const filtersByTabForNewAutomation = widget
@@ -219,16 +90,3 @@ export function useScheduledEmailFiltersModel({ setEditedAutomation, scheduledEx
219
90
  ...parameters,
220
91
  });
221
92
  }
222
- /**
223
- * Returns the previous object while every member keeps its identity, so a caller can hold a whole
224
- * model stable without naming its members. Preferred over `useMemo` here because the roster is the
225
- * hook's return shape: a dependency array would have to restate all of it, and a missed entry would
226
- * serve a stale member rather than fail loudly.
227
- */
228
- function useShallowStable(value) {
229
- const previous = useRef(value);
230
- if (!shallowEqualObjects(previous.current, value)) {
231
- previous.current = value;
232
- }
233
- return previous.current;
234
- }
@@ -25,6 +25,10 @@ export declare function dashboardFilterToFilterContextItem(filter: IDashboardFil
25
25
  * the localIdRefs become dangling. This function resolves them to display form identifierRefs.
26
26
  */
27
27
  export declare function resolveFilterDimensionalityLocalRefs(filters: IFilter[], insight: IInsight | undefined): IFilter[];
28
+ /** A filter with no effect on a widget execution: all-time date, condition-less MVF, all-values attribute. */
29
+ export declare function isNoopExecutionFilter(filter: IFilter): boolean;
30
+ /** The FilterContextItem form of {@link isNoopExecutionFilter}. */
31
+ export declare function isNoopDashboardFilter(filter: FilterContextItem): boolean;
28
32
  /**
29
33
  * Matches all-time date filters that are *noop*, i.e. that have no effect on execution.
30
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/filters/conversions.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACZ,KAAK,QAAQ,EAoChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEtF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,eAAO,MAAM,0BAA0B,oBAClB,iBAAiB,EAAE,GAAG,SAAS,0BACxB,wBAAwB,EAAE,GAAG,SAAS,iBAC/C,OAAO,KACvB,wBAAwB,EAAE,GAAG,SA+B/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,iBAC1B,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAAG,SAAS,0BACrC,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,GAAG,SAAS,iBAC/D,OAAO,KACvB,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,GAAG,SAmB/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,8BACL,iBAAiB,EAAE,0BACtB,iBAAiB,EAAE,UACnC,uBAAuB,GAAG,SAAS,WAClC,QAAQ,GAAG,SAAS,sBACT,MAAM,GAAG,SAAS,wBACjB,OAAO,kBACb,OAAO,cAwCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,8BACR,iBAAiB,EAAE,0BACtB,iBAAiB,EAAE,iBAC5B,OAAO,oCAsBzB,CAAC;AAEF,wBAAgB,kCAAkC,CAC9C,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,OAAO,GACtB,iBAAiB,GAAG,SAAS,CA8E/B;AAED;;;;;;;GAOG;AACH,wBAAgB,oCAAoC,CAChD,OAAO,EAAE,OAAO,EAAE,EAClB,OAAO,EAAE,QAAQ,GAAG,SAAS,GAC9B,OAAO,EAAE,CAiDX;AAyBD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CA0BhE"}
1
+ {"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/filters/conversions.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACZ,KAAK,QAAQ,EAoChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEtF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,eAAO,MAAM,0BAA0B,oBAClB,iBAAiB,EAAE,GAAG,SAAS,0BACxB,wBAAwB,EAAE,GAAG,SAAS,iBAC/C,OAAO,KACvB,wBAAwB,EAAE,GAAG,SA+B/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,iBAC1B,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAAG,SAAS,0BACrC,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,GAAG,SAAS,iBAC/D,OAAO,KACvB,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,GAAG,SAmB/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,8BACL,iBAAiB,EAAE,0BACtB,iBAAiB,EAAE,UACnC,uBAAuB,GAAG,SAAS,WAClC,QAAQ,GAAG,SAAS,sBACT,MAAM,GAAG,SAAS,wBACjB,OAAO,kBACb,OAAO,cA6BzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,8BACR,iBAAiB,EAAE,0BACtB,iBAAiB,EAAE,iBAC5B,OAAO,oCAWzB,CAAC;AAEF,wBAAgB,kCAAkC,CAC9C,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,OAAO,GACtB,iBAAiB,GAAG,SAAS,CA8E/B;AAED;;;;;;;GAOG;AACH,wBAAgB,oCAAoC,CAChD,OAAO,EAAE,OAAO,EAAE,EAClB,OAAO,EAAE,QAAQ,GAAG,SAAS,GAC9B,OAAO,EAAE,CAiDX;AAyBD,8GAA8G;AAC9G,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAW9D;AAED,mEAAmE;AACnE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAWxE;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CA0BhE"}
@@ -66,18 +66,7 @@ export const getAppliedWidgetFilters = (selectedAutomationFilters, dashboardHidd
66
66
  // alert executions (which have empty attributes) don't contain dangling refs.
67
67
  const resolvedFilters = resolveFilterDimensionalityLocalRefs(filtersToUse, insight);
68
68
  // Strip noop filters - they have no effect on execution.
69
- return resolvedFilters.filter((filter) => {
70
- // Strip noop "All time" date filters (implicit default with no extra configuration).
71
- if (isDateFilter(filter)) {
72
- return !isNoopAllTimeDateFilterFixed(filter);
73
- }
74
- // Strip noop "All" measure value filters (no conditions).
75
- if (isMeasureValueFilter(filter)) {
76
- return hasMeasureValueFilterConditions(filter);
77
- }
78
- // Strip noop "All values" attribute filters (negative filter with empty exclusion list).
79
- return !isAllValuesAttributeFilter(filter);
80
- });
69
+ return resolvedFilters.filter((filter) => !isNoopExecutionFilter(filter));
81
70
  };
82
71
  /**
83
72
  * Get final filters for the dashboard scheduled export.
@@ -90,18 +79,7 @@ export const getAppliedDashboardFilters = (selectedAutomationFilters, dashboardH
90
79
  // but we need them to construct proper execution filters, so merge them.
91
80
  const selectedFiltersWithHiddenFilters = [...selectedAutomationFilters, ...dashboardHiddenFilters];
92
81
  // Strip noop filters - they have no effect on execution.
93
- return selectedFiltersWithHiddenFilters.filter((filter) => {
94
- // Strip noop "All time" date filters (implicit default with no extra configuration).
95
- if (isDashboardDateFilter(filter)) {
96
- return !isNoopAllTimeDashboardDateFilter(filter);
97
- }
98
- // Strip noop "All" measure value filters (no/empty conditions).
99
- if (isDashboardMeasureValueFilter(filter)) {
100
- return !isAllDashboardMeasureValueFilter(filter);
101
- }
102
- // Strip noop "All values" attribute filters.
103
- return !isAllValuesDashboardAttributeFilter(filter);
104
- });
82
+ return selectedFiltersWithHiddenFilters.filter((filter) => !isNoopDashboardFilter(filter));
105
83
  };
106
84
  export function dashboardFilterToFilterContextItem(filter, keepDatasets) {
107
85
  if (isAttributeFilterWithSelection(filter)) {
@@ -230,6 +208,32 @@ function resolveDimensionalityItems(dimensionality, attributeLocalIdToDisplayFor
230
208
  const changed = dimensionality.some((item, i) => item !== resolved[i]);
231
209
  return changed ? resolved : undefined;
232
210
  }
211
+ /** A filter with no effect on a widget execution: all-time date, condition-less MVF, all-values attribute. */
212
+ export function isNoopExecutionFilter(filter) {
213
+ // Strip noop "All time" date filters (implicit default with no extra configuration).
214
+ if (isDateFilter(filter)) {
215
+ return isNoopAllTimeDateFilterFixed(filter);
216
+ }
217
+ // Strip noop "All" measure value filters (no conditions).
218
+ if (isMeasureValueFilter(filter)) {
219
+ return !hasMeasureValueFilterConditions(filter);
220
+ }
221
+ // Strip noop "All values" attribute filters (negative filter with empty exclusion list).
222
+ return isAllValuesAttributeFilter(filter);
223
+ }
224
+ /** The FilterContextItem form of {@link isNoopExecutionFilter}. */
225
+ export function isNoopDashboardFilter(filter) {
226
+ // Strip noop "All time" date filters (implicit default with no extra configuration).
227
+ if (isDashboardDateFilter(filter)) {
228
+ return isNoopAllTimeDashboardDateFilter(filter);
229
+ }
230
+ // Strip noop "All" measure value filters (no/empty conditions).
231
+ if (isDashboardMeasureValueFilter(filter)) {
232
+ return isAllDashboardMeasureValueFilter(filter);
233
+ }
234
+ // Strip noop "All values" attribute filters.
235
+ return isAllValuesDashboardAttributeFilter(filter);
236
+ }
233
237
  /**
234
238
  * Matches all-time date filters that are *noop*, i.e. that have no effect on execution.
235
239
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns the previous object while every member keeps its identity, so a caller can hold a whole
3
+ * model stable without naming its members. Preferred over `useMemo` here because the roster is the
4
+ * hook's return shape: a dependency array would have to restate all of it, and a missed entry would
5
+ * serve a stale member rather than fail loudly.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare function useShallowStable<T extends object>(value: T): T;
10
+ //# sourceMappingURL=useShallowStable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShallowStable.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/hooks/useShallowStable.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAQ9D"}
@@ -0,0 +1,18 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useRef } from "react";
3
+ import { shallowEqualObjects } from "@gooddata/util";
4
+ /**
5
+ * Returns the previous object while every member keeps its identity, so a caller can hold a whole
6
+ * model stable without naming its members. Preferred over `useMemo` here because the roster is the
7
+ * hook's return shape: a dependency array would have to restate all of it, and a missed entry would
8
+ * serve a stale member rather than fail loudly.
9
+ *
10
+ * @internal
11
+ */
12
+ export function useShallowStable(value) {
13
+ const previous = useRef(value);
14
+ if (!shallowEqualObjects(previous.current, value)) {
15
+ previous.current = value;
16
+ }
17
+ return previous.current;
18
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"CreationPanel.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardSidebar/CreationPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,EACH,KAAK,2BAA2B,EAChC,KAAK,iCAAiC,EACtC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,EAC/C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC7C,MAAM,4BAA4B,CAAC;AAIpC,UAAU,mBAAmB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC,CAAC,EAAE,qCAAqC,CAAC;IAC7E,oCAAoC,CAAC,EAAE,qCAAqC,CAAC;IAC7E,2BAA2B,CAAC,EAAE,2BAA2B,CAAC;IAC1D,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IACxD,uCAAuC,CAAC,EAAE,uCAAuC,CAAC;IAClF,iCAAiC,CAAC,EAAE,iCAAiC,CAAC;CACzE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,mBAAmB,2CAkEvD"}
1
+ {"version":3,"file":"CreationPanel.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardSidebar/CreationPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,EACH,KAAK,2BAA2B,EAChC,KAAK,iCAAiC,EACtC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,EAC/C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC7C,MAAM,4BAA4B,CAAC;AAMpC,UAAU,mBAAmB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC,CAAC,EAAE,qCAAqC,CAAC;IAC7E,oCAAoC,CAAC,EAAE,qCAAqC,CAAC;IAC7E,2BAA2B,CAAC,EAAE,2BAA2B,CAAC;IAC1D,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IACxD,uCAAuC,CAAC,EAAE,uCAAuC,CAAC;IAClF,iCAAiC,CAAC,EAAE,iCAAiC,CAAC;CACzE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,mBAAmB,2CAoGvD"}