@gooddata/sdk-ui-dashboard 11.52.0-alpha.1 → 11.52.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.
Files changed (163) hide show
  1. package/NOTICE +86 -14
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/index.d.ts +1 -5
  5. package/esm/index.d.ts.map +1 -1
  6. package/esm/index.js +0 -3
  7. package/esm/model/commandHandlers/index.d.ts.map +1 -1
  8. package/esm/model/commandHandlers/index.js +0 -2
  9. package/esm/model/commands/base.d.ts +1 -1
  10. package/esm/model/commands/base.d.ts.map +1 -1
  11. package/esm/model/commands/index.d.ts +1 -2
  12. package/esm/model/commands/index.d.ts.map +1 -1
  13. package/esm/model/store/dashboardStore.d.ts +0 -2
  14. package/esm/model/store/dashboardStore.d.ts.map +1 -1
  15. package/esm/model/store/dashboardStore.js +0 -2
  16. package/esm/model/store/types.d.ts +0 -3
  17. package/esm/model/store/types.d.ts.map +1 -1
  18. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
  19. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +2 -2
  20. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts +3 -4
  21. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts.map +1 -1
  22. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.js +14 -16
  23. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +1 -3
  24. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
  25. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +1 -4
  26. package/esm/presentation/automations/alerting/types.d.ts +1 -13
  27. package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
  28. package/esm/presentation/automations/connectors/AlertingConnector.d.ts +4 -5
  29. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  30. package/esm/presentation/automations/connectors/AlertingConnector.js +8 -17
  31. package/esm/presentation/automations/connectors/AlertingConnector.test.js +0 -16
  32. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts +4 -4
  33. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
  34. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +8 -18
  35. package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +0 -20
  36. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts +1 -4
  37. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -1
  38. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +5 -10
  39. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +13 -10
  40. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  41. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +35 -3
  42. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +76 -27
  43. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts +1 -4
  44. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map +1 -1
  45. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +1 -14
  46. package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +1 -11
  47. package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +11 -14
  48. package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
  49. package/esm/presentation/automations/contexts/AlertingDialogContext.js +3 -3
  50. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +31 -1
  51. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  52. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +5 -18
  53. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
  54. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +3 -5
  55. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
  56. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +5 -5
  57. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts +3 -12
  58. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts.map +1 -1
  59. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +21 -21
  60. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts +6 -3
  61. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
  62. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.js +14 -27
  63. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts +13 -0
  64. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts.map +1 -0
  65. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.js +44 -0
  66. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +1 -3
  67. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
  68. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +1 -4
  69. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.d.ts.map +1 -1
  70. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.js +3 -12
  71. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts.map +1 -1
  72. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.js +2 -1
  73. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts +8 -9
  74. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts.map +1 -1
  75. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.js +12 -11
  76. package/esm/presentation/automations/scheduledEmail/types.d.ts +1 -13
  77. package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
  78. package/esm/presentation/automations/scheduledEmail/utils/users.d.ts +1 -2
  79. package/esm/presentation/automations/scheduledEmail/utils/users.d.ts.map +1 -1
  80. package/esm/presentation/automations/scheduledEmail/utils/users.js +1 -10
  81. package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +9 -0
  82. package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.d.ts.map +1 -1
  83. package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js +7 -2
  84. package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
  85. package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +2 -14
  86. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts +12 -3
  87. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
  88. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +3 -11
  89. package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts +7 -1
  90. package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map +1 -1
  91. package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.js +9 -25
  92. package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts.map +1 -1
  93. package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.js +4 -7
  94. package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts.map +1 -1
  95. package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.js +6 -3
  96. package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -1
  97. package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +23 -10
  98. package/esm/presentation/automations/shared/utils/automationUtils.d.ts +1 -3
  99. package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
  100. package/esm/presentation/automations/shared/utils/automationUtils.js +0 -17
  101. package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
  102. package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +5 -4
  103. package/esm/presentation/drill/utils/dashboardPredicate.d.ts +0 -15
  104. package/esm/presentation/drill/utils/dashboardPredicate.d.ts.map +1 -1
  105. package/esm/presentation/drill/utils/dashboardPredicate.js +1 -16
  106. package/esm/presentation/presentationComponents/DashboardItems/DashboardItem.d.ts +4 -0
  107. package/esm/presentation/presentationComponents/DashboardItems/DashboardItem.d.ts.map +1 -1
  108. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +2 -3
  109. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
  110. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
  111. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -3
  112. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
  113. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +2 -2
  114. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +1 -1
  115. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
  116. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +4 -6
  117. package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.d.ts.map +1 -1
  118. package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +1 -1
  119. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
  120. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +3 -1
  121. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
  122. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.js +1 -1
  123. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
  124. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js +1 -1
  125. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
  126. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.js +1 -1
  127. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts +2 -1
  128. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -1
  129. package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +4 -4
  130. package/esm/sdk-ui-dashboard.d.ts +47 -115
  131. package/package.json +21 -21
  132. package/styles/css/main.css +2 -0
  133. package/styles/css/main.css.map +1 -1
  134. package/styles/css/visualizationSwitcherHeader.css +1 -0
  135. package/styles/css/visualizationSwitcherHeader.css.map +1 -1
  136. package/styles/css/visualizationSwitcherWidget.css +1 -0
  137. package/styles/css/visualizationSwitcherWidget.css.map +1 -1
  138. package/styles/scss/visualizationSwitcherHeader.scss +2 -0
  139. package/styles/scss/visualizationSwitcherWidget.scss +2 -0
  140. package/esm/model/commandHandlers/users/loadAllUsersHandler.d.ts +0 -5
  141. package/esm/model/commandHandlers/users/loadAllUsersHandler.d.ts.map +0 -1
  142. package/esm/model/commandHandlers/users/loadAllUsersHandler.js +0 -19
  143. package/esm/model/commandHandlers/users/loadWorkspaceUsers.d.ts +0 -4
  144. package/esm/model/commandHandlers/users/loadWorkspaceUsers.d.ts.map +0 -1
  145. package/esm/model/commandHandlers/users/loadWorkspaceUsers.js +0 -3
  146. package/esm/model/commands/users.d.ts +0 -19
  147. package/esm/model/commands/users.d.ts.map +0 -1
  148. package/esm/model/commands/users.js +0 -15
  149. package/esm/model/react/useWorkspaceUsers.d.ts +0 -9
  150. package/esm/model/react/useWorkspaceUsers.d.ts.map +0 -1
  151. package/esm/model/react/useWorkspaceUsers.js +0 -27
  152. package/esm/model/store/users/index.d.ts +0 -9
  153. package/esm/model/store/users/index.d.ts.map +0 -1
  154. package/esm/model/store/users/index.js +0 -12
  155. package/esm/model/store/users/usersReducers.d.ts +0 -21
  156. package/esm/model/store/users/usersReducers.d.ts.map +0 -1
  157. package/esm/model/store/users/usersReducers.js +0 -15
  158. package/esm/model/store/users/usersSelectors.d.ts +0 -22
  159. package/esm/model/store/users/usersSelectors.d.ts.map +0 -1
  160. package/esm/model/store/users/usersSelectors.js +0 -27
  161. package/esm/model/store/users/usersState.d.ts +0 -12
  162. package/esm/model/store/users/usersState.d.ts.map +0 -1
  163. package/esm/model/store/users/usersState.js +0 -2
