@gooddata/sdk-ui-dashboard 10.15.0-alpha.0 → 10.15.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 (278) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.d.ts.map +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/__version.js.map +1 -1
  5. package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts.map +1 -1
  6. package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +9 -2
  7. package/esm/model/commandHandlers/dashboard/common/stateInitializers.js.map +1 -1
  8. package/esm/model/commandHandlers/drill/common/intersectionUtils.d.ts.map +1 -1
  9. package/esm/model/commandHandlers/drill/common/intersectionUtils.js +2 -2
  10. package/esm/model/commandHandlers/drill/common/intersectionUtils.js.map +1 -1
  11. package/esm/model/commandHandlers/drill/crossFilteringHandler.d.ts.map +1 -1
  12. package/esm/model/commandHandlers/drill/crossFilteringHandler.js +4 -2
  13. package/esm/model/commandHandlers/drill/crossFilteringHandler.js.map +1 -1
  14. package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
  15. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +4 -3
  16. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js.map +1 -1
  17. package/esm/model/index.d.ts +2 -2
  18. package/esm/model/index.d.ts.map +1 -1
  19. package/esm/model/index.js +1 -1
  20. package/esm/model/index.js.map +1 -1
  21. package/esm/model/queryServices/queryWidgetFilters.d.ts.map +1 -1
  22. package/esm/model/queryServices/queryWidgetFilters.js +2 -2
  23. package/esm/model/queryServices/queryWidgetFilters.js.map +1 -1
  24. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts +1 -1
  25. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.d.ts +1 -1
  26. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js +2 -2
  27. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js.map +1 -1
  28. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsFilters.d.ts +2 -2
  29. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsFilters.d.ts.map +1 -1
  30. package/esm/model/react/useDasboardScheduledEmails/useFiltersForWidgetScheduledExport.d.ts +2 -2
  31. package/esm/model/react/useDasboardScheduledEmails/useFiltersForWidgetScheduledExport.d.ts.map +1 -1
  32. package/esm/model/react/useWidgetFilters.d.ts +2 -2
  33. package/esm/model/react/useWidgetFilters.d.ts.map +1 -1
  34. package/esm/model/react/useWidgetFilters.js.map +1 -1
  35. package/esm/model/store/_infra/generators.d.ts +3 -0
  36. package/esm/model/store/_infra/generators.d.ts.map +1 -0
  37. package/esm/model/store/_infra/generators.js +6 -0
  38. package/esm/model/store/_infra/generators.js.map +1 -0
  39. package/esm/model/store/filterContext/filterContextReducers.d.ts.map +1 -1
  40. package/esm/model/store/filterContext/filterContextReducers.js +5 -5
  41. package/esm/model/store/filterContext/filterContextReducers.js.map +1 -1
  42. package/esm/model/store/layout/layoutSelectors.d.ts +1 -1
  43. package/esm/model/store/layout/layoutSelectors.d.ts.map +1 -1
  44. package/esm/model/store/layout/layoutSelectors.js +6 -3
  45. package/esm/model/store/layout/layoutSelectors.js.map +1 -1
  46. package/esm/model/store/layout/layoutUtils.d.ts +1 -1
  47. package/esm/model/store/layout/layoutUtils.d.ts.map +1 -1
  48. package/esm/model/types/layoutTypes.d.ts +22 -2
  49. package/esm/model/types/layoutTypes.d.ts.map +1 -1
  50. package/esm/model/types/layoutTypes.js +9 -2
  51. package/esm/model/types/layoutTypes.js.map +1 -1
  52. package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
  53. package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +2 -2
  54. package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js.map +1 -1
  55. package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/Alert.d.ts.map +1 -1
  56. package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/Alert.js +2 -2
  57. package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/Alert.js.map +1 -1
  58. package/esm/presentation/componentDefinition/types.d.ts +28 -5
  59. package/esm/presentation/componentDefinition/types.d.ts.map +1 -1
  60. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts +2 -1
  61. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
  62. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +8 -2
  63. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js.map +1 -1
  64. package/esm/presentation/dashboard/DashboardSidebar/DashboardSidebar.d.ts.map +1 -1
  65. package/esm/presentation/dashboard/DashboardSidebar/DashboardSidebar.js +2 -2
  66. package/esm/presentation/dashboard/DashboardSidebar/DashboardSidebar.js.map +1 -1
  67. package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.d.ts.map +1 -1
  68. package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.js +2 -2
  69. package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.js.map +1 -1
  70. package/esm/presentation/dashboard/DashboardSidebar/types.d.ts +8 -1
  71. package/esm/presentation/dashboard/DashboardSidebar/types.d.ts.map +1 -1
  72. package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.d.ts.map +1 -1
  73. package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.js +2 -0
  74. package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.js.map +1 -1
  75. package/esm/presentation/dashboard/components/DashboardMainContent.d.ts.map +1 -1
  76. package/esm/presentation/dashboard/components/DashboardMainContent.js +2 -0
  77. package/esm/presentation/dashboard/components/DashboardMainContent.js.map +1 -1
  78. package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
  79. package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
  80. package/esm/presentation/dashboard/components/DashboardRenderer.js.map +1 -1
  81. package/esm/presentation/dashboard/hooks/useDashboard.d.ts +4 -2
  82. package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
  83. package/esm/presentation/dashboard/hooks/useDashboard.js +11 -2
  84. package/esm/presentation/dashboard/hooks/useDashboard.js.map +1 -1
  85. package/esm/presentation/dashboard/types.d.ts +13 -1
  86. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  87. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -1
  88. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
  89. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -0
  90. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js.map +1 -1
  91. package/esm/presentation/dashboardContexts/types.d.ts +11 -3
  92. package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
  93. package/esm/presentation/dragAndDrop/DragLayerPreview/ContentDragPreview.d.ts.map +1 -1
  94. package/esm/presentation/dragAndDrop/DragLayerPreview/ContentDragPreview.js +3 -1
  95. package/esm/presentation/dragAndDrop/DragLayerPreview/ContentDragPreview.js.map +1 -1
  96. package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts +3 -0
  97. package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts.map +1 -0
  98. package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js +25 -0
  99. package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js.map +1 -0
  100. package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.js +1 -1
  101. package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.js.map +1 -1
  102. package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js +3 -3
  103. package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js.map +1 -1
  104. package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.d.ts +4 -0
  105. package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.d.ts.map +1 -0
  106. package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.js +10 -0
  107. package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.js.map +1 -0
  108. package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.d.ts +16 -0
  109. package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.d.ts.map +1 -0
  110. package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.js +21 -0
  111. package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.js.map +1 -0
  112. package/esm/presentation/dragAndDrop/draggableWidget/DraggableVisualizationSwitcherCreatePanelItem.d.ts +2 -2
  113. package/esm/presentation/dragAndDrop/draggableWidget/DraggableVisualizationSwitcherCreatePanelItem.d.ts.map +1 -1
  114. package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.d.ts.map +1 -1
  115. package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.js +11 -1
  116. package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.js.map +1 -1
  117. package/esm/presentation/dragAndDrop/draggableWidget/Hotspot.d.ts.map +1 -1
  118. package/esm/presentation/dragAndDrop/draggableWidget/Hotspot.js +10 -1
  119. package/esm/presentation/dragAndDrop/draggableWidget/Hotspot.js.map +1 -1
  120. package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.d.ts.map +1 -1
  121. package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.js +9 -1
  122. package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.js.map +1 -1
  123. package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.d.ts.map +1 -1
  124. package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.js +11 -1
  125. package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.js.map +1 -1
  126. package/esm/presentation/dragAndDrop/draggableWidget/index.d.ts +3 -0
  127. package/esm/presentation/dragAndDrop/draggableWidget/index.d.ts.map +1 -1
  128. package/esm/presentation/dragAndDrop/draggableWidget/index.js +3 -0
  129. package/esm/presentation/dragAndDrop/draggableWidget/index.js.map +1 -1
  130. package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.d.ts +2 -0
  131. package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.d.ts.map +1 -0
  132. package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.js +39 -0
  133. package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.js.map +1 -0
  134. package/esm/presentation/dragAndDrop/draggableWidget/useIsDraggingWidget.d.ts.map +1 -1
  135. package/esm/presentation/dragAndDrop/draggableWidget/useIsDraggingWidget.js +2 -0
  136. package/esm/presentation/dragAndDrop/draggableWidget/useIsDraggingWidget.js.map +1 -1
  137. package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.d.ts +2 -0
  138. package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.d.ts.map +1 -0
  139. package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.js +46 -0
  140. package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.js.map +1 -0
  141. package/esm/presentation/dragAndDrop/types.d.ts +25 -3
  142. package/esm/presentation/dragAndDrop/types.d.ts.map +1 -1
  143. package/esm/presentation/dragAndDrop/types.js +12 -0
  144. package/esm/presentation/dragAndDrop/types.js.map +1 -1
  145. package/esm/presentation/dragAndDrop/useDashboardDragScroll.d.ts.map +1 -1
  146. package/esm/presentation/dragAndDrop/useDashboardDragScroll.js +2 -0
  147. package/esm/presentation/dragAndDrop/useDashboardDragScroll.js.map +1 -1
  148. package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +2 -2
  149. package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js.map +1 -1
  150. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilterComponentSetFactory.js +1 -1
  151. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilterComponentSetFactory.js.map +1 -1
  152. package/esm/presentation/flexibleLayout/DashboardLayoutWidget.d.ts.map +1 -1
  153. package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js +13 -2
  154. package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js.map +1 -1
  155. package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.d.ts.map +1 -1
  156. package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.js +2 -1
  157. package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.js.map +1 -1
  158. package/esm/presentation/flexibleLayout/index.d.ts +1 -1
  159. package/esm/presentation/flexibleLayout/index.d.ts.map +1 -1
  160. package/esm/presentation/flexibleLayout/index.js +1 -1
  161. package/esm/presentation/flexibleLayout/index.js.map +1 -1
  162. package/esm/presentation/flexibleLayout/types.d.ts +1 -20
  163. package/esm/presentation/flexibleLayout/types.d.ts.map +1 -1
  164. package/esm/presentation/layout/DashboardLayoutWidget.d.ts.map +1 -1
  165. package/esm/presentation/layout/DashboardLayoutWidget.js +13 -2
  166. package/esm/presentation/layout/DashboardLayoutWidget.js.map +1 -1
  167. package/esm/presentation/localization/bundles/en-AU.json +27 -27
  168. package/esm/presentation/localization/bundles/en-GB.json +15 -15
  169. package/esm/presentation/localization/bundles/en-US.json +10 -0
  170. package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
  171. package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +3 -3
  172. package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js.map +1 -1
  173. package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.d.ts +7 -0
  174. package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.d.ts.map +1 -0
  175. package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.js +13 -0
  176. package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.js.map +1 -0
  177. package/esm/presentation/{flexibleLayout → widget/dashboardLayout}/DashboardLayout.d.ts +1 -1
  178. package/esm/presentation/widget/dashboardLayout/DashboardLayout.d.ts.map +1 -0
  179. package/esm/presentation/{flexibleLayout → widget/dashboardLayout}/DashboardLayout.js +1 -1
  180. package/esm/presentation/widget/dashboardLayout/DashboardLayout.js.map +1 -0
  181. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.d.ts +8 -0
  182. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.d.ts.map +1 -0
  183. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.js +13 -0
  184. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.js.map +1 -0
  185. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.d.ts +7 -0
  186. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.d.ts.map +1 -0
  187. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.js +24 -0
  188. package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.js.map +1 -0
  189. package/esm/presentation/widget/dashboardLayout/index.d.ts +4 -0
  190. package/esm/presentation/widget/dashboardLayout/index.d.ts.map +1 -0
  191. package/esm/presentation/widget/dashboardLayout/index.js +4 -0
  192. package/esm/presentation/widget/dashboardLayout/index.js.map +1 -0
  193. package/esm/presentation/widget/dashboardLayout/types.d.ts +55 -0
  194. package/esm/presentation/widget/dashboardLayout/types.d.ts.map +1 -0
  195. package/esm/presentation/widget/dashboardLayout/types.js +3 -0
  196. package/esm/presentation/widget/dashboardLayout/types.js.map +1 -0
  197. package/esm/presentation/widget/index.d.ts +1 -0
  198. package/esm/presentation/widget/index.d.ts.map +1 -1
  199. package/esm/presentation/widget/index.js +1 -0
  200. package/esm/presentation/widget/index.js.map +1 -1
  201. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelect.d.ts +16 -0
  202. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelect.d.ts.map +1 -0
  203. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelect.js +133 -0
  204. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelect.js.map +1 -0
  205. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.d.ts.map +1 -1
  206. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js +1 -1
  207. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js.map +1 -1
  208. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.d.ts.map +1 -1
  209. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js +3 -3
  210. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js.map +1 -1
  211. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +3 -2
  212. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
  213. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
  214. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js.map +1 -1
  215. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +3 -2
  216. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
  217. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +10 -10
  218. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js.map +1 -1
  219. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.d.ts.map +1 -1
  220. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js +2 -1
  221. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js.map +1 -1
  222. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +8 -3
  223. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
  224. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +2 -1
  225. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js.map +1 -1
  226. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts +3 -2
  227. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts.map +1 -1
  228. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js +16 -18
  229. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js.map +1 -1
  230. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.d.ts +7 -0
  231. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.d.ts.map +1 -0
  232. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.js +43 -0
  233. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.js.map +1 -0
  234. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.d.ts +90 -0
  235. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.d.ts.map +1 -0
  236. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.js +220 -0
  237. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.js.map +1 -0
  238. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/guards.d.ts +22 -0
  239. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/guards.d.ts.map +1 -0
  240. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/guards.js +41 -0
  241. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/guards.js.map +1 -0
  242. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.d.ts +14 -0
  243. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.d.ts.map +1 -0
  244. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.js +202 -0
  245. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.js.map +1 -0
  246. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.d.ts +64 -0
  247. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.d.ts.map +1 -0
  248. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.js +303 -0
  249. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.js.map +1 -0
  250. package/esm/presentation/widget/insight/configuration/InsightAlerts.d.ts.map +1 -1
  251. package/esm/presentation/widget/insight/configuration/InsightAlerts.js +3 -3
  252. package/esm/presentation/widget/insight/configuration/InsightAlerts.js.map +1 -1
  253. package/esm/presentation/widget/insight/types.d.ts +1 -0
  254. package/esm/presentation/widget/insight/types.d.ts.map +1 -1
  255. package/esm/presentation/widget/types.d.ts +1 -0
  256. package/esm/presentation/widget/types.d.ts.map +1 -1
  257. package/esm/presentation/widget/widget/DefaultDashboardWidget.js +1 -1
  258. package/esm/presentation/widget/widget/DefaultDashboardWidget.js.map +1 -1
  259. package/esm/sdk-ui-dashboard.d.ts +179 -12
  260. package/package.json +15 -15
  261. package/styles/css/alerting.css +2 -0
  262. package/styles/css/alerting.css.map +1 -1
  263. package/styles/css/main.css +11 -14
  264. package/styles/css/main.css.map +1 -1
  265. package/styles/css/sidebar.css +9 -14
  266. package/styles/css/sidebar.css.map +1 -1
  267. package/styles/scss/alerting.scss +2 -0
  268. package/styles/scss/sidebar.scss +10 -18
  269. package/esm/presentation/flexibleLayout/DashboardLayout.d.ts.map +0 -1
  270. package/esm/presentation/flexibleLayout/DashboardLayout.js.map +0 -1
  271. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.d.ts +0 -14
  272. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.d.ts.map +0 -1
  273. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.js +0 -139
  274. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.js.map +0 -1
  275. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts +0 -46
  276. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts.map +0 -1
  277. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js +0 -712
  278. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import { useToastMessage } from "@gooddata/sdk-ui-kit";
