@gooddata/sdk-ui-dashboard 10.12.0-alpha.5 → 10.12.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/{presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationHelpers.d.ts → _staging/automation/index.d.ts} +2 -4
- package/esm/_staging/automation/index.d.ts.map +1 -0
- package/esm/{presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationHelpers.js → _staging/automation/index.js} +9 -33
- package/esm/_staging/automation/index.js.map +1 -0
- package/esm/model/react/index.d.ts +8 -1
- package/esm/model/react/index.d.ts.map +1 -1
- package/esm/model/react/index.js +5 -1
- package/esm/model/react/index.js.map +1 -1
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts +41 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js +64 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts +24 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.js +35 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.d.ts +31 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js +85 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.d.ts +20 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.js +76 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsFilters.d.ts +20 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsFilters.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsFilters.js +17 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsFilters.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.d.ts +21 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.js +72 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForDashboardScheduledExport.d.ts +26 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForDashboardScheduledExport.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForDashboardScheduledExport.js +45 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForDashboardScheduledExport.js.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForWidgetScheduledExport.d.ts +35 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForWidgetScheduledExport.d.ts.map +1 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForWidgetScheduledExport.js +69 -0
- package/esm/model/react/useDasboardScheduledEmails/useFiltersForWidgetScheduledExport.js.map +1 -0
- package/esm/{presentation/widget/common → model/react}/useWidgetFilters.d.ts +2 -1
- package/esm/model/react/useWidgetFilters.d.ts.map +1 -0
- package/esm/{presentation/widget/common → model/react}/useWidgetFilters.js +5 -2
- package/esm/model/react/useWidgetFilters.js.map +1 -0
- package/esm/model/store/drill/drillSelectors.d.ts +4 -0
- package/esm/model/store/drill/drillSelectors.d.ts.map +1 -1
- package/esm/model/store/drill/drillSelectors.js +4 -0
- package/esm/model/store/drill/drillSelectors.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/dashboard/DashboardHeader/ScheduledEmailDialogProvider.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js +19 -4
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +1 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +67 -81
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFilters.d.ts +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFilters.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFilters.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFiltersList.d.ts +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFiltersList.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts +14 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.js +46 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.js.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts +16 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.js +31 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.js.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +30 -9
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +90 -63
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts +23 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.js +30 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.js.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.d.ts +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js +2 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.d.ts +3 -3
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js +3 -3
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts +3 -3
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.js +2 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.js.map +1 -1
- package/esm/presentation/scheduledEmail/index.d.ts +1 -1
- package/esm/presentation/scheduledEmail/index.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/types.d.ts +71 -44
- package/esm/presentation/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js +1 -1
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js.map +1 -1
- package/esm/presentation/widget/common/index.d.ts +0 -1
- package/esm/presentation/widget/common/index.d.ts.map +1 -1
- package/esm/presentation/widget/common/index.js +1 -2
- package/esm/presentation/widget/common/index.js.map +1 -1
- package/esm/presentation/widget/common/useCustomWidgetExecutionDataView.d.ts.map +1 -1
- package/esm/presentation/widget/common/useCustomWidgetExecutionDataView.js +2 -2
- package/esm/presentation/widget/common/useCustomWidgetExecutionDataView.js.map +1 -1
- package/esm/presentation/widget/common/useCustomWidgetInsightDataView.d.ts.map +1 -1
- package/esm/presentation/widget/common/useCustomWidgetInsightDataView.js +2 -2
- package/esm/presentation/widget/common/useCustomWidgetInsightDataView.js.map +1 -1
- package/esm/presentation/widget/common/useInsightWidgetDataView.d.ts.map +1 -1
- package/esm/presentation/widget/common/useInsightWidgetDataView.js +2 -3
- package/esm/presentation/widget/common/useInsightWidgetDataView.js.map +1 -1
- package/esm/presentation/widget/index.d.ts +1 -1
- package/esm/presentation/widget/index.d.ts.map +1 -1
- package/esm/presentation/widget/index.js +1 -1
- package/esm/presentation/widget/index.js.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.js +1 -2
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.js.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +2 -3
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js +7 -8
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js.map +1 -1
- package/esm/presentation/widget/kpi/common/useKpiData.d.ts.map +1 -1
- package/esm/presentation/widget/kpi/common/useKpiData.js +2 -3
- package/esm/presentation/widget/kpi/common/useKpiData.js.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/configuration/Toolbar.d.ts +1 -0
- package/esm/presentation/widget/visualizationSwitcher/configuration/Toolbar.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/configuration/Toolbar.js +2 -2
- package/esm/presentation/widget/visualizationSwitcher/configuration/Toolbar.js.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/configuration/types.d.ts +1 -0
- package/esm/presentation/widget/visualizationSwitcher/configuration/types.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +1 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js +2 -2
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +176 -65
- package/package.json +15 -15
- package/esm/model/react/useDashboardScheduledEmails.d.ts +0 -44
- package/esm/model/react/useDashboardScheduledEmails.d.ts.map +0 -1
- package/esm/model/react/useDashboardScheduledEmails.js +0 -194
- package/esm/model/react/useDashboardScheduledEmails.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/Attachments.d.ts +0 -18
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/Attachments.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/Attachments.js +0 -66
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/Attachments.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.d.ts +0 -43
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.js +0 -82
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationHelpers.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationHelpers.js.map +0 -1
- package/esm/presentation/widget/common/useWidgetFilters.d.ts.map +0 -1
- package/esm/presentation/widget/common/useWidgetFilters.js.map +0 -1
|
@@ -128,6 +128,7 @@ import { DrillState as DrillState_2 } from './drillState.js';
|
|
|
128
128
|
import { EntityId } from '@reduxjs/toolkit';
|
|
129
129
|
import { EntityState } from '@reduxjs/toolkit';
|
|
130
130
|
import { ExplicitDrill } from '@gooddata/sdk-ui';
|
|
131
|
+
import { ExtendedDashboardWidget as ExtendedDashboardWidget_2 } from '../../index.js';
|
|
131
132
|
import { FilterContextItem } from '@gooddata/sdk-model';
|
|
132
133
|
import { FilterViewDialogMode as FilterViewDialogMode_2 } from './uiState.js';
|
|
133
134
|
import { GoodDataSdkError } from '@gooddata/sdk-ui';
|
|
@@ -239,7 +240,6 @@ import { IRenderListItemProps } from '@gooddata/sdk-ui-kit';
|
|
|
239
240
|
import { IResultWarning } from '@gooddata/sdk-model';
|
|
240
241
|
import { IRichTextWidget } from '@gooddata/sdk-model';
|
|
241
242
|
import { IScheduleEmailContext as IScheduleEmailContext_2 } from '../../../types.js';
|
|
242
|
-
import { IScheduleEmailDialogContext as IScheduleEmailDialogContext_2 } from '../../types.js';
|
|
243
243
|
import { ISeparators } from '@gooddata/sdk-model';
|
|
244
244
|
import { ISettings } from '@gooddata/sdk-model';
|
|
245
245
|
import { IShareDialogInteractionData } from '@gooddata/sdk-ui-kit';
|
|
@@ -289,14 +289,13 @@ import { Selector } from '@reduxjs/toolkit';
|
|
|
289
289
|
import { SetCatalogItemsPayload } from './catalogReducers.js';
|
|
290
290
|
import { SetCatalogMeasuresAndFactsPayload } from './catalogReducers.js';
|
|
291
291
|
import { ShareStatus } from '@gooddata/sdk-model';
|
|
292
|
-
import { Smtps as Smtps_2 } from '../index.js';
|
|
293
292
|
import { TypedUseSelectorHook } from 'react-redux';
|
|
294
293
|
import { UiState as UiState_2 } from './uiState.js';
|
|
295
294
|
import { Uri } from '@gooddata/sdk-model';
|
|
296
295
|
import { UriRef } from '@gooddata/sdk-model';
|
|
297
296
|
import { UseCancelablePromiseCallbacks } from '@gooddata/sdk-ui';
|
|
298
297
|
import { UseCancelablePromiseState } from '@gooddata/sdk-ui';
|
|
299
|
-
import { Users as Users_2 } from '
|
|
298
|
+
import { Users as Users_2 } from '../../index.js';
|
|
300
299
|
import { VisualizationProperties } from '@gooddata/sdk-model';
|
|
301
300
|
import { Webhooks as Webhooks_2 } from '../index.js';
|
|
302
301
|
import { WeekStart } from '@gooddata/sdk-model';
|
|
@@ -10506,6 +10505,11 @@ export declare function initializeDashboardWithPersistedDashboard(config?: Dashb
|
|
|
10506
10505
|
*/
|
|
10507
10506
|
export declare const InitialLoadCorrelationId = "initialLoad";
|
|
10508
10507
|
|
|
10508
|
+
/**
|
|
10509
|
+
* @alpha
|
|
10510
|
+
*/
|
|
10511
|
+
export declare type INotificationChannel = IWebhookDefinitionObject | ISmtpDefinitionObject;
|
|
10512
|
+
|
|
10509
10513
|
/**
|
|
10510
10514
|
* @internal
|
|
10511
10515
|
*/
|
|
@@ -10887,9 +10891,58 @@ export declare interface IScheduledEmailDialogProps {
|
|
|
10887
10891
|
*/
|
|
10888
10892
|
isVisible?: boolean;
|
|
10889
10893
|
/**
|
|
10890
|
-
*
|
|
10894
|
+
* In case, we are not creating new schedule, but editing existing one, this is the active schedule to be edited.
|
|
10891
10895
|
*/
|
|
10892
|
-
|
|
10896
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
10897
|
+
/**
|
|
10898
|
+
* Users in workspace
|
|
10899
|
+
*/
|
|
10900
|
+
users: IWorkspaceUser[];
|
|
10901
|
+
/**
|
|
10902
|
+
* Notification channels in organization
|
|
10903
|
+
*/
|
|
10904
|
+
notificationChannels: INotificationChannel[];
|
|
10905
|
+
/**
|
|
10906
|
+
* Widget to be used for scheduled email.
|
|
10907
|
+
*
|
|
10908
|
+
* Note: this is available only when scheduling export for widget, not dashboard.
|
|
10909
|
+
*/
|
|
10910
|
+
widget?: ExtendedDashboardWidget;
|
|
10911
|
+
/**
|
|
10912
|
+
* Insight to be used for scheduled email.
|
|
10913
|
+
*
|
|
10914
|
+
* Note: this is available only when scheduling export for widget, not dashboard.
|
|
10915
|
+
*/
|
|
10916
|
+
insight?: IInsight;
|
|
10917
|
+
/**
|
|
10918
|
+
* Dashboard filters to be used for scheduled email.
|
|
10919
|
+
*
|
|
10920
|
+
* Note:
|
|
10921
|
+
* - Provided filters exclude cross-filtering filters, as these are typically not desired in exported reports.
|
|
10922
|
+
*
|
|
10923
|
+
* - If the current dashboard filters (excluding cross-filtering) match the saved dashboard filters, this will be undefined.
|
|
10924
|
+
* In such cases, the scheduled export will use the most recent saved dashboard filters, guaranteeing that
|
|
10925
|
+
* the export reflects the latest intended filter configuration and we don't want to save them.
|
|
10926
|
+
*
|
|
10927
|
+
* - If we are editing an existing scheduled export, this will contain its filters, as changing saved filters is currently not allowed.
|
|
10928
|
+
*/
|
|
10929
|
+
dashboardFilters?: FilterContextItem[];
|
|
10930
|
+
/**
|
|
10931
|
+
* Widget filters to be used for scheduled email.
|
|
10932
|
+
*
|
|
10933
|
+
* Note:
|
|
10934
|
+
* - Provided filters are a combination of insight and dashboard filters, following these rules:
|
|
10935
|
+
* - Cross-filtering filters are excluded as they are typically not desired in the scheduled export.
|
|
10936
|
+
* - The widget's ignored filters configuration is honored (ignored filters are not overridden by dashboard filters and remain as is).
|
|
10937
|
+
* - If the resulting filters include all-time date filter, it is excluded as it has no effect on the scheduled export execution.
|
|
10938
|
+
*
|
|
10939
|
+
* - If we are editing an existing scheduled export, this will contain its filters, as changing saved filters is currently not allowed.
|
|
10940
|
+
*/
|
|
10941
|
+
widgetFilters?: IFilter[];
|
|
10942
|
+
/**
|
|
10943
|
+
* Is scheduled email dialog loading initial data, before it can be rendered?
|
|
10944
|
+
*/
|
|
10945
|
+
isLoading?: boolean;
|
|
10893
10946
|
/**
|
|
10894
10947
|
* Callback to be called, when user submits the scheduled email dialog.
|
|
10895
10948
|
*/
|
|
@@ -10926,26 +10979,6 @@ export declare interface IScheduledEmailDialogProps {
|
|
|
10926
10979
|
* Callback to be called, when schedule fails to delete.
|
|
10927
10980
|
*/
|
|
10928
10981
|
onDeleteError?: (error: GoodDataSdkError) => void;
|
|
10929
|
-
/**
|
|
10930
|
-
* Schedule to be edited in the dialog.
|
|
10931
|
-
*/
|
|
10932
|
-
editSchedule?: IAutomationMetadataObject;
|
|
10933
|
-
/**
|
|
10934
|
-
* Users in workspace
|
|
10935
|
-
*/
|
|
10936
|
-
users: IWorkspaceUser[];
|
|
10937
|
-
/**
|
|
10938
|
-
* Webhooks in organization
|
|
10939
|
-
*/
|
|
10940
|
-
webhooks: IWebhookDefinitionObject[];
|
|
10941
|
-
/**
|
|
10942
|
-
* Emails in organization
|
|
10943
|
-
*/
|
|
10944
|
-
emails: ISmtpDefinitionObject[];
|
|
10945
|
-
/**
|
|
10946
|
-
* Automations in workspace
|
|
10947
|
-
*/
|
|
10948
|
-
automations: IAutomationMetadataObject[];
|
|
10949
10982
|
}
|
|
10950
10983
|
|
|
10951
10984
|
/**
|
|
@@ -10956,6 +10989,7 @@ export declare interface IScheduledEmailDialogPropsContext {
|
|
|
10956
10989
|
}
|
|
10957
10990
|
|
|
10958
10991
|
/**
|
|
10992
|
+
*
|
|
10959
10993
|
* @alpha
|
|
10960
10994
|
*/
|
|
10961
10995
|
export declare interface IScheduledEmailManagementDialogProps {
|
|
@@ -10963,22 +10997,6 @@ export declare interface IScheduledEmailManagementDialogProps {
|
|
|
10963
10997
|
* Is scheduled email management dialog visible?
|
|
10964
10998
|
*/
|
|
10965
10999
|
isVisible?: boolean;
|
|
10966
|
-
/**
|
|
10967
|
-
* Context for the scheduled e-mail dialog.
|
|
10968
|
-
*/
|
|
10969
|
-
context?: IScheduledEmailDialogPropsContext;
|
|
10970
|
-
/**
|
|
10971
|
-
* Callback to be called, when user adds new scheduled email item.
|
|
10972
|
-
*/
|
|
10973
|
-
onAdd?: () => void;
|
|
10974
|
-
/**
|
|
10975
|
-
* Callback to be called, when user clicks scheduled email item for editing.
|
|
10976
|
-
*/
|
|
10977
|
-
onEdit?: (scheduledMail: IAutomationMetadataObject) => void;
|
|
10978
|
-
/**
|
|
10979
|
-
* Callback to be called, when user closes the scheduled email management dialog.
|
|
10980
|
-
*/
|
|
10981
|
-
onClose?: () => void;
|
|
10982
11000
|
/**
|
|
10983
11001
|
* Is loading schedule data?
|
|
10984
11002
|
*/
|
|
@@ -10988,17 +11006,25 @@ export declare interface IScheduledEmailManagementDialogProps {
|
|
|
10988
11006
|
*/
|
|
10989
11007
|
scheduleDataError?: GoodDataSdkError;
|
|
10990
11008
|
/**
|
|
10991
|
-
*
|
|
10992
|
-
*/
|
|
10993
|
-
webhooks: IWebhookDefinitionObject[];
|
|
10994
|
-
/**
|
|
10995
|
-
* Emails in organization
|
|
11009
|
+
* Notification channels in organization
|
|
10996
11010
|
*/
|
|
10997
|
-
|
|
11011
|
+
notificationChannels: INotificationChannel[];
|
|
10998
11012
|
/**
|
|
10999
11013
|
* Automations in workspace
|
|
11000
11014
|
*/
|
|
11001
11015
|
automations: IAutomationMetadataObject[];
|
|
11016
|
+
/**
|
|
11017
|
+
* Callback to be called, when user adds new scheduled email item.
|
|
11018
|
+
*/
|
|
11019
|
+
onAdd?: () => void;
|
|
11020
|
+
/**
|
|
11021
|
+
* Callback to be called, when user clicks scheduled email item for editing.
|
|
11022
|
+
*/
|
|
11023
|
+
onEdit?: (scheduledMail: IAutomationMetadataObject) => void;
|
|
11024
|
+
/**
|
|
11025
|
+
* Callback to be called, when user closes the scheduled email management dialog.
|
|
11026
|
+
*/
|
|
11027
|
+
onClose?: () => void;
|
|
11002
11028
|
/**
|
|
11003
11029
|
* Callback to be called, when scheduled email is deleted.
|
|
11004
11030
|
*/
|
|
@@ -12296,6 +12322,43 @@ export declare interface IUseCustomWidgetInsightDataViewConfig {
|
|
|
12296
12322
|
insight?: IInsightDefinition | ObjRef;
|
|
12297
12323
|
}
|
|
12298
12324
|
|
|
12325
|
+
/**
|
|
12326
|
+
* @alpha
|
|
12327
|
+
*/
|
|
12328
|
+
export declare interface IUseDashboardScheduledEmailsFiltersProps {
|
|
12329
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
12330
|
+
widget?: ExtendedDashboardWidget;
|
|
12331
|
+
insight?: IInsight;
|
|
12332
|
+
}
|
|
12333
|
+
|
|
12334
|
+
/**
|
|
12335
|
+
* @alpha
|
|
12336
|
+
*/
|
|
12337
|
+
export declare interface IUseFiltersForDashboardScheduledExportProps {
|
|
12338
|
+
/**
|
|
12339
|
+
* Optionally provide metadata object to get filters from instead of the current dashboard filters.
|
|
12340
|
+
*/
|
|
12341
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
12342
|
+
}
|
|
12343
|
+
|
|
12344
|
+
/**
|
|
12345
|
+
* @alpha
|
|
12346
|
+
*/
|
|
12347
|
+
export declare interface IUseFiltersForWidgetScheduledExportProps {
|
|
12348
|
+
/**
|
|
12349
|
+
* Optionally provide metadata object to get filters from instead of the current widget filters.
|
|
12350
|
+
*/
|
|
12351
|
+
scheduledExportToEdit?: IAutomationMetadataObjectDefinition;
|
|
12352
|
+
/**
|
|
12353
|
+
* Widget to get filters for.
|
|
12354
|
+
*/
|
|
12355
|
+
widget?: ExtendedDashboardWidget;
|
|
12356
|
+
/**
|
|
12357
|
+
* Insight to get filters for.
|
|
12358
|
+
*/
|
|
12359
|
+
insight?: IInsightDefinition;
|
|
12360
|
+
}
|
|
12361
|
+
|
|
12299
12362
|
/**
|
|
12300
12363
|
* Configuration for the `useInsightWidgetDataView` hook.
|
|
12301
12364
|
*
|
|
@@ -12358,6 +12421,7 @@ export declare interface IVisualizationSwitcherToolbarProps {
|
|
|
12358
12421
|
onVisualizationsChanged: (visualizations: IInsightWidget[]) => void;
|
|
12359
12422
|
onVisualizationAdded: (insightWidget: IInsightWidget, insight: IInsight, sizeInfo: IVisualizationSizeInfo) => void;
|
|
12360
12423
|
onSelectedVisualizationChanged: (visualizationId: string) => void;
|
|
12424
|
+
onClose: () => void;
|
|
12361
12425
|
}
|
|
12362
12426
|
|
|
12363
12427
|
/**
|
|
@@ -16648,6 +16712,11 @@ export declare const selectIsCancelEditModeDialogOpen: DashboardSelector<boolean
|
|
|
16648
16712
|
*/
|
|
16649
16713
|
export declare const selectIsCircularDependency: (currentFilterLocalId: string, neighborFilterLocalId: string) => DashboardSelector<boolean>;
|
|
16650
16714
|
|
|
16715
|
+
/**
|
|
16716
|
+
* @beta
|
|
16717
|
+
*/
|
|
16718
|
+
export declare const selectIsCrossFiltering: DashboardSelector<boolean>;
|
|
16719
|
+
|
|
16651
16720
|
/**
|
|
16652
16721
|
* Selects a boolean indication if he dashboard has any changes compared to the persisted version (if any)
|
|
16653
16722
|
*
|
|
@@ -18987,38 +19056,49 @@ export declare type UseDashboardQueryProcessingResult<TQueryCreatorArgs extends
|
|
|
18987
19056
|
* @alpha
|
|
18988
19057
|
*/
|
|
18989
19058
|
export declare const useDashboardScheduledEmails: () => {
|
|
18990
|
-
|
|
18991
|
-
emails: Smtps_2;
|
|
19059
|
+
scheduledExportToEdit: IAutomationMetadataObject | undefined;
|
|
18992
19060
|
users: Users_2;
|
|
19061
|
+
notificationChannels: (IWebhookDefinitionObject | ISmtpDefinitionObject)[];
|
|
18993
19062
|
automations: IAutomationMetadataObject[];
|
|
18994
19063
|
automationsCount: number;
|
|
18995
|
-
schedulingLoadError: GoodDataSdkError | undefined;
|
|
18996
19064
|
numberOfAvailableDestinations: number;
|
|
18997
|
-
|
|
19065
|
+
widget: ExtendedDashboardWidget_2 | undefined;
|
|
19066
|
+
insight: IInsight | undefined;
|
|
19067
|
+
automationsLoading: boolean;
|
|
19068
|
+
automationsError: GoodDataSdkError | undefined;
|
|
19069
|
+
webhooksLoading: boolean;
|
|
19070
|
+
webhooksError: GoodDataSdkError | undefined;
|
|
18998
19071
|
isScheduledEmailingVisible: boolean;
|
|
18999
|
-
isScheduledManagementEmailingVisible: boolean;
|
|
19000
|
-
defaultOnScheduleEmailing: (widget?: IWidget) => void;
|
|
19001
|
-
defaultOnScheduleEmailingManagement: (widget?: IWidget) => void;
|
|
19002
19072
|
isScheduleEmailingDialogOpen: boolean;
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
onScheduleEmailingOpen: (widget?: IWidget) => void;
|
|
19007
|
-
onScheduleEmailingManagementOpen: (widget?: IWidget) => void;
|
|
19008
|
-
onScheduleEmailingManagementEdit: (schedule: IAutomationMetadataObject, widget?: IWidget) => void;
|
|
19009
|
-
scheduledEmailToEdit: IAutomationMetadataObject | undefined;
|
|
19010
|
-
onScheduleEmailingCancel: (widget?: IWidget) => void;
|
|
19073
|
+
defaultOnScheduleEmailing: (widget?: IWidget | undefined) => void;
|
|
19074
|
+
onScheduleEmailingOpen: (widget?: IWidget | undefined) => void;
|
|
19075
|
+
onScheduleEmailingCancel: (widget?: IWidget | undefined) => void;
|
|
19011
19076
|
onScheduleEmailingCreateError: () => void;
|
|
19012
|
-
onScheduleEmailingCreateSuccess: (widget?: IWidget) => void;
|
|
19077
|
+
onScheduleEmailingCreateSuccess: (widget?: IWidget | undefined) => void;
|
|
19013
19078
|
onScheduleEmailingSaveError: () => void;
|
|
19014
|
-
onScheduleEmailingSaveSuccess: (widget?: IWidget) => void;
|
|
19015
|
-
|
|
19079
|
+
onScheduleEmailingSaveSuccess: (widget?: IWidget | undefined) => void;
|
|
19080
|
+
isScheduledManagementEmailingVisible: boolean;
|
|
19081
|
+
isScheduleEmailingManagementDialogOpen: boolean;
|
|
19082
|
+
defaultOnScheduleEmailingManagement: (widget?: IWidget | undefined) => void;
|
|
19083
|
+
onScheduleEmailingManagementOpen: (widget?: IWidget | undefined) => void;
|
|
19084
|
+
onScheduleEmailingManagementEdit: (schedule: IAutomationMetadataObject, widget?: IWidget | undefined) => void;
|
|
19085
|
+
onScheduleEmailingManagementAdd: (widget?: IWidget | undefined) => void;
|
|
19016
19086
|
onScheduleEmailingManagementClose: () => void;
|
|
19017
19087
|
onScheduleEmailingManagementLoadingError: () => void;
|
|
19018
19088
|
onScheduleEmailingManagementDeleteSuccess: () => void;
|
|
19019
19089
|
onScheduleEmailingManagementDeleteError: () => void;
|
|
19020
19090
|
};
|
|
19021
19091
|
|
|
19092
|
+
/**
|
|
19093
|
+
* @alpha
|
|
19094
|
+
*/
|
|
19095
|
+
export declare const useDashboardScheduledEmailsFilters: ({ scheduledExportToEdit, widget, insight, }: IUseDashboardScheduledEmailsFiltersProps) => {
|
|
19096
|
+
widgetFilters: IFilter[] | undefined;
|
|
19097
|
+
widgetFiltersLoading: boolean;
|
|
19098
|
+
widgetFiltersError: GoodDataSdkError | undefined;
|
|
19099
|
+
dashboardFilters: FilterContextItem[] | undefined;
|
|
19100
|
+
};
|
|
19101
|
+
|
|
19022
19102
|
/**
|
|
19023
19103
|
* Hook for retrieving data from the dashboard state.
|
|
19024
19104
|
*
|
|
@@ -19218,6 +19298,37 @@ export declare function useEditButtonProps(): IEditButtonProps;
|
|
|
19218
19298
|
*/
|
|
19219
19299
|
export declare const useFilterBarProps: () => IFilterBarProps;
|
|
19220
19300
|
|
|
19301
|
+
/**
|
|
19302
|
+
* Hook for getting filters for dashboard scheduled export.
|
|
19303
|
+
*
|
|
19304
|
+
* Note:
|
|
19305
|
+
* - This function excludes cross-filtering filters, as these are typically not desired in exported reports.
|
|
19306
|
+
*
|
|
19307
|
+
* - If the current dashboard filters (excluding cross-filtering) match the saved dashboard filters, this hook returns undefined.
|
|
19308
|
+
* In such cases, the scheduled export will use the most recent saved dashboard filters, guaranteeing that
|
|
19309
|
+
* the export reflects the latest intended filter configuration.
|
|
19310
|
+
*
|
|
19311
|
+
* - If we are editing an existing scheduled export, this function will return its filters, as changing saved filters is currently not allowed.
|
|
19312
|
+
*
|
|
19313
|
+
* @alpha
|
|
19314
|
+
*/
|
|
19315
|
+
export declare const useFiltersForDashboardScheduledExport: ({ scheduledExportToEdit, }: IUseFiltersForDashboardScheduledExportProps) => FilterContextItem[] | undefined;
|
|
19316
|
+
|
|
19317
|
+
/**
|
|
19318
|
+
* Hook for getting filters for widget scheduled export.
|
|
19319
|
+
*
|
|
19320
|
+
* Note:
|
|
19321
|
+
* - The resulting filters are a combination of insight and dashboard filters, following these rules:
|
|
19322
|
+
* - Cross-filtering filters are excluded as they are typically not desired in the scheduled export.
|
|
19323
|
+
* - The widget's ignored filters configuration is honored (ignored filters are not overridden by dashboard filters and remain as is).
|
|
19324
|
+
* - If the resulting filters include all-time date filter, it is excluded as it has no effect on the scheduled export execution.
|
|
19325
|
+
*
|
|
19326
|
+
* - If we are editing an existing scheduled export, this function will return its filters, as changing saved filters is currently not allowed.
|
|
19327
|
+
*
|
|
19328
|
+
* @alpha
|
|
19329
|
+
*/
|
|
19330
|
+
export declare function useFiltersForWidgetScheduledExport({ scheduledExportToEdit, widget, insight, }: IUseFiltersForWidgetScheduledExportProps): QueryProcessingState<IFilter[]>;
|
|
19331
|
+
|
|
19221
19332
|
/**
|
|
19222
19333
|
* This hook provides an easy way to read a data view from insight widget.
|
|
19223
19334
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-dashboard",
|
|
3
|
-
"version": "10.12.0-alpha.
|
|
3
|
+
"version": "10.12.0-alpha.7",
|
|
4
4
|
"description": "GoodData SDK - Dashboard Component",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"ts-invariant": "^0.7.5",
|
|
58
58
|
"tslib": "^2.5.0",
|
|
59
59
|
"uuid": "^8.3.2",
|
|
60
|
-
"@gooddata/sdk-backend-base": "10.12.0-alpha.
|
|
61
|
-
"@gooddata/sdk-
|
|
62
|
-
"@gooddata/sdk-
|
|
63
|
-
"@gooddata/sdk-ui": "10.12.0-alpha.
|
|
64
|
-
"@gooddata/sdk-
|
|
65
|
-
"@gooddata/sdk-ui-filters": "10.12.0-alpha.
|
|
66
|
-
"@gooddata/sdk-ui-
|
|
67
|
-
"@gooddata/sdk-ui-
|
|
68
|
-
"@gooddata/sdk-ui-
|
|
69
|
-
"@gooddata/sdk-ui-
|
|
70
|
-
"@gooddata/util": "10.12.0-alpha.
|
|
60
|
+
"@gooddata/sdk-backend-base": "10.12.0-alpha.7",
|
|
61
|
+
"@gooddata/sdk-backend-spi": "10.12.0-alpha.7",
|
|
62
|
+
"@gooddata/sdk-model": "10.12.0-alpha.7",
|
|
63
|
+
"@gooddata/sdk-ui": "10.12.0-alpha.7",
|
|
64
|
+
"@gooddata/sdk-ui-ext": "10.12.0-alpha.7",
|
|
65
|
+
"@gooddata/sdk-ui-filters": "10.12.0-alpha.7",
|
|
66
|
+
"@gooddata/sdk-ui-geo": "10.12.0-alpha.7",
|
|
67
|
+
"@gooddata/sdk-ui-kit": "10.12.0-alpha.7",
|
|
68
|
+
"@gooddata/sdk-ui-vis-commons": "10.12.0-alpha.7",
|
|
69
|
+
"@gooddata/sdk-ui-theme-provider": "10.12.0-alpha.7",
|
|
70
|
+
"@gooddata/util": "10.12.0-alpha.7"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -120,9 +120,9 @@
|
|
|
120
120
|
"typescript": "5.3.3",
|
|
121
121
|
"vitest": "1.0.4",
|
|
122
122
|
"vitest-dom": "0.1.1",
|
|
123
|
-
"@gooddata/i18n-toolkit": "10.12.0-alpha.
|
|
124
|
-
"@gooddata/
|
|
125
|
-
"@gooddata/
|
|
123
|
+
"@gooddata/i18n-toolkit": "10.12.0-alpha.7",
|
|
124
|
+
"@gooddata/reference-workspace": "10.12.0-alpha.7",
|
|
125
|
+
"@gooddata/sdk-backend-mockingbird": "10.12.0-alpha.7"
|
|
126
126
|
},
|
|
127
127
|
"scripts": {
|
|
128
128
|
"clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { IAutomationMetadataObject, IWidget } from "@gooddata/sdk-model";
|
|
2
|
-
/**
|
|
3
|
-
* @alpha
|
|
4
|
-
* Default maximum number of automations.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DEFAULT_MAX_AUTOMATIONS = "10";
|
|
7
|
-
/**
|
|
8
|
-
* Hook that handles schedule emailing dialogs.
|
|
9
|
-
*
|
|
10
|
-
* @alpha
|
|
11
|
-
*/
|
|
12
|
-
export declare const useDashboardScheduledEmails: () => {
|
|
13
|
-
webhooks: import("../index.js").Webhooks;
|
|
14
|
-
emails: import("../index.js").Smtps;
|
|
15
|
-
users: import("../index.js").Users;
|
|
16
|
-
automations: IAutomationMetadataObject[];
|
|
17
|
-
automationsCount: number;
|
|
18
|
-
schedulingLoadError: import("@gooddata/sdk-ui").GoodDataSdkError | undefined;
|
|
19
|
-
numberOfAvailableDestinations: number;
|
|
20
|
-
isScheduleLoading: boolean;
|
|
21
|
-
isScheduledEmailingVisible: boolean;
|
|
22
|
-
isScheduledManagementEmailingVisible: boolean;
|
|
23
|
-
defaultOnScheduleEmailing: (widget?: IWidget) => void;
|
|
24
|
-
defaultOnScheduleEmailingManagement: (widget?: IWidget) => void;
|
|
25
|
-
isScheduleEmailingDialogOpen: boolean;
|
|
26
|
-
isScheduleEmailingManagementDialogOpen: boolean;
|
|
27
|
-
scheduleEmailingDialogContext: import("../../types.js").IScheduleEmailDialogContext;
|
|
28
|
-
scheduleEmailingManagementDialogContext: import("../../types.js").IScheduleEmailDialogContext;
|
|
29
|
-
onScheduleEmailingOpen: (widget?: IWidget) => void;
|
|
30
|
-
onScheduleEmailingManagementOpen: (widget?: IWidget) => void;
|
|
31
|
-
onScheduleEmailingManagementEdit: (schedule: IAutomationMetadataObject, widget?: IWidget) => void;
|
|
32
|
-
scheduledEmailToEdit: IAutomationMetadataObject | undefined;
|
|
33
|
-
onScheduleEmailingCancel: (widget?: IWidget) => void;
|
|
34
|
-
onScheduleEmailingCreateError: () => void;
|
|
35
|
-
onScheduleEmailingCreateSuccess: (widget?: IWidget) => void;
|
|
36
|
-
onScheduleEmailingSaveError: () => void;
|
|
37
|
-
onScheduleEmailingSaveSuccess: (widget?: IWidget) => void;
|
|
38
|
-
onScheduleEmailingManagementAdd: (widget?: IWidget) => void;
|
|
39
|
-
onScheduleEmailingManagementClose: () => void;
|
|
40
|
-
onScheduleEmailingManagementLoadingError: () => void;
|
|
41
|
-
onScheduleEmailingManagementDeleteSuccess: () => void;
|
|
42
|
-
onScheduleEmailingManagementDeleteError: () => void;
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=useDashboardScheduledEmails.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboardScheduledEmails.d.ts","sourceRoot":"","sources":["../../../src/model/react/useDashboardScheduledEmails.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAiCzE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;yCAmHtB,OAAO;mDAXP,OAAO;;;;;sCAsBP,OAAO;gDAOP,OAAO;iDAoEN,yBAAyB,WAAW,OAAO;;wCAvB5C,OAAO;;+CAjCP,OAAO;;6CAgBP,OAAO;+CAgCP,OAAO;;;;;CA+DxB,CAAC"}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// (C) 2022-2024 GoodData Corporation
|
|
2
|
-
import { useCallback, useState } from "react";
|
|
3
|
-
import { useToastMessage } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import { selectCanExportPdf, selectCanManageWorkspace, selectDashboardRef, selectEnableScheduling, selectIsInViewMode, selectIsReadOnly, selectIsScheduleEmailDialogOpen, selectIsScheduleEmailManagementDialogOpen, selectIsScheduleEmailDialogContext, selectIsScheduleEmailManagementDialogContext, selectMenuButtonItemsVisibility, uiActions, selectEntitlementMaxAutomations, selectWebhooks, selectSmtps, selectAutomationsCount, selectUsers, selectWebhooksIsLoading, selectAutomationsIsLoading, selectWebhooksError, selectAutomationsError, selectAutomationsSchedulesInContext, selectEntitlementUnlimitedAutomations, selectCanCreateAutomation, } from "../store/index.js";
|
|
5
|
-
import { refreshAutomations } from "../commands/index.js";
|
|
6
|
-
import { messages } from "../../locales.js";
|
|
7
|
-
import { useDashboardDispatch, useDashboardSelector } from "./DashboardStoreProvider.js";
|
|
8
|
-
/**
|
|
9
|
-
* @alpha
|
|
10
|
-
* Default maximum number of automations.
|
|
11
|
-
*/
|
|
12
|
-
export const DEFAULT_MAX_AUTOMATIONS = "10";
|
|
13
|
-
/**
|
|
14
|
-
* Hook that handles schedule emailing dialogs.
|
|
15
|
-
*
|
|
16
|
-
* @alpha
|
|
17
|
-
*/
|
|
18
|
-
export const useDashboardScheduledEmails = () => {
|
|
19
|
-
const { addSuccess, addError } = useToastMessage();
|
|
20
|
-
const isScheduleEmailingDialogOpen = useDashboardSelector(selectIsScheduleEmailDialogOpen) || false;
|
|
21
|
-
const scheduleEmailingDialogContext = useDashboardSelector(selectIsScheduleEmailDialogContext);
|
|
22
|
-
const isScheduleEmailingManagementDialogOpen = useDashboardSelector(selectIsScheduleEmailManagementDialogOpen) || false;
|
|
23
|
-
const scheduleEmailingManagementDialogContext = useDashboardSelector(selectIsScheduleEmailManagementDialogContext);
|
|
24
|
-
const dispatch = useDashboardDispatch();
|
|
25
|
-
const dashboardRef = useDashboardSelector(selectDashboardRef);
|
|
26
|
-
const automationsCount = useDashboardSelector(selectAutomationsCount);
|
|
27
|
-
const webhooks = useDashboardSelector(selectWebhooks);
|
|
28
|
-
const emails = useDashboardSelector(selectSmtps);
|
|
29
|
-
const users = useDashboardSelector(selectUsers);
|
|
30
|
-
const automations = useDashboardSelector(selectAutomationsSchedulesInContext(undefined));
|
|
31
|
-
const automationsLoading = useDashboardSelector(selectAutomationsIsLoading);
|
|
32
|
-
const automationsError = useDashboardSelector(selectAutomationsError);
|
|
33
|
-
const isScheduleLoading = [
|
|
34
|
-
useDashboardSelector(selectWebhooksIsLoading),
|
|
35
|
-
useDashboardSelector(selectAutomationsIsLoading),
|
|
36
|
-
automationsLoading,
|
|
37
|
-
].some(Boolean);
|
|
38
|
-
const schedulingLoadError = [
|
|
39
|
-
useDashboardSelector(selectWebhooksError),
|
|
40
|
-
useDashboardSelector(selectAutomationsError),
|
|
41
|
-
automationsError,
|
|
42
|
-
].find(Boolean);
|
|
43
|
-
const isReadOnly = useDashboardSelector(selectIsReadOnly);
|
|
44
|
-
const isInViewMode = useDashboardSelector(selectIsInViewMode);
|
|
45
|
-
const menuButtonItemsVisibility = useDashboardSelector(selectMenuButtonItemsVisibility);
|
|
46
|
-
const isScheduledEmailingEnabled = useDashboardSelector(selectEnableScheduling);
|
|
47
|
-
const canExport = useDashboardSelector(selectCanExportPdf);
|
|
48
|
-
const isWorkspaceManager = useDashboardSelector(selectCanManageWorkspace);
|
|
49
|
-
const maxAutomationsEntitlement = useDashboardSelector(selectEntitlementMaxAutomations);
|
|
50
|
-
const unlimitedAutomationsEntitlement = useDashboardSelector(selectEntitlementUnlimitedAutomations);
|
|
51
|
-
const maxAutomations = parseInt(maxAutomationsEntitlement?.value ?? DEFAULT_MAX_AUTOMATIONS, 10);
|
|
52
|
-
const numberOfAvailableDestinations = webhooks.length + emails.length;
|
|
53
|
-
const maxAutomationsReached = automationsCount >= maxAutomations && !unlimitedAutomationsEntitlement;
|
|
54
|
-
/**
|
|
55
|
-
* We want to hide scheduling when there are no webhooks unless the user is admin.
|
|
56
|
-
*/
|
|
57
|
-
const showDueToNumberOfAvailableDestinations = numberOfAvailableDestinations > 0 || isWorkspaceManager;
|
|
58
|
-
const isSchedulingAvailable = isInViewMode &&
|
|
59
|
-
!isReadOnly &&
|
|
60
|
-
isScheduledEmailingEnabled &&
|
|
61
|
-
canExport &&
|
|
62
|
-
showDueToNumberOfAvailableDestinations &&
|
|
63
|
-
(menuButtonItemsVisibility.scheduleEmailButton ?? true);
|
|
64
|
-
const canCreateAutomation = useDashboardSelector(selectCanCreateAutomation);
|
|
65
|
-
const isScheduledEmailingVisible = isSchedulingAvailable && canCreateAutomation && !maxAutomationsReached;
|
|
66
|
-
const isScheduledManagementEmailingVisible = isSchedulingAvailable && automations.length > 0;
|
|
67
|
-
const openScheduleEmailingDialog = useCallback((widget) => isScheduledEmailingEnabled &&
|
|
68
|
-
dispatch(uiActions.openScheduleEmailDialog({
|
|
69
|
-
...(widget?.ref ? { widgetRef: widget.ref } : {}),
|
|
70
|
-
})), [dispatch, isScheduledEmailingEnabled]);
|
|
71
|
-
const closeScheduleEmailingDialog = useCallback(() => isScheduledEmailingEnabled && dispatch(uiActions.closeScheduleEmailDialog()), [dispatch, isScheduledEmailingEnabled]);
|
|
72
|
-
const openScheduleEmailingManagementDialog = useCallback((widget) => isScheduledEmailingEnabled &&
|
|
73
|
-
dispatch(uiActions.openScheduleEmailManagementDialog({
|
|
74
|
-
...(widget?.ref ? { widgetRef: widget.ref } : {}),
|
|
75
|
-
})), [dispatch, isScheduledEmailingEnabled]);
|
|
76
|
-
const closeScheduleEmailingManagementDialog = useCallback(() => isScheduledEmailingEnabled && dispatch(uiActions.closeScheduleEmailManagementDialog()), [dispatch, isScheduledEmailingEnabled]);
|
|
77
|
-
const [scheduledEmailToEdit, setScheduledEmailToEdit] = useState();
|
|
78
|
-
/*
|
|
79
|
-
* exports and scheduling are not available when rendering a dashboard that is not persisted.
|
|
80
|
-
* this can happen when a new dashboard is created and is being edited.
|
|
81
|
-
*
|
|
82
|
-
* the setup of menu items available in the menu needs to reflect this.
|
|
83
|
-
*/
|
|
84
|
-
const defaultOnScheduleEmailingManagement = useCallback((widget) => {
|
|
85
|
-
if (!dashboardRef) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
openScheduleEmailingManagementDialog(widget);
|
|
89
|
-
}, [dashboardRef, openScheduleEmailingManagementDialog]);
|
|
90
|
-
const defaultOnScheduleEmailing = useCallback((widget) => {
|
|
91
|
-
if (!dashboardRef) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
openScheduleEmailingDialog(widget);
|
|
95
|
-
}, [dashboardRef, openScheduleEmailingDialog]);
|
|
96
|
-
const onScheduleEmailingOpen = useCallback((widget) => {
|
|
97
|
-
openScheduleEmailingDialog(widget);
|
|
98
|
-
}, [openScheduleEmailingDialog]);
|
|
99
|
-
const onScheduleEmailingManagementOpen = useCallback((widget) => {
|
|
100
|
-
openScheduleEmailingManagementDialog(widget);
|
|
101
|
-
}, [openScheduleEmailingManagementDialog]);
|
|
102
|
-
const onScheduleEmailingCreateError = useCallback(() => {
|
|
103
|
-
closeScheduleEmailingDialog();
|
|
104
|
-
addError(messages.scheduleEmailSubmitError);
|
|
105
|
-
}, [closeScheduleEmailingDialog, addError]);
|
|
106
|
-
const onScheduleEmailingCreateSuccess = useCallback((widget) => {
|
|
107
|
-
closeScheduleEmailingDialog();
|
|
108
|
-
openScheduleEmailingManagementDialog(widget);
|
|
109
|
-
addSuccess(messages.scheduleEmailSubmitSuccess);
|
|
110
|
-
dispatch(refreshAutomations());
|
|
111
|
-
}, [closeScheduleEmailingDialog, openScheduleEmailingManagementDialog, addSuccess, dispatch]);
|
|
112
|
-
const onScheduleEmailingSaveError = useCallback(() => {
|
|
113
|
-
closeScheduleEmailingDialog();
|
|
114
|
-
addError(messages.scheduleEmailSaveError);
|
|
115
|
-
setScheduledEmailToEdit(undefined);
|
|
116
|
-
}, [closeScheduleEmailingDialog, addError, setScheduledEmailToEdit]);
|
|
117
|
-
const onScheduleEmailingSaveSuccess = useCallback((widget) => {
|
|
118
|
-
closeScheduleEmailingDialog();
|
|
119
|
-
openScheduleEmailingManagementDialog(widget);
|
|
120
|
-
addSuccess(messages.scheduleEmailSaveSuccess);
|
|
121
|
-
setScheduledEmailToEdit(undefined);
|
|
122
|
-
dispatch(refreshAutomations());
|
|
123
|
-
}, [
|
|
124
|
-
closeScheduleEmailingDialog,
|
|
125
|
-
openScheduleEmailingManagementDialog,
|
|
126
|
-
addSuccess,
|
|
127
|
-
setScheduledEmailToEdit,
|
|
128
|
-
dispatch,
|
|
129
|
-
]);
|
|
130
|
-
const onScheduleEmailingCancel = useCallback((widget) => {
|
|
131
|
-
closeScheduleEmailingDialog();
|
|
132
|
-
setScheduledEmailToEdit(undefined);
|
|
133
|
-
openScheduleEmailingManagementDialog(widget);
|
|
134
|
-
}, [closeScheduleEmailingDialog, openScheduleEmailingManagementDialog, setScheduledEmailToEdit]);
|
|
135
|
-
const onScheduleEmailingManagementDeleteSuccess = useCallback(() => {
|
|
136
|
-
closeScheduleEmailingDialog();
|
|
137
|
-
addSuccess(messages.scheduleEmailDeleteSuccess);
|
|
138
|
-
dispatch(refreshAutomations());
|
|
139
|
-
}, [addSuccess, closeScheduleEmailingDialog, dispatch]);
|
|
140
|
-
const onScheduleEmailingManagementAdd = useCallback((widget) => {
|
|
141
|
-
closeScheduleEmailingManagementDialog();
|
|
142
|
-
openScheduleEmailingDialog(widget);
|
|
143
|
-
}, [closeScheduleEmailingManagementDialog, openScheduleEmailingDialog]);
|
|
144
|
-
const onScheduleEmailingManagementEdit = useCallback((schedule, widget) => {
|
|
145
|
-
closeScheduleEmailingManagementDialog();
|
|
146
|
-
setScheduledEmailToEdit(schedule);
|
|
147
|
-
openScheduleEmailingDialog(widget);
|
|
148
|
-
}, [closeScheduleEmailingManagementDialog, openScheduleEmailingDialog, setScheduledEmailToEdit]);
|
|
149
|
-
const onScheduleEmailingManagementClose = useCallback(() => {
|
|
150
|
-
closeScheduleEmailingManagementDialog();
|
|
151
|
-
}, [closeScheduleEmailingManagementDialog]);
|
|
152
|
-
const onScheduleEmailingManagementLoadingError = useCallback(() => {
|
|
153
|
-
closeScheduleEmailingManagementDialog();
|
|
154
|
-
addError(messages.scheduleManagementLoadError);
|
|
155
|
-
}, [closeScheduleEmailingManagementDialog, addError]);
|
|
156
|
-
const onScheduleEmailingManagementDeleteError = useCallback(() => {
|
|
157
|
-
closeScheduleEmailingDialog();
|
|
158
|
-
closeScheduleEmailingManagementDialog();
|
|
159
|
-
addError(messages.scheduleManagementDeleteError);
|
|
160
|
-
}, [closeScheduleEmailingDialog, closeScheduleEmailingManagementDialog, addError]);
|
|
161
|
-
return {
|
|
162
|
-
webhooks,
|
|
163
|
-
emails,
|
|
164
|
-
users,
|
|
165
|
-
automations,
|
|
166
|
-
automationsCount,
|
|
167
|
-
schedulingLoadError,
|
|
168
|
-
numberOfAvailableDestinations,
|
|
169
|
-
isScheduleLoading,
|
|
170
|
-
isScheduledEmailingVisible,
|
|
171
|
-
isScheduledManagementEmailingVisible,
|
|
172
|
-
defaultOnScheduleEmailing,
|
|
173
|
-
defaultOnScheduleEmailingManagement,
|
|
174
|
-
isScheduleEmailingDialogOpen,
|
|
175
|
-
isScheduleEmailingManagementDialogOpen,
|
|
176
|
-
scheduleEmailingDialogContext,
|
|
177
|
-
scheduleEmailingManagementDialogContext,
|
|
178
|
-
onScheduleEmailingOpen,
|
|
179
|
-
onScheduleEmailingManagementOpen,
|
|
180
|
-
onScheduleEmailingManagementEdit,
|
|
181
|
-
scheduledEmailToEdit,
|
|
182
|
-
onScheduleEmailingCancel,
|
|
183
|
-
onScheduleEmailingCreateError,
|
|
184
|
-
onScheduleEmailingCreateSuccess,
|
|
185
|
-
onScheduleEmailingSaveError,
|
|
186
|
-
onScheduleEmailingSaveSuccess,
|
|
187
|
-
onScheduleEmailingManagementAdd,
|
|
188
|
-
onScheduleEmailingManagementClose,
|
|
189
|
-
onScheduleEmailingManagementLoadingError,
|
|
190
|
-
onScheduleEmailingManagementDeleteSuccess,
|
|
191
|
-
onScheduleEmailingManagementDeleteError,
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
//# sourceMappingURL=useDashboardScheduledEmails.js.map
|