@@ -1,6 +1,5 @@
1
1
  import type { IExecutionResult } from "@gooddata/sdk-backend-spi";
2
- import type { FilterContextItem, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IInsight, IInsightParameterValue, INotificationChannelIdentifier, INotificationChannelMetadataObject, IWidget, IWorkspaceUser, ObjRef } from "@gooddata/sdk-model";
3
- import type { GoodDataSdkError } from "@gooddata/sdk-ui";
2
+ import type { FilterContextItem, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IDashboardParameter, IInsight, IInsightParameterValue, INotificationChannelIdentifier, INotificationChannelMetadataObject, IWidget, ObjRef } from "@gooddata/sdk-model";
4
3
  /**
5
4
  * Sub-context for the alerting create/edit dialog.
6
5
  *
@@ -18,12 +17,17 @@ export interface IAlertingDialogContextValue {
18
17
  dashboardId?: string;
19
18
  dashboardFilters: FilterContextItem[];
20
19
  hiddenFilters: FilterContextItem[];
21
- widgetLocalIdToTabIdMap: Record<string, string>;
22
20
  executionResultByRef: (ref: ObjRef | undefined) => {
23
21
  executionResult?: IExecutionResult;
24
22
  } | undefined;
25
23
  /** Effective widget parameter values for the dialog's widget (replaces direct selectEffectiveParameterValuesForWidget read) */
26
24
  parameterValues: IInsightParameterValue[];
25
+ /**
26
+ * Effective dashboard parameters for the dialog's widget — the owning tab's parameters with any
27
+ * runtime override folded in (replaces the direct selectEffectiveDashboardParametersForWidget
28
+ * read in useAutomationAlertParameters).
29
+ */
30
+ dashboardParameters: IDashboardParameter[];
27
31
  commonDateFilterId?: string;
28
32
  dashboardEvaluationFrequency?: string;
29
33
  createAlert(alert: IAutomationMetadataObjectDefinition): Promise<IAutomationMetadataObject>;
@@ -31,16 +35,9 @@ export interface IAlertingDialogContextValue {
31
35
  deleteAlert(alert: IAutomationMetadataObject): Promise<void>;
32
36
  /** The alert being edited; undefined when creating a new one. */
33
37
  alertToEdit?: IAutomationMetadataObject;
34
- /**
35
- * Workspace users available as alert recipients. Loaded only while the create/edit dialog is
36
- * mounted, so opening the management dialog alone does not trigger the load.
37
- */
38
- users: IWorkspaceUser[];
39
- /** Error from loading workspace users, if any. */
40
- usersError?: GoodDataSdkError;
41
38
  /** Notification channels available as alert destinations. */
42
39
  notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
43
- /** True while the dialog's initial data (automations, workspace users) is still loading. */
40
+ /** True while the dialog's initial data (automations) is still loading. */
44
41
  isLoading: boolean;
45
42
  }
46
43
  export declare const AlertingDialogContextProvider: import("react").Provider<IAlertingDialogContextValue | undefined>;
@@ -49,10 +46,10 @@ export declare const AlertingDialogContextProvider: import("react").Provider<IAl
49
46
  *
50
47
  * A replacement for `AlertingDialogComponent` renders inside this context and reads the dialog's widget
51
48
  * and insight, the dashboard filter context it should apply, the alert being edited, the available
52
- * workspace users and notification channels, and the create/save/delete callbacks from here.
49
+ * notification channels, and the create/save/delete callbacks from here.
53
50
  *
54
- * Some members exist to wire internal machinery (`executionResultByRef`, `widgetLocalIdToTabIdMap`,
55
- * `parameterValues`) and are not intended as a customization surface.
51
+ * Some members exist to wire internal machinery (`executionResultByRef`, `parameterValues`,
52
+ * `dashboardParameters`) and are not intended as a customization surface.
56
53
  *
57
54
  * @alpha
58
55
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACR,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,QAAQ,EACR,sBAAsB,EACtB,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,cAAc,EACd,MAAM,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,E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6DAA6D;IAC7D,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,6BAA6B,mEAAiC,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,IAAI,2BAA2B,CAMtE"}
@@ -7,10 +7,10 @@ export const AlertingDialogContextProvider = AlertingDialogContext.Provider;
7
7
  *
8
8
  * A replacement for `AlertingDialogComponent` renders inside this context and reads the dialog's widget
9
9
  * and insight, the dashboard filter context it should apply, the alert being edited, the available
10
- * workspace users and notification channels, and the create/save/delete callbacks from here.
10
+ * notification channels, and the create/save/delete callbacks from here.
11
11
  *
12
- * Some members exist to wire internal machinery (`executionResultByRef`, `widgetLocalIdToTabIdMap`,
13
- * `parameterValues`) and are not intended as a customization surface.
12
+ * Some members exist to wire internal machinery (`executionResultByRef`, `parameterValues`,
13
+ * `dashboardParameters`) and are not intended as a customization surface.
14
14
  *
15
15
  * @alpha
16
16
  */
@@ -1,4 +1,4 @@
1
- import type { DashboardAttributeFilterSelectionType, DateFilterGranularity, FilterContextItem, IAttributeDisplayFormMetadataObject, ICatalogAttribute, ICatalogDateAttribute, ICatalogDateDataset, ICatalogMeasure, IDashboardAttributeFilterConfig, IDashboardDateFilterConfig, IDashboardDateFilterConfigItem, IDashboardMeasureValueFilterConfig, ISeparators, ISettings, IUser, ObjRef, WeekStart } from "@gooddata/sdk-model";
1
+ import type { DashboardAttributeFilterSelectionType, DateFilterGranularity, FilterContextItem, IAttributeDisplayFormMetadataObject, ICatalogAttribute, ICatalogDateAttribute, ICatalogDateDataset, ICatalogMeasure, IDashboardAttributeFilterConfig, IDashboardDateFilterConfig, IDashboardDateFilterConfigItem, IDashboardMeasureValueFilterConfig, IDashboardParameter, IParameterMetadataObject, ISeparators, ISettings, IUser, ObjRef, WeekStart } from "@gooddata/sdk-model";
2
2
  import type { ILocale } from "@gooddata/sdk-ui";
3
3
  import type { IDateFilterOptionsByType } from "@gooddata/sdk-ui-filters";
4
4
  import type { IAutomationFiltersTab } from "../../../model/store/filtering/types.js";
@@ -14,6 +14,27 @@ export interface IAutomationsDateFilterConfig {
14
14
  getGranularitiesForTab: (tabId: string) => DateFilterGranularity[];
15
15
  getOptionsForTab: (tabId: string) => IDateFilterOptionsByType | undefined;
16
16
  }
