@gooddata/sdk-ui-dashboard 11.65.0-alpha.0 → 11.65.0-alpha.10

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 (430) hide show
  1. package/NOTICE +72077 -4
  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/assets/type-csv-formatted.svg +1 -1
  6. package/esm/assets/type-csv-raw.svg +1 -1
  7. package/esm/index.d.ts +7 -4
  8. package/esm/index.d.ts.map +1 -1
  9. package/esm/index.js +3 -2
  10. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.d.ts.map +1 -1
  11. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.js +1 -3
  12. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.d.ts.map +1 -1
  13. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.js +8 -7
  14. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.d.ts.map +1 -1
  15. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.js +19 -28
  16. package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.d.ts.map +1 -1
  17. package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.js +4 -5
  18. package/esm/model/commandHandlers/filterContext/attributeFilter/replaceAttributeFilterItemSelectionHandler.d.ts.map +1 -1
  19. package/esm/model/commandHandlers/filterContext/attributeFilter/replaceAttributeFilterItemSelectionHandler.js +14 -15
  20. package/esm/model/commandHandlers/filterContext/attributeFilter/resolveDisplayFormMetadata.d.ts +4 -1
  21. package/esm/model/commandHandlers/filterContext/attributeFilter/resolveDisplayFormMetadata.d.ts.map +1 -1
  22. package/esm/model/commandHandlers/filterContext/attributeFilter/resolveDisplayFormMetadata.js +11 -2
  23. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
  24. package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +23 -45
  25. package/esm/model/commandHandlers/filterContext/common.d.ts +6 -5
  26. package/esm/model/commandHandlers/filterContext/common.d.ts.map +1 -1
  27. package/esm/model/commandHandlers/filterContext/common.js +12 -18
  28. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
  29. package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +30 -36
  30. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.d.ts.map +1 -1
  31. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.js +11 -17
  32. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.d.ts.map +1 -1
  33. package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.js +7 -10
  34. package/esm/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.d.ts +15 -0
  35. package/esm/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.d.ts.map +1 -0
  36. package/esm/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.js +88 -0
  37. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts +11 -0
  38. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -0
  39. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +335 -0
  40. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncSaga.d.ts +52 -0
  41. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncSaga.d.ts.map +1 -0
  42. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncSaga.js +60 -0
  43. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncScope.d.ts +69 -0
  44. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncScope.d.ts.map +1 -0
  45. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncScope.js +2 -0
  46. package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts +2 -1
  47. package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts.map +1 -1
  48. package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.js +41 -10
  49. package/esm/model/commands/parameters.d.ts +11 -1
  50. package/esm/model/commands/parameters.d.ts.map +1 -1
  51. package/esm/model/commands/parameters.js +2 -1
  52. package/esm/model/events/base.d.ts +1 -1
  53. package/esm/model/events/base.d.ts.map +1 -1
  54. package/esm/model/events/index.d.ts +2 -1
  55. package/esm/model/events/index.d.ts.map +1 -1
  56. package/esm/model/events/insightEditor.d.ts +128 -0
  57. package/esm/model/events/insightEditor.d.ts.map +1 -0
  58. package/esm/model/events/insightEditor.js +74 -0
  59. package/esm/model/queryServices/queryAttributeElements.js +1 -0
  60. package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
  61. package/esm/model/react/useInitializeDashboardStore.js +4 -9
  62. package/esm/model/store/config/configReducers.d.ts +4 -8
  63. package/esm/model/store/config/configReducers.d.ts.map +1 -1
  64. package/esm/model/store/config/configReducers.js +6 -12
  65. package/esm/model/store/config/configSelectors.d.ts +24 -0
  66. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  67. package/esm/model/store/config/configSelectors.js +30 -4
  68. package/esm/model/store/config/index.d.ts +2 -3
  69. package/esm/model/store/config/index.d.ts.map +1 -1
  70. package/esm/model/store/tabs/attributeFilterConfigs/attributeFilterConfigsReducers.d.ts +75 -5
  71. package/esm/model/store/tabs/attributeFilterConfigs/attributeFilterConfigsReducers.d.ts.map +1 -1
  72. package/esm/model/store/tabs/attributeFilterConfigs/attributeFilterConfigsReducers.js +35 -60
  73. package/esm/model/store/tabs/dateFilterConfigs/dateFilterConfigsReducers.js +1 -1
  74. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +139 -31
  75. package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
  76. package/esm/model/store/tabs/filterContext/filterContextReducers.js +314 -529
  77. package/esm/model/store/tabs/filterContext/filterSync.d.ts +35 -13
  78. package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
  79. package/esm/model/store/tabs/filterContext/filterSync.js +79 -58
  80. package/esm/model/store/tabs/index.d.ts +10 -12
  81. package/esm/model/store/tabs/index.d.ts.map +1 -1
  82. package/esm/model/store/tabs/layout/layoutReducers.d.ts +1 -0
  83. package/esm/model/store/tabs/layout/layoutReducers.d.ts.map +1 -1
  84. package/esm/model/store/tabs/measureValueFilterConfigs/measureValueFilterConfigsReducers.d.ts.map +1 -1
  85. package/esm/model/store/tabs/parameters/parametersReducers.d.ts +0 -5
  86. package/esm/model/store/tabs/parameters/parametersReducers.d.ts.map +1 -1
  87. package/esm/model/store/tabs/parameters/parametersReducers.js +8 -7
  88. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +7 -0
  89. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
  90. package/esm/model/store/tabs/parameters/parametersSelectors.js +16 -0
  91. package/esm/model/store/tabs/tabsReducers.d.ts +8 -4
  92. package/esm/model/store/tabs/tabsReducers.d.ts.map +1 -1
  93. package/esm/model/store/tabs/tabsReducers.js +15 -18
  94. package/esm/model/store/tabs/tabsState.d.ts +0 -10
  95. package/esm/model/store/tabs/tabsState.d.ts.map +1 -1
  96. package/esm/model/store/tabs/tabsState.js +0 -20
  97. package/esm/model/store/ui/index.d.ts +2 -0
  98. package/esm/model/store/ui/index.d.ts.map +1 -1
  99. package/esm/model/store/ui/uiReducers.d.ts +6 -0
  100. package/esm/model/store/ui/uiReducers.d.ts.map +1 -1
  101. package/esm/model/store/ui/uiReducers.js +8 -0
  102. package/esm/model/store/ui/uiSelectors.d.ts +7 -0
  103. package/esm/model/store/ui/uiSelectors.d.ts.map +1 -1
  104. package/esm/model/store/ui/uiSelectors.js +6 -0
  105. package/esm/model/store/ui/uiState.d.ts +5 -0
  106. package/esm/model/store/ui/uiState.d.ts.map +1 -1
  107. package/esm/model/store/ui/uiState.js +1 -0
  108. package/esm/model/types/attributeFilterTypes.d.ts +5 -0
  109. package/esm/model/types/attributeFilterTypes.d.ts.map +1 -1
  110. package/esm/model/types/attributeFilterTypes.js +1 -1
  111. package/esm/model/types/commonTypes.d.ts +38 -22
  112. package/esm/model/types/commonTypes.d.ts.map +1 -1
  113. package/esm/model/types/insightEditorTypes.d.ts +43 -0
  114. package/esm/model/types/insightEditorTypes.d.ts.map +1 -0
  115. package/esm/model/types/insightEditorTypes.js +2 -0
  116. package/esm/model/utils/attributeFilterMatching.d.ts +10 -0
  117. package/esm/model/utils/attributeFilterMatching.d.ts.map +1 -1
  118. package/esm/model/utils/attributeFilterMatching.js +14 -3
  119. package/esm/model/utils/attributeFilterSelectionTypeCompatibility.d.ts +8 -0
  120. package/esm/model/utils/attributeFilterSelectionTypeCompatibility.d.ts.map +1 -1
  121. package/esm/model/utils/attributeFilterSelectionTypeCompatibility.js +14 -4
  122. package/esm/presentation/automations/alerting/hooks/useAttributeValuesFromExecResults.d.ts +33 -2
  123. package/esm/presentation/automations/alerting/hooks/useAttributeValuesFromExecResults.d.ts.map +1 -1
  124. package/esm/presentation/automations/alerting/hooks/useAttributeValuesFromExecResults.js +29 -13
  125. package/esm/presentation/automations/alerting/state/useAlertSupportedMetrics.d.ts.map +1 -1
  126. package/esm/presentation/automations/alerting/state/useAlertSupportedMetrics.js +3 -2
  127. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts.map +1 -1
  128. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.js +3 -3
  129. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts.map +1 -1
  130. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.js +5 -4
  131. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/LiveRegionLastSelectContainer.d.ts +9 -0
  132. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/LiveRegionLastSelectContainer.d.ts.map +1 -0
  133. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/LiveRegionLastSelectContainer.js +12 -0
  134. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts.map +1 -1
  135. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +3 -3
  136. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
  137. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.js +14 -7
  138. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectionDescription.d.ts +12 -0
  139. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectionDescription.d.ts.map +1 -0
  140. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectionDescription.js +30 -0
  141. package/esm/presentation/automations/scheduledEmail/utils/users.d.ts +1 -0
  142. package/esm/presentation/automations/scheduledEmail/utils/users.d.ts.map +1 -1
  143. package/esm/presentation/automations/scheduledEmail/utils/users.js +3 -0
  144. package/esm/presentation/automations/shared/automationFilters/utils.d.ts +4 -0
  145. package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
  146. package/esm/presentation/automations/shared/automationFilters/utils.js +12 -5
  147. package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts +1 -1
  148. package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts.map +1 -1
  149. package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.js +2 -11
  150. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
  151. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +10 -1
  152. package/esm/presentation/dashboard/DefaultDashboardContent/DashboardContentLoader.d.ts +5 -0
  153. package/esm/presentation/dashboard/DefaultDashboardContent/DashboardContentLoader.d.ts.map +1 -0
  154. package/esm/presentation/dashboard/DefaultDashboardContent/DashboardContentLoader.js +27 -0
  155. package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.d.ts.map +1 -1
  156. package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.js +7 -2
  157. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts +4 -0
  158. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts.map +1 -0
  159. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.js +151 -0
  160. package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
  161. package/esm/presentation/dashboard/components/DashboardInner.js +17 -14
  162. package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts +8 -0
  163. package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts.map +1 -0
  164. package/esm/presentation/dashboard/components/DashboardInteractionComposing.js +23 -0
  165. package/esm/presentation/dashboard/components/DashboardInteractionLock.d.ts +8 -0
  166. package/esm/presentation/dashboard/components/DashboardInteractionLock.d.ts.map +1 -0
  167. package/esm/presentation/dashboard/components/DashboardInteractionLock.js +29 -0
  168. package/esm/presentation/dashboard/components/DashboardScreenSizeContext.d.ts.map +1 -1
  169. package/esm/presentation/dashboard/components/DashboardScreenSizeContext.js +10 -7
  170. package/esm/presentation/dashboard/components/ToastMessages.d.ts.map +1 -1
  171. package/esm/presentation/dashboard/components/ToastMessages.js +6 -3
  172. package/esm/presentation/dashboard/components/useEditModeLayoutNoteMessages.d.ts +6 -0
  173. package/esm/presentation/dashboard/components/useEditModeLayoutNoteMessages.d.ts.map +1 -0
  174. package/esm/presentation/dashboard/components/useEditModeLayoutNoteMessages.js +48 -0
  175. package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
  176. package/esm/presentation/dashboard/hooks/useDashboard.js +3 -2
  177. package/esm/presentation/dashboard/types.d.ts +5 -0
  178. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  179. package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts.map +1 -1
  180. package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js +2 -4
  181. package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.d.ts.map +1 -1
  182. package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.js +3 -3
  183. package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.d.ts.map +1 -1
  184. package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js +2 -4
  185. package/esm/presentation/drill/utils/drillDownUtils.d.ts.map +1 -1
  186. package/esm/presentation/drill/utils/drillDownUtils.js +3 -2
  187. package/esm/presentation/export/hooks/useDashboardRelatedFilters.d.ts +8 -1
  188. package/esm/presentation/export/hooks/useDashboardRelatedFilters.d.ts.map +1 -1
  189. package/esm/presentation/export/hooks/useDashboardRelatedFilters.js +21 -5
  190. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.d.ts.map +1 -1
  191. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +3 -2
  192. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.d.ts.map +1 -1
  193. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.js +3 -2
  194. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltip.d.ts.map +1 -1
  195. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltip.js +4 -1
  196. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltipContent.d.ts +6 -2
  197. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltipContent.d.ts.map +1 -1
  198. package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/attributeListItemTooltip/AttributeListItemTooltipContent.js +8 -4
  199. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewDeleteConfirm.d.ts +2 -1
  200. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewDeleteConfirm.d.ts.map +1 -1
  201. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewDeleteConfirm.js +2 -2
  202. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewsList.d.ts.map +1 -1
  203. package/esm/presentation/filterBar/filterBar/filterViews/FilterViewsList.js +11 -5
  204. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
  205. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +4 -1
  206. package/esm/presentation/insightEditor/InsightEditorContent.d.ts +26 -0
  207. package/esm/presentation/insightEditor/InsightEditorContent.d.ts.map +1 -0
  208. package/esm/presentation/insightEditor/InsightEditorContent.js +158 -0
  209. package/esm/presentation/insightEditor/InsightEditorCreatePanelItem.d.ts +7 -0
  210. package/esm/presentation/insightEditor/InsightEditorCreatePanelItem.d.ts.map +1 -0
  211. package/esm/presentation/insightEditor/InsightEditorCreatePanelItem.js +25 -0
  212. package/esm/presentation/insightEditor/InsightEditorOverlay.d.ts +6 -0
  213. package/esm/presentation/insightEditor/InsightEditorOverlay.d.ts.map +1 -0
  214. package/esm/presentation/insightEditor/InsightEditorOverlay.js +110 -0
  215. package/esm/presentation/insightEditor/InsightEditorPermissionsContext.d.ts +10 -0
  216. package/esm/presentation/insightEditor/InsightEditorPermissionsContext.d.ts.map +1 -0
  217. package/esm/presentation/insightEditor/InsightEditorPermissionsContext.js +18 -0
  218. package/esm/presentation/insightEditor/InsightEditorPlaceholder.d.ts +7 -0
  219. package/esm/presentation/insightEditor/InsightEditorPlaceholder.d.ts.map +1 -0
  220. package/esm/presentation/insightEditor/InsightEditorPlaceholder.js +15 -0
  221. package/esm/presentation/insightEditor/filterContext/attributeFilters.d.ts +4 -0
  222. package/esm/presentation/insightEditor/filterContext/attributeFilters.d.ts.map +1 -0
  223. package/esm/presentation/insightEditor/filterContext/attributeFilters.js +115 -0
  224. package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts +5 -0
  225. package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts.map +1 -0
  226. package/esm/presentation/insightEditor/filterContext/dateFilters.js +117 -0
  227. package/esm/presentation/insightEditor/filterContext/filterIntersection.d.ts +7 -0
  228. package/esm/presentation/insightEditor/filterContext/filterIntersection.d.ts.map +1 -0
  229. package/esm/presentation/insightEditor/filterContext/filterIntersection.js +149 -0
  230. package/esm/presentation/insightEditor/filterContext/insightFilterContext.d.ts +26 -0
  231. package/esm/presentation/insightEditor/filterContext/insightFilterContext.d.ts.map +1 -0
  232. package/esm/presentation/insightEditor/filterContext/insightFilterContext.js +72 -0
  233. package/esm/presentation/insightEditor/filterContext/measureValueFilters.d.ts +20 -0
  234. package/esm/presentation/insightEditor/filterContext/measureValueFilters.d.ts.map +1 -0
  235. package/esm/presentation/insightEditor/filterContext/measureValueFilters.js +76 -0
  236. package/esm/presentation/insightEditor/filterContext/objQualifiers.d.ts +11 -0
  237. package/esm/presentation/insightEditor/filterContext/objQualifiers.d.ts.map +1 -0
  238. package/esm/presentation/insightEditor/filterContext/objQualifiers.js +18 -0
  239. package/esm/presentation/insightEditor/insightEditorEscapeGuard.d.ts +18 -0
  240. package/esm/presentation/insightEditor/insightEditorEscapeGuard.d.ts.map +1 -0
  241. package/esm/presentation/insightEditor/insightEditorEscapeGuard.js +24 -0
  242. package/esm/presentation/insightEditor/insightEditorRoute.d.ts +34 -0
  243. package/esm/presentation/insightEditor/insightEditorRoute.d.ts.map +1 -0
  244. package/esm/presentation/insightEditor/insightEditorRoute.js +48 -0
  245. package/esm/presentation/insightEditor/types.d.ts +7 -0
  246. package/esm/presentation/insightEditor/types.d.ts.map +1 -0
  247. package/esm/presentation/insightEditor/types.js +2 -0
  248. package/esm/presentation/insightEditor/useCanCreateInsightInEditor.d.ts +5 -0
  249. package/esm/presentation/insightEditor/useCanCreateInsightInEditor.d.ts.map +1 -0
  250. package/esm/presentation/insightEditor/useCanCreateInsightInEditor.js +14 -0
  251. package/esm/presentation/insightEditor/useExploreFilterTransfer.d.ts +21 -0
  252. package/esm/presentation/insightEditor/useExploreFilterTransfer.d.ts.map +1 -0
  253. package/esm/presentation/insightEditor/useExploreFilterTransfer.js +193 -0
  254. package/esm/presentation/insightEditor/useInsightEditPermissions.d.ts +17 -0
  255. package/esm/presentation/insightEditor/useInsightEditPermissions.d.ts.map +1 -0
  256. package/esm/presentation/insightEditor/useInsightEditPermissions.js +42 -0
  257. package/esm/presentation/insightEditor/useInsightEditorMenuItems.d.ts +23 -0
  258. package/esm/presentation/insightEditor/useInsightEditorMenuItems.d.ts.map +1 -0
  259. package/esm/presentation/insightEditor/useInsightEditorMenuItems.js +126 -0
  260. package/esm/presentation/insightEditor/useInsightEditorSession.d.ts +19 -0
  261. package/esm/presentation/insightEditor/useInsightEditorSession.d.ts.map +1 -0
  262. package/esm/presentation/insightEditor/useInsightEditorSession.js +141 -0
  263. package/esm/presentation/insightList/InsightList.d.ts.map +1 -1
  264. package/esm/presentation/insightList/InsightList.js +10 -5
  265. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +6 -0
  266. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  267. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +48 -42
  268. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +6 -0
  269. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  270. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +6 -0
  271. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +6 -0
  272. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  273. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +11 -5
  274. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +64 -0
  275. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  276. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +64 -0
  277. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +6 -0
  278. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  279. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +6 -0
  280. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +6 -0
  281. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  282. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +6 -0
  283. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +6 -0
  284. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  285. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +6 -0
  286. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +6 -0
  287. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  288. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +6 -0
  289. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +6 -0
  290. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  291. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +187 -181
  292. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +6 -0
  293. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  294. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +6 -0
  295. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +6 -0
  296. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  297. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +6 -0
  298. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +6 -0
  299. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  300. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +6 -0
  301. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +6 -0
  302. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  303. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +6 -0
  304. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +6 -0
  305. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  306. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +6 -0
  307. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +6 -0
  308. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  309. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +6 -0
  310. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +6 -0
  311. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  312. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +6 -0
  313. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +6 -0
  314. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  315. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +6 -0
  316. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +6 -0
  317. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  318. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +6 -0
  319. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +6 -0
  320. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  321. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +6 -0
  322. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +6 -0
  323. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  324. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +6 -0
  325. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +6 -0
  326. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  327. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +6 -0
  328. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +6 -0
  329. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  330. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +6 -0
  331. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +6 -0
  332. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  333. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +6 -0
  334. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +6 -0
  335. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  336. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +6 -0
  337. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +6 -0
  338. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  339. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +6 -0
  340. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +6 -0
  341. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  342. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +7 -1
  343. package/esm/presentation/topBar/buttonBar/button/editButton/DefaultEditButton.d.ts.map +1 -1
  344. package/esm/presentation/topBar/buttonBar/button/editButton/DefaultEditButton.js +2 -4
  345. package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.d.ts.map +1 -1
  346. package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.js +3 -2
  347. package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.d.ts.map +1 -1
  348. package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.js +3 -2
  349. package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.d.ts.map +1 -1
  350. package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.js +3 -2
  351. package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.d.ts.map +1 -1
  352. package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.js +3 -2
  353. package/esm/presentation/topBar/title/EditableTitle.d.ts.map +1 -1
  354. package/esm/presentation/topBar/title/EditableTitle.js +6 -0
  355. package/esm/presentation/widget/insight/DefaultDashboardInsightComponentSetFactory.d.ts +1 -1
  356. package/esm/presentation/widget/insight/DefaultDashboardInsightComponentSetFactory.d.ts.map +1 -1
  357. package/esm/presentation/widget/insight/DefaultDashboardInsightComponentSetFactory.js +13 -1
  358. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/index.d.ts.map +1 -1
  359. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/index.js +10 -1
  360. package/esm/presentation/widget/richText/EditModeDashboardRichText.js +1 -1
  361. package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +1 -1
  362. package/esm/presentation/widget/visualizationSwitcher/configuration/ToolbarTop.js +2 -2
  363. package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.d.ts.map +1 -1
  364. package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.js +5 -1
  365. package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.d.ts.map +1 -1
  366. package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.js +4 -1
  367. package/esm/sdk-ui-dashboard.d.ts +528 -68
  368. package/package.json +23 -21
  369. package/styles/css/alerting.css +1 -1
  370. package/styles/css/alerting.css.map +1 -1
  371. package/styles/css/attributeFilterConfig.css +3 -3
  372. package/styles/css/automationFilters.css +1 -1
  373. package/styles/css/configurationPanel.css +2 -2
  374. package/styles/css/configurationPanel.css.map +1 -1
  375. package/styles/css/dashboard.css +149 -86
  376. package/styles/css/dashboard.css.map +1 -1
  377. package/styles/css/dashboardContentLoader.css +45 -0
  378. package/styles/css/dashboardContentLoader.css.map +1 -0
  379. package/styles/css/dashboardNestedLayoutToolbar.css.map +1 -1
  380. package/styles/css/dashboardNestedLayoutWidget.css +1 -1
  381. package/styles/css/dashboardSettingsDialog.css +1 -1
  382. package/styles/css/dragAndDrop.css +0 -8
  383. package/styles/css/dragAndDrop.css.map +1 -1
  384. package/styles/css/drillConfigPanel.css +7 -7
  385. package/styles/css/drillConfigPanel.css.map +1 -1
  386. package/styles/css/filterBar.css +4 -4
  387. package/styles/css/filterBar.css.map +1 -1
  388. package/styles/css/grouped-navigation.css +2 -2
  389. package/styles/css/grouped-navigation.css.map +1 -1
  390. package/styles/css/icons.css.map +1 -1
  391. package/styles/css/insightConfiguration.css +1 -1
  392. package/styles/css/insightConfiguration.css.map +1 -1
  393. package/styles/css/insightEditor.css +46 -0
  394. package/styles/css/insightEditor.css.map +1 -0
  395. package/styles/css/kpi.css +2 -2
  396. package/styles/css/kpi.css.map +1 -1
  397. package/styles/css/kpi_alert_dialog.css +2 -2
  398. package/styles/css/layout.css +5 -5
  399. package/styles/css/layout.css.map +1 -1
  400. package/styles/css/main.css +343 -218
  401. package/styles/css/main.css.map +1 -1
  402. package/styles/css/notifications_channels_dialog.css +2 -2
  403. package/styles/css/notifications_channels_dialog.css.map +1 -1
  404. package/styles/css/resizing.css.map +1 -1
  405. package/styles/css/richTextWidget.css.map +1 -1
  406. package/styles/css/saveAsDialog.css.map +1 -1
  407. package/styles/css/sidebar.css +35 -10
  408. package/styles/css/sidebar.css.map +1 -1
  409. package/styles/css/topBar.css.map +1 -1
  410. package/styles/css/visualization.css.map +1 -1
  411. package/styles/css/visualizationSwitcherHeader.css.map +1 -1
  412. package/styles/css/visualizationSwitcherToolbar.css +1 -1
  413. package/styles/css/visualizationSwitcherToolbar.css.map +1 -1
  414. package/styles/css/visualizationSwitcherWidget.css +1 -1
  415. package/styles/css/visualizationSwitcherWidget.css.map +1 -1
  416. package/styles/scss/_variables.scss +3 -2
  417. package/styles/scss/_zIndexes.scss +4 -0
  418. package/styles/scss/attributeFilterConfig.scss +1 -1
  419. package/styles/scss/configurationPanel.scss +1 -1
  420. package/styles/scss/dashboard.scss +113 -94
  421. package/styles/scss/dashboardContentLoader.scss +45 -0
  422. package/styles/scss/dragAndDrop.scss +2 -9
  423. package/styles/scss/drillConfigPanel.scss +3 -3
  424. package/styles/scss/insightEditor.scss +53 -0
  425. package/styles/scss/layout.scss +1 -1
  426. package/styles/scss/main.scss +1 -0
  427. package/styles/scss/sidebar.scss +47 -12
  428. package/esm/presentation/dashboard/components/DashboardSkeleton.d.ts +0 -5
  429. package/esm/presentation/dashboard/components/DashboardSkeleton.d.ts.map +0 -1
  430. package/esm/presentation/dashboard/components/DashboardSkeleton.js +0 -20
