@gooddata/sdk-ui-dashboard 11.48.0-alpha.1 → 11.48.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/automation/index.d.ts +7 -9
- package/esm/_staging/automation/index.d.ts.map +1 -1
- package/esm/_staging/automation/index.js +22 -12
- package/esm/kdaDialog/composition/KdaAttributesDropdown.d.ts +15 -0
- package/esm/kdaDialog/composition/KdaAttributesDropdown.d.ts.map +1 -0
- package/esm/kdaDialog/composition/KdaAttributesDropdown.js +66 -0
- package/esm/kdaDialog/composition/KdaAttributesSelectItem.d.ts +14 -0
- package/esm/kdaDialog/composition/KdaAttributesSelectItem.d.ts.map +1 -0
- package/esm/kdaDialog/composition/KdaAttributesSelectItem.js +33 -0
- package/esm/kdaDialog/composition/KeyDriversFooter.d.ts.map +1 -1
- package/esm/kdaDialog/composition/KeyDriversFooter.js +24 -78
- package/esm/kdaDialog/composition/hooks/useKdaAttributesSelection.d.ts +15 -0
- package/esm/kdaDialog/composition/hooks/useKdaAttributesSelection.d.ts.map +1 -0
- package/esm/kdaDialog/composition/hooks/useKdaAttributesSelection.js +51 -0
- package/esm/kdaDialog/composition/hooks/useKdaValidAttributes.d.ts +9 -0
- package/esm/kdaDialog/composition/hooks/useKdaValidAttributes.d.ts.map +1 -0
- package/esm/kdaDialog/composition/hooks/useKdaValidAttributes.js +45 -0
- package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.d.ts +10 -3
- package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.js +5 -4
- package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.js +11 -2
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts +9 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.js +4 -4
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +9 -2
- package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.js +11 -2
- package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.js +47 -13
- package/esm/model/react/useExportTemplates.d.ts +7 -2
- package/esm/model/react/useExportTemplates.d.ts.map +1 -1
- package/esm/model/react/useExportTemplates.js +50 -6
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +10 -11
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +0 -20
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +8 -34
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts +20 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.js +16 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +12 -8
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +2 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +2 -2
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +1 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts +20 -17
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.js +57 -40
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts +3 -3
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts +2 -2
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js +3 -3
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +9 -5
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts +2 -2
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +13 -5
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts +3 -3
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.js +18 -10
- package/esm/presentation/automations/shared/automationFilters/useParameterAnnouncements.d.ts +2 -2
- package/esm/presentation/automations/shared/automationFilters/useParameterAnnouncements.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/selectionMode/SelectionModeItem.js +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/selectionType/SelectionTypeItem.js +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +13 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +17 -5
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +6 -2
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +5 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +5 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +5 -1
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.d.ts +1 -1
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.js +6 -7
- package/esm/sdk-ui-dashboard.d.ts +1 -1
- package/package.json +21 -21
- package/styles/css/kdaDialog.css +30 -9
- package/styles/css/kdaDialog.css.map +1 -1
- package/styles/css/main.css +33 -22
- package/styles/css/main.css.map +1 -1
- package/styles/css/topBar.css +3 -13
- package/styles/css/topBar.css.map +1 -1
- package/styles/scss/kdaDialog.scss +30 -9
- package/styles/scss/topBar.scss +3 -15
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { type IExecutionDefinition, type IExportDefinitionVisualizationObjectRequestPayload, type IInsight, type IInsightParameterValue } from "@gooddata/sdk-model";
|
|
2
2
|
import { type ExtendedDashboardWidget } from "../../types/layoutTypes.js";
|
|
3
|
-
export declare function prepareCsvRawExecutionDefinition(executionDefinition
|
|
3
|
+
export declare function prepareCsvRawExecutionDefinition({ executionDefinition, csvRawRequest, insight, insightParameterValues, enableStringParameters, widget, commonDateFilterId }: {
|
|
4
|
+
executionDefinition: IExecutionDefinition | undefined;
|
|
5
|
+
csvRawRequest: IExportDefinitionVisualizationObjectRequestPayload;
|
|
6
|
+
insight: IInsight | undefined;
|
|
7
|
+
insightParameterValues: IInsightParameterValue[];
|
|
8
|
+
enableStringParameters: boolean;
|
|
9
|
+
widget: ExtendedDashboardWidget | undefined;
|
|
10
|
+
commonDateFilterId: string | undefined;
|
|
11
|
+
}): IExecutionDefinition | undefined;
|
|
4
12
|
//# sourceMappingURL=csvRawExecutionDefinition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csvRawExecutionDefinition.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,oBAAoB,EACzB,KAAK,kDAAkD,EAEvD,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAM9B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,wBAAgB,gCAAgC,
|
|
1
|
+
{"version":3,"file":"csvRawExecutionDefinition.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,oBAAoB,EACzB,KAAK,kDAAkD,EAEvD,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAM9B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,wBAAgB,gCAAgC,CAAC,EAC7C,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,EACN,kBAAkB,EACrB,EAAE;IACC,mBAAmB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACtD,aAAa,EAAE,kDAAkD,CAAC;IAClE,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;IACjD,sBAAsB,EAAE,OAAO,CAAC;IAChC,MAAM,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C,GAAG,oBAAoB,GAAG,SAAS,CAanC"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { isFilter, isFilterContextItem, isWidget, mergeFilters, objRefToString, } from "@gooddata/sdk-model";
|
|
3
3
|
import { exportParametersToValues } from "../../../_staging/automation/index.js";
|
|
4
4
|
import { filterContextItemsToDashboardFiltersByWidget } from "../../../converters/filterConverters.js";
|
|
5
|
-
export function prepareCsvRawExecutionDefinition(executionDefinition, csvRawRequest, insight, insightParameterValues, widget, commonDateFilterId) {
|
|
5
|
+
export function prepareCsvRawExecutionDefinition({ executionDefinition, csvRawRequest, insight, insightParameterValues, enableStringParameters, widget, commonDateFilterId, }) {
|
|
6
6
|
if (!executionDefinition) {
|
|
7
7
|
return executionDefinition;
|
|
8
8
|
}
|
|
9
9
|
const withFilters = applyExportFilters(executionDefinition, csvRawRequest, insight, widget, commonDateFilterId);
|
|
10
|
-
return applyExportParameters(withFilters, csvRawRequest, insightParameterValues);
|
|
10
|
+
return applyExportParameters(withFilters, csvRawRequest, insightParameterValues, enableStringParameters);
|
|
11
11
|
}
|
|
12
12
|
function applyExportFilters(executionDefinition, csvRawRequest, insight, widget, commonDateFilterId) {
|
|
13
13
|
const filters = csvRawRequest?.content?.filters;
|
|
@@ -27,9 +27,9 @@ function applyExportFilters(executionDefinition, csvRawRequest, insight, widget,
|
|
|
27
27
|
}
|
|
28
28
|
// Dialog overrides (`parametersByTab`) on top of the caller-resolved insight base. The base comes
|
|
29
29
|
// from a selector, not the live execution, whose no-data fallback (`newDefForInsight`) has no params.
|
|
30
|
-
function applyExportParameters(executionDefinition, csvRawRequest, insightParameterValues) {
|
|
30
|
+
function applyExportParameters(executionDefinition, csvRawRequest, insightParameterValues, enableStringParameters) {
|
|
31
31
|
const stored = Object.values(csvRawRequest?.content?.parametersByTab ?? {}).flat();
|
|
32
|
-
const parameterValues = mergeParameterValues(insightParameterValues, exportParametersToValues(stored));
|
|
32
|
+
const parameterValues = mergeParameterValues(insightParameterValues, exportParametersToValues(stored, enableStringParameters));
|
|
33
33
|
if (parameterValues.length === 0) {
|
|
34
34
|
return executionDefinition;
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeAutomationsHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAgD/C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"initializeAutomationsHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAgD/C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAqC/E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,sBAAsB,GAC7B,YAAY,CA+Sd"}
|
|
@@ -14,7 +14,7 @@ import { switchDashboardTab } from "../../commands/tabs.js";
|
|
|
14
14
|
import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
|
|
15
15
|
import { selectAutomationsIsInitialized, selectAutomationsIsLoading, } from "../../store/automations/automationsSelectors.js";
|
|
16
16
|
import { automationsActions } from "../../store/automations/index.js";
|
|
17
|
-
import { selectEnableArbitraryFilterKD, selectEnableMatchFilterKD, selectEnableNotificationChannelIdentifiers, selectEnableParameters, selectExternalRecipient, selectFocusObject, selectIsExport, selectIsReadOnly, selectOpenAutomationOnLoad, } from "../../store/config/configSelectors.js";
|
|
17
|
+
import { selectEnableArbitraryFilterKD, selectEnableMatchFilterKD, selectEnableNotificationChannelIdentifiers, selectEnableParameters, selectEnableStringParameters, selectExternalRecipient, selectFocusObject, selectIsExport, selectIsReadOnly, selectOpenAutomationOnLoad, } from "../../store/config/configSelectors.js";
|
|
18
18
|
import { selectInsightByWidgetRef } from "../../store/insights/insightsSelectors.js";
|
|
19
19
|
import { selectDashboardId } from "../../store/meta/metaSelectors.js";
|
|
20
20
|
import { notificationChannelsActions } from "../../store/notificationChannels/index.js";
|
|
@@ -164,7 +164,14 @@ export function* initializeAutomationsHandler(ctx, _cmd) {
|
|
|
164
164
|
// Restore the automation's stored parameter overrides, mirroring the filter restoration
|
|
165
165
|
// above: alert params apply to the active tab, export params apply per tab.
|
|
166
166
|
const enableParameters = yield select(selectEnableParameters);
|
|
167
|
-
const
|
|
167
|
+
const enableStringParameters = yield select(selectEnableStringParameters);
|
|
168
|
+
const parameterChanges = extractAutomationParameterChanges({
|
|
169
|
+
enableParameters,
|
|
170
|
+
enableStringParameters,
|
|
171
|
+
alertParameters: getAutomationAlertParameters(targetAutomation),
|
|
172
|
+
exportParametersByTab: getAutomationExportParametersByTab(targetAutomation),
|
|
173
|
+
correlationId: automationId,
|
|
174
|
+
});
|
|
168
175
|
for (const change of parameterChanges) {
|
|
169
176
|
yield call(changeParameterValuesHandler, ctx, changeParameterValues(change));
|
|
170
177
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saveScheduledEmailHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAwB/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,KAAK,6BAA6B,EAAuB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"saveScheduledEmailHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAwB/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,KAAK,6BAA6B,EAAuB,MAAM,gCAAgC,CAAC;AAkBzG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAqBnE,wBAAiB,yBAAyB,CACtC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,GACzB,YAAY,CAAC,6BAA6B,CAAC,CAkG7C"}
|
|
@@ -5,7 +5,7 @@ import { fillMissingTitles, resolveDefaultDisplayFormRefForDisplayForm, resolveM
|
|
|
5
5
|
import { scheduledEmailSaved } from "../../events/scheduledEmail.js";
|
|
6
6
|
import { queryWithInsight } from "../../queryServices/queryWidgetFilters.js";
|
|
7
7
|
import { selectCatalogAttributes } from "../../store/catalog/catalogSelectors.js";
|
|
8
|
-
import { selectLocale, selectSettings } from "../../store/config/configSelectors.js";
|
|
8
|
+
import { selectEnableStringParameters, selectLocale, selectSettings, } from "../../store/config/configSelectors.js";
|
|
9
9
|
import { selectExecutionResultByRef } from "../../store/executionResults/executionResultsSelectors.js";
|
|
10
10
|
import { selectAutomationCommonDateFilterId } from "../../store/filtering/dashboardFilterSelectors.js";
|
|
11
11
|
import { selectInsightByRef, selectInsightByWidgetRef, selectRawExportOverridesForInsight, } from "../../store/insights/insightsSelectors.js";
|
|
@@ -35,6 +35,7 @@ export function* saveScheduledEmailHandler(ctx, cmd) {
|
|
|
35
35
|
const commonDateFilterId = yield select(selectAutomationCommonDateFilterId);
|
|
36
36
|
const insight = yield select(selectInsightByWidgetRef(ref));
|
|
37
37
|
const insightParameterValues = yield select(selectReferencedInsightParameterValuesForWidget(ref));
|
|
38
|
+
const enableStringParameters = yield select(selectEnableStringParameters);
|
|
38
39
|
const locale = yield select(selectLocale);
|
|
39
40
|
const messages = yield call(resolveMessages, locale);
|
|
40
41
|
const lookupInsight = insight ? yield select(selectInsightByRef(insightRef(insight))) : undefined;
|
|
@@ -56,7 +57,15 @@ export function* saveScheduledEmailHandler(ctx, cmd) {
|
|
|
56
57
|
throw new Error("CSV raw widget attachment requires an available widget.");
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
const preparedExecutionDefinitionWithFilters = prepareCsvRawExecutionDefinition(
|
|
60
|
+
const preparedExecutionDefinitionWithFilters = prepareCsvRawExecutionDefinition({
|
|
61
|
+
executionDefinition: preparedExecutionDefinition,
|
|
62
|
+
csvRawRequest,
|
|
63
|
+
insight,
|
|
64
|
+
insightParameterValues,
|
|
65
|
+
enableStringParameters,
|
|
66
|
+
widget,
|
|
67
|
+
commonDateFilterId,
|
|
68
|
+
});
|
|
60
69
|
const settings = yield select(selectSettings);
|
|
61
70
|
const catalogAttributes = yield select(selectCatalogAttributes);
|
|
62
71
|
const preloadedAttributesWithReferences = yield select(selectPreloadedAttributesWithReferences);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportInsightWidgetHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/widgets/exportInsightWidgetHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"exportInsightWidgetHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/widgets/exportInsightWidgetHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAsB/C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EACH,KAAK,qCAAqC,EAG7C,MAAM,yBAAyB,CAAC;AAYjC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAsFnE,wBAAiB,0BAA0B,CACvC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,oBAAoB,GAC1B,YAAY,CAAC,qCAAqC,CAAC,CA2FrD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { call, put, select } from "redux-saga/effects";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
|
-
import { serializeObjRef } from "@gooddata/sdk-model";
|
|
5
|
-
import { createExportFunction, prepareGeoInsightForDataExport, } from "@gooddata/sdk-ui";
|
|
6
|
-
import { createExportExecutionDefinition } from "@gooddata/sdk-ui/internal";
|
|
4
|
+
import { serializeObjRef, } from "@gooddata/sdk-model";
|
|
5
|
+
import { createExportFunction, prepareGeoInsightForDataExport, prepareGeoLayerInsightsForDataExport, } from "@gooddata/sdk-ui";
|
|
6
|
+
import { createExportExecutionDefinition, } from "@gooddata/sdk-ui/internal";
|
|
7
7
|
import { invalidArgumentsProvided } from "../../events/general.js";
|
|
8
8
|
import { insightWidgetExportRequested, insightWidgetExportResolved, } from "../../events/insight.js";
|
|
9
9
|
import { selectCatalogAttributes } from "../../store/catalog/catalogSelectors.js";
|
|
@@ -18,6 +18,18 @@ async function performExport(ctx, executionResult, config, exportDefinition) {
|
|
|
18
18
|
const exporter = createExportFunction(exportExecutionResult);
|
|
19
19
|
return exporter(config);
|
|
20
20
|
}
|
|
21
|
+
async function performMultiLayerExport(ctx, layers, config) {
|
|
22
|
+
const results = await Promise.all(layers.map(({ definition }) => ctx.backend.workspace(ctx.workspace).execution().forDefinition(definition).execute()));
|
|
23
|
+
const [primaryResult, ...additionalResults] = results;
|
|
24
|
+
const exporter = createExportFunction(primaryResult);
|
|
25
|
+
return exporter({
|
|
26
|
+
...config,
|
|
27
|
+
additionalExecutions: additionalResults.map((executionResult, index) => ({
|
|
28
|
+
executionResult,
|
|
29
|
+
title: layers[index + 1].title,
|
|
30
|
+
})),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
21
33
|
function* validateIsExportable(ctx, cmd, ref) {
|
|
22
34
|
const isExportable = yield select(selectIsExecutionResultReadyForExportByRef(ref));
|
|
23
35
|
if (!isExportable) {
|
|
@@ -48,24 +60,46 @@ export function* exportInsightWidgetHandler(ctx, cmd) {
|
|
|
48
60
|
const executionEnvelope = yield select(selectExecutionResultByRef(ref));
|
|
49
61
|
// executionResult must be defined at this point
|
|
50
62
|
invariant(executionEnvelope?.executionResult);
|
|
63
|
+
const executionResult = executionEnvelope.executionResult;
|
|
51
64
|
const insight = payloadInsight ?? (yield select(selectInsightByWidgetRef(ref)));
|
|
52
65
|
const settings = yield select(selectSettings);
|
|
53
66
|
const catalogAttributes = yield select(selectCatalogAttributes);
|
|
54
67
|
const preloadedAttributesWithReferences = yield select(selectPreloadedAttributesWithReferences);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
const buildLayerDefinition = (tableInsight, definitionOptions) => createExportExecutionDefinition(tableInsight, ctx.workspace, executionResult.definition, definitionOptions);
|
|
69
|
+
// Per-layer export is defined for XLSX (sheet per layer) and CSV (zipped file per layer) only;
|
|
70
|
+
// other formats (PDF) keep the original single-execution behavior.
|
|
71
|
+
const isMultiLayerExportFormat = config.format === "xlsx" || config.format === "csv";
|
|
72
|
+
const layerInsights = insight && isMultiLayerExportFormat
|
|
73
|
+
? prepareGeoLayerInsightsForDataExport(insight, {
|
|
58
74
|
settings,
|
|
59
75
|
catalogAttributes,
|
|
60
76
|
preloadedAttributesWithReferences,
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
exportInsight === insight
|
|
64
|
-
? undefined
|
|
65
|
-
: createExportExecutionDefinition(exportInsight, ctx.workspace, executionEnvelope.executionResult.definition);
|
|
66
|
-
}
|
|
77
|
+
})
|
|
78
|
+
: undefined;
|
|
67
79
|
const timeout = yield select(selectExportResultPollingTimeout);
|
|
68
|
-
|
|
80
|
+
let result;
|
|
81
|
+
if (layerInsights && layerInsights.length > 1) {
|
|
82
|
+
result = (yield call(performMultiLayerExport, ctx, layerInsights.map((layer) => ({
|
|
83
|
+
title: layer.layerName,
|
|
84
|
+
// Layer filters live on the converted table insight, not in the base (root)
|
|
85
|
+
// execution — merge them in so each layer exports the data it displays.
|
|
86
|
+
definition: buildLayerDefinition(layer.tableInsight, {
|
|
87
|
+
includeInsightFilters: true,
|
|
88
|
+
attributeLocalIdMapping: layer.attributeLocalIdMapping,
|
|
89
|
+
}),
|
|
90
|
+
})), { ...config, timeout }));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const exportInsight = insight
|
|
94
|
+
? (prepareGeoInsightForDataExport(insight, {
|
|
95
|
+
settings,
|
|
96
|
+
catalogAttributes,
|
|
97
|
+
preloadedAttributesWithReferences,
|
|
98
|
+
}) ?? insight)
|
|
99
|
+
: undefined;
|
|
100
|
+
const exportDefinition = exportInsight && exportInsight !== insight ? buildLayerDefinition(exportInsight) : undefined;
|
|
101
|
+
result = (yield call(performExport, ctx, executionResult, { ...config, timeout }, exportDefinition));
|
|
102
|
+
}
|
|
69
103
|
// prepend hostname if provided so that the results are downloaded from there, not from where the app is hosted
|
|
70
104
|
const fullUri = ctx.backend.config.hostname
|
|
71
105
|
? new URL(result.uri, ctx.backend.config.hostname).href
|
|
@@ -3,8 +3,13 @@ import { type IExportTemplate } from "@gooddata/sdk-model";
|
|
|
3
3
|
* Fetches export templates when the feature flag is enabled.
|
|
4
4
|
* Returns an empty array when disabled or while loading.
|
|
5
5
|
*
|
|
6
|
-
* Fetches
|
|
7
|
-
*
|
|
6
|
+
* Fetches from both scopes and merges them: workspace-level templates (including any inherited from
|
|
7
|
+
* a parent workspace) and organization-level templates. Templates are deduplicated by ref — on a
|
|
8
|
+
* collision the workspace copy wins, as the more specific scope. Each scope is read independently:
|
|
9
|
+
* if one scope cannot be read (e.g. the user lacks organization-level permissions), the hook
|
|
10
|
+
* degrades to the other scope rather than failing the whole export flow.
|
|
11
|
+
*
|
|
12
|
+
* The backend caching layer deduplicates redundant calls across hook instances for both scopes.
|
|
8
13
|
*
|
|
9
14
|
* @internal
|
|
10
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExportTemplates.d.ts","sourceRoot":"","sources":["../../../src/model/react/useExportTemplates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useExportTemplates.d.ts","sourceRoot":"","sources":["../../../src/model/react/useExportTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,qBAAqB,CAAC;AAO3E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,EAAE,CAqBtD"}
|
|
@@ -1,26 +1,70 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { objRefToString } from "@gooddata/sdk-model";
|
|
3
|
+
import { useBackendStrict, useCancelablePromise, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
3
4
|
import { selectEnableExportTemplateSelection } from "../store/config/configSelectors.js";
|
|
4
5
|
import { useDashboardSelector } from "./DashboardStoreProvider.js";
|
|
5
6
|
/**
|
|
6
7
|
* Fetches export templates when the feature flag is enabled.
|
|
7
8
|
* Returns an empty array when disabled or while loading.
|
|
8
9
|
*
|
|
9
|
-
* Fetches
|
|
10
|
-
*
|
|
10
|
+
* Fetches from both scopes and merges them: workspace-level templates (including any inherited from
|
|
11
|
+
* a parent workspace) and organization-level templates. Templates are deduplicated by ref — on a
|
|
12
|
+
* collision the workspace copy wins, as the more specific scope. Each scope is read independently:
|
|
13
|
+
* if one scope cannot be read (e.g. the user lacks organization-level permissions), the hook
|
|
14
|
+
* degrades to the other scope rather than failing the whole export flow.
|
|
15
|
+
*
|
|
16
|
+
* The backend caching layer deduplicates redundant calls across hook instances for both scopes.
|
|
11
17
|
*
|
|
12
18
|
* @internal
|
|
13
19
|
*/
|
|
14
20
|
export function useExportTemplates() {
|
|
15
21
|
const backend = useBackendStrict();
|
|
22
|
+
const workspace = useWorkspaceStrict();
|
|
16
23
|
const isEnabled = useDashboardSelector(selectEnableExportTemplateSelection);
|
|
17
24
|
const { result } = useCancelablePromise({
|
|
18
25
|
promise: isEnabled
|
|
19
26
|
? async () => {
|
|
20
|
-
const
|
|
21
|
-
|
|
27
|
+
const [workspaceTemplates, orgTemplates] = await Promise.all([
|
|
28
|
+
loadWorkspaceTemplates(backend, workspace),
|
|
29
|
+
loadOrgTemplates(backend),
|
|
30
|
+
]);
|
|
31
|
+
return mergeExportTemplates(workspaceTemplates, orgTemplates);
|
|
22
32
|
}
|
|
23
33
|
: () => Promise.resolve([]),
|
|
24
|
-
}, [backend, isEnabled]);
|
|
34
|
+
}, [backend, workspace, isEnabled]);
|
|
25
35
|
return result ?? [];
|
|
26
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Loads workspace-level export templates, degrading to an empty list if the workspace scope cannot
|
|
39
|
+
* be read so that organization templates (loaded in parallel) are still offered.
|
|
40
|
+
*/
|
|
41
|
+
async function loadWorkspaceTemplates(backend, workspace) {
|
|
42
|
+
return backend
|
|
43
|
+
.workspace(workspace)
|
|
44
|
+
.exportTemplates()
|
|
45
|
+
.getExportTemplates()
|
|
46
|
+
.catch(() => []);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Loads organization-level export templates, degrading to an empty list if the organization scope
|
|
50
|
+
* cannot be read (e.g. missing org-level permissions) so that workspace templates (loaded in
|
|
51
|
+
* parallel) are still offered.
|
|
52
|
+
*/
|
|
53
|
+
async function loadOrgTemplates(backend) {
|
|
54
|
+
return backend
|
|
55
|
+
.organizations()
|
|
56
|
+
.getCurrentOrganization()
|
|
57
|
+
.then((org) => org.exportTemplates().getExportTemplates())
|
|
58
|
+
.catch(() => []);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Merges workspace and organization templates into a single list, deduplicated by ref. Workspace
|
|
62
|
+
* templates take precedence and are listed first, as the more specific scope.
|
|
63
|
+
*/
|
|
64
|
+
function mergeExportTemplates(workspaceTemplates, orgTemplates) {
|
|
65
|
+
const seen = new Set(workspaceTemplates.map((template) => objRefToString(template.ref)));
|
|
66
|
+
return [
|
|
67
|
+
...workspaceTemplates,
|
|
68
|
+
...orgTemplates.filter((template) => !seen.has(objRefToString(template.ref))),
|
|
69
|
+
];
|
|
70
|
+
}
|
|
@@ -193,7 +193,7 @@ export declare function computeParameterResetTargets(entries: IDashboardParamete
|
|
|
193
193
|
export declare function collectExportOverrides(tabRefSelections: ReadonlyArray<{
|
|
194
194
|
tab: ITabState;
|
|
195
195
|
allowedRefs?: Set<string>;
|
|
196
|
-
}>, workspaceParameterByRef: Map<string, IParameterMetadataObject>,
|
|
196
|
+
}>, workspaceParameterByRef: Map<string, IParameterMetadataObject>, isStringEnabled: boolean): Record<string, IDashboardExportParameter[]>;
|
|
197
197
|
/**
|
|
198
198
|
* Builds per-tab ref selections for a widget-scope export: each widget's owning tab is restricted
|
|
199
199
|
* to refs referenced by the widget's insight metrics. Multiple widgets on the same tab union their
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametersHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"parametersHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EAOtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAI9B;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,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AAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,EAAE,CAuBhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { DashboardParameterModeValues, insightMeasures, insightParameters, isMeasureDefinition, isValidParameterValue, objRefToString, } from "@gooddata/sdk-model";
|
|
2
|
+
import { DashboardParameterModeValues, insightMeasures, insightParameters, isMeasureDefinition, isValidParameterValue, objRefToString, sanitizeParameterValue, } from "@gooddata/sdk-model";
|
|
3
3
|
import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
|
|
4
4
|
const EMPTY_PARAMETERS = [];
|
|
5
5
|
const EMPTY_PARAMETER_VALUES = [];
|
|
@@ -57,7 +57,7 @@ export function resolveEffectiveParameterValuesForRefs(entries, referencedRefs,
|
|
|
57
57
|
}
|
|
58
58
|
result.push({
|
|
59
59
|
ref: entry.parameter.ref,
|
|
60
|
-
value:
|
|
60
|
+
value: sanitizeParameterExecutionValue(runtimeOverride, workspaceParameterByRef.get(refKey)),
|
|
61
61
|
});
|
|
62
62
|
seen.add(refKey);
|
|
63
63
|
}
|
|
@@ -68,7 +68,7 @@ export function resolveEffectiveParameterValuesForRefs(entries, referencedRefs,
|
|
|
68
68
|
}
|
|
69
69
|
result.push({
|
|
70
70
|
ref: insightParameterValue.ref,
|
|
71
|
-
value:
|
|
71
|
+
value: sanitizeParameterExecutionValue(insightParameterValue.value, workspaceParameterByRef.get(refKey)),
|
|
72
72
|
});
|
|
73
73
|
seen.add(refKey);
|
|
74
74
|
}
|
|
@@ -114,17 +114,15 @@ export function matchingWorkspaceDefinition(parameter, workspaceParameter) {
|
|
|
114
114
|
/**
|
|
115
115
|
* The value to execute for a runtime override: a value that is not valid for the workspace
|
|
116
116
|
* parameter (constraint-violating or of the wrong kind) is replaced by the workspace default so
|
|
117
|
-
* the dashboard renders the default instead of failing
|
|
117
|
+
* the dashboard renders the default instead of failing, while the chip keeps showing
|
|
118
118
|
* the user's saved value. Valid values, and values of removed parameters (no workspace entry —
|
|
119
119
|
* meant to surface as the standard widget error), pass through unchanged.
|
|
120
120
|
*
|
|
121
121
|
* @internal
|
|
122
122
|
*/
|
|
123
|
-
function
|
|
123
|
+
function sanitizeParameterExecutionValue(runtimeOverride, workspaceParameter) {
|
|
124
124
|
const definition = workspaceParameter?.definition;
|
|
125
|
-
return definition
|
|
126
|
-
? definition.defaultValue
|
|
127
|
-
: runtimeOverride;
|
|
125
|
+
return definition ? sanitizeParameterValue(definition, runtimeOverride) : runtimeOverride;
|
|
128
126
|
}
|
|
129
127
|
/**
|
|
130
128
|
* Classifies one dashboard parameter against its workspace catalog entry — the single source of
|
|
@@ -256,8 +254,9 @@ export function formatDashboardParameter(entry, workspaceParameter) {
|
|
|
256
254
|
}
|
|
257
255
|
return {
|
|
258
256
|
id: entry.parameter.ref.identifier,
|
|
259
|
-
value: String(
|
|
257
|
+
value: String(sanitizeParameterExecutionValue(runtimeOverride, workspaceParameter)),
|
|
260
258
|
title: resolveParameterTitle(entry.parameter, workspaceParameter),
|
|
259
|
+
parameterType: entry.parameter.parameterType,
|
|
261
260
|
};
|
|
262
261
|
}
|
|
263
262
|
/**
|
|
@@ -355,10 +354,10 @@ export function computeParameterResetTargets(entries, workspaceParameters, isInE
|
|
|
355
354
|
*
|
|
356
355
|
* @internal
|
|
357
356
|
*/
|
|
358
|
-
export function collectExportOverrides(tabRefSelections, workspaceParameterByRef,
|
|
357
|
+
export function collectExportOverrides(tabRefSelections, workspaceParameterByRef, isStringEnabled) {
|
|
359
358
|
const result = {};
|
|
360
359
|
for (const { tab, allowedRefs } of tabRefSelections) {
|
|
361
|
-
const entries = (tab.parameters?.parameters ?? parametersInitialState.parameters).filter((entry) => !isGatedStringEntry(entry,
|
|
360
|
+
const entries = (tab.parameters?.parameters ?? parametersInitialState.parameters).filter((entry) => !isGatedStringEntry(entry, isStringEnabled));
|
|
362
361
|
const scoped = allowedRefs
|
|
363
362
|
? entries.filter((entry) => allowedRefs.has(objRefToString(entry.parameter.ref)))
|
|
364
363
|
: entries;
|
|
@@ -142,16 +142,6 @@ export declare const selectWidgetParameterContext: (ref: ObjRef | undefined) =>
|
|
|
142
142
|
* @alpha
|
|
143
143
|
*/
|
|
144
144
|
export declare const selectEffectiveParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector<IInsightParameterValue[]>;
|
|
145
|
-
/**
|
|
146
|
-
* {@link selectEffectiveParameterValuesForWidget} minus string values, for seeding an alert's
|
|
147
|
-
* stored execution parameters. Same rationale as
|
|
148
|
-
* {@link selectAutomationExportEffectiveParameters}: the automation dialogs are NUMBER-only until
|
|
149
|
-
* the interactions slice, and a stored string value would be invisible there and deleted by any
|
|
150
|
-
* edit.
|
|
151
|
-
*
|
|
152
|
-
* @internal
|
|
153
|
-
*/
|
|
154
|
-
export declare const selectAutomationParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector<IInsightParameterValue[]>;
|
|
155
145
|
/**
|
|
156
146
|
* The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
|
|
157
147
|
* the metric-referenced refs, flag-gated and ref-filtered, with no dashboard chip overrides.
|
|
@@ -194,16 +184,6 @@ export declare const selectEffectiveDashboardParametersForWidget: (ref: ObjRef |
|
|
|
194
184
|
* @alpha
|
|
195
185
|
*/
|
|
196
186
|
export declare const selectExportEffectiveParameters: (widgetIds: string[] | undefined) => DashboardSelector<Record<string, IDashboardExportParameter[]>>;
|
|
197
|
-
/**
|
|
198
|
-
* {@link selectExportEffectiveParameters} minus STRING entries, for the wire persisted onto
|
|
199
|
-
* automations. The automation dialogs and restore paths decode NUMBER-only until the interactions
|
|
200
|
-
* slice (F1-2636…F1-2641): a stored STRING row would drive the headless render while being
|
|
201
|
-
* invisible in the dialog, and any edit re-encodes the wire without it — so it must not be
|
|
202
|
-
* persisted at all, regardless of `enableStringParameters`.
|
|
203
|
-
*
|
|
204
|
-
* @internal
|
|
205
|
-
*/
|
|
206
|
-
export declare const selectAutomationExportEffectiveParameters: (widgetIds: string[] | undefined) => DashboardSelector<Record<string, IDashboardExportParameter[]>>;
|
|
207
187
|
/**
|
|
208
188
|
* Active-tab slice of {@link selectExportEffectiveParameters}.
|
|
209
189
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametersSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"parametersSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKxD,OAAO,EAEH,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAe/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAyB9B;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,CAG9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,CAG/E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,wBAAwB,EAAE,CAGzF,CAAC;AAEF;;;;;GAKG;AACH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sdk-model";
|
|
5
|
-
import { isAutomationSupportedParameterValue } from "../../../../_staging/automation/index.js";
|
|
6
5
|
import { createMemoizedSelector } from "../../_infra/selectors.js";
|
|
7
6
|
import { selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, selectCatalogParameterByRef, selectCatalogParameters, selectCatalogParametersIsLoaded, } from "../../catalog/catalogSelectors.js";
|
|
8
7
|
import { selectEnableParameters, selectEnableStringParameters } from "../../config/configSelectors.js";
|
|
@@ -284,19 +283,6 @@ export const selectEffectiveParameterValuesForWidget = createMemoizedSelector((r
|
|
|
284
283
|
const { insightParameterValues, referencedRefs, entries, workspaceParameterByRef } = resolved;
|
|
285
284
|
return resolveEffectiveParameterValuesForRefs(entries, referencedRefs, insightParameterValues, workspaceParameterByRef);
|
|
286
285
|
}));
|
|
287
|
-
/**
|
|
288
|
-
* {@link selectEffectiveParameterValuesForWidget} minus string values, for seeding an alert's
|
|
289
|
-
* stored execution parameters. Same rationale as
|
|
290
|
-
* {@link selectAutomationExportEffectiveParameters}: the automation dialogs are NUMBER-only until
|
|
291
|
-
* the interactions slice, and a stored string value would be invisible there and deleted by any
|
|
292
|
-
* edit.
|
|
293
|
-
*
|
|
294
|
-
* @internal
|
|
295
|
-
*/
|
|
296
|
-
export const selectAutomationParameterValuesForWidget = createMemoizedSelector((ref) => createSelector(selectEffectiveParameterValuesForWidget(ref), (values) => {
|
|
297
|
-
const supportedValues = values.filter((row) => isAutomationSupportedParameterValue(row.value));
|
|
298
|
-
return supportedValues.length === 0 ? EMPTY_PARAMETER_VALUES : supportedValues;
|
|
299
|
-
}));
|
|
300
286
|
/**
|
|
301
287
|
* The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
|
|
302
288
|
* the metric-referenced refs, flag-gated and ref-filtered, with no dashboard chip overrides.
|
|
@@ -354,36 +340,24 @@ export const selectEffectiveDashboardParametersForWidget = createMemoizedSelecto
|
|
|
354
340
|
* @alpha
|
|
355
341
|
*/
|
|
356
342
|
export const selectExportEffectiveParameters = (widgetIds) => widgetIds?.length
|
|
357
|
-
? selectExportEffectiveParametersForWidgets(widgetIds
|
|
358
|
-
: selectExportEffectiveParametersDashboardScope
|
|
359
|
-
|
|
360
|
-
* {@link selectExportEffectiveParameters} minus STRING entries, for the wire persisted onto
|
|
361
|
-
* automations. The automation dialogs and restore paths decode NUMBER-only until the interactions
|
|
362
|
-
* slice (F1-2636…F1-2641): a stored STRING row would drive the headless render while being
|
|
363
|
-
* invisible in the dialog, and any edit re-encodes the wire without it — so it must not be
|
|
364
|
-
* persisted at all, regardless of `enableStringParameters`.
|
|
365
|
-
*
|
|
366
|
-
* @internal
|
|
367
|
-
*/
|
|
368
|
-
export const selectAutomationExportEffectiveParameters = (widgetIds) => widgetIds?.length
|
|
369
|
-
? selectExportEffectiveParametersForWidgets(widgetIds, false)
|
|
370
|
-
: selectExportEffectiveParametersDashboardScope(false);
|
|
371
|
-
const selectExportEffectiveParametersDashboardScope = createMemoizedSelector((includeStringOverrides) => createSelector(selectTabs, selectEnableParameters, selectEnableStringParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, (tabs, isEnabled, isStringEnabled, workspaceParameterByRef, isCatalogLoaded) => {
|
|
343
|
+
? selectExportEffectiveParametersForWidgets(widgetIds)
|
|
344
|
+
: selectExportEffectiveParametersDashboardScope;
|
|
345
|
+
const selectExportEffectiveParametersDashboardScope = createSelector(selectTabs, selectEnableParameters, selectEnableStringParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, (tabs, isEnabled, isStringEnabled, workspaceParameterByRef, isCatalogLoaded) => {
|
|
372
346
|
if (!isEnabled || !isCatalogLoaded || !tabs?.length) {
|
|
373
347
|
return EMPTY_EXPORT_PARAMETERS_BY_TAB;
|
|
374
348
|
}
|
|
375
|
-
return collectExportOverrides(tabs.map((tab) => ({ tab })), workspaceParameterByRef, isStringEnabled
|
|
376
|
-
})
|
|
377
|
-
const selectExportEffectiveParametersForWidgets = createMemoizedSelector((widgetIds
|
|
349
|
+
return collectExportOverrides(tabs.map((tab) => ({ tab })), workspaceParameterByRef, isStringEnabled);
|
|
350
|
+
});
|
|
351
|
+
const selectExportEffectiveParametersForWidgets = createMemoizedSelector((widgetIds) => createSelector(selectAllTabsInsightWidgetContexts, selectInsightsMap, selectEnableParameters, selectEnableStringParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, (widgetContexts, insights, isEnabled, isStringEnabled, workspaceParameterByRef, isCatalogLoaded, measureParameters, measureParametersStatus) => {
|
|
378
352
|
if (!isEnabled || !isCatalogLoaded || measureParametersStatus !== "loaded") {
|
|
379
353
|
return EMPTY_EXPORT_PARAMETERS_BY_TAB;
|
|
380
354
|
}
|
|
381
355
|
const tabRefSelections = buildWidgetScopeTabRefSelections(widgetContexts, widgetIds, insights, measureParameters);
|
|
382
|
-
return collectExportOverrides(tabRefSelections, workspaceParameterByRef, isStringEnabled
|
|
356
|
+
return collectExportOverrides(tabRefSelections, workspaceParameterByRef, isStringEnabled);
|
|
383
357
|
}));
|
|
384
358
|
/**
|
|
385
359
|
* Active-tab slice of {@link selectExportEffectiveParameters}.
|
|
386
360
|
*
|
|
387
361
|
* @internal
|
|
388
362
|
*/
|
|
389
|
-
export const selectActiveTabExportParameters = createSelector(selectExportEffectiveParametersDashboardScope
|
|
363
|
+
export const selectActiveTabExportParameters = createSelector(selectExportEffectiveParametersDashboardScope, selectActiveOrDefaultTabLocalIdentifier, (parametersByTab, activeTabId) => parametersByTab[activeTabId] ?? EMPTY_EXPORT_PARAMETERS);
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from "react";
|
|
2
|
+
import { type IAlertRelativeArithmeticOperator, type IAlertRelativeOperator, type IAttribute, type IAutomationMetadataObjectDefinition, type IMeasure } from "@gooddata/sdk-model";
|
|
3
|
+
import { type AlertAttribute, type AlertMetric } from "../../types.js";
|
|
4
|
+
export interface IUseAlertThresholdProps {
|
|
5
|
+
setEditedAutomation: Dispatch<SetStateAction<IAutomationMetadataObjectDefinition | undefined>>;
|
|
6
|
+
editedAutomation: IAutomationMetadataObjectDefinition | undefined;
|
|
7
|
+
getMetricValue: (measure?: IMeasure, attr?: IAttribute, value?: string | null) => number | undefined;
|
|
8
|
+
isNewAlert: boolean;
|
|
9
|
+
selectedRelativeOperator: [IAlertRelativeOperator, IAlertRelativeArithmeticOperator] | undefined;
|
|
10
|
+
selectedMeasure: AlertMetric | undefined;
|
|
11
|
+
selectedAttribute: AlertAttribute | undefined;
|
|
12
|
+
selectedValue: string | null | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare function useAlertThreshold({ setEditedAutomation, editedAutomation, getMetricValue, isNewAlert, selectedRelativeOperator, selectedMeasure, selectedAttribute, selectedValue }: IUseAlertThresholdProps): {
|
|
15
|
+
value: number | undefined;
|
|
16
|
+
onChange: (e: string | number, event?: import("react").ChangeEvent<HTMLInputElement> | undefined) => void;
|
|
17
|
+
onBlur: (event: import("react").FocusEvent<HTMLInputElement, Element>) => void;
|
|
18
|
+
thresholdErrorMessage: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useAlertThreshold.d.ts.map
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertThreshold.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAC;AAExE,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EAEf,KAAK,mCAAmC,EACxC,KAAK,QAAQ,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKvE,MAAM,WAAW,uBAAuB;IACpC,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/F,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;IACrG,UAAU,EAAE,OAAO,CAAC;IACpB,wBAAwB,EAAE,CAAC,sBAAsB,EAAE,gCAAgC,CAAC,GAAG,SAAS,CAAC;IACjG,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5C;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EAChB,EAAE,uBAAuB;;;;;EAgCzB"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { transformAlertByValue } from "../utils/transformation.js";
|
|
4
|
+
import { useThresholdValue } from "./useThresholdValue.js";
|
|
5
|
+
export function useAlertThreshold({ setEditedAutomation, editedAutomation, getMetricValue, isNewAlert, selectedRelativeOperator, selectedMeasure, selectedAttribute, selectedValue, }) {
|
|
6
|
+
const onValueChange = useCallback((value) => {
|
|
7
|
+
setEditedAutomation((alert) => alert ? transformAlertByValue(alert, value) : undefined);
|
|
8
|
+
}, [setEditedAutomation]);
|
|
9
|
+
const { value, onChange, onBlur, errorMessage: thresholdErrorMessage, } = useThresholdValue(onValueChange, getMetricValue, isNewAlert, editedAutomation?.alert, selectedRelativeOperator, selectedMeasure, selectedAttribute, selectedValue);
|
|
10
|
+
return {
|
|
11
|
+
value,
|
|
12
|
+
onChange,
|
|
13
|
+
onBlur,
|
|
14
|
+
thresholdErrorMessage,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -20,7 +20,7 @@ export declare function useEditAlert({ alertToEdit, notificationChannels, insigh
|
|
|
20
20
|
onApplyCurrentFilters: () => void;
|
|
21
21
|
automationParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
|
|
22
22
|
availableParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
|
|
23
|
-
onParameterChange: (ref: import("@gooddata/sdk-model").IdentifierRef, value: number) => void;
|
|
23
|
+
onParameterChange: (ref: import("@gooddata/sdk-model").IdentifierRef, value: string | number) => void;
|
|
24
24
|
onParameterDelete: (ref: import("@gooddata/sdk-model").IdentifierRef) => void;
|
|
25
25
|
onParameterAdd: (ref: import("@gooddata/sdk-model").IdentifierRef) => void;
|
|
26
26
|
dropStaleParameters: () => void;
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAkBvG,MAAM,WAAW,kBAAkB;IAC/B,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAE9C,0BAA0B,EAAE,CAA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