@gooddata/sdk-ui-analytical-designer 11.68.0-alpha.8 → 11.68.0
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 +59 -390
- package/esm/actions/data_actions.d.ts +2 -1
- package/esm/actions/data_actions.d.ts.map +1 -1
- package/esm/actions/data_actions.js +2 -2
- package/esm/components/DeleteReportDialog.d.ts.map +1 -1
- package/esm/components/DeleteReportDialog.js +2 -2
- package/esm/components/DeleteReportDialogUsageList.d.ts.map +1 -1
- package/esm/components/DeleteReportDialogUsageList.js +33 -17
- package/esm/components/InsightUsageOnDashboards.d.ts.map +1 -1
- package/esm/components/InsightUsageOnDashboards.js +40 -27
- package/esm/components/SaveReportFromKDDialog.d.ts.map +1 -1
- package/esm/components/SaveReportFromKDDialog.js +11 -4
- package/esm/components/buckets/AttributeBucketItemHyperlinkConfiguration.js +2 -2
- package/esm/components/buckets/BucketReorderableItem.d.ts.map +1 -1
- package/esm/components/buckets/BucketReorderableItem.js +2 -2
- package/esm/components/buckets/DraggableBucketItem.d.ts.map +1 -1
- package/esm/components/buckets/DraggableBucketItem.js +2 -2
- package/esm/components/buckets/VisualizationPicker.d.ts.map +1 -1
- package/esm/components/buckets/VisualizationPicker.js +2 -3
- package/esm/components/catalog/hooks/GroupHook.js +3 -3
- package/esm/components/catalog/hooks/ScrollableAreaHook.d.ts.map +1 -1
- package/esm/components/catalog/hooks/ScrollableAreaHook.js +2 -2
- package/esm/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.d.ts.map +1 -1
- package/esm/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.js +2 -2
- package/esm/components/filterBar/dateFilter/presets.d.ts.map +1 -1
- package/esm/components/filterBar/dateFilter/presets.js +2 -2
- package/esm/components/saveReportFromKD/DocumentItem.d.ts +6 -0
- package/esm/components/saveReportFromKD/DocumentItem.d.ts.map +1 -0
- package/esm/components/saveReportFromKD/DocumentItem.js +11 -0
- package/esm/components/saveReportFromKD/InsightUsageOnDashboardsList.d.ts +3 -2
- package/esm/components/saveReportFromKD/InsightUsageOnDashboardsList.d.ts.map +1 -1
- package/esm/components/saveReportFromKD/InsightUsageOnDashboardsList.js +3 -2
- package/esm/components/shared/AttributeBubbleContent.d.ts.map +1 -1
- package/esm/components/shared/AttributeBubbleContent.js +5 -3
- package/esm/convertors/fromBackend/VisualizationConverter.d.ts.map +1 -1
- package/esm/convertors/fromBackend/VisualizationConverter.js +2 -3
- package/esm/internal.d.ts +1 -0
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +1 -0
- package/esm/models/metadata.d.ts.map +1 -1
- package/esm/models/metadata.js +9 -6
- package/esm/postMessageApi/actions/open_insight_actions.d.ts.map +1 -1
- package/esm/postMessageApi/actions/open_insight_actions.js +2 -2
- package/esm/postMessageApi/outgoing/parent_origin_validation.d.ts +39 -0
- package/esm/postMessageApi/outgoing/parent_origin_validation.d.ts.map +1 -0
- package/esm/postMessageApi/outgoing/parent_origin_validation.js +36 -0
- package/esm/postMessageApi/sagas/command_received_saga.d.ts +68 -1
- package/esm/postMessageApi/sagas/command_received_saga.d.ts.map +1 -1
- package/esm/postMessageApi/sagas/command_received_saga.js +21 -3
- package/esm/postMessageApi/sagas/control_filtering_saga.d.ts.map +1 -1
- package/esm/postMessageApi/sagas/control_filtering_saga.js +6 -6
- package/esm/postMessageApi/sagas/incoming_command_sagas.d.ts +67 -1
- package/esm/postMessageApi/sagas/incoming_command_sagas.d.ts.map +1 -1
- package/esm/postMessageApi/sagas/post_message_saga_helper.d.ts.map +1 -1
- package/esm/postMessageApi/sagas/post_message_saga_helper.js +3 -3
- package/esm/sagas/open_report_sagas.d.ts +9 -2
- package/esm/sagas/open_report_sagas.d.ts.map +1 -1
- package/esm/sagas/open_report_sagas.js +8 -5
- package/esm/sagas/sagas.d.ts +67 -1
- package/esm/sagas/sagas.d.ts.map +1 -1
- package/esm/selectors/buckets_selector.js +3 -3
- package/esm/selectors/insight_selectors.d.ts.map +1 -1
- package/esm/selectors/insight_selectors.js +3 -3
- package/esm/selectors/report_selector.d.ts.map +1 -1
- package/esm/selectors/report_selector.js +3 -2
- package/esm/selectors/report_visualization_selector.d.ts +4 -4
- package/esm/selectors/save_report_from_kd_dialog_selector.d.ts +26 -2
- package/esm/selectors/save_report_from_kd_dialog_selector.d.ts.map +1 -1
- package/esm/selectors/save_report_from_kd_dialog_selector.js +3 -2
- package/esm/selectors/save_report_selector.d.ts +45 -5
- package/esm/selectors/save_report_selector.d.ts.map +1 -1
- package/esm/selectors/save_report_selector.js +13 -12
- package/esm/services/report_service.js +3 -3
- package/esm/store/attribute_elements/attribute_elements_reducer.js +4 -4
- package/esm/store/bucket_filters/bucket_filters_operations.d.ts.map +1 -1
- package/esm/store/bucket_filters/bucket_filters_operations.js +2 -3
- package/esm/store/buckets/buckets_removal_helpers.d.ts.map +1 -1
- package/esm/store/buckets/buckets_removal_helpers.js +4 -4
- package/esm/store/buckets/extended_reference_point_operations.d.ts.map +1 -1
- package/esm/store/buckets/extended_reference_point_operations.js +3 -3
- package/esm/store/buckets/helpers/totals_for_new_measure.js +3 -3
- package/esm/store/insight_usage/insight_usage_helpers.d.ts +2 -1
- package/esm/store/insight_usage/insight_usage_helpers.d.ts.map +1 -1
- package/esm/store/insight_usage/insight_usage_helpers.js +4 -3
- package/esm/store/insight_usage/insight_usage_selectors.d.ts +23 -0
- package/esm/store/insight_usage/insight_usage_selectors.d.ts.map +1 -1
- package/esm/store/insight_usage/insight_usage_selectors.js +4 -1
- package/esm/store/insight_usage/insight_usage_slice.d.ts.map +1 -1
- package/esm/store/insight_usage/insight_usage_slice.js +1 -0
- package/esm/store/insight_usage/insight_usage_state.d.ts +6 -0
- package/esm/store/insight_usage/insight_usage_state.d.ts.map +1 -1
- package/esm/store/metric_editor/metric_editor_sagas.d.ts.map +1 -1
- package/esm/store/metric_editor/metric_editor_sagas.js +2 -3
- package/esm/store/properties/properties_helpers.js +3 -3
- package/esm/store/recommendations/recommendations_slice.d.ts.map +1 -1
- package/esm/store/recommendations/recommendations_slice.js +2 -2
- package/esm/tests/constants.test.helpers.d.ts.map +1 -1
- package/esm/tests/constants.test.helpers.js +2 -2
- package/esm/translations/de-DE.json +19 -9
- package/esm/translations/en-AU.json +16 -6
- package/esm/translations/en-GB.json +16 -6
- package/esm/translations/en-US.json +53 -13
- package/esm/translations/es-419.json +16 -6
- package/esm/translations/es-ES.json +16 -6
- package/esm/translations/fi-FI.json +16 -6
- package/esm/translations/fr-CA.json +16 -6
- package/esm/translations/fr-FR.json +16 -6
- package/esm/translations/id-ID.json +16 -6
- package/esm/translations/it-IT.json +16 -6
- package/esm/translations/ja-JP.json +16 -6
- package/esm/translations/ko-KR.json +16 -6
- package/esm/translations/nl-NL.json +16 -6
- package/esm/translations/pl-PL.json +16 -6
- package/esm/translations/pt-BR.json +16 -6
- package/esm/translations/pt-PT.json +16 -6
- package/esm/translations/ru-RU.json +16 -6
- package/esm/translations/sl-SI.json +16 -6
- package/esm/translations/th-TH.json +16 -6
- package/esm/translations/tr-TR.json +16 -6
- package/esm/translations/uk-UA.json +16 -6
- package/esm/translations/vi-VN.json +16 -6
- package/esm/translations/zh-HK.json +16 -6
- package/esm/translations/zh-Hans.json +16 -6
- package/esm/translations/zh-Hant.json +16 -6
- package/esm/typings/catalog.d.ts +4 -0
- package/esm/typings/catalog.d.ts.map +1 -1
- package/esm/utils/api.js +3 -3
- package/esm/utils/dropdown.js +2 -2
- package/esm/utils/hooks/WindowResizeHook.js +2 -2
- package/package.json +21 -21
- package/styles/css/delete_report_dialog.css +16 -0
- package/styles/css/delete_report_dialog.css.map +1 -1
- package/styles/css/editor_header.css +80 -71
- package/styles/css/editor_header.css.map +1 -1
- package/styles/css/main.css +100 -71
- package/styles/css/main.css.map +1 -1
- package/styles/css/save_report_from_kd_dialog.css +6 -0
- package/styles/css/save_report_from_kd_dialog.css.map +1 -1
- package/styles/scss/delete_report_dialog.scss +21 -1
- package/styles/scss/editor_header.scss +85 -83
- package/styles/scss/save_report_from_kd_dialog.scss +8 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_actions.d.ts","sourceRoot":"","sources":["../../src/actions/data_actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;mDAK/B,CAAC;AAEF,eAAO,MAAM,aAAa;;kDAEvB,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;qDAK1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;uDAK/B,CAAC;AAEF,eAAO,MAAM,eAAe;;wDAK3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;yDAKjC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;2DAKnC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;kEAKzC,CAAC;AAEF,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"data_actions.d.ts","sourceRoot":"","sources":["../../src/actions/data_actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;mDAK/B,CAAC;AAEF,eAAO,MAAM,aAAa;;kDAEvB,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;qDAK1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;uDAK/B,CAAC;AAEF,eAAO,MAAM,eAAe;;wDAK3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;yDAKjC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;2DAKnC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;kEAKzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;yEAK1C,CAAC;AAEF,eAAO,MAAM,6BAA6B,0GAAiE,CAAC"}
|
|
@@ -25,7 +25,7 @@ export const setDateDatasetsUpdating = createAction(ActionTypeKeys.SET_DATE_DATA
|
|
|
25
25
|
export const setDateDatasetsDropdownLoaded = createAction(ActionTypeKeys.SET_DATE_DATASETS_DROPDOWN_LOADED, (isLoaded) => ({
|
|
26
26
|
payload: { isLoaded },
|
|
27
27
|
}));
|
|
28
|
-
export const updateInsightUsageOnDashboards = createAction(ActionTypeKeys.STORE_UPDATE_INSIGHT_USAGE_ON_DASHBOARDS, (usages, dashboards) => ({
|
|
29
|
-
payload: { usages, dashboards },
|
|
28
|
+
export const updateInsightUsageOnDashboards = createAction(ActionTypeKeys.STORE_UPDATE_INSIGHT_USAGE_ON_DASHBOARDS, (usages, dashboards, documents = []) => ({
|
|
29
|
+
payload: { usages, dashboards, documents },
|
|
30
30
|
}));
|
|
31
31
|
export const resetInsightUsageOnDashboards = createAction(ActionTypeKeys.RESET_INSIGHT_USAGE_ON_DASHBOARDS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteReportDialog.d.ts","sourceRoot":"","sources":["../../src/components/DeleteReportDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeleteReportDialog.d.ts","sourceRoot":"","sources":["../../src/components/DeleteReportDialog.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAoC/E,MAAM,WAAW,wBAAwB;IACrC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,OAAO,sBAAsB,CAAC;CACjD;AAuBD,wBAAgB,kBAAkB,CAAC,EAAE,aAAsC,EAAE,EAAE,wBAAwB,kDA8FtG"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
import { sortBy } from "lodash-es";
|
|
5
4
|
import { FormattedMessage, defineMessages, useIntl } from "react-intl";
|
|
6
5
|
import { useDispatch, useSelector } from "react-redux";
|
|
7
6
|
import { useCancelablePromise } from "@gooddata/sdk-ui";
|
|
8
7
|
import { ConfirmDialog as ConfirmDialogComponent } from "@gooddata/sdk-ui-kit";
|
|
8
|
+
import { _sortBy } from "@gooddata/util";
|
|
9
9
|
import { deleteReport } from "../actions/delete_actions.js";
|
|
10
10
|
import { hideDialog } from "../actions/dialogs_actions.js";
|
|
11
11
|
import { deleteReportDialogSelector } from "../selectors/dialogs_selector.js";
|
|
@@ -37,7 +37,7 @@ const useReferencingObjects = (projectId, insightRef, isActive) => {
|
|
|
37
37
|
const userDashboards = await getAnalyticalDashboards(projectId);
|
|
38
38
|
return {
|
|
39
39
|
dashboards: getInsightUsageOnDashboards(analyticalDashboards || [], userDashboards),
|
|
40
|
-
documents:
|
|
40
|
+
documents: _sortBy(documents ?? [], (document) => document.title.trim().toLowerCase()),
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
43
|
}, [projectId, insightRef, isActive]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteReportDialogUsageList.d.ts","sourceRoot":"","sources":["../../src/components/DeleteReportDialogUsageList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC3G,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"DeleteReportDialogUsageList.d.ts","sourceRoot":"","sources":["../../src/components/DeleteReportDialogUsageList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC3G,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AAmB9F,KAAK,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC;AAIjE,UAAU,iCAAiC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,qBAAqB,EAAE,wBAAwB,CAAC;IAChD,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,kBAAkB,EAAE,kBAAkB,CAAC;CAC1C;AAqID,wBAAgB,2BAA2B,CAAC,EACxC,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,kBAAkB,GACrB,EAAE,iCAAiC,2CAmCnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2021-2026 GoodData Corporation
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { FormattedMessage, defineMessages, useIntl } from "react-intl";
|
|
@@ -10,20 +10,29 @@ const messages = defineMessages({
|
|
|
10
10
|
notUsed: { id: "dialogs.deleteReportConfirmation.usage.notUsed" },
|
|
11
11
|
dashboardsUsage: { id: "dialogs.deleteReportConfirmation.usage" },
|
|
12
12
|
documentsUsage: { id: "dialogs.deleteReportConfirmation.usage.documents" },
|
|
13
|
+
dashboardsAndDocumentsUsage: { id: "dialogs.deleteReportConfirmation.usage.dashboardsAndDocuments" },
|
|
14
|
+
dashboardsGroup: { id: "dialogs.deleteReportConfirmation.usage.group.dashboards" },
|
|
15
|
+
documentsGroup: { id: "dialogs.deleteReportConfirmation.usage.group.documents" },
|
|
13
16
|
showMore: { id: "dialogs.deleteReportConfirmation.usage.showMore" },
|
|
14
17
|
showLess: { id: "dialogs.deleteReportConfirmation.usage.showLess" },
|
|
15
18
|
inaccessibleDashboards: { id: "dialogs.deleteReportConfirmation.usage.inaccessibleDashboards" },
|
|
16
19
|
inaccessibleDashboardsOnly: { id: "dialogs.deleteReportConfirmation.usage.inaccessibleDashboardsOnly" },
|
|
17
20
|
});
|
|
18
21
|
const strong = (chunks) => _jsx("strong", { children: chunks });
|
|
19
|
-
function
|
|
22
|
+
function UsageMessage({ header, children }) {
|
|
20
23
|
const intl = useIntl();
|
|
21
24
|
const [showUsageList, setShowUsageList] = useState(false);
|
|
22
|
-
return (_jsxs(Message, { type: "warning", children: [_jsxs("div", { className: "gd-delete-report-dialog-usage-list-header", children: [header, _jsx("span", { className:
|
|
25
|
+
return (_jsxs(Message, { type: "warning", children: [_jsxs("div", { className: "gd-delete-report-dialog-usage-list-header", children: [header, _jsx("span", { className: "gd-delete-report-dialog-usage-more s-delete-report-dialog-usage-more", children: _jsx(UiButton, { variant: "link", label: intl.formatMessage(showUsageList ? messages.showLess : messages.showMore), onClick: () => setShowUsageList(!showUsageList), accessibilityConfig: { ariaExpanded: showUsageList } }) })] }), showUsageList ? (_jsx("div", { className: "gd-delete-report-dialog-usage-list-wrapper", children: children })) : null] }));
|
|
26
|
+
}
|
|
27
|
+
function UsageGroup({ title, className, children }) {
|
|
28
|
+
return (_jsxs("div", { className: `gd-delete-report-dialog-usage-group ${className}`, children: [_jsx("h4", { className: "gd-delete-report-dialog-usage-group-heading", children: title }), children] }));
|
|
23
29
|
}
|
|
24
30
|
function ReferencedDashboardsList({ referencingDashboards, isEmbedded, analyticalDashboardUriFactory, }) {
|
|
25
|
-
const { accessibleDashboards } = referencingDashboards;
|
|
26
|
-
|
|
31
|
+
const { accessibleDashboards, inaccessibleDashboardsCount } = referencingDashboards;
|
|
32
|
+
const renderListOfAccessible = accessibleDashboards.length > 0;
|
|
33
|
+
const renderInaccessibleOnly = accessibleDashboards.length === 0 && inaccessibleDashboardsCount > 0;
|
|
34
|
+
const renderAlsoInaccessible = accessibleDashboards.length > 0 && inaccessibleDashboardsCount > 0;
|
|
35
|
+
return (_jsxs(_Fragment, { children: [renderListOfAccessible ? (_jsx("ul", { className: "gd-delete-report-dialog-usage-list", children: accessibleDashboards.map(({ id, title }) => (_jsx(DeleteReportDialogUsageListItem, { id: id, title: title, isEmbedded: isEmbedded, uriFactory: analyticalDashboardUriFactory }, id))) })) : null, renderAlsoInaccessible ? (_jsx(InaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null, renderInaccessibleOnly ? (_jsx(OnlyInaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null] }));
|
|
27
36
|
}
|
|
28
37
|
function InaccessibleDashboardsMessage({ count }) {
|
|
29
38
|
return (_jsx("div", { className: "gd-delete-report-dialog-usage-inaccessible s-delete-report-dialog-usage-inaccessible", children: _jsx(FormattedMessage, { ...messages.inaccessibleDashboards, values: { count, b: (chunks) => _jsx("b", { children: chunks }) } }) }));
|
|
@@ -31,21 +40,28 @@ function InaccessibleDashboardsMessage({ count }) {
|
|
|
31
40
|
function OnlyInaccessibleDashboardsMessage({ count }) {
|
|
32
41
|
return (_jsx("div", { className: "gd-delete-report-dialog-usage-inaccessible s-delete-report-dialog-usage-inaccessible", children: _jsx(FormattedMessage, { ...messages.inaccessibleDashboardsOnly, values: { count } }) }));
|
|
33
42
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
const renderListOfAccessible = accessibleDashboards.length > 0;
|
|
37
|
-
const renderInaccessibleOnly = accessibleDashboards.length === 0 && inaccessibleDashboardsCount > 0;
|
|
38
|
-
const renderAlsoInaccessible = accessibleDashboards.length > 0 && inaccessibleDashboardsCount > 0;
|
|
39
|
-
return (_jsxs(UsageSection, { header: _jsx(FormattedMessage, { ...messages.dashboardsUsage, values: { dashboardsCount: allDashboardsCount, strong } }), toggleClassName: "s-delete-report-dialog-usage-more", children: [renderListOfAccessible ? (_jsx(ReferencedDashboardsList, { isEmbedded: isEmbedded, referencingDashboards: referencingDashboards, analyticalDashboardUriFactory: analyticalDashboardUriFactory })) : null, renderAlsoInaccessible ? (_jsx(InaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null, renderInaccessibleOnly ? (_jsx(OnlyInaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null] }));
|
|
40
|
-
}
|
|
41
|
-
function ReferencedDocuments({ isEmbedded, referencingDocuments, documentUriFactory, }) {
|
|
42
|
-
return (_jsx(UsageSection, { header: _jsx(FormattedMessage, { ...messages.documentsUsage, values: { documentsCount: referencingDocuments.length, strong } }), toggleClassName: "s-delete-report-dialog-usage-documents-more", children: _jsx("ul", { className: "gd-delete-report-dialog-usage-list", children: referencingDocuments.map(({ id, title }) => (_jsx(DeleteReportDialogUsageListItem, { id: id, title: title, isEmbedded: isEmbedded, uriFactory: documentUriFactory }, id))) }) }));
|
|
43
|
+
function ReferencedDocumentsList({ isEmbedded, referencingDocuments, documentUriFactory, }) {
|
|
44
|
+
return (_jsx("ul", { className: "gd-delete-report-dialog-usage-list", children: referencingDocuments.map(({ id, title }) => (_jsx(DeleteReportDialogUsageListItem, { id: id, title: title, isEmbedded: isEmbedded, uriFactory: documentUriFactory }, id))) }));
|
|
43
45
|
}
|
|
44
46
|
export function DeleteReportDialogUsageList({ isLoading, isEmbedded, referencingDashboards, referencingDocuments, analyticalDashboardUriFactory, documentUriFactory, }) {
|
|
45
47
|
if (isLoading) {
|
|
46
48
|
return (_jsxs("div", { className: "gd-delete-report-dialog-usage-loading s-delete-report-dialog-usage-loading", children: [_jsx(Spinner, {}), _jsx("span", { className: "gd-delete-report-dialog-usage-loading-message", children: _jsx(FormattedMessage, { ...messages.checking }) })] }));
|
|
47
49
|
}
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
50
|
+
const dashboardsCount = referencingDashboards.allDashboardsCount;
|
|
51
|
+
const documentsCount = referencingDocuments.length;
|
|
52
|
+
const dashboardsList = (_jsx(ReferencedDashboardsList, { isEmbedded: isEmbedded, referencingDashboards: referencingDashboards, analyticalDashboardUriFactory: analyticalDashboardUriFactory }));
|
|
53
|
+
const documentsList = (_jsx(ReferencedDocumentsList, { isEmbedded: isEmbedded, referencingDocuments: referencingDocuments, documentUriFactory: documentUriFactory }));
|
|
54
|
+
return (_jsx("div", { className: "gd-delete-report-dialog-usage s-delete-report-dialog-usage", children: renderUsage(dashboardsCount, documentsCount, dashboardsList, documentsList) }));
|
|
55
|
+
}
|
|
56
|
+
function renderUsage(dashboardsCount, documentsCount, dashboardsList, documentsList) {
|
|
57
|
+
if (dashboardsCount > 0 && documentsCount > 0) {
|
|
58
|
+
return (_jsxs(UsageMessage, { header: _jsx(FormattedMessage, { ...messages.dashboardsAndDocumentsUsage, values: { count: dashboardsCount + documentsCount, strong } }), children: [_jsx(UsageGroup, { className: "s-delete-report-dialog-usage-dashboards", title: _jsx(FormattedMessage, { ...messages.dashboardsGroup, values: { count: dashboardsCount } }), children: dashboardsList }), _jsx(UsageGroup, { className: "s-delete-report-dialog-usage-documents", title: _jsx(FormattedMessage, { ...messages.documentsGroup, values: { count: documentsCount } }), children: documentsList })] }));
|
|
59
|
+
}
|
|
60
|
+
if (dashboardsCount > 0) {
|
|
61
|
+
return (_jsx(UsageMessage, { header: _jsx(FormattedMessage, { ...messages.dashboardsUsage, values: { dashboardsCount, strong } }), children: dashboardsList }));
|
|
62
|
+
}
|
|
63
|
+
if (documentsCount > 0) {
|
|
64
|
+
return (_jsx(UsageMessage, { header: _jsx(FormattedMessage, { ...messages.documentsUsage, values: { documentsCount, strong } }), children: documentsList }));
|
|
65
|
+
}
|
|
66
|
+
return (_jsx(Message, { type: "progress", children: _jsx("div", { className: "gd-delete-report-dialog-no-usage", children: _jsx(FormattedMessage, { ...messages.notUsed }) }) }));
|
|
51
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightUsageOnDashboards.d.ts","sourceRoot":"","sources":["../../src/components/InsightUsageOnDashboards.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightUsageOnDashboards.d.ts","sourceRoot":"","sources":["../../src/components/InsightUsageOnDashboards.tsx"],"names":[],"mappings":"AAyRA,wBAAgB,wBAAwB,4CA8CvC"}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
|
-
import {
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
6
6
|
import { useSelector } from "react-redux";
|
|
7
|
-
import {
|
|
7
|
+
import { Overlay, UiButton, UiFocusManager, UiIcon, UiSubmenuHeader } from "@gooddata/sdk-ui-kit";
|
|
8
8
|
import { getIsEmbedded } from "../selectors/meta_selector.js";
|
|
9
|
-
import { getSourceDashboardId
|
|
10
|
-
import { analyticalDashboardUriFactorySelector, } from "../selectors/uri_selector.js";
|
|
11
|
-
import { getInsightUsageOnDashboardsSelector } from "../store/insight_usage/insight_usage_selectors.js";
|
|
9
|
+
import { getSourceDashboardId } from "../selectors/route_selector.js";
|
|
10
|
+
import { analyticalDashboardUriFactorySelector, documentUriFactorySelector, } from "../selectors/uri_selector.js";
|
|
11
|
+
import { getInsightUsageInDocumentsSelector, getInsightUsageOnDashboardsSelector, } from "../store/insight_usage/insight_usage_selectors.js";
|
|
12
|
+
function UsageItem({ title, icon, href, className, suffix }) {
|
|
13
|
+
return (_jsxs("li", { className: classNames("gd-usages-item", className), children: [_jsx(UiIcon, { type: icon, size: 18, color: "complementary-5", accessibilityConfig: { ariaHidden: true } }), href ? (_jsx("a", { className: "gd-dashboard-link", href: href, target: "_blank", rel: "noopener noreferrer", children: title })) : (_jsx("span", { className: "gd-dashboard-link", children: title })), suffix ? _jsx("span", { className: "gd-dashboard-link-hover-icon", children: suffix }) : null] }));
|
|
14
|
+
}
|
|
12
15
|
function DashboardItem({ dashboard, sourceDashboardIdentifier, isEmbedded, analyticalDashboardUriFactory, }) {
|
|
13
16
|
const { title, id } = dashboard;
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return (_jsxs(Item, { className: cssClassNames, onClick: goToDashboard, children: [_jsx("p", { className: "gd-dashboard-link", title: title, children: title }), _jsx("span", { className: "gd-dashboard-link-hover-icon", children: isEditingNow ? _jsx(FormattedMessage, { id: "dashboard.editing.now" }) : null })] }));
|
|
17
|
+
const isSourceDashboard = id === sourceDashboardIdentifier;
|
|
18
|
+
const isEditingNow = isSourceDashboard && isEmbedded;
|
|
19
|
+
const isLinkable = !isEmbedded && !isSourceDashboard;
|
|
20
|
+
return (_jsx(UsageItem, { title: title, icon: "dashboard", href: isLinkable ? `${window.location.origin}${analyticalDashboardUriFactory(id)}` : undefined, className: classNames("s-usage-item", { "editing-now": isEditingNow }), suffix: isEditingNow ? _jsx(FormattedMessage, { id: "dashboard.editing.now" }) : undefined }));
|
|
21
|
+
}
|
|
22
|
+
function DocumentItem({ item, isEmbedded, documentUriFactory }) {
|
|
23
|
+
const { title, id } = item;
|
|
24
|
+
return (_jsx(UsageItem, { title: title, icon: "report", href: isEmbedded ? undefined : `${window.location.origin}${documentUriFactory(id)}`, className: "s-usage-document-item" }));
|
|
25
|
+
}
|
|
26
|
+
function UsageGroup({ title, className, children }) {
|
|
27
|
+
const [isExpanded, setExpanded] = useState(true);
|
|
28
|
+
const contentId = useId();
|
|
29
|
+
return (_jsxs("div", { className: classNames("gd-usages-group", className), children: [_jsx("h4", { className: "gd-usages-group-heading", children: _jsxs("button", { type: "button", className: "gd-usages-group-toggle", "aria-expanded": isExpanded, "aria-controls": isExpanded ? contentId : undefined, onClick: () => setExpanded((expanded) => !expanded), children: [_jsx(UiIcon, { type: isExpanded ? "navigateDown" : "navigateRight", size: 14, accessibilityConfig: { ariaHidden: true } }), _jsx("span", { children: title })] }) }), isExpanded ? _jsx("div", { id: contentId, children: children }) : null] }));
|
|
28
30
|
}
|
|
29
31
|
function InaccessibleDashboardsMessage({ count }) {
|
|
30
32
|
return (_jsx("div", { className: "gd-usages-inaccessible-dashboards s-usages-inaccessible-dashboards", children: _jsx(FormattedMessage, { id: "dialogs.usage.inaccessibleDashboards", values: { count, b: (chunks) => _jsx("b", { children: chunks }) } }) }));
|
|
@@ -32,28 +34,39 @@ function InaccessibleDashboardsMessage({ count }) {
|
|
|
32
34
|
function OnlyInaccessibleDashboardsMessage({ count }) {
|
|
33
35
|
return (_jsx("div", { className: "gd-usages-inaccessible-dashboards-only s-usages-inaccessible-dashboards-only", children: _jsx(FormattedMessage, { id: "dialogs.usage.inaccessibleDashboardsOnly", values: { count } }) }));
|
|
34
36
|
}
|
|
35
|
-
function DashboardItemsDialog({ onClose, insightUsageOnDashboard, sourceDashboardIdentifier, isEmbedded, analyticalDashboardUriFactory,
|
|
36
|
-
const
|
|
37
|
+
function DashboardItemsDialog({ onClose, insightUsageOnDashboard, documents, sourceDashboardIdentifier, isEmbedded, analyticalDashboardUriFactory, documentUriFactory, }) {
|
|
38
|
+
const intl = useIntl();
|
|
39
|
+
const { accessibleDashboards, inaccessibleDashboardsCount, allDashboardsCount } = insightUsageOnDashboard;
|
|
37
40
|
const headerId = useId();
|
|
38
41
|
const renderInaccessibleOnly = accessibleDashboards.length === 0 && inaccessibleDashboardsCount > 0;
|
|
39
42
|
const renderAlsoInaccessible = accessibleDashboards.length > 0 && inaccessibleDashboardsCount > 0;
|
|
40
|
-
return (_jsx(Overlay, { alignTo: ".gd-insight-usage-on-dashboards", alignPoints: [{ align: "bl tl" }], closeOnMouseDrag: true, closeOnOutsideClick: true, closeOnEscape: true, onClose: onClose, className: "gd-insight-usages-overlay s-insight-usages-overlay", children: _jsx(UiFocusManager, { enableAutofocus: true, enableReturnFocusOnUnmount: true, children:
|
|
43
|
+
return (_jsx(Overlay, { alignTo: ".gd-insight-usage-on-dashboards", alignPoints: [{ align: "bl tl" }], closeOnMouseDrag: true, closeOnOutsideClick: true, closeOnEscape: true, onClose: onClose, className: "gd-insight-usages-overlay s-insight-usages-overlay", children: _jsx(UiFocusManager, { enableAutofocus: true, enableReturnFocusOnUnmount: true, children: _jsxs("div", { className: "gd-insight-usages-dialog", role: "dialog", "aria-labelledby": headerId, tabIndex: 0, children: [_jsx(UiSubmenuHeader, { title: intl.formatMessage({ id: "insight.usages.overlay.header" }), titleId: headerId, height: "medium" }), _jsxs("div", { className: "gd-usages-overlay-body s-usages-overlay-body", children: [allDashboardsCount > 0 ? (_jsxs(UsageGroup, { className: "s-usages-group-dashboards", title: _jsx(FormattedMessage, { id: "insight.usages.overlay.group.dashboards", values: { count: allDashboardsCount } }), children: [accessibleDashboards.length > 0 ? (_jsx("ul", { className: "gd-usages-group-items", role: "list", children: accessibleDashboards.map((dashboard) => (_jsx(DashboardItem, { dashboard: dashboard, isEmbedded: isEmbedded, sourceDashboardIdentifier: sourceDashboardIdentifier, analyticalDashboardUriFactory: analyticalDashboardUriFactory }, dashboard.id))) })) : null, renderAlsoInaccessible ? (_jsx(InaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null, renderInaccessibleOnly ? (_jsx(OnlyInaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null] })) : null, documents.length > 0 ? (_jsx(UsageGroup, { className: "s-usages-group-documents", title: _jsx(FormattedMessage, { id: "insight.usages.overlay.group.documents", values: { count: documents.length } }), children: _jsx("ul", { className: "gd-usages-group-items", role: "list", children: documents.map((item) => (_jsx(DocumentItem, { item: item, isEmbedded: isEmbedded, documentUriFactory: documentUriFactory }, item.id))) }) })) : null] })] }) }) }));
|
|
44
|
+
}
|
|
45
|
+
function getUsageLabel(intl, dashboardsCount, documentsCount) {
|
|
46
|
+
if (documentsCount === 0) {
|
|
47
|
+
return intl.formatMessage({ id: "insight.usages.button.label" }, { dashboardsCount });
|
|
48
|
+
}
|
|
49
|
+
if (dashboardsCount === 0) {
|
|
50
|
+
return intl.formatMessage({ id: "insight.usages.button.label.documents" }, { documentsCount });
|
|
51
|
+
}
|
|
52
|
+
return intl.formatMessage({ id: "insight.usages.button.label.dashboardsAndDocuments" }, { dashboardsCount, documentsCount });
|
|
41
53
|
}
|
|
42
54
|
export function InsightUsageOnDashboards() {
|
|
43
55
|
const insightUsageOnDashboard = useSelector(getInsightUsageOnDashboardsSelector);
|
|
56
|
+
const documents = useSelector(getInsightUsageInDocumentsSelector);
|
|
44
57
|
const isEmbedded = useSelector(getIsEmbedded);
|
|
45
58
|
const sourceDashboardIdentifier = useSelector(getSourceDashboardId);
|
|
46
|
-
// aliased so the local value does not shadow the isAllowedDashboardLinks selector it is read with
|
|
47
|
-
const isDashboardLinksAllowed = useSelector(isAllowedDashboardLinks);
|
|
48
59
|
const analyticalDashboardUriFactory = useSelector(analyticalDashboardUriFactorySelector);
|
|
60
|
+
const documentUriFactory = useSelector(documentUriFactorySelector);
|
|
49
61
|
const intl = useIntl();
|
|
50
62
|
const [isOpen, setOpen] = useState(false);
|
|
51
63
|
const toggleOpen = () => setOpen((state) => !state);
|
|
52
|
-
const
|
|
53
|
-
|
|
64
|
+
const dashboardsCount = insightUsageOnDashboard.allDashboardsCount;
|
|
65
|
+
const usageLabel = getUsageLabel(intl, dashboardsCount, documents.length);
|
|
66
|
+
return (_jsxs("div", { className: "gd-insight-usage-on-dashboards s-gd-insight-usage-on-dashboards", children: [_jsx(UiButton, { label: String(dashboardsCount + documents.length), variant: "tertiary", size: "medium", iconBefore: "lineage", isSelected: isOpen, onClick: toggleOpen, tooltip: usageLabel, dataTestId: "s-insight-usages-of-dashboards-link", accessibilityConfig: {
|
|
54
67
|
ariaLabel: usageLabel,
|
|
55
68
|
ariaHaspopup: "dialog",
|
|
56
69
|
ariaExpanded: isOpen,
|
|
57
70
|
iconAriaHidden: true,
|
|
58
|
-
} }), isOpen ? (_jsx(DashboardItemsDialog, { insightUsageOnDashboard: insightUsageOnDashboard, isEmbedded: isEmbedded, sourceDashboardIdentifier: sourceDashboardIdentifier,
|
|
71
|
+
} }), isOpen ? (_jsx(DashboardItemsDialog, { insightUsageOnDashboard: insightUsageOnDashboard, documents: documents, isEmbedded: isEmbedded, sourceDashboardIdentifier: sourceDashboardIdentifier, analyticalDashboardUriFactory: analyticalDashboardUriFactory, documentUriFactory: documentUriFactory, onClose: toggleOpen })) : null] }));
|
|
59
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveReportFromKDDialog.d.ts","sourceRoot":"","sources":["../../src/components/SaveReportFromKDDialog.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SaveReportFromKDDialog.d.ts","sourceRoot":"","sources":["../../src/components/SaveReportFromKDDialog.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,sBAAsB,mDAoLrC"}
|
|
@@ -15,7 +15,7 @@ const DIALOG_CREATE_MODE = "create";
|
|
|
15
15
|
export function SaveReportFromKDDialog() {
|
|
16
16
|
const intl = useIntl();
|
|
17
17
|
const dispatch = useDispatch();
|
|
18
|
-
const { insightUsedOnDashboards, openSaveReportFromKD, editingReportTitle, isSaveAsNewReportOnly, canCreateCopy, } = useSelector(saveReportFromKDDialogSelector);
|
|
18
|
+
const { insightUsedOnDashboards, insightUsedInDocuments, openSaveReportFromKD, editingReportTitle, isSaveAsNewReportOnly, canCreateCopy, } = useSelector(saveReportFromKDDialogSelector);
|
|
19
19
|
const onHideDialog = useCallback(() => {
|
|
20
20
|
dispatch(hideDialog());
|
|
21
21
|
}, [dispatch]);
|
|
@@ -42,6 +42,7 @@ export function SaveReportFromKDDialog() {
|
|
|
42
42
|
if (!openSaveReportFromKD) {
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
|
+
const isUsedInDocuments = insightUsedInDocuments.length > 0;
|
|
45
46
|
const isUpdateMode = () => state.saveOption === DIALOG_UPDATE_MODE;
|
|
46
47
|
const isSaveAsNewMode = () => state.saveOption === DIALOG_CREATE_MODE;
|
|
47
48
|
const handleSaveOptionChange = (e) => {
|
|
@@ -68,9 +69,15 @@ export function SaveReportFromKDDialog() {
|
|
|
68
69
|
onReportSave(saveAsNew, true);
|
|
69
70
|
onHideDialog();
|
|
70
71
|
};
|
|
71
|
-
return (_jsxs(ConfirmDialog, { isPositive: true, onCancel: onHideDialog, onSubmit: handleSaveReportFromKDDialogSubmit, className: "save-report-dialog s-save-report-from-kd-dialog", headline: intl.formatMessage(
|
|
72
|
+
return (_jsxs(ConfirmDialog, { isPositive: true, onCancel: onHideDialog, onSubmit: handleSaveReportFromKDDialogSubmit, className: "save-report-dialog s-save-report-from-kd-dialog", headline: intl.formatMessage(isUsedInDocuments
|
|
73
|
+
? defineMessage({ id: "dialogs.saveReportFromKD.headline.documents" })
|
|
74
|
+
: defineMessage({ id: "dialogs.saveReportFromKD.headline" })), cancelButtonText: intl.formatMessage({
|
|
72
75
|
id: "dialogs.savingUntitledReportConfirmation.cancel",
|
|
73
|
-
}), submitButtonText: intl.formatMessage(isUpdateMode() ? defineMessage({ id: "save" }) : defineMessage({ id: "create.copy" })), isSubmitDisabled: state.isSubmitting, children: [_jsx("div", { children: _jsxs(BubbleHoverTrigger, { children: [_jsxs("label", { className: "input-radio-label", children: [_jsx("input", { type: "radio", className: "input-radio", value: DIALOG_UPDATE_MODE, onChange: handleSaveOptionChange, checked: isUpdateMode(), disabled: isSaveAsNewReportOnly }), _jsx("span", { className: "input-label-text", children: intl.formatMessage(
|
|
76
|
+
}), submitButtonText: intl.formatMessage(isUpdateMode() ? defineMessage({ id: "save" }) : defineMessage({ id: "create.copy" })), isSubmitDisabled: state.isSubmitting, children: [_jsx("div", { children: _jsxs(BubbleHoverTrigger, { children: [_jsxs("label", { className: "input-radio-label", children: [_jsx("input", { type: "radio", className: "input-radio", value: DIALOG_UPDATE_MODE, onChange: handleSaveOptionChange, checked: isUpdateMode(), disabled: isSaveAsNewReportOnly }), _jsx("span", { className: "input-label-text", children: intl.formatMessage(isUsedInDocuments
|
|
77
|
+
? defineMessage({ id: "dialogs.saveReportFromKD.radio.saveEverywhere" })
|
|
78
|
+
: defineMessage({
|
|
79
|
+
id: "dialogs.saveReportFromKD.radio.saveOnAllDashboard",
|
|
80
|
+
})) })] }), isSaveAsNewReportOnly ? (_jsx(Bubble, { alignTo: "input-radio-label", alignPoints: [{ align: "cr cl" }], children: intl.formatMessage({ id: "locked_report" }) })) : null] }) }), canCreateCopy ? (_jsx("div", { children: _jsxs("label", { className: "input-radio-label", children: [_jsx("input", { type: "radio", className: "input-radio s-save-option", value: DIALOG_CREATE_MODE, onChange: handleSaveOptionChange, checked: isSaveAsNewMode() }), _jsx("span", { className: "input-label-text", children: intl.formatMessage({
|
|
74
81
|
id: "dialogs.saveReportFromKD.radio.createCopyOfTheInsight",
|
|
75
|
-
}) })] }) })) : null, state.saveOption === DIALOG_CREATE_MODE && (_jsx("div", { className: "report-name-wrapper", children: _jsx(Input, { autofocus: true, label: intl.formatMessage({ id: "dialogs.saveReportFromKD.name" }), maxlength: MAX_TITLE_LENGTH, onFocus: handleReportNameFocus, onChange: (value) => handleReportNameChange(String(value)), placeholder: defaultReportName, value: state.newReportName, className: "s-report-name-input" }) })), insightUsedOnDashboards
|
|
82
|
+
}) })] }) })) : null, state.saveOption === DIALOG_CREATE_MODE && (_jsx("div", { className: "report-name-wrapper", children: _jsx(Input, { autofocus: true, label: intl.formatMessage({ id: "dialogs.saveReportFromKD.name" }), maxlength: MAX_TITLE_LENGTH, onFocus: handleReportNameFocus, onChange: (value) => handleReportNameChange(String(value)), placeholder: defaultReportName, value: state.newReportName, className: "s-report-name-input" }) })), insightUsedOnDashboards.allDashboardsCount > 0 || isUsedInDocuments ? (_jsx(InsightUsageOnDashboardsList, { insightUsedOnDashboards: insightUsedOnDashboards, insightUsedInDocuments: insightUsedInDocuments })) : null] }));
|
|
76
83
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2021-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useState } from "react";
|
|
4
|
-
import { debounce } from "lodash-es";
|
|
5
4
|
import { useIntl } from "react-intl";
|
|
6
5
|
import { useDispatch, useSelector } from "react-redux";
|
|
7
6
|
import { InputPure } from "@gooddata/sdk-ui-kit";
|
|
7
|
+
import { _debounce } from "@gooddata/util";
|
|
8
8
|
import { visualizationPropertiesChanged } from "../../actions/properties_actions.js";
|
|
9
9
|
import { VisualizationPropertiesSelectors } from "../../selectors/visualization_properties_selector.js";
|
|
10
10
|
export function AttributeBucketItemHyperlinkConfiguration({ localIdentifier, }) {
|
|
@@ -15,7 +15,7 @@ export function AttributeBucketItemHyperlinkConfiguration({ localIdentifier, })
|
|
|
15
15
|
const savedHyperLinkText = visPropertiesJS?.["hyperLinks"]?.[localIdentifier]?.staticElementsText;
|
|
16
16
|
const [hyperlinkStaticText, setHyperlinkStaticText] = useState(savedHyperLinkText ?? "");
|
|
17
17
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
18
|
-
const debouncedPropertiesChange = useCallback(
|
|
18
|
+
const debouncedPropertiesChange = useCallback(_debounce((...args) => {
|
|
19
19
|
dispatch(visualizationPropertiesChanged(...args));
|
|
20
20
|
}, 500), [dispatch]);
|
|
21
21
|
return (_jsxs(_Fragment, { children: [_jsx("span", { className: "adi-attribute-hyperlink-static-text-label", children: intl.formatMessage({ id: "dashboard.bucket_item.hyperlink_text" }) }), _jsx(InputPure, { className: "adi-attribute-hyperlink-static-text s-attribute-configuration-hyperlink-static-text", value: hyperlinkStaticText, onChange: (text) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BucketReorderableItem.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/BucketReorderableItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BucketReorderableItem.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/BucketReorderableItem.tsx"],"names":[],"mappings":"AAeA,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAEzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAKpE,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,UAAU,8BAA8B;IACpC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3D,sBAAsB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC;IACtG,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC;IAC9F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,oBAAoB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,2BACb,SAAQ,8BAA8B,EAAE,wBAAwB;CAAG;AAEvE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,2BAA2B,2CA+JvE;AAID,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,oBAG3F;AAED,wBAAgB,kBAAkB,CAC9B,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAE,MAAM,iBA8BpB"}
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useDrop } from "@evil-internetmann/react-dnd";
|
|
5
5
|
import classnames from "classnames";
|
|
6
|
-
import { omit } from "lodash-es";
|
|
7
6
|
import { useDispatch } from "react-redux";
|
|
7
|
+
import { _omit } from "@gooddata/util";
|
|
8
8
|
import { dropCatalogItem, reorderBucketItem } from "../../actions/dnd_actions.js";
|
|
9
9
|
import { CATALOG } from "../../constants/bucket.js";
|
|
10
10
|
import { BUCKET_ITEM, CATALOG_LIST_ITEM } from "../../constants/drag_item_types.js";
|
|
@@ -116,7 +116,7 @@ export function BucketReorderableItem(props) {
|
|
|
116
116
|
return false;
|
|
117
117
|
};
|
|
118
118
|
const childProps = {
|
|
119
|
-
...
|
|
119
|
+
..._omit(props, ["itemIsAllowedToReorder", "itemIsAllowedToReplace", "isWithinLimit"]),
|
|
120
120
|
onCatalogItemDropped,
|
|
121
121
|
reorderBucketItem: onReorderBucketItem,
|
|
122
122
|
onStartBucketItemDrag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableBucketItem.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/DraggableBucketItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DraggableBucketItem.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/DraggableBucketItem.tsx"],"names":[],"mappings":"AAUA,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACtB,MAAM,0BAA0B,CAAC;AAKlC,UAAU,gBAAgB;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,UAAU,4BAA4B;IAClC,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,oBAAoB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACtD,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,GAAG,gBAAgB,CAAC;AAEvF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAmDlE"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useDrag } from "@evil-internetmann/react-dnd";
|
|
5
|
-
import {
|
|
5
|
+
import { _omit } from "@gooddata/util";
|
|
6
6
|
import { BUCKET_ITEM } from "../../constants/drag_item_types.js";
|
|
7
7
|
import { getType } from "../../models/bucket_item.js";
|
|
8
8
|
import { BucketItemPure } from "./BucketItemPure.js";
|
|
@@ -33,7 +33,7 @@ export function DraggableBucketItem(props) {
|
|
|
33
33
|
isDragging: monitor.isDragging(),
|
|
34
34
|
}),
|
|
35
35
|
}), [bucketItem, bucket, index, onStartBucketItemDrag, onEndBucketItemDrag, collapsedItem]);
|
|
36
|
-
const pureProps =
|
|
36
|
+
const pureProps = _omit(props, ["bucket"]);
|
|
37
37
|
const localIdentifier = bucket.localIdentifier;
|
|
38
38
|
return (_jsx("div", { ref: dragRef, children: _jsx(BucketItemPure, { ...pureProps, isDragging: isDragging, localIdentifier: localIdentifier }) }));
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualizationPicker.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/VisualizationPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VisualizationPicker.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/VisualizationPicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AA0C/D,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAInH,UAAU,yBAAyB;IAC/B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,oBAAoB,EAAE,0BAA0B,CAAC;IACjD,OAAO,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC1D,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,0GAK7B,yBAAyB,6CA2F1B,CAAC"}
|
|
@@ -2,10 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import { range } from "lodash-es";
|
|
6
5
|
import { defineMessages, useIntl } from "react-intl";
|
|
7
6
|
import { Bubble, BubbleHoverTrigger } from "@gooddata/sdk-ui-kit";
|
|
8
|
-
import { _isEqual } from "@gooddata/util";
|
|
7
|
+
import { _isEqual, _range } from "@gooddata/util";
|
|
9
8
|
const visualizationTypeMessages = defineMessages({
|
|
10
9
|
table: { id: "table" },
|
|
11
10
|
line: { id: "line" },
|
|
@@ -85,7 +84,7 @@ export const VisualizationPicker = memo(function VisualizationPicker({ selected,
|
|
|
85
84
|
const fakeButtons = [];
|
|
86
85
|
if (visCount % rowLength) {
|
|
87
86
|
const isFake = true;
|
|
88
|
-
|
|
87
|
+
_range(rowLength - (visCount % rowLength)).forEach((key) => fakeButtons.push(_jsx("span", { className: getClasses(isFake) }, key)));
|
|
89
88
|
}
|
|
90
89
|
return [...realButtons, ...fakeButtons];
|
|
91
90
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { omitBy
|
|
3
|
+
import { omitBy } from "lodash-es";
|
|
4
4
|
import { isCatalogAttribute, isCatalogAttributeHierarchy, isCatalogComputedAttribute, isCatalogFact, isCatalogMeasure, objRefToString, } from "@gooddata/sdk-model";
|
|
5
|
-
import { _isEmpty } from "@gooddata/util";
|
|
5
|
+
import { _isEmpty, _sortBy } from "@gooddata/util";
|
|
6
6
|
import { displayFormToCacheDisplayForm, getPreferredAreaDisplayForm, getPreferredLocationDisplayForm, } from "../../../utils/displayForms.js";
|
|
7
7
|
import { areCatalogItemsEquals } from "../utils/equals.js";
|
|
8
8
|
import { isNonGroupableCatalogItem } from "../utils/groupableItem.js";
|
|
@@ -190,7 +190,7 @@ const createItemGroupsBase = (groups, items, availableItems, isLoadingItems, isL
|
|
|
190
190
|
tag: {
|
|
191
191
|
identifier: UNGROUPED,
|
|
192
192
|
},
|
|
193
|
-
},
|
|
193
|
+
}, _sortBy(items, (item) => {
|
|
194
194
|
return createOrganizedCatalogItemData(item).title.toUpperCase();
|
|
195
195
|
}), availableItems, isLocationIconEnabled, geoLabelType));
|
|
196
196
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollableAreaHook.d.ts","sourceRoot":"","sources":["../../../../src/components/catalog/hooks/ScrollableAreaHook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrollableAreaHook.d.ts","sourceRoot":"","sources":["../../../../src/components/catalog/hooks/ScrollableAreaHook.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB;;oBAEJ,IAAI;CAgB7B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { useRef } from "react";
|
|
3
|
-
import { debounce } from "lodash-es";
|
|
4
3
|
import { GOODSTRAP_SCROLLED_EVENT } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { _debounce } from "@gooddata/util";
|
|
5
5
|
export const useScrollableArea = () => {
|
|
6
6
|
const scrollableRef = useRef(null);
|
|
7
|
-
const onScroll =
|
|
7
|
+
const onScroll = _debounce(() => {
|
|
8
8
|
if (scrollableRef.current !== null) {
|
|
9
9
|
scrollableRef.current.dispatchEvent(new CustomEvent(GOODSTRAP_SCROLLED_EVENT, { bubbles: true }));
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportedPresetsHook.d.ts","sourceRoot":"","sources":["../../../../../src/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"supportedPresetsHook.d.ts","sourceRoot":"","sources":["../../../../../src/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,qBAAqB,EAI7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EAErC,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,iCACR,6BAA6B,uBACtC,qBAAqB,oCACR,gCAAgC,EAAE,+BACvC,OAAO;gCAGJ,6BAA6B;yCACpB,qBAAqB,EAAE;CAkCnE,CAAC;AAkBF;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C,mBACnC,gBAAgB,8BACJ,6BAA6B,iBAC1C,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,SAOrD,CAAC;AAYF;;;;;;;GAOG;AACH,eAAO,MAAM,iDAAiD,mBAC1C,gBAAgB,uCACK,qBAAqB,EAAE,iBAC7C,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,SAOrD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
2
|
import { useEffect, useMemo } from "react";
|
|
3
|
-
import { omit } from "lodash-es";
|
|
4
3
|
import { areObjRefsEqual, isDateFilterGranularity, } from "@gooddata/sdk-model";
|
|
5
4
|
import { isUiRelativeDateFilterForm, } from "@gooddata/sdk-ui-filters";
|
|
5
|
+
import { _omit } from "@gooddata/util";
|
|
6
6
|
import { ALL_TIME_FILTER_OPTION, RELATIVE_PERIOD_FILTER_OPTION } from "../defaultFilterOptions.js";
|
|
7
7
|
/**
|
|
8
8
|
* Hook returns memoized DateFilterRelativeOptionGroup created by filtering out unsupported granularities from the provided `allRelativeDateFilterPresets`.
|
|
@@ -30,7 +30,7 @@ export const useSupportedDateFilterPresets = (allRelativeDateFilterPresets, sele
|
|
|
30
30
|
.filter(isDateFilterGranularity) // choose only chronological granularities compatible with SDK
|
|
31
31
|
.filter((granularity) => !missingGranularities.includes(granularity));
|
|
32
32
|
return {
|
|
33
|
-
supportedDateFilterPresets:
|
|
33
|
+
supportedDateFilterPresets: _omit(allRelativeDateFilterPresets, missingGranularities),
|
|
34
34
|
supportedChronologicalGranularities,
|
|
35
35
|
};
|
|
36
36
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../../src/components/filterBar/dateFilter/presets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../../src/components/filterBar/dateFilter/presets.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,yBAAyB,EAGjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAG9E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAoZvF,eAAO,MAAM,4BAA4B,EAAE,6BAA8D,CAAC;AAE1G,eAAO,MAAM,4BAA4B,iBAAkB,OAAO,KAAG,6BAMpE,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAAW,iBAAiB,0CAgDjE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import { omit } from "lodash-es";
|
|
3
2
|
import { isLowerBound, isUpperBound, } from "@gooddata/sdk-model";
|
|
3
|
+
import { _omit } from "@gooddata/util";
|
|
4
4
|
const getRelativeDateFilterPresets = () => ({
|
|
5
5
|
"GDC.time.minute": [
|
|
6
6
|
{
|
|
@@ -408,7 +408,7 @@ export const findSupportedRelativePresets = (supportsTime) => {
|
|
|
408
408
|
if (!supportsTime) {
|
|
409
409
|
omittedGranularities.push("GDC.time.minute", "GDC.time.hour");
|
|
410
410
|
}
|
|
411
|
-
return
|
|
411
|
+
return _omit(getRelativeDateFilterPresets(), omittedGranularities);
|
|
412
412
|
};
|
|
413
413
|
export const findRelativePresetByValue = (value) => {
|
|
414
414
|
const presets = RELATIVE_DATE_FILTER_PRESETS[value.granularity];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IInsightUsageInDocumentItem } from "../../store/insight_usage/insight_usage_state.js";
|
|
2
|
+
export interface IDocumentItemProps {
|
|
3
|
+
item: IInsightUsageInDocumentItem;
|
|
4
|
+
}
|
|
5
|
+
export declare function DocumentItem({ item }: IDocumentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=DocumentItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentItem.d.ts","sourceRoot":"","sources":["../../../src/components/saveReportFromKD/DocumentItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAEpG,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,2BAA2B,CAAC;CACrC;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,kBAAkB,2CAqBxD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useSelector } from "react-redux";
|
|
4
|
+
import { isAllowedDashboardLinks } from "../../selectors/route_selector.js";
|
|
5
|
+
import { documentUriFactorySelector } from "../../selectors/uri_selector.js";
|
|
6
|
+
export function DocumentItem({ item }) {
|
|
7
|
+
const isLinkable = useSelector(isAllowedDashboardLinks);
|
|
8
|
+
const documentUriFactory = useSelector(documentUriFactorySelector);
|
|
9
|
+
const { id, title } = item;
|
|
10
|
+
return (_jsx("li", { className: "s-insight-usage-document-item", children: isLinkable ? (_jsx("a", { className: "dashboard-item", href: documentUriFactory(id), rel: "noopener noreferrer", target: "_blank", children: _jsx("span", { children: title }) })) : (_jsx("span", { children: title })) }));
|
|
11
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type IInsightUsageOnDashboard } from "../../store/insight_usage/insight_usage_state.js";
|
|
1
|
+
import { type IInsightUsageInDocumentItem, type IInsightUsageOnDashboard } from "../../store/insight_usage/insight_usage_state.js";
|
|
2
2
|
export type InsightUsageOnDashboardsProps = {
|
|
3
3
|
insightUsedOnDashboards: IInsightUsageOnDashboard;
|
|
4
|
+
insightUsedInDocuments: IInsightUsageInDocumentItem[];
|
|
4
5
|
};
|
|
5
|
-
export declare function Component({ insightUsedOnDashboards }: InsightUsageOnDashboardsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Component({ insightUsedOnDashboards, insightUsedInDocuments, }: InsightUsageOnDashboardsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export declare const InsightUsageOnDashboardsList: typeof Component;
|
|
7
8
|
//# sourceMappingURL=InsightUsageOnDashboardsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightUsageOnDashboardsList.d.ts","sourceRoot":"","sources":["../../../src/components/saveReportFromKD/InsightUsageOnDashboardsList.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,wBAAwB,EAEhC,MAAM,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightUsageOnDashboardsList.d.ts","sourceRoot":"","sources":["../../../src/components/saveReportFromKD/InsightUsageOnDashboardsList.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAEhC,MAAM,kDAAkD,CAAC;AA2B1D,MAAM,MAAM,6BAA6B,GAAG;IACxC,uBAAuB,EAAE,wBAAwB,CAAC;IAClD,sBAAsB,EAAE,2BAA2B,EAAE,CAAC;CACzD,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACtB,uBAAuB,EACvB,sBAAsB,GACzB,EAAE,6BAA6B,2CAuD/B;AAED,eAAO,MAAM,4BAA4B,kBAAY,CAAC"}
|
|
@@ -2,18 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
3
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
4
4
|
import { DashboardItem } from "./DashboardItem.js";
|
|
5
|
+
import { DocumentItem } from "./DocumentItem.js";
|
|
5
6
|
function InaccessibleDashboardsMessage({ count }) {
|
|
6
7
|
return (_jsx("div", { className: "gd-kd-save-report-dialog-usage-inaccessible s-kd-save-dialog-usage-inaccessible", children: _jsx(FormattedMessage, { id: "dialogs.deleteReportConfirmation.usage.inaccessibleDashboards", values: { count, b: (chunks) => _jsx("b", { children: chunks }) } }) }));
|
|
7
8
|
}
|
|
8
9
|
function OnlyInaccessibleDashboardsMessage({ count }) {
|
|
9
10
|
return (_jsx("div", { className: "gd-kd-save-report-dialog-usage-inaccessible s-kd-save-dialog-usage-inaccessible", children: _jsx(FormattedMessage, { id: "dialogs.deleteReportConfirmation.usage.inaccessibleDashboardsOnly", values: { count } }) }));
|
|
10
11
|
}
|
|
11
|
-
export function Component({ insightUsedOnDashboards }) {
|
|
12
|
+
export function Component({ insightUsedOnDashboards, insightUsedInDocuments, }) {
|
|
12
13
|
const intl = useIntl();
|
|
13
14
|
const { accessibleDashboards, inaccessibleDashboardsCount, allDashboardsCount } = insightUsedOnDashboards;
|
|
14
15
|
const renderListOfAccessible = accessibleDashboards.length > 0;
|
|
15
16
|
const renderInaccessibleOnly = accessibleDashboards.length === 0 && inaccessibleDashboardsCount > 0;
|
|
16
17
|
const renderAlsoInaccessible = accessibleDashboards.length > 0 && inaccessibleDashboardsCount > 0;
|
|
17
|
-
return (
|
|
18
|
+
return (_jsxs("div", { className: "view-usage-wrapper s-view-usage", children: [allDashboardsCount > 0 ? (_jsxs("details", { className: "gd-collapsible-section s-view-usage-dashboards", children: [_jsx("summary", { children: intl.formatMessage({ id: "dialogs.saveReportFromKD.usage.dashboards" }, { count: allDashboardsCount }) }), _jsxs("div", { className: "gd-collapsible-content gd-state-text", children: [renderListOfAccessible ? (_jsx("ul", { children: accessibleDashboards.map((dash) => (_jsx(DashboardItem, { dashboard: dash }, dash.id))) })) : null, renderAlsoInaccessible ? (_jsx(InaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null, renderInaccessibleOnly ? (_jsx(OnlyInaccessibleDashboardsMessage, { count: inaccessibleDashboardsCount })) : null] })] })) : null, insightUsedInDocuments.length > 0 ? (_jsxs("details", { className: "gd-collapsible-section s-view-usage-documents", children: [_jsx("summary", { children: intl.formatMessage({ id: "dialogs.saveReportFromKD.usage.documents" }, { count: insightUsedInDocuments.length }) }), _jsx("div", { className: "gd-collapsible-content gd-state-text", children: _jsx("ul", { children: insightUsedInDocuments.map((item) => (_jsx(DocumentItem, { item: item }, item.id))) }) })] })) : null] }));
|
|
18
19
|
}
|
|
19
20
|
export const InsightUsageOnDashboardsList = Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeBubbleContent.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AttributeBubbleContent.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,wCAAwC,EAAE,MAAM,0BAA0B,CAAC;AAEzF,wBAAgB,mBAAmB,CAAC,EAChC,YAAY,EACZ,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,GACb,EAAE,wCAAwC,
|
|
1
|
+
{"version":3,"file":"AttributeBubbleContent.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AttributeBubbleContent.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,wCAAwC,EAAE,MAAM,0BAA0B,CAAC;AAEzF,wBAAgB,mBAAmB,CAAC,EAChC,YAAY,EACZ,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,GACb,EAAE,wCAAwC,2CA6B1C;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,wCAAwC,2CAanF;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,wCAAwC,2CAkBrF"}
|