@gooddata/sdk-ui-dashboard 11.52.0-alpha.5 → 11.52.0-alpha.7
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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +8 -7
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +8 -7
- package/esm/kdaDialog/composition/hooks/usePeriodChangeHandler.js +5 -0
- package/esm/model/commandHandlers/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/index.js +2 -0
- package/esm/model/commandHandlers/widgets/changeVisualizationSwitcherActiveVisualizationHandler.d.ts +6 -0
- package/esm/model/commandHandlers/widgets/changeVisualizationSwitcherActiveVisualizationHandler.d.ts.map +1 -0
- package/esm/model/commandHandlers/widgets/changeVisualizationSwitcherActiveVisualizationHandler.js +12 -0
- package/esm/model/commands/base.d.ts +1 -1
- package/esm/model/commands/base.d.ts.map +1 -1
- package/esm/model/commands/index.d.ts +2 -2
- package/esm/model/commands/index.d.ts.map +1 -1
- package/esm/model/commands/visualizationSwitcher.d.ts +33 -0
- package/esm/model/commands/visualizationSwitcher.d.ts.map +1 -1
- package/esm/model/commands/visualizationSwitcher.js +21 -0
- package/esm/model/events/base.d.ts +1 -1
- package/esm/model/events/base.d.ts.map +1 -1
- package/esm/model/events/index.d.ts +2 -2
- package/esm/model/events/index.d.ts.map +1 -1
- package/esm/model/events/visualizationSwitcher.d.ts +34 -0
- package/esm/model/events/visualizationSwitcher.d.ts.map +1 -1
- package/esm/model/events/visualizationSwitcher.js +21 -0
- package/esm/model/react/useDashboardCommand.d.ts +1 -0
- package/esm/model/react/useDashboardCommand.d.ts.map +1 -1
- package/esm/model/react/useDashboardCommandProcessing.d.ts +4 -0
- package/esm/model/react/useDashboardCommandProcessing.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.d.ts +6 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -0
- package/esm/model/store/keyDriverAnalysis/const.d.ts +6 -6
- package/esm/model/store/keyDriverAnalysis/const.d.ts.map +1 -1
- package/esm/model/store/keyDriverAnalysis/const.js +12 -26
- package/esm/model/store/ui/index.d.ts +4 -0
- package/esm/model/store/ui/index.d.ts.map +1 -1
- package/esm/model/store/ui/uiReducers.d.ts +7 -0
- package/esm/model/store/ui/uiReducers.d.ts.map +1 -1
- package/esm/model/store/ui/uiReducers.js +6 -0
- package/esm/model/store/ui/uiSelectors.d.ts +8 -0
- package/esm/model/store/ui/uiSelectors.d.ts.map +1 -1
- package/esm/model/store/ui/uiSelectors.js +10 -0
- package/esm/model/store/ui/uiState.d.ts +6 -0
- package/esm/model/store/ui/uiState.d.ts.map +1 -1
- package/esm/model/store/ui/uiState.js +1 -0
- package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
- package/esm/model/store/widgetDrills/widgetDrillSelectors.js +5 -5
- package/esm/presentation/automations/alerting/AlertingDialog.d.ts +3 -0
- package/esm/presentation/automations/alerting/AlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/AlertingDialog.js +5 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +10 -7
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +36 -16
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts +9 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.js +9 -0
- package/esm/presentation/automations/alerting/state/AlertActionsContext.d.ts +23 -0
- package/esm/presentation/automations/alerting/state/AlertActionsContext.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/AlertActionsContext.js +19 -0
- package/esm/presentation/automations/alerting/state/AlertDataContext.d.ts +24 -0
- package/esm/presentation/automations/alerting/state/AlertDataContext.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/AlertDataContext.js +19 -0
- package/esm/presentation/automations/alerting/state/AlertDraftContext.d.ts +24 -0
- package/esm/presentation/automations/alerting/state/AlertDraftContext.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/AlertDraftContext.js +19 -0
- package/esm/presentation/automations/alerting/state/AlertFiltersContext.d.ts +26 -0
- package/esm/presentation/automations/alerting/state/AlertFiltersContext.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/AlertFiltersContext.js +19 -0
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts +25 -0
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.js +172 -0
- package/esm/presentation/automations/alerting/state/missingAlertStateProvider.d.ts +7 -0
- package/esm/presentation/automations/alerting/state/missingAlertStateProvider.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/missingAlertStateProvider.js +9 -0
- package/esm/presentation/automations/alerting/state/useAlertDialogValidity.d.ts +15 -0
- package/esm/presentation/automations/alerting/state/useAlertDialogValidity.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/useAlertDialogValidity.js +45 -0
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFiltersModel.d.ts +2 -2
- package/esm/presentation/automations/alerting/state/useAlertFiltersModel.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFiltersModel.js +3 -3
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormState.d.ts +4 -4
- package/esm/presentation/automations/alerting/state/useAlertFormState.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormState.js +8 -8
- package/esm/presentation/automations/alerting/state/useAlertFormValidation.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormValidation.js +3 -3
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSelectedValues.d.ts +17 -7
- package/esm/presentation/automations/alerting/state/useAlertSelectedValues.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSelectedValues.js +27 -4
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSupportedMetrics.d.ts +3 -3
- package/esm/presentation/automations/alerting/state/useAlertSupportedMetrics.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSupportedMetrics.js +5 -5
- package/esm/presentation/automations/alerting/types.d.ts +15 -1
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +26 -0
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +26 -0
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +10 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +9 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +19 -17
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.d.ts +3 -0
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.js +5 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts +22 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js +150 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts +28 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.js +20 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts +25 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.js +20 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts +25 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.js +20 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts +26 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.js +20 -0
- package/esm/presentation/automations/scheduledEmail/state/exportDefinitions.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/utils → state}/exportDefinitions.js +1 -1
- package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.d.ts +7 -0
- package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.js +9 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailEffectiveFilters.d.ts +2 -2
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailEffectiveFilters.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailEffectiveFilters.js +4 -4
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailExportSettings.d.ts +12 -25
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailExportSettings.js +38 -86
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts → state/useScheduledEmailFiltersModel.d.ts} +7 -7
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.js → state/useScheduledEmailFiltersModel.js} +26 -9
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormState.js +25 -25
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormValidity.js +3 -3
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportAttachments.d.ts +39 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportAttachments.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportAttachments.js +102 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.d.ts +13 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.js +34 -0
- package/esm/presentation/automations/scheduledEmail/types.d.ts +15 -1
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.js +2 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts +2 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +6 -2
- package/esm/presentation/drill/utils/kdaUtils.d.ts +1 -1
- package/esm/presentation/drill/utils/kdaUtils.d.ts.map +1 -1
- package/esm/presentation/drill/utils/kdaUtils.js +6 -5
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts +1 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +2 -2
- package/esm/presentation/filterBar/dateFilter/types.d.ts +8 -1
- package/esm/presentation/filterBar/dateFilter/types.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/types.js +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +11 -2
- package/esm/sdk-ui-dashboard.d.ts +240 -28
- package/package.json +21 -21
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFiltersModel.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormValidation.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +0 -69
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +0 -145
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +0 -89
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +0 -131
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailExportSettings.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormValidity.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/utils/exportDefinitions.d.ts.map +0 -1
- /package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormValidation.d.ts +0 -0
- /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/utils → state}/exportDefinitions.d.ts +0 -0
- /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormState.d.ts +0 -0
- /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormValidity.d.ts +0 -0
|
@@ -121,6 +121,12 @@ export interface IUiState {
|
|
|
121
121
|
/** @internal */
|
|
122
122
|
draggingWidgetTriggeringDropZoneType: DropZoneType | undefined;
|
|
123
123
|
widgetsOverlay: Record<string, IDashboardWidgetOverlay>;
|
|
124
|
+
/**
|
|
125
|
+
* Map of widget reference to the identifier of the active visualization.
|
|
126
|
+
* This is used for VisualizationSwitcherWidget to track which visualization is currently selected.
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
visualizationSwitcherActiveVisualizations: Record<string, string>;
|
|
124
130
|
}
|
|
125
131
|
export declare const uiInitialState: IUiState;
|
|
126
132
|
//# sourceMappingURL=uiState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiState.d.ts","sourceRoot":"","sources":["../../../../src/model/store/ui/uiState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,KAAK,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAChD,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC,EAAE,MAAM,EAAE,CAAC;IAC9C,WAAW,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,KAAK,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,6BAA6B,EAAE;QAC3B,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,CAAC,EAAE,qBAAqB,CAAC;KACnC,CAAC;IAC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C/C,CAAC;IACF,aAAa;IACb,uBAAuB,EAAE;QACrB,sBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,wBAAwB,EAAE,MAAM,EAAE,CAAC;QACnC,qCAAqC,EAAE,mCAAmC,EAAE,CAAC;KAChF,CAAC;IACF;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE;QACZ,IAAI,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,gBAAgB;IAChB,oBAAoB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACtD,oBAAoB,EAAE,eAAe,GAAG,SAAS,CAAC;IAClD,gBAAgB;IAChB,oCAAoC,EAAE,YAAY,GAAG,SAAS,CAAC;IAC/D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACxD;;;;OAIG;IACH,yCAAyC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrE;AAED,eAAO,MAAM,cAAc,EAAE,QAqF5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EASH,KAAK,mBAAmB,EAGxB,KAAK,MAAM,EAad,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,aAAa,EAGlB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACxB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,4CAA4C,EACpD,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EASH,KAAK,mBAAmB,EAGxB,KAAK,MAAM,EAad,MAAM,q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eAAO,MAAM,+BAA+B,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,iBAAiB,CAAC,aAAa,EAAE,CAkC3F,CAAC;AAMN;;GAEG;AACH,eAAO,MAAM,2CAA2C,EAAE,CACtD,qBAAqB,EAAE,sBAAsB,GAAG,SAAS,EACzD,2BAA2B,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAC9D,mBAAmB,EAAE,OAAO,GAAG,SAAS,KACvC,iBAAiB,CAAC,4BAA4B,EAAE,CA4CpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2CAA2C,EAAE,CACtD,qBAAqB,EAAE,sBAAsB,GAAG,SAAS,EACzD,2BAA2B,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAC9D,mBAAmB,EAAE,OAAO,GAAG,SAAS,KACvC,iBAAiB,CAAC,gBAAgB,EAAE,CAgBxC,CAAC"}
|
|
@@ -10,11 +10,11 @@ import { createMemoizedSelector } from "../_infra/selectors.js";
|
|
|
10
10
|
import { selectAccessibleDashboardsLoaded, selectAccessibleDashboardsMap, } from "../accessibleDashboards/accessibleDashboardsSelectors.js";
|
|
11
11
|
import { selectBackendCapabilities, selectSupportsAttributeHierarchies, selectSupportsCrossFiltering, } from "../backendCapabilities/backendCapabilitiesSelectors.js";
|
|
12
12
|
import { selectAllCatalogAttributeHierarchies, selectAllCatalogAttributesMap, selectAllCatalogDisplayFormsMap, selectAttributesWithDisplayFormLink, selectAttributesWithHierarchyDescendants, selectCatalogDateAttributes, selectCatalogIsLoaded, } from "../catalog/catalogSelectors.js";
|
|
13
|
-
import { selectDisableDefaultDrills, selectEnableDrillToUrlByDefault, selectEnableKda, selectIsDisabledCrossFiltering, selectIsDisabledKda, selectIsEmbedded, } from "../config/configSelectors.js";
|
|
13
|
+
import { selectDisableDefaultDrills, selectEnableDrillToUrlByDefault, selectEnableKda, selectEnableSecondGranularities, selectIsDisabledCrossFiltering, selectIsDisabledKda, selectIsEmbedded, } from "../config/configSelectors.js";
|
|
14
14
|
import { selectDrillableItems } from "../drill/drillSelectors.js";
|
|
15
15
|
import { selectDrillTargetsByWidgetRef } from "../drillTargets/drillTargetsSelectors.js";
|
|
16
16
|
import { selectInsightByWidgetRef, selectInsightsMap } from "../insights/insightsSelectors.js";
|
|
17
|
-
import {
|
|
17
|
+
import { getKeyDriverAnalysisSupportedGranularities } from "../keyDriverAnalysis/const.js";
|
|
18
18
|
import { selectDisableDashboardCrossFiltering, selectDisableDashboardKda } from "../meta/metaSelectors.js";
|
|
19
19
|
import { selectIgnoredDrillDownHierarchiesByWidgetRef, selectIgnoredDrillToUrlAttributesByWidgetRef, selectWidgetDrills, } from "../tabs/layout/layoutSelectors.js";
|
|
20
20
|
function drillDefinitionToPredicates(drill) {
|
|
@@ -238,7 +238,7 @@ const selectCrossFilteringByWidgetRef = createMemoizedSelector((ref) => createSe
|
|
|
238
238
|
predicates: [...attributePredicates, ...measurePredicates],
|
|
239
239
|
};
|
|
240
240
|
}));
|
|
241
|
-
const selectKdaByWidgetRef = createMemoizedSelector((ref) => createSelector(selectEnableKda, selectDrillTargetsByWidgetRef(ref), selectDisableDashboardKda, selectIsDisabledKda, selectDrillableItems, selectCatalogDateAttributes, selectInsightByWidgetRef(ref), (isKdaEnabled, availableDrillTargets, disableKda, disableKdaByConfig, drillableItems, dateAttributes, widgetInsight) => {
|
|
241
|
+
const selectKdaByWidgetRef = createMemoizedSelector((ref) => createSelector(selectEnableKda, selectEnableSecondGranularities, selectDrillTargetsByWidgetRef(ref), selectDisableDashboardKda, selectIsDisabledKda, selectDrillableItems, selectCatalogDateAttributes, selectInsightByWidgetRef(ref), (isKdaEnabled, enableSecondGranularities, availableDrillTargets, disableKda, disableKdaByConfig, drillableItems, dateAttributes, widgetInsight) => {
|
|
242
242
|
if (!isKdaEnabled ||
|
|
243
243
|
disableKda ||
|
|
244
244
|
disableKdaByConfig ||
|
|
@@ -259,8 +259,8 @@ const selectKdaByWidgetRef = createMemoizedSelector((ref) => createSelector(sele
|
|
|
259
259
|
const date = availableDrillAttributesWithDates[0];
|
|
260
260
|
const dateAttribute = dateAttributes.find((a) => areObjRefsEqual(a.defaultDisplayForm.ref, date.attribute.attributeHeader.ref) ||
|
|
261
261
|
a.attribute.displayForms.some((df) => areObjRefsEqual(df.ref, date.attribute.attributeHeader.ref)));
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
const supportedGranularities = getKeyDriverAnalysisSupportedGranularities(enableSecondGranularities);
|
|
263
|
+
if (!dateAttribute || !supportedGranularities.includes(dateAttribute.granularity)) {
|
|
264
264
|
return undefined;
|
|
265
265
|
}
|
|
266
266
|
// construct predicates for all available attributes and measures
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
import { type IAlertingDialogProps } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
+
* Resolves the dialog component from DashboardComponentsContext and mounts it under the
|
|
5
|
+
* alerting dialog's state contexts.
|
|
6
|
+
*
|
|
4
7
|
* @internal
|
|
5
8
|
*/
|
|
6
9
|
export declare function AlertingDialog(props: IAlertingDialogProps): ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/AlertingDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertingDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/AlertingDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAQxE"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
|
|
3
|
+
import { AlertingDialogStateProvider } from "./state/AlertingDialogStateProvider.js";
|
|
3
4
|
/**
|
|
5
|
+
* Resolves the dialog component from DashboardComponentsContext and mounts it under the
|
|
6
|
+
* alerting dialog's state contexts.
|
|
7
|
+
*
|
|
4
8
|
* @internal
|
|
5
9
|
*/
|
|
6
10
|
export function AlertingDialog(props) {
|
|
7
11
|
const { AlertingDialogComponent } = useDashboardComponentsContext();
|
|
8
|
-
return _jsx(AlertingDialogComponent, { ...props });
|
|
12
|
+
return (_jsx(AlertingDialogStateProvider, { children: _jsx(AlertingDialogComponent, { ...props }) }));
|
|
9
13
|
}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { type IAlertingDialogProps } from "../types.js";
|
|
2
|
-
export declare function AlertingDialogRenderer({ onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess }: IAlertingDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function AlertingDialogRenderer({ onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess, topContent, bottomContent }: IAlertingDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
/**
|
|
4
4
|
* Default implementation of the alerting create/edit dialog.
|
|
5
5
|
*
|
|
6
|
-
* This component is a pure consumer of `AutomationsContext
|
|
7
|
-
* org/workspace data
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* This component is a pure consumer of `AutomationsContext`, `AlertingDialogContext`, and the
|
|
7
|
+
* alerting dialog state contexts: it reads org/workspace data, per-dialog state, and the alert
|
|
8
|
+
* draft's state from those contexts rather than from the dashboard store. It must therefore be
|
|
9
|
+
* rendered within an `AutomationsContextProvider`, an `AlertingDialogContextProvider` (for the
|
|
10
|
+
* create/edit flow), and an `AlertingDialogStateProvider`. Inside a `Dashboard`, the alerting
|
|
11
|
+
* connector supplies the first two providers above the `AlertingDialogComponent` slot, and mounts
|
|
12
|
+
* `AlertingDialogStateProvider` around the resolved slot component once
|
|
13
|
+
* `useAlertingDialogContext().isLoading` is false — so the default component, and any wholesale
|
|
14
|
+
* slot replacement, inherit all three contexts automatically and require no extra wiring.
|
|
12
15
|
*
|
|
13
16
|
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
14
17
|
* that is what lets a wholesale replacement receive the same contexts. Rendering this component
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"AA8CA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA4BxD,wBAAgB,sBAAsB,CAAC,EACnC,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EACT,WAAW,EACX,aAAa,EACb,UAAU,EACV,aAAa,EAChB,EAAE,oBAAoB,2CA0iBtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,2CAchE"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js
CHANGED
|
@@ -12,6 +12,12 @@ import { RecipientsSelect } from "../../scheduledEmail/DefaultScheduledEmailDial
|
|
|
12
12
|
import { ApplyCurrentFiltersConfirmDialog } from "../../shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js";
|
|
13
13
|
import { AutomationFiltersSelect } from "../../shared/automationFilters/components/AutomationFiltersSelect.js";
|
|
14
14
|
import { DeleteAlertConfirmDialog } from "../DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.js";
|
|
15
|
+
import { useAlertActions } from "../state/AlertActionsContext.js";
|
|
16
|
+
import { useAlertData } from "../state/AlertDataContext.js";
|
|
17
|
+
import { useAlertDraft } from "../state/AlertDraftContext.js";
|
|
18
|
+
import { useAlertFilters } from "../state/AlertFiltersContext.js";
|
|
19
|
+
import { useAlertDialogValidity } from "../state/useAlertDialogValidity.js";
|
|
20
|
+
import { useAlertSelectedValues } from "../state/useAlertSelectedValues.js";
|
|
15
21
|
import { AlertingDialogHeader } from "./AlertingDialogHeader.js";
|
|
16
22
|
import { AlertAttributeSelect } from "./components/AlertAttributeSelect.js";
|
|
17
23
|
import { AlertComparisonOperatorSelect } from "./components/AlertComparisonOperatorSelect.js";
|
|
@@ -28,27 +34,39 @@ import { AlertTriggerModeSelect } from "./components/AlertTriggerModeSelect.js";
|
|
|
28
34
|
import { ALERTING_DIALOG_ID } from "./constants.js";
|
|
29
35
|
import { DefaultLoadingAlertingDialog } from "./DefaultLoadingAlertingDialog.js";
|
|
30
36
|
import { useAlertSubmit } from "./hooks/useAlertSubmit.js";
|
|
31
|
-
import {
|
|
37
|
+
import { useAlertThreshold } from "./hooks/useAlertThreshold.js";
|
|
32
38
|
import { getValueSuffix } from "./utils/getters.js";
|
|
33
39
|
import { isAnomalyDetection, isChangeOrDifferenceOperator } from "./utils/guards.js";
|
|
34
40
|
import { isMobileView } from "./utils/responsive.js";
|
|
35
41
|
const OVERLAY_POSITION_TYPE = "sameAsTarget";
|
|
36
42
|
const CLOSE_ON_PARENT_SCROLL = true;
|
|
37
43
|
const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z_INDEX);
|
|
38
|
-
export function AlertingDialogRenderer({ onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess, }) {
|
|
44
|
+
export function AlertingDialogRenderer({ onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess, topContent, bottomContent, }) {
|
|
39
45
|
const intl = useIntl();
|
|
40
46
|
const dialogTitleRef = useRef(null);
|
|
41
|
-
const { isWhiteLabeled, isSecondaryTitleVisible, externalRecipient: externalRecipientOverride, maxAutomationsRecipients, isExecutionTimestampMode, features: { enableAlertOncePerInterval, enableAnomalyDetectionAlert, canUseAiAssistant: enableAiAssistant, }, } = useAutomationsContext();
|
|
42
|
-
const { widgetTitle, alertToEdit } = useAlertingDialogContext();
|
|
47
|
+
const { isWhiteLabeled, isSecondaryTitleVisible, externalRecipient: externalRecipientOverride, maxAutomationsRecipients, isExecutionTimestampMode, features: { enableAlertOncePerInterval, enableAnomalyDetectionAlert, canUseAiAssistant: enableAiAssistant, }, catalogAttributes, catalogDateDatasets, separators, allowHourlyRecurrence, } = useAutomationsContext();
|
|
48
|
+
const { widgetTitle, alertToEdit, notificationChannels } = useAlertingDialogContext();
|
|
43
49
|
const [alertToDelete, setAlertToDelete] = useState(null);
|
|
44
50
|
const handleAlertDeleteSuccess = (alert) => {
|
|
45
51
|
onDeleteSuccess?.(alert);
|
|
46
52
|
setAlertToDelete(null);
|
|
47
53
|
};
|
|
48
|
-
const {
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
const { editedAutomation, originalAutomation, warningMessage } = useAlertDraft();
|
|
55
|
+
const { onTitleChange, onRecipientsChange, onMeasureChange, onAttributeChange, onComparisonOperatorChange, onRelativeOperatorChange, onAnomalyDetectionChange, onComparisonTypeChange, onDestinationChange, onTriggerModeChange, onTriggerIntervalChange, onSensitivityChange, onGranularityChange, setEditedAutomation, } = useAlertActions();
|
|
56
|
+
const { supportedMeasures, supportedAttributes, isResultLoading, getAttributeValues, defaultUser, getMetricValue, } = useAlertData();
|
|
57
|
+
const { selectedFilters, availableFilters, onFiltersChange, onApplyCurrentFilters, automationIsValid, filtersAreStale, automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd, dropStaleParameters, } = useAlertFilters();
|
|
58
|
+
const { selectedMeasure, selectedComparisonOperator, selectedRelativeOperator, selectedAiOperator, selectedComparator, selectedSensitivity, selectedGranularity, selectedAttribute, selectedValue, allowExternalRecipients, allowOnlyLoggedUserRecipients, } = useAlertSelectedValues();
|
|
59
|
+
const { value, onChange, onBlur, thresholdErrorMessage } = useAlertThreshold({
|
|
60
|
+
setEditedAutomation,
|
|
61
|
+
editedAutomation,
|
|
62
|
+
getMetricValue,
|
|
63
|
+
isNewAlert: !alertToEdit,
|
|
64
|
+
selectedRelativeOperator,
|
|
65
|
+
selectedMeasure,
|
|
66
|
+
selectedAttribute,
|
|
67
|
+
selectedValue,
|
|
51
68
|
});
|
|
69
|
+
const { isSubmitDisabled, validationErrorMessage, isParentValid, canChangeMeasure, isInvalidConnectionToInsight, } = useAlertDialogValidity();
|
|
52
70
|
const [isApplyCurrentFiltersDialogOpen, setIsApplyCurrentFiltersDialogOpen] = useState(!automationIsValid);
|
|
53
71
|
const { isSaving, submit } = useAlertSubmit({
|
|
54
72
|
editedAutomation,
|
|
@@ -113,8 +131,7 @@ export function AlertingDialogRenderer({ onCancel, onDeleteSuccess, onDeleteErro
|
|
|
113
131
|
: undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: () => void submit(), headline: undefined, headerLeftButtonRenderer: () => (_jsx(AlertingDialogHeader, { title: editedAutomation?.title ?? "", onChange: onTitleChange, onCancel: onCancel, placeholder: intl.formatMessage({
|
|
114
132
|
id: "dialogs.alert.title.placeholder",
|
|
115
133
|
}), ref: dialogTitleRef, secondaryTitle: secondaryTitle, secondaryTitleIcon: secondaryTitleIcon, isSecondaryTitleVisible: isSecondaryTitleVisible ? isParentValid : undefined })), children: [
|
|
116
|
-
_jsx("h2", { className: "sr-only", id: titleElementId, children: intl.formatMessage({ id: "dialogs.alert.accessibility.label.title" }) }), _jsxs(ScrollablePanel, { className: "gd-notifications-channel-dialog-content-wrapper gd-notification-channel-dialog-with-automation-filters", children: [
|
|
117
|
-
_jsx("div", { className: "gd-divider-with-margin" }), _jsxs(_Fragment, { children: [
|
|
134
|
+
_jsx("h2", { className: "sr-only", id: titleElementId, children: intl.formatMessage({ id: "dialogs.alert.accessibility.label.title" }) }), _jsxs(ScrollablePanel, { className: "gd-notifications-channel-dialog-content-wrapper gd-notification-channel-dialog-with-automation-filters", children: [topContent, _jsx("div", { className: "gd-divider-with-margin" }), _jsxs(_Fragment, { children: [
|
|
118
135
|
_jsx(AutomationFiltersSelect, { availableFilters: availableFilters, selectedFilters: selectedFilters, onFiltersChange: onFiltersChange, storeFilters: true, onStoreFiltersChange: () => { }, isDashboardAutomation: false, overlayPositionType: OVERLAY_POSITION_TYPE, disableDateFilters: isAnomalyDetection(editedAutomation?.alert), parameters: automationParameters, onParameterChange: onParameterChange, onParameterDelete: onParameterDelete, availableParameters: availableParameters, onParameterAdd: onParameterAdd }), _jsx(ContentDivider, { className: "gd-divider-with-margin" })
|
|
119
136
|
] }), _jsxs(FormFieldGroup, { label: _jsx(FormattedMessage, { id: "insightAlert.config.when" }), children: [
|
|
120
137
|
_jsx(FormField, { label: intl.formatMessage({ id: "insightAlert.config.metric" }), htmlFor: "alert.measure", children: _jsx(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: onMeasureChange, measures: supportedMeasures, disabled: !canChangeMeasure, overlayPositionType: OVERLAY_POSITION_TYPE, id: "alert.measure", closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), supportedAttributes.filter((a) => a.type === "attribute").length > 0 && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.for" }), htmlFor: "alert.attribute", children: _jsx(AlertAttributeSelect, { id: "alert.attribute", disabled: !canChangeMeasure, selectedAttribute: selectedAttribute, selectedValue: selectedValue, onAttributeChange: onAttributeChange, attributes: supportedAttributes, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, getAttributeValues: getAttributeValues, isResultLoading: isResultLoading, showLabel: false, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) })), _jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.condition" }), htmlFor: "alert.condition", children: _jsx(AlertComparisonOperatorSelect, { id: "alert.condition", measure: selectedMeasure, enableAnomalyDetectionAlert: enableAnomalyDetectionAlert ? enableAiAssistant : false, selectedComparisonOperator: selectedComparisonOperator, selectedRelativeOperator: selectedRelativeOperator, selectedAiOperator: selectedAiOperator, onAnomalyDetectionChange: onAnomalyDetectionChange, onComparisonOperatorChange: onComparisonOperatorChange, onRelativeOperatorChange: onRelativeOperatorChange, overlayPositionType: OVERLAY_POSITION_TYPE, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), !isAnomalyDetection(editedAutomation?.alert) && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.threshold" }), htmlFor: "alert.value", children: _jsx(AlertThresholdInput, { id: "alert.value", value: value, onChange: onChange, onBlur: onBlur, suffix: getValueSuffix(editedAutomation?.alert), errorMessage: thresholdErrorMessage }) })), isChangeOrDifferenceOperator(editedAutomation?.alert) && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.comparison" }), htmlFor: "alert.comparison", children: _jsx(AlertComparisonPeriodSelect, { id: "alert.comparison", measure: selectedMeasure, alert: editedAutomation, selectedComparison: selectedComparator?.comparator, selectedGranularity: selectedComparator?.granularity, onComparisonChange: (comparisonType, granularity) => {
|
|
@@ -136,18 +153,21 @@ export function AlertingDialogRenderer({ onCancel, onDeleteSuccess, onDeleteErro
|
|
|
136
153
|
}),
|
|
137
154
|
} }), content: _jsx(FormattedMessage, { id: "insightAlert.config.interval.tooltip" }), arrowPlacement: "left", optimalPlacement: true, offset: 10, width: 280, triggerBy: ["hover", "click"] })
|
|
138
155
|
] }), htmlFor: "alert.interval", children: _jsx(AlertTriggerIntervalSelect, { id: "alert.interval", selectedTriggerInterval: editedAutomation?.alert?.trigger.interval ?? "DAY", onTriggerIntervalChange: onTriggerIntervalChange, overlayPositionType: OVERLAY_POSITION_TYPE, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) })) : null, _jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.recipients" }), htmlFor: "alert.recipients", fullWidth: true, children: _jsx(RecipientsSelect, { id: "alert.recipients", loggedUser: defaultUser, value: editedAutomation?.recipients ?? [], originalValue: originalAutomation?.recipients || [], onChange: onRecipientsChange, allowEmptySelection: true, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxAutomationsRecipients, notificationChannels: notificationChannels, notificationChannelId: editedAutomation?.notificationChannel, showLabel: false, externalRecipientOverride: externalRecipientOverride }) })
|
|
139
|
-
] }), warningMessage ? (_jsx(Message, { type: "warning", className: "gd-notifications-channels-dialog-error", children: warningMessage })) : null, invalidDatapoints.map((datapoint) => (_jsx(Message, { id: datapoint.id, type: datapoint.severity === "info" ? "progress" : datapoint.severity, className: "gd-notifications-channels-dialog-error gd-notifications-channels-dialog-error-scrollable", children: datapoint.message }, datapoint.id)))] })
|
|
156
|
+
] }), warningMessage ? (_jsx(Message, { type: "warning", className: "gd-notifications-channels-dialog-error", children: warningMessage })) : null, invalidDatapoints.map((datapoint) => (_jsx(Message, { id: datapoint.id, type: datapoint.severity === "info" ? "progress" : datapoint.severity, className: "gd-notifications-channels-dialog-error gd-notifications-channels-dialog-error-scrollable", children: datapoint.message }, datapoint.id))), bottomContent] })
|
|
140
157
|
] }) }) }) }), alertToDelete ? (_jsx(DeleteAlertConfirmDialog, { alert: alertToDelete, onCancel: () => setAlertToDelete(null), onSuccess: handleAlertDeleteSuccess, onError: onDeleteError })) : null] }));
|
|
141
158
|
}
|
|
142
159
|
/**
|
|
143
160
|
* Default implementation of the alerting create/edit dialog.
|
|
144
161
|
*
|
|
145
|
-
* This component is a pure consumer of `AutomationsContext
|
|
146
|
-
* org/workspace data
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
162
|
+
* This component is a pure consumer of `AutomationsContext`, `AlertingDialogContext`, and the
|
|
163
|
+
* alerting dialog state contexts: it reads org/workspace data, per-dialog state, and the alert
|
|
164
|
+
* draft's state from those contexts rather than from the dashboard store. It must therefore be
|
|
165
|
+
* rendered within an `AutomationsContextProvider`, an `AlertingDialogContextProvider` (for the
|
|
166
|
+
* create/edit flow), and an `AlertingDialogStateProvider`. Inside a `Dashboard`, the alerting
|
|
167
|
+
* connector supplies the first two providers above the `AlertingDialogComponent` slot, and mounts
|
|
168
|
+
* `AlertingDialogStateProvider` around the resolved slot component once
|
|
169
|
+
* `useAlertingDialogContext().isLoading` is false — so the default component, and any wholesale
|
|
170
|
+
* slot replacement, inherit all three contexts automatically and require no extra wiring.
|
|
151
171
|
*
|
|
152
172
|
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
153
173
|
* that is what lets a wholesale replacement receive the same contexts. Rendering this component
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ export interface IUseAlertThresholdProps {
|
|
|
11
11
|
selectedAttribute: AlertAttribute | undefined;
|
|
12
12
|
selectedValue: string | null | undefined;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Owns the alerting dialog's threshold field: the displayed value, its change and blur handlers,
|
|
16
|
+
* and its validation message.
|
|
17
|
+
*
|
|
18
|
+
* Writes the draft — its effect auto-computes the comparison threshold when the selection changes
|
|
19
|
+
* and clears it for relative operators — so exactly one consumer per dialog tree may call it.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
14
23
|
export declare function useAlertThreshold({ setEditedAutomation, editedAutomation, getMetricValue, isNewAlert, selectedRelativeOperator, selectedMeasure, selectedAttribute, selectedValue }: IUseAlertThresholdProps): {
|
|
15
24
|
value: number | undefined;
|
|
16
25
|
onChange: (e: string | number, event?: import("react").ChangeEvent<HTMLInputElement> | undefined) => void;
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlertThreshold.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAC;AAExE,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EAEf,KAAK,mCAAmC,EACxC,KAAK,QAAQ,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKvE,MAAM,WAAW,uBAAuB;IACpC,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/F,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;IACrG,UAAU,EAAE,OAAO,CAAC;IACpB,wBAAwB,EAAE,CAAC,sBAAsB,EAAE,gCAAgC,CAAC,GAAG,SAAS,CAAC;IACjG,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5C;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EAChB,EAAE,uBAAuB;;;;;EAgCzB"}
|
|
1
|
+
{"version":3,"file":"useAlertThreshold.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAC;AAExE,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EAEf,KAAK,mCAAmC,EACxC,KAAK,QAAQ,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKvE,MAAM,WAAW,uBAAuB;IACpC,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/F,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;IACrG,UAAU,EAAE,OAAO,CAAC;IACpB,wBAAwB,EAAE,CAAC,sBAAsB,EAAE,gCAAgC,CAAC,GAAG,SAAS,CAAC;IACjG,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EAChB,EAAE,uBAAuB;;;;;EAgCzB"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.js
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { transformAlertByValue } from "../utils/transformation.js";
|
|
4
4
|
import { useThresholdValue } from "./useThresholdValue.js";
|
|
5
|
+
/**
|
|
6
|
+
* Owns the alerting dialog's threshold field: the displayed value, its change and blur handlers,
|
|
7
|
+
* and its validation message.
|
|
8
|
+
*
|
|
9
|
+
* Writes the draft — its effect auto-computes the comparison threshold when the selection changes
|
|
10
|
+
* and clears it for relative operators — so exactly one consumer per dialog tree may call it.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
5
14
|
export function useAlertThreshold({ setEditedAutomation, editedAutomation, getMetricValue, isNewAlert, selectedRelativeOperator, selectedMeasure, selectedAttribute, selectedValue, }) {
|
|
6
15
|
const onValueChange = useCallback((value) => {
|
|
7
16
|
setEditedAutomation((alert) => alert ? transformAlertByValue(alert, value) : undefined);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type useAlertFormState } from "./useAlertFormState.js";
|
|
2
|
+
/**
|
|
3
|
+
* The alerting dialog's mutators: the draft setter and every form change-handler.
|
|
4
|
+
*
|
|
5
|
+
* Changes rarely: `onGranularityChange` is re-created when `triggerIntervalDirty` toggles or the
|
|
6
|
+
* supported measures load. The shape is derived from `useAlertFormState`, which owns them.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export type IAlertActionsContextValue = Pick<ReturnType<typeof useAlertFormState>, "setEditedAutomation" | "onTitleChange" | "onMeasureChange" | "onAttributeChange" | "onComparisonOperatorChange" | "onRelativeOperatorChange" | "onAnomalyDetectionChange" | "onComparisonTypeChange" | "onSensitivityChange" | "onTriggerIntervalChange" | "onGranularityChange" | "onDestinationChange" | "onTriggerModeChange" | "onRecipientsChange">;
|
|
11
|
+
export declare const AlertActionsContextProvider: import("react").Provider<IAlertActionsContextValue | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Reads the alerting dialog's mutators.
|
|
14
|
+
*
|
|
15
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
16
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
17
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
18
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function useAlertActions(): IAlertActionsContextValue;
|
|
23
|
+
//# sourceMappingURL=AlertActionsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertActionsContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAClC,qBAAqB,GACrB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,4BAA4B,GAC5B,0BAA0B,GAC1B,0BAA0B,GAC1B,wBAAwB,GACxB,qBAAqB,GACrB,yBAAyB,GACzB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,CACzB,CAAC;AAKF,eAAO,MAAM,2BAA2B,iEAA+B,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,IAAI,yBAAyB,CAE3D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { missingAlertStateProvider } from "./missingAlertStateProvider.js";
|
|
4
|
+
const AlertActionsContext = createContext(undefined);
|
|
5
|
+
AlertActionsContext.displayName = "AlertActionsContext";
|
|
6
|
+
export const AlertActionsContextProvider = AlertActionsContext.Provider;
|
|
7
|
+
/**
|
|
8
|
+
* Reads the alerting dialog's mutators.
|
|
9
|
+
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
11
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
12
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
13
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export function useAlertActions() {
|
|
18
|
+
return useContext(AlertActionsContext) ?? missingAlertStateProvider("useAlertActions");
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type useAlertFormState } from "./useAlertFormState.js";
|
|
2
|
+
import { type useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
|
|
3
|
+
/**
|
|
4
|
+
* The data the alerting dialog loads asynchronously: the supported measures and attributes with
|
|
5
|
+
* their formats, the execution-result readers, and the current user's default recipients.
|
|
6
|
+
*
|
|
7
|
+
* Changes when an async load resolves, not per keystroke.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export type IAlertDataContextValue = Pick<ReturnType<typeof useAlertSupportedMetrics>, "supportedMeasures" | "supportedAttributes" | "measureFormatMap" | "isResultLoading" | "getAttributeValues" | "getMetricValue"> & Pick<ReturnType<typeof useAlertFormState>, "defaultUser" | "defaultRecipient">;
|
|
12
|
+
export declare const AlertDataContextProvider: import("react").Provider<IAlertDataContextValue | undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* Reads the data the alerting dialog loads asynchronously.
|
|
15
|
+
*
|
|
16
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
17
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
18
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
19
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function useAlertData(): IAlertDataContextValue;
|
|
24
|
+
//# sourceMappingURL=AlertDataContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDataContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertDataContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACrC,UAAU,CAAC,OAAO,wBAAwB,CAAC,EACzC,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,gBAAgB,CACrB,GACG,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAAE,aAAa,GAAG,kBAAkB,CAAC,CAAC;AAKnF,eAAO,MAAM,wBAAwB,8DAA4B,CAAC;AAElE;;;;;;;;;GASG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAErD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { missingAlertStateProvider } from "./missingAlertStateProvider.js";
|
|
4
|
+
const AlertDataContext = createContext(undefined);
|
|
5
|
+
AlertDataContext.displayName = "AlertDataContext";
|
|
6
|
+
export const AlertDataContextProvider = AlertDataContext.Provider;
|
|
7
|
+
/**
|
|
8
|
+
* Reads the data the alerting dialog loads asynchronously.
|
|
9
|
+
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
11
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
12
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
13
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export function useAlertData() {
|
|
18
|
+
return useContext(AlertDataContext) ?? missingAlertStateProvider("useAlertData");
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type useAlertFormState } from "./useAlertFormState.js";
|
|
2
|
+
/**
|
|
3
|
+
* The alerting dialog's edit draft: the automation being edited, the baseline it is compared
|
|
4
|
+
* against, and the form-level warning and title-validity flag that move with it.
|
|
5
|
+
*
|
|
6
|
+
* Changes on every keystroke; consumers re-render by design. The shape is derived from
|
|
7
|
+
* `useAlertFormState`, which owns these values.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export type IAlertDraftContextValue = Pick<ReturnType<typeof useAlertFormState>, "editedAutomation" | "originalAutomation" | "warningMessage" | "isTitleValid">;
|
|
12
|
+
export declare const AlertDraftContextProvider: import("react").Provider<IAlertDraftContextValue | undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* Reads the alerting dialog's edit draft.
|
|
15
|
+
*
|
|
16
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
17
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
18
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
19
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function useAlertDraft(): IAlertDraftContextValue;
|
|
24
|
+
//# sourceMappingURL=AlertDraftContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertDraftContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACtC,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpC,kBAAkB,GAAG,oBAAoB,GAAG,gBAAgB,GAAG,cAAc,CAChF,CAAC;AAKF,eAAO,MAAM,yBAAyB,+DAA6B,CAAC;AAEpE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,uBAAuB,CAEvD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { missingAlertStateProvider } from "./missingAlertStateProvider.js";
|
|
4
|
+
const AlertDraftContext = createContext(undefined);
|
|
5
|
+
AlertDraftContext.displayName = "AlertDraftContext";
|
|
6
|
+
export const AlertDraftContextProvider = AlertDraftContext.Provider;
|
|
7
|
+
/**
|
|
8
|
+
* Reads the alerting dialog's edit draft.
|
|
9
|
+
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
11
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
12
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
13
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export function useAlertDraft() {
|
|
18
|
+
return useContext(AlertDraftContext) ?? missingAlertStateProvider("useAlertDraft");
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type useAlertFiltersModel } from "./useAlertFiltersModel.js";
|
|
2
|
+
import { type useAlertFormState } from "./useAlertFormState.js";
|
|
3
|
+
/**
|
|
4
|
+
* The alerting dialog's filter and export-parameter model: the current selection, the available
|
|
5
|
+
* filters, the two filter mutators and the staleness flags, plus the automation's execution
|
|
6
|
+
* parameters and their mutators.
|
|
7
|
+
*
|
|
8
|
+
* Changes when a filter or a parameter is edited. The shape is derived from
|
|
9
|
+
* `useAlertFiltersModel` and from the parameter members `useAlertFormState` re-exports.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export type IAlertFiltersContextValue = Pick<ReturnType<typeof useAlertFiltersModel>, "selectedFilters" | "availableFilters" | "onFiltersChange" | "onApplyCurrentFilters" | "automationIsValid" | "filtersAreStale"> & Pick<ReturnType<typeof useAlertFormState>, "automationParameters" | "availableParameters" | "onParameterChange" | "onParameterDelete" | "onParameterAdd" | "dropStaleParameters">;
|
|
14
|
+
export declare const AlertFiltersContextProvider: import("react").Provider<IAlertFiltersContextValue | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Reads the alerting dialog's filter and export-parameter model.
|
|
17
|
+
*
|
|
18
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
19
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
20
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
21
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAlertFilters(): IAlertFiltersContextValue;
|
|
26
|
+
//# sourceMappingURL=AlertFiltersContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertFiltersContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertFiltersContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EACrC,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,uBAAuB,GACvB,mBAAmB,GACnB,iBAAiB,CACtB,GACG,IAAI,CACA,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAClC,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,gBAAgB,GAChB,qBAAqB,CAC1B,CAAC;AAKN,eAAO,MAAM,2BAA2B,iEAA+B,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,IAAI,yBAAyB,CAE3D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { missingAlertStateProvider } from "./missingAlertStateProvider.js";
|
|
4
|
+
const AlertFiltersContext = createContext(undefined);
|
|
5
|
+
AlertFiltersContext.displayName = "AlertFiltersContext";
|
|
6
|
+
export const AlertFiltersContextProvider = AlertFiltersContext.Provider;
|
|
7
|
+
/**
|
|
8
|
+
* Reads the alerting dialog's filter and export-parameter model.
|
|
9
|
+
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount only once
|
|
11
|
+
* `useAlertingDialogContext().isLoading` is false — a replacement for `AlertingDialogComponent`
|
|
12
|
+
* must check that flag before calling this. On the alerting side that state is reached only by an
|
|
13
|
+
* automations refresh while the dialog is open, so it will not appear in manual testing.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export function useAlertFilters() {
|
|
18
|
+
return useContext(AlertFiltersContext) ?? missingAlertStateProvider("useAlertFilters");
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Publishes the alerting create/edit dialog's state as the four alert state contexts once the
|
|
4
|
+
* dialog's data has loaded.
|
|
5
|
+
*
|
|
6
|
+
* Mounts above the resolved `AlertingDialogComponent`, so the default dialog, a shell of blocks
|
|
7
|
+
* and a wholesale replacement all read the same state with no extra wiring. Defers mounting the
|
|
8
|
+
* state model itself until `useAlertingDialogContext().isLoading` is false, because the state
|
|
9
|
+
* model seeds its draft from the dialog's loaded data in `useState` initializers that never
|
|
10
|
+
* re-run — mounting earlier would freeze that seed against not-yet-loaded data.
|
|
11
|
+
*
|
|
12
|
+
* Runs `useIntl`-calling hooks, so an `IntlProvider` must sit above it. Inside a `Dashboard` the
|
|
13
|
+
* ambient wrapper in `DashboardInner` supplies one with the same locale; a mount site without one
|
|
14
|
+
* throws in react-intl.
|
|
15
|
+
*
|
|
16
|
+
* A custom `AlertingDialogComponent` that decorates the dialog context (re-provides
|
|
17
|
+
* `AlertingDialogContextProvider` with an adjusted value) must remount this provider beneath the
|
|
18
|
+
* decorated context, so the state is derived from the decorated value rather than the ambient one.
|
|
19
|
+
*
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export declare function AlertingDialogStateProvider({ children }: {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=AlertingDialogStateProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertingDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertingDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAehD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAIhF"}
|