17
+ /**
18
+ * Workspace and dashboard parameter data provided by the dashboard connector so that the shared
19
+ * automationFilters hooks do not need to read dashboard selectors directly.
20
+ *
21
+ * @alpha
22
+ */
23
+ export interface IAutomationsParameters {
24
+ /** Whether the parameters feature is enabled; from selectEnableParameters. */
25
+ enabled: boolean;
26
+ /** Whether STRING-typed parameters are enabled; from selectEnableStringParameters. */
27
+ stringParametersEnabled: boolean;
28
+ /** The workspace parameter catalog; from selectCatalogParameters. */
29
+ catalog: IParameterMetadataObject[];
30
+ /**
31
+ * Whether the parameter catalog has finished loading. Before it has, every stored parameter
32
+ * ref looks removed, so staleness checks must treat loading as not-stale.
33
+ */
34
+ catalogIsLoaded: boolean;
35
+ /** Effective dashboard parameter values keyed by tab; from selectSmartPersistedTabsParameters. */
36
+ dashboardParametersByTab: Record<string, IDashboardParameter[]>;
37
+ }
17
38
  /**
18
39
  * Main context shared across all automation dialogs.
19
40
  * Only fields actively consumed by migrated leaves are listed here — add fields as each leaf migrates.
@@ -63,6 +84,15 @@ export interface IAutomationsContextValue {
63
84
  enableSlideshowExports: boolean;
64
85
  enableAutomationEvaluationMode: boolean;
65
86
  };
87
+ parameters: IAutomationsParameters;
88
+ /**
89
+ * Local identifiers of the dashboard's tabs, in layout order; empty when the dashboard has none.
90
+ * Narrowed from selectTabs (`ITabState[] | undefined`) because every consumer only ever reads
91
+ * `localIdentifier`, and all of them already coalesce `undefined` to `[]`.
92
+ */
93
+ tabIds: string[];
94
+ /** Maps a widget's localIdentifier to the localIdentifier of the tab that owns it. */
95
+ widgetLocalIdToTabIdMap: Record<string, string>;
66
96
  getCatalogAttributeByRef: (ref: ObjRef) => ICatalogAttribute | ICatalogDateAttribute | undefined;
67
97
  getAttributeFilterDisplayForm: (displayForm: ObjRef) => IAttributeDisplayFormMetadataObject | undefined;
68
98
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,kCAAkC,EAClC,WAAW,EACX,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IACzC,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,iBAAiB,EAAE,wBAAwB,CAAC;IAC5C,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,qBAAqB,EAAE,CAAC;IACnE,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,wBAAwB,GAAG,SAAS,CAAC;CAC7E;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC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,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,EAAE;QACN,mBAAmB,EAAE,OAAO,CAAC;QAC7B,0BAA0B,EAAE,OAAO,CAAC;QACpC,2BAA2B,EAAE,OAAO,CAAC;QACrC,iBAAiB,EAAE,OAAO,CAAC;QAC3B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,sBAAsB,EAAE,OAAO,CAAC;QAChC,8BAA8B,EAAE,OAAO,CAAC;KAC3C,CAAC;IACF,wBAAwB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,iBAAiB,GAAG,qBAAqB,GAAG,SAAS,CAAC;IACjG,6BAA6B,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mCAAmC,GAAG,SAAS,CAAC;IACxG;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC;CAC3D;AAID,eAAO,MAAM,0BAA0B,gEAA8B,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,wBAAwB,CAWhE"}
1
+ {"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,kCAAkC,EAClC,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0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,UAAU,EAAE,sBAAsB,CAAC;IACnC;;;;OAIG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,sFAAsF;IACtF,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,wBAAwB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,iBAAiB,GAAG,qBAAqB,GAAG,SAAS,CAAC;IACjG,6BAA6B,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mCAAmC,GAAG,SAAS,CAAC;IACxG;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC;CAC3D;AAID,eAAO,MAAM,0BAA0B,gEAA8B,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,wBAAwB,CAWhE"}
@@ -1,5 +1,4 @@
1
- import type { DashboardAttributeFilterConfigMode, DashboardDateFilterConfigMode, FilterContextItem, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IDashboardExportParameter, IExportTemplate, IInsight, INotificationChannelIdentifier, INotificationChannelMetadataObject, IWidget, IWorkspaceUser } from "@gooddata/sdk-model";
2
- import type { GoodDataSdkError } from "@gooddata/sdk-ui";
1
+ import type { DashboardAttributeFilterConfigMode, DashboardDateFilterConfigMode, FilterContextItem, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IDashboardExportParameter, IExportTemplate, IInsight, INotificationChannelIdentifier, INotificationChannelMetadataObject, IWidget } from "@gooddata/sdk-model";
3
2
  /**
4
3
  * Sub-context for the scheduled-email create/edit dialog.
5
4
  *
@@ -25,7 +24,6 @@ export interface IScheduledEmailDialogContextValue {
25
24
  * getAppliedDashboardFilters/getAppliedWidgetFilters inside the dialog, mirroring the alerting context.
26
25
  */
27
26
  hiddenFilters: FilterContextItem[];
28
- widgetLocalIdToTabIdMap: Record<string, string>;
29
27
  commonDateFilterId?: string;
30
28
  /**
31
29
  * Effective export parameter overrides keyed by tab, scoped to the dialog's widget when present.
@@ -41,8 +39,6 @@ export interface IScheduledEmailDialogContextValue {
41
39
  dateFormat: string | undefined;
42
40
  /** Whether cross-filtering is active on the dashboard; from selectIsCrossFiltering. */
43
41
  isCrossFiltering: boolean;
44
- /** Whether the dashboard has more than one tab; derived from selectTabs. */
45
- hasMultipleTabs: boolean;
46
42
  /** Effective mode for the common (dashboard-level) date filter. */
47
43
  commonDateFilterMode: DashboardDateFilterConfigMode;
48
44
  /** Effective mode map for per-dataset date filters (localIdentifier → mode). */
@@ -54,16 +50,9 @@ export interface IScheduledEmailDialogContextValue {
54
50
  deleteScheduledEmail(se: IAutomationMetadataObject): Promise<void>;
55
51
  /** The scheduled export being edited; undefined when creating a new one. */
56
52
  scheduledExportToEdit?: IAutomationMetadataObject;
57
- /**
58
- * Workspace users available as scheduled-export recipients. Loaded only while the create/edit dialog
59
- * is mounted, so opening the management dialog alone does not trigger the load.
60
- */
61
- users: IWorkspaceUser[];
62
- /** Error from loading workspace users, if any. */
63
- usersError?: GoodDataSdkError;
64
53
  /** Notification channels available as scheduled-export destinations. */
65
54
  notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
66
- /** True while the dialog's initial data (automations, workspace users) is still loading. */
55
+ /** True while the dialog's initial data (automations) is still loading. */
67
56
  isLoading: boolean;
68
57
  }
69
58
  export declare const ScheduledEmailDialogContextProvider: import("react").Provider<IScheduledEmailDialogContextValue | undefined>;
@@ -72,12 +61,10 @@ export declare const ScheduledEmailDialogContextProvider: import("react").Provid
72
61
  *
