@gooddata/sdk-ui-dashboard 11.55.0-alpha.3 → 11.55.0-alpha.4
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 +8 -8
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/automation/index.d.ts +19 -1
- package/esm/_staging/automation/index.d.ts.map +1 -1
- package/esm/_staging/automation/index.js +44 -8
- package/esm/_staging/dashboard/dashboardFilterConverter.d.ts +1 -18
- package/esm/_staging/dashboard/dashboardFilterConverter.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardFilterConverter.js +1 -62
- package/esm/_staging/insight/insightWidgetProperties.d.ts +6 -0
- package/esm/_staging/insight/insightWidgetProperties.d.ts.map +1 -0
- package/esm/_staging/insight/insightWidgetProperties.js +32 -0
- package/esm/_staging/sharedHooks/useRichTextFilters.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useRichTextFilters.js +1 -2
- package/esm/index.d.ts +7 -7
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +4 -4
- package/esm/internal.d.ts +2 -2
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +2 -2
- package/esm/kdaDialog/dialog/hooks/useChangeAnalysis.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/hooks/useChangeAnalysis.js +1 -2
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts.map +1 -1
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.js +1 -2
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +1 -2
- package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.d.ts +11 -5
- package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.js +24 -7
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.js +1 -2
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +5 -0
- package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.js +21 -3
- package/esm/model/commandHandlers/widgets/exportRawInsightWidgetHandler.js +1 -2
- package/esm/model/commands/filters.d.ts +1 -1
- package/esm/model/commands/filters.js +1 -1
- package/esm/model/events/filters.d.ts +6 -6
- package/esm/model/store/tabs/layout/layoutSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/layout/layoutSelectors.js +1 -2
- package/esm/presentation/automations/alerting/AlertingManagementDialog.d.ts +4 -0
- package/esm/presentation/automations/alerting/AlertingManagementDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/AlertingManagementDialog.js +6 -2
- package/esm/presentation/automations/alerting/types.d.ts +50 -0
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts +3 -3
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.js +6 -4
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts +3 -3
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +6 -4
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts +10 -0
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.js +10 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +10 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AutomationsContext.js +10 -0
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts +10 -0
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.js +10 -0
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailManagementDialog.d.ts +4 -0
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailManagementDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailManagementDialog.js +6 -2
- package/esm/presentation/automations/scheduledEmail/types.d.ts +52 -0
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts +8 -4
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.js +30 -13
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js +1 -4
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +12 -7
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +3 -1
- package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -1
- package/esm/presentation/automations/shared/filters/conversions.js +1 -2
- package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.js +4 -1
- package/esm/presentation/dashboard/types.d.ts +32 -2
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +6 -2
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +3 -0
- 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/filterBar/attributeFilter/AttributeFilterParentFilteringContext.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.js +1 -2
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +1 -3
- package/esm/presentation/filterBar/attributeFilter/useParentFilters.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/useParentFilters.js +1 -2
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.js +12 -8
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/useResolveDashboardInsightProperties.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/useResolveDashboardInsightProperties.js +3 -35
- package/esm/presentation/widget/widget/DefaultDashboardWidget.d.ts +2 -1
- package/esm/presentation/widget/widget/DefaultDashboardWidget.d.ts.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +262 -94
- package/esm/types.d.ts +59 -3
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js +2 -4
- package/package.json +22 -23
- package/styles/scss/dashboard.scss +4 -4
- package/esm/converters/filterConverters.d.ts +0 -93
- package/esm/converters/filterConverters.d.ts.map +0 -1
- package/esm/converters/filterConverters.js +0 -199
|
@@ -25,9 +25,13 @@ import { CurrentUserPermissions } from '@gooddata/sdk-ui-kit';
|
|
|
25
25
|
import { DashboardAttachmentType } from '@gooddata/sdk-model';
|
|
26
26
|
import { DashboardAttributeFilterConfigMode } from '@gooddata/sdk-model';
|
|
27
27
|
import { DashboardAttributeFilterItem } from '@gooddata/sdk-model';
|
|
28
|
+
import { dashboardAttributeFilterItemToAttributeFilter } from '@gooddata/sdk-model';
|
|
28
29
|
import { DashboardAttributeFilterSelectionMode } from '@gooddata/sdk-model';
|
|
29
30
|
import { DashboardAttributeFilterSelectionType } from '@gooddata/sdk-model';
|
|
31
|
+
import { dashboardAttributeFilterToAttributeFilter } from '@gooddata/sdk-model';
|
|
30
32
|
import { DashboardDateFilterConfigMode } from '@gooddata/sdk-model';
|
|
33
|
+
import { dashboardDateFilterToDateFilterByDateDataSet } from '@gooddata/sdk-model';
|
|
34
|
+
import { dashboardDateFilterToDateFilterByWidget } from '@gooddata/sdk-model';
|
|
31
35
|
import { DashboardFiltersApplyMode } from '@gooddata/sdk-model';
|
|
32
36
|
import { DashboardParameterMode } from '@gooddata/sdk-model';
|
|
33
37
|
import { DashboardSummaryWorkflowStatus } from '@gooddata/sdk-backend-spi';
|
|
@@ -46,10 +50,14 @@ import { EntityState } from '@reduxjs/toolkit';
|
|
|
46
50
|
import { ExecutionResultLimitType } from '@gooddata/sdk-model';
|
|
47
51
|
import { ExplicitDrill } from '@gooddata/sdk-ui';
|
|
48
52
|
import { FilterContextItem } from '@gooddata/sdk-model';
|
|
53
|
+
import { filterContextItemsToDashboardFiltersByDateDataSet } from '@gooddata/sdk-model';
|
|
54
|
+
import { filterContextItemsToDashboardFiltersByRichTextWidget } from '@gooddata/sdk-model';
|
|
55
|
+
import { filterContextItemsToDashboardFiltersByWidget } from '@gooddata/sdk-model';
|
|
56
|
+
import { filterContextToDashboardFiltersByDateDataSet } from '@gooddata/sdk-model';
|
|
57
|
+
import { filterContextToDashboardFiltersByWidget } from '@gooddata/sdk-model';
|
|
49
58
|
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
50
59
|
import { ForwardRefExoticComponent } from 'react';
|
|
51
60
|
import { GoodDataSdkError } from '@gooddata/sdk-ui';
|
|
52
|
-
import { IAbsoluteDateFilter } from '@gooddata/sdk-model';
|
|
53
61
|
import { IAccessControlAware } from '@gooddata/sdk-model';
|
|
54
62
|
import { IAccessGrantee } from '@gooddata/sdk-model';
|
|
55
63
|
import { IActiveCalendars } from '@gooddata/sdk-model';
|
|
@@ -61,7 +69,6 @@ import { IAlertRelativeOperator } from '@gooddata/sdk-model';
|
|
|
61
69
|
import { IAlertTriggerInterval } from '@gooddata/sdk-model';
|
|
62
70
|
import { IAlertTriggerMode } from '@gooddata/sdk-model';
|
|
63
71
|
import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
|
|
64
|
-
import { IArbitraryAttributeFilter } from '@gooddata/sdk-model';
|
|
65
72
|
import { IAttribute } from '@gooddata/sdk-model';
|
|
66
73
|
import { IAttributeDescriptorBody } from '@gooddata/sdk-model';
|
|
67
74
|
import { IAttributeDisplayFormMetadataObject } from '@gooddata/sdk-model';
|
|
@@ -100,6 +107,7 @@ import { IDashboardDefinition } from '@gooddata/sdk-model';
|
|
|
100
107
|
import { IDashboardExportParameter } from '@gooddata/sdk-model';
|
|
101
108
|
import { IDashboardExportPresentationOptions } from '@gooddata/sdk-backend-spi';
|
|
102
109
|
import { IDashboardExportRawOptions } from '@gooddata/sdk-backend-spi';
|
|
110
|
+
import { IDashboardFilter as IDashboardFilter_2 } from '@gooddata/sdk-model';
|
|
103
111
|
import { IDashboardFilterGroup } from '@gooddata/sdk-model';
|
|
104
112
|
import { IDashboardFilterGroupsConfig } from '@gooddata/sdk-model';
|
|
105
113
|
import { IDashboardFilterReference } from '@gooddata/sdk-model';
|
|
@@ -149,7 +157,6 @@ import { IExportResult } from '@gooddata/sdk-backend-spi';
|
|
|
149
157
|
import { IExportTemplate } from '@gooddata/sdk-model';
|
|
150
158
|
import { IFilter } from '@gooddata/sdk-model';
|
|
151
159
|
import { IFilterableWidget } from '@gooddata/sdk-model';
|
|
152
|
-
import { IFilterContext } from '@gooddata/sdk-model';
|
|
153
160
|
import { IFilterContextDefinition } from '@gooddata/sdk-model';
|
|
154
161
|
import { IHeaderPredicate } from '@gooddata/sdk-ui';
|
|
155
162
|
import { IInsight } from '@gooddata/sdk-model';
|
|
@@ -170,13 +177,11 @@ import { IListedDashboard } from '@gooddata/sdk-model';
|
|
|
170
177
|
import { ILoadingProps } from '@gooddata/sdk-ui';
|
|
171
178
|
import { ILocale } from '@gooddata/sdk-ui';
|
|
172
179
|
import { ILowerBoundedFilter } from '@gooddata/sdk-model';
|
|
173
|
-
import { IMatchAttributeFilter } from '@gooddata/sdk-model';
|
|
174
180
|
import { IMeasure } from '@gooddata/sdk-model';
|
|
175
181
|
import { IMeasureDescriptor } from '@gooddata/sdk-model';
|
|
176
182
|
import { IMeasureMetadataObject } from '@gooddata/sdk-model';
|
|
177
183
|
import { IMeasureValueFilter } from '@gooddata/sdk-model';
|
|
178
184
|
import { IMeasureValueFilterProps } from '@gooddata/sdk-ui-filters';
|
|
179
|
-
import { INegativeAttributeFilter } from '@gooddata/sdk-model';
|
|
180
185
|
import { INotificationChannelIdentifier } from '@gooddata/sdk-model';
|
|
181
186
|
import { INotificationChannelMetadataObject } from '@gooddata/sdk-model';
|
|
182
187
|
import { INotificationChannelMetadataObjectBase } from '@gooddata/sdk-model';
|
|
@@ -185,13 +190,12 @@ import { InsightDrillDefinition } from '@gooddata/sdk-model';
|
|
|
185
190
|
import { IntlShape } from 'react-intl';
|
|
186
191
|
import { IParameterDefinition } from '@gooddata/sdk-model';
|
|
187
192
|
import { IParameterMetadataObject } from '@gooddata/sdk-model';
|
|
188
|
-
import { IPositiveAttributeFilter } from '@gooddata/sdk-model';
|
|
189
193
|
import { IPushData } from '@gooddata/sdk-ui';
|
|
190
194
|
import { IRawExportCustomOverrides } from '@gooddata/sdk-backend-spi';
|
|
191
|
-
import { IRelativeDateFilter } from '@gooddata/sdk-model';
|
|
192
195
|
import { IRenderListItemProps } from '@gooddata/sdk-ui-kit';
|
|
193
196
|
import { IResultWarning } from '@gooddata/sdk-model';
|
|
194
197
|
import { IRichTextWidget } from '@gooddata/sdk-model';
|
|
198
|
+
import { isDashboardFilter as isDashboardFilter_2 } from '@gooddata/sdk-model';
|
|
195
199
|
import { ISeparators } from '@gooddata/sdk-model';
|
|
196
200
|
import { ISettings } from '@gooddata/sdk-model';
|
|
197
201
|
import { IShareDialogInteractionData } from '@gooddata/sdk-ui-kit';
|
|
@@ -199,7 +203,6 @@ import { ISharedObject } from '@gooddata/sdk-ui-kit';
|
|
|
199
203
|
import { ISharingApplyPayload as ISharingApplyPayload_2 } from '@gooddata/sdk-ui-kit';
|
|
200
204
|
import { ISlotProps } from '@gooddata/sdk-ui-kit';
|
|
201
205
|
import { ITableDataAttributeScope } from '@gooddata/sdk-ui';
|
|
202
|
-
import { ITempFilterContext } from '@gooddata/sdk-model';
|
|
203
206
|
import { ITheme } from '@gooddata/sdk-model';
|
|
204
207
|
import type { ITranslations } from '@gooddata/sdk-ui';
|
|
205
208
|
import { IUnavailableDashboardReference } from '@gooddata/sdk-backend-spi';
|
|
@@ -879,10 +882,26 @@ export declare function AlertingDialogTriggerMode(overrides: Partial<IAlertingDi
|
|
|
879
882
|
export declare type AlertingDisabledReason = "noDestinations" | "oldWidget" | "disabledOnInsight";
|
|
880
883
|
|
|
881
884
|
/**
|
|
885
|
+
* Resolves the management dialog component from DashboardComponentsContext and mounts it inside
|
|
886
|
+
* the resolved context decorator — so a decorated management context is what the dialog (default
|
|
887
|
+
* or replacement) reads.
|
|
888
|
+
*
|
|
882
889
|
* @internal
|
|
883
890
|
*/
|
|
884
891
|
export declare function AlertingManagementDialog(props: IAlertingManagementDialogProps): ReactElement;
|
|
885
892
|
|
|
893
|
+
/**
|
|
894
|
+
* Provides the alerting management dialog context.
|
|
895
|
+
*
|
|
896
|
+
* The dashboard's connector mounts the original value. Exported so a context-decorator
|
|
897
|
+
* component (`CustomAlertingManagementDialogContextDecoratorComponent`) can re-provide a decorated
|
|
898
|
+
* value read from `useAlertingManagementDialogContext()`; it is not a way to run the management
|
|
899
|
+
* dialog outside a dashboard.
|
|
900
|
+
*
|
|
901
|
+
* @alpha
|
|
902
|
+
*/
|
|
903
|
+
export declare const AlertingManagementDialogContextProvider: Provider<IAlertingManagementDialogContextValue | undefined>;
|
|
904
|
+
|
|
886
905
|
/**
|
|
887
906
|
* A measure of the insight the alerting dialog can build a condition on, with the comparisons
|
|
888
907
|
* available for it.
|
|
@@ -989,7 +1008,7 @@ export declare function anyEventHandler(handler: DashboardEventHandler["handler"
|
|
|
989
1008
|
* The {@link ChangeAttributeFilterSelectionPayload}'s `selectionType` and `elements` are derived from the
|
|
990
1009
|
* provided attribute filter.
|
|
991
1010
|
*
|
|
992
|
-
* To convert {@link IDashboardFilter} to {@link @gooddata/sdk-model#IFilter} use {@link dashboardAttributeFilterToAttributeFilter}.
|
|
1011
|
+
* To convert {@link IDashboardFilter} to {@link @gooddata/sdk-model#IFilter} use {@link @gooddata/sdk-model#dashboardAttributeFilterToAttributeFilter}.
|
|
993
1012
|
* Converted filter can be used within the command's payload.
|
|
994
1013
|
*
|
|
995
1014
|
* @param filterLocalId - dashboard attribute filter's local id
|
|
@@ -1172,6 +1191,18 @@ export declare type AutomationInteractionPayload = IUserInteractionPayloadWithDa
|
|
|
1172
1191
|
*/
|
|
1173
1192
|
export declare type AutomationInteractionType = "scheduledExportInitialized" | "scheduledExportCreated" | "alertInitialized" | "alertCreated";
|
|
1174
1193
|
|
|
1194
|
+
/**
|
|
1195
|
+
* Provides the automation dialogs' shared context.
|
|
1196
|
+
*
|
|
1197
|
+
* The dashboard's connectors mount the original value once per tree. Exported so a
|
|
1198
|
+
* context-decorator component (`CustomAutomationsContextDecoratorComponent`) can re-provide a
|
|
1199
|
+
* decorated value read from `useAutomationsContext()`; it is not a way to run the dialogs outside
|
|
1200
|
+
* a dashboard.
|
|
1201
|
+
*
|
|
1202
|
+
* @alpha
|
|
1203
|
+
*/
|
|
1204
|
+
export declare const AutomationsContextProvider: Provider<IAutomationsContextValue | undefined>;
|
|
1205
|
+
|
|
1175
1206
|
/**
|
|
1176
1207
|
* @public
|
|
1177
1208
|
*/
|
|
@@ -2266,6 +2297,12 @@ export declare type CustomAlertingDialogComponent = ComponentType<IAlertingDialo
|
|
|
2266
2297
|
* false, and a decorator that overrides it corrupts the draft seed. Define the decorator
|
|
2267
2298
|
* outside render, or the dialog remounts (and reseeds) on every parent render.
|
|
2268
2299
|
*
|
|
2300
|
+
* The contract: change the data, not what it means — every member keeps its documented meaning.
|
|
2301
|
+
* The dialog does not check the decorated value; when you override a member, everything that
|
|
2302
|
+
* reads it is your responsibility. Spread the value you read (`{ ...ctx, member }`) so the other
|
|
2303
|
+
* members pass through. Wrap functions instead of replacing them. Do not touch members marked as
|
|
2304
|
+
* internal machinery.
|
|
2305
|
+
*
|
|
2269
2306
|
* @alpha
|
|
2270
2307
|
*/
|
|
2271
2308
|
export declare type CustomAlertingDialogContextDecoratorComponent = ComponentType<{
|
|
@@ -2277,6 +2314,106 @@ export declare type CustomAlertingDialogContextDecoratorComponent = ComponentTyp
|
|
|
2277
2314
|
*/
|
|
2278
2315
|
export declare type CustomAlertingManagementDialogComponent = ComponentType<IAlertingManagementDialogProps>;
|
|
2279
2316
|
|
|
2317
|
+
/**
|
|
2318
|
+
* Decorates the data the alerting management dialog reads.
|
|
2319
|
+
*
|
|
2320
|
+
* The dashboard mounts this component between the connector-provided management dialog context and
|
|
2321
|
+
* the resolved management dialog component (default or replacement), so the value it re-provides is
|
|
2322
|
+
* what the dialog reads. Read the current value with `useAlertingManagementDialogContext()`,
|
|
2323
|
+
* decorate the members to adjust, and re-provide via `AlertingManagementDialogContextProvider`:
|
|
2324
|
+
*
|
|
2325
|
+
* @example
|
|
2326
|
+
* ```tsx
|
|
2327
|
+
* function AlertsListDecorator({ children }: { children?: ReactNode }) {
|
|
2328
|
+
* const ctx = useAlertingManagementDialogContext();
|
|
2329
|
+
* const { alerts, loading } = useMySelfFetchedAlerts(ctx.automations);
|
|
2330
|
+
* const decorated = useMemo(
|
|
2331
|
+
* () => ({ ...ctx, automations: alerts, isLoading: ctx.isLoading || loading }),
|
|
2332
|
+
* [ctx, alerts, loading],
|
|
2333
|
+
* );
|
|
2334
|
+
* return (
|
|
2335
|
+
* <AlertingManagementDialogContextProvider value={decorated}>
|
|
2336
|
+
* {children}
|
|
2337
|
+
* </AlertingManagementDialogContextProvider>
|
|
2338
|
+
* );
|
|
2339
|
+
* }
|
|
2340
|
+
* // <Dashboard AlertingManagementDialogContextDecoratorComponent={AlertsListDecorator} />
|
|
2341
|
+
* ```
|
|
2342
|
+
*
|
|
2343
|
+
* The management dialog has no state seeding — it renders from the context on every change, so a
|
|
2344
|
+
* decorator may replace `automations` or extend `isLoading` (as above). Extend `isLoading` only
|
|
2345
|
+
* as `ctx.isLoading || yourOwnLoading`, never force it: forced false shows the list before its
|
|
2346
|
+
* data arrives, forced true hides it forever. `isLoading` here covers the automations load only —
|
|
2347
|
+
* deliberately narrower than the scheduled-email management context's flag. Define the decorator
|
|
2348
|
+
* outside render, or the dialog remounts on every parent render.
|
|
2349
|
+
*
|
|
2350
|
+
* The contract: change the data, not what it means — every member keeps its documented meaning.
|
|
2351
|
+
* The dialog does not check the decorated value; when you override a member, everything that
|
|
2352
|
+
* reads it is your responsibility. Spread the value you read (`{ ...ctx, member }`) so the other
|
|
2353
|
+
* members pass through. Wrap functions instead of replacing them. Do not touch members marked as
|
|
2354
|
+
* internal machinery.
|
|
2355
|
+
*
|
|
2356
|
+
* @alpha
|
|
2357
|
+
*/
|
|
2358
|
+
export declare type CustomAlertingManagementDialogContextDecoratorComponent = ComponentType<{
|
|
2359
|
+
children?: ReactNode;
|
|
2360
|
+
}>;
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* Decorates the data the automation dialogs' shared context carries.
|
|
2364
|
+
*
|
|
2365
|
+
* The dashboard mounts this component directly inside each connector-provided automations context
|
|
2366
|
+
* — once in the alerting tree and once in the scheduled-email tree — so the value it re-provides
|
|
2367
|
+
* is what everything in both trees reads: the default dialogs, wholesale replacements, exported
|
|
2368
|
+
* blocks and hooks, and the dialogs' state seeding. A decorator must therefore be tree-agnostic.
|
|
2369
|
+
* Read the current value with `useAutomationsContext()`, decorate the members to adjust, and
|
|
2370
|
+
* re-provide via `AutomationsContextProvider`:
|
|
2371
|
+
*
|
|
2372
|
+
* @example
|
|
2373
|
+
* ```tsx
|
|
2374
|
+
* function GranularityDecorator({ children }: { children?: ReactNode }) {
|
|
2375
|
+
* const ctx = useAutomationsContext();
|
|
2376
|
+
* const decorated = useMemo(
|
|
2377
|
+
* () => ({
|
|
2378
|
+
* ...ctx,
|
|
2379
|
+
* dateFilterConfig: {
|
|
2380
|
+
* ...ctx.dateFilterConfig,
|
|
2381
|
+
* availableGranularities: ctx.dateFilterConfig.availableGranularities.filter(
|
|
2382
|
+
* (g) => g !== "GDC.time.hour",
|
|
2383
|
+
* ),
|
|
2384
|
+
* getGranularitiesForTab: (tabId: string) =>
|
|
2385
|
+
* ctx.dateFilterConfig
|
|
2386
|
+
* .getGranularitiesForTab(tabId)
|
|
2387
|
+
* .filter((g) => g !== "GDC.time.hour"),
|
|
2388
|
+
* },
|
|
2389
|
+
* }),
|
|
2390
|
+
* [ctx],
|
|
2391
|
+
* );
|
|
2392
|
+
* return <AutomationsContextProvider value={decorated}>{children}</AutomationsContextProvider>;
|
|
2393
|
+
* }
|
|
2394
|
+
* // <Dashboard AutomationsContextDecoratorComponent={GranularityDecorator} />
|
|
2395
|
+
* ```
|
|
2396
|
+
*
|
|
2397
|
+
* To constrain the date-filter granularities the dialogs offer, override
|
|
2398
|
+
* `dateFilterConfig.availableGranularities` and `dateFilterConfig.getGranularitiesForTab`
|
|
2399
|
+
* together, as above — the date filter falls back per tab. Components that build this context
|
|
2400
|
+
* themselves (the standalone connected dialogs, the widget-panel alerts list) are not decorated.
|
|
2401
|
+
* Define the decorator outside render, or both dialog trees remount on every parent render.
|
|
2402
|
+
* Both instances mount with the dashboard, not only while a dialog is open — a decorator that
|
|
2403
|
+
* fetches data runs on every dashboard.
|
|
2404
|
+
*
|
|
2405
|
+
* The contract: change the data, not what it means — every member keeps its documented meaning.
|
|
2406
|
+
* The dialog does not check the decorated value; when you override a member, everything that
|
|
2407
|
+
* reads it is your responsibility. Spread the value you read (`{ ...ctx, member }`) so the other
|
|
2408
|
+
* members pass through. Wrap functions instead of replacing them. Do not touch members marked as
|
|
2409
|
+
* internal machinery.
|
|
2410
|
+
*
|
|
2411
|
+
* @alpha
|
|
2412
|
+
*/
|
|
2413
|
+
export declare type CustomAutomationsContextDecoratorComponent = ComponentType<{
|
|
2414
|
+
children?: ReactNode;
|
|
2415
|
+
}>;
|
|
2416
|
+
|
|
2280
2417
|
/**
|
|
2281
2418
|
* @beta
|
|
2282
2419
|
*/
|
|
@@ -2510,6 +2647,12 @@ export declare type CustomScheduledEmailDialogComponent = ComponentType<ISchedul
|
|
|
2510
2647
|
* corrupts the draft seed on every such open, not in an edge case. Define the decorator outside
|
|
2511
2648
|
* render, or the dialog remounts (and reseeds) on every parent render.
|
|
2512
2649
|
*
|
|
2650
|
+
* The contract: change the data, not what it means — every member keeps its documented meaning.
|
|
2651
|
+
* The dialog does not check the decorated value; when you override a member, everything that
|
|
2652
|
+
* reads it is your responsibility. Spread the value you read (`{ ...ctx, member }`) so the other
|
|
2653
|
+
* members pass through. Wrap functions instead of replacing them. Do not touch members marked as
|
|
2654
|
+
* internal machinery.
|
|
2655
|
+
*
|
|
2513
2656
|
* @alpha
|
|
2514
2657
|
*/
|
|
2515
2658
|
export declare type CustomScheduledEmailDialogContextDecoratorComponent = ComponentType<{
|
|
@@ -2521,6 +2664,53 @@ export declare type CustomScheduledEmailDialogContextDecoratorComponent = Compon
|
|
|
2521
2664
|
*/
|
|
2522
2665
|
export declare type CustomScheduledEmailManagementDialogComponent = ComponentType<IScheduledEmailManagementDialogProps>;
|
|
2523
2666
|
|
|
2667
|
+
/**
|
|
2668
|
+
* Decorates the data the scheduled email management dialog reads.
|
|
2669
|
+
*
|
|
2670
|
+
* The dashboard mounts this component between the connector-provided management dialog context and
|
|
2671
|
+
* the resolved management dialog component (default or replacement), so the value it re-provides is
|
|
2672
|
+
* what the dialog reads. Read the current value with `useScheduledEmailManagementDialogContext()`,
|
|
2673
|
+
* decorate the members to adjust, and re-provide via
|
|
2674
|
+
* `ScheduledEmailManagementDialogContextProvider`:
|
|
2675
|
+
*
|
|
2676
|
+
* @example
|
|
2677
|
+
* ```tsx
|
|
2678
|
+
* function SchedulesListDecorator({ children }: { children?: ReactNode }) {
|
|
2679
|
+
* const ctx = useScheduledEmailManagementDialogContext();
|
|
2680
|
+
* const { schedules, loading } = useMySelfFetchedSchedules(ctx.automations);
|
|
2681
|
+
* const decorated = useMemo(
|
|
2682
|
+
* () => ({ ...ctx, automations: schedules, isLoading: ctx.isLoading || loading }),
|
|
2683
|
+
* [ctx, schedules, loading],
|
|
2684
|
+
* );
|
|
2685
|
+
* return (
|
|
2686
|
+
* <ScheduledEmailManagementDialogContextProvider value={decorated}>
|
|
2687
|
+
* {children}
|
|
2688
|
+
* </ScheduledEmailManagementDialogContextProvider>
|
|
2689
|
+
* );
|
|
2690
|
+
* }
|
|
2691
|
+
* // <Dashboard ScheduledEmailManagementDialogContextDecoratorComponent={SchedulesListDecorator} />
|
|
2692
|
+
* ```
|
|
2693
|
+
*
|
|
2694
|
+
* The management dialog has no state seeding — it renders from the context on every change, so a
|
|
2695
|
+
* decorator may replace `automations` or extend `isLoading` (as above). Extend `isLoading` only
|
|
2696
|
+
* as `ctx.isLoading || yourOwnLoading`, never force it: forced false shows the list before its
|
|
2697
|
+
* data arrives, forced true hides it forever. `isLoading` here may also cover a widget-filters
|
|
2698
|
+
* load while a widget-scoped create/edit dialog is open — deliberately broader than the alerting
|
|
2699
|
+
* management context's automations-only flag. Define the decorator outside render, or the dialog
|
|
2700
|
+
* remounts on every parent render.
|
|
2701
|
+
*
|
|
2702
|
+
* The contract: change the data, not what it means — every member keeps its documented meaning.
|
|
2703
|
+
* The dialog does not check the decorated value; when you override a member, everything that
|
|
2704
|
+
* reads it is your responsibility. Spread the value you read (`{ ...ctx, member }`) so the other
|
|
2705
|
+
* members pass through. Wrap functions instead of replacing them. Do not touch members marked as
|
|
2706
|
+
* internal machinery.
|
|
2707
|
+
*
|
|
2708
|
+
* @alpha
|
|
2709
|
+
*/
|
|
2710
|
+
export declare type CustomScheduledEmailManagementDialogContextDecoratorComponent = ComponentType<{
|
|
2711
|
+
children?: ReactNode;
|
|
2712
|
+
}>;
|
|
2713
|
+
|
|
2524
2714
|
/**
|
|
2525
2715
|
* @beta
|
|
2526
2716
|
*/
|
|
@@ -2675,24 +2865,14 @@ export declare type DashboardAttributeFilterItemSelectionReplacedPayload = {
|
|
|
2675
2865
|
readonly filter: DashboardAttributeFilterItem;
|
|
2676
2866
|
};
|
|
2677
2867
|
|
|
2678
|
-
|
|
2679
|
-
* Converts any {@link @gooddata/sdk-model#DashboardAttributeFilterItem} to {@link @gooddata/sdk-model#IAttributeFilter} instance.
|
|
2680
|
-
*
|
|
2681
|
-
* @remarks
|
|
2682
|
-
* Handles all attribute filter types: element-based (positive/negative selection),
|
|
2683
|
-
* arbitrary value filters, and match (text) filters.
|
|
2684
|
-
*
|
|
2685
|
-
* @param filter - dashboard attribute filter item to convert
|
|
2686
|
-
* @public
|
|
2687
|
-
*/
|
|
2688
|
-
export declare function dashboardAttributeFilterItemToAttributeFilter(filter: DashboardAttributeFilterItem): IAttributeFilter;
|
|
2868
|
+
export { dashboardAttributeFilterItemToAttributeFilter }
|
|
2689
2869
|
|
|
2690
2870
|
/**
|
|
2691
2871
|
* This event is emitted after new elements are selected and applied in an attribute filter.
|
|
2692
2872
|
*
|
|
2693
2873
|
* @remarks
|
|
2694
2874
|
*
|
|
2695
|
-
* See also {@link dashboardAttributeFilterToAttributeFilter} convertor – this allows you to convert the `filter`
|
|
2875
|
+
* See also {@link @gooddata/sdk-model#dashboardAttributeFilterToAttributeFilter} convertor – this allows you to convert the `filter`
|
|
2696
2876
|
* in the event payload to an {@link @gooddata/sdk-model#IAttributeFilter} instance you can use with visualizations,
|
|
2697
2877
|
* filter UI components and so on.
|
|
2698
2878
|
*
|
|
@@ -2708,7 +2888,7 @@ export declare type DashboardAttributeFilterSelectionChanged = IDashboardEvent &
|
|
|
2708
2888
|
*
|
|
2709
2889
|
* @remarks
|
|
2710
2890
|
*
|
|
2711
|
-
* See also {@link dashboardAttributeFilterToAttributeFilter} convertor – this allows you to convert the `filter`
|
|
2891
|
+
* See also {@link @gooddata/sdk-model#dashboardAttributeFilterToAttributeFilter} convertor – this allows you to convert the `filter`
|
|
2712
2892
|
* object to an {@link @gooddata/sdk-model#IAttributeFilter} instance you can use with visualizations,
|
|
2713
2893
|
* filter UI components and so on.
|
|
2714
2894
|
*
|
|
@@ -2723,15 +2903,7 @@ export declare type DashboardAttributeFilterSelectionChangedPayload = {
|
|
|
2723
2903
|
readonly filter: IDashboardAttributeFilter;
|
|
2724
2904
|
};
|
|
2725
2905
|
|
|
2726
|
-
|
|
2727
|
-
* Converts {@link @gooddata/sdk-backend-spi#IDashboardAttributeFilter} to {@link @gooddata/sdk-model#IAttributeFilter} instance.
|
|
2728
|
-
*
|
|
2729
|
-
* @param filter - filter context attribute filter to convert
|
|
2730
|
-
* @deprecated Use {@link dashboardAttributeFilterItemToAttributeFilter} instead,
|
|
2731
|
-
* which supports all attribute filter types including text filters.
|
|
2732
|
-
* @public
|
|
2733
|
-
*/
|
|
2734
|
-
export declare function dashboardAttributeFilterToAttributeFilter(filter: IDashboardAttributeFilter): IAttributeFilter;
|
|
2906
|
+
export { dashboardAttributeFilterToAttributeFilter }
|
|
2735
2907
|
|
|
2736
2908
|
/**
|
|
2737
2909
|
* Union type that contains all available built-in dashboard commands.
|
|
@@ -3177,7 +3349,7 @@ export declare type DashboardCopySavedPayload = {
|
|
|
3177
3349
|
*
|
|
3178
3350
|
* @remarks
|
|
3179
3351
|
*
|
|
3180
|
-
* See also {@link dashboardDateFilterToDateFilterByWidget} and {@link dashboardDateFilterToDateFilterByDateDataSet} convertors
|
|
3352
|
+
* See also {@link @gooddata/sdk-model#dashboardDateFilterToDateFilterByWidget} and {@link @gooddata/sdk-model#dashboardDateFilterToDateFilterByDateDataSet} convertors
|
|
3181
3353
|
* – those allow you to convert the `filter` in the event payload to an {@link @gooddata/sdk-model#IDateFilter} instance you can use
|
|
3182
3354
|
* with visualizations, filter UI components and so on.
|
|
3183
3355
|
*
|
|
@@ -3193,7 +3365,7 @@ export declare type DashboardDateFilterSelectionChanged = IDashboardEvent & {
|
|
|
3193
3365
|
*
|
|
3194
3366
|
* @remarks
|
|
3195
3367
|
*
|
|
3196
|
-
* See also {@link dashboardDateFilterToDateFilterByWidget} and {@link dashboardDateFilterToDateFilterByDateDataSet} convertors
|
|
3368
|
+
* See also {@link @gooddata/sdk-model#dashboardDateFilterToDateFilterByWidget} and {@link @gooddata/sdk-model#dashboardDateFilterToDateFilterByDateDataSet} convertors
|
|
3197
3369
|
* – those allow you to convert the `filter` object to an {@link @gooddata/sdk-model#IDateFilter} instance you can use
|
|
3198
3370
|
* with visualizations, filter UI components and so on.
|
|
3199
3371
|
*
|
|
@@ -3210,23 +3382,9 @@ export declare type DashboardDateFilterSelectionChangedPayload = {
|
|
|
3210
3382
|
readonly dateFilterOptionLocalId?: string;
|
|
3211
3383
|
};
|
|
3212
3384
|
|
|
3213
|
-
|
|
3214
|
-
* Converts {@link @gooddata/sdk-backend-spi#IDashboardDateFilter} to {@link @gooddata/sdk-model#IDateFilter} instance.
|
|
3215
|
-
*
|
|
3216
|
-
* @param filter - filter context attribute filter to convert
|
|
3217
|
-
* @param dateDataSet - date data set to define {@link @gooddata/sdk-model#IDateFilter}
|
|
3218
|
-
* @public
|
|
3219
|
-
*/
|
|
3220
|
-
export declare function dashboardDateFilterToDateFilterByDateDataSet(filter: IDashboardDateFilter, dateDataSet: ObjRef): IDateFilter;
|
|
3385
|
+
export { dashboardDateFilterToDateFilterByDateDataSet }
|
|
3221
3386
|
|
|
3222
|
-
|
|
3223
|
-
* Converts {@link @gooddata/sdk-backend-spi#IDashboardDateFilter} to {@link @gooddata/sdk-model#IDateFilter} instance.
|
|
3224
|
-
*
|
|
3225
|
-
* @param filter - filter context attribute filter to convert
|
|
3226
|
-
* @param widget - widget to use to get dateDataSet for date filters
|
|
3227
|
-
* @public
|
|
3228
|
-
*/
|
|
3229
|
-
export declare function dashboardDateFilterToDateFilterByWidget(filter: IDashboardDateFilter, widget?: Partial<IFilterableWidget>): IDateFilter;
|
|
3387
|
+
export { dashboardDateFilterToDateFilterByWidget }
|
|
3230
3388
|
|
|
3231
3389
|
/**
|
|
3232
3390
|
* This event is emitted when a dashboard is deinitialized. The event contains contextual information such as
|
|
@@ -3375,7 +3533,7 @@ export declare type DashboardEventType = "GDC.DASH/EVT.COMMAND.FAILED" | "GDC.DA
|
|
|
3375
3533
|
* This event is emitted as convenience - more granular events describe all the possible
|
|
3376
3534
|
* changes to the dashboard filters and can be used to even source the state of filter context.
|
|
3377
3535
|
*
|
|
3378
|
-
* See also {@link filterContextToDashboardFiltersByWidget} and {@link filterContextToDashboardFiltersByDateDataSet} convertors
|
|
3536
|
+
* See also {@link @gooddata/sdk-model#filterContextToDashboardFiltersByWidget} and {@link @gooddata/sdk-model#filterContextToDashboardFiltersByDateDataSet} convertors
|
|
3379
3537
|
* – those allow you to convert the `filterContext` in the event payload to array of {@link @gooddata/sdk-model#IFilter} instances you can use
|
|
3380
3538
|
* with visualizations, filter UI components and so on.
|
|
3381
3539
|
*
|
|
@@ -3391,7 +3549,7 @@ export declare type DashboardFilterContextChanged = IDashboardEvent & {
|
|
|
3391
3549
|
*
|
|
3392
3550
|
* @remarks
|
|
3393
3551
|
*
|
|
3394
|
-
* See also {@link filterContextToDashboardFiltersByWidget} and {@link filterContextToDashboardFiltersByDateDataSet} convertors
|
|
3552
|
+
* See also {@link @gooddata/sdk-model#filterContextToDashboardFiltersByWidget} and {@link @gooddata/sdk-model#filterContextToDashboardFiltersByDateDataSet} convertors
|
|
3395
3553
|
* – those allow you to convert the `filterContext` object to array of {@link @gooddata/sdk-model#IFilter} instances you can use
|
|
3396
3554
|
* with visualizations, filter UI components and so on.
|
|
3397
3555
|
*
|
|
@@ -5806,32 +5964,11 @@ export declare type FilterBarMeasureValueFilterIndexed = {
|
|
|
5806
5964
|
*/
|
|
5807
5965
|
export declare type FilterBarRenderingMode = "default" | "hidden";
|
|
5808
5966
|
|
|
5809
|
-
|
|
5810
|
-
* Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
|
|
5811
|
-
*
|
|
5812
|
-
* @param filterContextItems - filter context items to get filters for
|
|
5813
|
-
* @param dateDataSet - date data set to define {@link @gooddata/sdk-model#IDateFilter}
|
|
5814
|
-
* @public
|
|
5815
|
-
*/
|
|
5816
|
-
export declare function filterContextItemsToDashboardFiltersByDateDataSet(filterContextItems: FilterContextItem[], dateDataSet: ObjRef): IDashboardFilter[];
|
|
5967
|
+
export { filterContextItemsToDashboardFiltersByDateDataSet }
|
|
5817
5968
|
|
|
5818
|
-
|
|
5819
|
-
* Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
|
|
5820
|
-
*
|
|
5821
|
-
* @param filterContextItems - filter context items to get filters for
|
|
5822
|
-
* @param widget - widget to use to get dateDataSet for date filters
|
|
5823
|
-
* @public
|
|
5824
|
-
*/
|
|
5825
|
-
export declare function filterContextItemsToDashboardFiltersByRichTextWidget(filterContextItems: FilterContextItem[], widget?: Partial<IFilterableWidget>): IDashboardFilter[];
|
|
5969
|
+
export { filterContextItemsToDashboardFiltersByRichTextWidget }
|
|
5826
5970
|
|
|
5827
|
-
|
|
5828
|
-
* Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
|
|
5829
|
-
*
|
|
5830
|
-
* @param filterContextItems - filter context items to get filters for
|
|
5831
|
-
* @param widget - widget to use to get dateDataSet for date filters
|
|
5832
|
-
* @public
|
|
5833
|
-
*/
|
|
5834
|
-
export declare function filterContextItemsToDashboardFiltersByWidget(filterContextItems: FilterContextItem[], widget?: Partial<IFilterableWidget>): IDashboardFilter[];
|
|
5971
|
+
export { filterContextItemsToDashboardFiltersByWidget }
|
|
5835
5972
|
|
|
5836
5973
|
/**
|
|
5837
5974
|
* @alpha
|
|
@@ -5910,24 +6047,9 @@ export declare type FilterContextState = {
|
|
|
5910
6047
|
defaultFilterOverrides?: FilterContextItem[];
|
|
5911
6048
|
};
|
|
5912
6049
|
|
|
5913
|
-
|
|
5914
|
-
* Gets {@link IDashboardFilter} items for filters specified in given filterContext in relation to the
|
|
5915
|
-
* given dateDataSet.
|
|
5916
|
-
*
|
|
5917
|
-
* @param filterContext - filter context to get filters for
|
|
5918
|
-
* @param dateDataSet - widget to use to get dateDataSet for date filters
|
|
5919
|
-
* @public
|
|
5920
|
-
*/
|
|
5921
|
-
export declare function filterContextToDashboardFiltersByDateDataSet(filterContext: IFilterContextDefinition | IFilterContext | ITempFilterContext | undefined, dateDataSet: ObjRef): IDashboardFilter[];
|
|
6050
|
+
export { filterContextToDashboardFiltersByDateDataSet }
|
|
5922
6051
|
|
|
5923
|
-
|
|
5924
|
-
* Gets {@link IDashboardFilter} items for filters specified in given filterContext in relation to the given widget.
|
|
5925
|
-
*
|
|
5926
|
-
* @param filterContext - filter context to get filters for
|
|
5927
|
-
* @param widget - widget to use to get dateDataSet for date filters
|
|
5928
|
-
* @public
|
|
5929
|
-
*/
|
|
5930
|
-
export declare function filterContextToDashboardFiltersByWidget(filterContext: IFilterContextDefinition | IFilterContext | ITempFilterContext | undefined, widget: IWidgetDefinition): IDashboardFilter[];
|
|
6052
|
+
export { filterContextToDashboardFiltersByWidget }
|
|
5931
6053
|
|
|
5932
6054
|
/**
|
|
5933
6055
|
* @alpha
|
|
@@ -10105,12 +10227,41 @@ export declare interface IDashboardCustomComponentProps {
|
|
|
10105
10227
|
* @alpha
|
|
10106
10228
|
*/
|
|
10107
10229
|
ScheduledEmailManagementDialogComponent?: CustomScheduledEmailManagementDialogComponent;
|
|
10230
|
+
/**
|
|
10231
|
+
* Specify component to decorate the data the scheduled email management dialog reads.
|
|
10232
|
+
*
|
|
10233
|
+
* Rendered between the connector-provided management dialog context and the resolved
|
|
10234
|
+
* management dialog component; see `CustomScheduledEmailManagementDialogContextDecoratorComponent`
|
|
10235
|
+
* for the contract and an example.
|
|
10236
|
+
*
|
|
10237
|
+
* @alpha
|
|
10238
|
+
*/
|
|
10239
|
+
ScheduledEmailManagementDialogContextDecoratorComponent?: CustomScheduledEmailManagementDialogContextDecoratorComponent;
|
|
10108
10240
|
/**
|
|
10109
10241
|
* Specify component to use for rendering the alerting management dialog.
|
|
10110
10242
|
*
|
|
10111
10243
|
* @alpha
|
|
10112
10244
|
*/
|
|
10113
10245
|
AlertingManagementDialogComponent?: CustomAlertingManagementDialogComponent;
|
|
10246
|
+
/**
|
|
10247
|
+
* Specify component to decorate the data the alerting management dialog reads.
|
|
10248
|
+
*
|
|
10249
|
+
* Rendered between the connector-provided management dialog context and the resolved
|
|
10250
|
+
* management dialog component; see `CustomAlertingManagementDialogContextDecoratorComponent`
|
|
10251
|
+
* for the contract and an example.
|
|
10252
|
+
*
|
|
10253
|
+
* @alpha
|
|
10254
|
+
*/
|
|
10255
|
+
AlertingManagementDialogContextDecoratorComponent?: CustomAlertingManagementDialogContextDecoratorComponent;
|
|
10256
|
+
/**
|
|
10257
|
+
* Specify component to decorate the data the automation dialogs' shared context carries.
|
|
10258
|
+
*
|
|
10259
|
+
* Rendered once per dialog tree, directly inside each connector-provided automations context;
|
|
10260
|
+
* see `CustomAutomationsContextDecoratorComponent` for the contract and an example.
|
|
10261
|
+
*
|
|
10262
|
+
* @alpha
|
|
10263
|
+
*/
|
|
10264
|
+
AutomationsContextDecoratorComponent?: CustomAutomationsContextDecoratorComponent;
|
|
10114
10265
|
/**
|
|
10115
10266
|
* Specify component to use for rendering the alerting dialog.
|
|
10116
10267
|
*
|
|
@@ -11447,9 +11598,10 @@ export declare interface IDashboardExtensionProps extends IDashboardEventing, ID
|
|
|
11447
11598
|
|
|
11448
11599
|
/**
|
|
11449
11600
|
* Supported dashboard filter type.
|
|
11601
|
+
*
|
|
11450
11602
|
* @public
|
|
11451
11603
|
*/
|
|
11452
|
-
export declare type IDashboardFilter =
|
|
11604
|
+
export declare type IDashboardFilter = IDashboardFilter_2;
|
|
11453
11605
|
|
|
11454
11606
|
/**
|
|
11455
11607
|
* This event is emitted after dashboard selection filters have been reset.
|
|
@@ -20828,7 +20980,7 @@ export declare const isDashboardExportToPptPresentationResolved: (obj: unknown)
|
|
|
20828
20980
|
*
|
|
20829
20981
|
* @alpha
|
|
20830
20982
|
*/
|
|
20831
|
-
export declare
|
|
20983
|
+
export declare const isDashboardFilter: typeof isDashboardFilter_2;
|
|
20832
20984
|
|
|
20833
20985
|
/**
|
|
20834
20986
|
* Tests whether the provided object is an instance of {@link DashboardFilterContextChanged}.
|
|
@@ -26474,10 +26626,26 @@ export declare type ScheduledEmailDialogTimezoneDefaultProps = IScheduledEmailDi
|
|
|
26474
26626
|
export declare function ScheduledEmailDialogWidgetAttachments(props: Partial<IScheduledEmailDialogWidgetAttachmentsProps>): ReactElement;
|
|
26475
26627
|
|
|
26476
26628
|
/**
|
|
26629
|
+
* Resolves the management dialog component from DashboardComponentsContext and mounts it inside
|
|
26630
|
+
* the resolved context decorator — so a decorated management context is what the dialog (default
|
|
26631
|
+
* or replacement) reads.
|
|
26632
|
+
*
|
|
26477
26633
|
* @internal
|
|
26478
26634
|
*/
|
|
26479
26635
|
export declare function ScheduledEmailManagementDialog(props: IScheduledEmailManagementDialogProps): ReactElement;
|
|
26480
26636
|
|
|
26637
|
+
/**
|
|
26638
|
+
* Provides the scheduled email management dialog context.
|
|
26639
|
+
*
|
|
26640
|
+
* The dashboard's connector mounts the original value. Exported so a context-decorator
|
|
26641
|
+
* component (`CustomScheduledEmailManagementDialogContextDecoratorComponent`) can re-provide a decorated
|
|
26642
|
+
* value read from `useScheduledEmailManagementDialogContext()`; it is not a way to run the management
|
|
26643
|
+
* dialog outside a dashboard.
|
|
26644
|
+
*
|
|
26645
|
+
* @alpha
|
|
26646
|
+
*/
|
|
26647
|
+
export declare const ScheduledEmailManagementDialogContextProvider: Provider<IScheduledEmailManagementDialogContextValue | undefined>;
|
|
26648
|
+
|
|
26481
26649
|
/**
|
|
26482
26650
|
* @internal
|
|
26483
26651
|
*/
|
package/esm/types.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import { type DrillDefinition, type IAccessGrantee, type IAutomationMetadataObject, type IDashboardFilter as IDashboardFilterBase, type IInsight, type IWidget, type LocalIdRef, type ObjRef, type ShareStatus, isDashboardFilter as isDashboardFilterBase } from "@gooddata/sdk-model";
|
|
2
3
|
import { type IDrillEvent, type OnFiredDrillEvent } from "@gooddata/sdk-ui";
|
|
3
4
|
import { type DateFilterConfigValidationResult } from "./_staging/dateFilterConfig/validation.js";
|
|
4
5
|
/**
|
|
5
6
|
* Supported dashboard filter type.
|
|
7
|
+
*
|
|
6
8
|
* @public
|
|
7
9
|
*/
|
|
8
|
-
export type IDashboardFilter =
|
|
10
|
+
export type IDashboardFilter = IDashboardFilterBase;
|
|
9
11
|
/**
|
|
10
12
|
* Type-guard testing whether the provided object is an instance of {@link IDashboardFilter}.
|
|
11
13
|
*
|
|
12
14
|
* @alpha
|
|
13
15
|
*/
|
|
14
|
-
export declare
|
|
16
|
+
export declare const isDashboardFilter: typeof isDashboardFilterBase;
|
|
15
17
|
/**
|
|
16
18
|
* Supported dashboard drill definitions.
|
|
17
19
|
*
|
|
@@ -341,4 +343,58 @@ export interface IAlertDialogContext {
|
|
|
341
343
|
*/
|
|
342
344
|
alert?: IAutomationMetadataObject;
|
|
343
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Decorates the data the automation dialogs' shared context carries.
|
|
348
|
+
*
|
|
349
|
+
* The dashboard mounts this component directly inside each connector-provided automations context
|
|
350
|
+
* — once in the alerting tree and once in the scheduled-email tree — so the value it re-provides
|
|
351
|
+
* is what everything in both trees reads: the default dialogs, wholesale replacements, exported
|
|
352
|
+
* blocks and hooks, and the dialogs' state seeding. A decorator must therefore be tree-agnostic.
|
|
353
|
+
* Read the current value with `useAutomationsContext()`, decorate the members to adjust, and
|
|
354
|
+
* re-provide via `AutomationsContextProvider`:
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* ```tsx
|
|
358
|
+
* function GranularityDecorator({ children }: { children?: ReactNode }) {
|
|
359
|
+
* const ctx = useAutomationsContext();
|
|
360
|
+
* const decorated = useMemo(
|
|
361
|
+
* () => ({
|
|
362
|
+
* ...ctx,
|
|
363
|
+
* dateFilterConfig: {
|
|
364
|
+
* ...ctx.dateFilterConfig,
|
|
365
|
+
* availableGranularities: ctx.dateFilterConfig.availableGranularities.filter(
|
|
366
|
+
* (g) => g !== "GDC.time.hour",
|
|
367
|
+
* ),
|
|
368
|
+
* getGranularitiesForTab: (tabId: string) =>
|
|
369
|
+
* ctx.dateFilterConfig
|
|
370
|
+
* .getGranularitiesForTab(tabId)
|
|
371
|
+
* .filter((g) => g !== "GDC.time.hour"),
|
|
372
|
+
* },
|
|
373
|
+
* }),
|
|
374
|
+
* [ctx],
|
|
375
|
+
* );
|
|
376
|
+
* return <AutomationsContextProvider value={decorated}>{children}</AutomationsContextProvider>;
|
|
377
|
+
* }
|
|
378
|
+
* // <Dashboard AutomationsContextDecoratorComponent={GranularityDecorator} />
|
|
379
|
+
* ```
|
|
380
|
+
*
|
|
381
|
+
* To constrain the date-filter granularities the dialogs offer, override
|
|
382
|
+
* `dateFilterConfig.availableGranularities` and `dateFilterConfig.getGranularitiesForTab`
|
|
383
|
+
* together, as above — the date filter falls back per tab. Components that build this context
|
|
384
|
+
* themselves (the standalone connected dialogs, the widget-panel alerts list) are not decorated.
|
|
385
|
+
* Define the decorator outside render, or both dialog trees remount on every parent render.
|
|
386
|
+
* Both instances mount with the dashboard, not only while a dialog is open — a decorator that
|
|
387
|
+
* fetches data runs on every dashboard.
|
|
388
|
+
*
|
|
389
|
+
* The contract: change the data, not what it means — every member keeps its documented meaning.
|
|
390
|
+
* The dialog does not check the decorated value; when you override a member, everything that
|
|
391
|
+
* reads it is your responsibility. Spread the value you read (`{ ...ctx, member }`) so the other
|
|
392
|
+
* members pass through. Wrap functions instead of replacing them. Do not touch members marked as
|
|
393
|
+
* internal machinery.
|
|
394
|
+
*
|
|
395
|
+
* @alpha
|
|
396
|
+
*/
|
|
397
|
+
export type CustomAutomationsContextDecoratorComponent = ComponentType<{
|
|
398
|
+
children?: ReactNode;
|
|
399
|
+
}>;
|
|
344
400
|
//# sourceMappingURL=types.d.ts.map
|