2
+ import { fillMissingTitles, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
2
3
  import { useCallback, useEffect, useMemo, useState } from "react";
3
4
  import { v4 as uuidv4 } from "uuid";
4
- import { useDashboardSelector, selectInsightByWidgetRef, selectEntitlementMaxAutomations, selectEntitlementUnlimitedAutomations, DEFAULT_MAX_AUTOMATIONS, selectAllAutomationsCount, refreshAutomations, useDashboardDispatch, dispatchAndWaitFor, selectDashboardUserAutomationAlertsInContext, selectDashboardId, selectLocale, selectCanCreateAutomation, selectCurrentUser, useFiltersForWidgetScheduledExport, selectNotificationChannels, useDashboardUserInteraction, selectCanManageWorkspace, selectUsers, selectEntitlementMaxAutomationRecipients, selectExecutionResultByRef, selectEnableAlertAttributes, selectSeparators, } from "../../../../../../model/index.js";
5
- import { createDefaultAlert, getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../utils.js";
6
- import { messages } from "../messages.js";
7
- import { useSaveAlertToBackend } from "./useSaveAlertToBackend.js";
8
- import { fillMissingTitles, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
5
+ import { useDashboardSelector, selectInsightByWidgetRef, selectEntitlementMaxAutomations, selectEntitlementUnlimitedAutomations, DEFAULT_MAX_AUTOMATIONS, selectAllAutomationsCount, refreshAutomations, useDashboardDispatch, dispatchAndWaitFor, selectDashboardUserAutomationAlertsInContext, selectDashboardId, selectLocale, selectCanCreateAutomation, selectCurrentUser, useFiltersForWidgetScheduledExport, selectNotificationChannels, useDashboardUserInteraction, selectCanManageWorkspace, selectUsers, selectEntitlementMaxAutomationRecipients, selectExecutionResultByRef, selectEnableAlertAttributes, selectCatalogAttributes, selectCatalogDateDatasets, selectSeparators, } from "../../../../../../model/index.js";
9
6
  import { convertCurrentUserToAutomationRecipient } from "../../../../../../_staging/automation/index.js";
10
7
  import { useMetricsAndFacts } from "../../../../../../_staging/sharedHooks/useMetricsAndFacts.js";
11
8
  import { DEFAULT_MAX_RECIPIENTS } from "../../../../../scheduledEmail/DefaultScheduledEmailDialog/constants.js";
12
- import { useAttributes } from "../../../../../../_staging/sharedHooks/useAttributes.js";
9
+ import { messages } from "../messages.js";
10
+ import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../utils/items.js";
11
+ import { createDefaultAlert } from "../utils/convertors.js";
12
+ import { useSaveAlertToBackend } from "./useSaveAlertToBackend.js";
13
13
  export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) => {
14
14
  const { addSuccess, addError } = useToastMessage();
15
15
  const { automationInteraction } = useDashboardUserInteraction();
@@ -29,6 +29,8 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
29
29
  const maxAutomationsRecipients = parseInt(maxAutomationsRecipientsEntitlement?.value ?? DEFAULT_MAX_RECIPIENTS, 10);
30
30
  const canManageAttributes = useDashboardSelector(selectEnableAlertAttributes);
31
31
  const canCreateAutomation = useDashboardSelector(selectCanCreateAutomation);
32
+ const catalogAttributes = useDashboardSelector(selectCatalogAttributes);
33
+ const catalogDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
32
34
  const currentUser = useDashboardSelector(selectCurrentUser);
33
35
  const destinations = useDashboardSelector(selectNotificationChannels);
34
36
  const canManageAutomations = useDashboardSelector(selectCanManageWorkspace);
@@ -81,12 +83,11 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
81
83
  insight,
82
84
  });
83
85
  const { metricsAndFacts, metricsAndFactsLoading, metricsAndFactsLoadingError } = useMetricsAndFacts();
86
+ const { metrics: catalogMetrics } = metricsAndFacts ?? { metrics: [] };
84
87
  const locale = useDashboardSelector(selectLocale);
88
+ const supportedAttributes = useMemo(() => getSupportedInsightAttributesByInsight(insight, catalogDateDatasets), [insight, catalogDateDatasets]);
85
89
  const supportedMeasures = useMemo(() => getSupportedInsightMeasuresByInsight(insight ? fillMissingTitles(insight, locale, 9999) : insight), [insight, locale]);
86
90
  const defaultMeasure = supportedMeasures[0];
87
- const supportedAttributes = useMemo(() => getSupportedInsightAttributesByInsight(insight), [insight]);
88
- const displayForms = useMemo(() => supportedAttributes.map((attribute) => attribute.attribute.attribute.displayForm), [supportedAttributes]);
89
- const { attributes, attributesLoading, attributesLoadingError } = useAttributes(displayForms);
90
91
  const defaultNotificationChannelId = destinations[0]?.id;
91
92
  const hasAlerts = alerts.length > 0;
92
93
  const maxAutomations = parseInt(maxAutomationsEntitlement?.value ?? DEFAULT_MAX_AUTOMATIONS, 10);
@@ -103,12 +104,10 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
103
104
  defaultMeasure &&
104
105
  defaultNotificationChannelId &&
105
106
  !metricsAndFactsLoading &&
106
- !attributesLoading &&
107
107
  !defaultAlert) {
108
108
  setDefaultAlert(createDefaultAlert(widgetFilters, supportedMeasures, defaultMeasure, defaultNotificationChannelId, convertCurrentUserToAutomationRecipient(users, currentUser), metricsAndFacts?.metrics ?? []));
109
109
  }
