@gooddata/sdk-ui-dashboard 11.56.0-alpha.4 → 11.56.0-alpha.5
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 +1 -1
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +3 -2
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +3 -2
- package/esm/presentation/automations/alerting/blocks/AlertingDialogShell.d.ts +4 -3
- package/esm/presentation/automations/alerting/blocks/AlertingDialogShell.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/blocks/AlertingDialogShell.js +4 -3
- package/esm/presentation/automations/alerting/blocks/WhenAlertingDialogLoaded.d.ts +3 -2
- package/esm/presentation/automations/alerting/blocks/WhenAlertingDialogLoaded.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/blocks/WhenAlertingDialogLoaded.js +3 -2
- package/esm/presentation/automations/alerting/state/AlertActionsContext.d.ts +5 -4
- package/esm/presentation/automations/alerting/state/AlertActionsContext.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/AlertActionsContext.js +5 -4
- package/esm/presentation/automations/alerting/state/AlertDataContext.d.ts +5 -4
- package/esm/presentation/automations/alerting/state/AlertDataContext.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/AlertDataContext.js +5 -4
- package/esm/presentation/automations/alerting/state/AlertDraftContext.d.ts +5 -4
- package/esm/presentation/automations/alerting/state/AlertDraftContext.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/AlertDraftContext.js +5 -4
- package/esm/presentation/automations/alerting/state/AlertFiltersContext.d.ts +5 -4
- package/esm/presentation/automations/alerting/state/AlertFiltersContext.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/AlertFiltersContext.js +5 -4
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts +8 -6
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.js +16 -8
- package/esm/presentation/automations/alerting/state/missingAlertStateProvider.js +1 -1
- package/esm/presentation/automations/alerting/types.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +2 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +2 -1
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.d.ts +4 -4
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.js +4 -4
- package/esm/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.d.ts +5 -4
- package/esm/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.js +5 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts +8 -6
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js +16 -8
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.js +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.js +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.js +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts +6 -4
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.js +6 -4
- package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.js +1 -1
- package/esm/presentation/automations/scheduledEmail/types.d.ts +1 -1
- package/esm/sdk-ui-dashboard.d.ts +59 -44
- package/package.json +21 -21
package/NOTICE
CHANGED
|
@@ -9,7 +9,7 @@ The following 3rd-party software packages may be used by or distributed with goo
|
|
|
9
9
|
|
|
10
10
|
Date generated: 2026-9-8
|
|
11
11
|
|
|
12
|
-
Revision ID:
|
|
12
|
+
Revision ID: 88695cebb8f01a84a542250f23d705b05e93325b
|
|
13
13
|
|
|
14
14
|
================================================================================
|
|
15
15
|
================================================================================
|
package/esm/__version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.56.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.56.0-alpha.5";
|
|
2
2
|
export declare const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
3
3
|
export declare const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
|
4
4
|
//# sourceMappingURL=__version.d.ts.map
|
package/esm/__version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2021 GoodData Corporation
|
|
2
2
|
// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
|
|
3
|
-
export const LIB_VERSION = "11.56.0-alpha.
|
|
3
|
+
export const LIB_VERSION = "11.56.0-alpha.5";
|
|
4
4
|
export const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
5
5
|
export const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts
CHANGED
|
@@ -9,8 +9,9 @@ import { type IDefaultAlertingDialogProps } from "../types.js";
|
|
|
9
9
|
* rendered within an `AutomationsContextProvider`, an `AlertingDialogContextProvider` (for the
|
|
10
10
|
* create/edit flow), and an `AlertingDialogStateProvider`. Inside a `Dashboard`, the alerting
|
|
11
11
|
* connector supplies the first two providers above the `AlertingDialogComponent` slot, and mounts
|
|
12
|
-
* `AlertingDialogStateProvider` around the resolved slot component
|
|
13
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
12
|
+
* `AlertingDialogStateProvider` around the resolved slot component — its state model establishes
|
|
13
|
+
* itself once `useAlertingDialogContext().isLoading` is first false and stays mounted from then
|
|
14
|
+
* on — so the default component, and any wholesale
|
|
14
15
|
* slot replacement, inherit all three contexts automatically and require no extra wiring.
|
|
15
16
|
*
|
|
16
17
|
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA2B1C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAM/D
|
|
1
|
+
{"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA2B1C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAM/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,2BAA2B,GAAG,YAAY,CActF"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js
CHANGED
|
@@ -30,8 +30,9 @@ import { DefaultAlertingDialogRecipients } from "./DefaultAlertingDialogRecipien
|
|
|
30
30
|
* rendered within an `AutomationsContextProvider`, an `AlertingDialogContextProvider` (for the
|
|
31
31
|
* create/edit flow), and an `AlertingDialogStateProvider`. Inside a `Dashboard`, the alerting
|
|
32
32
|
* connector supplies the first two providers above the `AlertingDialogComponent` slot, and mounts
|
|
33
|
-
* `AlertingDialogStateProvider` around the resolved slot component
|
|
34
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
33
|
+
* `AlertingDialogStateProvider` around the resolved slot component — its state model establishes
|
|
34
|
+
* itself once `useAlertingDialogContext().isLoading` is first false and stays mounted from then
|
|
35
|
+
* on — so the default component, and any wholesale
|
|
35
36
|
* slot replacement, inherit all three contexts automatically and require no extra wiring.
|
|
36
37
|
*
|
|
37
38
|
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
@@ -12,8 +12,9 @@ import { type IAlertingDialogShellProps } from "../types.js";
|
|
|
12
12
|
* `AlertingDialogComponent` that keeps this chrome and arranges the blocks differently renders the shell
|
|
13
13
|
* itself. The shell does not own the submit: call {@link useAlertSubmit} and pass its `submit` and
|
|
14
14
|
* `isSaving`, so the footer button and any Enter handler in the body share one instance. Call that hook
|
|
15
|
-
* only once `useAlertingDialogContext().isLoading` is false — the state hooks throw
|
|
16
|
-
*
|
|
15
|
+
* only once `useAlertingDialogContext().isLoading` is first false — the state hooks throw until the
|
|
16
|
+
* dialog's data has first loaded (after that they stay available through a refresh) — and render the
|
|
17
|
+
* shell alone (any `onSubmit`, `isSaving: false`) until then, as the example does.
|
|
17
18
|
*
|
|
18
19
|
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
19
20
|
*
|
|
@@ -21,7 +22,7 @@ import { type IAlertingDialogShellProps } from "../types.js";
|
|
|
21
22
|
* ```tsx
|
|
22
23
|
* function MyAlertingDialog(props: IAlertingDialogProps) {
|
|
23
24
|
* const { isLoading } = useAlertingDialogContext();
|
|
24
|
-
* // the state hooks throw
|
|
25
|
+
* // the state hooks throw until the dialog's data has first loaded; the shell shows the skeleton
|
|
25
26
|
* if (isLoading) {
|
|
26
27
|
* return <AlertingDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
27
28
|
* }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingDialogShell.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/blocks/AlertingDialogShell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,OAAO,CAAC;AAmCvE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAM7D
|
|
1
|
+
{"version":3,"file":"AlertingDialogShell.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/blocks/AlertingDialogShell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,OAAO,CAAC;AAmCvE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,yBAAyB,GAAG,YAAY,CAMlF"}
|
|
@@ -29,8 +29,9 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
|
|
|
29
29
|
* `AlertingDialogComponent` that keeps this chrome and arranges the blocks differently renders the shell
|
|
30
30
|
* itself. The shell does not own the submit: call {@link useAlertSubmit} and pass its `submit` and
|
|
31
31
|
* `isSaving`, so the footer button and any Enter handler in the body share one instance. Call that hook
|
|
32
|
-
* only once `useAlertingDialogContext().isLoading` is false — the state hooks throw
|
|
33
|
-
*
|
|
32
|
+
* only once `useAlertingDialogContext().isLoading` is first false — the state hooks throw until the
|
|
33
|
+
* dialog's data has first loaded (after that they stay available through a refresh) — and render the
|
|
34
|
+
* shell alone (any `onSubmit`, `isSaving: false`) until then, as the example does.
|
|
34
35
|
*
|
|
35
36
|
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
36
37
|
*
|
|
@@ -38,7 +39,7 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
|
|
|
38
39
|
* ```tsx
|
|
39
40
|
* function MyAlertingDialog(props: IAlertingDialogProps) {
|
|
40
41
|
* const { isLoading } = useAlertingDialogContext();
|
|
41
|
-
* // the state hooks throw
|
|
42
|
+
* // the state hooks throw until the dialog's data has first loaded; the shell shows the skeleton
|
|
42
43
|
* if (isLoading) {
|
|
43
44
|
* return <AlertingDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
44
45
|
* }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
|
-
* Renders its children only
|
|
4
|
-
*
|
|
3
|
+
* Renders its children only while `useAlertingDialogContext().isLoading` is false. The state
|
|
4
|
+
* accessors throw until the dialog's data has first loaded; during a later refresh the state
|
|
5
|
+
* model stays mounted and keeps serving, but the blocks still hide behind the loading state.
|
|
5
6
|
* Every connected alerting block goes through it.
|
|
6
7
|
*
|
|
7
8
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhenAlertingDialogLoaded.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/blocks/WhenAlertingDialogLoaded.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC
|
|
1
|
+
{"version":3,"file":"WhenAlertingDialogLoaded.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/blocks/WhenAlertingDialogLoaded.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,kDAG7E"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
|
|
3
3
|
/**
|
|
4
|
-
* Renders its children only
|
|
5
|
-
*
|
|
4
|
+
* Renders its children only while `useAlertingDialogContext().isLoading` is false. The state
|
|
5
|
+
* accessors throw until the dialog's data has first loaded; during a later refresh the state
|
|
6
|
+
* model stays mounted and keeps serving, but the blocks still hide behind the loading state.
|
|
6
7
|
* Every connected alerting block goes through it.
|
|
7
8
|
*
|
|
8
9
|
* @internal
|
|
@@ -3,10 +3,11 @@ export declare const AlertActionsContextProvider: import("react").Provider<IAler
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the alerting dialog's mutators.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
7
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
8
|
-
* must check that flag before
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
7
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
8
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
9
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
10
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
10
11
|
*
|
|
11
12
|
* @alpha
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertActionsContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAK5D,eAAO,MAAM,2BAA2B,iEAA+B,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"AlertActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertActionsContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAK5D,eAAO,MAAM,2BAA2B,iEAA+B,CAAC;AAExE;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,yBAAyB,CAE3D"}
|
|
@@ -7,10 +7,11 @@ export const AlertActionsContextProvider = AlertActionsContext.Provider;
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the alerting dialog's mutators.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
11
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
12
|
-
* must check that flag before
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
11
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
12
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
13
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
14
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
14
15
|
*
|
|
15
16
|
* @alpha
|
|
16
17
|
*/
|
|
@@ -3,10 +3,11 @@ export declare const AlertDataContextProvider: import("react").Provider<IAlertDa
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the data the alerting dialog loads asynchronously.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
7
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
8
|
-
* must check that flag before
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
7
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
8
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
9
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
10
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
10
11
|
*
|
|
11
12
|
* @alpha
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDataContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertDataContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAKzD,eAAO,MAAM,wBAAwB,8DAA4B,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"AlertDataContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertDataContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAKzD,eAAO,MAAM,wBAAwB,8DAA4B,CAAC;AAElE;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAErD"}
|
|
@@ -7,10 +7,11 @@ export const AlertDataContextProvider = AlertDataContext.Provider;
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the data the alerting dialog loads asynchronously.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
11
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
12
|
-
* must check that flag before
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
11
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
12
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
13
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
14
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
14
15
|
*
|
|
15
16
|
* @alpha
|
|
16
17
|
*/
|
|
@@ -3,10 +3,11 @@ export declare const AlertDraftContextProvider: import("react").Provider<IAlertD
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the alerting dialog's edit draft.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
7
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
8
|
-
* must check that flag before
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
7
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
8
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
9
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
10
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
10
11
|
*
|
|
11
12
|
* @alpha
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertDraftContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,eAAO,MAAM,yBAAyB,+DAA6B,CAAC;AAEpE
|
|
1
|
+
{"version":3,"file":"AlertDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertDraftContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,eAAO,MAAM,yBAAyB,+DAA6B,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,uBAAuB,CAEvD"}
|
|
@@ -7,10 +7,11 @@ export const AlertDraftContextProvider = AlertDraftContext.Provider;
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the alerting dialog's edit draft.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
11
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
12
|
-
* must check that flag before
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
11
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
12
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
13
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
14
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
14
15
|
*
|
|
15
16
|
* @alpha
|
|
16
17
|
*/
|
|
@@ -3,10 +3,11 @@ export declare const AlertFiltersContextProvider: import("react").Provider<IAler
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the alerting dialog's filter and export-parameter model.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
7
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
8
|
-
* must check that flag before
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
7
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
8
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
9
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
10
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
10
11
|
*
|
|
11
12
|
* @alpha
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertFiltersContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertFiltersContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAK5D,eAAO,MAAM,2BAA2B,iEAA+B,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"AlertFiltersContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertFiltersContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAK5D,eAAO,MAAM,2BAA2B,iEAA+B,CAAC;AAExE;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,yBAAyB,CAE3D"}
|
|
@@ -7,10 +7,11 @@ export const AlertFiltersContextProvider = AlertFiltersContext.Provider;
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the alerting dialog's filter and export-parameter model.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
11
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
12
|
-
* must check that flag before
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
11
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
12
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
13
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
14
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
14
15
|
*
|
|
15
16
|
* @alpha
|
|
16
17
|
*/
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
|
-
* Publishes the alerting create/edit dialog's state as the four alert state contexts
|
|
4
|
-
* dialog's data has loaded.
|
|
3
|
+
* Publishes the alerting create/edit dialog's state as the four alert state contexts from the
|
|
4
|
+
* first render where the dialog's data has loaded.
|
|
5
5
|
*
|
|
6
6
|
* Mounts above the resolved `AlertingDialogComponent`, so the default dialog, a shell of blocks
|
|
7
|
-
* and a wholesale replacement all read the same state with no extra wiring.
|
|
8
|
-
*
|
|
9
|
-
* model seeds its draft from the dialog's loaded
|
|
10
|
-
* re-run
|
|
7
|
+
* and a wholesale replacement all read the same state with no extra wiring. Mounts the state
|
|
8
|
+
* model on the first render where `useAlertingDialogContext().isLoading` is false and keeps it
|
|
9
|
+
* mounted for the rest of the dialog's life: the model seeds its draft from the dialog's loaded
|
|
10
|
+
* data in `useState` initializers that never re-run, so mounting earlier would freeze that seed
|
|
11
|
+
* against not-yet-loaded data — and unmounting on a later `isLoading` flip (an automations
|
|
12
|
+
* refresh) would discard the in-flight draft.
|
|
11
13
|
*
|
|
12
14
|
* Runs `useIntl`-calling hooks, so an `IntlProvider` must sit above it. Inside a `Dashboard` the
|
|
13
15
|
* ambient wrapper in `DashboardInner` supplies one with the same locale; a mount site without one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertingDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"AlertingDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/AlertingDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAqB1D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAWhF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useMemo } from "react";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
4
|
import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
|
|
5
5
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
6
6
|
import { useAutomationFiltersSelect } from "../../shared/automationFilters/useAutomationFiltersSelect.js";
|
|
@@ -13,14 +13,16 @@ import { useAlertFormState } from "./useAlertFormState.js";
|
|
|
13
13
|
import { getAlertSelectedValues } from "./useAlertSelectedValues.js";
|
|
14
14
|
import { useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
|
|
15
15
|
/**
|
|
16
|
-
* Publishes the alerting create/edit dialog's state as the four alert state contexts
|
|
17
|
-
* dialog's data has loaded.
|
|
16
|
+
* Publishes the alerting create/edit dialog's state as the four alert state contexts from the
|
|
17
|
+
* first render where the dialog's data has loaded.
|
|
18
18
|
*
|
|
19
19
|
* Mounts above the resolved `AlertingDialogComponent`, so the default dialog, a shell of blocks
|
|
20
|
-
* and a wholesale replacement all read the same state with no extra wiring.
|
|
21
|
-
*
|
|
22
|
-
* model seeds its draft from the dialog's loaded
|
|
23
|
-
* re-run
|
|
20
|
+
* and a wholesale replacement all read the same state with no extra wiring. Mounts the state
|
|
21
|
+
* model on the first render where `useAlertingDialogContext().isLoading` is false and keeps it
|
|
22
|
+
* mounted for the rest of the dialog's life: the model seeds its draft from the dialog's loaded
|
|
23
|
+
* data in `useState` initializers that never re-run, so mounting earlier would freeze that seed
|
|
24
|
+
* against not-yet-loaded data — and unmounting on a later `isLoading` flip (an automations
|
|
25
|
+
* refresh) would discard the in-flight draft.
|
|
24
26
|
*
|
|
25
27
|
* Runs `useIntl`-calling hooks, so an `IntlProvider` must sit above it. Inside a `Dashboard` the
|
|
26
28
|
* ambient wrapper in `DashboardInner` supplies one with the same locale; a mount site without one
|
|
@@ -30,7 +32,13 @@ import { useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
|
|
|
30
32
|
*/
|
|
31
33
|
export function AlertingDialogStateProvider({ children }) {
|
|
32
34
|
const { isLoading } = useAlertingDialogContext();
|
|
33
|
-
|
|
35
|
+
// Latches on the first non-loading render: the draft seed must not run against unloaded
|
|
36
|
+
// data, and once seeded it must survive isLoading flipping back (an automations refresh).
|
|
37
|
+
const [hasLoaded, setHasLoaded] = useState(!isLoading);
|
|
38
|
+
if (!isLoading && !hasLoaded) {
|
|
39
|
+
setHasLoaded(true);
|
|
40
|
+
}
|
|
41
|
+
return hasLoaded ? _jsx(LoadedAlertingDialogState, { children: children }) : _jsx(_Fragment, { children: children });
|
|
34
42
|
}
|
|
35
43
|
function LoadedAlertingDialogState({ children }) {
|
|
36
44
|
const { weekStart, timezone, externalRecipient } = useAutomationsContext();
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export function missingAlertStateProvider(accessor) {
|
|
8
|
-
throw new Error(`${accessor} must be used within AlertingDialogStateProvider. The
|
|
8
|
+
throw new Error(`${accessor} must be used within AlertingDialogStateProvider. The state model mounts once the dialog's data has first loaded, so check useAlertingDialogContext().isLoading before reading alerting dialog state.`);
|
|
9
9
|
}
|
|
@@ -766,7 +766,7 @@ export interface IAlertingDialogShellProps extends Pick<IAlertingDialogProps, "o
|
|
|
766
766
|
* The dialog's single submit — `submit` of the caller's {@link useAlertSubmit} instance. Drives the
|
|
767
767
|
* footer's submit button and the Enter key on it. The shell does not own the submit hook, so a
|
|
768
768
|
* caller's own Enter handler or button can share the same instance. Create the hook instance only
|
|
769
|
-
* once the dialog
|
|
769
|
+
* once the dialog's data has first loaded — the state hooks throw before then.
|
|
770
770
|
*/
|
|
771
771
|
onSubmit: () => void;
|
|
772
772
|
/**
|
|
@@ -8,7 +8,8 @@ import { type IDefaultScheduledEmailDialogProps } from "../types.js";
|
|
|
8
8
|
* export draft's state from those contexts rather than from the dashboard store. It must therefore
|
|
9
9
|
* be rendered within an `AutomationsContextProvider`, a `ScheduledEmailDialogContextProvider` (for
|
|
10
10
|
* the create/edit flow), and a `ScheduledEmailDialogStateProvider`, whose state model establishes
|
|
11
|
-
* itself once `useScheduledEmailDialogContext().isLoading` is false
|
|
11
|
+
* itself once `useScheduledEmailDialogContext().isLoading` is first false and stays mounted from
|
|
12
|
+
* then on. Inside a `Dashboard`, the
|
|
12
13
|
* scheduled export connector supplies the first two providers above the
|
|
13
14
|
* `ScheduledEmailDialogComponent` slot and mounts `ScheduledEmailDialogStateProvider` around the
|
|
14
15
|
* resolved slot component — so the default component, and any wholesale slot replacement, inherit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAMrE
|
|
1
|
+
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,iCAAiC,GAAG,YAAY,CAiBlG"}
|
|
@@ -26,7 +26,8 @@ import { DefaultScheduledEmailDialogTimezone } from "./components/DefaultSchedul
|
|
|
26
26
|
* export draft's state from those contexts rather than from the dashboard store. It must therefore
|
|
27
27
|
* be rendered within an `AutomationsContextProvider`, a `ScheduledEmailDialogContextProvider` (for
|
|
28
28
|
* the create/edit flow), and a `ScheduledEmailDialogStateProvider`, whose state model establishes
|
|
29
|
-
* itself once `useScheduledEmailDialogContext().isLoading` is false
|
|
29
|
+
* itself once `useScheduledEmailDialogContext().isLoading` is first false and stays mounted from
|
|
30
|
+
* then on. Inside a `Dashboard`, the
|
|
30
31
|
* scheduled export connector supplies the first two providers above the
|
|
31
32
|
* `ScheduledEmailDialogComponent` slot and mounts `ScheduledEmailDialogStateProvider` around the
|
|
32
33
|
* resolved slot component — so the default component, and any wholesale slot replacement, inherit
|
|
@@ -15,9 +15,9 @@ import { type IScheduledEmailDialogShellProps } from "../types.js";
|
|
|
15
15
|
* shell itself. The shell does not own the save: call {@link useSaveScheduledEmailToBackend} and pass its
|
|
16
16
|
* `handleSaveScheduledEmail`, `isSavingScheduledEmail` and `savingErrorMessage`; build Enter handlers for
|
|
17
17
|
* the blocks you place with {@link useScheduledEmailSubmitOnEnter} over the same `handleSaveScheduledEmail`.
|
|
18
|
-
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is false — the state hooks
|
|
19
|
-
*
|
|
20
|
-
* the example does.
|
|
18
|
+
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is first false — the state hooks
|
|
19
|
+
* throw until the dialog's data has first loaded (after that they stay available through a refresh) —
|
|
20
|
+
* and render the shell alone (any `onSubmit`, `isSaving: false`) until then, as the example does.
|
|
21
21
|
*
|
|
22
22
|
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
23
23
|
*
|
|
@@ -25,7 +25,7 @@ import { type IScheduledEmailDialogShellProps } from "../types.js";
|
|
|
25
25
|
* ```tsx
|
|
26
26
|
* function MyScheduledEmailDialog(props: IScheduledEmailDialogProps) {
|
|
27
27
|
* const { isLoading } = useScheduledEmailDialogContext();
|
|
28
|
-
* // the state hooks throw
|
|
28
|
+
* // the state hooks throw until the dialog's data has first loaded; the shell shows the skeleton
|
|
29
29
|
* if (isLoading) {
|
|
30
30
|
* return <ScheduledEmailDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
31
31
|
* }
|
|
@@ -40,9 +40,9 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
|
|
|
40
40
|
* shell itself. The shell does not own the save: call {@link useSaveScheduledEmailToBackend} and pass its
|
|
41
41
|
* `handleSaveScheduledEmail`, `isSavingScheduledEmail` and `savingErrorMessage`; build Enter handlers for
|
|
42
42
|
* the blocks you place with {@link useScheduledEmailSubmitOnEnter} over the same `handleSaveScheduledEmail`.
|
|
43
|
-
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is false — the state hooks
|
|
44
|
-
*
|
|
45
|
-
* the example does.
|
|
43
|
+
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is first false — the state hooks
|
|
44
|
+
* throw until the dialog's data has first loaded (after that they stay available through a refresh) —
|
|
45
|
+
* and render the shell alone (any `onSubmit`, `isSaving: false`) until then, as the example does.
|
|
46
46
|
*
|
|
47
47
|
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
48
48
|
*
|
|
@@ -50,7 +50,7 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
|
|
|
50
50
|
* ```tsx
|
|
51
51
|
* function MyScheduledEmailDialog(props: IScheduledEmailDialogProps) {
|
|
52
52
|
* const { isLoading } = useScheduledEmailDialogContext();
|
|
53
|
-
* // the state hooks throw
|
|
53
|
+
* // the state hooks throw until the dialog's data has first loaded; the shell shows the skeleton
|
|
54
54
|
* if (isLoading) {
|
|
55
55
|
* return <ScheduledEmailDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
56
56
|
* }
|
package/esm/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
|
-
* Renders its children only
|
|
4
|
-
* throw
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Renders its children only while `useScheduledEmailDialogContext().isLoading` is false. The state
|
|
4
|
+
* accessors throw until the dialog's data has first loaded; during a later refresh the state model
|
|
5
|
+
* stays mounted and keeps serving, but the blocks still hide behind the loading state. Every
|
|
6
|
+
* connected scheduled-email block goes through it. On scheduled email the loading state is on the
|
|
7
|
+
* ordinary path — a widget export renders while its filters load — so a shell sees its blocks
|
|
7
8
|
* appear once loading ends.
|
|
8
9
|
*
|
|
9
10
|
* @internal
|
package/esm/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhenScheduledEmailDialogLoaded.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC
|
|
1
|
+
{"version":3,"file":"WhenScheduledEmailDialogLoaded.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,kDAGnF"}
|
package/esm/presentation/automations/scheduledEmail/blocks/WhenScheduledEmailDialogLoaded.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
3
3
|
/**
|
|
4
|
-
* Renders its children only
|
|
5
|
-
* throw
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Renders its children only while `useScheduledEmailDialogContext().isLoading` is false. The state
|
|
5
|
+
* accessors throw until the dialog's data has first loaded; during a later refresh the state model
|
|
6
|
+
* stays mounted and keeps serving, but the blocks still hide behind the loading state. Every
|
|
7
|
+
* connected scheduled-email block goes through it. On scheduled email the loading state is on the
|
|
8
|
+
* ordinary path — a widget export renders while its filters load — so a shell sees its blocks
|
|
8
9
|
* appear once loading ends.
|
|
9
10
|
*
|
|
10
11
|
* @internal
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Publishes the scheduled-export create/edit dialog's state as the four scheduled-export state
|
|
4
|
-
* contexts
|
|
4
|
+
* contexts from the first render where the dialog's data has loaded.
|
|
5
5
|
*
|
|
6
6
|
* Mounts above the resolved `ScheduledEmailDialogComponent`, so the default dialog, a shell of
|
|
7
|
-
* blocks and a wholesale replacement all read the same state with no extra wiring.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* re-run
|
|
11
|
-
* ordinary path here, not an edge case: a widget
|
|
7
|
+
* blocks and a wholesale replacement all read the same state with no extra wiring. Mounts the
|
|
8
|
+
* state model on the first render where `useScheduledEmailDialogContext().isLoading` is false and
|
|
9
|
+
* keeps it mounted for the rest of the dialog's life: the model seeds its draft from the dialog's
|
|
10
|
+
* loaded data in `useState` initializers that never re-run, so mounting earlier would freeze that
|
|
11
|
+
* seed against not-yet-loaded data — that is the ordinary path here, not an edge case: a widget
|
|
12
|
+
* export's filters load after the dialog opens — and unmounting on a later `isLoading` flip (an
|
|
13
|
+
* automations refresh) would discard the in-flight draft.
|
|
12
14
|
*
|
|
13
15
|
* Runs `useIntl`-calling hooks, so an `IntlProvider` must sit above it. Inside a `Dashboard` the
|
|
14
16
|
* ambient wrapper in `DashboardInner` supplies one with the same locale; a mount site without one
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAsB1D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAetF"}
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useMemo } from "react";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
4
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
5
5
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
6
6
|
import { useAutomationFiltersSelect } from "../../shared/automationFilters/useAutomationFiltersSelect.js";
|
|
@@ -16,14 +16,16 @@ import { useScheduledEmailFiltersModel } from "./useScheduledEmailFiltersModel.j
|
|
|
16
16
|
import { useScheduledEmailFormState } from "./useScheduledEmailFormState.js";
|
|
17
17
|
/**
|
|
18
18
|
* Publishes the scheduled-export create/edit dialog's state as the four scheduled-export state
|
|
19
|
-
* contexts
|
|
19
|
+
* contexts from the first render where the dialog's data has loaded.
|
|
20
20
|
*
|
|
21
21
|
* Mounts above the resolved `ScheduledEmailDialogComponent`, so the default dialog, a shell of
|
|
22
|
-
* blocks and a wholesale replacement all read the same state with no extra wiring.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* re-run
|
|
26
|
-
* ordinary path here, not an edge case: a widget
|
|
22
|
+
* blocks and a wholesale replacement all read the same state with no extra wiring. Mounts the
|
|
23
|
+
* state model on the first render where `useScheduledEmailDialogContext().isLoading` is false and
|
|
24
|
+
* keeps it mounted for the rest of the dialog's life: the model seeds its draft from the dialog's
|
|
25
|
+
* loaded data in `useState` initializers that never re-run, so mounting earlier would freeze that
|
|
26
|
+
* seed against not-yet-loaded data — that is the ordinary path here, not an edge case: a widget
|
|
27
|
+
* export's filters load after the dialog opens — and unmounting on a later `isLoading` flip (an
|
|
28
|
+
* automations refresh) would discard the in-flight draft.
|
|
27
29
|
*
|
|
28
30
|
* Runs `useIntl`-calling hooks, so an `IntlProvider` must sit above it. Inside a `Dashboard` the
|
|
29
31
|
* ambient wrapper in `DashboardInner` supplies one with the same locale; a mount site without one
|
|
@@ -33,7 +35,13 @@ import { useScheduledEmailFormState } from "./useScheduledEmailFormState.js";
|
|
|
33
35
|
*/
|
|
34
36
|
export function ScheduledEmailDialogStateProvider({ children }) {
|
|
35
37
|
const { isLoading } = useScheduledEmailDialogContext();
|
|
36
|
-
|
|
38
|
+
// Latches on the first non-loading render: the draft seed must not run against unloaded
|
|
39
|
+
// data, and once seeded it must survive isLoading flipping back (an automations refresh).
|
|
40
|
+
const [hasLoaded, setHasLoaded] = useState(!isLoading);
|
|
41
|
+
if (!isLoading && !hasLoaded) {
|
|
42
|
+
setHasLoaded(true);
|
|
43
|
+
}
|
|
44
|
+
return hasLoaded ? (_jsx(LoadedScheduledEmailDialogState, { children: children })) : (_jsx(_Fragment, { children: children }));
|
|
37
45
|
}
|
|
38
46
|
function LoadedScheduledEmailDialogState({ children }) {
|
|
39
47
|
const { settings, externalRecipient } = useAutomationsContext();
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ export declare const ScheduledExportActionsContextProvider: import("react").Prov
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the scheduled-export dialog's draft mutators.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
7
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
7
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
8
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
9
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
10
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
11
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
10
12
|
*
|
|
11
13
|
* @alpha
|
|
12
14
|
*/
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledExportActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAOtE,eAAO,MAAM,qCAAqC,2EAAyC,CAAC;AAE5F
|
|
1
|
+
{"version":3,"file":"ScheduledExportActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAOtE,eAAO,MAAM,qCAAqC,2EAAyC,CAAC;AAE5F;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,mCAAmC,CAK/E"}
|
|
@@ -7,10 +7,12 @@ export const ScheduledExportActionsContextProvider = ScheduledExportActionsConte
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the scheduled-export dialog's draft mutators.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
11
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
11
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
12
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
13
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
14
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
15
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
14
16
|
*
|
|
15
17
|
* @alpha
|
|
16
18
|
*/
|
|
@@ -3,10 +3,12 @@ export declare const ScheduledExportDataContextProvider: import("react").Provide
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the scheduled-export dialog's recipient defaults.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
7
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
7
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
8
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
9
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
10
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
11
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
10
12
|
*
|
|
11
13
|
* @alpha
|
|
12
14
|
*/
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledExportDataContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAKnE,eAAO,MAAM,kCAAkC,wEAAsC,CAAC;AAEtF
|
|
1
|
+
{"version":3,"file":"ScheduledExportDataContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAKnE,eAAO,MAAM,kCAAkC,wEAAsC,CAAC;AAEtF;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,gCAAgC,CAKzE"}
|
|
@@ -7,10 +7,12 @@ export const ScheduledExportDataContextProvider = ScheduledExportDataContext.Pro
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the scheduled-export dialog's recipient defaults.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
11
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
11
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
12
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
13
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
14
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
15
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
14
16
|
*
|
|
15
17
|
* @alpha
|
|
16
18
|
*/
|
|
@@ -3,10 +3,12 @@ export declare const ScheduledExportDraftContextProvider: import("react").Provid
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the scheduled-export dialog's edit draft.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
7
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
7
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
8
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
9
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
10
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
11
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
10
12
|
*
|
|
11
13
|
* @alpha
|
|
12
14
|
*/
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledExportDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAKpE,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF
|
|
1
|
+
{"version":3,"file":"ScheduledExportDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAKpE,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,IAAI,iCAAiC,CAK3E"}
|
|
@@ -7,10 +7,12 @@ export const ScheduledExportDraftContextProvider = ScheduledExportDraftContext.P
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the scheduled-export dialog's edit draft.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
11
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
11
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
12
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
13
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
14
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
15
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
14
16
|
*
|
|
15
17
|
* @alpha
|
|
16
18
|
*/
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ export declare const ScheduledExportFiltersContextProvider: import("react").Prov
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the scheduled-export dialog's filter and export-parameter model.
|
|
5
5
|
*
|
|
6
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
7
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
7
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
8
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
9
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
10
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
11
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
10
12
|
*
|
|
11
13
|
* @alpha
|
|
12
14
|
*/
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledExportFiltersContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAOtE,eAAO,MAAM,qCAAqC,2EAAyC,CAAC;AAE5F
|
|
1
|
+
{"version":3,"file":"ScheduledExportFiltersContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAOtE,eAAO,MAAM,qCAAqC,2EAAyC,CAAC;AAE5F;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,mCAAmC,CAK/E"}
|
|
@@ -7,10 +7,12 @@ export const ScheduledExportFiltersContextProvider = ScheduledExportFiltersConte
|
|
|
7
7
|
/**
|
|
8
8
|
* Reads the scheduled-export dialog's filter and export-parameter model.
|
|
9
9
|
*
|
|
10
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
11
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
11
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
12
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
13
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
14
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
15
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
14
16
|
*
|
|
15
17
|
* @alpha
|
|
16
18
|
*/
|
package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export function missingScheduledExportStateProvider(accessor) {
|
|
8
|
-
throw new Error(`${accessor} must be used within ScheduledEmailDialogStateProvider. The
|
|
8
|
+
throw new Error(`${accessor} must be used within ScheduledEmailDialogStateProvider. The state model mounts once the dialog's data has first loaded, so check useScheduledEmailDialogContext().isLoading before reading scheduled-export dialog state.`);
|
|
9
9
|
}
|
|
@@ -627,7 +627,7 @@ export interface IScheduledEmailDialogShellProps extends Pick<IScheduledEmailDia
|
|
|
627
627
|
* {@link useSaveScheduledEmailToBackend} instance. Drives the footer's submit button, the Enter key on
|
|
628
628
|
* it, and the header's Enter-to-submit. The shell does not own the save hook, so the caller's own Enter
|
|
629
629
|
* handlers — {@link useScheduledEmailSubmitOnEnter} — share the same instance. Create the hook instance
|
|
630
|
-
* only once the dialog
|
|
630
|
+
* only once the dialog's data has first loaded — the state hooks throw before then.
|
|
631
631
|
*/
|
|
632
632
|
onSubmit: () => void;
|
|
633
633
|
/**
|
|
@@ -795,8 +795,9 @@ export declare function AlertingDialogSensitivity(overrides: Partial<IAlertingDi
|
|
|
795
795
|
* `AlertingDialogComponent` that keeps this chrome and arranges the blocks differently renders the shell
|
|
796
796
|
* itself. The shell does not own the submit: call {@link useAlertSubmit} and pass its `submit` and
|
|
797
797
|
* `isSaving`, so the footer button and any Enter handler in the body share one instance. Call that hook
|
|
798
|
-
* only once `useAlertingDialogContext().isLoading` is false — the state hooks throw
|
|
799
|
-
*
|
|
798
|
+
* only once `useAlertingDialogContext().isLoading` is first false — the state hooks throw until the
|
|
799
|
+
* dialog's data has first loaded (after that they stay available through a refresh) — and render the
|
|
800
|
+
* shell alone (any `onSubmit`, `isSaving: false`) until then, as the example does.
|
|
800
801
|
*
|
|
801
802
|
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
802
803
|
*
|
|
@@ -804,7 +805,7 @@ export declare function AlertingDialogSensitivity(overrides: Partial<IAlertingDi
|
|
|
804
805
|
* ```tsx
|
|
805
806
|
* function MyAlertingDialog(props: IAlertingDialogProps) {
|
|
806
807
|
* const { isLoading } = useAlertingDialogContext();
|
|
807
|
-
* // the state hooks throw
|
|
808
|
+
* // the state hooks throw until the dialog's data has first loaded; the shell shows the skeleton
|
|
808
809
|
* if (isLoading) {
|
|
809
810
|
* return <AlertingDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
810
811
|
* }
|
|
@@ -4541,8 +4542,9 @@ export declare const DEFAULT_TAB_ID = "defaultTabId";
|
|
|
4541
4542
|
* rendered within an `AutomationsContextProvider`, an `AlertingDialogContextProvider` (for the
|
|
4542
4543
|
* create/edit flow), and an `AlertingDialogStateProvider`. Inside a `Dashboard`, the alerting
|
|
4543
4544
|
* connector supplies the first two providers above the `AlertingDialogComponent` slot, and mounts
|
|
4544
|
-
* `AlertingDialogStateProvider` around the resolved slot component
|
|
4545
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
4545
|
+
* `AlertingDialogStateProvider` around the resolved slot component — its state model establishes
|
|
4546
|
+
* itself once `useAlertingDialogContext().isLoading` is first false and stays mounted from then
|
|
4547
|
+
* on — so the default component, and any wholesale
|
|
4546
4548
|
* slot replacement, inherit all three contexts automatically and require no extra wiring.
|
|
4547
4549
|
*
|
|
4548
4550
|
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
@@ -4961,7 +4963,8 @@ export declare function DefaultSaveButton({ isVisible, isEnabled, isSaving, butt
|
|
|
4961
4963
|
* export draft's state from those contexts rather than from the dashboard store. It must therefore
|
|
4962
4964
|
* be rendered within an `AutomationsContextProvider`, a `ScheduledEmailDialogContextProvider` (for
|
|
4963
4965
|
* the create/edit flow), and a `ScheduledEmailDialogStateProvider`, whose state model establishes
|
|
4964
|
-
* itself once `useScheduledEmailDialogContext().isLoading` is false
|
|
4966
|
+
* itself once `useScheduledEmailDialogContext().isLoading` is first false and stays mounted from
|
|
4967
|
+
* then on. Inside a `Dashboard`, the
|
|
4965
4968
|
* scheduled export connector supplies the first two providers above the
|
|
4966
4969
|
* `ScheduledEmailDialogComponent` slot and mounts `ScheduledEmailDialogStateProvider` around the
|
|
4967
4970
|
* resolved slot component — so the default component, and any wholesale slot replacement, inherit
|
|
@@ -7290,7 +7293,7 @@ export declare interface IAlertingDialogShellProps extends Pick<IAlertingDialogP
|
|
|
7290
7293
|
* The dialog's single submit — `submit` of the caller's {@link useAlertSubmit} instance. Drives the
|
|
7291
7294
|
* footer's submit button and the Enter key on it. The shell does not own the submit hook, so a
|
|
7292
7295
|
* caller's own Enter handler or button can share the same instance. Create the hook instance only
|
|
7293
|
-
* once the dialog
|
|
7296
|
+
* once the dialog's data has first loaded — the state hooks throw before then.
|
|
7294
7297
|
*/
|
|
7295
7298
|
onSubmit: () => void;
|
|
7296
7299
|
/**
|
|
@@ -19693,7 +19696,7 @@ export declare interface IScheduledEmailDialogShellProps extends Pick<IScheduled
|
|
|
19693
19696
|
* {@link useSaveScheduledEmailToBackend} instance. Drives the footer's submit button, the Enter key on
|
|
19694
19697
|
* it, and the header's Enter-to-submit. The shell does not own the save hook, so the caller's own Enter
|
|
19695
19698
|
* handlers — {@link useScheduledEmailSubmitOnEnter} — share the same instance. Create the hook instance
|
|
19696
|
-
* only once the dialog
|
|
19699
|
+
* only once the dialog's data has first loaded — the state hooks throw before then.
|
|
19697
19700
|
*/
|
|
19698
19701
|
onSubmit: () => void;
|
|
19699
19702
|
/**
|
|
@@ -26478,9 +26481,9 @@ export declare function ScheduledEmailDialogRecurrence(props: Partial<IScheduled
|
|
|
26478
26481
|
* shell itself. The shell does not own the save: call {@link useSaveScheduledEmailToBackend} and pass its
|
|
26479
26482
|
* `handleSaveScheduledEmail`, `isSavingScheduledEmail` and `savingErrorMessage`; build Enter handlers for
|
|
26480
26483
|
* the blocks you place with {@link useScheduledEmailSubmitOnEnter} over the same `handleSaveScheduledEmail`.
|
|
26481
|
-
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is false — the state hooks
|
|
26482
|
-
*
|
|
26483
|
-
* the example does.
|
|
26484
|
+
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is first false — the state hooks
|
|
26485
|
+
* throw until the dialog's data has first loaded (after that they stay available through a refresh) —
|
|
26486
|
+
* and render the shell alone (any `onSubmit`, `isSaving: false`) until then, as the example does.
|
|
26484
26487
|
*
|
|
26485
26488
|
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
26486
26489
|
*
|
|
@@ -26488,7 +26491,7 @@ export declare function ScheduledEmailDialogRecurrence(props: Partial<IScheduled
|
|
|
26488
26491
|
* ```tsx
|
|
26489
26492
|
* function MyScheduledEmailDialog(props: IScheduledEmailDialogProps) {
|
|
26490
26493
|
* const { isLoading } = useScheduledEmailDialogContext();
|
|
26491
|
-
* // the state hooks throw
|
|
26494
|
+
* // the state hooks throw until the dialog's data has first loaded; the shell shows the skeleton
|
|
26492
26495
|
* if (isLoading) {
|
|
26493
26496
|
* return <ScheduledEmailDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
26494
26497
|
* }
|
|
@@ -31757,10 +31760,11 @@ export declare function updateVisualizationsFromSwitcherWidgetContent(ref: ObjRe
|
|
|
31757
31760
|
/**
|
|
31758
31761
|
* Reads the alerting dialog's mutators.
|
|
31759
31762
|
*
|
|
31760
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
31761
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
31762
|
-
* must check that flag before
|
|
31763
|
-
*
|
|
31763
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
31764
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
31765
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
31766
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
31767
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
31764
31768
|
*
|
|
31765
31769
|
* @alpha
|
|
31766
31770
|
*/
|
|
@@ -31769,10 +31773,11 @@ export declare function useAlertActions(): IAlertActionsContextValue;
|
|
|
31769
31773
|
/**
|
|
31770
31774
|
* Reads the data the alerting dialog loads asynchronously.
|
|
31771
31775
|
*
|
|
31772
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
31773
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
31774
|
-
* must check that flag before
|
|
31775
|
-
*
|
|
31776
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
31777
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
31778
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
31779
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
31780
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
31776
31781
|
*
|
|
31777
31782
|
* @alpha
|
|
31778
31783
|
*/
|
|
@@ -31790,10 +31795,11 @@ export declare function useAlertDialogValidity(): IAlertDialogValidity;
|
|
|
31790
31795
|
/**
|
|
31791
31796
|
* Reads the alerting dialog's edit draft.
|
|
31792
31797
|
*
|
|
31793
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
31794
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
31795
|
-
* must check that flag before
|
|
31796
|
-
*
|
|
31798
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
31799
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
31800
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
31801
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
31802
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
31797
31803
|
*
|
|
31798
31804
|
* @alpha
|
|
31799
31805
|
*/
|
|
@@ -31802,10 +31808,11 @@ export declare function useAlertDraft(): IAlertDraftContextValue;
|
|
|
31802
31808
|
/**
|
|
31803
31809
|
* Reads the alerting dialog's filter and export-parameter model.
|
|
31804
31810
|
*
|
|
31805
|
-
* Throws outside the alerting dialog's state providers, which mount
|
|
31806
|
-
* `useAlertingDialogContext().isLoading` is false
|
|
31807
|
-
* must check that flag before
|
|
31808
|
-
*
|
|
31811
|
+
* Throws outside the alerting dialog's state providers, which mount the state model on the first
|
|
31812
|
+
* render where `useAlertingDialogContext().isLoading` is false and keep it mounted from then on —
|
|
31813
|
+
* a replacement for `AlertingDialogComponent` must check that flag before reading state while the
|
|
31814
|
+
* dialog first loads. An automations refresh flips `isLoading` back without unmounting the model,
|
|
31815
|
+
* so the draft survives and this accessor keeps serving through it.
|
|
31809
31816
|
*
|
|
31810
31817
|
* @alpha
|
|
31811
31818
|
*/
|
|
@@ -32660,10 +32667,12 @@ export declare function useScheduledEmailSubmitOnEnter({ onSubmit, isSaving, }:
|
|
|
32660
32667
|
/**
|
|
32661
32668
|
* Reads the scheduled-export dialog's draft mutators.
|
|
32662
32669
|
*
|
|
32663
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
32664
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
32665
|
-
*
|
|
32666
|
-
*
|
|
32670
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
32671
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
32672
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
32673
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
32674
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
32675
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
32667
32676
|
*
|
|
32668
32677
|
* @alpha
|
|
32669
32678
|
*/
|
|
@@ -32686,10 +32695,12 @@ export declare function useScheduledExportAttachments(): IScheduledExportAttachm
|
|
|
32686
32695
|
/**
|
|
32687
32696
|
* Reads the scheduled-export dialog's recipient defaults.
|
|
32688
32697
|
*
|
|
32689
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
32690
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
32691
|
-
*
|
|
32692
|
-
*
|
|
32698
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
32699
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
32700
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
32701
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
32702
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
32703
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
32693
32704
|
*
|
|
32694
32705
|
* @alpha
|
|
32695
32706
|
*/
|
|
@@ -32710,10 +32721,12 @@ export declare function useScheduledExportDialogValidity(): IScheduledExportDial
|
|
|
32710
32721
|
/**
|
|
32711
32722
|
* Reads the scheduled-export dialog's edit draft.
|
|
32712
32723
|
*
|
|
32713
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
32714
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
32715
|
-
*
|
|
32716
|
-
*
|
|
32724
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
32725
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
32726
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
32727
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
32728
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
32729
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
32717
32730
|
*
|
|
32718
32731
|
* @alpha
|
|
32719
32732
|
*/
|
|
@@ -32722,10 +32735,12 @@ export declare function useScheduledExportDraft(): IScheduledExportDraftContextV
|
|
|
32722
32735
|
/**
|
|
32723
32736
|
* Reads the scheduled-export dialog's filter and export-parameter model.
|
|
32724
32737
|
*
|
|
32725
|
-
* Throws outside the scheduled-export dialog's state providers, which mount
|
|
32726
|
-
* `useScheduledEmailDialogContext().isLoading` is false
|
|
32727
|
-
*
|
|
32728
|
-
*
|
|
32738
|
+
* Throws outside the scheduled-export dialog's state providers, which mount the state model on
|
|
32739
|
+
* the first render where `useScheduledEmailDialogContext().isLoading` is false and keep it
|
|
32740
|
+
* mounted from then on — a replacement for `ScheduledEmailDialogComponent` must check that flag
|
|
32741
|
+
* before reading state while the dialog first loads. That state is on the ordinary path here: a
|
|
32742
|
+
* widget export renders while its filters load. An automations refresh flips `isLoading` back
|
|
32743
|
+
* without unmounting the model, so the draft survives and this accessor keeps serving through it.
|
|
32729
32744
|
*
|
|
32730
32745
|
* @alpha
|
|
32731
32746
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-dashboard",
|
|
3
|
-
"version": "11.56.0-alpha.
|
|
3
|
+
"version": "11.56.0-alpha.5",
|
|
4
4
|
"description": "GoodData SDK - Dashboard Component",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -60,20 +60,20 @@
|
|
|
60
60
|
"ts-invariant": "0.10.3",
|
|
61
61
|
"tslib": "2.8.1",
|
|
62
62
|
"uuid": "11.1.1",
|
|
63
|
-
"@gooddata/sdk-backend-base": "11.56.0-alpha.
|
|
64
|
-
"@gooddata/sdk-
|
|
65
|
-
"@gooddata/sdk-
|
|
66
|
-
"@gooddata/sdk-
|
|
67
|
-
"@gooddata/sdk-ui-
|
|
68
|
-
"@gooddata/sdk-
|
|
69
|
-
"@gooddata/sdk-ui-filters": "11.56.0-alpha.
|
|
70
|
-
"@gooddata/sdk-ui-geo": "11.56.0-alpha.
|
|
71
|
-
"@gooddata/sdk-ui-semantic-search": "11.56.0-alpha.
|
|
72
|
-
"@gooddata/sdk-ui-
|
|
73
|
-
"@gooddata/sdk-ui-theme-provider": "11.56.0-alpha.
|
|
74
|
-
"@gooddata/
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/
|
|
63
|
+
"@gooddata/sdk-backend-base": "11.56.0-alpha.5",
|
|
64
|
+
"@gooddata/sdk-ui": "11.56.0-alpha.5",
|
|
65
|
+
"@gooddata/sdk-model": "11.56.0-alpha.5",
|
|
66
|
+
"@gooddata/sdk-backend-spi": "11.56.0-alpha.5",
|
|
67
|
+
"@gooddata/sdk-ui-charts": "11.56.0-alpha.5",
|
|
68
|
+
"@gooddata/sdk-ui-ext": "11.56.0-alpha.5",
|
|
69
|
+
"@gooddata/sdk-ui-filters": "11.56.0-alpha.5",
|
|
70
|
+
"@gooddata/sdk-ui-geo": "11.56.0-alpha.5",
|
|
71
|
+
"@gooddata/sdk-ui-semantic-search": "11.56.0-alpha.5",
|
|
72
|
+
"@gooddata/sdk-ui-kit": "11.56.0-alpha.5",
|
|
73
|
+
"@gooddata/sdk-ui-theme-provider": "11.56.0-alpha.5",
|
|
74
|
+
"@gooddata/util": "11.56.0-alpha.5",
|
|
75
|
+
"@gooddata/sdk-ui-pivot": "11.56.0-alpha.5",
|
|
76
|
+
"@gooddata/sdk-ui-vis-commons": "11.56.0-alpha.5"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@microsoft/api-documenter": "7.30.10",
|
|
@@ -116,12 +116,12 @@
|
|
|
116
116
|
"typescript": "6.0.3",
|
|
117
117
|
"vitest": "4.1.8",
|
|
118
118
|
"vitest-dom": "0.1.1",
|
|
119
|
-
"@gooddata/eslint-config": "11.56.0-alpha.
|
|
120
|
-
"@gooddata/i18n-toolkit": "11.56.0-alpha.
|
|
121
|
-
"@gooddata/
|
|
122
|
-
"@gooddata/
|
|
123
|
-
"@gooddata/sdk-backend-mockingbird": "11.56.0-alpha.
|
|
124
|
-
"@gooddata/stylelint-config": "11.56.0-alpha.
|
|
119
|
+
"@gooddata/eslint-config": "11.56.0-alpha.5",
|
|
120
|
+
"@gooddata/i18n-toolkit": "11.56.0-alpha.5",
|
|
121
|
+
"@gooddata/reference-workspace": "11.56.0-alpha.5",
|
|
122
|
+
"@gooddata/oxlint-config": "11.56.0-alpha.5",
|
|
123
|
+
"@gooddata/sdk-backend-mockingbird": "11.56.0-alpha.5",
|
|
124
|
+
"@gooddata/stylelint-config": "11.56.0-alpha.5"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
127
|
"react": "^18.0.0 || ^19.0.0",
|