@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 @@
1
+ {"version":3,"file":"filterIntersection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/filterIntersection.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,wBAAwB,IAAI,6BAA6B,EAC9D,KAAK,wBAAwB,IAAI,6BAA6B,EAGjE,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEH,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAUhC,MAAM,qBAAqB,CAAC;AAQ7B,wBAAgB,wCAAwC,CACpD,kBAAkB,EAAE,wBAAwB,EAC5C,kBAAkB,EAAE,6BAA6B,GAClD,6BAA6B,CAiC/B;AAED,wBAAgB,yCAAyC,CACrD,kBAAkB,EAAE,6BAA6B,EACjD,kBAAkB,EAAE,wBAAwB,GAC7C,6BAA6B,CA0B/B;AACD,wBAAgB,gBAAgB,CAC5B,iBAAiB,EAAE,6BAA6B,EAChD,iBAAiB,EAAE,6BAA6B,GAAG,6BAA6B,GACjF,6BAA6B,GAAG,6BAA6B,CA+D/D;AAED,wBAAgB,0BAA0B,CACtC,iBAAiB,EAAE,6BAA6B,EAChD,iBAAiB,EAAE,6BAA6B,GAAG,6BAA6B,GACjF,OAAO,CAsDT"}
@@ -0,0 +1,149 @@
1
+ // (C) 2007-2026 GoodData Corporation
2
+ import { uniq } from "lodash-es";
3
+ import { isNegativeAttributeFilter as isEmbedNegativeAttributeFilter, isPositiveAttributeFilter as isEmbedPositiveAttributeFilter, } from "@gooddata/sdk-embedding";
4
+ import { filterAttributeElements, filterIsEmpty, isAttributeElementsByRef, isAttributeElementsByValue, isNegativeAttributeFilter, isObjRef, isPositiveAttributeFilter, newNegativeAttributeFilter, newPositiveAttributeFilter, } from "@gooddata/sdk-model";
5
+ // The embedding API types the element lists as strings. The null element (an empty value) passes
6
+ // through as it is.
7
+ function elementIds(elements) {
8
+ return (isAttributeElementsByRef(elements) ? elements.uris : elements.values);
9
+ }
10
+ export function intersectPositiveWithNegativeAttrFilters(positiveAttrFilter, negativeAttrFilter) {
11
+ const normalizedPositiveAttrFilter = normalizeEmptyFilterElements(positiveAttrFilter);
12
+ const attributeElements = normalizedPositiveAttrFilter.positiveAttributeFilter.in;
13
+ //NOTE: Currently in dashboard filters we are not support local identifiers, so we can safely assume that
14
+ // that displayForm is ObjRef
15
+ if (!isObjRef(normalizedPositiveAttrFilter.positiveAttributeFilter.displayForm)) {
16
+ throw new Error("Expected positive attribute filter display form to be ObjRef");
17
+ }
18
+ if (!isAttributeElementsByRef(attributeElements)) {
19
+ return {
20
+ positiveAttributeFilter: {
21
+ displayForm: normalizedPositiveAttrFilter.positiveAttributeFilter.displayForm,
22
+ in: elementIds(attributeElements).filter((identifier) => !negativeAttrFilter.negativeAttributeFilter.notIn.includes(identifier)),
23
+ },
24
+ };
25
+ }
26
+ return {
27
+ positiveAttributeFilter: {
28
+ displayForm: normalizedPositiveAttrFilter.positiveAttributeFilter.displayForm,
29
+ in: elementIds(attributeElements).filter((uri) => !negativeAttrFilter.negativeAttributeFilter.notIn.includes(uri)),
30
+ },
31
+ };
32
+ }
33
+ export function intersectPositiveWithNegativeAttrFilters2(positiveAttrFilter, negativeAttrFilter) {
34
+ const normalizedNegativeAttrFilter = normalizeEmptyFilterElements(negativeAttrFilter);
35
+ const attributeElements = normalizedNegativeAttrFilter.negativeAttributeFilter.notIn;
36
+ if (!isAttributeElementsByRef(attributeElements)) {
37
+ return {
38
+ positiveAttributeFilter: {
39
+ displayForm: positiveAttrFilter.positiveAttributeFilter.displayForm,
40
+ in: positiveAttrFilter.positiveAttributeFilter.in.filter((identifier) => !elementIds(attributeElements).includes(identifier)),
41
+ },
42
+ };
43
+ }
44
+ return {
45
+ positiveAttributeFilter: {
46
+ displayForm: positiveAttrFilter.positiveAttributeFilter.displayForm,
47
+ in: positiveAttrFilter.positiveAttributeFilter.in.filter((uri) => !elementIds(attributeElements).includes(uri)),
48
+ },
49
+ };
50
+ }
51
+ export function intersectFilters(insightAttrFilter, attrFilterContext) {
52
+ const normalizedInsightAttrFilter = normalizeEmptyFilterElements(insightAttrFilter);
53
+ const attributeElements = filterAttributeElements(normalizedInsightAttrFilter);
54
+ if (!isAttributeElementsByRef(attributeElements)) {
55
+ if (isPositiveAttributeFilter(normalizedInsightAttrFilter)) {
56
+ if (isEmbedPositiveAttributeFilter(attrFilterContext)) {
57
+ return {
58
+ positiveAttributeFilter: {
59
+ displayForm: attrFilterContext.positiveAttributeFilter.displayForm,
60
+ in: attrFilterContext.positiveAttributeFilter.in.filter((identifier) => elementIds(attributeElements).includes(identifier)),
61
+ },
62
+ };
63
+ }
64
+ return intersectPositiveWithNegativeAttrFilters(normalizedInsightAttrFilter, attrFilterContext);
65
+ }
66
+ else {
67
+ if (isEmbedNegativeAttributeFilter(attrFilterContext)) {
68
+ return {
69
+ negativeAttributeFilter: {
70
+ displayForm: attrFilterContext.negativeAttributeFilter.displayForm,
71
+ notIn: uniq(elementIds(attributeElements).concat(attrFilterContext.negativeAttributeFilter.notIn)),
72
+ },
73
+ };
74
+ }
75
+ return intersectPositiveWithNegativeAttrFilters2(attrFilterContext, normalizedInsightAttrFilter);
76
+ }
77
+ }
78
+ if (isPositiveAttributeFilter(normalizedInsightAttrFilter)) {
79
+ if (isEmbedPositiveAttributeFilter(attrFilterContext)) {
80
+ return {
81
+ positiveAttributeFilter: {
82
+ displayForm: attrFilterContext.positiveAttributeFilter.displayForm,
83
+ in: attrFilterContext.positiveAttributeFilter.in.filter((uri) => elementIds(attributeElements).includes(uri)),
84
+ },
85
+ };
86
+ }
87
+ return intersectPositiveWithNegativeAttrFilters(normalizedInsightAttrFilter, attrFilterContext);
88
+ }
89
+ else {
90
+ if (isEmbedNegativeAttributeFilter(attrFilterContext)) {
91
+ return {
92
+ negativeAttributeFilter: {
93
+ displayForm: attrFilterContext.negativeAttributeFilter.displayForm,
94
+ notIn: uniq(elementIds(attributeElements).concat(attrFilterContext.negativeAttributeFilter.notIn)),
95
+ },
96
+ };
97
+ }
98
+ return intersectPositiveWithNegativeAttrFilters2(attrFilterContext, normalizedInsightAttrFilter);
99
+ }
100
+ }
101
+ export function areFiltersWithSameElements(insightAttrFilter, attrFilterContext) {
102
+ const normalizedInsightAttrFilter = normalizeEmptyFilterElements(insightAttrFilter);
103
+ const attributeElements = filterAttributeElements(normalizedInsightAttrFilter);
104
+ if (!isAttributeElementsByRef(attributeElements)) {
105
+ if (isPositiveAttributeFilter(normalizedInsightAttrFilter) &&
106
+ isEmbedPositiveAttributeFilter(attrFilterContext)) {
107
+ return (elementIds(attributeElements).length ===
108
+ attrFilterContext.positiveAttributeFilter.in.length &&
109
+ elementIds(attributeElements).every((identifier) => attrFilterContext.positiveAttributeFilter.in.includes(identifier)));
110
+ }
111
+ else if (isNegativeAttributeFilter(normalizedInsightAttrFilter) &&
112
+ isEmbedNegativeAttributeFilter(attrFilterContext)) {
113
+ return (elementIds(attributeElements).length ===
114
+ attrFilterContext.negativeAttributeFilter.notIn.length &&
115
+ elementIds(attributeElements).every((identifier) => attrFilterContext.negativeAttributeFilter.notIn.includes(identifier)));
116
+ }
117
+ return false;
118
+ }
119
+ if (isPositiveAttributeFilter(normalizedInsightAttrFilter) &&
120
+ isEmbedPositiveAttributeFilter(attrFilterContext)) {
121
+ return (elementIds(attributeElements).length === attrFilterContext.positiveAttributeFilter.in.length &&
122
+ elementIds(attributeElements).every((uri) => attrFilterContext.positiveAttributeFilter.in.includes(uri)));
123
+ }
124
+ else if (isNegativeAttributeFilter(normalizedInsightAttrFilter) &&
125
+ isEmbedNegativeAttributeFilter(attrFilterContext)) {
126
+ return (elementIds(attributeElements).length === attrFilterContext.negativeAttributeFilter.notIn.length &&
127
+ elementIds(attributeElements).every((uri) => attrFilterContext.negativeAttributeFilter.notIn.includes(uri)));
128
+ }
129
+ return false;
130
+ }
131
+ /**
132
+ * Empty attribute filters by value and by uri are same, so we want to sometimes normalize them to uris.
133
+ * If filter is not empty it can't be normalized, so same filter is returned
134
+ * @param filter -
135
+ * @returns empty filter with uri elements or original filter
136
+ */
137
+ function normalizeEmptyFilterElements(filter) {
138
+ const attributeElements = filterAttributeElements(filter);
139
+ if (filterIsEmpty(filter) && isAttributeElementsByValue(attributeElements)) {
140
+ if (isPositiveAttributeFilter(filter) && isObjRef(filter.positiveAttributeFilter.displayForm)) {
141
+ return newPositiveAttributeFilter(filter.positiveAttributeFilter.displayForm, { uris: [] });
142
+ }
143
+ if (isNegativeAttributeFilter(filter) && isObjRef(filter.negativeAttributeFilter.displayForm)) {
144
+ return newNegativeAttributeFilter(filter.negativeAttributeFilter.displayForm, { uris: [] });
145
+ }
146
+ throw new Error("Invariant: expected positive or negative filter");
147
+ }
148
+ return filter;
149
+ }
@@ -0,0 +1,26 @@
1
+ import { type IAnalyticalBackend, type IBackendCapabilities } from "@gooddata/sdk-backend-spi";
2
+ import { type AttributeFilterItem, type DateFilterItem, type IMeasureValueFilter as IEmbeddingMeasureValueFilter } from "@gooddata/sdk-embedding";
3
+ import { type ICatalogAttribute, type IDashboardDateFilter, type IDashboardMeasureValueFilter, type IFilter, type IInsight, type IInsightWidget, type ObjRef } from "@gooddata/sdk-model";
4
+ export type InsightEditorFilterItem = DateFilterItem | AttributeFilterItem | IEmbeddingMeasureValueFilter;
5
+ export interface IInsightEditorFilterContextInput {
6
+ widget: IInsightWidget;
7
+ insight: IInsight;
8
+ appliedFilters: IFilter[];
9
+ availableAttributes: ICatalogAttribute[];
10
+ attributeFilterConfigsDisplayAsLabelMap: Map<string, ObjRef> | undefined;
11
+ capabilities: IBackendCapabilities;
12
+ dateFilter: IDashboardDateFilter | undefined;
13
+ isMeasureValueFilterEnabled: boolean;
14
+ measureValueFilters: IDashboardMeasureValueFilter[];
15
+ }
16
+ /**
17
+ * Builds the filters that the explore flow passes to Analytical Designer, so the explored insight
18
+ * shows the same data as the widget on the dashboard.
19
+ */
20
+ export declare function buildInsightEditorFilterContext(input: IInsightEditorFilterContextInput): InsightEditorFilterItem[];
21
+ /**
22
+ * Loads the attributes that can filter the insight. Dashboard filters on other attributes do not
23
+ * pass to Analytical Designer.
24
+ */
25
+ export declare function loadInsightAvailableAttributes(backend: IAnalyticalBackend, workspace: string, insight: IInsight, enableComputedAttributes: boolean): Promise<ICatalogAttribute[]>;
26
+ //# sourceMappingURL=insightFilterContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insightFilterContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/insightFilterContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,mBAAmB,IAAI,4BAA4B,EAC3D,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEb,KAAK,cAAc,EACnB,KAAK,MAAM,EAEd,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,mBAAmB,GAAG,4BAA4B,CAAC;AAE1G,MAAM,WAAW,gCAAgC;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,QAAQ,CAAC;IAClB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;IACzC,uCAAuC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACzE,YAAY,EAAE,oBAAoB,CAAC;IACnC,UAAU,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC7C,2BAA2B,EAAE,OAAO,CAAC;IACrC,mBAAmB,EAAE,4BAA4B,EAAE,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,gCAAgC,GACxC,uBAAuB,EAAE,CAoB3B;AAKD;;;GAGG;AACH,wBAAsB,8BAA8B,CAChD,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,QAAQ,EACjB,wBAAwB,EAAE,OAAO,GAClC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAa9B"}
@@ -0,0 +1,72 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { compact } from "lodash-es";
3
+ import { catalogComputedAttributeAsCatalogAttribute, } from "@gooddata/sdk-model";
4
+ import { isComputedAttributesUnavailableError } from "../../../_staging/catalog/computedAttributes.js";
5
+ import { getAttributeFilterItems } from "./attributeFilters.js";
6
+ import { getDateFilterItems, getWidgetDateFilterItem } from "./dateFilters.js";
7
+ import { filterDashboardMvfsForWidget, toMeasureValueFilterItems } from "./measureValueFilters.js";
8
+ /**
9
+ * Builds the filters that the explore flow passes to Analytical Designer, so the explored insight
10
+ * shows the same data as the widget on the dashboard.
11
+ */
12
+ export function buildInsightEditorFilterContext(input) {
13
+ const { widget, insight, appliedFilters, capabilities } = input;
14
+ const attributeFilters = getAttributeFilterItems(appliedFilters, insight, input.availableAttributes, input.attributeFilterConfigsDisplayAsLabelMap, !!capabilities.supportsElementUris);
15
+ const measureValueFilters = input.isMeasureValueFilterEnabled
16
+ ? toMeasureValueFilterItems(filterDashboardMvfsForWidget(widget, input.measureValueFilters, insight))
17
+ : [];
18
+ const dateFilters = capabilities.supportsMultipleDateFilters
19
+ ? getDateFilterItems(appliedFilters, insight)
20
+ : compact([getWidgetDateFilterItem(widget, input.dateFilter)]);
21
+ return [...dateFilters, ...attributeFilters, ...measureValueFilters];
22
+ }
23
+ // The production dataset needs no ref. Its presence is represented by undefined.
24
+ const PRODUCTION_DATASET_REF = undefined;
25
+ /**
26
+ * Loads the attributes that can filter the insight. Dashboard filters on other attributes do not
27
+ * pass to Analytical Designer.
28
+ */
29
+ export async function loadInsightAvailableAttributes(backend, workspace, insight, enableComputedAttributes) {
30
+ const nonDateDataSetRefs = await getNonDateDataSetRefs(backend, workspace, insight);
31
+ // Computed attributes load separately, so they can never fail a plain attributes request.
32
+ // The listing is skipped when the setting is off: the backend then refuses it (400).
33
+ const loads = [
34
+ ...nonDateDataSetRefs.map((dataSetRef) => loadDataSetAttributes(backend, workspace, dataSetRef, insight)),
35
+ ...(enableComputedAttributes ? [loadComputedAttributes(backend, workspace, insight)] : []),
36
+ ];
37
+ const attributesPerDataSet = await Promise.all(loads);
38
+ return attributesPerDataSet.flat();
39
+ }
40
+ async function getNonDateDataSetRefs(backend, workspace, insight) {
41
+ if (!backend.capabilities.supportsNonProductionDatasets) {
42
+ return [PRODUCTION_DATASET_REF];
43
+ }
44
+ const referencedObjects = await backend
45
+ .workspace(workspace)
46
+ .insights()
47
+ .getInsightReferencedObjects(insight, ["dataSet"]);
48
+ const dataSetMeta = referencedObjects.dataSetMeta ?? [];
49
+ const nonProductionRefs = dataSetMeta.filter((meta) => !meta.production).map((meta) => meta.ref);
50
+ const containsProduction = dataSetMeta.some((meta) => meta.production);
51
+ return containsProduction ? [PRODUCTION_DATASET_REF, ...nonProductionRefs] : nonProductionRefs;
52
+ }
53
+ async function loadDataSetAttributes(backend, workspace, dataSetRef, insight) {
54
+ const loader = backend.workspace(workspace).catalog().forTypes(["attribute"]);
55
+ const catalog = await (dataSetRef ? loader.forDataset(dataSetRef) : loader.withOptions({ production: true })).load();
56
+ const availableItems = await catalog.availableItems().forInsight(insight).load();
57
+ return availableItems.availableAttributes();
58
+ }
59
+ async function loadComputedAttributes(backend, workspace, insight) {
60
+ try {
61
+ const catalog = await backend.workspace(workspace).catalog().forTypes(["computedAttribute"]).load();
62
+ const availableItems = await catalog.availableItems().forInsight(insight).load();
63
+ return availableItems.availableComputedAttributes().map(catalogComputedAttributeAsCatalogAttribute);
64
+ }
65
+ catch (error) {
66
+ // Degrade only when computed attributes are not available. A genuine failure propagates.
67
+ if (isComputedAttributesUnavailableError(error)) {
68
+ return [];
69
+ }
70
+ throw error;
71
+ }
72
+ }
@@ -0,0 +1,20 @@
1
+ import { type IMeasureValueFilter as IEmbeddingMeasureValueFilter } from "@gooddata/sdk-embedding";
2
+ import { type IDashboardMeasureValueFilter, type IInsight, type IInsightWidget } from "@gooddata/sdk-model";
3
+ /**
4
+ * Drops dashboard MVFs the widget is configured to ignore (mirrors `resolveDashboardMeasureValueFilters`
5
+ * in `queryWidgetFilters`) and emits a `console.warn` when the insight already has its own MVF on the
6
+ * same metric. The dashboard MVF is still emitted in the overlap case — both filters apply via logical
7
+ * AND at execution and warning keeps parity with that runtime behavior so the embedding caller can
8
+ * observe the clash without changing semantics.
9
+ */
10
+ export declare function filterDashboardMvfsForWidget(widget: IInsightWidget, dashboardMvfs: IDashboardMeasureValueFilter[], insight: IInsight | undefined): IDashboardMeasureValueFilter[];
11
+ /**
12
+ * Converts dashboard measure value filters to the embedding {@link IEmbeddingMeasureValueFilter}
13
+ * format used by the AD `SetFilterContext` command. The target measure is forwarded as the
14
+ * catalog identifier (Tiger; URI refs are unsupported and such MVFs are skipped). Each filter
15
+ * carries its dashboard `localIdentifier` so AD can disambiguate individual filter instances
16
+ * (currently the dashboard model permits at most one MVF per metric, but `localIdentifier`
17
+ * is part of the contract in preparation for multi-MVF-per-metric support).
18
+ */
19
+ export declare function toMeasureValueFilterItems(dashboardMvfs: IDashboardMeasureValueFilter[]): IEmbeddingMeasureValueFilter[];
20
+ //# sourceMappingURL=measureValueFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measureValueFilters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/measureValueFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,QAAQ,EACb,KAAK,cAAc,EAetB,MAAM,qBAAqB,CAAC;AAkB7B;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CACxC,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,4BAA4B,EAAE,EAC7C,OAAO,EAAE,QAAQ,GAAG,SAAS,GAC9B,4BAA4B,EAAE,CAgChC;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACrC,aAAa,EAAE,4BAA4B,EAAE,GAC9C,4BAA4B,EAAE,CAmBhC"}
@@ -0,0 +1,76 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { areObjRefsEqual, dashboardFilterObjRef, insightFilters, insightMeasures, isDashboardMeasureValueFilterReference, isIdentifierRef, isLocalIdRef, isMeasureValueFilter, measureItem, measureLocalId, measureValueFilterMeasure, objRefToString, } from "@gooddata/sdk-model";
3
+ /**
4
+ * Resolves the metric ObjRef behind an insight MVF's measure reference. Insight MVFs reference
5
+ * their target measure either directly (`ObjRef`) or via a bucket-local id (`LocalIdRef`); the
6
+ * latter must be looked up in the insight's measures and mapped to the catalog `ObjRef` carried
7
+ * on the simple measure definition. Returns `undefined` when the local id does not resolve or
8
+ * the matched measure is non-simple (arithmetic, previous-period, …) and therefore has no LDM
9
+ * item to compare against.
10
+ */
11
+ function resolveInsightMvfMetric(ref, insight) {
12
+ if (!isLocalIdRef(ref)) {
13
+ return ref;
14
+ }
15
+ const matched = insightMeasures(insight).find((m) => measureLocalId(m) === ref.localIdentifier);
16
+ return matched ? measureItem(matched) : undefined;
17
+ }
18
+ /**
19
+ * Drops dashboard MVFs the widget is configured to ignore (mirrors `resolveDashboardMeasureValueFilters`
20
+ * in `queryWidgetFilters`) and emits a `console.warn` when the insight already has its own MVF on the
21
+ * same metric. The dashboard MVF is still emitted in the overlap case — both filters apply via logical
22
+ * AND at execution and warning keeps parity with that runtime behavior so the embedding caller can
23
+ * observe the clash without changing semantics.
24
+ */
25
+ export function filterDashboardMvfsForWidget(widget, dashboardMvfs, insight) {
26
+ const ignoredRefs = widget.ignoreDashboardFilters?.filter(isDashboardMeasureValueFilterReference) ?? [];
27
+ const widgetEffective = ignoredRefs.length === 0
28
+ ? dashboardMvfs
29
+ : dashboardMvfs.filter((mvf) => !ignoredRefs.some((ref) => areObjRefsEqual(ref.measure, dashboardFilterObjRef(mvf))));
30
+ // Insight MVFs may reference their measure by LocalIdRef (bucket-local) — resolve those to the
31
+ // catalog ObjRef via the insight's measures so we can compare against dashboard MVFs (which
32
+ // always reference the catalog metric directly).
33
+ const insightMvfMetrics = insight
34
+ ? insightFilters(insight)
35
+ .filter(isMeasureValueFilter)
36
+ .map((f) => resolveInsightMvfMetric(measureValueFilterMeasure(f), insight))
37
+ .filter((ref) => ref !== undefined)
38
+ : [];
39
+ if (insightMvfMetrics.length > 0) {
40
+ widgetEffective.forEach((mvf) => {
41
+ const dashMeasure = dashboardFilterObjRef(mvf);
42
+ if (insightMvfMetrics.some((m) => areObjRefsEqual(m, dashMeasure))) {
43
+ console.warn(`Dashboard MVF on metric ${objRefToString(dashMeasure)} overlaps with an insight-level MVF on the same metric; both will be transferred to AD and applied together.`);
44
+ }
45
+ });
46
+ }
47
+ return widgetEffective;
48
+ }
49
+ /**
50
+ * Converts dashboard measure value filters to the embedding {@link IEmbeddingMeasureValueFilter}
51
+ * format used by the AD `SetFilterContext` command. The target measure is forwarded as the
52
+ * catalog identifier (Tiger; URI refs are unsupported and such MVFs are skipped). Each filter
53
+ * carries its dashboard `localIdentifier` so AD can disambiguate individual filter instances
54
+ * (currently the dashboard model permits at most one MVF per metric, but `localIdentifier`
55
+ * is part of the contract in preparation for multi-MVF-per-metric support).
56
+ */
57
+ export function toMeasureValueFilterItems(dashboardMvfs) {
58
+ if (!dashboardMvfs.length) {
59
+ return [];
60
+ }
61
+ return dashboardMvfs.flatMap((mvf) => {
62
+ const { measure, localIdentifier, conditions } = mvf.dashboardMeasureValueFilter;
63
+ if (!isIdentifierRef(measure)) {
64
+ return [];
65
+ }
66
+ return [
67
+ {
68
+ measureValueFilter: {
69
+ measure: { identifier: measure.identifier },
70
+ localIdentifier,
71
+ ...(conditions && conditions.length > 0 ? { conditions } : {}),
72
+ },
73
+ },
74
+ ];
75
+ });
76
+ }
@@ -0,0 +1,11 @@
1
+ import { type IObjIdentifierQualifier } from "@gooddata/sdk-embedding";
2
+ import { type ObjRef } from "@gooddata/sdk-model";
3
+ /**
4
+ * Converts a model ref to the identifier qualifier of the embedding API.
5
+ *
6
+ * The ref type is kept: it is the only thing telling a computed attribute reference from a label
7
+ * reference (a computed attribute has no labels and is referenced directly), so dropping it would make
8
+ * a filter on a computed attribute indistinguishable from a filter on a label of the same identifier.
9
+ */
10
+ export declare function toObjIdentifierQualifier(ref: ObjRef): IObjIdentifierQualifier;
11
+ //# sourceMappingURL=objQualifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objQualifiers.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/objQualifiers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,qBAAqB,CAAC;AAEnE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAQ7E"}
@@ -0,0 +1,18 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { isIdentifierRef } from "@gooddata/sdk-model";
3
+ /**
4
+ * Converts a model ref to the identifier qualifier of the embedding API.
5
+ *
6
+ * The ref type is kept: it is the only thing telling a computed attribute reference from a label
7
+ * reference (a computed attribute has no labels and is referenced directly), so dropping it would make
8
+ * a filter on a computed attribute indistinguishable from a filter on a label of the same identifier.
9
+ */
10
+ export function toObjIdentifierQualifier(ref) {
11
+ if (isIdentifierRef(ref)) {
12
+ return {
13
+ identifier: ref.identifier,
14
+ ...(ref.type ? { type: ref.type } : {}),
15
+ };
16
+ }
17
+ throw new Error("Expected identifier ref");
18
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Tells whether the insight overlay is the TOPMOST open ui-kit overlay in the document.
3
+ *
4
+ * With AD running in-process, its nested UI (filter dropdowns, save dialogs, tooltips) portals
5
+ * into the same document as this overlay. Every ui-kit Overlay with closeOnEscape listens on
6
+ * window with no stack awareness, so a single Escape aimed at a nested AD dropdown would also
7
+ * cancel the whole editing session (the iframe transport used to shield this — AD key events
8
+ * never left the iframe document). That is why the insight overlay handles Escape itself, gated
9
+ * by this check.
10
+ *
11
+ * Overlay portals append to document.body in mount order, so the last .gd-overlay-content node is
12
+ * the topmost overlay; the insight overlay may only close itself when that node is its own.
13
+ * Nested overlays unmount asynchronously (React re-render), so during the very Escape press that
14
+ * closes a nested overlay this still sees its node and correctly skips — Escape peels one layer
15
+ * per press.
16
+ */
17
+ export declare function isInsightOverlayTopmost(doc?: Document): boolean;
18
+ //# sourceMappingURL=insightEditorEscapeGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insightEditorEscapeGuard.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/insightEditorEscapeGuard.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,QAAmB,GAAG,OAAO,CAIzE"}
@@ -0,0 +1,24 @@
1
+ // (C) 2026 GoodData Corporation
2
+ const OVERLAY_CONTENT_SELECTOR = ".gd-overlay-content";
3
+ const INSIGHT_OVERLAY_CONTENT_SELECTOR = ".s-edit-insight-overlay-content";
4
+ /**
5
+ * Tells whether the insight overlay is the TOPMOST open ui-kit overlay in the document.
6
+ *
7
+ * With AD running in-process, its nested UI (filter dropdowns, save dialogs, tooltips) portals
8
+ * into the same document as this overlay. Every ui-kit Overlay with closeOnEscape listens on
9
+ * window with no stack awareness, so a single Escape aimed at a nested AD dropdown would also
10
+ * cancel the whole editing session (the iframe transport used to shield this — AD key events
11
+ * never left the iframe document). That is why the insight overlay handles Escape itself, gated
12
+ * by this check.
13
+ *
14
+ * Overlay portals append to document.body in mount order, so the last .gd-overlay-content node is
15
+ * the topmost overlay; the insight overlay may only close itself when that node is its own.
16
+ * Nested overlays unmount asynchronously (React re-render), so during the very Escape press that
17
+ * closes a nested overlay this still sees its node and correctly skips — Escape peels one layer
18
+ * per press.
19
+ */
20
+ export function isInsightOverlayTopmost(doc = document) {
21
+ const contents = doc.querySelectorAll(OVERLAY_CONTENT_SELECTOR);
22
+ const topmost = contents[contents.length - 1];
23
+ return !!topmost?.querySelector(INSIGHT_OVERLAY_CONTENT_SELECTOR);
24
+ }
@@ -0,0 +1,34 @@
1
+ import { type ObjRef } from "@gooddata/sdk-model";
2
+ import { type InsightEditorTarget } from "../../model/types/insightEditorTypes.js";
3
+ type HiddenAction = "open" | "clear" | "export" | "save" | "saveAs" | "openInAnalyticalDesigner";
4
+ export interface IInsightEditorRouteInput {
5
+ target: InsightEditorTarget;
6
+ /**
7
+ * The insight of the widget target. Undefined for the other targets, or when the widget has no
8
+ * insight.
9
+ */
10
+ widgetInsightRef: ObjRef | undefined;
11
+ isWidgetInsightLocked: boolean;
12
+ dashboardId: string | undefined;
13
+ isEditMode: boolean;
14
+ isEmbedded: boolean;
15
+ canManageWorkspace: boolean;
16
+ canCreateVisualization: boolean;
17
+ }
18
+ /**
19
+ * The part of the Analytical Designer props that selects the flow: edit, explore or create.
20
+ */
21
+ export interface IInsightEditorRoute {
22
+ insight: ObjRef | undefined;
23
+ config: {
24
+ isEmbedded: boolean;
25
+ hiddenActions: HiddenAction[];
26
+ displayedActions?: Array<"cancel">;
27
+ sourceDashboard?: string;
28
+ sourceInsight?: ObjRef;
29
+ allowDashboardLinks?: boolean;
30
+ };
31
+ }
32
+ export declare function getInsightEditorRoute(input: IInsightEditorRouteInput): IInsightEditorRoute;
33
+ export {};
34
+ //# sourceMappingURL=insightEditorRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insightEditorRoute.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/insightEditorRoute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,0BAA0B,CAAC;AAEjG,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE;QACJ,UAAU,EAAE,OAAO,CAAC;QACpB,aAAa,EAAE,YAAY,EAAE,CAAC;QAC9B,gBAAgB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACnC,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KACjC,CAAC;CACL;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,CAiD1F"}
@@ -0,0 +1,48 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ export function getInsightEditorRoute(input) {
3
+ const { target, widgetInsightRef, isEditMode, isEmbedded } = input;
4
+ const externalInsightRef = target.type === "insight" ? target.ref : undefined;
5
+ const isEmbeddedFromDashboard = !isEmbedded;
6
+ if (externalInsightRef || (widgetInsightRef && isEditMode)) {
7
+ const hiddenActions = ["open", "clear", "export"];
8
+ const canSaveInsight = input.canManageWorkspace || !input.isWidgetInsightLocked;
9
+ if (!canSaveInsight) {
10
+ hiddenActions.push("save");
11
+ }
12
+ else if (!input.canCreateVisualization) {
13
+ hiddenActions.push("saveAs");
14
+ }
15
+ if (isEmbedded) {
16
+ hiddenActions.push("openInAnalyticalDesigner");
17
+ }
18
+ return {
19
+ insight: externalInsightRef ?? widgetInsightRef,
20
+ config: {
21
+ isEmbedded: isEmbeddedFromDashboard,
22
+ hiddenActions,
23
+ // The presence of the source dashboard starts the edit-from-dashboard flow in AD. A
24
+ // dashboard that was never saved has no identifier, so an empty string marks it.
25
+ sourceDashboard: input.dashboardId ?? "",
26
+ allowDashboardLinks: !isEmbedded,
27
+ },
28
+ };
29
+ }
30
+ if (widgetInsightRef) {
31
+ return {
32
+ insight: undefined,
33
+ config: {
34
+ isEmbedded: isEmbeddedFromDashboard,
35
+ hiddenActions: ["saveAs"],
36
+ sourceInsight: widgetInsightRef,
37
+ },
38
+ };
39
+ }
40
+ return {
41
+ insight: undefined,
42
+ config: {
43
+ isEmbedded: isEmbeddedFromDashboard,
44
+ hiddenActions: ["open", "export", "saveAs"],
45
+ displayedActions: ["cancel"],
46
+ },
47
+ };
48
+ }
@@ -0,0 +1,7 @@
1
+ export interface IInsightEditorCloseHandle {
2
+ /**
3
+ * Asks Analytical Designer to close. It confirms unsaved changes first.
4
+ */
5
+ requestClose: () => void;
6
+ }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ // (C) 2026 GoodData Corporation
2
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tells whether the user can create a new insight in the embedded Analytical Designer.
3
+ */
4
+ export declare function useCanCreateInsightInEditor(): boolean;
5
+ //# sourceMappingURL=useCanCreateInsightInEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCanCreateInsightInEditor.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/useCanCreateInsightInEditor.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAMrD"}
@@ -0,0 +1,14 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useDashboardSelector } from "../../model/react/DashboardStoreProvider.js";
3
+ import { selectEnableInsightEditing, selectSettings } from "../../model/store/config/configSelectors.js";
4
+ import { selectCanCreateVisualization } from "../../model/store/permissions/permissionsSelectors.js";
5
+ /**
6
+ * Tells whether the user can create a new insight in the embedded Analytical Designer.
7
+ */
8
+ export function useCanCreateInsightInEditor() {
9
+ const isEnabled = useDashboardSelector(selectEnableInsightEditing);
10
+ const settings = useDashboardSelector(selectSettings);
11
+ const canCreateVisualization = useDashboardSelector(selectCanCreateVisualization);
12
+ const isNewInsightEnabled = settings?.["enableKPIDashboardNewInsight"] ?? true;
13
+ return isEnabled && !!isNewInsightEnabled && canCreateVisualization;
14
+ }
@@ -0,0 +1,21 @@
1
+ import { type RefObject } from "react";
2
+ import { type ICommandFailedBody } from "@gooddata/sdk-embedding";
3
+ import type { IAnalyticalDesignerApi } from "@gooddata/sdk-ui-analytical-designer";
4
+ import { type InsightEditorTarget } from "../../model/types/insightEditorTypes.js";
5
+ export interface IExploreFilterTransfer {
6
+ onInsightOpened: () => void;
7
+ onInsightRendered: () => void;
8
+ onCommandFailed: (data: ICommandFailedBody, contextId?: string) => void;
9
+ }
10
+ /**
11
+ * Passes the dashboard filters and timezone of the explored widget to Analytical Designer, so the
12
+ * explored insight shows the same data as the widget.
13
+ *
14
+ * @remarks
15
+ * The transfer starts when Analytical Designer opens the insight, before its first execution ends.
16
+ * When Analytical Designer is not ready yet (its date datasets still load), the command fails and the
17
+ * transfer retries until it succeeds or takes too long. The rendered insight starts the transfer again
18
+ * if the retries stopped too early.
19
+ */
20
+ export declare function useExploreFilterTransfer(target: InsightEditorTarget, isExplore: boolean, apiRef: RefObject<IAnalyticalDesignerApi | null>): IExploreFilterTransfer;
21
+ //# sourceMappingURL=useExploreFilterTransfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExploreFilterTransfer.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/useExploreFilterTransfer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAIhF,OAAO,EAKH,KAAK,kBAAkB,EAC1B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAoBnF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAmBnF,MAAM,WAAW,sBAAsB;IACnC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAC,GACjD,sBAAsB,CAsLxB"}