@gooddata/sdk-ui-analytical-designer 11.68.0-alpha.8 → 11.68.0-alpha.9
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 +46 -46
- 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/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/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/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/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 +16 -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 +0 -4
- package/esm/selectors/report_visualization_selector.d.ts.map +1 -1
- 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 +12 -11
- 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 +1 -0
- 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/en-US.json +53 -13
- 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
|
@@ -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 +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"}
|
|
@@ -5,10 +5,12 @@ import { createNumberFormatter, formatAttributeValue } from "@gooddata/sdk-ui";
|
|
|
5
5
|
export function TooltipAttrElements({ attrElements, attrElementsTotalCount, attrElementsNumberFormat, separators, }) {
|
|
6
6
|
const intl = useIntl();
|
|
7
7
|
const remainingElementsCount = attrElementsTotalCount - attrElements.length;
|
|
8
|
-
// the values
|
|
8
|
+
// the values are displayed formatted, like the filter displays them: date values come formatted,
|
|
9
|
+
// the values of a numeric computed attribute are formatted by their number format; raw otherwise
|
|
9
10
|
const formatter = createNumberFormatter(separators);
|
|
10
|
-
const displayTitle = (
|
|
11
|
-
|
|
11
|
+
const displayTitle = ({ title, formattedTitle }) => formattedTitle ||
|
|
12
|
+
(attrElementsNumberFormat ? formatAttributeValue(title, attrElementsNumberFormat, formatter) : title);
|
|
13
|
+
return (_jsxs(_Fragment, { children: [attrElements.map((element, idx) => (_jsxs("span", { className: "s-attribute-element", children: [displayTitle(element) || `(${intl.formatMessage({ id: "empty_value" })})`, _jsx("br", {})] }, idx))), remainingElementsCount > 0 && (_jsx("span", { className: "adi-tooltip-elements-more", children: _jsx(FormattedMessage, { id: "dashboard.catalog_item.shortening_decoration", values: { count: remainingElementsCount } }) }, attrElements.length))] }));
|
|
12
14
|
}
|
|
13
15
|
export function TooltipValuesSection(props) {
|
|
14
16
|
const { attrElements } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualizationConverter.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/VisualizationConverter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VisualizationConverter.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/VisualizationConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAMH,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,QAAQ,EAOb,KAAK,KAAK,EAIb,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAEH,KAAK,OAAO,IAAI,WAAW,EAC3B,KAAK,cAAc,EAUnB,KAAK,iCAAiC,EAgBzC,MAAM,iCAAiC,CAAC;AA0GzC,eAAO,MAAM,aAAa,WAAY,iCAAiC,KAAG,OAiBzE,CAAC;AAiIF;;GAEG;AACH,eAAO,MAAM,aAAa,WAAY,WAAW,KAAG,OAMnD,CAAC;AA+BF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,kBACd,cAAc,yBACN,MAAM,YACnB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,KAC7B,QA8BF,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { omit } from "lodash-es";
|
|
3
2
|
import { isComputedAttributeRef, uriRef, } from "@gooddata/sdk-model";
|
|
4
|
-
import { _compact, _isEmpty } from "@gooddata/util";
|
|
3
|
+
import { _compact, _isEmpty, _omit } from "@gooddata/util";
|
|
5
4
|
import { isVisualizationObjectAbsoluteDateFilter, isVisualizationObjectArbitraryAttributeFilter, isVisualizationObjectArithmeticMeasureDefinition, isVisualizationObjectAttributeFilter, isVisualizationObjectMatchAttributeFilter, isVisualizationObjectMeasure, isVisualizationObjectMeasureValueFilter, isVisualizationObjectNegativeAttributeFilter, isVisualizationObjectPoPMeasureDefinition, isVisualizationObjectPositiveAttributeFilter, isVisualizationObjectPreviousPeriodMeasureDefinition, isVisualizationObjectRankingFilter, isVisualizationObjectRelativeDateFilter, } from "../../typings/bear/bearTypes.js";
|
|
6
5
|
import { fromBearRef, fromScopedBearRef } from "./ObjRefConverter.js";
|
|
7
6
|
import { deserializeProperties, serializeProperties } from "./PropertiesConverter.js";
|
|
@@ -248,7 +247,7 @@ const resolveReferences = (mdObject) => {
|
|
|
248
247
|
return {
|
|
249
248
|
...mdObject,
|
|
250
249
|
content: {
|
|
251
|
-
...
|
|
250
|
+
..._omit(mdObject.content, "references"),
|
|
252
251
|
properties: serializeProperties(convertedProperties),
|
|
253
252
|
...referencesProp,
|
|
254
253
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/models/metadata.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAG3B,KAAK,MAAM,EAOd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,sBAAsB,EAG9B,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EACH,KAAK,yBAAyB,EAO9B,KAAK,OAAO,EAKf,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAKH,KAAK,OAAO,IAAI,0BAA0B,EAE1C,KAAK,2BAA2B,EAGhC,KAAK,2BAA2B,EAMhC,KAAK,iCAAiC,EAiBzC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAGH,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAOpF,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAEH,KAAK,eAAe,EACpB,KAAK,aAAa,EACrB,MAAM,6BAA6B,CAAC;AA6BrC,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEjE;AAiCD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,qBAAqB,EAAE,yBAAyB,GAAG,SAAS,GAAG;IAClG,kBAAkB,CAAC,EAAE,WAAW,C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IAAI,EAAE,2BAA2B,WAE9D;AAwOD,MAAM,WAAW,0CAA0C;IACvD,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CACjD;AAKD,wBAAgB,uCAAuC,CACnD,QAAQ,EAAE,2BAA2B,GACtC,0CAA0C,CAQ5C;AAED,wBAAgB,2BAA2B,CACvC,cAAc,EAAE,2BAA2B,GAC5C,0CAA0C,CAE5C;AAuBD,wBAAgB,yBAAyB,CACrC,cAAc,EAAE,2BAA2B,GAC5C,2BAA2B,CAK7B;AAwBD,wBAAgB,wBAAwB,CACpC,cAAc,EAAE,2BAA2B,GAC5C,2BAA2B,CAkB7B;AA+BD,wBAAgB,2BAA2B,CACvC,cAAc,EAAE,2BAA2B,GAC5C,2BAA2B,CAgB7B;AAsED,wBAAgB,yBAAyB,CACrC,cAAc,EAAE,2BAA2B,GAAG,SAAS,GACxD,sBAAsB,CAUxB;AAED,2FAA2F;AAC3F,MAAM,WAAW,wBAAwB;IACrC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,cAAc,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,iBAAiB,WAAY;IACtC,cAAc,EAAE,2BAA2B,CAAC;IAC5C,cAAc,EAAE,eAAe,CAAC;CACnC,KAAG,wBAA8D,CAAC"}
|
package/esm/models/metadata.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
2
|
import invariant from "invariant";
|
|
3
|
-
import { negate,
|
|
3
|
+
import { negate, pick, pickBy } from "lodash-es";
|
|
4
4
|
import { areObjRefsEqual, isComputedAttributeRef, isIdentifierRef, isUriRef, measureFormat, objRefToString, } from "@gooddata/sdk-model";
|
|
5
5
|
import { BucketNames, OverTimeComparisonTypes, fillMissingFormat, } from "@gooddata/sdk-ui";
|
|
6
6
|
import { Axis } from "@gooddata/sdk-ui-ext/internal";
|
|
7
|
-
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
7
|
+
import { _cloneDeep, _isEmpty, _omit } from "@gooddata/util";
|
|
8
8
|
import { ATTRIBUTE, COMPUTED_ATTRIBUTE, DATE, GEO_ATTRIBUTE, METRIC } from "../constants/bucket.js";
|
|
9
9
|
import { ALL_TIME } from "../constants/presets.js";
|
|
10
10
|
import { isElementUrisSupported } from "../selectors/backend_capabilities_selector.js";
|
|
@@ -1122,7 +1122,10 @@ export function normalizeEmptyDateValuesFilters(visualizationFilters, dateDatase
|
|
|
1122
1122
|
const mode = emptyValueHandlingToMd(storedMode ?? emptyDateValuesFilters[objRefToString(dataSet)]?.mode);
|
|
1123
1123
|
if (isVisualizationObjectAbsoluteDateFilter(filter)) {
|
|
1124
1124
|
return {
|
|
1125
|
-
absoluteDateFilter: {
|
|
1125
|
+
absoluteDateFilter: {
|
|
1126
|
+
..._omit(filter.absoluteDateFilter, "emptyValueHandling"),
|
|
1127
|
+
...mode,
|
|
1128
|
+
},
|
|
1126
1129
|
};
|
|
1127
1130
|
}
|
|
1128
1131
|
const { granularity, from, to } = filter.relativeDateFilter;
|
|
@@ -1141,7 +1144,7 @@ export function normalizeEmptyDateValuesFilters(visualizationFilters, dateDatase
|
|
|
1141
1144
|
};
|
|
1142
1145
|
}
|
|
1143
1146
|
return {
|
|
1144
|
-
relativeDateFilter: { ...
|
|
1147
|
+
relativeDateFilter: { ..._omit(filter.relativeDateFilter, "emptyValueHandling"), ...mode },
|
|
1145
1148
|
};
|
|
1146
1149
|
});
|
|
1147
1150
|
}
|
|
@@ -1417,7 +1420,7 @@ export function omitIrrelevantPropertiesForAvailability(mdObject) {
|
|
|
1417
1420
|
export function pickRelevantFromReportMDObj(metadataObject) {
|
|
1418
1421
|
return pick(metadataObject, ["buckets", "filters"]);
|
|
1419
1422
|
}
|
|
1420
|
-
const omitMeasureFormat = (bucketItem) =>
|
|
1423
|
+
const omitMeasureFormat = (bucketItem) => _omit(bucketItem, ["measure.format"]);
|
|
1421
1424
|
function omitMeasureFormatFromReportMDObj(metadataObject) {
|
|
1422
1425
|
return {
|
|
1423
1426
|
...metadataObject,
|
|
@@ -1428,7 +1431,7 @@ function omitMeasureFormatFromReportMDObj(metadataObject) {
|
|
|
1428
1431
|
};
|
|
1429
1432
|
}
|
|
1430
1433
|
function removeTotalsFromBucket(bucket) {
|
|
1431
|
-
return
|
|
1434
|
+
return _omit(bucket, ["totals"]);
|
|
1432
1435
|
}
|
|
1433
1436
|
export function omitTotalsFromReportMDObj(metadataObject) {
|
|
1434
1437
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open_insight_actions.d.ts","sourceRoot":"","sources":["../../../src/postMessageApi/actions/open_insight_actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"open_insight_actions.d.ts","sourceRoot":"","sources":["../../../src/postMessageApi/actions/open_insight_actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAGzG,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAMpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,yBAA0B,SAAQ,0BAA0B;IACzE,iBAAiB,EAAE,kBAAkB,CAAC;CACzC;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IAC/E,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,iCAAkC,SAAQ,0BAA0B;IACjF,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,oBAAoB,0MAqBhC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEzE,eAAO,MAAM,iBAAiB,6MAS7B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB,sMAS/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
2
|
import { createAction } from "@reduxjs/toolkit";
|
|
3
|
-
import {
|
|
3
|
+
import { _omit } from "@gooddata/util";
|
|
4
4
|
import { DEFAULT_POST_MESSAGE_CONTEXT_ID, createPostMessageContextFromId, } from "../actions/post_message_action_helper.js";
|
|
5
5
|
import { PostEventActionTypeKeys } from "./action_types.js";
|
|
6
6
|
export const openInsightRequested = createAction(PostEventActionTypeKeys.OPEN_INSIGHT_REQUESTED, (openInsightCommandData) => {
|
|
@@ -12,7 +12,7 @@ export const openInsightRequested = createAction(PostEventActionTypeKeys.OPEN_IN
|
|
|
12
12
|
*/
|
|
13
13
|
const { insightId, reportId } = data;
|
|
14
14
|
const customRouteParams = {
|
|
15
|
-
...
|
|
15
|
+
..._omit(data, "insightId"),
|
|
16
16
|
reportId: insightId || reportId,
|
|
17
17
|
};
|
|
18
18
|
const payload = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Channel } from "redux-saga";
|
|
1
2
|
import { type IDrillableItemsCommandBody } from "@gooddata/sdk-embedding";
|
|
2
3
|
import { PostEventActionTypeKeys } from "../actions/action_types.js";
|
|
3
4
|
import { type ICommandReceivedAction } from "../actions/command_received_actions.js";
|
|
@@ -51,5 +52,71 @@ export declare function handleReceivedCommand({ payload: { data: commandData, or
|
|
|
51
52
|
payload: import("@gooddata/sdk-embedding").IFilterContextContent & import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
52
53
|
type: PostEventActionTypeKeys.SET_FILTER_CONTEXT_REQUESTED;
|
|
53
54
|
}>, void, boolean>;
|
|
54
|
-
export declare function watchCommandReceived(): Generator<import("redux-saga/effects").
|
|
55
|
+
export declare function watchCommandReceived(): Generator<import("redux-saga/effects").ActionChannelEffect | import("redux-saga/effects").CallEffect<Generator<import("redux-saga/effects").CallEffect<void> | import("redux-saga/effects").CallEffect<boolean> | Generator<import("redux-saga/effects").CallEffect<void> | import("redux-saga/effects").PutEffect<{
|
|
56
|
+
payload: undefined;
|
|
57
|
+
type: import("../../sagas/application_context/application_context_actions.js").ApplicationContextActionsTypeKeys;
|
|
58
|
+
}> | import("redux-saga/effects").SelectEffect, void, string | undefined> | Generator<import("redux-saga/effects").CallEffect<void> | import("redux-saga/effects").PutEffect<{
|
|
59
|
+
payload: import("../../actions/confirm_unsaved_changes_actions.js").IConfirmUnsavedChangesDialogActionPayload;
|
|
60
|
+
type: import("../../constants/actions.js").ActionTypeKeys.SAGA_CONFIRM_UNSAVED_CHANGES_REQUEST;
|
|
61
|
+
}> | import("redux-saga/effects").SelectEffect, void, boolean> | Generator<import("redux-saga/effects").CallEffect<void> | import("redux-saga/effects").PutEffect<{
|
|
62
|
+
payload: string | undefined;
|
|
63
|
+
type: import("../../constants/actions.js").ActionTypeKeys.SET_TIMEZONE_OVERRIDE;
|
|
64
|
+
}> | import("redux-saga/effects").SelectEffect, void, boolean> | import("redux-saga/effects").PutEffect<{
|
|
65
|
+
payload: IDrillableItemsCommandBody;
|
|
66
|
+
type: import("../../constants/actions.js").ActionTypeKeys.CONVERT_DRILLABLE_ITEMS;
|
|
67
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
68
|
+
payload: import("../actions/command_error_actions.js").IInsecureCommandFailedActionPayload;
|
|
69
|
+
type: PostEventActionTypeKeys.INSECURE_COMMAND_FAILED;
|
|
70
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
71
|
+
payload: import("../actions/open_insight_actions.js").IOpenInsightActionPayload;
|
|
72
|
+
type: PostEventActionTypeKeys.OPEN_INSIGHT_REQUESTED;
|
|
73
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
74
|
+
payload: import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
75
|
+
type: PostEventActionTypeKeys.HOST_VERIFICATION_FAILED;
|
|
76
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
77
|
+
payload: import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
78
|
+
type: PostEventActionTypeKeys.CLEAR_INSIGHT_REQUESTED;
|
|
79
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
80
|
+
payload: import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
81
|
+
type: PostEventActionTypeKeys.CLEAR_INSIGHT_CONTENT_REQUESTED;
|
|
82
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
83
|
+
payload: import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
84
|
+
type: PostEventActionTypeKeys.UNDO_REQUESTED;
|
|
85
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
86
|
+
payload: import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
87
|
+
type: PostEventActionTypeKeys.REDO_REQUESTED;
|
|
88
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
89
|
+
payload: import("@gooddata/sdk-embedding").IPostMessageContextPayload & import("@gooddata/sdk-embedding").IAdExportInsightCommandBody;
|
|
90
|
+
type: PostEventActionTypeKeys.EXPORT_INSIGHT_REQUESTED;
|
|
91
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
92
|
+
payload: import("@gooddata/sdk-embedding").IRemoveFilterContextContent & import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
93
|
+
type: PostEventActionTypeKeys.REMOVE_FILTER_CONTEXT_REQUESTED;
|
|
94
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
95
|
+
payload: import("@gooddata/sdk-embedding").IAdSaveAsInsightCommandBody & import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
96
|
+
type: PostEventActionTypeKeys.SAVE_AS_INSIGHT_REQUESTED;
|
|
97
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
98
|
+
payload: import("@gooddata/sdk-embedding").IAdSaveCommandBody & import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
99
|
+
type: PostEventActionTypeKeys.SAVE_INSIGHT_REQUESTED;
|
|
100
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
101
|
+
payload: import("@gooddata/sdk-embedding").IFilterContextContent & import("@gooddata/sdk-embedding").IPostMessageContextPayload;
|
|
102
|
+
type: PostEventActionTypeKeys.SET_FILTER_CONTEXT_REQUESTED;
|
|
103
|
+
}>, void, boolean>> | import("redux-saga/effects").ChannelTakeEffect<{
|
|
104
|
+
payload: {
|
|
105
|
+
data: import("@gooddata/sdk-embedding").AdCommandData;
|
|
106
|
+
origin: string;
|
|
107
|
+
};
|
|
108
|
+
type: PostEventActionTypeKeys.COMMAND_RECEIVED;
|
|
109
|
+
}>, void, Channel<{
|
|
110
|
+
payload: {
|
|
111
|
+
data: import("@gooddata/sdk-embedding").AdCommandData;
|
|
112
|
+
origin: string;
|
|
113
|
+
};
|
|
114
|
+
type: PostEventActionTypeKeys.COMMAND_RECEIVED;
|
|
115
|
+
}> & {
|
|
116
|
+
payload: {
|
|
117
|
+
data: import("@gooddata/sdk-embedding").AdCommandData;
|
|
118
|
+
origin: string;
|
|
119
|
+
};
|
|
120
|
+
type: PostEventActionTypeKeys.COMMAND_RECEIVED;
|
|
121
|
+
}>;
|
|
55
122
|
//# sourceMappingURL=command_received_saga.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command_received_saga.d.ts","sourceRoot":"","sources":["../../../src/postMessageApi/sagas/command_received_saga.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command_received_saga.d.ts","sourceRoot":"","sources":["../../../src/postMessageApi/sagas/command_received_saga.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAIH,KAAK,0BAA0B,EAgBlC,MAAM,yBAAyB,CAAC;AAajC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAIrE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAiBrF,wBAAsB,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE9F;AA4DD,wBAAiB,qBAAqB,CAAC,EACnC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,GACxD,EAAE,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgExB;AAED,wBAAiB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYpC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import { call, put, select,
|
|
2
|
+
import { actionChannel, call, put, select, take } from "redux-saga/effects";
|
|
3
3
|
import { GdcErrorType, getEventType, isAdClearCommandData, isAdClearInsightCommandData, isAdDrillableItemsCommandData, isAdExportInsightCommandData, isAdOpenInsightCommandData, isAdRedoCommandData, isAdRemoveFilterContextCommandData, isAdRequestCancellationCommandData, isAdSaveAsInsightCommandData, isAdSaveInsightCommandData, isAdSetApiTokenCommandData, isAdSetFilterContextCommandData, isAdSetTimezoneCommandData, isAdUndoCommandData, } from "@gooddata/sdk-embedding";
|
|
4
4
|
import { isValidIanaTimezoneId } from "@gooddata/sdk-model";
|
|
5
5
|
import { conversionInit } from "../../actions/drillable_items_actions.js";
|
|
@@ -7,7 +7,7 @@ import { setTimezoneOverride } from "../../actions/timezone_override_actions.js"
|
|
|
7
7
|
import { backend } from "../../backend.js";
|
|
8
8
|
import { HOST_ADAPTER_ORIGIN, getHostAdapter } from "../../embedding/hostBridge.js";
|
|
9
9
|
import { getOrganizationId } from "../../selectors/bootstrap_selector.js";
|
|
10
|
-
import { isEmbeddingWriteCommandsEnabled, isEnableTimezoneChange, } from "../../selectors/feature_flag_selector.js";
|
|
10
|
+
import { isEmbeddingOriginValidationEnabled, isEmbeddingWriteCommandsEnabled, isEnableTimezoneChange, } from "../../selectors/feature_flag_selector.js";
|
|
11
11
|
import { PostEventActionTypeKeys } from "../actions/action_types.js";
|
|
12
12
|
import { clearInsightRequested } from "../actions/clear_insight_actions.js";
|
|
13
13
|
import { clearInsightContentRequested } from "../actions/clear_insight_content_actions.js";
|
|
@@ -27,6 +27,11 @@ export async function validateHostDomain(organizationId, url) {
|
|
|
27
27
|
return backend.organization(organizationId).securitySettings().isUrlValid(url, "UI_EVENT");
|
|
28
28
|
}
|
|
29
29
|
function* isCommandOriginValid(origin) {
|
|
30
|
+
const isValidationEnabled = yield select(isEmbeddingOriginValidationEnabled);
|
|
31
|
+
// Without the flag, no backend call: every origin is valid, as before the validation existed.
|
|
32
|
+
if (!isValidationEnabled) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
30
35
|
try {
|
|
31
36
|
const organizationId = yield select(getOrganizationId);
|
|
32
37
|
const result = yield call(validateHostDomain, organizationId, origin);
|
|
@@ -69,6 +74,8 @@ export function* handleReceivedCommand({ payload: { data: commandData, origin: c
|
|
|
69
74
|
? true
|
|
70
75
|
: yield call(isCommandOriginValid, commandOrigin);
|
|
71
76
|
if (!isValidOrigin) {
|
|
77
|
+
// oxlint-disable-next-line eslint-js/no-console
|
|
78
|
+
console.warn(`Denied the "${commandType}" command from the origin "${commandOrigin}". The origin is not in the embedding origins of the organization, or the check failed.`);
|
|
72
79
|
yield put(hostVerificationFailed(contextId));
|
|
73
80
|
return;
|
|
74
81
|
}
|
|
@@ -129,5 +136,11 @@ export function* handleReceivedCommand({ payload: { data: commandData, origin: c
|
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
138
|
export function* watchCommandReceived() {
|
|
132
|
-
|
|
139
|
+
// The channel keeps the commands that arrive while a command is handled, for example while its
|
|
140
|
+
// origin check waits for the backend. The commands then run one by one in the order they arrived.
|
|
141
|
+
const commandChannel = yield actionChannel(PostEventActionTypeKeys.COMMAND_RECEIVED);
|
|
142
|
+
while (true) {
|
|
143
|
+
const commandReceivedAction = yield take(commandChannel);
|
|
144
|
+
yield call(handleReceivedCommand, commandReceivedAction);
|
|
145
|
+
}
|
|
133
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control_filtering_saga.d.ts","sourceRoot":"","sources":["../../../src/postMessageApi/sagas/control_filtering_saga.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"control_filtering_saga.d.ts","sourceRoot":"","sources":["../../../src/postMessageApi/sagas/control_filtering_saga.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAKhC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEH,KAAK,oCAAoC,EACzC,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,yBAAyB,EAGjC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEH,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,MAAM,EAMd,MAAM,qBAAqB,CAAC;AAgC7B,OAAO,EACH,KAAK,sCAAsC,EAC3C,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EAEnC,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EAGzC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACH,wBAAwB,EAE3B,MAAM,+DAA+D,CAAC;AAavE,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,4CAA4C,CAAC;AACvG,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGrF,OAAO,EAAE,KAAK,UAAU,EAAE,K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B,EAAE;;;;;0FA6EnG;AA4KD,wBAAgB,yBAAyB,CACrC,QAAQ,EAAE,SAAS,EACnB,oBAAoB,EAAE,eAAe,EACrC,gBAAgB,EAAE,sCAAsC,EACxD,mBAAmB,EAAE,OAAO,WAiE/B;AAED,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,SAAS,EAChB,eAAe,EAAE,+BAA+B,EAAE,EAClD,WAAW,EAAE,eAAe,GAC7B,mBAAmB,CAqCrB;AA0ED,wBAAiB,kCAAkC,CAAC,EAChD,OAAO,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAC3C,EAAE,mCAAmC;;;;;;;;;;;;;;;;;;6DA8DrC;AA+BD,wBAAiB,yBAAyB,CAAC,WAAW,EAAE,qBAAqB,EAAE,6EAmC9E;AAED,wBAAiB,2BAA2B,CAAC,2BAA2B,CAAC,EAAE,wBAAwB,4IAMlG;AAED,wBAAiB,8BAA8B,CAAC,kBAAkB,EAAE,0BAA0B,EAAE,qXAsF/F;AAED,wBAAiB,qBAAqB,6EAcrC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import { partition, uniq, uniqBy } from "lodash-es";
|
|
3
2
|
import moment from "moment";
|
|
4
3
|
import { all, call, put, race, select, take, takeEvery } from "redux-saga/effects";
|
|
5
4
|
import { isUnexpectedResponseError } from "@gooddata/sdk-backend-spi";
|
|
6
5
|
import { isPositiveAttributeFilter, isRemoveAttributeFilter, isRemoveDateFilter, isRemoveRankingFilter, } from "@gooddata/sdk-embedding";
|
|
7
6
|
import { filterConverters, toDisplayFormRefType, } from "@gooddata/sdk-embedding/internal";
|
|
8
7
|
import { areObjRefsEqual, idRef, isComputedAttributeRef, isUriRef, uriRef, } from "@gooddata/sdk-model";
|
|
8
|
+
import { _partition, _uniq, _uniqBy } from "@gooddata/util";
|
|
9
9
|
import { updateItemCache } from "../../actions/data_actions.js";
|
|
10
10
|
import { MAX_ATTRIBUTE_FILTERS_COUNT } from "../../constants/catalog_filters.js";
|
|
11
11
|
import { generateBucketItemIdentifier } from "../../models/bucket_item_identifier.js";
|
|
@@ -156,7 +156,7 @@ export function* validateExternalRankingFilter(rankingFilter) {
|
|
|
156
156
|
throw new Error(ERROR_INVALID_RANKING_FILTER_ATTRIBUTES);
|
|
157
157
|
}
|
|
158
158
|
const areAttributeLocalIdentifiersDuplicates = attributeLocalIdentifiers &&
|
|
159
|
-
|
|
159
|
+
_uniq(attributeLocalIdentifiers).length !== attributeLocalIdentifiers.length;
|
|
160
160
|
if (areAttributeLocalIdentifiersDuplicates) {
|
|
161
161
|
throw new Error(ERROR_DUPLICATED_RANKING_FILTER_ATTRIBUTES);
|
|
162
162
|
}
|
|
@@ -547,7 +547,7 @@ export function* getValidExternalAttributeFilters(externalFilters) {
|
|
|
547
547
|
return externalFiltersFromCached;
|
|
548
548
|
}
|
|
549
549
|
// a computed attribute has no labels, so it cannot go through the display form lookup below
|
|
550
|
-
const [computedAttributeRefs, labelRefs] =
|
|
550
|
+
const [computedAttributeRefs, labelRefs] = _partition(externalObjRefs, (ref) => isComputedAttributeRef(ref));
|
|
551
551
|
const validatedComputedAttributeFilters = computedAttributeRefs.length
|
|
552
552
|
? yield call(validateExternalComputedAttributeFilters, externalFilters, computedAttributeRefs)
|
|
553
553
|
: [];
|
|
@@ -936,19 +936,19 @@ export function* validateRemoveAttributeFilters(externalAttFilters) {
|
|
|
936
936
|
}
|
|
937
937
|
return mappingRemoveFilters;
|
|
938
938
|
}, { identifiers: [], uris: [] });
|
|
939
|
-
if (
|
|
939
|
+
if (_uniq(uris).length !== uris.length) {
|
|
940
940
|
throw new Error(ERROR_DUPLICATED_ATTRIBUTE_FILTER_URIS);
|
|
941
941
|
}
|
|
942
942
|
yield call(rejectComputedAttributesWhenDisabled, identifiers.some(({ dfType }) => dfType === "computedAttribute"));
|
|
943
943
|
// a label and a computed attribute sharing the identifier are two different filters
|
|
944
|
-
if (
|
|
944
|
+
if (_uniqBy(identifiers, ({ identifier, dfType }) => `${dfType}.${identifier}`).length !==
|
|
945
945
|
identifiers.length) {
|
|
946
946
|
throw new Error(ERROR_DUPLICATED_ATTRIBUTE_FILTER_IDENTIFIERS);
|
|
947
947
|
}
|
|
948
948
|
// validate external attribute filters uris; computed attributes have no labels and resolve through
|
|
949
949
|
// their own service
|
|
950
950
|
const appState = yield select();
|
|
951
|
-
const [computedAttributeIdentifiers, labelIdentifiers] =
|
|
951
|
+
const [computedAttributeIdentifiers, labelIdentifiers] = _partition(identifiers, ({ dfType }) => dfType === "computedAttribute");
|
|
952
952
|
const objRefs = [];
|
|
953
953
|
labelIdentifiers.forEach(({ identifier }) => objRefs.push(idRef(identifier, "displayForm")));
|
|
954
954
|
uris.forEach((uri) => objRefs.push(uriRef(uri)));
|