@@ -0,0 +1,158 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useEffect, useMemo, useRef, useState } from "react";
4
+ import { insightIsLocked, insightRef } from "@gooddata/sdk-model";
5
+ import { useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
6
+ import { AnalyticalDesigner, } from "@gooddata/sdk-ui-analytical-designer";
7
+ import { useTheme } from "@gooddata/sdk-ui-theme-provider";
8
+ import { attributeHierarchyModified } from "../../model/commands/insight.js";
9
+ import { insightEditorCacheResetRequested } from "../../model/events/insightEditor.js";
10
+ import { useDashboardDispatch, useDashboardSelector } from "../../model/react/DashboardStoreProvider.js";
11
+ import { useDashboardEventDispatch } from "../../model/react/useDashboardEventDispatch.js";
12
+ import { selectAgGridToken, selectColorPalette, selectIsEmbedded, selectIsWhiteLabeled, selectLocale, selectMapboxToken, selectObjectAvailabilityConfig, selectSeparators, selectSettings, } from "../../model/store/config/configSelectors.js";
13
+ import { selectEntitlements } from "../../model/store/entitlements/entitlementsSelectors.js";
14
+ import { selectInsightByWidgetRef } from "../../model/store/insights/insightsSelectors.js";
15
+ import { selectDashboardId } from "../../model/store/meta/metaSelectors.js";
16
+ import { selectCanCreateVisualization, selectCanManageWorkspace, selectPermissions, } from "../../model/store/permissions/permissionsSelectors.js";
17
+ import { selectIsInEditMode } from "../../model/store/renderMode/renderModeSelectors.js";
18
+ import { selectExecutionTimestamp } from "../../model/store/ui/uiSelectors.js";
19
+ import { selectCurrentUser } from "../../model/store/user/userSelectors.js";
20
+ import { getInsightEditorRoute } from "./insightEditorRoute.js";
21
+ import { useExploreFilterTransfer } from "./useExploreFilterTransfer.js";
22
+ // The stylesheets Analytical Designer needs load with its lazy chunk, the SDK ones first, so the
23
+ // rules of Analytical Designer win.
24
+ // oxlint-disable-next-line import/no-unassigned-import
25
+ import "@gooddata/sdk-ui-kit/styles/css/main.css";
26
+ // oxlint-disable-next-line import/no-unassigned-import
27
+ import "@gooddata/sdk-ui-pivot/styles/css/main.css";
28
+ // oxlint-disable-next-line import/no-unassigned-import
29
+ import "@gooddata/sdk-ui-geo/styles/css/main.css";
30
+ // oxlint-disable-next-line import/no-unassigned-import
31
+ import "@gooddata/sdk-ui-charts/styles/css/main.css";
32
+ // oxlint-disable-next-line import/no-unassigned-import
33
+ import "@gooddata/sdk-ui-filters/styles/css/measureValueFilter.css";
34
+ // oxlint-disable-next-line import/no-unassigned-import
35
+ import "@gooddata/sdk-ui-filters/styles/css/dateFilter.css";
36
+ // oxlint-disable-next-line import/no-unassigned-import
37
+ import "@gooddata/sdk-ui-filters/styles/css/rankingFilter.css";
38
+ // oxlint-disable-next-line import/no-unassigned-import
39
+ import "@gooddata/sdk-ui-filters/styles/css/attributeFilterNext.css";
40
+ // oxlint-disable-next-line import/no-unassigned-import
41
+ import "@gooddata/sdk-ui-ext/styles/css/main.css";
42
+ // oxlint-disable-next-line import/no-unassigned-import
43
+ import "@gooddata/sdk-ui-semantic-search/styles/css/internal.css";
44
+ // oxlint-disable-next-line import/no-unassigned-import
45
+ import "@gooddata/sdk-ui-analytical-designer/styles/css/main.css";
46
+ /**
47
+ * Analytical Designer in the insight editor overlay. It lives in a lazily loaded chunk together with
48
+ * the whole Analytical Designer.
49
+ */
50
+ export function InsightEditorContent({ target, session, closeHandleRef }) {
51
+ const backend = useBackendStrict();
52
+ const workspace = useWorkspaceStrict();
53
+ const dispatch = useDashboardDispatch();
54
+ const eventDispatch = useDashboardEventDispatch();
55
+ const hostConfig = useHostConfig();
56
+ const theme = useTheme();
57
+ const permissions = useDashboardSelector(selectPermissions);
58
+ const isEditMode = useDashboardSelector(selectIsInEditMode);
59
+ const route = useRoute(target, isEditMode);
60
+ const apiRef = useRef(null);
61
+ const [isFailed, setIsFailed] = useState(false);
62
+ useEffect(() => {
63
+ closeHandleRef.current = isFailed
64
+ ? null
65
+ : { requestClose: () => apiRef.current?.requestCancellation() };
66
+ return () => {
67
+ closeHandleRef.current = null;
68
+ };
69
+ }, [closeHandleRef, isFailed]);
70
+ const isExplore = !isEditMode && (target.type === "widget" || target.type === "insight");
71
+ const filterTransfer = useExploreFilterTransfer(target, isExplore, apiRef);
72
+ const cacheReset = useMemo(() => ({
73
+ resetAll: () => eventDispatch(insightEditorCacheResetRequested("all")),
74
+ resetCatalogs: () => eventDispatch(insightEditorCacheResetRequested("catalogs")),
75
+ }), [eventDispatch]);
76
+ const config = useMemo(() => ({ ...hostConfig, ...route.config }), [hostConfig, route.config]);
77
+ return (_jsx(AnalyticalDesigner, { backend: backend, workspace: workspace, insight: route.insight, config: config, permissions: permissions, theme: theme,
78
+ // The dashboard already resolved the theme of the workspace.
79
+ disableThemeLoading: true, cacheReset: cacheReset, onInsightSaved: (data) => void session.save(data.insight.identifier), onInsightEditingCancelled: session.cancel, onInsightOpened: filterTransfer.onInsightOpened, onInsightRendered: filterTransfer.onInsightRendered, onCommandFailed: filterTransfer.onCommandFailed, onAttributeHierarchyModified: () => {
80
+ eventDispatch(insightEditorCacheResetRequested("catalogs"));
81
+ dispatch(attributeHierarchyModified());
82
+ },
83
+ // A failed Analytical Designer never answers a command, so the overlay closes directly.
84
+ onError: () => setIsFailed(true), apiRef: apiRef }));
85
+ }
86
+ /**
87
+ * The values that Analytical Designer would otherwise load when it starts. The dashboard has them
88
+ * already.
89
+ */
90
+ function useHostConfig() {
91
+ const locale = useDashboardSelector(selectLocale);
92
+ const separators = useDashboardSelector(selectSeparators);
93
+ const settings = useDashboardSelector(selectSettings);
94
+ const mapboxToken = useDashboardSelector(selectMapboxToken);
95
+ const agGridToken = useDashboardSelector(selectAgGridToken);
96
+ const colorPalette = useDashboardSelector(selectColorPalette);
97
+ const isWhiteLabeled = useDashboardSelector(selectIsWhiteLabeled);
98
+ const user = useDashboardSelector(selectCurrentUser);
99
+ const entitlements = useDashboardSelector(selectEntitlements);
100
+ const objectAvailability = useDashboardSelector(selectObjectAvailabilityConfig);
101
+ const asOfDate = useDashboardSelector(selectExecutionTimestamp);
102
+ return useMemo(() => ({
103
+ locale,
104
+ separators,
105
+ // The dashboard keeps the settings of the user in the workspace.
106
+ settings: settings,
107
+ mapboxToken,
108
+ agGridToken,
109
+ colorPalette,
110
+ whiteLabeling: { isBranded: isWhiteLabeled },
111
+ user,
112
+ organization: { entitlements },
113
+ asOfDate,
114
+ includeObjectsWithTags: objectAvailability?.includeObjectsWithTags,
115
+ excludeObjectsWithTags: objectAvailability?.excludeObjectsWithTags,
116
+ }), [
117
+ locale,
118
+ separators,
119
+ settings,
120
+ mapboxToken,
121
+ agGridToken,
122
+ colorPalette,
123
+ isWhiteLabeled,
124
+ user,
125
+ entitlements,
126
+ objectAvailability,
127
+ asOfDate,
128
+ ]);
129
+ }
130
+ function useRoute(target, isEditMode) {
131
+ const widgetRef = target.type === "widget" ? target.ref : undefined;
132
+ const widgetInsight = useDashboardSelector(selectInsightByWidgetRef(widgetRef));
133
+ const dashboardId = useDashboardSelector(selectDashboardId);
134
+ const isEmbedded = useDashboardSelector(selectIsEmbedded);
135
+ const canManageWorkspace = useDashboardSelector(selectCanManageWorkspace);
136
+ const canCreateVisualization = useDashboardSelector(selectCanCreateVisualization);
137
+ const widgetInsightRef = useMemo(() => (widgetInsight ? insightRef(widgetInsight) : undefined), [widgetInsight]);
138
+ const isWidgetInsightLocked = widgetInsight ? insightIsLocked(widgetInsight) : false;
139
+ return useMemo(() => getInsightEditorRoute({
140
+ target,
141
+ widgetInsightRef,
142
+ isWidgetInsightLocked,
143
+ dashboardId,
144
+ isEditMode,
145
+ isEmbedded,
146
+ canManageWorkspace,
147
+ canCreateVisualization,
148
+ }), [
149
+ target,
150
+ widgetInsightRef,
151
+ isWidgetInsightLocked,
152
+ dashboardId,
153
+ isEditMode,
154
+ isEmbedded,
155
+ canManageWorkspace,
156
+ canCreateVisualization,
157
+ ]);
158
+ }
@@ -0,0 +1,7 @@
1
+ import { type ICreatePanelItemComponentProps } from "../componentDefinition/types.js";
2
+ /**
3
+ * The item of the edit mode panel that the user drags to the layout to create a new insight in the
4
+ * embedded Analytical Designer.
5
+ */
6
+ export declare function InsightEditorCreatePanelItem({ WrapCreatePanelItemWithDragComponent, disabled, }: ICreatePanelItemComponentProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=InsightEditorCreatePanelItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightEditorCreatePanelItem.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/InsightEditorCreatePanelItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAuBtF;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,EACzC,oCAAoC,EACpC,QAAQ,GACX,EAAE,8BAA8B,2CAYhC"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2022-2026 GoodData Corporation
3
+ import { FormattedMessage } from "react-intl";
4
+ import { INSIGHT_WIDGET_SIZE_INFO_NEW_DEFAULT } from "@gooddata/sdk-ui-ext";
5
+ import { UiIcon } from "@gooddata/sdk-ui-kit";
6
+ import { useWidgetSelection } from "../../model/react/useWidgetSelection.js";
7
+ import { DraggableCreatePanelItem } from "../dragAndDrop/DraggableCreatePanelItem.js";
8
+ const dragItem = {
9
+ type: "insight-placeholder",
10
+ size: {
11
+ gridWidth: INSIGHT_WIDGET_SIZE_INFO_NEW_DEFAULT.width.default,
12
+ gridHeight: INSIGHT_WIDGET_SIZE_INFO_NEW_DEFAULT.height.default,
13
+ },
14
+ };
15
+ function AddInsightPlaceholder() {
16
+ return (_jsxs("div", { className: "add-item-placeholder add-insight-placeholder s-add-insight", children: [_jsx("div", { className: "add-item-placeholder__icon", children: _jsx(UiIcon, { type: "visualization", size: 18, layout: "block" }) }), _jsx(FormattedMessage, { id: "addPanel.insight" })] }));
17
+ }
18
+ /**
19
+ * The item of the edit mode panel that the user drags to the layout to create a new insight in the
20
+ * embedded Analytical Designer.
21
+ */
22
+ export function InsightEditorCreatePanelItem({ WrapCreatePanelItemWithDragComponent, disabled, }) {
23
+ const { deselectWidgets } = useWidgetSelection();
24
+ return (_jsx(DraggableCreatePanelItem, { Component: AddInsightPlaceholder, WrapCreatePanelItemWithDragComponent: WrapCreatePanelItemWithDragComponent, disabled: disabled, dragItem: dragItem, hideDefaultPreview: false, onDragStart: () => deselectWidgets() }));
25
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The embedded Analytical Designer on top of the dashboard. It renders only when the dashboard config
3
+ * enables insight editing.
4
+ */
5
+ export declare function InsightEditorOverlay(): import("react/jsx-runtime").JSX.Element | null;
6
+ //# sourceMappingURL=InsightEditorOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightEditorOverlay.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/InsightEditorOverlay.tsx"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,wBAAgB,oBAAoB,mDAGnC"}
@@ -0,0 +1,110 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2020-2026 GoodData Corporation
3
+ import { Suspense, lazy, useCallback, useEffect, useRef, useState } from "react";
4
+ import { useIntl } from "react-intl";
5
+ import { objRefToString } from "@gooddata/sdk-model";
6
+ import { LoadingMask, Overlay, OverlayController, OverlayControllerProvider, useMediaQuery, } from "@gooddata/sdk-ui-kit";
7
+ import { insightEditorOpened } from "../../model/events/insightEditor.js";
8
+ import { useDashboardDispatch, useDashboardSelector } from "../../model/react/DashboardStoreProvider.js";
9
+ import { useDashboardEventDispatch } from "../../model/react/useDashboardEventDispatch.js";
10
+ import { selectEnableInsightEditing } from "../../model/store/config/configSelectors.js";
11
+ import { uiActions } from "../../model/store/ui/index.js";
12
+ import { selectInsightEditorTarget } from "../../model/store/ui/uiSelectors.js";
13
+ import { isInsightOverlayTopmost } from "./insightEditorEscapeGuard.js";
14
+ import { useInsightEditorSession } from "./useInsightEditorSession.js";
15
+ // Analytical Designer downloads when the editor first opens, not with the dashboard.
16
+ const LazyInsightEditorContent = lazy(() => import("./InsightEditorContent.js").then((module) => ({ default: module.InsightEditorContent })));
17
+ // AD renders the configuration panels of visualizations in a separate React root, so the overlays it
18
+ // opens from there (dropdowns, color pickers) see no OverlayControllerProvider and fall back to the
19
+ // ui-kit default z-index 5001. The editor overlay must not paint above them: its controller base 5000
20
+ // gives it 5001 too, and the config panel popups win by DOM order.
21
+ const overlayController = OverlayController.getInstance(5000);
22
+ /**
23
+ * The embedded Analytical Designer on top of the dashboard. It renders only when the dashboard config
24
+ * enables insight editing.
25
+ */
26
+ export function InsightEditorOverlay() {
27
+ const isEnabled = useDashboardSelector(selectEnableInsightEditing);
28
+ return isEnabled ? _jsx(InsightEditorOverlayCore, {}) : null;
29
+ }
30
+ function InsightEditorOverlayCore() {
31
+ const dispatch = useDashboardDispatch();
32
+ const target = useDashboardSelector(selectInsightEditorTarget);
33
+ const isMobile = useMediaQuery("mobileDevice");
34
+ // The editor has no mobile layout, so it does not open on a mobile screen. A breakpoint change
35
+ // after the editor opened keeps it open: an unmount would drop the editing session silently.
36
+ const [openedTarget, setOpenedTarget] = useState({ target, isMobile });
37
+ if (openedTarget.target !== target) {
38
+ setOpenedTarget({ target, isMobile });
39
+ }
40
+ const isBlocked = openedTarget.target === target ? openedTarget.isMobile : isMobile;
41
+ useEffect(() => {
42
+ if (target && isBlocked) {
43
+ dispatch(uiActions.closeInsightEditor());
44
+ }
45
+ }, [dispatch, target, isBlocked]);
46
+ if (!target || isBlocked) {
47
+ return null;
48
+ }
49
+ // Each target gets its own session, so an open of another target never reuses its state.
50
+ return _jsx(InsightEditorModal, { target: target }, getTargetKey(target));
51
+ }
52
+ function getTargetKey(target) {
53
+ return target.type === "widget" || target.type === "insight"
54
+ ? `${target.type}:${objRefToString(target.ref)}`
55
+ : target.type;
56
+ }
57
+ function InsightEditorModal({ target }) {
58
+ const eventDispatch = useDashboardEventDispatch();
59
+ const session = useInsightEditorSession(target);
60
+ const closeHandleRef = useRef(null);
61
+ const intl = useIntl();
62
+ useEffect(() => {
63
+ eventDispatch(insightEditorOpened(target));
64
+ }, [eventDispatch, target]);
65
+ // No focus trap: Analytical Designer portals its dropdowns and dialogs to the body, out of the
66
+ // modal. The dialog takes the focus when it mounts, and the focus returns when the editor closes.
67
+ // The render reads the prior focus: the ref callback moves it before any effect runs.
68
+ const [previouslyFocused] = useState(() => document.activeElement);
69
+ const focusDialog = useCallback((dialog) => {
70
+ dialog?.focus({ preventScroll: true });
71
+ }, []);
72
+ useEffect(() => {
73
+ return () => {
74
+ if (previouslyFocused instanceof HTMLElement && previouslyFocused.isConnected) {
75
+ previouslyFocused.focus();
76
+ }
77
+ };
78
+ }, [previouslyFocused]);
79
+ // Before the AD chunk loads, or when AD fails to start, nothing can confirm the cancellation.
80
+ const requestClose = useCallback(() => {
81
+ if (closeHandleRef.current) {
82
+ closeHandleRef.current.requestClose();
83
+ }
84
+ else {
85
+ session.cancel();
86
+ }
87
+ }, [session]);
88
+ // The Overlay closeOnEscape listens on window with no stack awareness. An Escape meant for nested
89
+ // AD UI (a filter dropdown, the save dialog) would cancel the whole editing session. Close only
90
+ // when this overlay is the topmost one, so Escape peels one layer per press.
91
+ useEffect(() => {
92
+ const onKeyDown = (e) => {
93
+ if (e.key === "Escape" && isInsightOverlayTopmost()) {
94
+ requestClose();
95
+ }
96
+ };
97
+ window.addEventListener("keydown", onKeyDown);
98
+ return () => window.removeEventListener("keydown", onKeyDown);
99
+ }, [requestClose]);
100
+ return (_jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(Overlay, { containerClassName: "gd-insight-editor-overlay", className: "gd-edit-insight-modal-overlay", isModal: true,
101
+ // closeOnOutsideClick stops the propagation of the document mousedowns inside the
102
+ // overlay. AD registers its drag-start listener in the capture phase to survive it.
103
+ closeOnOutsideClick: true, closeOnEscape: false, ignoreClicksOnByClass: [".s-sort-direction-arrow", ".dash-content"], onClose: requestClose, shouldCloseOnClick: isNotBodyClick, positionType: "fixed", children: _jsx("div", { ref: focusDialog, tabIndex: -1, className: "gd-edit-insight-overlay-content s-edit-insight-overlay-content overlay-move-left", role: "dialog", "aria-modal": "true", "aria-label": intl.formatMessage({ id: "insightEditor.dialog.label" }), children: _jsx(Suspense, { fallback: _jsx(LoadingMask, { height: "100%" }), children: _jsx(LazyInsightEditorContent, { target: target, session: session, closeHandleRef: closeHandleRef }) }) }) }) }));
104
+ }
105
+ // The menu item that opens the overlay leaves the DOM during the click, so the browser retargets the
106
+ // rest of that click to bare <body>. A click meant to close the overlay lands on a real element (the
107
+ // modal mask or a dashboard node), never on bare <body>.
108
+ function isNotBodyClick(e) {
109
+ return e.target !== document.body;
110
+ }
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from "react";
2
+ import { type InsightPermissionsById } from "./useInsightEditPermissions.js";
3
+ /**
4
+ * Loads the permissions of the user on the dashboard visualizations once for all widget menus.
5
+ */
6
+ export declare function InsightEditorPermissionsProvider({ children }: {
7
+ children?: ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function useInsightEditorPermissions(): InsightPermissionsById | undefined;
10
+ //# sourceMappingURL=InsightEditorPermissionsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightEditorPermissionsContext.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/InsightEditorPermissionsContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAKlE,OAAO,EAAE,KAAK,sBAAsB,EAA6B,MAAM,gCAAgC,CAAC;AAIxG;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,2CAQtF;AAED,wBAAgB,2BAA2B,IAAI,sBAAsB,GAAG,SAAS,CAEhF"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { createContext, useContext } from "react";
4
+ import { useDashboardSelector } from "../../model/react/DashboardStoreProvider.js";
5
+ import { selectEnableInsightEditing } from "../../model/store/config/configSelectors.js";
6
+ import { useInsightEditPermissions } from "./useInsightEditPermissions.js";
7
+ const InsightEditorPermissionsContext = createContext(undefined);
8
+ /**
9
+ * Loads the permissions of the user on the dashboard visualizations once for all widget menus.
10
+ */
11
+ export function InsightEditorPermissionsProvider({ children }) {
12
+ const isEnabled = useDashboardSelector(selectEnableInsightEditing);
13
+ const permissions = useInsightEditPermissions(isEnabled);
14
+ return (_jsx(InsightEditorPermissionsContext.Provider, { value: permissions, children: children }));
15
+ }
16
+ export function useInsightEditorPermissions() {
17
+ return useContext(InsightEditorPermissionsContext);
18
+ }
@@ -0,0 +1,7 @@
1
+ import { type IDashboardWidgetProps } from "../widget/widget/types.js";
2
+ /**
3
+ * Takes the place of a new insight dropped in the layout. It opens the embedded Analytical Designer
4
+ * to create the insight.
5
+ */
6
+ export declare function InsightEditorPlaceholder(_props: IDashboardWidgetProps): null;
7
+ //# sourceMappingURL=InsightEditorPlaceholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightEditorPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/InsightEditorPlaceholder.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAO5E"}
@@ -0,0 +1,15 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useEffect } from "react";
3
+ import { useDashboardDispatch } from "../../model/react/DashboardStoreProvider.js";
4
+ import { uiActions } from "../../model/store/ui/index.js";
5
+ /**
6
+ * Takes the place of a new insight dropped in the layout. It opens the embedded Analytical Designer
7
+ * to create the insight.
8
+ */
9
+ export function InsightEditorPlaceholder(_props) {
10
+ const dispatch = useDashboardDispatch();
11
+ useEffect(() => {
12
+ dispatch(uiActions.openInsightEditor({ type: "placeholder" }));
13
+ }, [dispatch]);
14
+ return null;
15
+ }
@@ -0,0 +1,4 @@
1
+ import { type AttributeFilterItem } from "@gooddata/sdk-embedding";
2
+ import { type ICatalogAttribute, type IFilter, type IInsight, type ObjRef } from "@gooddata/sdk-model";
3
+ export declare function getAttributeFilterItems(appliedFilters: IFilter[], insight: IInsight, availableAttributes: ICatalogAttribute[], attributeFilterConfigsDisplayAsLabelMap: Map<string, ObjRef> | undefined, supportsElementUris: boolean): AttributeFilterItem[];
4
+ //# sourceMappingURL=attributeFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributeFilters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/attributeFilters.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,mBAAmB,EAI3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGH,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EAWd,MAAM,qBAAqB,CAAC;AAyB7B,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,OAAO,EAAE,EACzB,OAAO,EAAE,QAAQ,EACjB,mBAAmB,EAAE,iBAAiB,EAAE,EACxC,uCAAuC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACxE,mBAAmB,EAAE,OAAO,GAC7B,mBAAmB,EAAE,CAQvB"}
@@ -0,0 +1,115 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { compact } from "lodash-es";
3
+ import { isPositiveAttributeFilter, } from "@gooddata/sdk-embedding";
4
+ import { areObjRefsEqual, filterAttributeElements, filterLocalIdentifier, filterObjRef, insightFilters, isArbitraryAttributeFilter, isAttributeElementsByValue, isAttributeFilter, isMatchAttributeFilter, isNegativeAttributeFilter, } from "@gooddata/sdk-model";
5
+ import { areFiltersWithSameElements, intersectFilters } from "./filterIntersection.js";
6
+ import { toObjIdentifierQualifier } from "./objQualifiers.js";
7
+ function getValidAppliedAttributeFilters(appliedFilters, availableAttributes) {
8
+ return (appliedFilters
9
+ .filter(isAttributeFilter)
10
+ // remove filters not on attributes that are available for the given insight
11
+ // those are considered invalid
12
+ .filter((attrFilter) => {
13
+ const filterDisplayForm = filterObjRef(attrFilter);
14
+ return availableAttributes.some((available) => {
15
+ return available.displayForms.some((displayForm) => areObjRefsEqual(displayForm.ref, filterDisplayForm));
16
+ });
17
+ }));
18
+ }
19
+ export function getAttributeFilterItems(appliedFilters, insight, availableAttributes, attributeFilterConfigsDisplayAsLabelMap, supportsElementUris) {
20
+ return getAttributeFilterItemsFromAppliedFilters(getValidAppliedAttributeFilters(appliedFilters, availableAttributes), insightFilters(insight).filter(isAttributeFilter), availableAttributes, attributeFilterConfigsDisplayAsLabelMap, supportsElementUris);
21
+ }
22
+ function getAttributeFilterItemsFromAppliedFilters(appliedFilters, insightAttrFilters, availableAttributes, attributeFilterConfigsDisplayAsLabelMap, supportsElementUris) {
23
+ const processedFilters = appliedFilters
24
+ // validate and intersect the dashboard filters with the insight filters
25
+ .map((attrFilter) => {
26
+ const filterDisplayForm = filterObjRef(attrFilter);
27
+ const isInverted = isNegativeAttributeFilter(attrFilter);
28
+ const selectedElements = filterAttributeElements(attrFilter);
29
+ const localIdentifier = filterLocalIdentifier(attrFilter);
30
+ if (isArbitraryAttributeFilter(attrFilter)) {
31
+ const { label, values, negativeSelection } = attrFilter.arbitraryAttributeFilter;
32
+ return {
33
+ arbitraryAttributeFilter: {
34
+ displayForm: toObjIdentifierQualifier(label),
35
+ values: values,
36
+ ...(negativeSelection === undefined ? {} : { negativeSelection }),
37
+ },
38
+ };
39
+ }
40
+ if (isMatchAttributeFilter(attrFilter)) {
41
+ const { label, operator, literal, caseSensitive, negativeSelection } = attrFilter.matchAttributeFilter;
42
+ return {
43
+ matchAttributeFilter: {
44
+ displayForm: toObjIdentifierQualifier(label),
45
+ operator,
46
+ literal,
47
+ ...(caseSensitive === undefined ? {} : { caseSensitive }),
48
+ ...(negativeSelection === undefined ? {} : { negativeSelection }),
49
+ },
50
+ };
51
+ }
52
+ if (isAttributeElementsByValue(selectedElements)) {
53
+ // effectively skipping insight-based filters by this
54
+ return undefined;
55
+ }
56
+ const filterDisplayAsLabel = localIdentifier
57
+ ? attributeFilterConfigsDisplayAsLabelMap?.get(localIdentifier)
58
+ : undefined;
59
+ // The embedding API types the element lists as strings. The null element passes as it is.
60
+ const elementUris = [...(selectedElements?.uris ?? [])];
61
+ const attrFilterContext = isInverted
62
+ ? {
63
+ negativeAttributeFilter: {
64
+ displayForm: filterDisplayForm,
65
+ notIn: elementUris,
66
+ },
67
+ ...(filterDisplayAsLabel ? { displayAsLabel: filterDisplayAsLabel } : {}),
68
+ }
69
+ : {
70
+ positiveAttributeFilter: {
71
+ displayForm: filterDisplayForm,
72
+ in: elementUris,
73
+ },
74
+ ...(filterDisplayAsLabel ? { displayAsLabel: filterDisplayAsLabel } : {}),
75
+ };
76
+ // Check if the insight contains a filter on the same attribute
77
+ const insightAttrFilter = getInsightAttrFilter(insightAttrFilters, attrFilter, availableAttributes);
78
+ if (insightAttrFilter &&
79
+ !supportsElementUris &&
80
+ !areObjRefsEqual(filterDisplayForm, filterObjRef(insightAttrFilter))) {
81
+ // when the display form is different and the backend does not support element uris, skip it and don't transfer the filter
82
+ // (when uris not supported, we cannot match the elements for filters easily)
83
+ return undefined;
84
+ }
85
+ // If it does, try to merge the two filters so that the resulting elements are the intersection of the two
86
+ // The intersection might not be possible and return undefined in that case
87
+ // Only element-based insight filters can be intersected with the dashboard filter
88
+ return insightAttrFilter &&
89
+ !isArbitraryAttributeFilter(insightAttrFilter) &&
90
+ !isMatchAttributeFilter(insightAttrFilter)
91
+ ? getIntersectedAttrFilterContext(insightAttrFilter, attrFilterContext)
92
+ : attrFilterContext;
93
+ });
94
+ return compact(processedFilters);
95
+ }
96
+ function getInsightAttrFilter(insightAttrFilters, attrFilter, availableAttributes) {
97
+ const targetDisplayForm = filterObjRef(attrFilter);
98
+ return insightAttrFilters.find((filterItem) => {
99
+ const filterItemDisplayForm = filterObjRef(filterItem);
100
+ const filterItemAttribute = availableAttributes?.find((availableAttribute) => {
101
+ return availableAttribute.displayForms.some((displayForm) => areObjRefsEqual(displayForm.ref, filterItemDisplayForm));
102
+ });
103
+ return filterItemAttribute?.displayForms.some((displayForm) => areObjRefsEqual(displayForm.ref, targetDisplayForm));
104
+ });
105
+ }
106
+ function getIntersectedAttrFilterContext(insightAttrFilter, attrFilterContext) {
107
+ const intersectedAttrFilter = intersectFilters(insightAttrFilter, attrFilterContext);
108
+ const isIntersectedNoop = isPositiveAttributeFilter(intersectedAttrFilter)
109
+ ? intersectedAttrFilter.positiveAttributeFilter.in.length === 0
110
+ : false; // strictly speaking, this needs to check whether all the items are selected, however such filter is extremely improbable and not worth the hassle
111
+ if (isIntersectedNoop || areFiltersWithSameElements(insightAttrFilter, intersectedAttrFilter)) {
112
+ return undefined;
113
+ }
114
+ return intersectedAttrFilter;
115
+ }
@@ -0,0 +1,5 @@
1
+ import { type DateFilterItem } from "@gooddata/sdk-embedding";
2
+ import { type IDashboardDateFilter, type IFilter, type IInsight, type IWidget } from "@gooddata/sdk-model";
3
+ export declare function getWidgetDateFilterItem(widget: IWidget, dateFilterContextItem: IDashboardDateFilter | undefined): DateFilterItem | undefined;
4
+ export declare function getDateFilterItems(appliedFilters: IFilter[], insight: IInsight): DateFilterItem[];
5
+ //# sourceMappingURL=dateFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFilters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/dateFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACH,KAAK,oBAAoB,EAEzB,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEb,KAAK,OAAO,EAWf,MAAM,qBAAqB,CAAC;AAwC7B,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,OAAO,EACf,qBAAqB,EAAE,oBAAoB,GAAG,SAAS,GACxD,cAAc,GAAG,SAAS,CAK5B;AAoED,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,GAAG,cAAc,EAAE,CAOjG"}
@@ -0,0 +1,117 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { absoluteDateFilterValues, areObjRefsEqual, filterObjRef, insightFilters, isAbsoluteDateFilter, isAllTimeDateFilter, isDateFilter, isRelativeDateFilter, relativeDateFilterValues, } from "@gooddata/sdk-model";
3
+ const ALL_TIME_GRANULARITY = "ALL_TIME_GRANULARITY";
4
+ function getDateFilterItem(dataSet, dateFilterContextItem) {
5
+ if (dateFilterContextItem) {
6
+ if (dateFilterContextItem.dateFilter.type === "absolute") {
7
+ return {
8
+ absoluteDateFilter: {
9
+ dataSet,
10
+ from: String(dateFilterContextItem.dateFilter.from),
11
+ to: String(dateFilterContextItem.dateFilter.to),
12
+ },
13
+ };
14
+ }
15
+ else {
16
+ const boundedFilter = dateFilterContextItem.dateFilter.boundedFilter;
17
+ return {
18
+ relativeDateFilter: {
19
+ dataSet,
20
+ granularity: dateFilterContextItem.dateFilter.granularity,
21
+ from: Number(dateFilterContextItem.dateFilter.from),
22
+ to: Number(dateFilterContextItem.dateFilter.to),
23
+ ...(boundedFilter ? { boundedFilter } : {}),
24
+ },
25
+ };
26
+ }
27
+ }
28
+ else {
29
+ return {
30
+ relativeDateFilter: {
31
+ dataSet,
32
+ granularity: ALL_TIME_GRANULARITY,
33
+ from: -1,
34
+ to: 1,
35
+ },
36
+ };
37
+ }
38
+ }
39
+ export function getWidgetDateFilterItem(widget, dateFilterContextItem) {
40
+ if (!widget?.dateDataSet) {
41
+ return undefined;
42
+ }
43
+ return getDateFilterItem(widget.dateDataSet, dateFilterContextItem);
44
+ }
45
+ const sanitizeCorruptedAllTimeFilters = (appliedDateFilter) => {
46
+ if (!isRelativeDateFilter(appliedDateFilter)) {
47
+ return appliedDateFilter;
48
+ }
49
+ // A corrupted all time filter misses its bounds, although the type requires them.
50
+ const { from, to, dataSet } = appliedDateFilter.relativeDateFilter;
51
+ if (from === undefined || to === undefined) {
52
+ const relativeAllTimeDateFilter = {
53
+ relativeDateFilter: {
54
+ dataSet,
55
+ granularity: ALL_TIME_GRANULARITY,
56
+ from: 0,
57
+ to: 0,
58
+ },
59
+ };
60
+ return relativeAllTimeDateFilter;
61
+ }
62
+ else {
63
+ return appliedDateFilter;
64
+ }
65
+ };
66
+ function getDateFilterContext(dateFilter) {
67
+ const includeDataSet = true;
68
+ if (isAllTimeDateFilter(dateFilter)) {
69
+ const { dataSet } = relativeDateFilterValues(dateFilter, includeDataSet);
70
+ return {
71
+ relativeDateFilter: {
72
+ dataSet,
73
+ granularity: ALL_TIME_GRANULARITY,
74
+ from: -1,
75
+ to: 1,
76
+ },
77
+ };
78
+ }
79
+ else if (isAbsoluteDateFilter(dateFilter)) {
80
+ const { dataSet, from, to } = absoluteDateFilterValues(dateFilter, includeDataSet);
81
+ return {
82
+ absoluteDateFilter: {
83
+ dataSet,
84
+ from,
85
+ to,
86
+ },
87
+ };
88
+ }
89
+ else {
90
+ const { dataSet, from, to, granularity, boundedFilter } = relativeDateFilterValues(dateFilter, includeDataSet);
91
+ return {
92
+ relativeDateFilter: {
93
+ dataSet,
94
+ granularity,
95
+ from,
96
+ to,
97
+ ...(boundedFilter ? { boundedFilter } : {}),
98
+ },
99
+ };
100
+ }
101
+ }
102
+ export function getDateFilterItems(appliedFilters, insight) {
103
+ const sanitizedAppliedDateFilters = appliedFilters
104
+ .filter(isDateFilter)
105
+ .map(sanitizeCorruptedAllTimeFilters);
106
+ const insightDateFilters = insightFilters(insight).filter(isDateFilter);
107
+ return getDateFilterItemsFromAppliedFilters(sanitizedAppliedDateFilters, insightDateFilters);
108
+ }
109
+ function getDateFilterItemsFromAppliedFilters(appliedFilters, insightDateFilters) {
110
+ const uniqueInsightDateFilters = insightDateFilters.filter((insightDateFilter) => {
111
+ return !appliedFilters.some((appliedFilter) => {
112
+ return areObjRefsEqual(filterObjRef(appliedFilter), filterObjRef(insightDateFilter));
113
+ });
114
+ });
115
+ const allDateFilters = [...appliedFilters, ...uniqueInsightDateFilters];
116
+ return allDateFilters.map((dateFilter) => getDateFilterContext(dateFilter));
117
+ }
@@ -0,0 +1,7 @@
1
+ import { type INegativeAttributeFilter as IEmbedNegativeAttributeFilter, type IPositiveAttributeFilter as IEmbedPositiveAttributeFilter } from "@gooddata/sdk-embedding";
2
+ import { type IAttributeFilterWithSelection, type INegativeAttributeFilter, type IPositiveAttributeFilter } from "@gooddata/sdk-model";
3
+ export declare function intersectPositiveWithNegativeAttrFilters(positiveAttrFilter: IPositiveAttributeFilter, negativeAttrFilter: IEmbedNegativeAttributeFilter): IEmbedPositiveAttributeFilter;
4
+ export declare function intersectPositiveWithNegativeAttrFilters2(positiveAttrFilter: IEmbedPositiveAttributeFilter, negativeAttrFilter: INegativeAttributeFilter): IEmbedPositiveAttributeFilter;
5
+ export declare function intersectFilters(insightAttrFilter: IAttributeFilterWithSelection, attrFilterContext: IEmbedPositiveAttributeFilter | IEmbedNegativeAttributeFilter): IEmbedPositiveAttributeFilter | IEmbedNegativeAttributeFilter;
6
+ export declare function areFiltersWithSameElements(insightAttrFilter: IAttributeFilterWithSelection, attrFilterContext: IEmbedPositiveAttributeFilter | IEmbedNegativeAttributeFilter): boolean;
7
+ //# sourceMappingURL=filterIntersection.d.ts.map