@gooddata/sdk-ui-dashboard 10.14.0-alpha.1 → 10.14.0-alpha.11
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.
- package/NOTICE +1919 -3
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/__version.js.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +12 -4
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js.map +1 -1
- package/esm/model/commandHandlers/dashboard/resetDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/resetDashboardHandler.js +3 -2
- package/esm/model/commandHandlers/dashboard/resetDashboardHandler.js.map +1 -1
- package/esm/model/store/config/configSelectors.d.ts +5 -1
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +7 -1
- package/esm/model/store/config/configSelectors.js.map +1 -1
- package/esm/model/store/executionResults/executionResultsSelectors.d.ts +1 -1
- package/esm/model/store/executionResults/executionResultsSelectors.d.ts.map +1 -1
- package/esm/model/store/executionResults/executionResultsSelectors.js +4 -1
- package/esm/model/store/executionResults/executionResultsSelectors.js.map +1 -1
- package/esm/model/store/index.d.ts +1 -1
- package/esm/model/store/index.d.ts.map +1 -1
- package/esm/model/store/index.js +1 -1
- package/esm/model/store/index.js.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +5 -5
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js.map +1 -1
- package/esm/presentation/constants/classes.d.ts +2 -0
- package/esm/presentation/constants/classes.d.ts.map +1 -0
- package/esm/presentation/constants/classes.js +3 -0
- package/esm/presentation/constants/classes.js.map +1 -0
- package/esm/presentation/constants/index.d.ts +1 -0
- package/esm/presentation/constants/index.d.ts.map +1 -1
- package/esm/presentation/constants/index.js +1 -0
- package/esm/presentation/constants/index.js.map +1 -1
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlay.d.ts +11 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlay.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlay.js +53 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlay.js.map +1 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlayController.d.ts +8 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlayController.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlayController.js +17 -0
- package/esm/presentation/flexibleLayout/DashboardItemOverlay/DashboardItemOverlayController.js.map +1 -0
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.d.ts +8 -0
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js +199 -0
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayout.d.ts +9 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayout.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayout.js +57 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayout.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutEditSectionHeaderRenderer.d.ts +4 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutEditSectionHeaderRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutEditSectionHeaderRenderer.js +20 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutEditSectionHeaderRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRow.d.ts +21 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRow.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRow.js +18 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRow.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRowEdit.d.ts +7 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRowEdit.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRowEdit.js +41 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutGridRowEdit.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItem.d.ts +15 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItem.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItem.js +19 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItem.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemRenderer.d.ts +6 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemRenderer.js +33 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemViewRenderer.d.ts +3 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemViewRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemViewRenderer.js +39 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutItemViewRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSection.d.ts +24 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSection.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSection.js +50 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSection.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeader.d.ts +24 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeader.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeader.js +15 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeader.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts +9 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js +12 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderRenderer.d.ts +4 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderRenderer.js +12 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionRenderer.d.ts +3 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionRenderer.js +13 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutWidgetRenderer.d.ts +4 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutWidgetRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutWidgetRenderer.js +32 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutWidgetRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableDashboardLayoutSectionRenderer.d.ts +3 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableDashboardLayoutSectionRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableDashboardLayoutSectionRenderer.js +26 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableDashboardLayoutSectionRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/EditableLabelWithBubble.d.ts +16 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/EditableLabelWithBubble.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/EditableLabelWithBubble.js +38 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/EditableLabelWithBubble.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts +8 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +66 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/sectionHeaderHelper.d.ts +7 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/sectionHeaderHelper.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/sectionHeaderHelper.js +18 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/sectionHeaderHelper.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionHeaderRenderer.d.ts +8 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionHeaderRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionHeaderRenderer.js +14 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionHeaderRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionRenderer.d.ts +8 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionRenderer.js +14 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionRenderer.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/index.d.ts +19 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/index.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/index.js +14 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/index.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/interfaces.d.ts +337 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/interfaces.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/interfaces.js +2 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/interfaces.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/emptyFacade.d.ts +3 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/emptyFacade.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/emptyFacade.js +31 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/emptyFacade.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/legacy.d.ts +7 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/legacy.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/legacy.js +33 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/legacy.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/sizing.d.ts +43 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/sizing.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/sizing.js +346 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/sizing.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutUtils.d.ts +22 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutUtils.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutUtils.js +96 -0
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutUtils.js.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.d.ts +7 -0
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.js +101 -0
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.js.map +1 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardError.d.ts +3 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardError.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardError.js +10 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardError.js.map +1 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardLayout.d.ts +3 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardLayout.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardLayout.js +9 -0
- package/esm/presentation/flexibleLayout/EmptyDashboardLayout.js.map +1 -0
- package/esm/presentation/flexibleLayout/constants.d.ts +4 -0
- package/esm/presentation/flexibleLayout/constants.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/constants.js +14 -0
- package/esm/presentation/flexibleLayout/constants.js.map +1 -0
- package/esm/presentation/flexibleLayout/index.d.ts +3 -0
- package/esm/presentation/flexibleLayout/index.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/index.js +4 -0
- package/esm/presentation/flexibleLayout/index.js.map +1 -0
- package/esm/presentation/flexibleLayout/refs.d.ts +5 -0
- package/esm/presentation/flexibleLayout/refs.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/refs.js +7 -0
- package/esm/presentation/flexibleLayout/refs.js.map +1 -0
- package/esm/presentation/flexibleLayout/types.d.ts +22 -0
- package/esm/presentation/flexibleLayout/types.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/types.js +2 -0
- package/esm/presentation/flexibleLayout/types.js.map +1 -0
- package/esm/presentation/layout/DefaultDashboardLayout.d.ts.map +1 -1
- package/esm/presentation/layout/DefaultDashboardLayout.js +16 -8
- package/esm/presentation/layout/DefaultDashboardLayout.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +10 -0
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.d.ts.map +1 -1
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.js +2 -1
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.d.ts +14 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.js +125 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +7 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +7 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +12 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAttributeValuesFromExecResults.d.ts +12 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAttributeValuesFromExecResults.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAttributeValuesFromExecResults.js +86 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAttributeValuesFromExecResults.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +6 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +6 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts +4 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js +19 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts +19 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js +204 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js +3 -3
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js.map +1 -1
- package/esm/presentation/widget/insight/types.d.ts +7 -1
- package/esm/presentation/widget/insight/types.d.ts.map +1 -1
- package/esm/presentation/widget/insight/types.js.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuBubble.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuBubble.js +2 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuBubble.js.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +13 -8
- package/package.json +15 -15
- package/styles/css/alerting.css +59 -5
- package/styles/css/alerting.css.map +1 -1
- package/styles/css/dashboard.css +324 -0
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/flexibleLayout.css +425 -0
- package/styles/css/flexibleLayout.css.map +1 -0
- package/styles/css/main.css +383 -5
- package/styles/css/main.css.map +1 -1
- package/styles/scss/alerting.scss +69 -5
- package/styles/scss/dashboard.scss +1 -0
- package/styles/scss/flexibleLayout.scss +410 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// (C) 2022-2024 GoodData Corporation
|
|
2
|
+
import { renderModeAware } from "../componentDefinition/index.js";
|
|
3
|
+
import { EmptyDashboardDropZone } from "../dragAndDrop/index.js";
|
|
4
|
+
import { EmptyDashboardError } from "./EmptyDashboardError.js";
|
|
5
|
+
export const EmptyDashboardLayout = renderModeAware({
|
|
6
|
+
view: EmptyDashboardError,
|
|
7
|
+
edit: EmptyDashboardDropZone,
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=EmptyDashboardLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyDashboardLayout.js","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/EmptyDashboardLayout.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;IAChD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,sBAAsB;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,eAAO,MAAM,YAAY,SASb,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// (C) 2022-2024 GoodData Corporation
|
|
2
|
+
export const DEFAULT_COLUMN_CLIENT_WIDTH = 100;
|
|
3
|
+
export const DEFAULT_WIDTH_RESIZER_HEIGHT = 300;
|
|
4
|
+
export const emptyDOMRect = {
|
|
5
|
+
x: 0,
|
|
6
|
+
y: 0,
|
|
7
|
+
bottom: 0,
|
|
8
|
+
top: 0,
|
|
9
|
+
left: 0,
|
|
10
|
+
right: 0,
|
|
11
|
+
height: 0,
|
|
12
|
+
width: 0,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/constants.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;CACA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { IDashboardLayoutSectionFacade, IDashboardLayoutItemFacade } from "../../_staging/dashboard/fluidLayout/index.js";
|
|
3
|
+
export declare function getRefsForSection(section: IDashboardLayoutSectionFacade<unknown>): (ObjRef | undefined)[];
|
|
4
|
+
export declare function getRefsForItem(item: IDashboardLayoutItemFacade<unknown>): (ObjRef | undefined)[];
|
|
5
|
+
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/refs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACH,6BAA6B,EAC7B,0BAA0B,EAC7B,MAAM,+CAA+C,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,6BAA6B,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAEzG;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,0BAA0B,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAEhG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refs.js","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/refs.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,iBAAiB,CAAC,OAA+C;IAC7E,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAyC;IACpE,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentType } from "react";
|
|
2
|
+
import { IErrorProps, OnError } from "@gooddata/sdk-ui";
|
|
3
|
+
import { FilterContextItem } from "@gooddata/sdk-model";
|
|
4
|
+
import { IDashboardFilter, OnFiredDashboardDrillEvent } from "../../types.js";
|
|
5
|
+
/**
|
|
6
|
+
* @alpha
|
|
7
|
+
*/
|
|
8
|
+
export interface IDashboardLayoutProps {
|
|
9
|
+
ErrorComponent?: React.ComponentType<IErrorProps>;
|
|
10
|
+
onFiltersChange?: (filters: (IDashboardFilter | FilterContextItem)[], resetOthers?: boolean) => void;
|
|
11
|
+
onDrill?: OnFiredDashboardDrillEvent;
|
|
12
|
+
onError?: OnError;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export type CustomDashboardLayoutComponent = ComponentType<IDashboardLayoutProps>;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export type CustomEmptyLayoutDropZoneBodyComponent = ComponentType;
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAElD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,EAAE,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACrG,OAAO,CAAC,EAAE,0BAA0B,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/presentation/flexibleLayout/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardLayout.d.ts","sourceRoot":"","sources":["../../../src/presentation/layout/DefaultDashboardLayout.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DefaultDashboardLayout.d.ts","sourceRoot":"","sources":["../../../src/presentation/layout/DefaultDashboardLayout.tsx"],"names":[],"mappings":";AA6BA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA+InD;;GAEG;AACH,eAAO,MAAM,sBAAsB,UAAW,qBAAqB,KAAG,WAMrE,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
// (C) 2020-
|
|
1
|
+
// (C) 2020-2024 GoodData Corporation
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { objRefToString, isWidget, } from "@gooddata/sdk-model";
|
|
4
4
|
import { LRUCache } from "lru-cache";
|
|
5
5
|
import max from "lodash/max.js";
|
|
6
|
-
import { useDashboardSelector, selectIsExport, selectIsLayoutEmpty, selectLayout, selectInsightsMap, selectEnableWidgetCustomHeight, selectRenderMode, } from "../../model/index.js";
|
|
6
|
+
import { useDashboardSelector, selectIsExport, selectIsLayoutEmpty, selectLayout, selectInsightsMap, selectEnableWidgetCustomHeight, selectRenderMode, selectEnableFlexibleLayout, } from "../../model/index.js";
|
|
7
|
+
import { SectionHotspot } from "../dragAndDrop/index.js";
|
|
8
|
+
import { isInitialPlaceholderWidget } from "../../widgets/index.js";
|
|
9
|
+
import { DefaultFlexibleDashboardLayout } from "../flexibleLayout/index.js";
|
|
7
10
|
import { DashboardLayoutWidget } from "./DashboardLayoutWidget.js";
|
|
8
11
|
import { DashboardLayout, DashboardLayoutBuilder, } from "./DefaultDashboardLayoutRenderer/index.js";
|
|
9
12
|
import { renderModeAwareDashboardLayoutSectionRenderer } from "./DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionRenderer.js";
|
|
10
13
|
import { renderModeAwareDashboardLayoutSectionHeaderRenderer } from "./DefaultDashboardLayoutRenderer/RenderModeAwareDashboardLayoutSectionHeaderRenderer.js";
|
|
11
14
|
import { getMemoizedWidgetSanitizer } from "./DefaultDashboardLayoutUtils.js";
|
|
12
|
-
import { SectionHotspot } from "../dragAndDrop/index.js";
|
|
13
|
-
import { isInitialPlaceholderWidget } from "../../widgets/index.js";
|
|
14
15
|
import { EmptyDashboardLayout } from "./EmptyDashboardLayout.js";
|
|
15
16
|
/**
|
|
16
17
|
* Get dashboard layout for exports.
|
|
@@ -57,10 +58,7 @@ const itemKeyGetter = (keyGetterProps) => {
|
|
|
57
58
|
}
|
|
58
59
|
return keyGetterProps.item.index().toString();
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
-
* @alpha
|
|
62
|
-
*/
|
|
63
|
-
export const DefaultDashboardLayout = (props) => {
|
|
61
|
+
const LegacyDefaultDashboardLayout = (props) => {
|
|
64
62
|
const { onFiltersChange, onDrill, onError } = props;
|
|
65
63
|
const layout = useDashboardSelector(selectLayout);
|
|
66
64
|
const isLayoutEmpty = useDashboardSelector(selectIsLayoutEmpty);
|
|
@@ -97,4 +95,14 @@ export const DefaultDashboardLayout = (props) => {
|
|
|
97
95
|
React.createElement(DashboardLayout, { className: isExport ? "export-mode" : "", layout: transformedLayout, itemKeyGetter: itemKeyGetter, widgetRenderer: widgetRenderer, enableCustomHeight: enableWidgetCustomHeight, sectionRenderer: renderModeAwareDashboardLayoutSectionRenderer, sectionHeaderRenderer: renderModeAwareDashboardLayoutSectionHeaderRenderer, renderMode: renderMode }),
|
|
98
96
|
!!shouldRenderSectionHotspot && (React.createElement(SectionHotspot, { index: transformedLayout.sections.length, targetPosition: "below" }))));
|
|
99
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* @alpha
|
|
100
|
+
*/
|
|
101
|
+
export const DefaultDashboardLayout = (props) => {
|
|
102
|
+
const isFlexibleLayoutEnabled = useDashboardSelector(selectEnableFlexibleLayout);
|
|
103
|
+
if (isFlexibleLayoutEnabled) {
|
|
104
|
+
return React.createElement(DefaultFlexibleDashboardLayout, { ...props });
|
|
105
|
+
}
|
|
106
|
+
return React.createElement(LegacyDefaultDashboardLayout, { ...props });
|
|
107
|
+
};
|
|
100
108
|
//# sourceMappingURL=DefaultDashboardLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardLayout.js","sourceRoot":"","sources":["../../../src/presentation/layout/DefaultDashboardLayout.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OA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AE,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3F,OAAO,CACH;QACI,oBAAC,eAAe,IACZ,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EACxC,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,wBAAwB,EAC5C,eAAe,EAAE,6CAA6C,EAC9D,qBAAqB,EAAE,mDAAmD,EAC1E,UAAU,EAAE,UAAU,GACxB;QACD,CAAC,CAAC,0BAA0B,IAAI,CAC7B,oBAAC,cAAc,IAAC,KAAK,EAAE,iBAAiB,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAC,OAAO,GAAG,CACtF,CACF,CACN,CAAC;AACN,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAA4B,EAAe,EAAE;IAChF,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;IACjF,IAAI,uBAAuB,EAAE,CAAC;QAC1B,OAAO,oBAAC,8BAA8B,OAAK,KAAK,GAAI,CAAC;IACzD,CAAC;IACD,OAAO,oBAAC,4BAA4B,OAAK,KAAK,GAAI,CAAC;AACvD,CAAC,CAAC"}
|
|
@@ -2969,6 +2969,11 @@
|
|
|
2969
2969
|
"comment": "Title of the section in insight configuration",
|
|
2970
2970
|
"limit": 0
|
|
2971
2971
|
},
|
|
2972
|
+
"insightAlert.config.for": {
|
|
2973
|
+
"value": "For",
|
|
2974
|
+
"comment": "Title of the section in insight configuration",
|
|
2975
|
+
"limit": 0
|
|
2976
|
+
},
|
|
2972
2977
|
"insightAlert.config.warning.destination": {
|
|
2973
2978
|
"value": "The selected destination only supports sending the alert to yourself.",
|
|
2974
2979
|
"comment": "Alert warning message",
|
|
@@ -3088,5 +3093,10 @@
|
|
|
3088
3093
|
"value": "Select a metric",
|
|
3089
3094
|
"comment": "Label of metric select dropdown",
|
|
3090
3095
|
"limit": 0
|
|
3096
|
+
},
|
|
3097
|
+
"insightAlert.config.selectAttribute": {
|
|
3098
|
+
"value": "All",
|
|
3099
|
+
"comment": "Label of attribute select dropdown",
|
|
3100
|
+
"limit": 0
|
|
3091
3101
|
}
|
|
3092
3102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationBubble.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/common/configuration/ConfigurationBubble.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACH,eAAe,EACf,YAAY,EAEZ,WAAW,EACX,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigurationBubble.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/common/configuration/ConfigurationBubble.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACH,eAAe,EACf,YAAY,EAEZ,WAAW,EACX,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;AAI9B,UAAU,yBAAyB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB,EAAE,WAAW,EAM3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAMjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAGpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA8BnE,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import cx from "classnames";
|
|
4
4
|
import { Bubble, } from "@gooddata/sdk-ui-kit";
|
|
5
|
+
import { IGNORED_CONFIGURATION_MENU_CLICK_CLASS } from "../../../constants/index.js";
|
|
5
6
|
export const defaultAlignPoints = [
|
|
6
7
|
{ align: "tr tl" },
|
|
7
8
|
{ align: "br bl" },
|
|
@@ -22,7 +23,7 @@ export const defaultArrowDirections = {
|
|
|
22
23
|
};
|
|
23
24
|
export const ConfigurationBubble = (props) => {
|
|
24
25
|
const { children, classNames, onClose, alignTo = ".s-dash-item.is-selected", alignPoints = defaultAlignPoints, arrowOffsets = defaultArrowOffsets, overlayPositionType, arrowDirections = defaultArrowDirections, } = props;
|
|
25
|
-
const ignoreClicksOnByClass = [alignTo]; // do not close on click to the widget
|
|
26
|
+
const ignoreClicksOnByClass = [alignTo, `.${IGNORED_CONFIGURATION_MENU_CLICK_CLASS}`]; // do not close on click to the widget
|
|
26
27
|
return (React.createElement(Bubble, { className: cx("bubble-light gd-configuration-bubble s-gd-configuration-bubble", classNames), overlayClassName: "gd-configuration-bubble-wrapper sdk-edit-mode-on", alignTo: alignTo, alignPoints: alignPoints, arrowOffsets: arrowOffsets, arrowDirections: arrowDirections, closeOnOutsideClick: true, closeOnParentScroll: false, ignoreClicksOnByClass: ignoreClicksOnByClass, onClose: onClose, overlayPositionType: overlayPositionType }, children));
|
|
27
28
|
};
|
|
28
29
|
//# sourceMappingURL=ConfigurationBubble.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationBubble.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/common/configuration/ConfigurationBubble.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAGH,MAAM,GAGT,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigurationBubble.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/common/configuration/ConfigurationBubble.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAGH,MAAM,GAGT,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,sCAAsC,EAAE,MAAM,6BAA6B,CAAC;AAarF,MAAM,CAAC,MAAM,kBAAkB,GAAkB;IAC7C,EAAE,KAAK,EAAE,OAAO,EAAE;IAClB,EAAE,KAAK,EAAE,OAAO,EAAE;IAClB,EAAE,KAAK,EAAE,OAAO,EAAE;IAClB,EAAE,KAAK,EAAE,OAAO,EAAE;IAClB,EAAE,KAAK,EAAE,OAAO,EAAE;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC7C,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAoB;IACnD,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,OAAO;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAwC,CAAC,KAAK,EAAE,EAAE;IAC9E,MAAM,EACF,QAAQ,EACR,UAAU,EACV,OAAO,EACP,OAAO,GAAG,0BAA0B,EACpC,WAAW,GAAG,kBAAkB,EAChC,YAAY,GAAG,mBAAmB,EAClC,mBAAmB,EACnB,eAAe,GAAG,sBAAsB,GAC3C,GAAG,KAAK,CAAC;IACV,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,IAAI,sCAAsC,EAAE,CAAC,CAAC,CAAC,sCAAsC;IAE7H,OAAO,CACH,oBAAC,MAAM,IACH,SAAS,EAAE,EAAE,CAAC,gEAAgE,EAAE,UAAU,CAAC,EAC3F,gBAAgB,EAAC,kDAAkD,EACnE,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,mBAAmB,QACnB,mBAAmB,EAAE,KAAK,EAC1B,qBAAqB,EAAE,qBAAqB,EAC5C,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,mBAAmB,IAEvC,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IAttributeMetadataObject } from "@gooddata/sdk-model";
|
|
3
|
+
import { AlertAttribute } from "../../types.js";
|
|
4
|
+
import { IExecutionResultEnvelope } from "../../../../../model/index.js";
|
|
5
|
+
export interface IAlertAttributeSelectProps {
|
|
6
|
+
execResult: IExecutionResultEnvelope | undefined;
|
|
7
|
+
selectedAttribute: AlertAttribute | undefined;
|
|
8
|
+
selectedValue: string | undefined;
|
|
9
|
+
onAttributeChange: (attribute: AlertAttribute | undefined, value: string | undefined) => void;
|
|
10
|
+
attributes: AlertAttribute[];
|
|
11
|
+
catalogAttributes: IAttributeMetadataObject[];
|
|
12
|
+
}
|
|
13
|
+
export declare const AlertAttributeSelect: ({ execResult, selectedAttribute, selectedValue, onAttributeChange, attributes, catalogAttributes, }: IAlertAttributeSelectProps) => React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=AlertAttributeSelecxt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertAttributeSelecxt.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAYhD,OAAO,EAAmB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAKhD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKzE,MAAM,WAAW,0BAA0B;IACvC,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9F,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,iBAAiB,EAAE,wBAAwB,EAAE,CAAC;CACjD;AAED,eAAO,MAAM,oBAAoB,wGAO9B,0BAA0B,sBA4M5B,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// (C) 2019-2024 GoodData Corporation
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
3
|
+
import { Button, Menu, ItemsWrapper, Item, SubMenu, Separator, InvertableSelectSearchBar, } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import cx from "classnames";
|
|
5
|
+
import { useIntl } from "react-intl";
|
|
6
|
+
import { areObjRefsEqual } from "@gooddata/sdk-model";
|
|
7
|
+
import { DASHBOARD_DIALOG_OVERS_Z_INDEX, IGNORED_CONFIGURATION_MENU_CLICK_CLASS, } from "../../../../constants/index.js";
|
|
8
|
+
import { getAttributeTitle } from "./utils.js";
|
|
9
|
+
import { useAttributeValuesFromExecResults } from "./hooks/useAttributeValuesFromExecResults.js";
|
|
10
|
+
export const AlertAttributeSelect = ({ execResult, selectedAttribute, selectedValue, onAttributeChange, attributes, catalogAttributes, }) => {
|
|
11
|
+
const intl = useIntl();
|
|
12
|
+
const ref = useRef(null);
|
|
13
|
+
const selectedAttr = selectedAttribute && getSelectedCatalogAttribute(catalogAttributes, selectedAttribute);
|
|
14
|
+
const [searchString, setSearchString] = useState("");
|
|
15
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
16
|
+
const [isOpenAttribute, setIsOpenAttribute] = useState(null);
|
|
17
|
+
const { isResultLoading, getAttributeValues } = useAttributeValuesFromExecResults(execResult);
|
|
18
|
+
const opened = Boolean(isOpen && !isResultLoading);
|
|
19
|
+
return (React.createElement("div", { className: "gd-alert-attribute-select" },
|
|
20
|
+
React.createElement(Menu, { toggler: React.createElement("div", { ref: (item) => {
|
|
21
|
+
ref.current = item;
|
|
22
|
+
} },
|
|
23
|
+
React.createElement(Button, { className: cx("gd-alert-attribute-select__button s-alert-attribute-select", {
|
|
24
|
+
"is-active": opened,
|
|
25
|
+
}), size: "small", disabled: isResultLoading, variant: "secondary", iconLeft: "gd-icon-attribute", iconRight: `gd-icon-navigate${opened ? "up" : "down"}`, onClick: () => {
|
|
26
|
+
if (isResultLoading) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
setIsOpen(!isOpen);
|
|
30
|
+
setIsOpenAttribute(null);
|
|
31
|
+
} }, selectedAttribute ? (React.createElement("span", null,
|
|
32
|
+
selectedAttr?.title,
|
|
33
|
+
React.createElement("span", null,
|
|
34
|
+
"\u00A0",
|
|
35
|
+
"/",
|
|
36
|
+
"\u00A0"),
|
|
37
|
+
selectedValue
|
|
38
|
+
? selectedValue
|
|
39
|
+
: intl.formatMessage({ id: "insightAlert.config.selectAttribute" }))) : (React.createElement(React.Fragment, null, intl.formatMessage({ id: "insightAlert.config.selectAttribute" }))))), togglerWrapperClassName: "gd-alert-attribute-select__button_wrapper", opened: opened, onOpenedChange: ({ opened }) => {
|
|
40
|
+
setIsOpen(opened);
|
|
41
|
+
}, openAction: "click" },
|
|
42
|
+
React.createElement(ItemsWrapper, { style: {
|
|
43
|
+
width: ref.current?.offsetWidth ?? 0,
|
|
44
|
+
zIndex: DASHBOARD_DIALOG_OVERS_Z_INDEX,
|
|
45
|
+
}, className: IGNORED_CONFIGURATION_MENU_CLICK_CLASS },
|
|
46
|
+
React.createElement("div", { className: "gd-alert-attribute-select__submenu s-alert-attribute-menu-content" },
|
|
47
|
+
React.createElement(Item, { className: "gd-alert-attribute-select__menu-item_wrapper", checked: !selectedAttr, onClick: (e) => {
|
|
48
|
+
onAttributeChange(undefined, undefined);
|
|
49
|
+
setIsOpen(false);
|
|
50
|
+
setIsOpenAttribute(null);
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
} },
|
|
54
|
+
React.createElement("div", { className: "gd-alert-attribute-select__menu-item s-menu-alert-attribute-item-value" }, intl.formatMessage({ id: "insightAlert.config.selectAttribute" }))),
|
|
55
|
+
React.createElement(Separator, null),
|
|
56
|
+
attributes.map((attribute, i) => {
|
|
57
|
+
const item = getSelectedCatalogAttribute(catalogAttributes, attribute);
|
|
58
|
+
if (!item) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const isSelected = selectedAttr?.id === item.id;
|
|
62
|
+
const values = getAttributeValues(item);
|
|
63
|
+
return (React.createElement(SubMenu, { key: i, toggler: React.createElement(Item, { checked: isSelected, subMenu: true, className: "gd-alert-attribute-select__menu-item_wrapper" },
|
|
64
|
+
React.createElement("div", { className: "gd-alert-attribute-select__menu-item s-menu-alert-attribute-item" }, item.title)), openAction: "click", opened: isOpenAttribute === attribute.attribute.attribute.localIdentifier, onOpenedChange: ({ opened }) => {
|
|
65
|
+
setIsOpenAttribute(opened ? attribute.attribute.attribute.localIdentifier : null);
|
|
66
|
+
setSearchString("");
|
|
67
|
+
} },
|
|
68
|
+
React.createElement(ItemsWrapper, { style: {
|
|
69
|
+
zIndex: DASHBOARD_DIALOG_OVERS_Z_INDEX + 1,
|
|
70
|
+
}, className: IGNORED_CONFIGURATION_MENU_CLICK_CLASS },
|
|
71
|
+
React.createElement("div", { className: cx("gd-alert-attribute-select__submenu-content", "s-alert-attribute-submenu-content") },
|
|
72
|
+
values.length > 5 && (React.createElement("div", null,
|
|
73
|
+
React.createElement(InvertableSelectSearchBar, { onSearch: setSearchString, searchString: searchString, searchPlaceholder: intl.formatMessage({
|
|
74
|
+
id: "attributesDropdown.placeholder",
|
|
75
|
+
}), className: "gd-alert-attribute-select__menu-item_search" }))),
|
|
76
|
+
React.createElement(Item, { className: "gd-alert-attribute-select__menu-item_wrapper", checked: Boolean(isSelected && !selectedValue), onClick: (e) => {
|
|
77
|
+
onAttributeChange(attribute, undefined);
|
|
78
|
+
setIsOpen(false);
|
|
79
|
+
setIsOpenAttribute(null);
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
e.stopPropagation();
|
|
82
|
+
} },
|
|
83
|
+
React.createElement("div", { className: "gd-alert-attribute-select__menu-item s-menu-alert-attribute-item-value" },
|
|
84
|
+
intl.formatMessage({
|
|
85
|
+
id: "insightAlert.config.selectAttribute",
|
|
86
|
+
}),
|
|
87
|
+
" ",
|
|
88
|
+
"(",
|
|
89
|
+
values.length,
|
|
90
|
+
")")),
|
|
91
|
+
React.createElement(Separator, null),
|
|
92
|
+
React.createElement("div", { className: "gd-alert-attribute-select__menu-item__values" }, values
|
|
93
|
+
.filter((item) => {
|
|
94
|
+
if (searchString) {
|
|
95
|
+
return item.title
|
|
96
|
+
.toLowerCase()
|
|
97
|
+
.includes(searchString.toLowerCase());
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
})
|
|
101
|
+
.map((value, j) => (React.createElement(Item, { key: j, checked: Boolean(isSelected && value.value === selectedValue), className: "gd-alert-attribute-select__menu-item_wrapper", onClick: (e) => {
|
|
102
|
+
onAttributeChange(attribute, value.value);
|
|
103
|
+
setIsOpen(false);
|
|
104
|
+
setIsOpenAttribute(null);
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
e.stopPropagation();
|
|
107
|
+
} },
|
|
108
|
+
React.createElement("div", { className: "gd-alert-attribute-select__menu-item s-menu-alert-attribute-item-value" }, value.title ?? value.name)))))))));
|
|
109
|
+
}))))));
|
|
110
|
+
};
|
|
111
|
+
function getSelectedCatalogAttribute(catalogAttributes, attribute) {
|
|
112
|
+
const item = catalogAttributes.find((a) => {
|
|
113
|
+
const self = areObjRefsEqual(a.ref, attribute.attribute.attribute.displayForm);
|
|
114
|
+
const rf = a.displayForms.find((df) => areObjRefsEqual(df.ref, attribute.attribute.attribute.displayForm));
|
|
115
|
+
return self || rf;
|
|
116
|
+
});
|
|
117
|
+
if (!item) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
...item,
|
|
122
|
+
title: item?.title ?? getAttributeTitle(attribute.attribute),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=AlertAttributeSelecxt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertAttributeSelecxt.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertAttributeSelecxt.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EACH,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,SAAS,EACT,yBAAyB,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAA4B,MAAM,qBAAqB,CAAC;AAGhF,OAAO,EACH,8BAA8B,EAC9B,sCAAsC,G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AAC,SAAS,CAAC,SAAS,CAAC;KAC/D,CAAC;AACN,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IAutomationMetadataObjectDefinition, ICatalogMeasure, INotificationChannelMetadataObject, IWorkspaceUser } from "@gooddata/sdk-model";
|
|
3
|
-
import { AlertMetric } from "../../types.js";
|
|
2
|
+
import { IAttributeMetadataObject, IAutomationMetadataObjectDefinition, ICatalogMeasure, INotificationChannelMetadataObject, IWorkspaceUser } from "@gooddata/sdk-model";
|
|
3
|
+
import { AlertAttribute, AlertMetric } from "../../types.js";
|
|
4
|
+
import { IExecutionResultEnvelope } from "../../../../../model/index.js";
|
|
4
5
|
interface ICreateAlertProps {
|
|
6
|
+
canManageAttributes: boolean;
|
|
7
|
+
execResult: IExecutionResultEnvelope | undefined;
|
|
5
8
|
alert: IAutomationMetadataObjectDefinition | null;
|
|
6
9
|
onClose: () => void;
|
|
7
10
|
onCancel: () => void;
|
|
@@ -10,9 +13,11 @@ interface ICreateAlertProps {
|
|
|
10
13
|
users: IWorkspaceUser[];
|
|
11
14
|
hasAlerts: boolean;
|
|
12
15
|
measures: AlertMetric[];
|
|
16
|
+
attributes: AlertAttribute[];
|
|
13
17
|
maxAutomationsReached: boolean;
|
|
14
18
|
maxAutomationsRecipients: number;
|
|
15
19
|
catalogMeasures: ICatalogMeasure[];
|
|
20
|
+
catalogAttributes: IAttributeMetadataObject[];
|
|
16
21
|
}
|
|
17
22
|
export declare const CreateAlert: React.FC<ICreateAlertProps>;
|
|
18
23
|
export {};
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"CreateAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,wBAAwB,EAExB,mCAAmC,EACnC,eAAe,EACf,kCAAkC,EAClC,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,UAAU,iBAAiB;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,wBAAwB,EAAE,CAAC;CACjD;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqCnD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2022-2024 GoodData Corporation
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { EditAlert } from "./EditAlert.js";
|
|
4
|
-
export const CreateAlert = ({ alert, onClose, onCancel, onCreate, destinations, users, hasAlerts, measures, maxAutomationsReached, maxAutomationsRecipients, catalogMeasures, }) => {
|
|
5
|
-
return (React.createElement(EditAlert, { alert: alert, onClose: onClose, onCancel: onCancel, onCreate: onCreate, isNewAlert: true, destinations: destinations, users: users, hasAlerts: hasAlerts, measures: measures, maxAutomationsReached: maxAutomationsReached, maxAutomationsRecipients: maxAutomationsRecipients, catalogMeasures: catalogMeasures }));
|
|
4
|
+
export const CreateAlert = ({ canManageAttributes, execResult, alert, onClose, onCancel, onCreate, destinations, users, hasAlerts, measures, attributes, maxAutomationsReached, maxAutomationsRecipients, catalogMeasures, catalogAttributes, }) => {
|
|
5
|
+
return (React.createElement(EditAlert, { canManageAttributes: canManageAttributes, execResult: execResult, alert: alert, onClose: onClose, onCancel: onCancel, onCreate: onCreate, isNewAlert: true, destinations: destinations, users: users, hasAlerts: hasAlerts, measures: measures, attributes: attributes, maxAutomationsReached: maxAutomationsReached, maxAutomationsRecipients: maxAutomationsRecipients, catalogMeasures: catalogMeasures, catalogAttributes: catalogAttributes }));
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=CreateAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAlert.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateAlert.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAqB3C,MAAM,CAAC,MAAM,WAAW,GAAgC,CAAC,EACrD,mBAAmB,EACnB,UAAU,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,GACpB,EAAE,EAAE;IACD,OAAO,CACH,oBAAC,SAAS,IACN,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAkC,EACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,UAAU,QACV,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,qBAAqB,EAAE,qBAAqB,EAC5C,wBAAwB,EAAE,wBAAwB,EAClD,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,GACtC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IAutomationMetadataObject, IAutomationMetadataObjectDefinition, ICatalogMeasure, INotificationChannelMetadataObject, IWorkspaceUser } from "@gooddata/sdk-model";
|
|
2
|
+
import { IAttributeMetadataObject, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, ICatalogMeasure, INotificationChannelMetadataObject, IWorkspaceUser } from "@gooddata/sdk-model";
|
|
3
3
|
import { OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import { AlertMetric } from "../../types.js";
|
|
4
|
+
import { AlertAttribute, AlertMetric } from "../../types.js";
|
|
5
|
+
import { IExecutionResultEnvelope } from "../../../../../model/index.js";
|
|
5
6
|
interface IEditAlertProps {
|
|
7
|
+
canManageAttributes: boolean;
|
|
8
|
+
execResult: IExecutionResultEnvelope | undefined;
|
|
6
9
|
alert: IAutomationMetadataObject;
|
|
7
10
|
isNewAlert?: boolean;
|
|
8
11
|
hasAlerts: boolean;
|
|
9
12
|
destinations: INotificationChannelMetadataObject[];
|
|
10
13
|
users: IWorkspaceUser[];
|
|
11
14
|
measures: AlertMetric[];
|
|
15
|
+
attributes: AlertAttribute[];
|
|
12
16
|
catalogMeasures: ICatalogMeasure[];
|
|
17
|
+
catalogAttributes: IAttributeMetadataObject[];
|
|
13
18
|
onClose: () => void;
|
|
14
19
|
onCancel: () => void;
|
|
15
20
|
onCreate?: (alert: IAutomationMetadataObjectDefinition) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,eAAe,EACf,kCAAkC,EAClC,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAMH,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAAE,WAAW,EAA6B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,wBAAwB,EACxB,yBAAyB,EACzB,mCAAmC,EACnC,eAAe,EACf,kCAAkC,EAClC,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAMH,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAAE,cAAc,EAAE,WAAW,EAA6B,MAAM,gBAAgB,CAAC;AAcxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAkBzE,UAAU,eAAe;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,yBAAyB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,wBAAwB,EAAE,CAAC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC7C;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkP/C,CAAC"}
|
|
@@ -10,8 +10,9 @@ import { useEditAlert } from "./hooks/useEditAlert.js";
|
|
|
10
10
|
import { defineMessages, FormattedMessage, useIntl } from "react-intl";
|
|
11
11
|
import { AlertMetricComparatorType } from "../../types.js";
|
|
12
12
|
import { useAlertValidation } from "./hooks/useAlertValidation.js";
|
|
13
|
-
import { getAlertCompareOperator, getAlertMeasure, getAlertRelativeOperator, getAlertThreshold, getValueSuffix, isChangeOrDifferenceOperator, } from "./utils.js";
|
|
13
|
+
import { getAlertAttribute, getAlertCompareOperator, getAlertFilters, getAlertMeasure, getAlertRelativeOperator, getAlertThreshold, getValueSuffix, isChangeOrDifferenceOperator, } from "./utils.js";
|
|
14
14
|
import { RecipientsSelect } from "../../../../scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js";
|
|
15
|
+
import { AlertAttributeSelect } from "./AlertAttributeSelecxt.js";
|
|
15
16
|
const TOOLTIP_ALIGN_POINTS = [{ align: "cl cr" }, { align: "cr cl" }];
|
|
16
17
|
const messages = defineMessages({
|
|
17
18
|
invalidDefault: {
|
|
@@ -25,26 +26,29 @@ const invalidMessagesObj = {
|
|
|
25
26
|
missingMetric: messages.invalidDefault,
|
|
26
27
|
missingWidget: messages.invalidWidget,
|
|
27
28
|
};
|
|
28
|
-
export const EditAlert = ({ alert, isNewAlert, hasAlerts, destinations, users, measures, onClose, onCancel, onCreate, onUpdate, maxAutomationsReached = false, maxAutomationsRecipients, overlayPositionType, catalogMeasures, }) => {
|
|
29
|
+
export const EditAlert = ({ alert, execResult, isNewAlert, hasAlerts, destinations, users, attributes, measures, onClose, onCancel, onCreate, onUpdate, maxAutomationsReached = false, maxAutomationsRecipients, overlayPositionType, catalogMeasures, catalogAttributes, canManageAttributes, }) => {
|
|
29
30
|
const { viewMode, updatedAlert, canSubmit, showRecipientsSelect, warningMessage,
|
|
30
31
|
//
|
|
31
|
-
changeComparisonOperator, changeRelativeOperator, changeMeasure, changeValue, changeDestination, changeRecipients,
|
|
32
|
+
changeComparisonOperator, changeRelativeOperator, changeMeasure, changeAttribute, changeValue, changeDestination, changeRecipients,
|
|
32
33
|
//
|
|
33
34
|
configureAlert, saveAlertConfiguration, cancelAlertConfiguration,
|
|
34
35
|
//
|
|
35
36
|
createAlert, updateAlert, } = useEditAlert({
|
|
36
37
|
metrics: measures,
|
|
38
|
+
attributes,
|
|
37
39
|
alert,
|
|
38
40
|
onCreate,
|
|
39
41
|
onUpdate,
|
|
40
42
|
catalogMeasures,
|
|
43
|
+
catalogAttributes,
|
|
41
44
|
destinations,
|
|
42
45
|
});
|
|
43
46
|
const intl = useIntl();
|
|
44
47
|
const disableCreateButtonDueToLimits = isNewAlert && maxAutomationsReached;
|
|
45
48
|
const selectedMeasure = getAlertMeasure(measures, updatedAlert.alert);
|
|
49
|
+
const [selectedAttribute, selectedValue] = getAlertAttribute(attributes, updatedAlert);
|
|
50
|
+
const filters = getAlertFilters(updatedAlert);
|
|
46
51
|
const { isValid, invalidityReason } = useAlertValidation(alert, isNewAlert);
|
|
47
|
-
const filters = alert.alert?.execution?.filters ?? [];
|
|
48
52
|
return viewMode === "edit" ? (React.createElement(DashboardInsightSubmenuContainer, { title: isNewAlert
|
|
49
53
|
? intl.formatMessage({ id: "insightAlert.config.createAlert" })
|
|
50
54
|
: intl.formatMessage({ id: "insightAlert.config.editAlert" }), onClose: onClose, onBack: hasAlerts ? onCancel : undefined },
|
|
@@ -54,6 +58,10 @@ export const EditAlert = ({ alert, isNewAlert, hasAlerts, destinations, users, m
|
|
|
54
58
|
React.createElement("div", { className: "gd-edit-alert__measure-label" },
|
|
55
59
|
React.createElement(FormattedMessage, { id: "insightAlert.config.when" })),
|
|
56
60
|
React.createElement(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: changeMeasure, measures: measures, overlayPositionType: overlayPositionType }),
|
|
61
|
+
Boolean(canManageAttributes && attributes.length > 0) && (React.createElement(React.Fragment, null,
|
|
62
|
+
React.createElement("div", { className: "gd-edit-alert__measure-label" },
|
|
63
|
+
React.createElement(FormattedMessage, { id: "insightAlert.config.for" })),
|
|
64
|
+
React.createElement(AlertAttributeSelect, { execResult: execResult, selectedAttribute: selectedAttribute, selectedValue: selectedValue, onAttributeChange: changeAttribute, attributes: attributes, catalogAttributes: catalogAttributes }))),
|
|
57
65
|
filters.length > 0 && (React.createElement("div", { className: "gd-edit-alert__measure-info" },
|
|
58
66
|
React.createElement(FormattedMessage, { id: "insightAlert.config.filters", values: {
|
|
59
67
|
n: filters.length,
|