110
- else if ((widgetFiltersStatus === "error" || metricsAndFactsLoadingError || attributesLoadingError) &&
111
- !defaultAlert) {
110
+ else if ((widgetFiltersStatus === "error" || metricsAndFactsLoadingError) && !defaultAlert) {
112
111
  closeInsightWidgetMenu();
113
112
  addError(messages.alertLoadingError);
114
113
  }
@@ -123,10 +122,9 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
123
122
  metricsAndFacts,
124
123
  metricsAndFactsLoading,
125
124
  metricsAndFactsLoadingError,
126
- attributesLoading,
127
- attributesLoadingError,
128
125
  addError,
129
126
  currentUser,
127
+ users,
130
128
  ]);
131
129
  useEffect(() => {
132
130
  if (alerts.length === 0) {
@@ -229,8 +227,7 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
229
227
  isLoadingFilters ||
230
228
  isRefreshingAutomations ||
231
229
  isDeletingAlert ||
232
- metricsAndFactsLoading ||
233
- attributesLoading,
230
+ metricsAndFactsLoading,
234
231
  destinations,
235
232
  users,
236
233
  alerts,
@@ -255,8 +252,9 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
255
252
  maxAutomationsRecipients,
256
253
  canManageAttributes,
257
254
  canCreateAutomation,
258
- catalogMeasures: metricsAndFacts?.metrics ?? [],
259
- catalogAttributes: attributes ?? [],
255
+ catalogMeasures: catalogMetrics ?? [],
256
+ catalogAttributes: catalogAttributes ?? [],
257
+ catalogDateDatasets: catalogDateDatasets ?? [],
260
258
  };
261
259
  };
262
260
  //# sourceMappingURL=useInsightAlerting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInsightAlerting.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACH,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,EAC/B,qCAAqC,EACrC,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,4CAA4C,EAC5C,iBAAiB,EACjB,YAAY,EACZ,yBAAyB,EACzB,iBAAiB,EACjB,kCAAkC,EAClC,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,WAAW,EACX,wCAAwC,EACxC,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,kBAAkB,EAClB,sCAAsC,EACtC,oCAAoC,GACvC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,uCAAuC,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AASxF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAA+B,EAAE,EAAE;IACxG,MAAM,EAAE,UAA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CAAC,CAAC;YACrD,wBAAwB,EAAE,CAAC;QAC/B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;YACpC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,wBAAwB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9C,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACjC,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;aAC7C,IAAI,CAAC,GAAG,EAAE;YACP,0BAA0B,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO;QACH,SAAS,EACL,aAAa;YACb,gBAAgB;YAChB,uBAAuB;YACvB,eAAe;YACf,sBAAsB;YACtB,iBAAiB;QACrB,YAAY;QACZ,KAAK;QACL,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,aAAa,EAAE,YAAY;QAC3B,qBAAqB;QACrB,oBAAoB;QACpB,mBAAmB;QACnB,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,mBAAmB;QACnB,kBAAkB;QAClB,mBAAmB;QACnB,SAAS;QACT,UAAU;QACV,UAAU;QACV,iBAAiB;QACjB,mBAAmB;QACnB,qBAAqB;QACrB,wBAAwB;QACxB,mBAAmB;QACnB,mBAAmB;QACnB,eAAe,EAAE,eAAe,EAAE,OAAO,IAAI,EAAE;QAC/C,iBAAiB,EAAE,UAAU,IAAI,EAAE;KACtC,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"useInsightAlerting.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.ts"],"names":[],"mappings":"AAMA,O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C,KAAK,CAAC,CAAC;QAC9B,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,wBAAwB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9C,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACjC,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;aAC7C,IAAI,CAAC,GAAG,EAAE;YACP,0BAA0B,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO;QACH,SAAS,EACL,aAAa;YACb,gBAAgB;YAChB,uBAAuB;YACvB,eAAe;YACf,sBAAsB;QAC1B,YAAY;QACZ,KAAK;QACL,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,aAAa,EAAE,YAAY;QAC3B,qBAAqB;QACrB,oBAAoB;QACpB,mBAAmB;QACnB,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,mBAAmB;QACnB,kBAAkB;QAClB,mBAAmB;QACnB,SAAS;QACT,UAAU;QACV,UAAU;QACV,iBAAiB;QACjB,mBAAmB;QACnB,qBAAqB;QACrB,wBAAwB;QACxB,mBAAmB;QACnB,mBAAmB;QACnB,eAAe,EAAE,cAAc,IAAI,EAAE;QACrC,iBAAiB,EAAE,iBAAiB,IAAI,EAAE;QAC1C,mBAAmB,EAAE,mBAAmB,IAAI,EAAE;KACjD,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { IAlertComparisonOperator, IAutomationMetadataObjectDefinition, IAutomationRecipient, ICatalogMeasure, IFilter } from "@gooddata/sdk-model";
2
+ import { AlertMetric } from "../../../types.js";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare function createDefaultAlert(filters: IFilter[], metrics: AlertMetric[], measure: AlertMetric, notificationChannelId: string, currentUser: IAutomationRecipient, catalogMeasures?: ICatalogMeasure[], comparisonOperator?: IAlertComparisonOperator): IAutomationMetadataObjectDefinition;
7
+ //# sourceMappingURL=convertors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertors.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.ts"],"names":[],"mappings":"AACA,OAAO,EACH,wBAAwB,EAExB,mCAAmC,EACnC,oBAAoB,EACpB,eAAe,EACf,OAAO,EACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD;;GAEG;AACH,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,OAAO,EAAE,EAClB,OAAO,EAAE,WAAW,EAAE,EACtB,OAAO,EAAE,WAAW,EACpB,qBAAqB,EAAE,MAAM,EAC7B,WAAW,EAAE,oBAAoB,EACjC,eAAe,GAAE,eAAe,EAAO,EACvC,kBAAkB,GAAE,wBAAyC,GAC9D,mCAAmC,CA0CrC"}
@@ -0,0 +1,43 @@
1
+ import { getMeasureFormat, getMeasureTitle } from "./getters.js";
2
+ import { transformAlertExecutionByMetric } from "./transformation.js";
3
+ /**
4
+ * @internal
5
+ */
6
+ export function createDefaultAlert(filters, metrics, measure, notificationChannelId, currentUser, catalogMeasures = [], comparisonOperator = "GREATER_THAN") {
7
+ const condition = {
8
+ type: "comparison",
9
+ left: {
10
+ id: measure.measure.measure.localIdentifier,
11
+ format: getMeasureFormat(measure.measure, catalogMeasures),
12
+ title: getMeasureTitle(measure.measure),
13
+ },
14
+ operator: comparisonOperator,
15
+ right: undefined,
16
+ };
17
+ const execution = {
18
+ attributes: [],
19
+ measures: [measure.measure],
20
+ filters,
21
+ };
22
+ return {
23
+ type: "automation",
24
+ title: getMeasureTitle(measure.measure),
25
+ notificationChannel: notificationChannelId,
26
+ alert: {
27
+ condition,
28
+ execution: {
29
+ ...execution,
30
+ ...transformAlertExecutionByMetric(metrics, condition, {
31
+ attributes: [],
32
+ measures: [measure.measure],
33
+ filters,
34
+ }, measure),
35
+ },
36
+ trigger: {
37
+ state: "ACTIVE",
38
+ },
39
+ },
40
+ recipients: [currentUser],
41
+ };
42
+ }
43
+ //# sourceMappingURL=convertors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertors.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAC9B,OAAkB,EAClB,OAAsB,EACtB,OAAoB,EACpB,qBAA6B,EAC7B,WAAiC,EACjC,kBAAqC,EAAE,EACvC,qBAA+C,cAAc;IAE7D,MAAM,SAAS,GAA8B;QACzC,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACF,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe;YAC3C,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC;YAC1D,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC;SAC1C;QACD,QAAQ,EAAE,kBAAkB;QAC5B,KAAK,EAAE,SAAU;KACpB,CAAC;IACF,MAAM,SAAS,GAAG;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QAC3B,OAAO;KACV,CAAC;IAEF,OAAO;QACH,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC;QACvC,mBAAmB,EAAE,qBAAqB;QAC1C,KAAK,EAAE;YACH,SAAS;YACT,SAAS,EAAE;gBACP,GAAG,SAAS;gBACZ,GAAG,+BAA+B,CAC9B,OAAO,EACP,SAAS,EACT;oBACI,UAAU,EAAE,EAAE;oBACd,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;oBAC3B,OAAO;iBACV,EACD,OAAO,CACV;aACJ;YACD,OAAO,EAAE;gBACL,KAAK,EAAE,QAAQ;aAClB;SACJ;QACD,UAAU,EAAE,CAAC,WAAW,CAAC;KAC5B,CAAC;AACN,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { IAlertComparisonOperator, IAlertRelativeArithmeticOperator, IAlertRelativeOperator, IAttribute, IAttributeMetadataObject, IAutomationAlert, IAutomationMetadataObject, ICatalogAttribute, ICatalogDateAttribute, ICatalogDateDataset, ICatalogMeasure, IFilter, IMeasure } from "@gooddata/sdk-model";
2
+ import { IntlShape } from "react-intl";
3
+ import { AlertAttribute, AlertMetric } from "../../../types.js";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare function getMeasureFormat(measure: IMeasure | undefined, catalogMeasures?: ICatalogMeasure[]): string;
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare function getAttributeRelatedFilterInfo(attributes: AlertAttribute[], alert?: IAutomationMetadataObject, attr?: IAttribute): {
12
+ attribute: AlertAttribute | undefined;
13
+ filterDefinition: IFilter | undefined;
14
+ filterValue: string | null | undefined;
15
+ };
16
+ /**
17
+ * @internal
18
+ */
19
+ export declare function getMeasureTitle(measure: IMeasure): string | undefined;
20
+ /**
21
+ * @internal
22
+ */
23
+ export declare function getAttributeTitle(attribute: IAttribute): string | undefined;
24
+ /**
25
+ * @internal
26
+ */
27
+ export declare function getOperatorTitle(intl: IntlShape, alert?: IAutomationAlert): string;
28
+ /**
29
+ * @internal
30
+ */
31
+ export declare function getValueSuffix(alert?: IAutomationAlert): string | undefined;
32
+ /**
33
+ * @internal
34
+ */
35
+ export declare function getAlertThreshold(alert?: IAutomationAlert): number | undefined;
36
+ /**
37
+ * @internal
38
+ */
39
+ export declare function getAlertMeasure(measures: AlertMetric[], alert?: IAutomationAlert): AlertMetric | undefined;
40
+ /**
41
+ * @internal
42
+ */
43
+ export declare function getAlertAttribute(attributes: AlertAttribute[], alert?: IAutomationMetadataObject): [AlertAttribute | undefined, string | null | undefined];
44
+ /**
45
+ * @internal
46
+ */
47
+ export declare function getAlertFilters(alert?: IAutomationMetadataObject): IFilter[];
48
+ /**
49
+ * @internal
50
+ */
51
+ export declare function getAlertCompareOperator(alert?: IAutomationAlert): IAlertComparisonOperator | undefined;
52
+ /**
53
+ * @internal
54
+ */
55
+ export declare function getAlertRelativeOperator(alert?: IAutomationAlert): [IAlertRelativeOperator, IAlertRelativeArithmeticOperator] | undefined;
56
+ /**
57
+ * @internal
58
+ */
59
+ export declare function getSelectedCatalogAttribute(catalogAttributes: ICatalogAttribute[], catalogDateDatasets: ICatalogDateDataset[], attribute: AlertAttribute): {
60
+ title: string;
61
+ type: "attribute";
62
+ drillDownStep?: import("@gooddata/sdk-model").ObjRef | undefined;
63
+ drillToAttributeLink?: import("@gooddata/sdk-model").ObjRef | undefined;
64
+ displayForms: import("@gooddata/sdk-model").IAttributeDisplayFormMetadataObject[];
65
+ description: string;
66
+ tags?: string[] | undefined;
67
+ production: boolean;
68
+ deprecated: boolean;
69
+ unlisted: boolean;
70
+ ref: import("@gooddata/sdk-model").ObjRef;
71
+ id: string;
72
+ uri: string;
73
+ } | undefined;
74
+ /**
75
+ * @internal
76
+ */
77
+ export declare function getSelectedCatalogAttributeValue(attribute: IAttributeMetadataObject | undefined, getAttributeValue: (attr: IAttributeMetadataObject) => {
78
+ title: string;
79
+ value: string;
80
+ name: string;
81
+ }[], selectedValue: string | null | undefined): {
82
+ title: string;
83
+ value: string;
84
+ name: string;
85
+ } | undefined;
86
+ /**
87
+ * @internal
88
+ */
89
+ export declare function getCatalogAttribute<T extends ICatalogDateAttribute | ICatalogAttribute>(attributes: T[], attribute: IAttribute): T | undefined;
90
+ //# sourceMappingURL=getters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getters.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlert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RefsEqual, attributeAlias, isAttributeElementsByValue, isLocalIdRef, isNegativeAttributeFilter, isPositiveAttributeFilter, measureAlias, measureIdentifier, measureTitle, } from "@gooddata/sdk-model";
3
+ import { messages } from "../messages.js";
4
+ import { ARITHMETIC_OPERATORS, COMPARISON_OPERATORS, DEFAULT_MEASURE_FORMAT, RELATIVE_OPERATORS, } from "../constants.js";
5
+ import { isChangeOperator, isDifferenceOperator } from "./guards.js";
6
+ /**
7
+ * @internal
8
+ */
9
+ export function getMeasureFormat(measure, catalogMeasures) {
10
+ if (!measure) {
11
+ return DEFAULT_MEASURE_FORMAT;
12
+ }
13
+ // custom format set in the bucket
14
+ if (measure?.measure.format) {
15
+ return measure.measure.format;
16
+ }
17
+ // measure format from the catalog
18
+ const catalogMeasure = findMeasureInCatalog(measure, catalogMeasures);
19
+ return catalogMeasure?.measure.format ?? DEFAULT_MEASURE_FORMAT;
20
+ }
21
+ /**
22
+ * @internal
23
+ */
24
+ export function getAttributeRelatedFilterInfo(attributes, alert, attr) {
25
+ const attribute = attributes.find((a) => a.attribute.attribute.localIdentifier === attr?.attribute.localIdentifier);
26
+ return {
27
+ attribute,
28
+ ...getAttributeRelatedFilter(attribute, alert),
29
+ };
30
+ }
31
+ /**
32
+ * @internal
33
+ */
34
+ export function getMeasureTitle(measure) {
35
+ return measure ? measureAlias(measure) ?? measureTitle(measure) : undefined;
36
+ }
37
+ /**
38
+ * @internal
39
+ */
40
+ export function getAttributeTitle(attribute) {
41
+ return attribute ? attributeAlias(attribute) : undefined;
42
+ }
43
+ /**
44
+ * @internal
45
+ */
46
+ export function getOperatorTitle(intl, alert) {
47
+ if (alert?.condition.type === "relative") {
48
+ return getRelativeOperatorTitle(alert.condition.operator, alert.condition.measure.operator, intl);
49
+ }
50
+ if (alert?.condition.type === "comparison") {
51
+ return getComparisonOperatorTitle(alert.condition.operator, intl);
52
+ }
53
+ return "";
54
+ }
55
+ /**
56
+ * @internal
57
+ */
58
+ export function getValueSuffix(alert) {
59
+ if (isChangeOperator(alert)) {
60
+ return "%";
61
+ }
62
+ if (isDifferenceOperator(alert)) {
63
+ return undefined;
64
+ }
65
+ return undefined;
66
+ }
67
+ /**
68
+ * @internal
69
+ */
70
+ export function getAlertThreshold(alert) {
71
+ if (alert?.condition?.type === "relative") {
72
+ return alert.condition.threshold;
73
+ }
74
+ return alert?.condition?.right;
75
+ }
76
+ /**
77
+ * @internal
78
+ */
79
+ export function getAlertMeasure(measures, alert) {
80
+ const condition = alert?.condition;
81
+ if (condition?.type === "relative") {
82
+ return (measures.find((m) => m.measure.measure.localIdentifier === condition.measure.left.id) ??
83
+ measures.find((m) => m.measure.measure.localIdentifier === condition.measure.right.id));
84
+ }
85
+ return measures.find((m) => m.measure.measure.localIdentifier === condition?.left.id);
86
+ }
87
+ /**
88
+ * @internal
89
+ */
90
+ export function getAlertAttribute(attributes, alert) {
91
+ const attr = alert?.alert?.execution.attributes[0];
92
+ if (attr?.attribute) {
93
+ const { attribute, filterValue } = getAttributeRelatedFilterInfo(attributes, alert, attr);
94
+ return [attribute, filterValue];
95
+ }
96
+ return [undefined, undefined];
97
+ }
98
+ /**
99
+ * @internal
100
+ */
101
+ export function getAlertFilters(alert) {
102
+ const filters = alert?.alert?.execution?.filters ?? [];
103
+ const attrs = (alert?.alert?.execution.attributes ?? []).map((a) => a.attribute.localIdentifier);
104
+ return filters.filter((f) => {
105
+ if (isPositiveAttributeFilter(f) && isLocalIdRef(f.positiveAttributeFilter.displayForm)) {
106
+ return !attrs.includes(f.positiveAttributeFilter.displayForm.localIdentifier);
107
+ }
108
+ if (isNegativeAttributeFilter(f) && isLocalIdRef(f.negativeAttributeFilter.displayForm)) {
109
+ return !attrs.includes(f.negativeAttributeFilter.displayForm.localIdentifier);
110
+ }
111
+ return true;
112
+ });
113
+ }
114
+ /**
115
+ * @internal
116
+ */
117
+ export function getAlertCompareOperator(alert) {
118
+ if (alert?.condition.type === "comparison") {
119
+ return alert.condition.operator;
120
+ }
121
+ return undefined;
122
+ }
123
+ /**
124
+ * @internal
125
+ */
126
+ export function getAlertRelativeOperator(alert) {
127
+ if (alert?.condition.type === "relative") {
128
+ return [alert.condition.operator, alert.condition.measure.operator];
129
+ }
130
+ return undefined;
131
+ }
132
+ /**
133
+ * @internal
134
+ */
135
+ export function getSelectedCatalogAttribute(catalogAttributes, catalogDateDatasets, attribute) {
136
+ const catalogDateAttributes = catalogDateDatasets.flatMap((dateDataset) => dateDataset.dateAttributes);
137
+ const item = getCatalogAttribute([...catalogAttributes, ...catalogDateAttributes], attribute.attribute);
138
+ if (!item) {
139
+ return undefined;
140
+ }
141
+ return {
142
+ ...item.attribute,
143
+ title: getAttributeTitle(attribute.attribute) ?? item.attribute?.title,
144
+ };
145
+ }
146
+ /**
147
+ * @internal
148
+ */
149
+ export function getSelectedCatalogAttributeValue(attribute, getAttributeValue, selectedValue) {
150
+ if (!attribute) {
151
+ return undefined;
152
+ }
153
+ const values = getAttributeValue(attribute);
154
+ return (values.find((value) => value.name === selectedValue) ??
155
+ values.find((value) => value.value === selectedValue));
156
+ }
157
+ /**
158
+ * @internal
159
+ */
160
+ export function getCatalogAttribute(attributes, attribute) {
161
+ return attributes.find((attr) => {
162
+ return (areObjRefsEqual(attr.attribute.ref, attribute.attribute.displayForm) ||
163
+ attr.attribute.displayForms.some((displayForm) => areObjRefsEqual(displayForm.ref, attribute.attribute.displayForm)));
164
+ });
165
+ }
166
+ //utils
167
+ function getComparisonOperatorTitle(operator, intl) {
168
+ const titleByOperator = {
169
+ [COMPARISON_OPERATORS.COMPARISON_OPERATOR_LESS_THAN]: messages.comparisonOperatorLessThan.id,
170
+ [COMPARISON_OPERATORS.COMPARISON_OPERATOR_LESS_THAN_OR_EQUAL_TO]: messages.comparisonOperatorLessThanOrEquals.id,
171
+ [COMPARISON_OPERATORS.COMPARISON_OPERATOR_GREATER_THAN]: messages.comparisonOperatorGreaterThan.id,
172
+ [COMPARISON_OPERATORS.COMPARISON_OPERATOR_GREATER_THAN_OR_EQUAL_TO]: messages.comparisonOperatorGreaterThanOrEquals.id,
173
+ };
174
+ return intl.formatMessage({ id: titleByOperator[operator] });
175
+ }
176
+ function getRelativeOperatorTitle(operator, art, intl) {
177
+ const titleByOperator = {
178
+ [`${ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_CHANGE}.${RELATIVE_OPERATORS.RELATIVE_OPERATOR_INCREASE_BY}`]: messages.comparisonOperatorChangeIncreasesBy.id,
179
+ [`${ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_CHANGE}.${RELATIVE_OPERATORS.RELATIVE_OPERATOR_DECREASE_BY}`]: messages.comparisonOperatorChangeDecreasesBy.id,
180
+ [`${ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_CHANGE}.${RELATIVE_OPERATORS.RELATIVE_OPERATOR_CHANGES_BY}`]: messages.comparisonOperatorChangeChangesBy.id,
181
+ [`${ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_DIFFERENCE}.${RELATIVE_OPERATORS.RELATIVE_OPERATOR_INCREASE_BY}`]: messages.comparisonOperatorDifferenceIncreasesBy.id,
182
+ [`${ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_DIFFERENCE}.${RELATIVE_OPERATORS.RELATIVE_OPERATOR_DECREASE_BY}`]: messages.comparisonOperatorDifferenceDecreasesBy.id,
183
+ [`${ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_DIFFERENCE}.${RELATIVE_OPERATORS.RELATIVE_OPERATOR_CHANGES_BY}`]: messages.comparisonOperatorDifferenceChangesBy.id,
184
+ };
185
+ return intl.formatMessage({ id: titleByOperator[`${art}.${operator}`] });
186
+ }
187
+ function getAttributeRelatedFilter(attr, alert) {
188
+ const filter = alert?.alert?.execution.filters.filter((f) => {
189
+ if (isPositiveAttributeFilter(f) && isLocalIdRef(f.positiveAttributeFilter.displayForm)) {
190
+ return (f.positiveAttributeFilter.displayForm.localIdentifier ===
191
+ attr?.attribute.attribute.localIdentifier);
192
+ }
193
+ if (isNegativeAttributeFilter(f) && isLocalIdRef(f.negativeAttributeFilter.displayForm)) {
194
+ return (f.negativeAttributeFilter.displayForm.localIdentifier ===
195
+ attr?.attribute.attribute.localIdentifier);
196
+ }
197
+ return false;
198
+ })[0];
199
+ if (isPositiveAttributeFilter(filter) && isAttributeElementsByValue(filter.positiveAttributeFilter.in)) {
200
+ return {
201
+ filterDefinition: filter,
202
+ filterValue: filter.positiveAttributeFilter.in.values[0],
203
+ };
204
+ }
205
+ if (isNegativeAttributeFilter(filter) &&
206
+ isAttributeElementsByValue(filter.negativeAttributeFilter.notIn)) {
207
+ return {
208
+ filterDefinition: filter,
209
+ filterValue: undefined,
210
+ };
211
+ }
212
+ return {
213
+ filterDefinition: undefined,
214
+ filterValue: undefined,
215
+ };
216
+ }
217
+ function findMeasureInCatalog(measure, catalogMeasures) {
218
+ return catalogMeasures?.find((m) => m.measure.id === measureIdentifier(measure));
219
+ }
220
+ //# sourceMappingURL=getters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EACH,eAAe,EACf,cAAc,EAcd,0BAA0B,EAC1B,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,YAAY,GACf,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErE;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAA6B,EAAE,eAAmC;IAC/F,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,sBAAsB,CAAC;IAClC,C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,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;AACrF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { IAutomationAlert, IAutomationMetadataObject } from "@gooddata/sdk-model";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare function isChangeOperator(alert?: IAutomationAlert): boolean;
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare function isDifferenceOperator(alert?: IAutomationAlert): boolean;
10
+ /**
11
+ * @internal
12
+ */
13
+ export declare function isChangeOrDifferenceOperator(alert?: IAutomationAlert): boolean;
14
+ /**
15
+ * @internal
16
+ */
17
+ export declare function isAlertValueDefined(alert?: IAutomationAlert): boolean;
18
+ /**
19
+ * @internal
20
+ */
21
+ export declare function isAlertRecipientsValid(alert?: IAutomationMetadataObject): boolean;
22
+ //# sourceMappingURL=guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils/guards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAIlF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAKlE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAKtE;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAE9E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAKrE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAEjF"}
@@ -0,0 +1,41 @@
1
+ import { ARITHMETIC_OPERATORS } from "../constants.js";
2
+ /**
3
+ * @internal
4
+ */
5
+ export function isChangeOperator(alert) {
6
+ if (alert?.condition?.type === "relative") {
7
+ return alert.condition.measure.operator === ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_CHANGE;
8
+ }
9
+ return false;
10
+ }
11
+ /**
12
+ * @internal
13
+ */
14
+ export function isDifferenceOperator(alert) {
15
+ if (alert?.condition?.type === "relative") {
16
+ return alert.condition.measure.operator === ARITHMETIC_OPERATORS.ARITHMETIC_OPERATOR_DIFFERENCE;
17
+ }
18
+ return false;
19
+ }
20
+ /**
21
+ * @internal
22
+ */
23
+ export function isChangeOrDifferenceOperator(alert) {
24
+ return isChangeOperator(alert) || isDifferenceOperator(alert);
25
+ }
26
+ /**
27
+ * @internal
28
+ */
29
+ export function isAlertValueDefined(alert) {
30
+ if (alert?.condition?.type === "relative") {
31
+ return typeof alert.condition.threshold !== "undefined";
32
+ }
33
+ return typeof alert?.condition?.right !== "undefined";
34
+ }
35
+ /**
36
+ * @internal
37
+ */
38
+ export function isAlertRecipientsValid(alert) {
39
+ return !!alert?.recipients?.length;
40
+ }
41
+ //# sourceMappingURL=guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils/guards.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAwB;IACrD,IAAI,KAAK,EAAE,SAAS,EAAE,IAAI,KAAK,UAAU,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,KAAK,oBAAoB,CAAC,0BAA0B,CAAC;IAChG,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAwB;IACzD,IAAI,KAAK,EAAE,SAAS,EAAE,IAAI,KAAK,UAAU,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,KAAK,oBAAoB,CAAC,8BAA8B,CAAC;IACpG,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAAwB;IACjE,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAwB;IACxD,IAAI,KAAK,EAAE,SAAS,EAAE,IAAI,KAAK,UAAU,EAAE,CAAC;QACxC,OAAO,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,KAAK,WAAW,CAAC;IAC5D,CAAC;IACD,OAAO,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,KAAK,WAAW,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAiC;IACpE,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC;AACvC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ICatalogDateDataset, IInsight } from "@gooddata/sdk-model";
2
+ import { AlertAttribute, AlertMetric } from "../../../types.js";
3
+ /**
4
+ * Get supported insight measures by insight
5
+ * @param insight - insight to get supported measures for
6
+ */
7
+ export declare function getSupportedInsightMeasuresByInsight(insight: IInsight | null | undefined): AlertMetric[];
8
+ /**
9
+ * Get supported insight attributes by insight
10
+ * @param insight - insight to get supported attributes for
11
+ * @param dateDatasets - date datasets to filter out date attributes
12
+ */
13
+ export declare function getSupportedInsightAttributesByInsight(insight: IInsight | null | undefined, dateDatasets?: ICatalogDateDataset[]): AlertAttribute[];
14
+ //# sourceMappingURL=items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.ts"],"names":[],"mappings":"AACA,OAAO,EAKH,mBAAmB,EACnB,QAAQ,EAUX,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAA6B,MAAM,mBAAmB,CAAC;AA2B3F;;;GAGG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,EAAE,CAqBxG;AAED;;;;GAIG;AACH,wBAAgB,sCAAsC,CAClD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,GAAE,mBAAmB,EAAO,GACzC,cAAc,EAAE,CAMlB"}