@gooddata/sdk-ui-dashboard 10.12.0-alpha.1 → 10.12.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +183 -8
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/__version.js.map +1 -1
- package/esm/{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/commandHandlers/dashboard/common/insightReferences.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/insightReferences.js +32 -8
- package/esm/model/commandHandlers/dashboard/common/insightReferences.js.map +1 -1
- package/esm/model/commandHandlers/render/renderingWorker.d.ts.map +1 -1
- package/esm/model/commandHandlers/render/renderingWorker.js +5 -0
- package/esm/model/commandHandlers/render/renderingWorker.js.map +1 -1
- 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/dashboardStore.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.js +2 -0
- package/esm/model/store/dashboardStore.js.map +1 -1
- 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/executed/executedReducers.d.ts +9 -0
- package/esm/model/store/executed/executedReducers.d.ts.map +1 -0
- package/esm/model/store/executed/executedReducers.js +11 -0
- package/esm/model/store/executed/executedReducers.js.map +1 -0
- package/esm/model/store/executed/executedSelectors.d.ts +11 -0
- package/esm/model/store/executed/executedSelectors.d.ts.map +1 -0
- package/esm/model/store/executed/executedSelectors.js +12 -0
- package/esm/model/store/executed/executedSelectors.js.map +1 -0
- package/esm/model/store/executed/executedState.d.ts +8 -0
- package/esm/model/store/executed/executedState.d.ts.map +1 -0
- package/esm/model/store/executed/executedState.js +3 -0
- package/esm/model/store/executed/executedState.js.map +1 -0
- package/esm/model/store/executed/index.d.ts +6 -0
- package/esm/model/store/executed/index.d.ts.map +1 -0
- package/esm/model/store/executed/index.js +12 -0
- package/esm/model/store/executed/index.js.map +1 -0
- package/esm/model/store/index.d.ts +3 -1
- package/esm/model/store/index.d.ts.map +1 -1
- package/esm/model/store/index.js +2 -1
- package/esm/model/store/index.js.map +1 -1
- package/esm/model/store/types.d.ts +2 -0
- package/esm/model/store/types.d.ts.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +2 -2
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.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/localization/bundles/en-US.json +10 -0
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemBase.d.ts +1 -1
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemBase.d.ts.map +1 -1
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemBase.js +2 -2
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItemBase.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 +69 -83
- 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 -7
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +109 -64
- 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/CreateAlert.d.ts +2 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +2 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.d.ts +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.js +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +3 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +3 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js +45 -38
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts +4 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js +48 -13
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js +3 -3
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightConfiguration.d.ts +2 -6
- package/esm/presentation/widget/insight/configuration/InsightConfiguration.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightConfiguration.js +5 -4
- package/esm/presentation/widget/insight/configuration/InsightConfiguration.js.map +1 -1
- package/esm/presentation/widget/insightMenu/types.d.ts +6 -0
- package/esm/presentation/widget/insightMenu/types.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/types.js +3 -1
- package/esm/presentation/widget/insightMenu/types.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/AllVisualizationsDashInsights.d.ts +16 -0
- package/esm/presentation/widget/visualizationSwitcher/AllVisualizationsDashInsights.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/AllVisualizationsDashInsights.js +26 -0
- package/esm/presentation/widget/visualizationSwitcher/AllVisualizationsDashInsights.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +4 -4
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts +8 -0
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +99 -3
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.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/VisualizationConfig.js +4 -8
- package/esm/presentation/widget/visualizationSwitcher/configuration/VisualizationConfig.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/visualizationSwitcher/configuration/useVisualizationSwitcherEditableInsightMenu.d.ts +6 -0
- package/esm/presentation/widget/visualizationSwitcher/configuration/useVisualizationSwitcherEditableInsightMenu.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/configuration/useVisualizationSwitcherEditableInsightMenu.js +33 -0
- package/esm/presentation/widget/visualizationSwitcher/configuration/useVisualizationSwitcherEditableInsightMenu.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/useExecutionProgress.d.ts +4 -0
- package/esm/presentation/widget/visualizationSwitcher/useExecutionProgress.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/useExecutionProgress.js +60 -0
- package/esm/presentation/widget/visualizationSwitcher/useExecutionProgress.js.map +1 -0
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +8 -40
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.d.ts +17 -0
- package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.d.ts.map +1 -0
- package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.js +52 -0
- package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.js.map +1 -0
- 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/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts +12 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +53 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js.map +1 -0
- package/esm/sdk-ui-dashboard.d.ts +194 -65
- package/package.json +15 -15
- package/styles/css/dashboard.css +5 -0
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/insightConfiguration.css +1 -0
- package/styles/css/insightConfiguration.css.map +1 -1
- package/styles/css/main.css +81 -5
- package/styles/css/main.css.map +1 -1
- package/styles/css/notifications_channels_dialog.css +5 -0
- package/styles/css/notifications_channels_dialog.css.map +1 -1
- package/styles/css/visualizationSwitcherHeader.css +59 -0
- package/styles/css/visualizationSwitcherHeader.css.map +1 -0
- package/styles/css/visualizationSwitcherWidget.css +22 -5
- package/styles/css/visualizationSwitcherWidget.css.map +1 -1
- package/styles/scss/insightConfiguration.scss +2 -1
- package/styles/scss/main.scss +1 -0
- package/styles/scss/notifications_channels_dialog.scss +5 -0
- package/styles/scss/visualizationSwitcherHeader.scss +61 -0
- package/styles/scss/visualizationSwitcherWidget.scss +24 -5
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewModeDashboardVisualizationSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewModeDashboardVisualizationSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAMpD,OAAO,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAalE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAyC,MAAM,qBAAqB,CAAC;AAUtG;;GAEG;AACH,eAAO,MAAM,sCAAsC,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CAqCjG,CAAC;AAEF,eAAO,MAAM,2CAA2C,EAAE,KAAK,CAAC,EAa/D,CAAC;AAEF,MAAM,WAAW,mDACb,SAAQ,oCAAoC;IAC5C,OAAO,EAAE,QAAQ,CAAC;IAClB,mBAAmB,EAAE,cAAc,CAAC;IACpC,2BAA2B,EAAE,CAAC,qBAAqB,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AAED,eAAO,MAAM,6CAA6C,EAAE,KAAK,CAAC,EAAE,CAChE,mDAAmD,CAmKtD,CAAC"}
|
package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js
CHANGED
|
@@ -1,9 +1,105 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useCallback, useMemo } from "react";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { Icon, Typography } from "@gooddata/sdk-ui-kit";
|
|
5
|
+
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
6
|
+
import cx from "classnames";
|
|
7
|
+
import { useDashboardSelector, selectInsightsMap, selectSettings, useDashboardScheduledEmails, } from "../../../model/index.js";
|
|
8
|
+
import { useDashboardComponentsContext } from "../../../presentation/dashboardContexts/index.js";
|
|
9
|
+
import { DashboardItem, DashboardItemVisualization, getVisTypeCssClass, } from "../../../presentation/presentationComponents/index.js";
|
|
10
|
+
import { insightVisualizationType, widgetTitle } from "@gooddata/sdk-model";
|
|
11
|
+
import { InsightWidgetDescriptionTrigger } from "../description/InsightWidgetDescriptionTrigger.js";
|
|
12
|
+
import { useInsightExport } from "../common/index.js";
|
|
13
|
+
import { useAlertingAndScheduling } from "../widget/InsightWidget/useAlertingAndScheduling.js";
|
|
14
|
+
import { useInsightMenu } from "../widget/InsightWidget/useInsightMenu.js";
|
|
15
|
+
import { VisualizationSwitcherNavigationHeader } from "../widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js";
|
|
16
|
+
import { useExecutionProgress } from "./useExecutionProgress.js";
|
|
17
|
+
import { AllVisualizationsDashInsights } from "./AllVisualizationsDashInsights.js";
|
|
3
18
|
/**
|
|
4
19
|
* @internal
|
|
5
20
|
*/
|
|
6
|
-
export const ViewModeDashboardVisualizationSwitcher = (
|
|
7
|
-
|
|
21
|
+
export const ViewModeDashboardVisualizationSwitcher = (props) => {
|
|
22
|
+
const { widget, activeVisualizationId: initialActiveVisualizationId, onError, onExportReady, onLoadingChanged, screen, } = props;
|
|
23
|
+
const [activeVisualizationId, setActiveVisualizationId] = React.useState(initialActiveVisualizationId);
|
|
24
|
+
const activeVisualization = widget.visualizations.find((visualization) => visualization.identifier === activeVisualizationId) ??
|
|
25
|
+
widget.visualizations[0];
|
|
26
|
+
const insights = useDashboardSelector(selectInsightsMap);
|
|
27
|
+
const insight = activeVisualization ? insights.get(activeVisualization.insight) : undefined;
|
|
28
|
+
if (!activeVisualization || !insight) {
|
|
29
|
+
return React.createElement(ViewModeDashboardVisualizationSwitcherEmpty, null);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return (React.createElement(ViewModeDashboardVisualizationSwitcherContent, { widget: widget, insight: insight, activeVisualization: activeVisualization, screen: screen, onError: onError, onExportReady: onExportReady, onLoadingChanged: onLoadingChanged, onActiveVisualizationChange: setActiveVisualizationId }));
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const ViewModeDashboardVisualizationSwitcherEmpty = () => {
|
|
36
|
+
const theme = useTheme();
|
|
37
|
+
const intl = useIntl();
|
|
38
|
+
const emptyContentIconColor = theme?.palette?.complementary?.c7 ?? "#6D7680";
|
|
39
|
+
return (React.createElement("div", { className: "gd-visualization-switcher-widget-empty-content" },
|
|
40
|
+
React.createElement(Icon.VisualizationSwitcher, { width: 32, height: 38, color: emptyContentIconColor }),
|
|
41
|
+
React.createElement(Typography, { tagName: "p" }, intl.formatMessage({ id: "visualizationSwitcher.emptyContent" }))));
|
|
42
|
+
};
|
|
43
|
+
export const ViewModeDashboardVisualizationSwitcherContent = ({ widget, insight, activeVisualization, onActiveVisualizationChange, screen, onError, onExportReady, onLoadingChanged, }) => {
|
|
44
|
+
const intl = useIntl();
|
|
45
|
+
const visType = insightVisualizationType(insight);
|
|
46
|
+
const settings = useDashboardSelector(selectSettings);
|
|
47
|
+
const { showOthers } = useExecutionProgress();
|
|
48
|
+
const { ref: widgetRef } = activeVisualization;
|
|
49
|
+
const { exportCSVEnabled, exportXLSXEnabled, onExportCSV, onExportXLSX } = useInsightExport({
|
|
50
|
+
widgetRef,
|
|
51
|
+
title: widgetTitle(activeVisualization) || intl.formatMessage({ id: "export.defaultTitle" }),
|
|
52
|
+
insight,
|
|
53
|
+
});
|
|
54
|
+
const { onScheduleEmailingOpen, onScheduleEmailingManagementOpen, isScheduledEmailingVisible, isScheduledManagementEmailingVisible, numberOfAvailableDestinations, } = useDashboardScheduledEmails();
|
|
55
|
+
const onScheduleExport = useCallback(() => {
|
|
56
|
+
onScheduleEmailingOpen(activeVisualization);
|
|
57
|
+
}, [onScheduleEmailingOpen, activeVisualization]);
|
|
58
|
+
const onScheduleManagementExport = useCallback(() => {
|
|
59
|
+
onScheduleEmailingManagementOpen(activeVisualization);
|
|
60
|
+
}, [onScheduleEmailingManagementOpen, activeVisualization]);
|
|
61
|
+
const { isAlertingVisible, alertingDisabled, alertingDisabledReason, scheduleExportDisabled, scheduleExportManagementDisabled, scheduleExportDisabledReason, } = useAlertingAndScheduling({
|
|
62
|
+
widget: activeVisualization,
|
|
63
|
+
insight,
|
|
64
|
+
numberOfAvailableDestinations,
|
|
65
|
+
});
|
|
66
|
+
const { closeMenu, isMenuOpen, menuItems, openMenu } = useInsightMenu({
|
|
67
|
+
insight,
|
|
68
|
+
widget: activeVisualization,
|
|
69
|
+
exportCSVEnabled,
|
|
70
|
+
exportXLSXEnabled,
|
|
71
|
+
onExportCSV,
|
|
72
|
+
onExportXLSX,
|
|
73
|
+
onScheduleExport,
|
|
74
|
+
onScheduleManagementExport,
|
|
75
|
+
isScheduleExportVisible: isScheduledEmailingVisible,
|
|
76
|
+
isScheduleExportManagementVisible: isScheduledManagementEmailingVisible,
|
|
77
|
+
isAlertingVisible,
|
|
78
|
+
alertingDisabled,
|
|
79
|
+
alertingDisabledReason,
|
|
80
|
+
scheduleExportDisabled,
|
|
81
|
+
scheduleExportManagementDisabled,
|
|
82
|
+
scheduleExportDisabledReason,
|
|
83
|
+
});
|
|
84
|
+
const toggleMenu = useCallback(() => {
|
|
85
|
+
if (isMenuOpen) {
|
|
86
|
+
closeMenu();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
openMenu();
|
|
90
|
+
}
|
|
91
|
+
}, [isMenuOpen, closeMenu, openMenu]);
|
|
92
|
+
const { InsightMenuButtonComponentProvider, InsightMenuComponentProvider } = useDashboardComponentsContext();
|
|
93
|
+
const InsightMenuButtonComponent = useMemo(() => InsightMenuButtonComponentProvider(insight, activeVisualization), [InsightMenuButtonComponentProvider, insight, activeVisualization]);
|
|
94
|
+
const InsightMenuComponent = useMemo(() => InsightMenuComponentProvider(insight, activeVisualization), [InsightMenuComponentProvider, insight, activeVisualization]);
|
|
95
|
+
return (React.createElement(DashboardItem, { className: cx("type-visualization", "gd-dashboard-view-widget", getVisTypeCssClass(activeVisualization.type, visType)), screen: screen },
|
|
96
|
+
React.createElement(DashboardItemVisualization, { renderHeadline: (clientHeight, clientWidth) => (React.createElement(VisualizationSwitcherNavigationHeader, { widget: widget, clientHeight: clientHeight, clientWidth: clientWidth, activeVisualization: activeVisualization, onActiveVisualizationChange: (activeVisualizationId) => onActiveVisualizationChange(activeVisualizationId) })), renderBeforeVisualization: () => (React.createElement("div", { className: "gd-absolute-row" },
|
|
97
|
+
settings?.enableDescriptions ? (React.createElement(InsightWidgetDescriptionTrigger, { insight: insight, widget: activeVisualization, screen: screen })) : null,
|
|
98
|
+
React.createElement(InsightMenuButtonComponent, { insight: insight, widget: activeVisualization, isOpen: isMenuOpen, onClick: toggleMenu, items: menuItems }))), renderAfterContent: () => {
|
|
99
|
+
if (!isMenuOpen) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
return (React.createElement(InsightMenuComponent, { insight: insight, widget: activeVisualization, isOpen: isMenuOpen, onClose: closeMenu, items: menuItems }));
|
|
103
|
+
} }, ({ clientHeight, clientWidth }) => (React.createElement(AllVisualizationsDashInsights, { visualizations: widget.visualizations, activeVisualization: activeVisualization, showOthers: showOthers, onExportReady: onExportReady, onError: onError, onLoadingChanged: onLoadingChanged, clientHeight: clientHeight, clientWidth: clientWidth })))));
|
|
8
104
|
};
|
|
9
105
|
//# sourceMappingURL=ViewModeDashboardVisualizationSwitcher.js.map
|
package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewModeDashboardVisualizationSwitcher.js","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"AAAA,gCAAgC;
|
|
1
|
+
{"version":3,"file":"ViewModeDashboardVisualizationSwitcher.js","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwit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B,cAAc,EAAE,MAAM,CAAC,cAAc,EACrC,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,GAC1B,CACL,CACwB,CACjB,CACnB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,6 +7,7 @@ interface ToolbarProps {
|
|
|
7
7
|
onVisualizationAdded: (insightWidget: IInsightWidget, insight: IInsight, sizeInfo: IVisualizationSizeInfo) => void;
|
|
8
8
|
onWidgetDelete: () => void;
|
|
9
9
|
onSelectedVisualizationChanged?: (visualizationId: string) => void;
|
|
10
|
+
onClose: () => void;
|
|
10
11
|
}
|
|
11
12
|
export declare const Toolbar: React.FC<ToolbarProps>;
|
|
12
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/Toolbar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EACH,QAAQ,EACR,cAAc,EACd,4BAA4B,EAI/B,MAAM,qBAAqB,CAAC;AAmB7B,UAAU,YAAY;IAClB,MAAM,EAAE,4BAA4B,CAAC;IACrC,uBAAuB,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,CAClB,aAAa,EAAE,cAAc,EAC7B,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,sBAAsB,KAC/B,IAAI,CAAC;IACV,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,8BAA8B,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/Toolbar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EACH,QAAQ,EACR,cAAc,EACd,4BAA4B,EAI/B,MAAM,qBAAqB,CAAC;AAmB7B,UAAU,YAAY;IAClB,MAAM,EAAE,4BAA4B,CAAC;IACrC,uBAAuB,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,CAClB,aAAa,EAAE,cAAc,EAC7B,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,sBAAsB,KAC/B,IAAI,CAAC;IACV,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,8BAA8B,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAmI1C,CAAC"}
|
|
@@ -16,7 +16,7 @@ const defaultArrowOffsets = {
|
|
|
16
16
|
"tr tr": [-76, 18],
|
|
17
17
|
"br br": [-76, -18],
|
|
18
18
|
};
|
|
19
|
-
export const Toolbar = ({ widget, onVisualizationsChanged, onVisualizationAdded, onWidgetDelete, onSelectedVisualizationChanged, }) => {
|
|
19
|
+
export const Toolbar = ({ widget, onVisualizationsChanged, onVisualizationAdded, onWidgetDelete, onSelectedVisualizationChanged, onClose, }) => {
|
|
20
20
|
const visualizations = widget.visualizations;
|
|
21
21
|
const [isVisualizationsListVisible, setVisualizationsListVisible] = useState(true);
|
|
22
22
|
const [activeVisualizationId, setActiveVisualizationId] = useState(visualizations[0]?.identifier);
|
|
@@ -66,7 +66,7 @@ export const Toolbar = ({ widget, onVisualizationsChanged, onVisualizationAdded,
|
|
|
66
66
|
const alignTo = ".s-dash-item.is-selected";
|
|
67
67
|
const ignoreClicksOnByClass = [alignTo]; // do not close on click to the widget
|
|
68
68
|
const configBubbleClassNames = cx("gd-visualization-switcher-configuration-bubble", "edit-insight-config", "s-edit-insight-config", "edit-insight-config-title-1-line", "edit-insight-config-arrow-color");
|
|
69
|
-
return (React.createElement(Bubble, { className: cx("gd-configuration-bubble s-gd-visualization-switcher-toolbar-bubble", configBubbleClassNames), overlayClassName: "gd-configuration-bubble-wrapper sdk-edit-mode-on gd-visualization-switcher-toolbar-bubble-wrapper", alignTo: alignTo, alignPoints: defaultAlignPoints, arrowOffsets: defaultArrowOffsets, arrowDirections: defaultArrowDirections, closeOnOutsideClick: true, closeOnParentScroll: false, ignoreClicksOnByClass: ignoreClicksOnByClass, arrowStyle: { display: "none" } },
|
|
69
|
+
return (React.createElement(Bubble, { className: cx("gd-configuration-bubble s-gd-visualization-switcher-toolbar-bubble", configBubbleClassNames), overlayClassName: "gd-configuration-bubble-wrapper sdk-edit-mode-on gd-visualization-switcher-toolbar-bubble-wrapper", alignTo: alignTo, alignPoints: defaultAlignPoints, arrowOffsets: defaultArrowOffsets, arrowDirections: defaultArrowDirections, closeOnOutsideClick: true, closeOnParentScroll: false, ignoreClicksOnByClass: ignoreClicksOnByClass, arrowStyle: { display: "none" }, onClose: onClose },
|
|
70
70
|
React.createElement(ToolbarTop, { visualizations: visualizations, onNavigate: onNavigate, activeVisualizationId: activeVisualizationId, onDelete: onWidgetDelete, toggleVisualizationsList: showVisualizationsList, visualizationsListShown: shouldShowVisualizationsList }),
|
|
71
71
|
React.createElement(ToolbarBottom, { visualizations: visualizations, activeVisualizationId: activeVisualizationId, showVisualizationsList: shouldShowVisualizationsList, onVisualizationAdd: onVisualizationAdd, onVisualizationDelete: onVisualizationDelete, onVisualizationSelect: onVisualizationSelect })));
|
|
72
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/Toolbar.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAgB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAGlC,OAAO,EAIH,KAAK,EACL,UAAU,EACV,YAAY,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EACH,kBAAkB,EAClB,sBAAsB,GACzB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,mBAAmB,GAAiB;IACtC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/Toolbar.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAgB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAA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AO,EAAE,OAAO,EAChB,WAAW,EAAE,kBAAkB,EAC/B,YAAY,EAAE,mBAAmB,EACjC,eAAe,EAAE,sBAAsB,EACvC,mBAAmB,QACnB,mBAAmB,EAAE,KAAK,EAC1B,qBAAqB,EAAE,qBAAqB,EAC5C,UAAU,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC/B,OAAO,EAAE,OAAO;QAEhB,oBAAC,UAAU,IACP,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,qBAAqB,EAAE,qBAAqB,EAC5C,QAAQ,EAAE,cAAc,EACxB,wBAAwB,EAAE,sBAAsB,EAChD,uBAAuB,EAAE,4BAA4B,GACvD;QACF,oBAAC,aAAa,IACV,cAAc,EAAE,cAAc,EAC9B,qBAAqB,EAAE,qBAAqB,EAC5C,sBAAsB,EAAE,4BAA4B,EACpD,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB,EAC5C,qBAAqB,EAAE,qBAAqB,GAC9C,CACG,CACZ,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -3,25 +3,21 @@ import React, { useState } from "react";
|
|
|
3
3
|
import noop from "lodash/noop.js";
|
|
4
4
|
import { DashboardInsightMenuBody } from "../../insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/index.js";
|
|
5
5
|
import { selectInsightsMap, selectRenderMode, useDashboardSelector } from "../../../../model/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useVisualizationSwitcherEditableInsightMenu } from "./useVisualizationSwitcherEditableInsightMenu.js";
|
|
7
7
|
export const VisualizationConfig = ({ widget }) => {
|
|
8
8
|
const insights = useDashboardSelector(selectInsightsMap);
|
|
9
9
|
const insight = insights.get(widget.insight);
|
|
10
10
|
if (!insight) {
|
|
11
11
|
// eslint-disable-next-line no-console
|
|
12
|
-
console.debug("
|
|
12
|
+
console.debug("DefaultVisualizationSwitcherToolbar rendered before the insights were ready, skipping render.");
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
return React.createElement(VisualizationConfigContent, { widget: widget, insight: insight });
|
|
16
16
|
};
|
|
17
17
|
const VisualizationConfigContent = ({ widget, insight, }) => {
|
|
18
|
-
const { menuItems } =
|
|
19
|
-
widget,
|
|
20
|
-
insight,
|
|
21
|
-
closeMenu: noop,
|
|
22
|
-
});
|
|
18
|
+
const { menuItems } = useVisualizationSwitcherEditableInsightMenu(widget, insight);
|
|
23
19
|
const renderMode = useDashboardSelector(selectRenderMode);
|
|
24
20
|
const [submenu, setSubmenu] = useState(null);
|
|
25
|
-
return (React.createElement(DashboardInsightMenuBody, { widget: widget, insight: insight, items: menuItems, submenu: submenu, setSubmenu: setSubmenu, renderMode: renderMode, isOpen: true, onClose: noop }));
|
|
21
|
+
return (React.createElement(DashboardInsightMenuBody, { key: widget.identifier, widget: widget, insight: insight, items: menuItems, submenu: submenu, setSubmenu: setSubmenu, renderMode: renderMode, isOpen: true, onClose: noop }));
|
|
26
22
|
};
|
|
27
23
|
//# sourceMappingURL=VisualizationConfig.js.map
|
package/esm/presentation/widget/visualizationSwitcher/configuration/VisualizationConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualizationConfig.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/VisualizationConfig.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"VisualizationConfig.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/VisualizationConfig.tsx"],"names":[],"mappings":"AAAA,gCAA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U,EACtB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI,GACf,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -10,6 +10,7 @@ export interface IVisualizationSwitcherToolbarProps {
|
|
|
10
10
|
onVisualizationsChanged: (visualizations: IInsightWidget[]) => void;
|
|
11
11
|
onVisualizationAdded: (insightWidget: IInsightWidget, insight: IInsight, sizeInfo: IVisualizationSizeInfo) => void;
|
|
12
12
|
onSelectedVisualizationChanged: (visualizationId: string) => void;
|
|
13
|
+
onClose: () => void;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAC/C,MAAM,EAAE,4BAA4B,CAAC;IACrC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,uBAAuB,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,CAClB,aAAa,EAAE,cAAc,EAC7B,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,sBAAsB,KAC/B,IAAI,CAAC;IACV,8BAA8B,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAC/C,MAAM,EAAE,4BAA4B,CAAC;IACrC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,uBAAuB,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,CAClB,aAAa,EAAE,cAAc,EAC7B,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,sBAAsB,KAC/B,IAAI,CAAC;IACV,8BAA8B,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,aAAa,CAAC,kCAAkC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IInsight, IInsightWidget } from "@gooddata/sdk-model";
|
|
2
|
+
import { IInsightMenuItem } from "../../insightMenu/types.js";
|
|
3
|
+
export declare const useVisualizationSwitcherEditableInsightMenu: (widget: IInsightWidget, insight: IInsight) => {
|
|
4
|
+
menuItems: IInsightMenuItem[];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=useVisualizationSwitcherEditableInsightMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVisualizationSwitcherEditableInsightMenu.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/useVisualizationSwitcherEditableInsightMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EACH,gBAAgB,EAGnB,MAAM,4BAA4B,CAAC;AAGpC,eAAO,MAAM,2CAA2C,WAC5C,cAAc,WACb,QAAQ;eACL,gBAAgB,EAAE;CA6BjC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import React from "react";
|
|
3
|
+
import noop from "lodash/noop.js";
|
|
4
|
+
import { useEditableInsightMenu } from "../../widget/InsightWidget/useEditableInsightMenu.js";
|
|
5
|
+
import { isIInsightMenuSubmenu, } from "../../insightMenu/types.js";
|
|
6
|
+
import { useIntl } from "react-intl";
|
|
7
|
+
export const useVisualizationSwitcherEditableInsightMenu = (widget, insight) => {
|
|
8
|
+
const intl = useIntl();
|
|
9
|
+
const { menuItems } = useEditableInsightMenu({
|
|
10
|
+
widget,
|
|
11
|
+
insight,
|
|
12
|
+
closeMenu: noop,
|
|
13
|
+
});
|
|
14
|
+
const modifiedMenuItems = menuItems.map((item) => {
|
|
15
|
+
if (item.itemId === "ConfigurationPanelSubmenu" && isIInsightMenuSubmenu(item)) {
|
|
16
|
+
return {
|
|
17
|
+
...item,
|
|
18
|
+
SubmenuComponent: (props) => (React.createElement(item.SubmenuComponent, { ...props, enableTitleConfig: false })),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (item.itemId === "InteractionPanelRemove") {
|
|
22
|
+
return {
|
|
23
|
+
...item,
|
|
24
|
+
itemName: intl.formatMessage({
|
|
25
|
+
id: "visualizationSwitcher.configurationPanel.remove.from.switcher",
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return item;
|
|
30
|
+
});
|
|
31
|
+
return { menuItems: modifiedMenuItems };
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=useVisualizationSwitcherEditableInsightMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVisualizationSwitcherEditableInsightMenu.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/visualizationSwitcher/configuration/useVisualizationSwitcherEditableInsightMenu.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AA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witcher/useExecutionProgress.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,oBAAoB;gBACjB,OAAO;CAoEtB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { useDashboardSelector, selectIsDashboardExecuted, useDashboardEventsContext, isDashboardFilterContextChanged, isDashboardCommandStarted, } from "../../../model/index.js";
|
|
4
|
+
export const useExecutionProgress = () => {
|
|
5
|
+
const isDashboardExecuted = useDashboardSelector(selectIsDashboardExecuted);
|
|
6
|
+
const [isReexecuting, setIsReexecuting] = useState(true); // execution running as default because it covers the initial render and mode switching
|
|
7
|
+
const [_executionsProgress, setExecutionsProgress] = useState({});
|
|
8
|
+
const { registerHandler, unregisterHandler } = useDashboardEventsContext();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const onActionTriggeringReexecution = {
|
|
11
|
+
eval: (evt) => {
|
|
12
|
+
return isDashboardFilterContextChanged(evt);
|
|
13
|
+
},
|
|
14
|
+
handler: () => {
|
|
15
|
+
setIsReexecuting(true);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
const onRenderRequest = {
|
|
19
|
+
eval: (evt) => {
|
|
20
|
+
return (isDashboardCommandStarted(evt) &&
|
|
21
|
+
evt.payload.command.type === "GDC.DASH/CMD.RENDER.ASYNC.REQUEST");
|
|
22
|
+
},
|
|
23
|
+
handler: (evt) => {
|
|
24
|
+
setExecutionsProgress((prev) => ({
|
|
25
|
+
...prev,
|
|
26
|
+
[evt.payload.command.payload.id]: true,
|
|
27
|
+
}));
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const onRenderResponse = {
|
|
31
|
+
eval: (evt) => {
|
|
32
|
+
return (isDashboardCommandStarted(evt) &&
|
|
33
|
+
evt.payload.command.type === "GDC.DASH/CMD.RENDER.ASYNC.RESOLVE");
|
|
34
|
+
},
|
|
35
|
+
handler: (evt) => {
|
|
36
|
+
setExecutionsProgress((prev) => {
|
|
37
|
+
const newProgress = {
|
|
38
|
+
...prev,
|
|
39
|
+
[evt.payload.command.payload.id]: false,
|
|
40
|
+
};
|
|
41
|
+
if (Object.values(newProgress).every((value) => !value)) {
|
|
42
|
+
setIsReexecuting(false);
|
|
43
|
+
}
|
|
44
|
+
return newProgress;
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
registerHandler(onActionTriggeringReexecution);
|
|
49
|
+
registerHandler(onRenderRequest);
|
|
50
|
+
registerHandler(onRenderResponse);
|
|
51
|
+
return () => {
|
|
52
|
+
unregisterHandler(onActionTriggeringReexecution);
|
|
53
|
+
unregisterHandler(onRenderRequest);
|
|
54
|
+
unregisterHandler(onRenderResponse);
|
|
55
|
+
};
|
|
56
|
+
}, [registerHandler, unregisterHandler]);
|
|
57
|
+
const showOthers = isDashboardExecuted && !isReexecuting;
|
|
58
|
+
return { showOthers };
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=useExecutionProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecutionProgress.js","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/useExecutionProgress.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EACH,oBAAoB,EACpB,yBAAyB,EAEzB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,GAI5B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAElC,EAAE;IACA,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IAC5E,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,uFAAuF;IAEjJ,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,GAAG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AC1C,CAAC;oBAEF,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;wBACtD,gBAAgB,CAAC,KAAK,CAAC,CAAC;oBAC5B,CAAC;oBACD,OAAO,WAAW,CAAC;gBACvB,CAAC,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;QAEF,eAAe,CAAC,6BAA6B,CAAC,CAAC;QAC/C,eAAe,CAAC,eAAe,CAAC,CAAC;QACjC,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAElC,OAAO,GAAG,EAAE;YACR,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;YACjD,iBAAiB,CAAC,eAAe,CAAC,CAAC;YACnC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;QACxC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEzC,MAAM,UAAU,GAAG,mBAAmB,IAAI,CAAC,aAAa,CAAC;IACzD,OAAO,EAAE,UAAU,EAAE,CAAC;AAC1B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardInsightWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultDashboardInsightWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAwBpD,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAGjE,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,mCAAmC,EAAE,SAAS,CAAC,CAIxG,CAAC"}
|
|
@@ -3,8 +3,7 @@ import React, { useMemo, useCallback } from "react";
|
|
|
3
3
|
import cx from "classnames";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { widgetTitle, insightVisualizationType } from "@gooddata/sdk-model";
|
|
6
|
-
import {
|
|
7
|
-
import { useDashboardSelector, selectSettings, isCustomWidget, useDashboardScheduledEmails, } from "../../../../model/index.js";
|
|
6
|
+
import { useDashboardSelector, selectSettings, useDashboardScheduledEmails, } from "../../../../model/index.js";
|
|
8
7
|
import { DashboardItem, DashboardItemHeadline, DashboardItemVisualization, getVisTypeCssClass, } from "../../../presentationComponents/index.js";
|
|
9
8
|
import { DashboardInsight } from "../../insight/index.js";
|
|
10
9
|
import { useInsightExport } from "../../common/index.js";
|
|
@@ -12,6 +11,7 @@ import { useDashboardComponentsContext } from "../../../dashboardContexts/index.
|
|
|
12
11
|
import { InsightWidgetDescriptionTrigger } from "../../description/InsightWidgetDescriptionTrigger.js";
|
|
13
12
|
import { useInsightMenu } from "./useInsightMenu.js";
|
|
14
13
|
import { DashboardWidgetInsightGuard } from "./DashboardWidgetInsightGuard.js";
|
|
14
|
+
import { useAlertingAndScheduling } from "./useAlertingAndScheduling.js";
|
|
15
15
|
export const DefaultDashboardInsightWidget = (props) => {
|
|
16
16
|
return React.createElement(DashboardWidgetInsightGuard, { ...props, Component: DefaultDashboardInsightWidgetCore });
|
|
17
17
|
};
|
|
@@ -21,7 +21,7 @@ export const DefaultDashboardInsightWidget = (props) => {
|
|
|
21
21
|
const DefaultDashboardInsightWidgetCore = ({ widget, insight, screen, onError, onExportReady, onLoadingChanged, dashboardItemClasses }) => {
|
|
22
22
|
const intl = useIntl();
|
|
23
23
|
const settings = useDashboardSelector(selectSettings);
|
|
24
|
-
const {
|
|
24
|
+
const { isScheduledEmailingVisible, isScheduledManagementEmailingVisible, numberOfAvailableDestinations, onScheduleEmailingOpen, onScheduleEmailingManagementOpen, } = useDashboardScheduledEmails();
|
|
25
25
|
const visType = insightVisualizationType(insight);
|
|
26
26
|
const { ref: widgetRef } = widget;
|
|
27
27
|
const { exportCSVEnabled, exportXLSXEnabled, onExportCSV, onExportXLSX } = useInsightExport({
|
|
@@ -35,43 +35,11 @@ const DefaultDashboardInsightWidgetCore = ({ widget, insight, screen, onError, o
|
|
|
35
35
|
const onScheduleManagementExport = useCallback(() => {
|
|
36
36
|
onScheduleEmailingManagementOpen(widget);
|
|
37
37
|
}, [onScheduleEmailingManagementOpen, widget]);
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const isAlertingEnabled = settings.enableAlerting === true;
|
|
44
|
-
const isInsightTypeSupportedForAlerting = isInsightSupportedForAlerts(insight);
|
|
45
|
-
const isInsightEnabledForAlerting = isInsightAlertingConfigurationEnabled(insight);
|
|
46
|
-
const isAlertingVisible = isAlertingEnabled && isStandardWidget && isInsightTypeSupportedForAlerting;
|
|
47
|
-
const alertingDisabled = hasNoDestinations || !isInsightEnabledForAlerting || widgetHasNoLocalIdentifier;
|
|
48
|
-
let alertingDisabledReason = undefined;
|
|
49
|
-
if (widgetHasNoLocalIdentifier) {
|
|
50
|
-
alertingDisabledReason = "oldWidget";
|
|
51
|
-
}
|
|
52
|
-
else if (hasNoDestinations) {
|
|
53
|
-
alertingDisabledReason = "noDestinations";
|
|
54
|
-
}
|
|
55
|
-
else if (!isInsightEnabledForAlerting) {
|
|
56
|
-
alertingDisabledReason = "disabledOnInsight";
|
|
57
|
-
}
|
|
58
|
-
const isInsightTypeSupportedForScheduling = isInsightSupportedForScheduledExports(insight);
|
|
59
|
-
const isInsightEnabledForScheduling = isInsightScheduledExportsConfigurationEnabled(insight);
|
|
60
|
-
const scheduleExportDisabled = !isInsightTypeSupportedForScheduling ||
|
|
61
|
-
!isStandardWidget ||
|
|
62
|
-
!isInsightEnabledForScheduling ||
|
|
63
|
-
widgetHasNoLocalIdentifier;
|
|
64
|
-
const scheduleExportManagementDisabled = !isStandardWidget;
|
|
65
|
-
let scheduleExportDisabledReason = undefined;
|
|
66
|
-
if (widgetHasNoLocalIdentifier) {
|
|
67
|
-
scheduleExportDisabledReason = "oldWidget";
|
|
68
|
-
}
|
|
69
|
-
else if (!isStandardWidget) {
|
|
70
|
-
scheduleExportDisabledReason = "incompatibleWidget";
|
|
71
|
-
}
|
|
72
|
-
else if (!isInsightEnabledForScheduling || !isInsightTypeSupportedForScheduling) {
|
|
73
|
-
scheduleExportDisabledReason = "disabledOnInsight";
|
|
74
|
-
}
|
|
38
|
+
const { isAlertingVisible, alertingDisabled, alertingDisabledReason, scheduleExportDisabled, scheduleExportManagementDisabled, scheduleExportDisabledReason, } = useAlertingAndScheduling({
|
|
39
|
+
widget,
|
|
40
|
+
insight,
|
|
41
|
+
numberOfAvailableDestinations,
|
|
42
|
+
});
|
|
75
43
|
///
|
|
76
44
|
const { closeMenu, isMenuOpen, menuItems, openMenu } = useInsightMenu({
|
|
77
45
|
insight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardInsightWidget.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAY,WAAW,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultDashboardInsightWidget.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,YAAY,CAAC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oBAAC,0BAA0B,IACvB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,SAAS,GAClB,CACA,CACT,EACD,kBAAkB,EAAE,GAAG,EAAE;gBACrB,IAAI,CAAC,UAAU,EAAE,CAAC;oBACd,OAAO,IAAI,CAAC;gBAChB,CAAC;gBAED,OAAO,CACH,oBAAC,oBAAoB,IACjB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GAClB,CACL,CAAC;YACN,CAAC,IAEA,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAChC,oBAAC,gBAAgB,IACb,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,GACpC,CACL,CACwB,CACjB,CACnB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IInsight, IInsightWidget } from "@gooddata/sdk-model";
|
|
2
|
+
import { AlertingDisabledReason, SchedulingDisabledReason } from "../../insightMenu/index.js";
|
|
3
|
+
type UseAlertingAndSchedulingConfig = {
|
|
4
|
+
insight: IInsight;
|
|
5
|
+
widget: IInsightWidget;
|
|
6
|
+
numberOfAvailableDestinations: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const useAlertingAndScheduling: ({ widget, insight, numberOfAvailableDestinations, }: UseAlertingAndSchedulingConfig) => {
|
|
9
|
+
isAlertingVisible: boolean;
|
|
10
|
+
alertingDisabled: boolean;
|
|
11
|
+
alertingDisabledReason?: AlertingDisabledReason | undefined;
|
|
12
|
+
scheduleExportDisabled: boolean;
|
|
13
|
+
scheduleExportManagementDisabled: boolean;
|
|
14
|
+
scheduleExportDisabledReason?: SchedulingDisabledReason | undefined;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useAlertingAndScheduling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertingAndScheduling.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAQ9F,KAAK,8BAA8B,GAAG;IAClC,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;IACvB,6BAA6B,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,wBAAwB,wDAIlC,8BAA8B;uBACV,OAAO;sBACR,OAAO;;4BAED,OAAO;sCACG,OAAO;;CAmD5C,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import { useDashboardSelector, selectSettings, isCustomWidget } from "../../../../model/index.js";
|
|
3
|
+
import { isInsightAlertingConfigurationEnabled, isInsightScheduledExportsConfigurationEnabled, isInsightSupportedForAlerts, isInsightSupportedForScheduledExports, } from "@gooddata/sdk-ui-ext";
|
|
4
|
+
export const useAlertingAndScheduling = ({ widget, insight, numberOfAvailableDestinations, }) => {
|
|
5
|
+
const settings = useDashboardSelector(selectSettings);
|
|
6
|
+
const isStandardWidget = !isCustomWidget(widget);
|
|
7
|
+
const hasNoDestinations = numberOfAvailableDestinations === 0;
|
|
8
|
+
//NOTE: Check if widget has localIdentifier, if not that is probably widget from old dashboard
|
|
9
|
+
// and we should not allow to schedule export/alert because we need localIdentifier to identify the widget
|
|
10
|
+
const widgetHasNoLocalIdentifier = !widget.localIdentifier;
|
|
11
|
+
const isAlertingEnabled = settings.enableAlerting === true;
|
|
12
|
+
const isInsightTypeSupportedForAlerting = isInsightSupportedForAlerts(insight);
|
|
13
|
+
const isInsightEnabledForAlerting = isInsightAlertingConfigurationEnabled(insight);
|
|
14
|
+
const isAlertingVisible = isAlertingEnabled && isStandardWidget && isInsightTypeSupportedForAlerting;
|
|
15
|
+
const alertingDisabled = hasNoDestinations || !isInsightEnabledForAlerting || widgetHasNoLocalIdentifier;
|
|
16
|
+
let alertingDisabledReason = undefined;
|
|
17
|
+
if (widgetHasNoLocalIdentifier) {
|
|
18
|
+
alertingDisabledReason = "oldWidget";
|
|
19
|
+
}
|
|
20
|
+
else if (hasNoDestinations) {
|
|
21
|
+
alertingDisabledReason = "noDestinations";
|
|
22
|
+
}
|
|
23
|
+
else if (!isInsightEnabledForAlerting) {
|
|
24
|
+
alertingDisabledReason = "disabledOnInsight";
|
|
25
|
+
}
|
|
26
|
+
const isInsightTypeSupportedForScheduling = isInsightSupportedForScheduledExports(insight);
|
|
27
|
+
const isInsightEnabledForScheduling = isInsightScheduledExportsConfigurationEnabled(insight);
|
|
28
|
+
const scheduleExportDisabled = !isInsightTypeSupportedForScheduling ||
|
|
29
|
+
!isStandardWidget ||
|
|
30
|
+
!isInsightEnabledForScheduling ||
|
|
31
|
+
widgetHasNoLocalIdentifier;
|
|
32
|
+
const scheduleExportManagementDisabled = !isStandardWidget;
|
|
33
|
+
let scheduleExportDisabledReason = undefined;
|
|
34
|
+
if (widgetHasNoLocalIdentifier) {
|
|
35
|
+
scheduleExportDisabledReason = "oldWidget";
|
|
36
|
+
}
|
|
37
|
+
else if (!isStandardWidget) {
|
|
38
|
+
scheduleExportDisabledReason = "incompatibleWidget";
|
|
39
|
+
}
|
|
40
|
+
else if (!isInsightEnabledForScheduling || !isInsightTypeSupportedForScheduling) {
|
|
41
|
+
scheduleExportDisabledReason = "disabledOnInsight";
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
isAlertingVisible,
|
|
45
|
+
alertingDisabled,
|
|
46
|
+
alertingDisabledReason,
|
|
47
|
+
scheduleExportDisabled,
|
|
48
|
+
scheduleExportManagementDisabled,
|
|
49
|
+
scheduleExportDisabledReason,
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=useAlertingAndScheduling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertingAndScheduling.js","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAElG,OAAO,EACH,qCAAqC,EACrC,6CAA6C,EAC7C,2BAA2B,EAC3B,qCAAqC,GACxC,MAAM,sBAAsB,CAAC;AAQ9B,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACrC,MAAM,EACN,OAAO,EACP,6BAA6B,GACA,EAO/B,EAAE;IACA,MAAM,QAAQ,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAEtD,MAAM,gBAAgB,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,iBAAiB,GAAG,6BAA6B,KAAK,CAAC,CAAC;IAE9D,8FAA8F;IAC9F,0GAA0G;IAC1G,MAAM,0BAA0B,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC;IAE3D,MAAM,iBAAiB,GAAG,QAAQ,CAAC,cAAc,KAAK,IAAI,CAAC;IAC3D,MAAM,iCAAiC,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC/E,MAAM,2BAA2B,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IACnF,MAAM,iBAAiB,GAAG,iBAAiB,IAAI,gBAAgB,IAAI,iCAAiC,CAAC;IACrG,MAAM,gBAAgB,GAAG,iBAAiB,IAAI,CAAC,2BAA2B,IAAI,0BAA0B,CAAC;IACzG,IAAI,sBAAsB,GAAuC,SAAS,CAAC;IAC3E,IAAI,0BAA0B,EAAE,CAAC;QAC7B,sBAAsB,GAAG,WAAW,CAAC;IACzC,CAAC;SAAM,IAAI,iBAAiB,EAAE,CAAC;QAC3B,sBAAsB,GAAG,gBAAgB,CAAC;IAC9C,CAAC;SAAM,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACtC,sBAAsB,GAAG,mBAAmB,CAAC;IACjD,CAAC;IAED,MAAM,mCAAmC,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IAC3F,MAAM,6BAA6B,GAAG,6CAA6C,CAAC,OAAO,CAAC,CAAC;IAC7F,MAAM,sBAAsB,GACxB,CAAC,mCAAmC;QACpC,CAAC,gBAAgB;QACjB,CAAC,6BAA6B;QAC9B,0BAA0B,CAAC;IAC/B,MAAM,gCAAgC,GAAG,CAAC,gBAAgB,CAAC;IAC3D,IAAI,4BAA4B,GAAyC,SAAS,CAAC;IACnF,IAAI,0BAA0B,EAAE,CAAC;QAC7B,4BAA4B,GAAG,WAAW,CAAC;IAC/C,CAAC;SAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3B,4BAA4B,GAAG,oBAAoB,CAAC;IACxD,CAAC;SAAM,IAAI,CAAC,6BAA6B,IAAI,CAAC,mCAAmC,EAAE,CAAC;QAChF,4BAA4B,GAAG,mBAAmB,CAAC;IACvD,CAAC;IAED,OAAO;QACH,iBAAiB;QACjB,gBAAgB;QAChB,sBAAsB;QACtB,sBAAsB;QACtB,gCAAgC;QAChC,4BAA4B;KAC/B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAiB9D,OAAO,EAAE,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAO/E;;GAEG;AACH,eAAO,MAAM,4CAA4C,EAAE,KAAK,CAAC,EAAE,CAC/D,iDAAiD,
|
|
1
|
+
{"version":3,"file":"EditableDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAiB9D,OAAO,EAAE,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAO/E;;GAEG;AACH,eAAO,MAAM,4CAA4C,EAAE,KAAK,CAAC,EAAE,CAC/D,iDAAiD,CA6GpD,CAAC"}
|
|
@@ -17,7 +17,7 @@ const overlayController = OverlayController.getInstance(DASHBOARD_OVERLAYS_FILTE
|
|
|
17
17
|
export const EditableDashboardVisualizationSwitcherWidget = ({ widget, screen, dashboardItemClasses, onError, onExportReady, onLoadingChanged }) => {
|
|
18
18
|
const dispatch = useDashboardDispatch();
|
|
19
19
|
const intl = useIntl();
|
|
20
|
-
const { isSelectable, isSelected, onSelected, hasConfigPanelOpen } = useWidgetSelection(widgetRef(widget));
|
|
20
|
+
const { isSelectable, isSelected, onSelected, closeConfigPanel, hasConfigPanelOpen } = useWidgetSelection(widgetRef(widget));
|
|
21
21
|
const isSaving = useDashboardSelector(selectIsDashboardSaving);
|
|
22
22
|
const isEditable = !isSaving;
|
|
23
23
|
const [activeVisualizationId, setActiveVisualizationId] = useState(widget.visualizations[0]?.identifier);
|
|
@@ -35,7 +35,7 @@ export const EditableDashboardVisualizationSwitcherWidget = ({ widget, screen, d
|
|
|
35
35
|
React.createElement(DashboardItemBase, { isSelectable: isSelectable, isSelected: isSelected, onSelected: onSelected, contentClassName: cx({ "is-editable": isEditable }), visualizationClassName: "gd-visualization-switcher-widget-wrapper", renderAfterContent: () => {
|
|
36
36
|
return (React.createElement(React.Fragment, null,
|
|
37
37
|
!!isSelected && (React.createElement("div", { className: "dash-item-action dash-item-action-lw-options", onClick: onSelected })),
|
|
38
|
-
!!hasConfigPanelOpen && (React.createElement(VisualizationSwitcherToolbarComponent, { widget: widget, onWidgetDelete: () => setIsConfirmDeleteDialogVisible(true), onVisualizationsChanged: changedVisualizations, onSelectedVisualizationChanged: setActiveVisualizationId, onVisualizationAdded: addVisualization }))));
|
|
38
|
+
!!hasConfigPanelOpen && (React.createElement(VisualizationSwitcherToolbarComponent, { widget: widget, onWidgetDelete: () => setIsConfirmDeleteDialogVisible(true), onVisualizationsChanged: changedVisualizations, onSelectedVisualizationChanged: setActiveVisualizationId, onVisualizationAdded: addVisualization, onClose: closeConfigPanel }))));
|
|
39
39
|
} }, ({ clientWidth, clientHeight }) => (React.createElement(DashboardVisualizationSwitcher, { widget: widget, clientHeight: clientHeight, clientWidth: clientWidth, activeVisualizationId: activeVisualizationId, onError: onError, onExportReady: onExportReady, onLoadingChanged: onLoadingChanged, screen: screen })))),
|
|
40
40
|
isConfirmDeleteDialogVisible ? (React.createElement(OverlayControllerProvider, { overlayController: overlayController },
|
|
41
41
|
React.createElement(ConfirmDialog, { className: "s-visualization-switcher-remove-confirm-dialog", onSubmit: () => dispatch(eagerRemoveSectionItemByWidgetRef(widget.ref)), onCancel: () => setIsConfirmDeleteDialogVisible(false), headline: intl.formatMessage({ id: "visualizationSwitcher.deleteDialog.header" }), submitButtonText: intl.formatMessage({ id: "delete" }), cancelButtonText: intl.formatMessage({ id: "cancel" }) },
|