73
62
  * A replacement for the scheduled-email dialog renders inside this context and reads the dialog's widget
74
63
  * and insight, the dashboard filter context and export templates it should apply, the scheduled export
75
- * being edited, the available workspace users and notification channels, and the create/save/delete
76
- * callbacks from here.
64
+ * being edited, the available notification channels, and the create/save/delete callbacks from here.
77
65
  *
78
- * Some members exist to wire internal machinery (`exportParametersByTab`, `widgetLocalIdToTabIdMap`,
79
- * `commonDateFilterMode`, `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a
80
- * customization surface.
66
+ * Some members exist to wire internal machinery (`exportParametersByTab`, `commonDateFilterMode`,
67
+ * `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a customization surface.
81
68
  *
82
69
  * @alpha
83
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,iCAAiC;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC;;;OAGG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;IACnE;;;OAGG;IACH,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,wEAAwE;IACxE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,uFAAuF;IACvF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4EAA4E;IAC5E,eAAe,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,oBAAoB,EAAE,6BAA6B,CAAC;IACpD,kFAAgF;IAChF,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;IAC/D,2EAAyE;IACzE,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;IAEzE,oBAAoB,CAAC,EAAE,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAClG,kBAAkB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtF,oBAAoB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD;;;OAGG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,kDAAkD;IAClD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,wEAAwE;IACxE,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,4FAA4F;IAC5F,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,IAAI,iCAAiC,CAQlF"}
1
+ {"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,8BAA8B,EAC9B,kCAAkC,EAClC,OA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AA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,IAAI,iCAAiC,CAQlF"}
@@ -7,12 +7,10 @@ export const ScheduledEmailDialogContextProvider = ScheduledEmailDialogContext.P
7
7
  *
8
8
  * A replacement for the scheduled-email dialog renders inside this context and reads the dialog's widget
9
9
  * and insight, the dashboard filter context and export templates it should apply, the scheduled export
10
- * being edited, the available workspace users and notification channels, and the create/save/delete
11
- * callbacks from here.
10
+ * being edited, the available notification channels, and the create/save/delete callbacks from here.
12
11
  *
13
- * Some members exist to wire internal machinery (`exportParametersByTab`, `widgetLocalIdToTabIdMap`,
14
- * `commonDateFilterMode`, `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a
15
- * customization surface.
12
+ * Some members exist to wire internal machinery (`exportParametersByTab`, `commonDateFilterMode`,
13
+ * `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a customization surface.
16
14
  *
17
15
  * @alpha
18
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA+D9D,wBAAgB,2BAA2B,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,EAAE,0BAA0B,2CAwgB5B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,0BAA0B,2CAY5E"}
1
+ {"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA+D9D,wBAAgB,2BAA2B,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,EAAE,0BAA0B,2CAqgB5B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,0BAA0B,2CAY5E"}
@@ -44,14 +44,14 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
44
44
  const filtersTabContentRef = useRef(null);
45
45
  const [scheduledEmailToDelete, setScheduledEmailToDelete] = useState(null);
46
46
  const [selectedTabId, setSelectedTabId] = useState("general");
47
- const { isWhiteLabeled, externalRecipient: externalRecipientOverride, isSecondaryTitleVisible, } = useAutomationsContext();
48
- const { exportTemplates, widgetTitle, hasMultipleTabs, scheduledExportToEdit, widget, dashboardFilters } = useScheduledEmailDialogContext();
47
+ const { isWhiteLabeled, externalRecipient: externalRecipientOverride, isSecondaryTitleVisible, tabIds, } = useAutomationsContext();
48
+ const { exportTemplates, widgetTitle, scheduledExportToEdit, widget, dashboardFilters } = useScheduledEmailDialogContext();
49
49
  const handleScheduleDeleteSuccess = () => {
50
50
  onDeleteSuccess?.();
51
51
  setScheduledEmailToDelete(null);
52
52
  };
53
53
  const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, isSlidesExportEnabled, isAccessibilityModeEnabled, defaultPdfPageSize, } = useDefaultScheduledEmailDialogData();
54
- const { defaultUser, editedAutomation, originalAutomation, isSubmitDisabled, xlsxSettings, pdfSettings, csvSettings, csvRawSettings, startDate, allowExternalRecipients, allowOnlyLoggedUserRecipients, validationErrorMessage, selectedAttachments, isParentValid, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, slidesTemplateIds, onSlidesTemplateIdChange, onDestinationChange, onMessageChange, onRecipientsChange, onRecurrenceChange, onEvaluationModeChange, onSubjectChange, onTitleChange, onFiltersChange, onApplyCurrentFilters, onStoreFiltersChange, onFiltersByTabChange, enableAutomationEvaluationMode, users, usersError, notificationChannels, selectedFilters, availableFilters, storeFilters, filtersByTab, editedFiltersByTab, automationIsValid, parametersEnabled, visibleParametersByTab, availableParametersByTab, flatTabId, onParameterAdd, onParameterChange, onParameterDelete, onParameterAddByTab, onParameterChangeByTab, onParameterDeleteByTab, applyLatest: applyLatestParameters, } = useEditScheduledEmail({
54
+ const { defaultUser, editedAutomation, originalAutomation, isSubmitDisabled, xlsxSettings, pdfSettings, csvSettings, csvRawSettings, startDate, allowExternalRecipients, allowOnlyLoggedUserRecipients, validationErrorMessage, selectedAttachments, isParentValid, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, slidesTemplateIds, onSlidesTemplateIdChange, onDestinationChange, onMessageChange, onRecipientsChange, onRecurrenceChange, onEvaluationModeChange, onSubjectChange, onTitleChange, onFiltersChange, onApplyCurrentFilters, onStoreFiltersChange, onFiltersByTabChange, enableAutomationEvaluationMode, notificationChannels, selectedFilters, availableFilters, storeFilters, filtersByTab, editedFiltersByTab, automationIsValid, parametersEnabled, visibleParametersByTab, availableParametersByTab, flatTabId, onParameterAdd, onParameterChange, onParameterDelete, onParameterAddByTab, onParameterChangeByTab, onParameterDeleteByTab, applyLatest: applyLatestParameters, } = useEditScheduledEmail({
55
55
  maxAutomationsRecipients,
56
56
  externalRecipientOverride,
57
57
  defaultPdfPageSize,
@@ -159,11 +159,11 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
159
159
  }), children: [
160
160
  _jsx("div", { className: "gd-divider-with-margin" }), selectedTabId === "filters" ? (_jsx("div", { ref: filtersTabContentRef, className: "gd-schedule-dialog-tab-content", style: tabContentHeight
161
161
  ? { minHeight: `${tabContentHeight}px` }
162
- : undefined, children: _jsx(AutomationFiltersSelect, { availableFilters: availableFilters, selectedFilters: selectedFilters, onFiltersChange: onFiltersChange, storeFilters: storeFilters, onStoreFiltersChange: onStoreFiltersChange, isDashboardAutomation: !widget, overlayPositionType: OVERLAY_POSITION_TYPE, hideTitle: true, showAllFilters: true, filtersByTab: filtersByTab, editedFiltersByTab: editedFiltersByTab, onFiltersByTabChange: onFiltersByTabChange, parameters: flatTabId ? visibleParametersByTab[flatTabId] : undefined, availableParameters: flatTabId ? availableParametersByTab[flatTabId] : undefined, onParameterChange: onParameterChange, onParameterDelete: onParameterDelete, onParameterAdd: onParameterAdd, parametersByTab: visibleParametersByTab, availableParametersByTab: availableParametersByTab, onParameterChangeByTab: onParameterChangeByTab, onParameterDeleteByTab: onParameterDeleteByTab, onParameterAddByTab: onParameterAddByTab, parametersEnabled: parametersEnabled }) })) : (_jsxs("div", { ref: generalTabContentRef, className: "gd-schedule-dialog-tab-content", children: [!widget && hasMultipleTabs ? (_jsx(Message, { type: "progress", className: "gd-schedule-dialog-tab-content-info", children: intl.formatMessage({
162
+ : undefined, children: _jsx(AutomationFiltersSelect, { availableFilters: availableFilters, selectedFilters: selectedFilters, onFiltersChange: onFiltersChange, storeFilters: storeFilters, onStoreFiltersChange: onStoreFiltersChange, isDashboardAutomation: !widget, overlayPositionType: OVERLAY_POSITION_TYPE, hideTitle: true, showAllFilters: true, filtersByTab: filtersByTab, editedFiltersByTab: editedFiltersByTab, onFiltersByTabChange: onFiltersByTabChange, parameters: flatTabId ? visibleParametersByTab[flatTabId] : undefined, availableParameters: flatTabId ? availableParametersByTab[flatTabId] : undefined, onParameterChange: onParameterChange, onParameterDelete: onParameterDelete, onParameterAdd: onParameterAdd, parametersByTab: visibleParametersByTab, availableParametersByTab: availableParametersByTab, onParameterChangeByTab: onParameterChangeByTab, onParameterDeleteByTab: onParameterDeleteByTab, onParameterAddByTab: onParameterAddByTab, parametersEnabled: parametersEnabled }) })) : (_jsxs("div", { ref: generalTabContentRef, className: "gd-schedule-dialog-tab-content", children: [!widget && tabIds.length > 1 ? (_jsx(Message, { type: "progress", className: "gd-schedule-dialog-tab-content-info", children: intl.formatMessage({
163
163
  id: "dialogs.schedule.email.tabs.info",
164
164
  }) })) : null, _jsx(RecurrenceForm, { startDate: startDate, cronExpression: editedAutomation.schedule?.cron ??
165
165
  getDefaultCronExpression(startDate), cronDescription: editedAutomation.schedule?.cronDescription, timezone: editedAutomation.schedule?.timezone ??
166
- TIMEZONE_DEFAULT.identifier, dateFormat: dateFormat ?? "MM/dd/yyyy", locale: locale, weekStart: weekStart, onChange: onRecurrenceChange, allowHourlyRecurrence: allowHourlyRecurrence, isWhiteLabeled: isWhiteLabeled, closeDropdownsOnParentScroll: CLOSE_ON_PARENT_SCROLL, onKeyDownSubmit: handleSubmitForm }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(DestinationSelect, { notificationChannels: notificationChannels, selectedItemId: editedAutomation.notificationChannel, onChange: onDestinationChange, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL, overlayPositionType: OVERLAY_POSITION_TYPE }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(RecipientsSelect, { id: "schedule.email.recipients", loggedUser: defaultUser, users: users, usersError: usersError, value: editedAutomation.recipients ?? [], originalValue: originalAutomation.recipients || [], onChange: onRecipientsChange, allowEmptySelection: true, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxAutomationsRecipients, notificationChannels: notificationChannels, notificationChannelId: editedAutomation.notificationChannel, onKeyDownSubmit: handleSubmitForm, externalRecipientOverride: externalRecipientOverride }), isInPlatformChannel ? null : (_jsxs(_Fragment, { children: [
166
+ TIMEZONE_DEFAULT.identifier, dateFormat: dateFormat ?? "MM/dd/yyyy", locale: locale, weekStart: weekStart, onChange: onRecurrenceChange, allowHourlyRecurrence: allowHourlyRecurrence, isWhiteLabeled: isWhiteLabeled, closeDropdownsOnParentScroll: CLOSE_ON_PARENT_SCROLL, onKeyDownSubmit: handleSubmitForm }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(DestinationSelect, { notificationChannels: notificationChannels, selectedItemId: editedAutomation.notificationChannel, onChange: onDestinationChange, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL, overlayPositionType: OVERLAY_POSITION_TYPE }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(RecipientsSelect, { id: "schedule.email.recipients", loggedUser: defaultUser, value: editedAutomation.recipients ?? [], originalValue: originalAutomation.recipients || [], onChange: onRecipientsChange, allowEmptySelection: true, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxAutomationsRecipients, notificationChannels: notificationChannels, notificationChannelId: editedAutomation.notificationChannel, onKeyDownSubmit: handleSubmitForm, externalRecipientOverride: externalRecipientOverride }), isInPlatformChannel ? null : (_jsxs(_Fragment, { children: [
167
167
  _jsx(SubjectForm, { dashboardTitle: dashboardTitle, editedAutomation: editedAutomation, onChange: onSubjectChange, onKeyDownSubmit: handleSaveScheduledEmail, isSubmitDisabled: isSubmitDisabled }), _jsx(MessageForm, { onChange: onMessageChange, value: editedAutomation.details?.message ?? "" })
168
168
  ] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, isAccessibilityModeEnabled: isAccessibilityModeEnabled, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
169
169
  "gd-notifications-channels-dialog-error-scrollable": true,
@@ -1,15 +1,6 @@
1
1
  import { type KeyboardEvent } from "react";
2
- import { type IAutomationRecipient, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWorkspaceUser } from "@gooddata/sdk-model";
3
- import { type GoodDataSdkError } from "@gooddata/sdk-ui";
2
+ import { type IAutomationRecipient, type INotificationChannelIdentifier, type INotificationChannelMetadataObject } from "@gooddata/sdk-model";
4
3
  interface IRecipientsSelectProps {
5
- /**
6
- * Users to select from
7
- */
8
- users: IWorkspaceUser[];
9
- /**
10
- * Error occurred while loading users
11
- */
12
- usersError?: GoodDataSdkError;
13
4
  /**
14
5
  * Currently selected recipients.
15
6
  */
@@ -25,7 +16,7 @@ interface IRecipientsSelectProps {
25
16
  /**
26
17
  * Currently logged in user as a recipient
27
18
  */
28
- loggedUser?: IWorkspaceUser;
19
+ loggedUser?: IAutomationRecipient;
29
20
  /**
30
21
  * Allow to select only me as a recipient
31
22
  */
@@ -71,6 +62,6 @@ interface IRecipientsSelectProps {
71
62
  */
72
63
  externalRecipientOverride?: string;
73
64
  }
74
- export declare function RecipientsSelect({ id, users, usersError, value, originalValue, onChange, loggedUser, allowEmptySelection, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxRecipients, className, notificationChannels, notificationChannelId, showLabel, onKeyDownSubmit, externalRecipientOverride }: IRecipientsSelectProps): import("react/jsx-runtime").JSX.Element;
65
+ export declare function RecipientsSelect({ id, value, originalValue, onChange, loggedUser, allowEmptySelection, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxRecipients, className, notificationChannels, notificationChannelId, showLabel, onKeyDownSubmit, externalRecipientOverride }: IRecipientsSelectProps): import("react/jsx-runtime").JSX.Element;
75
66
  export {};
76
67
  //# sourceMappingURL=RecipientsSelect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecipientsSelect.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAkC,MAAM,OAAO,CAAC;AAK3E,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAQzD,UAAU,sBAAsB;IAC5B;;OAEG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;OAEG;IACH,aAAa,EAAE,oBAAoB,EAAE,CAAC;IAEtC;;OAEG;IACH,QAAQ,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAE5D;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,EAAE,EACF,KAAK,EACL,UAAU,EACV,KAAK,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,SAAgB,EAChB,eAAe,EACf,yBAAyB,EAC5B,EAAE,sBAAsB,2CAoExB"}
1
+ {"version":3,"file":"RecipientsSelect.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAIpD,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAC1C,MAAM,qBAAqB,CAAC;AAU7B,UAAU,sBAAsB;IAC5B;;OAEG;IACH,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;OAEG;IACH,aAAa,EAAE,oBAAoB,EAAE,CAAC;IAEtC;;OAEG;IACH,QAAQ,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAE5D;;OAEG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAElC;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,EAAE,EACF,KAAK,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,SAAgB,EAChB,eAAe,EACf,yBAAyB,EAC5B,EAAE,sBAAsB,2CAwExB"}
@@ -1,26 +1,28 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2019-2026 GoodData Corporation
3
- import { useCallback, useMemo, useState } from "react";
3
+ import { useMemo } from "react";
4
4
  import { sortBy } from "lodash-es";
5
+ import { DETAILED_ANNOUNCEMENT_THRESHOLD, UiSearchResultsAnnouncement } from "@gooddata/sdk-ui-kit";
5
6
  import { convertUserToAutomationRecipient } from "../../../../shared/utils/automationUtils.js";
6
- import { createUser, matchUser } from "../../../utils/users.js";
7
+ import { createUser, matchRecipient } from "../../../utils/users.js";
7
8
  import { isEmail } from "../../../utils/validate.js";
8
9
  import { RecipientsSelectRenderer } from "./RecipientsSelectRenderer.js";
9
- export function RecipientsSelect({ id, users, usersError, value, originalValue, onChange, loggedUser, allowEmptySelection, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxRecipients, className, notificationChannels, notificationChannelId, showLabel = true, onKeyDownSubmit, externalRecipientOverride, }) {
10
- const [search, setSearch] = useState();
11
- const notificationChannel = useMemo(() => {
12
- return notificationChannels?.find((channel) => channel.id === notificationChannelId);
13
- }, [notificationChannelId, notificationChannels]);
10
+ import { useWorkspaceUsersSearch } from "./useWorkspaceUsersSearch.js";
11
+ export function RecipientsSelect({ id, value, originalValue, onChange, loggedUser, allowEmptySelection, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxRecipients, className, notificationChannels, notificationChannelId, showLabel = true, onKeyDownSubmit, externalRecipientOverride, }) {
12
+ const isServerSearch = !externalRecipientOverride && !allowOnlyLoggedUserRecipients;
13
+ const { search, users, usersError, isLoading, onSearch, onActivate } = useWorkspaceUsersSearch({
14
+ enabled: isServerSearch,
15
+ });
16
+ const notificationChannel = notificationChannels?.find((channel) => channel.id === notificationChannelId);
14
17
  const options = useMemo(() => {
15
18
  if (externalRecipientOverride) {
16
19
  return search && isEmail(search) && allowExternalRecipients ? [createUser(search)] : [];
17
20
  }
18
- const validUsers = [
19
- ...(allowOnlyLoggedUserRecipients ? [] : users),
20
- ...(allowOnlyLoggedUserRecipients && loggedUser ? [loggedUser] : []),
21
- ];
22
- const filteredUsers = search ? validUsers.filter((user) => matchUser(user, search)) : validUsers;
23
- const mappedUsers = sortBy(filteredUsers?.map(convertUserToAutomationRecipient) ?? [], "user.email");
21
+ const mappedUsers = allowOnlyLoggedUserRecipients
22
+ ? loggedUser && matchRecipient(loggedUser, search)
23
+ ? [loggedUser]
24
+ : []
25
+ : sortBy((users ?? []).map(convertUserToAutomationRecipient), "email");
24
26
  // If there is no user found and the search is an email, add it as an external recipient
25
27
  if (search && mappedUsers.length === 0 && isEmail(search) && allowExternalRecipients) {
26
28
  mappedUsers.push(createUser(search));
@@ -34,11 +36,9 @@ export function RecipientsSelect({ id, users, usersError, value, originalValue,
34
36
  allowExternalRecipients,
35
37
  externalRecipientOverride,
36
38
  ]);
37
- const onLoadHandler = useCallback((queryOptions) => {
38
- setSearch(queryOptions?.search);
39
- }, [setSearch]);
40
- const loggedUserPrepared = useMemo(() => {
41
- return loggedUser ? convertUserToAutomationRecipient(loggedUser) : undefined;
42
- }, [loggedUser]);
43
- return (_jsx(RecipientsSelectRenderer, { id: id, canListUsersInProject: true, isMulti: true, options: options, value: value, originalValue: originalValue, onChange: onChange, onLoad: onLoadHandler, loggedUser: loggedUserPrepared, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowEmptySelection: allowEmptySelection, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxRecipients, className: className, notificationChannel: notificationChannel, usersError: usersError, showLabel: showLabel, onKeyDownSubmit: onKeyDownSubmit, externalRecipientOverride: externalRecipientOverride }));
39
+ const hasSettledResults = !isLoading && (isServerSearch ? users !== undefined : Boolean(search));
40
+ const announcedResultValues = useMemo(() => options.slice(0, DETAILED_ANNOUNCEMENT_THRESHOLD).map((option) => option.name ?? option.id), [options]);
41
+ return (_jsxs(_Fragment, { children: [
42
+ _jsx(UiSearchResultsAnnouncement, { totalResults: hasSettledResults ? options.length : undefined, resultValues: announcedResultValues }), _jsx(RecipientsSelectRenderer, { id: id, canListUsersInProject: true, isMulti: true, options: options, value: value, originalValue: originalValue, onChange: onChange, onSearch: onSearch, onActivate: onActivate, isLoading: isLoading, loggedUser: loggedUser, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowEmptySelection: allowEmptySelection, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxRecipients, className: className, notificationChannel: notificationChannel, usersError: usersError, showLabel: showLabel, onKeyDownSubmit: onKeyDownSubmit, externalRecipientOverride: externalRecipientOverride })
43
+ ] }));
44
44
  }
@@ -1,5 +1,4 @@
1
1
  import { type KeyboardEvent } from "react";
2
- import { type IWorkspaceUsersQueryOptions } from "@gooddata/sdk-backend-spi";
3
2
  import { type IAutomationRecipient, type INotificationChannelIdentifier, type INotificationChannelMetadataObject } from "@gooddata/sdk-model";
4
3
  import { type GoodDataSdkError } from "@gooddata/sdk-ui";
5
4
  export interface IRecipientsSelectRendererProps {
@@ -24,9 +23,13 @@ export interface IRecipientsSelectRendererProps {
24
23
  */
25
24
  onChange?: (selectedUsers: IAutomationRecipient[]) => void;
26
25
  /**
27
- * Callback to load autocomplete options.
26
+ * Callback to be called when the search text changes.
28
27
  */
29
- onLoad?: (queryOptions?: IWorkspaceUsersQueryOptions) => void;
28
+ onSearch: (search: string) => void;
29
+ /**
30
+ * Callback to be called on menu open to start (or retry) loading options.
31
+ */
32
+ onActivate: () => void;
30
33
  /**
31
34
  * Show autocomplete loading indicator?
32
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"RecipientsSelectRenderer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAQrB,MAAM,OAAO,CAAC;AAiBf,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAE1C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,kBAAkB,CAAC;AAgG1B,MAAM,WAAW,8BAA8B;IAC3C;;OAEG;IACH,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;OAEG;IACH,aAAa,EAAE,oBAAoB,EAAE,CAAC;IAEtC;;OAEG;IACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAE9D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAElC;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IAExC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,8BAA8B,GAAG,kCAAkC,CAAC;IAE1F;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAQD,eAAO,MAAM,wBAAwB,sEAwxBnC,CAAC"}
1
+ {"version":3,"file":"RecipientsSelectRenderer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.tsx"],"names":[],"mappings":"AAEA,OA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B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAQD,eAAO,MAAM,wBAAwB,sEA+vBnC,CAAC"}
@@ -1,18 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2019-2026 GoodData Corporation
3
- import { memo, useCallback, useEffect, useMemo, useRef, useState, } from "react";
3
+ import { memo, useCallback, useEffect, useRef, useState } from "react";
4
4
  import cx from "classnames";
5
- import { debounce, isEmpty, isEqual } from "lodash-es";
5
+ import { isEmpty } from "lodash-es";
6
6
  import { FormattedMessage, useIntl } from "react-intl";
7
7
  import ReactSelect, { components as ReactSelectComponents, } from "react-select";
8
8
  import { isAutomationUserRecipient, } from "@gooddata/sdk-model";
9
9
  import { ValidationContextStore, createInvalidDatapoint, createInvalidNode, useValidationContextValue, } from "@gooddata/sdk-ui";
10
10
  import { LoadingMask, Message, Overlay, OverlayController, OverlayControllerProvider, UiIcon, UiTooltip, isEscapeKey, makeKeyboardNavigation, } from "@gooddata/sdk-ui-kit";
11
11
  import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../../../constants/zIndex.js";
12
- import { matchRecipient } from "../../../utils/users.js";
13
12
  import { isEmail } from "../../../utils/validate.js";
14
13
  const MAXIMUM_RECIPIENTS_RECEIVE = 60;
15
- const DELAY_TIME = 500;
16
14
  const PADDING = 16;
17
15
  const LOADING_MENU_HEIGHT = 50;
18
16
  const CREATE_OPTION = "create-option";
@@ -66,7 +64,7 @@ function getRecipientTooltipConfig(options, label) {
66
64
  return null;
67
65
  }
68
66
  export const RecipientsSelectRenderer = memo(function RecipientsSelectRenderer(props) {
69
- const { isMulti, options, value, maxRecipients, className, usersError, allowOnlyLoggedUserRecipients, id, externalRecipientOverride, allowExternalRecipients, loggedUser, notificationChannel, showLabel, onChange, onLoad, isLoading, canListUsersInProject, allowEmptySelection, onKeyDownSubmit, } = props;
67
+ const { isMulti, options, value, maxRecipients, className, usersError, allowOnlyLoggedUserRecipients, id, externalRecipientOverride, allowExternalRecipients, loggedUser, notificationChannel, showLabel, onChange, onSearch, onActivate, isLoading, canListUsersInProject, allowEmptySelection, onKeyDownSubmit, } = props;
70
68
  const [state, setState] = useState({
71
69
  menuOpen: false,
72
70
  minRecipientsError: false,
@@ -429,29 +427,18 @@ export const RecipientsSelectRenderer = memo(function RecipientsSelectRenderer(p
429
427
  setState((prev) => ({ ...prev, minRecipientsError: true }));
430
428
  }
431
429
  }, [allowEmptySelection, value.length]);
432
- const isRecipientAddedFn = useCallback((value, searchKey) => {
433
- return value.some((recipient) => isEqual(recipient.id, searchKey));
434
- }, []);
435
- const loadUserListItems = useCallback((searchString) => {
436
- const isRecipientAdded = isRecipientAddedFn(value, searchString);
437
- if (!canListUsersInProject || isRecipientAdded) {
430
+ const handleSearchChange = useCallback((searchString) => {
431
+ if (!canListUsersInProject) {
438
432
  return;
439
433
  }
440
- onLoad?.({ search: searchString });
441
- }, [isRecipientAddedFn, value, canListUsersInProject, onLoad]);
434
+ onSearch(searchString);
435
+ }, [canListUsersInProject, onSearch]);
442
436
  const onMenuOpen = useCallback(() => {
443
- const userListCount = options.length;
444
437
  setState((prev) => ({ ...prev, menuOpen: true, focusedRecipientIndex: -1 }));
445
- if (!userListCount && canListUsersInProject) {
446
- onLoad?.();
438
+ if (canListUsersInProject) {
439
+ onActivate();
447
440
  }
448
- }, [options.length, canListUsersInProject, onLoad]);
449
- const onSearchCore = useCallback((searchString) => {
450
- loadUserListItems(searchString);
451
- }, [loadUserListItems]);
452
- const onSearch = useMemo(() => debounce((searchString) => {
453
- onSearchCore(searchString);
454
- }, DELAY_TIME), [onSearchCore]);
441
+ }, [canListUsersInProject, onActivate]);
455
442
  const creatableSelectComponent = {
456
443
  ...ReactSelectComponents,
457
444
  IndicatorsContainer: renderEmptyContainer,
@@ -510,10 +497,10 @@ export const RecipientsSelectRenderer = memo(function RecipientsSelectRenderer(p
510
497
  return (_jsx(ValidationContextStore, { value: validationContextValue, children: _jsxs("div", { className: cx("gd-input-component gd-recipients-field s-gd-notifications-channels-dialog-recipients", className), children: [showLabel ? (_jsx("label", { htmlFor: id, className: "gd-label", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.recipients.label" }) })) : null, _jsxs("div", { ref: recipientRef, className: "gd-input s-gd-recipients-value", children: [
511
498
  _jsx(ReactSelect, { tabSelectsValue: false, inputId: id, className: cx("gd-recipients-container", {
512
499
  "gd-input-component--invalid": !isValid,
513
- }), classNamePrefix: "gd-recipients", components: creatableSelectComponent, formatOptionLabel: renderOptionLabel, filterOption: (opt, value) => {
514
- return matchRecipient(opt.data, value);
515
- }, isClearable: false, isDisabled: !isMulti, isMulti: isMulti, onChange:
500
+ }), classNamePrefix: "gd-recipients", components: creatableSelectComponent, formatOptionLabel: renderOptionLabel,
501
+ // Options arrive pre-filtered (server search, or the owner's options memo).
502
+ filterOption: null, isClearable: false, isDisabled: !isMulti, isMulti: isMulti, onChange:
516
503
  // using as any as it would be too tricky to type properly
517
- handleOnChange, onInputChange: onSearch, onMenuOpen: onMenuOpen, onMenuClose: () => setState((prev) => ({ ...prev, menuOpen: false })), onKeyDown: handleKeyDown, options: options, onBlur: onBlur, value: value, getOptionValue: (o) => o.id, getOptionLabel: (o) => o.name || o.id, "aria-describedby": isValid ? undefined : "gd-recipients-field-error", "aria-invalid": !isValid }), isValid ? (renderExternalRecipientsNote ? (_jsx("div", { className: "gd-recipients-field-note", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.recipients.note" }) })) : allowOnlyLoggedUserRecipients ? (_jsx("div", { className: "gd-recipients-field-note", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.destinationWarning" }) })) : null) : (_jsx("div", { id: "gd-recipients-field-error", className: "gd-recipients-field-error", children: getInvalidDatapoints().map((invalidDatapoint) => (_jsx("div", { id: invalidDatapoint.id, className: "gd-recipients-field-error-item", children: invalidDatapoint.message }, invalidDatapoint.id))) }))] })
504
+ handleOnChange, onInputChange: handleSearchChange, onMenuOpen: onMenuOpen, onMenuClose: () => setState((prev) => ({ ...prev, menuOpen: false })), onKeyDown: handleKeyDown, options: options, onBlur: onBlur, value: value, getOptionValue: (o) => o.id, getOptionLabel: (o) => o.name || o.id, "aria-describedby": isValid ? undefined : "gd-recipients-field-error", "aria-invalid": !isValid }), isValid ? (renderExternalRecipientsNote ? (_jsx("div", { className: "gd-recipients-field-note", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.recipients.note" }) })) : allowOnlyLoggedUserRecipients ? (_jsx("div", { className: "gd-recipients-field-note", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.destinationWarning" }) })) : null) : (_jsx("div", { id: "gd-recipients-field-error", className: "gd-recipients-field-error", children: getInvalidDatapoints().map((invalidDatapoint) => (_jsx("div", { id: invalidDatapoint.id, className: "gd-recipients-field-error-item", children: invalidDatapoint.message }, invalidDatapoint.id))) }))] })
518
505
  ] }) }));
519
506
  });
@@ -0,0 +1,13 @@
1
+ import { type IWorkspaceUser } from "@gooddata/sdk-model";
2
+ import { type GoodDataSdkError } from "@gooddata/sdk-ui";
3
+ export declare function useWorkspaceUsersSearch({ enabled }: {
4
+ enabled: boolean;
5
+ }): {
6
+ search: string;
7
+ users: IWorkspaceUser[] | undefined;
8
+ usersError: GoodDataSdkError | undefined;
9
+ isLoading: boolean;
10
+ onSearch: (search: string) => void;
11
+ onActivate: () => void;
12
+ };
13
+ //# sourceMappingURL=useWorkspaceUsersSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWorkspaceUsersSearch.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EACH,KAAK,gBAAgB,EAMxB,MAAM,kBAAkB,CAAC;AAK1B,wBAAgB,uBAAuB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACpC,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B,CAoDA"}
@@ -0,0 +1,44 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useCallback, useMemo, useState } from "react";
3
+ import { convertError, useBackendStrict, useCancelablePromise, useDebouncedState, useWorkspaceStrict, } from "@gooddata/sdk-ui";
4
+ const USERS_PAGE_SIZE = 50;
5
+ const SEARCH_DEBOUNCE = 300;
6
+ export function useWorkspaceUsersSearch({ enabled }) {
7
+ const backend = useBackendStrict();
8
+ const workspace = useWorkspaceStrict();
9
+ const [search, setSearch, debouncedSearch] = useDebouncedState("", SEARCH_DEBOUNCE);
10
+ const [active, setActive] = useState(false);
11
+ const [retryCount, setRetryCount] = useState(0);
12
+ const { result: users, error, status, } = useCancelablePromise({
13
+ promise: !enabled || !active
14
+ ? null
15
+ : async () => {
16
+ const page = await backend
17
+ .workspace(workspace)
18
+ .users()
19
+ .withOptions({
20
+ search: debouncedSearch || undefined,
21
+ limit: USERS_PAGE_SIZE,
22
+ })
23
+ .query();
24
+ return page.items;
25
+ },
26
+ }, [backend, workspace, debouncedSearch, retryCount, enabled, active]);
27
+ const handleActivate = useCallback(() => {
28
+ setActive(true);
29
+ if (error) {
30
+ setRetryCount((current) => current + 1);
31
+ }
32
+ }, [error]);
33
+ const usersError = useMemo(() => (error === undefined ? undefined : convertError(error)), [error]);
34
+ // The debounce window counts as loading
35
+ const isDebouncing = enabled && search !== debouncedSearch;
36
+ return {
37
+ users,
38
+ isLoading: isDebouncing || status === "loading",
39
+ usersError,
40
+ search,
41
+ onSearch: setSearch,
42
+ onActivate: handleActivate,
43
+ };
44
+ }
@@ -33,14 +33,12 @@ export declare function useEditScheduledEmail({ maxAutomationsRecipients, extern
33
33
  onStoreFiltersChange: (value: boolean, filters?: import("@gooddata/sdk-model").FilterContextItem[] | undefined, filtersByTabParam?: Record<string, import("@gooddata/sdk-model").FilterContextItem[]> | undefined) => void;
34
34
  automationIsValid: boolean;
35
35
  filtersAreStale: boolean;
36
- defaultUser: import("@gooddata/sdk-model").IWorkspaceUser;
36
+ defaultUser: import("@gooddata/sdk-model").IAutomationRecipient;
37
37
  areDashboardFiltersChanged: boolean;
38
38
  originalAutomation: import("@gooddata/sdk-model").IAutomationMetadataObjectDefinition;
39
39
  editedAutomation: import("@gooddata/sdk-model").IAutomationMetadataObjectDefinition;
40
40
  isCronValid: boolean;
41
41
  notificationChannels: import("@gooddata/sdk-model").INotificationChannelIdentifier[] | import("@gooddata/sdk-model").INotificationChannelMetadataObject[];
42
- users: import("@gooddata/sdk-model").IWorkspaceUser[];
43
- usersError: import("@gooddata/sdk-ui").GoodDataSdkError | undefined;
44
42
  isDashboardExportSelected: boolean;
45
43
  isCsvExportSelected: boolean;
46
44
  isXlsxExportSelected: boolean;