@gooddata/sdk-ui-dashboard 11.51.0 → 11.52.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/NOTICE +3 -3
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +1 -5
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +0 -3
- package/esm/model/commandHandlers/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/index.js +0 -2
- package/esm/model/commands/base.d.ts +1 -1
- package/esm/model/commands/base.d.ts.map +1 -1
- package/esm/model/commands/index.d.ts +1 -2
- package/esm/model/commands/index.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.d.ts +0 -2
- package/esm/model/store/dashboardStore.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.js +0 -2
- package/esm/model/store/types.d.ts +0 -3
- package/esm/model/store/types.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +2 -2
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts +3 -4
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.js +14 -16
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +1 -3
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +1 -4
- package/esm/presentation/automations/alerting/types.d.ts +1 -13
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts +4 -5
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.js +8 -17
- package/esm/presentation/automations/connectors/AlertingConnector.test.js +0 -16
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts +4 -4
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +8 -18
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +0 -20
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts +1 -4
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +5 -10
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +13 -10
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +35 -3
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +76 -27
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts +1 -4
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +1 -14
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +1 -11
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +11 -14
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +3 -3
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +31 -1
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +5 -18
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +3 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +5 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts +3 -12
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +21 -21
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts +6 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.js +14 -27
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts +13 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.js +44 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +1 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +1 -4
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.js +3 -12
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.js +2 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts +8 -9
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.js +12 -11
- package/esm/presentation/automations/scheduledEmail/types.d.ts +1 -13
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/utils/users.d.ts +1 -2
- package/esm/presentation/automations/scheduledEmail/utils/users.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/utils/users.js +1 -10
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +9 -0
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js +7 -2
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +2 -14
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts +12 -3
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +3 -11
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts +7 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.js +9 -25
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.js +4 -7
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.js +6 -3
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +23 -10
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts +1 -3
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/utils/automationUtils.js +0 -17
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +5 -4
- package/esm/presentation/drill/utils/dashboardPredicate.d.ts +0 -15
- package/esm/presentation/drill/utils/dashboardPredicate.d.ts.map +1 -1
- package/esm/presentation/drill/utils/dashboardPredicate.js +1 -16
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItem.d.ts +4 -0
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +2 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +4 -6
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +3 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.js +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.js +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts +2 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +4 -4
- package/esm/sdk-ui-dashboard.d.ts +47 -115
- package/package.json +21 -21
- package/styles/css/main.css +2 -0
- package/styles/css/main.css.map +1 -1
- package/styles/css/visualizationSwitcherHeader.css +1 -0
- package/styles/css/visualizationSwitcherHeader.css.map +1 -1
- package/styles/css/visualizationSwitcherWidget.css +1 -0
- package/styles/css/visualizationSwitcherWidget.css.map +1 -1
- package/styles/scss/visualizationSwitcherHeader.scss +2 -0
- package/styles/scss/visualizationSwitcherWidget.scss +2 -0
- package/esm/model/commandHandlers/users/loadAllUsersHandler.d.ts +0 -5
- package/esm/model/commandHandlers/users/loadAllUsersHandler.d.ts.map +0 -1
- package/esm/model/commandHandlers/users/loadAllUsersHandler.js +0 -19
- package/esm/model/commandHandlers/users/loadWorkspaceUsers.d.ts +0 -4
- package/esm/model/commandHandlers/users/loadWorkspaceUsers.d.ts.map +0 -1
- package/esm/model/commandHandlers/users/loadWorkspaceUsers.js +0 -3
- package/esm/model/commands/users.d.ts +0 -19
- package/esm/model/commands/users.d.ts.map +0 -1
- package/esm/model/commands/users.js +0 -15
- package/esm/model/react/useWorkspaceUsers.d.ts +0 -9
- package/esm/model/react/useWorkspaceUsers.d.ts.map +0 -1
- package/esm/model/react/useWorkspaceUsers.js +0 -27
- package/esm/model/store/users/index.d.ts +0 -9
- package/esm/model/store/users/index.d.ts.map +0 -1
- package/esm/model/store/users/index.js +0 -12
- package/esm/model/store/users/usersReducers.d.ts +0 -21
- package/esm/model/store/users/usersReducers.d.ts.map +0 -1
- package/esm/model/store/users/usersReducers.js +0 -15
- package/esm/model/store/users/usersSelectors.d.ts +0 -22
- package/esm/model/store/users/usersSelectors.d.ts.map +0 -1
- package/esm/model/store/users/usersSelectors.js +0 -27
- package/esm/model/store/users/usersState.d.ts +0 -12
- package/esm/model/store/users/usersState.d.ts.map +0 -1
- package/esm/model/store/users/usersState.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationRecipient, type IExportDefinitionMetadataObject, type IExportDefinitionMetadataObjectDefinition, type IFilter, type ISettings, type IUser
|
|
1
|
+
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationRecipient, type IExportDefinitionMetadataObject, type IExportDefinitionMetadataObjectDefinition, type IFilter, type ISettings, type IUser } from "@gooddata/sdk-model";
|
|
2
2
|
export declare const isDashboardAutomation: (automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined) => boolean;
|
|
3
3
|
export declare const isVisualisationAutomation: (automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined) => boolean;
|
|
4
4
|
export declare const isCsvVisualizationAutomation: (automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined) => boolean;
|
|
@@ -17,8 +17,6 @@ export declare const getAutomationVisualizationFilters: (automation: IAutomation
|
|
|
17
17
|
};
|
|
18
18
|
export declare const getAutomationAlertFilters: (automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined) => IFilter[] | undefined;
|
|
19
19
|
export declare const areAutomationsEqual: (originalAutomation: IAutomationMetadataObjectDefinition, updatedAutomation: IAutomationMetadataObjectDefinition) => boolean;
|
|
20
|
-
export declare const convertCurrentUserToAutomationRecipient: (users: IWorkspaceUser[], user: IUser) => IAutomationRecipient;
|
|
21
|
-
export declare const convertCurrentUserToWorkspaceUser: (users: IWorkspaceUser[], user: IUser) => IWorkspaceUser;
|
|
22
20
|
export declare const convertUserToAutomationRecipient: (user: IUser) => IAutomationRecipient;
|
|
23
21
|
export declare const convertExternalRecipientToAutomationRecipient: (externalRecipient: string) => IAutomationRecipient;
|
|
24
22
|
export declare const computeUseHostRoute: (settings: ISettings | undefined) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automationUtils.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/utils/automationUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EAEzB,KAAK,+BAA+B,EACpC,KAAK,yCAAyC,EAE9C,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"automationUtils.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/utils/automationUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EAEzB,KAAK,+BAA+B,EACpC,KAAK,yCAAyC,EAE9C,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,KAAK,EAKb,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,qBAAqB,sGAYjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,sGAYrC,CAAC;AAEF,eAAO,MAAM,4BAA4B,sGAQxC,CAAC;AAEF,eAAO,MAAM,kCAAkC,wHAW9C,CAAC;AAEF,eAAO,MAAM,6BAA6B,sGAQzC,CAAC;AAEF,eAAO,MAAM,mCAAmC,wHAW/C,CAAC;AAEF,eAAO,MAAM,6BAA6B,8HAYzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,8IAY9C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;CAuB7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,oHAQrC,CAAC;AAOF,eAAO,MAAM,mBAAmB,8HAqB/B,CAAC;AAEF,eAAO,MAAM,gCAAgC,uCAO5C,CAAC;AAEF,eAAO,MAAM,6CAA6C,qDASzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,8CACqE,CAAC"}
|
|
@@ -100,23 +100,6 @@ export const areAutomationsEqual = (originalAutomation, updatedAutomation) => {
|
|
|
100
100
|
return (isEqual(automationWithoutExportDefinitions, origAutomationWithoutExportDefinitions) &&
|
|
101
101
|
isEqual(automationExportDefinitions, origAutomationExportDefinitions));
|
|
102
102
|
};
|
|
103
|
-
export const convertCurrentUserToAutomationRecipient = (users, user) => {
|
|
104
|
-
const foundUser = users.find((u) => u.login === user.login);
|
|
105
|
-
return convertUserToAutomationRecipient(foundUser ?? user);
|
|
106
|
-
};
|
|
107
|
-
export const convertCurrentUserToWorkspaceUser = (users, user) => {
|
|
108
|
-
const foundUser = users.find((u) => u.login === user.login);
|
|
109
|
-
return (foundUser ?? {
|
|
110
|
-
email: user.email ?? "",
|
|
111
|
-
fullName: user.fullName,
|
|
112
|
-
status: "ENABLED",
|
|
113
|
-
login: user.login,
|
|
114
|
-
lastName: user.lastName,
|
|
115
|
-
firstName: user.firstName,
|
|
116
|
-
uri: user.login,
|
|
117
|
-
ref: user.ref,
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
103
|
export const convertUserToAutomationRecipient = (user) => {
|
|
121
104
|
return {
|
|
122
105
|
id: user.login,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomUrlEditor.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAoB,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAEvE,OAAO,
|
|
1
|
+
{"version":3,"file":"CustomUrlEditor.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAoB,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAEvE,OAAO,EAMH,KAAK,MAAM,EAYd,MAAM,qBAAqB,CAAC;AA6B7B,OAAO,EAAE,KAAK,cAAc,EAA4B,MAAM,gBAAgB,CAAC;AAG/E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,uBAAuB,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5C,IAAI,EAAE,SAAS,CAAC;CACnB;AAsCD,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,uBAAuB,EAC1B,EAAE,cAAc,kDAoBhB;AAyHD,UAAU,eAAe;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAmLD,MAAM,WAAW,qBAAqB;IAClC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,qBAAqB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACpD,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,sCAAsC,EAAE,MAAM,EAAE,CAAC;IACjD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,OAAO,CAAC;IACjC,4BAA4B,EAAE,OAAO,CAAC;IACtC,uBAAuB,EAAE,OAAO,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACrB;AAmHD,wBAAgB,eAAe,CAAC,KAAK,EAAE,qBAAqB,2CAkB3D"}
|
|
@@ -5,7 +5,7 @@ import { HighlightStyle, StreamLanguage, syntaxHighlighting } from "@codemirror/
|
|
|
5
5
|
import { Tag } from "@lezer/highlight";
|
|
6
6
|
import { compact, uniqBy } from "lodash-es";
|
|
7
7
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
8
|
-
import { filterObjRef, idRef, insightFilters as insightDefinitionFilters, isArbitraryAttributeFilter, isAttributeFilter, isMatchAttributeFilter, isMeasureValueFilter, isNegativeAttributeFilter, isPositiveAttributeFilter,
|
|
8
|
+
import { filterObjRef, idRef, insightFilters as insightDefinitionFilters, isArbitraryAttributeFilter, isAttributeFilter, isMatchAttributeFilter, isMeasureValueFilter, isNegativeAttributeFilter, isPositiveAttributeFilter, objRefToString, serializeObjRef, } from "@gooddata/sdk-model";
|
|
9
9
|
import { ConfirmDialogBase, FullScreenOverlay, Overlay, OverlayController, OverlayControllerProvider, SyntaxHighlightingInput, useMediaQuery, } from "@gooddata/sdk-ui-kit";
|
|
10
10
|
import { dashboardAttributeFilterItemToAttributeFilter } from "../../../../converters/filterConverters.js";
|
|
11
11
|
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
@@ -82,9 +82,10 @@ const buildValidInsightFiltersFormattingRule = (attributeFilters) => {
|
|
|
82
82
|
}
|
|
83
83
|
const validInsightAttributeFilterPlaceholders = attributeFilters
|
|
84
84
|
.map((filter) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
// these filters always come from useSanitizedInsightFilters, which rewrites the display form
|
|
86
|
+
// ref to idRef(displayForm.id, "displayForm") or drops the filter -> never a uri ref here
|
|
87
|
+
const { identifier } = filterObjRef(filter);
|
|
88
|
+
return `{attribute_filter_selection\\(${identifier}\\)}`;
|
|
88
89
|
})
|
|
89
90
|
.join("|");
|
|
90
91
|
return {
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { type Identifier, type ObjRef } from "@gooddata/sdk-model";
|
|
2
2
|
/**
|
|
3
3
|
* Tests whether a dashboard identifier OR dashboard ref match another dashboard's ref.
|
|
4
|
-
*
|
|
5
|
-
* You are reading this and probably wondering what the hell.. why is this crap here?! The situation is as follows:
|
|
6
|
-
*
|
|
7
|
-
* 1. Each dashboard has 'ref', the type of ref is strictly controlled by the backend implementation. Some use
|
|
8
|
-
* URI's to reference dashboards, some use Identifiers. However as long as the backend creates refs consistently
|
|
9
|
-
* and the client treats them opaquely, then types match naturally and everything works.
|
|
10
|
-
*
|
|
11
|
-
* 2. Enter drill to dashboard. For obscure reasons of the bear metadata, bear backend stored references
|
|
12
|
-
* as identifiers where everything else is URI. AND, this implementation detail leaks through the sdk-backend-bear.
|
|
13
|
-
*
|
|
14
|
-
* 3. Result: When working on bear backend, simple areObjRefsEqual of refs are not enough because code could sometimes
|
|
15
|
-
* compare different types of refs.
|
|
16
|
-
*
|
|
17
|
-
* The code that you see here is a band-aid of that leaky abstraction. The right way would be to fix the sdk-backend-bear
|
|
18
|
-
* so that the DrillToDashboard returns target ref of the correct, consistent type.
|
|
19
4
|
*/
|
|
20
5
|
export declare function dashboardMatch(identifier: Identifier, ref: ObjRef, otherRef: ObjRef): boolean;
|
|
21
6
|
//# sourceMappingURL=dashboardPredicate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardPredicate.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/utils/dashboardPredicate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAA0B,MAAM,qBAAqB,CAAC;AAE3F
|
|
1
|
+
{"version":3,"file":"dashboardPredicate.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/utils/dashboardPredicate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAA0B,MAAM,qBAAqB,CAAC;AAE3F;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE7F"}
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
// (C) 2021-
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { areObjRefsEqual, idRef } from "@gooddata/sdk-model";
|
|
3
3
|
/**
|
|
4
4
|
* Tests whether a dashboard identifier OR dashboard ref match another dashboard's ref.
|
|
5
|
-
*
|
|
6
|
-
* You are reading this and probably wondering what the hell.. why is this crap here?! The situation is as follows:
|
|
7
|
-
*
|
|
8
|
-
* 1. Each dashboard has 'ref', the type of ref is strictly controlled by the backend implementation. Some use
|
|
9
|
-
* URI's to reference dashboards, some use Identifiers. However as long as the backend creates refs consistently
|
|
10
|
-
* and the client treats them opaquely, then types match naturally and everything works.
|
|
11
|
-
*
|
|
12
|
-
* 2. Enter drill to dashboard. For obscure reasons of the bear metadata, bear backend stored references
|
|
13
|
-
* as identifiers where everything else is URI. AND, this implementation detail leaks through the sdk-backend-bear.
|
|
14
|
-
*
|
|
15
|
-
* 3. Result: When working on bear backend, simple areObjRefsEqual of refs are not enough because code could sometimes
|
|
16
|
-
* compare different types of refs.
|
|
17
|
-
*
|
|
18
|
-
* The code that you see here is a band-aid of that leaky abstraction. The right way would be to fix the sdk-backend-bear
|
|
19
|
-
* so that the DrillToDashboard returns target ref of the correct, consistent type.
|
|
20
5
|
*/
|
|
21
6
|
export function dashboardMatch(identifier, ref, otherRef) {
|
|
22
7
|
return areObjRefsEqual(ref, otherRef) || areObjRefsEqual(idRef(identifier), otherRef);
|
|
@@ -7,6 +7,10 @@ interface IDashboardItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
titleId?: string;
|
|
8
8
|
ref?: Ref<HTMLDivElement>;
|
|
9
9
|
exportData?: CommonExportDataAttributes;
|
|
10
|
+
/**
|
|
11
|
+
* Exactly one DashboardItem per widget renders as "figure" — the one carrying titleId/description;
|
|
12
|
+
* any other nested or wrapping DashboardItem must use "div" to avoid invalid/unnamed figures.
|
|
13
|
+
*/
|
|
10
14
|
as?: "figure" | "div";
|
|
11
15
|
}
|
|
12
16
|
export declare const DashboardItem: import("react").ForwardRefExoticComponent<Omit<IDashboardItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardItem.d.ts","sourceRoot":"","sources":["../../../../src/presentation/presentationComponents/DashboardItems/DashboardItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,GAAG,EAAc,MAAM,OAAO,CAAC;AAIlE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACxE,UAAU,mBAAoB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,UAAU,CAAC,EAAE,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardItem.d.ts","sourceRoot":"","sources":["../../../../src/presentation/presentationComponents/DashboardItems/DashboardItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,GAAG,EAAc,MAAM,OAAO,CAAC;AAIlE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACxE,UAAU,mBAAoB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;;OAGG;IACH,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CACzB;AAWD,eAAO,MAAM,aAAa,6HA4BzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IAutomationMetadataObjectDefinition, type ICatalogAttribute, type ICatalogDateDataset, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type ISeparators
|
|
1
|
+
import { type IAutomationMetadataObjectDefinition, type ICatalogAttribute, type ICatalogDateDataset, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type ISeparators } from "@gooddata/sdk-model";
|
|
2
2
|
import { type IExecutionResultEnvelope } from "../../../../../model/store/executionResults/types.js";
|
|
3
3
|
import { type IMeasureFormatMap } from "../../../../automations/alerting/DefaultAlertingDialog/utils/getters.js";
|
|
4
4
|
import { type AlertAttribute, type AlertMetric } from "../../../../automations/alerting/types.js";
|
|
@@ -9,7 +9,6 @@ interface ICreateAlertProps {
|
|
|
9
9
|
onCancel: () => void;
|
|
10
10
|
onCreate?: (alert: IAutomationMetadataObjectDefinition) => void;
|
|
11
11
|
destinations: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
12
|
-
users: IWorkspaceUser[];
|
|
13
12
|
hasAlerts: boolean;
|
|
14
13
|
measures: AlertMetric[];
|
|
15
14
|
attributes: AlertAttribute[];
|
|
@@ -21,6 +20,6 @@ interface ICreateAlertProps {
|
|
|
21
20
|
separators?: ISeparators;
|
|
22
21
|
isExecutionTimestampMode?: boolean;
|
|
23
22
|
}
|
|
24
|
-
export declare function CreateAlert({ execResult, alert, onClose, onCancel, onCreate, destinations,
|
|
23
|
+
export declare function CreateAlert({ execResult, alert, onClose, onCancel, onCreate, destinations, hasAlerts, measures, attributes, maxAutomationsReached, maxAutomationsRecipients, measureFormatMap, catalogAttributes, catalogDateDatasets, separators, isExecutionTimestampMode }: ICreateAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
25
24
|
export {};
|
|
26
25
|
//# sourceMappingURL=CreateAlert.d.ts.map
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"CreateAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AACrG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yEAAyE,CAAC;AACjH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAIlG,UAAU,iBAAiB;IACvB,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,YAAY,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IACtF,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,wBAAgB,WAAW,CAAC,EACxB,UAAU,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,wBAAwB,EAC3B,EAAE,iBAAiB,2CAsBnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { EditAlert } from "./EditAlert.js";
|
|
3
|
-
export function CreateAlert({ execResult, alert, onClose, onCancel, onCreate, destinations,
|
|
4
|
-
return (_jsx(EditAlert, { execResult: execResult, alert: alert, onClose: onClose, onCancel: onCancel, onCreate: onCreate, isNewAlert: true, destinations: destinations,
|
|
3
|
+
export function CreateAlert({ execResult, alert, onClose, onCancel, onCreate, destinations, hasAlerts, measures, attributes, maxAutomationsReached, maxAutomationsRecipients, measureFormatMap, catalogAttributes, catalogDateDatasets, separators, isExecutionTimestampMode, }) {
|
|
4
|
+
return (_jsx(EditAlert, { execResult: execResult, alert: alert, onClose: onClose, onCancel: onCancel, onCreate: onCreate, isNewAlert: true, destinations: destinations, hasAlerts: hasAlerts, measures: measures, attributes: attributes, maxAutomationsReached: maxAutomationsReached, maxAutomationsRecipients: maxAutomationsRecipients, measureFormatMap: measureFormatMap, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, separators: separators, isExecutionTimestampMode: isExecutionTimestampMode }));
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type ICatalogAttribute, type ICatalogDateDataset, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type ISeparators
|
|
1
|
+
import { type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type ICatalogAttribute, type ICatalogDateDataset, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type ISeparators } from "@gooddata/sdk-model";
|
|
2
2
|
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
3
3
|
import { type IExecutionResultEnvelope } from "../../../../../model/store/executionResults/types.js";
|
|
4
4
|
import { type IMeasureFormatMap } from "../../../../automations/alerting/DefaultAlertingDialog/utils/getters.js";
|
|
@@ -9,7 +9,6 @@ interface IEditAlertProps {
|
|
|
9
9
|
isNewAlert?: boolean;
|
|
10
10
|
hasAlerts: boolean;
|
|
11
11
|
destinations: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
12
|
-
users: IWorkspaceUser[];
|
|
13
12
|
measures: AlertMetric[];
|
|
14
13
|
attributes: AlertAttribute[];
|
|
15
14
|
measureFormatMap: IMeasureFormatMap;
|
|
@@ -25,6 +24,6 @@ interface IEditAlertProps {
|
|
|
25
24
|
separators?: ISeparators;
|
|
26
25
|
isExecutionTimestampMode?: boolean;
|
|
27
26
|
}
|
|
28
|
-
export declare function EditAlert({ alert, execResult, isNewAlert, hasAlerts, destinations,
|
|
27
|
+
export declare function EditAlert({ alert, execResult, isNewAlert, hasAlerts, destinations, attributes, measures, onClose, onCancel, onCreate, onUpdate, maxAutomationsReached, maxAutomationsRecipients, overlayPositionType, measureFormatMap, catalogAttributes, catalogDateDatasets, separators, isExecutionTimestampMode }: IEditAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
export {};
|
|
30
29
|
//# sourceMappingURL=EditAlert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAExB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAExB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAMH,KAAK,mBAAmB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAgBrG,OAAO,EACH,KAAK,iBAAiB,EAWzB,MAAM,yEAAyE,CAAC;AAMjF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAwBlG,UAAU,eAAe;IACrB,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,yBAAyB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IACtF,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,qBAA6B,EAC7B,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,wBAAwB,EAC3B,EAAE,eAAe,2CAuXjB"}
|
|
@@ -36,7 +36,7 @@ const invalidMessagesObj = {
|
|
|
36
36
|
missingMetric: messages.invalidDefault,
|
|
37
37
|
missingWidget: messages.invalidWidget,
|
|
38
38
|
};
|
|
39
|
-
export function EditAlert({ alert, execResult, isNewAlert, hasAlerts, destinations,
|
|
39
|
+
export function EditAlert({ alert, execResult, isNewAlert, hasAlerts, destinations, attributes, measures, onClose, onCancel, onCreate, onUpdate, maxAutomationsReached = false, maxAutomationsRecipients, overlayPositionType, measureFormatMap, catalogAttributes, catalogDateDatasets, separators, isExecutionTimestampMode, }) {
|
|
40
40
|
const { defaultUser, viewMode, updatedAlert, canSubmit, allowExternalRecipients, allowOnlyLoggedUserRecipients, warningMessage, enableAnomalyDetectionAlert, allowHourlyRecurrence,
|
|
41
41
|
//
|
|
42
42
|
changeAnomalyDetection, changeComparisonOperator, changeRelativeOperator, changeMeasure, changeAttribute, changeTitle, changeValue, changeDestination, changeComparisonType, changeRecipients, changeSensitivity, changeGranularity,
|
|
@@ -120,7 +120,7 @@ export function EditAlert({ alert, execResult, isNewAlert, hasAlerts, destinatio
|
|
|
120
120
|
] })
|
|
121
121
|
] })), destinations.length > 1 && (_jsxs("div", { style: { marginTop: "1rem" }, children: [
|
|
122
122
|
_jsx("label", { htmlFor: "alert.destination", className: "gd-edit-alert__destination-label", children: _jsx(FormattedMessage, { id: "insightAlert.config.action" }) }), _jsx(AlertDestinationSelect, { id: "alert.destination", selectedDestination: updatedAlert.notificationChannel, onDestinationChange: changeDestination, destinations: destinations, overlayPositionType: overlayPositionType })
|
|
123
|
-
] })), _jsx(RecipientsSelect, { id: "alert.recipients", loggedUser: defaultUser,
|
|
123
|
+
] })), _jsx(RecipientsSelect, { id: "alert.recipients", loggedUser: defaultUser, value: updatedAlert.recipients ?? [], originalValue: alert.recipients || [], onChange: changeRecipients, allowEmptySelection: true, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxAutomationsRecipients, className: "gd-edit-alert__recipients", notificationChannels: destinations, notificationChannelId: updatedAlert.notificationChannel }), _jsx("label", { htmlFor: "alert.title", className: "gd-edit-alert__title-label", children: _jsx(FormattedMessage, { id: "insightAlert.config.name" }) }), _jsx(AlertTitle, { id: "alert.title", measures: measures, alert: updatedAlert, separators: separators, onChange: (e) => {
|
|
124
124
|
changeTitle(e === "" ? undefined : String(e));
|
|
125
125
|
} })
|
|
126
126
|
] }), warningMessage ? _jsx(Message, { type: "warning", children: warningMessage }) : null, isValid ? null : (_jsx(Message, { type: "error", children: _jsx(FormattedMessage, { id: invalidMessagesObj[invalidityReason].id }) }))] }), _jsxs("div", { className: "gd-edit-alert__buttons", children: [
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface IUseEditAlertProps {
|
|
|
14
14
|
onUpdate?: (alert: IAutomationMetadataObject) => void;
|
|
15
15
|
}
|
|
16
16
|
export declare const useEditAlert: ({ metrics, attributes, alert, onCreate, onUpdate, measureFormatMap, destinations, separators, }: IUseEditAlertProps) => {
|
|
17
|
-
defaultUser:
|
|
17
|
+
defaultUser: IAutomationRecipient;
|
|
18
18
|
viewMode: "configuration" | "edit";
|
|
19
19
|
updatedAlert: IAutomationMetadataObject;
|
|
20
20
|
canSubmit: boolean | undefined;
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EAInB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EAInB,MAAM,qBAAqB,CAAC;AAW7B,OAAO,EACH,KAAK,iBAAiB,EAEzB,MAAM,4EAA4E,CAAC;AAiBpF,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EACjC,MAAM,8CAA8C,CAAC;AAMtD,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,KAAK,EAAE,yBAAyB,CAAC;IACjC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,YAAY,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IACtF,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACzD;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgRxB,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js
CHANGED
|
@@ -8,19 +8,17 @@ import { selectEnableAnomalyDetectionAlert, selectTimezone, selectWeekStart, } f
|
|
|
8
8
|
import { selectEntitlementMinimumRecurrenceMinutes } from "../../../../../../model/store/entitlements/entitlementsSelectors.js";
|
|
9
9
|
import { selectCanUseAiAssistant } from "../../../../../../model/store/permissions/permissionsSelectors.js";
|
|
10
10
|
import { selectCurrentUser } from "../../../../../../model/store/user/userSelectors.js";
|
|
11
|
-
import { selectUsers } from "../../../../../../model/store/users/usersSelectors.js";
|
|
12
11
|
import { getDescription, } from "../../../../../automations/alerting/DefaultAlertingDialog/utils/getters.js";
|
|
13
12
|
import { isAlertRecipientsValid, isAlertValueDefined, } from "../../../../../automations/alerting/DefaultAlertingDialog/utils/guards.js";
|
|
14
13
|
import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, transformAlertByTitle, transformAlertByValue, } from "../../../../../automations/alerting/DefaultAlertingDialog/utils/transformation.js";
|
|
15
14
|
import { isEmail } from "../../../../../automations/scheduledEmail/utils/validate.js";
|
|
16
|
-
import {
|
|
15
|
+
import { convertUserToAutomationRecipient } from "../../../../../automations/shared/utils/automationUtils.js";
|
|
17
16
|
const DEFAULT_MIN_RECURRENCE_MINUTES = "60";
|
|
18
17
|
export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, measureFormatMap, destinations, separators, }) => {
|
|
19
18
|
const [viewMode, setViewMode] = useState("edit");
|
|
20
19
|
const [updatedAlert, setUpdatedAlert] = useState(alert);
|
|
21
20
|
const [warningMessage, setWarningMessage] = useState(undefined);
|
|
22
21
|
const currentUser = useDashboardSelector(selectCurrentUser);
|
|
23
|
-
const users = useDashboardSelector(selectUsers);
|
|
24
22
|
const enableAnomalyDetectionAlert = useDashboardSelector(selectEnableAnomalyDetectionAlert);
|
|
25
23
|
const enableAiAssistant = useDashboardSelector(selectCanUseAiAssistant);
|
|
26
24
|
const weekStart = useDashboardSelector(selectWeekStart);
|
|
@@ -29,7 +27,7 @@ export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, m
|
|
|
29
27
|
const minimumRecurrenceMinutesEntitlement = useDashboardSelector(selectEntitlementMinimumRecurrenceMinutes);
|
|
30
28
|
const allowHourlyRecurrence = parseInt(minimumRecurrenceMinutesEntitlement?.value ?? DEFAULT_MIN_RECURRENCE_MINUTES, 10) === 60;
|
|
31
29
|
const selectedDestination = destinations.find((destination) => destination.id === updatedAlert.notificationChannel);
|
|
32
|
-
const defaultUser =
|
|
30
|
+
const defaultUser = convertUserToAutomationRecipient(currentUser);
|
|
33
31
|
const allowExternalRecipients = selectedDestination?.allowedRecipients === "external";
|
|
34
32
|
const allowOnlyLoggedUserRecipients = selectedDestination?.allowedRecipients === "creator";
|
|
35
33
|
const changeMeasure = useCallback((measure) => {
|
|
@@ -77,10 +75,10 @@ export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, m
|
|
|
77
75
|
* Reset recipients when new notification channel only allows the author/creator
|
|
78
76
|
*/
|
|
79
77
|
const updatedRecipients = selectedDestination?.allowedRecipients === "creator"
|
|
80
|
-
? [
|
|
78
|
+
? [convertUserToAutomationRecipient(currentUser)]
|
|
81
79
|
: undefined;
|
|
82
80
|
setUpdatedAlert((alert) => transformAlertByDestination(alert, destinationId, updatedRecipients));
|
|
83
|
-
}, [alert.notificationChannel, currentUser, destinations, intl
|
|
81
|
+
}, [alert.notificationChannel, currentUser, destinations, intl]);
|
|
84
82
|
const changeComparisonType = useCallback((measure, relativeOperator, comparisonType, granularity) => {
|
|
85
83
|
if (!measure || !relativeOperator || !relativeOperator) {
|
|
86
84
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditModeDashboardVisualizationSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAGvE;;GAEG;AACH,wBAAgB,sCAAsC,CAAC,EACnD,MAAM,EACN,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,MAAM,EACT,EAAE,oCAAoC,
|
|
1
|
+
{"version":3,"file":"EditModeDashboardVisualizationSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAGvE;;GAEG;AACH,wBAAgB,sCAAsC,CAAC,EACnD,MAAM,EACN,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,MAAM,EACT,EAAE,oCAAoC,2CAgEtC"}
|
package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js
CHANGED
|
@@ -32,6 +32,6 @@ export function EditModeDashboardVisualizationSwitcher({ widget, activeVisualiza
|
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
const visType = insightVisualizationType(insight);
|
|
35
|
-
return (_jsx(DashboardItem, {
|
|
35
|
+
return (_jsx(DashboardItem, { className: cx("type-visualization", "gd-dashboard-view-widget", "is-edit-mode", getVisTypeCssClass(activeVisualization.type, visType)), screen: screen, children: _jsx(DashboardItemVisualization, { renderHeadline: (clientHeight) => !activeVisualization.configuration?.hideTitle && (_jsx(EditableDashboardInsightWidgetHeader, { clientHeight: clientHeight, widget: activeVisualization, insight: insight })), children: ({ clientHeight, clientWidth }) => (_jsx(AllVisualizationsDashInsights, { visualizationClassName: "is-edit-mode", clientHeight: clientHeight, clientWidth: clientWidth, visualizations: widget.visualizations, showOthers: showOthers, activeVisualization: activeVisualization, onExportReady: onExportReady, onLoadingChanged: onLoadingChanged, onError: onError })) }) }));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewModeDashboardVisualizationSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ViewModeDashboardVisualizationSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;AAsB7B,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAGvE;;GAEG;AACH,wBAAgB,sCAAsC,CAAC,EACnD,MAAM,EACN,qBAAqB,EAAE,4BAA4B,EACnD,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,MAAM,EACN,UAAU,EACb,EAAE,oCAAoC,2CA2BtC;AAED,wBAAgB,2CAA2C,4CAE1D;AAED,MAAM,WAAW,mDAAoD,SAAQ,oCAAoC;IAC7G,OAAO,EAAE,QAAQ,CAAC;IAClB,mBAAmB,EAAE,cAAc,CAAC;IACpC,2BAA2B,EAAE,CAAC,qBAAqB,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AAED,wBAAgB,6CAA6C,CAAC,EAC1D,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,EACN,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,UAAU,EACb,EAAE,mDAAmD,2CAmOrD"}
|
package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useCallback, useMemo, useRef, useState } from "react";
|
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { insightVisualizationType, widgetTitle, } from "@gooddata/sdk-model";
|
|
7
|
+
import { useId } from "@gooddata/sdk-ui-kit";
|
|
7
8
|
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
8
9
|
import { useDashboardScheduledEmails } from "../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js";
|
|
9
10
|
import { useDashboardAlerts } from "../../../model/react/useDashboardAlerting/useDashboardAlerts.js";
|
|
@@ -121,7 +122,8 @@ export function ViewModeDashboardVisualizationSwitcherContent({ widget, insight,
|
|
|
121
122
|
: insight.insight.summary;
|
|
122
123
|
const { isWidgetAsTable, toggleWidgetAsTable } = useShowAsTable(activeVisualization);
|
|
123
124
|
const widgetContainerRef = useRef(null);
|
|
124
|
-
|
|
125
|
+
const titleId = useId();
|
|
126
|
+
return (_jsx(DashboardItem, { className: cx("type-visualization", "gd-dashboard-view-widget", getVisTypeCssClass(activeVisualization.type, visType)), screen: screen, ref: widgetContainerRef, description: accessibilityWidgetDescription, titleId: titleId, children: _jsx(DashboardItemVisualization, { isExport: !!exportData, renderHeadline: (clientHeight, clientWidth) => (_jsx(VisualizationSwitcherNavigationHeader, { widget: widget, clientHeight: clientHeight, clientWidth: clientWidth, titleId: titleId, activeVisualization: activeVisualization, onActiveVisualizationChange: (activeVisualizationId) => onActiveVisualizationChange(activeVisualizationId), exportData: exportData?.title })), renderBeforeVisualization: () => (_jsxs("div", { className: "gd-absolute-row", children: [
|
|
125
127
|
_jsx(InsightWidgetDescriptionTrigger, { insight: insight, widget: activeVisualization, screen: screen }), (() => {
|
|
126
128
|
const visType = insightVisualizationType(insight);
|
|
127
129
|
if (supportsShowAsTable(visType)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,wBAAgB,2CAA2C,CAAC,EACxD,MAAM,EACN,MAAM,EACN,oBAAoB,EACvB,EAAE,iDAAiD,
|
|
1
|
+
{"version":3,"file":"DefaultDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,wBAAgB,2CAA2C,CAAC,EACxD,MAAM,EACN,MAAM,EACN,oBAAoB,EACvB,EAAE,iDAAiD,2CAiBnD"}
|
|
@@ -10,7 +10,7 @@ import { DashboardVisualizationSwitcher } from "../../visualizationSwitcher/Dash
|
|
|
10
10
|
*/
|
|
11
11
|
export function DefaultDashboardVisualizationSwitcherWidget({ widget, screen, dashboardItemClasses, }) {
|
|
12
12
|
const { elementRef, highlighted } = useWidgetHighlighting(widget);
|
|
13
|
-
return (_jsx(DashboardItem, { className: cx(dashboardItemClasses, "type-visualization", "gd-dashboard-view-widget", {
|
|
13
|
+
return (_jsx(DashboardItem, { as: "div", className: cx(dashboardItemClasses, "type-visualization", "gd-dashboard-view-widget", {
|
|
14
14
|
"gd-highlighted": highlighted,
|
|
15
15
|
}), screen: screen, ref: elementRef, children: _jsx(DashboardItemBase, { visualizationClassName: "gd-visualization-switcher-widget-wrapper", children: () => _jsx(DashboardVisualizationSwitcher, { widget: widget, screen: screen }) }) }));
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AAkCA,OAAO,EAAE,KAAK,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,wBAAgB,4CAA4C,CAAC,EACzD,MAAM,EACN,MAAM,EACN,oBAAoB,EACpB,OAAO,EACP,aAAa,EACb,gBAAgB,EACnB,EAAE,iDAAiD,
|
|
1
|
+
{"version":3,"file":"EditableDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AAkCA,OAAO,EAAE,KAAK,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,wBAAgB,4CAA4C,CAAC,EACzD,MAAM,EACN,MAAM,EACN,oBAAoB,EACpB,OAAO,EACP,aAAa,EACb,gBAAgB,EACnB,EAAE,iDAAiD,2CA+GnD"}
|
|
@@ -50,7 +50,7 @@ export function EditableDashboardVisualizationSwitcherWidget({ widget, screen, d
|
|
|
50
50
|
const changedVisualizations = useCallback((visualizations) => {
|
|
51
51
|
dispatch(updateVisualizationsFromSwitcherWidgetContent(widget.ref, visualizations));
|
|
52
52
|
}, [widget.ref, dispatch]);
|
|
53
|
-
return (_jsx(_Fragment, { children: _jsx(DashboardItem, { className: cx(dashboardItemClasses, "type-visualization", "gd-dashboard-view-widget", "is-edit-mode", { "is-selected": isSelected }), screen: screen, children: _jsx(DashboardItemBase, { isSelectable: isSelectable, isSelected: isSelected, onSelected: onSelected, contentClassName: cx({
|
|
53
|
+
return (_jsx(_Fragment, { children: _jsx(DashboardItem, { as: "div", className: cx(dashboardItemClasses, "type-visualization", "gd-dashboard-view-widget", "is-edit-mode", { "is-selected": isSelected }), screen: screen, children: _jsx(DashboardItemBase, { isSelectable: isSelectable, isSelected: isSelected, onSelected: onSelected, contentClassName: cx({
|
|
54
54
|
"is-editable": isEditable,
|
|
55
55
|
"is-dragging-widget": isDraggingWidget,
|
|
56
56
|
}), visualizationClassName: "gd-visualization-switcher-widget-wrapper", renderAfterContent: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportableDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,wBAAgB,8CAA8C,CAAC,EAC3D,MAAM,EACN,MAAM,EACN,oBAAoB,EACpB,UAAU,EACb,EAAE,iDAAiD,
|
|
1
|
+
{"version":3,"file":"ExportableDashboardVisualizationSwitcherWidget.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,iDAAiD,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,wBAAgB,8CAA8C,CAAC,EAC3D,MAAM,EACN,MAAM,EACN,oBAAoB,EACpB,UAAU,EACb,EAAE,iDAAiD,2CAenD"}
|
|
@@ -8,5 +8,5 @@ import { DashboardVisualizationSwitcher } from "../../visualizationSwitcher/Dash
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export function ExportableDashboardVisualizationSwitcherWidget({ widget, screen, dashboardItemClasses, exportData, }) {
|
|
11
|
-
return (_jsx(DashboardItem, { className: cx(dashboardItemClasses, "type-visualization", "gd-dashboard-view-widget"), screen: screen, exportData: exportData?.section, children: _jsx(DashboardItemBase, { visualizationClassName: "gd-visualization-switcher-widget-wrapper", isExport: true, children: () => (_jsx(DashboardVisualizationSwitcher, { widget: widget, screen: screen, exportData: exportData })) }) }));
|
|
11
|
+
return (_jsx(DashboardItem, { as: "div", className: cx(dashboardItemClasses, "type-visualization", "gd-dashboard-view-widget"), screen: screen, exportData: exportData?.section, children: _jsx(DashboardItemBase, { visualizationClassName: "gd-visualization-switcher-widget-wrapper", isExport: true, children: () => (_jsx(DashboardVisualizationSwitcher, { widget: widget, screen: screen, exportData: exportData })) }) }));
|
|
12
12
|
}
|
|
@@ -7,7 +7,8 @@ interface IVisualizationSwitcherNavigationHeaderProps {
|
|
|
7
7
|
widget: IVisualizationSwitcherWidget;
|
|
8
8
|
onActiveVisualizationChange: (visualizationId: string) => void;
|
|
9
9
|
exportData?: CommonExportDataAttributes;
|
|
10
|
+
titleId: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function VisualizationSwitcherNavigationHeader({ widget, clientWidth, clientHeight, activeVisualization, onActiveVisualizationChange, exportData }: IVisualizationSwitcherNavigationHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function VisualizationSwitcherNavigationHeader({ widget, clientWidth, clientHeight, activeVisualization, onActiveVisualizationChange, exportData, titleId }: IVisualizationSwitcherNavigationHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=VisualizationSwitcherNavigationHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualizationSwitcherNavigationHeader.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAU7F,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAG3E,UAAU,2CAA2C;IACjD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,mBAAmB,EAAE,cAAc,CAAC;IACpC,MAAM,EAAE,4BAA4B,CAAC;IACrC,2BAA2B,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"VisualizationSwitcherNavigationHeader.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAU7F,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAG3E,UAAU,2CAA2C;IACjD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,mBAAmB,EAAE,cAAc,CAAC;IACpC,MAAM,EAAE,4BAA4B,CAAC;IACrC,2BAA2B,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;CACnB;AAaD,wBAAgB,qCAAqC,CAAC,EAClD,MAAM,EACN,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,EAC3B,UAAU,EACV,OAAO,EACV,EAAE,2CAA2C,2CAkD7C"}
|
|
@@ -15,7 +15,7 @@ const alignPoints = [
|
|
|
15
15
|
offset: { x: 0, y: 9 },
|
|
16
16
|
},
|
|
17
17
|
];
|
|
18
|
-
export function VisualizationSwitcherNavigationHeader({ widget, clientWidth, clientHeight, activeVisualization, onActiveVisualizationChange, exportData, }) {
|
|
18
|
+
export function VisualizationSwitcherNavigationHeader({ widget, clientWidth, clientHeight, activeVisualization, onActiveVisualizationChange, exportData, titleId, }) {
|
|
19
19
|
const userInteraction = useDashboardUserInteraction();
|
|
20
20
|
const items = useMemo(() => {
|
|
21
21
|
return widget.visualizations.map((visualization) => ({
|
|
@@ -29,11 +29,11 @@ export function VisualizationSwitcherNavigationHeader({ widget, clientWidth, cli
|
|
|
29
29
|
onActiveVisualizationChange(item.id);
|
|
30
30
|
userInteraction.visualizationSwitcherInteraction("visualizationSwitcherSwitched");
|
|
31
31
|
}, [onActiveVisualizationChange, userInteraction]);
|
|
32
|
-
return (_jsx(Dropdown, { alignPoints: alignPoints, autofocusOnOpen: true, renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiListbox, { items: items, selectedItemId: activeVisualization.identifier, onSelect: handleSelectVisualization, onClose: closeDropdown, ariaAttributes: ariaAttributes, maxWidth: clientWidth ?? 200, dataTestId: "s-visualization-switcher-widget-list", itemDataTestId: "s-visualization-switcher-widget-list-item" })), renderButton: ({ toggleDropdown, isOpen, ariaAttributes, buttonRef }) => (_jsx(VisualizationSwitcherNavigationHeaderButton, { title: activeVisualization.title, isOpen: isOpen, toggleDropdown: toggleDropdown, clientHeight: clientHeight, exportData: exportData, ariaAttributes: ariaAttributes, ref: buttonRef })) }));
|
|
32
|
+
return (_jsx(Dropdown, { alignPoints: alignPoints, autofocusOnOpen: true, renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiListbox, { items: items, selectedItemId: activeVisualization.identifier, onSelect: handleSelectVisualization, onClose: closeDropdown, ariaAttributes: ariaAttributes, maxWidth: clientWidth ?? 200, dataTestId: "s-visualization-switcher-widget-list", itemDataTestId: "s-visualization-switcher-widget-list-item" })), renderButton: ({ toggleDropdown, isOpen, ariaAttributes, buttonRef }) => (_jsx(VisualizationSwitcherNavigationHeaderButton, { title: activeVisualization.title, isOpen: isOpen, toggleDropdown: toggleDropdown, clientHeight: clientHeight, exportData: exportData, ariaAttributes: ariaAttributes, titleId: titleId, ref: buttonRef })) }));
|
|
33
33
|
}
|
|
34
|
-
const VisualizationSwitcherNavigationHeaderButton = forwardRef(function VisualizationSwitcherNavigationHeaderButton({ isOpen, toggleDropdown, title, clientHeight, ariaAttributes, exportData }, ref) {
|
|
34
|
+
const VisualizationSwitcherNavigationHeaderButton = forwardRef(function VisualizationSwitcherNavigationHeaderButton({ isOpen, toggleDropdown, title, clientHeight, ariaAttributes, exportData, titleId }, ref) {
|
|
35
35
|
const classNames = cx("gd-visualization-switcher-widget-header s-visualization-switcher-widget-header", {
|
|
36
36
|
"is-open": isOpen,
|
|
37
37
|
});
|
|
38
|
-
return (_jsx("div", { ref: ref, className: classNames, onClick: toggleDropdown, tabIndex: 0, ...exportData, ...ariaAttributes, children: _jsx(DashboardItemHeadline, { clientHeight: clientHeight, title: title }) }));
|
|
38
|
+
return (_jsx("div", { ref: ref, className: classNames, onClick: toggleDropdown, tabIndex: 0, ...exportData, ...ariaAttributes, children: _jsx(DashboardItemHeadline, { clientHeight: clientHeight, title: title, titleId: titleId }) }));
|
|
39
39
|
});
|