@gooddata/sdk-ui-analytical-designer 11.67.0-alpha.3 → 11.67.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 +16 -233
- package/README.md +13 -5
- package/esm/Root.d.ts +0 -2
- package/esm/Root.d.ts.map +1 -1
- package/esm/Root.js +0 -4
- package/esm/actions/app_context_actions.d.ts.map +1 -1
- package/esm/actions/app_context_actions.js +2 -4
- package/esm/actions/dialogs_actions.d.ts +2 -2
- package/esm/actions/dialogs_actions.js +2 -2
- package/esm/components/Editor.d.ts.map +1 -1
- package/esm/components/Editor.js +31 -2
- package/esm/components/EditorHeader.d.ts +19 -1
- package/esm/components/EditorHeader.d.ts.map +1 -1
- package/esm/components/EditorHeader.js +38 -86
- package/esm/components/ReportDescription.d.ts +8 -1
- package/esm/components/ReportDescription.d.ts.map +1 -1
- package/esm/components/ReportDescription.js +37 -7
- package/esm/components/buckets/MeasureAttributeFilterOrganized.d.ts.map +1 -1
- package/esm/components/buckets/MeasureAttributeFilterOrganized.js +1 -1
- package/esm/components/buckets/MeasureDateFilter.d.ts.map +1 -1
- package/esm/components/buckets/MeasureDateFilter.js +1 -1
- package/esm/components/buckets/categories/DateDatasetsDropdown.d.ts.map +1 -1
- package/esm/components/filterBar/dateFilter/TimeComparisonSection/TimeComparisonTypesDropdown.d.ts.map +1 -1
- package/esm/components/header/CancelButton.d.ts +13 -0
- package/esm/components/header/CancelButton.d.ts.map +1 -0
- package/esm/components/header/CancelButton.js +32 -0
- package/esm/components/header/ClearButton.d.ts +7 -0
- package/esm/components/header/ClearButton.d.ts.map +1 -0
- package/esm/components/header/ClearButton.js +24 -0
- package/esm/components/header/EditorActions.d.ts +14 -0
- package/esm/components/header/EditorActions.d.ts.map +1 -0
- package/esm/components/header/EditorActions.js +71 -0
- package/esm/components/header/Embed/EmbedButton.d.ts +6 -1
- package/esm/components/header/Embed/EmbedButton.d.ts.map +1 -1
- package/esm/components/header/Embed/EmbedButton.js +48 -48
- package/esm/components/header/Embed/EmbedInsightDialogContainer.d.ts +6 -0
- package/esm/components/header/Embed/EmbedInsightDialogContainer.d.ts.map +1 -0
- package/esm/components/header/Embed/EmbedInsightDialogContainer.js +52 -0
- package/esm/components/header/Embed/EmbedMenu.d.ts +6 -4
- package/esm/components/header/Embed/EmbedMenu.d.ts.map +1 -1
- package/esm/components/header/Embed/EmbedMenu.js +2 -6
- package/esm/components/header/InsightPickerDialog.d.ts +5 -1
- package/esm/components/header/InsightPickerDialog.d.ts.map +1 -1
- package/esm/components/header/InsightPickerDialog.js +9 -29
- package/esm/components/header/OpenControl.d.ts +7 -0
- package/esm/components/header/OpenControl.d.ts.map +1 -0
- package/esm/components/header/OpenControl.js +69 -0
- package/esm/components/header/OptionsMenu/OptionsButton.d.ts +5 -1
- package/esm/components/header/OptionsMenu/OptionsButton.d.ts.map +1 -1
- package/esm/components/header/OptionsMenu/OptionsButton.js +19 -9
- package/esm/components/header/OptionsMenu/OptionsMenu.d.ts +8 -60
- package/esm/components/header/OptionsMenu/OptionsMenu.d.ts.map +1 -1
- package/esm/components/header/OptionsMenu/OptionsMenu.js +56 -112
- package/esm/components/header/OptionsMenu/OptionsMenuItem.d.ts +3 -4
- package/esm/components/header/OptionsMenu/OptionsMenuItem.d.ts.map +1 -1
- package/esm/components/header/OptionsMenu/OptionsMenuItem.js +5 -9
- package/esm/components/header/OptionsMenu/useOptionsProps.d.ts +26 -0
- package/esm/components/header/OptionsMenu/useOptionsProps.d.ts.map +1 -0
- package/esm/components/header/OptionsMenu/useOptionsProps.js +188 -0
- package/esm/components/header/SaveAsNewReportButton.d.ts +6 -1
- package/esm/components/header/SaveAsNewReportButton.d.ts.map +1 -1
- package/esm/components/header/SaveAsNewReportButton.js +20 -10
- package/esm/components/header/SaveReportButton.d.ts +6 -1
- package/esm/components/header/SaveReportButton.d.ts.map +1 -1
- package/esm/components/header/SaveReportButton.js +41 -18
- package/esm/components/header/TimezoneDialog.d.ts +1 -1
- package/esm/components/header/TimezoneDialog.js +1 -1
- package/esm/components/header/UndoRedoButtons.d.ts +7 -0
- package/esm/components/header/UndoRedoButtons.d.ts.map +1 -0
- package/esm/components/header/UndoRedoButtons.js +31 -0
- package/esm/components/header/VisualizationInfo.d.ts +11 -0
- package/esm/components/header/VisualizationInfo.d.ts.map +1 -0
- package/esm/components/header/VisualizationInfo.js +47 -0
- package/esm/components/header/VisualizationTitle.d.ts +7 -0
- package/esm/components/header/VisualizationTitle.d.ts.map +1 -0
- package/esm/components/header/VisualizationTitle.js +36 -0
- package/esm/components/header/VisualizationsDropdown.d.ts +5 -1
- package/esm/components/header/VisualizationsDropdown.d.ts.map +1 -1
- package/esm/components/header/VisualizationsDropdown.js +7 -33
- package/esm/components/header/editorHeaderContext.d.ts +20 -0
- package/esm/components/header/editorHeaderContext.d.ts.map +1 -0
- package/esm/components/header/editorHeaderContext.js +58 -0
- package/esm/components/header/share/InsightAccess.d.ts +30 -1
- package/esm/components/header/share/InsightAccess.d.ts.map +1 -1
- package/esm/components/header/share/InsightAccess.js +81 -18
- package/esm/components/header/share/InsightAccessChip.d.ts +2 -2
- package/esm/components/header/share/InsightAccessChip.d.ts.map +1 -1
- package/esm/components/header/share/InsightAccessChip.js +3 -3
- package/esm/embedding/AnalyticalDesignerEmbedded.d.ts +1 -1
- package/esm/embedding/AnalyticalDesignerEmbedded.js +1 -1
- package/esm/embedding/editorHeaderSlotTypes.d.ts +569 -0
- package/esm/embedding/editorHeaderSlotTypes.d.ts.map +1 -0
- package/esm/embedding/editorHeaderSlotTypes.js +2 -0
- package/esm/embedding/slots.d.ts +73 -0
- package/esm/embedding/slots.d.ts.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/postMessageApi/outgoing/metrics_changed_events.d.ts +1 -1
- package/esm/postMessageApi/outgoing/metrics_changed_events.js +1 -1
- package/esm/postMessageApi/outgoing/post_event_helper.d.ts +1 -1
- package/esm/postMessageApi/outgoing/post_event_helper.d.ts.map +1 -1
- package/esm/postMessageApi/outgoing/post_event_helper.js +1 -1
- package/esm/postMessageApi/sagas/control_filtering_saga.js +1 -1
- package/esm/sdk-ui-analytical-designer.d.ts +664 -0
- package/esm/selectors/editor_header_selector.d.ts +225 -0
- package/esm/selectors/editor_header_selector.d.ts.map +1 -1
- package/esm/selectors/editor_header_selector.js +8 -1
- package/esm/selectors/insight_access_selector.d.ts +185 -4
- package/esm/selectors/insight_access_selector.d.ts.map +1 -1
- package/esm/selectors/insight_access_selector.js +5 -3
- package/esm/selectors/report_title_selector.d.ts +6 -6
- package/esm/selectors/report_title_selector.d.ts.map +1 -1
- package/esm/selectors/report_title_selector.js +4 -3
- package/esm/selectors/report_visualization_selector.d.ts +4 -0
- package/esm/selectors/report_visualization_selector.d.ts.map +1 -1
- package/esm/selectors/save_report_selector.d.ts +7 -0
- package/esm/selectors/save_report_selector.d.ts.map +1 -1
- package/esm/selectors/save_report_selector.js +11 -1
- package/esm/selectors/uri_selector.js +1 -1
- package/esm/store/app_context/app_context_slices.d.ts.map +1 -1
- package/esm/store/app_context/app_context_slices.js +2 -3
- package/esm/store/app_context/session_id_reducer.d.ts +2 -3
- package/esm/store/app_context/session_id_reducer.d.ts.map +1 -1
- package/esm/store/app_context/session_id_reducer.js +2 -3
- package/esm/store/intl/intl_slice.d.ts.map +1 -1
- package/esm/store/intl/intl_slice.js +2 -3
- package/esm/translations/en-US.json +8 -0
- package/esm/utils/browser_detect.d.ts +2 -1
- package/esm/utils/browser_detect.d.ts.map +1 -1
- package/esm/utils/browser_detect.js +21 -3
- package/esm/utils/dropdown.d.ts +6 -2
- package/esm/utils/dropdown.d.ts.map +1 -1
- package/esm/utils/dropdown.js +10 -3
- package/package.json +23 -31
- package/styles/css/catalog.css +2 -2
- package/styles/css/catalog_sidebar.css +1 -1
- package/styles/css/catalog_sidebar.css.map +1 -1
- package/styles/css/editor_canvas.css +1 -1
- package/styles/css/editor_header.css +16 -1
- package/styles/css/editor_header.css.map +1 -1
- package/styles/css/main.css +20 -5
- package/styles/css/main.css.map +1 -1
- package/styles/scss/catalog.scss +2 -2
- package/styles/scss/catalog_sidebar.scss +2 -1
- package/styles/scss/editor_canvas.scss +1 -1
- package/styles/scss/editor_header.scss +20 -1
- package/esm/components/ReportTitle.d.ts +0 -2
- package/esm/components/ReportTitle.d.ts.map +0 -1
- package/esm/components/ReportTitle.js +0 -51
- package/esm/components/header/Embed/utils.d.ts +0 -4
- package/esm/components/header/Embed/utils.d.ts.map +0 -1
- package/esm/components/header/Embed/utils.js +0 -5
|
@@ -2,63 +2,63 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
-
import {
|
|
5
|
+
import { useSelector } from "react-redux";
|
|
6
6
|
import { createSelector } from "reselect";
|
|
7
|
-
import { fillMissingTitlesWithMessages } from "@gooddata/sdk-ui";
|
|
8
|
-
import { EmbedInsightDialog } from "@gooddata/sdk-ui-ext";
|
|
9
7
|
import { IconEmbedCode } from "@gooddata/sdk-ui-kit";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { createEmbedDialogCopyCodeAction, createEmbedDialogOpenAction, } from "../../../actions/embed_dialog_actions.js";
|
|
13
|
-
import { saveReportCheck } from "../../../actions/save_actions.js";
|
|
14
|
-
import { backend } from "../../../backend.js";
|
|
15
|
-
import { documentationUrl as documentationUrlSelector, getProjectId, } from "../../../selectors/bootstrap_selector.js";
|
|
16
|
-
import { getExecutionConfig } from "../../../selectors/execution_config_selector.js";
|
|
17
|
-
import { getFeatureFlags } from "../../../selectors/feature_flag_selector.js";
|
|
18
|
-
import { getInsightForSaveViaMd } from "../../../selectors/insight_selectors.js";
|
|
19
|
-
import { getIntlMessagesForLocale } from "../../../selectors/intl_selector.js";
|
|
8
|
+
import { createEmbedDialogOpenAction } from "../../../actions/embed_dialog_actions.js";
|
|
9
|
+
import { documentationUrl as documentationUrlSelector } from "../../../selectors/bootstrap_selector.js";
|
|
20
10
|
import { isReportExecutableSelector } from "../../../selectors/report_selector.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { getEmbedAnalyticalDesignerLink, getIntegrationLink } from "./documentationLinks.js";
|
|
11
|
+
import { useGuardedCallback } from "../editorHeaderContext.js";
|
|
12
|
+
import { getEmbedAnalyticalDesignerLink } from "./documentationLinks.js";
|
|
24
13
|
import { EmbedMenu } from "./EmbedMenu.js";
|
|
25
|
-
import { isCodeGenerationSupported } from "./utils.js";
|
|
26
14
|
const isReportBlankSelector = createSelector(isReportExecutableSelector, (isExecutable) => !isExecutable);
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
const canEmbed = (state) => !isReportBlankSelector(state);
|
|
16
|
+
const runEmbed = (dispatch) => dispatch(createEmbedDialogOpenAction());
|
|
17
|
+
export function useEmbedProps(context) {
|
|
29
18
|
const intl = useIntl();
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
const isReportBlank = useSelector(isReportBlankSelector);
|
|
20
|
+
const documentationUrl = useSelector(documentationUrlSelector);
|
|
21
|
+
const onEmbedInsight = useGuardedCallback(canEmbed, runEmbed);
|
|
22
|
+
const label = intl.formatMessage({ id: "embedInsightDialog.embed.button.label" });
|
|
23
|
+
const embedInsightLabel = intl.formatMessage({ id: "embedInsightDialog.embed.menu.title" });
|
|
24
|
+
const disabledReason = intl.formatMessage({
|
|
25
|
+
id: "embedInsightDialog.embed.disable.message.empty.report",
|
|
26
|
+
});
|
|
27
|
+
const documentationLabel = intl.formatMessage({
|
|
28
|
+
id: "embedInsightDialog.embed.analytical.designer.menu.title",
|
|
29
|
+
});
|
|
30
|
+
return useMemo(() => ({
|
|
31
|
+
...context,
|
|
32
|
+
label,
|
|
33
|
+
embedInsightLabel,
|
|
34
|
+
isEmbedInsightDisabled: isReportBlank,
|
|
35
|
+
...(isReportBlank ? { embedInsightDisabledReason: disabledReason } : {}),
|
|
36
|
+
documentationLabel,
|
|
37
|
+
// the props are built even while Embed is hidden, where the bootstrap may carry no documentation
|
|
38
|
+
documentationUrl: documentationUrl ? getEmbedAnalyticalDesignerLink(documentationUrl) : "",
|
|
39
|
+
onEmbedInsight,
|
|
40
|
+
}), [
|
|
41
|
+
context,
|
|
42
|
+
label,
|
|
43
|
+
embedInsightLabel,
|
|
44
|
+
isReportBlank,
|
|
45
|
+
disabledReason,
|
|
46
|
+
documentationLabel,
|
|
47
|
+
documentationUrl,
|
|
48
|
+
onEmbedInsight,
|
|
49
|
+
]);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Default of the Embed slot: an icon button with a menu of the embedding choices.
|
|
53
|
+
*/
|
|
54
|
+
export function DefaultEmbed({ label, embedInsightLabel, isEmbedInsightDisabled, embedInsightDisabledReason, documentationLabel, documentationUrl, onEmbedInsight, }) {
|
|
55
|
+
const [isMenuOpen, setMenuOpen] = useState(false);
|
|
41
56
|
const toggleMenu = useCallback(() => {
|
|
42
57
|
setMenuOpen((open) => !open);
|
|
43
58
|
}, []);
|
|
44
59
|
const onMenuClick = useCallback(() => {
|
|
45
60
|
setMenuOpen(false);
|
|
46
|
-
|
|
47
|
-
}, [
|
|
48
|
-
|
|
49
|
-
dispatch(hideDialog());
|
|
50
|
-
}, [dispatch]);
|
|
51
|
-
const onCopyCode = useCallback((code, type, codeType) => {
|
|
52
|
-
dispatch(createEmbedDialogCopyCodeAction(code, type, codeType));
|
|
53
|
-
}, [dispatch]);
|
|
54
|
-
const openSaveInsightClick = useCallback(() => {
|
|
55
|
-
onDialogClose();
|
|
56
|
-
dispatch(saveReportCheck(false, false, true));
|
|
57
|
-
}, [dispatch, onDialogClose]);
|
|
58
|
-
const isGenerationSupported = useMemo(() => {
|
|
59
|
-
return isCodeGenerationSupported(insight, settings);
|
|
60
|
-
}, [insight, settings]);
|
|
61
|
-
// we need to do the same transformations as when the insight is executed by the AD itself (see PluggableVisualization.tsx)
|
|
62
|
-
const effectiveInsight = fillMissingTitlesWithMessages(insight, settings.locale, messages, undefined);
|
|
63
|
-
return (_jsxs(_Fragment, { children: [_jsx("button", { style: { height: 32 }, "data-testid": "s-embed-button", className: "gd-button-secondary editor-header-item", onClick: toggleMenu, children: _jsx(IconEmbedCode, {}) }), isMenuOpen ? (_jsx(EmbedMenu, { isReportBlank: isReportBlank, isCodeGenerationSupported: isGenerationSupported, embedAnalyticalDesignerLink: getEmbedAnalyticalDesignerLink(documentationUrl), toggleMenu: toggleMenu, onMenuItemClick: onMenuClick })) : null, isEmbedDialogVisible ? (_jsx(EmbedInsightDialog, { insight: effectiveInsight, settings: settings, backend: backend, locale: intl.locale, theme: theme, reactIntegrationDocLink: getIntegrationLink(), webComponentIntegrationDocLink: getIntegrationLink(), colorPalette: colorPalette, executionConfig: executionConfig, onClose: onDialogClose, onCopyCode: onCopyCode, workspaceId: workspaceId, openSaveInsightDialog: openSaveInsightClick, showWebComponentsTab: true })) : null] }));
|
|
61
|
+
onEmbedInsight();
|
|
62
|
+
}, [onEmbedInsight]);
|
|
63
|
+
return (_jsxs(_Fragment, { children: [_jsx("button", { style: { height: 32 }, "data-testid": "s-embed-button", className: "gd-button-secondary editor-header-item", "aria-label": label, "aria-haspopup": "menu", "aria-expanded": isMenuOpen, onClick: toggleMenu, children: _jsx(IconEmbedCode, {}) }), isMenuOpen ? (_jsx(EmbedMenu, { embedInsightLabel: embedInsightLabel, isEmbedInsightDisabled: isEmbedInsightDisabled, embedInsightDisabledReason: embedInsightDisabledReason, documentationLabel: documentationLabel, documentationUrl: documentationUrl, toggleMenu: toggleMenu, onMenuItemClick: onMenuClick })) : null] }));
|
|
64
64
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The embed code dialog. It belongs to the embed flow, not to the Embed control, so it opens for a host's
|
|
3
|
+
* own Embed control too.
|
|
4
|
+
*/
|
|
5
|
+
export declare function EmbedInsightDialogContainer(): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=EmbedInsightDialogContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbedInsightDialogContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Embed/EmbedInsightDialogContainer.tsx"],"names":[],"mappings":"AA2BA;;;GAGG;AACH,wBAAgB,2BAA2B,mDAG1C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2007-2026 GoodData Corporation
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
import { useIntl } from "react-intl";
|
|
5
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
6
|
+
import { fillMissingTitlesWithMessages } from "@gooddata/sdk-ui";
|
|
7
|
+
import { EmbedInsightDialog } from "@gooddata/sdk-ui-ext";
|
|
8
|
+
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
9
|
+
import { hideDialog } from "../../../actions/dialogs_actions.js";
|
|
10
|
+
import { createEmbedDialogCopyCodeAction } from "../../../actions/embed_dialog_actions.js";
|
|
11
|
+
import { saveReportCheck } from "../../../actions/save_actions.js";
|
|
12
|
+
import { backend } from "../../../backend.js";
|
|
13
|
+
import { getProjectId } from "../../../selectors/bootstrap_selector.js";
|
|
14
|
+
import { getExecutionConfig } from "../../../selectors/execution_config_selector.js";
|
|
15
|
+
import { getFeatureFlags } from "../../../selectors/feature_flag_selector.js";
|
|
16
|
+
import { getInsightForSaveViaMd } from "../../../selectors/insight_selectors.js";
|
|
17
|
+
import { getIntlMessagesForLocale } from "../../../selectors/intl_selector.js";
|
|
18
|
+
import { getColorPalette } from "../../../store/app_context/app_context_selectors.js";
|
|
19
|
+
import { getShowEmbedInsightDialog } from "../../../store/dialogs/dialogs_selectors.js";
|
|
20
|
+
import { getIntegrationLink } from "./documentationLinks.js";
|
|
21
|
+
/**
|
|
22
|
+
* The embed code dialog. It belongs to the embed flow, not to the Embed control, so it opens for a host's
|
|
23
|
+
* own Embed control too.
|
|
24
|
+
*/
|
|
25
|
+
export function EmbedInsightDialogContainer() {
|
|
26
|
+
const isEmbedDialogVisible = useSelector(getShowEmbedInsightDialog);
|
|
27
|
+
return isEmbedDialogVisible ? _jsx(EmbedInsightDialogContent, {}) : null;
|
|
28
|
+
}
|
|
29
|
+
function EmbedInsightDialogContent() {
|
|
30
|
+
const intl = useIntl();
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
const dispatch = useDispatch();
|
|
33
|
+
const insight = useSelector(getInsightForSaveViaMd);
|
|
34
|
+
const settings = useSelector(getFeatureFlags);
|
|
35
|
+
const colorPalette = useSelector(getColorPalette);
|
|
36
|
+
const executionConfig = useSelector(getExecutionConfig);
|
|
37
|
+
const workspaceId = useSelector(getProjectId);
|
|
38
|
+
const messages = useSelector(getIntlMessagesForLocale);
|
|
39
|
+
const onDialogClose = useCallback(() => {
|
|
40
|
+
dispatch(hideDialog());
|
|
41
|
+
}, [dispatch]);
|
|
42
|
+
const onCopyCode = useCallback((code, type, codeType) => {
|
|
43
|
+
dispatch(createEmbedDialogCopyCodeAction(code, type, codeType));
|
|
44
|
+
}, [dispatch]);
|
|
45
|
+
const openSaveInsightClick = useCallback(() => {
|
|
46
|
+
onDialogClose();
|
|
47
|
+
dispatch(saveReportCheck(false, false, true));
|
|
48
|
+
}, [dispatch, onDialogClose]);
|
|
49
|
+
// we need to do the same transformations as when the insight is executed by the AD itself (see PluggableVisualization.tsx)
|
|
50
|
+
const effectiveInsight = useMemo(() => fillMissingTitlesWithMessages(insight, settings.locale, messages, undefined), [insight, settings.locale, messages]);
|
|
51
|
+
return (_jsx(EmbedInsightDialog, { insight: effectiveInsight, settings: settings, backend: backend, locale: intl.locale, theme: theme, reactIntegrationDocLink: getIntegrationLink(), webComponentIntegrationDocLink: getIntegrationLink(), colorPalette: colorPalette, executionConfig: executionConfig, onClose: onDialogClose, onCopyCode: onCopyCode, workspaceId: workspaceId, openSaveInsightDialog: openSaveInsightClick, showWebComponentsTab: true }));
|
|
52
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export interface IEmbedMenuProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
embedInsightLabel: string;
|
|
3
|
+
isEmbedInsightDisabled: boolean;
|
|
4
|
+
embedInsightDisabledReason?: string;
|
|
5
|
+
documentationLabel: string;
|
|
6
|
+
documentationUrl: string;
|
|
5
7
|
toggleMenu: () => void;
|
|
6
8
|
onMenuItemClick: () => void;
|
|
7
9
|
}
|
|
8
|
-
export declare function EmbedMenu({
|
|
10
|
+
export declare function EmbedMenu({ embedInsightLabel, isEmbedInsightDisabled, embedInsightDisabledReason, documentationLabel, documentationUrl, toggleMenu, onMenuItemClick, }: IEmbedMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
//# sourceMappingURL=EmbedMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Embed/EmbedMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmbedMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Embed/EmbedMenu.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,eAAe;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,SAAS,CAAC,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,eAAe,GAClB,EAAE,eAAe,2CAoCjB"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
|
-
import { FormattedMessage, useIntl } from "react-intl";
|
|
4
3
|
import { IconExternalLink, Item, ItemsWrapper, Overlay, Separator } from "@gooddata/sdk-ui-kit";
|
|
5
4
|
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
6
5
|
import { EmbedMenuItem } from "./EmbedMenuItem.js";
|
|
7
6
|
const MENU_ALIGN_POINTS = [{ align: "br tr" }];
|
|
8
|
-
export function EmbedMenu({
|
|
9
|
-
const intl = useIntl();
|
|
7
|
+
export function EmbedMenu({ embedInsightLabel, isEmbedInsightDisabled, embedInsightDisabledReason, documentationLabel, documentationUrl, toggleMenu, onMenuItemClick, }) {
|
|
10
8
|
const theme = useTheme();
|
|
11
9
|
const iconColor = theme?.palette?.complementary?.c5 ?? "#000000";
|
|
12
|
-
return (_jsx(Overlay, { alignTo: `[data-testid="s-embed-button"]`, alignPoints: MENU_ALIGN_POINTS, className: "gd-export-menu-overlay s-gd-export-menu-overlay", closeOnMouseDrag: true, closeOnOutsideClick: true, onClose: toggleMenu, children: _jsxs(ItemsWrapper, { smallItemsSpacing: true, className: ".s-embed-menu", children: [_jsx(EmbedMenuItem, { title:
|
|
13
|
-
id: "embedInsightDialog.embed.disable.message.empty.report",
|
|
14
|
-
}), onMenuItemClick: onMenuItemClick }), _jsx(Separator, {}), _jsx(Item, { className: "adi-embed-button-menu-item-link", onClick: toggleMenu, children: _jsxs("a", { href: embedAnalyticalDesignerLink, target: "_blank", rel: "noreferrer", children: [_jsx(FormattedMessage, { id: "embedInsightDialog.embed.analytical.designer.menu.title" }), _jsx(IconExternalLink, { className: "adi-embed-button-menu-item-ico-link", width: 14, color: iconColor })] }) })] }) }, "EmbedMenu"));
|
|
10
|
+
return (_jsx(Overlay, { alignTo: `[data-testid="s-embed-button"]`, alignPoints: MENU_ALIGN_POINTS, className: "gd-export-menu-overlay s-gd-export-menu-overlay", closeOnMouseDrag: true, closeOnOutsideClick: true, onClose: toggleMenu, children: _jsxs(ItemsWrapper, { smallItemsSpacing: true, className: ".s-embed-menu", children: [_jsx(EmbedMenuItem, { title: embedInsightLabel, disabled: isEmbedInsightDisabled, disableMessage: embedInsightDisabledReason, onMenuItemClick: onMenuItemClick }), _jsx(Separator, {}), _jsx(Item, { className: "adi-embed-button-menu-item-link", onClick: toggleMenu, children: _jsxs("a", { href: documentationUrl, target: "_blank", rel: "noreferrer", children: [documentationLabel, _jsx(IconExternalLink, { className: "adi-embed-button-menu-item-ico-link", width: 14, color: iconColor })] }) })] }) }, "EmbedMenu"));
|
|
15
11
|
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { type IAnalyticalDesignerOpenProps } from "../../embedding/editorHeaderSlotTypes.js";
|
|
2
|
+
/**
|
|
3
|
+
* The Open control as a button with the visualization picker in a dialog.
|
|
4
|
+
*/
|
|
5
|
+
export declare function InsightPickerDialog({ workspace, label, isDisabled, selectedInsightId: openInsightId, includeTags, excludeTags, enabledVisualizationUrls, isSemanticSearchEnabled, onOpenInsight, }: IAnalyticalDesignerOpenProps): import("react/jsx-runtime").JSX.Element;
|
|
2
6
|
//# sourceMappingURL=InsightPickerDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightPickerDialog.d.ts","sourceRoot":"","sources":["../../../src/components/header/InsightPickerDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightPickerDialog.d.ts","sourceRoot":"","sources":["../../../src/components/header/InsightPickerDialog.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAiB7F;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,KAAK,EACL,UAAU,EACV,iBAAiB,EAAE,aAAa,EAChC,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,GAChB,EAAE,4BAA4B,2CAwH9B"}
|
|
@@ -1,44 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
|
-
import { useCallback, useEffect,
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { useDispatch, useSelector } from "react-redux";
|
|
6
6
|
import { createSelector } from "reselect";
|
|
7
|
-
import { idRef,
|
|
7
|
+
import { idRef, uriRef } from "@gooddata/sdk-model";
|
|
8
8
|
import { InsightPicker, useInsightPickerState, } from "@gooddata/sdk-ui-ext";
|
|
9
9
|
import { Button, Dialog } from "@gooddata/sdk-ui-kit";
|
|
10
10
|
import { deleteReport } from "../../actions/delete_actions.js";
|
|
11
|
-
import { openReport } from "../../actions/open_actions.js";
|
|
12
11
|
import { saveReportCheck } from "../../actions/save_actions.js";
|
|
13
12
|
import { descriptionTooltipOpened } from "../../sagas/description_tooltip/description_tooltip_ui_actions.js";
|
|
14
13
|
import { isOwnershipSupported, supportsObjectUris } from "../../selectors/backend_capabilities_selector.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { canOpenReport } from "../../selectors/open_report_selector.js";
|
|
18
|
-
import { openReportIdSelector } from "../../selectors/report_selector.js";
|
|
19
|
-
import { getTagsConfiguration } from "../../selectors/route_selector.js";
|
|
20
|
-
import { getEnabledVisualizationClassesUrls } from "../../services/visualization_class_service.js";
|
|
14
|
+
import { getUserLoginMD5, getUserUri } from "../../selectors/bootstrap_selector.js";
|
|
15
|
+
import { getMetadataTimeZone } from "../../selectors/feature_flag_selector.js";
|
|
21
16
|
import { getIsReadOnlyMode } from "../../store/embedding/embedding_selectors.js";
|
|
22
|
-
const isDisabledSelector = createSelector([canOpenReport], (canOpenReport) => !canOpenReport);
|
|
23
17
|
const authorSelector = createSelector(supportsObjectUris, getUserUri, getUserLoginMD5, (isObjectUriSupported, userUri, userLoginMd5) => {
|
|
24
18
|
return isObjectUriSupported ? userUri : userLoginMd5;
|
|
25
19
|
});
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The Open control as a button with the visualization picker in a dialog.
|
|
22
|
+
*/
|
|
23
|
+
export function InsightPickerDialog({ workspace, label, isDisabled, selectedInsightId: openInsightId, includeTags, excludeTags, enabledVisualizationUrls, isSemanticSearchEnabled, onOpenInsight, }) {
|
|
28
24
|
const author = useSelector(authorSelector);
|
|
29
|
-
const isDisabled = useSelector(isDisabledSelector);
|
|
30
|
-
const openInsightId = useSelector(openReportIdSelector);
|
|
31
|
-
const enabledVisualizationClassesUrls = useSelector(getEnabledVisualizationClassesUrls);
|
|
32
25
|
const hasOwnershipSupport = useSelector(isOwnershipSupported);
|
|
33
26
|
const metadataTimeZone = useSelector(getMetadataTimeZone);
|
|
34
|
-
const isFilteringByTagsEnabled = useSelector(enableVisualizationFilteringByTags);
|
|
35
27
|
const isReadOnly = useSelector(getIsReadOnlyMode);
|
|
36
|
-
const isSmartSearchResultsEnabled = useSelector(enableCatalogSmartSearchResults);
|
|
37
|
-
const tagsConfiguration = useSelector(getTagsConfiguration);
|
|
38
28
|
const dispatch = useDispatch();
|
|
39
|
-
const onOpenInsight = useCallback((insightRef) => {
|
|
40
|
-
dispatch(openReport(insightRef, false));
|
|
41
|
-
}, [dispatch]);
|
|
42
29
|
const onDeleteInsight = useCallback((insightRef, insightTitle) => {
|
|
43
30
|
dispatch(deleteReport(insightRef, false, { title: insightTitle }));
|
|
44
31
|
}, [dispatch]);
|
|
@@ -49,7 +36,6 @@ export function InsightPickerDialog() {
|
|
|
49
36
|
dispatch(descriptionTooltipOpened(description));
|
|
50
37
|
}, [dispatch]);
|
|
51
38
|
const intl = useIntl();
|
|
52
|
-
const buttonText = intl.formatMessage({ id: "openReportPlaceholder" });
|
|
53
39
|
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
|
54
40
|
const pickerState = useInsightPickerState(hasOwnershipSupport ? author : undefined);
|
|
55
41
|
const pendingSaveAsNew = useRef(null);
|
|
@@ -62,12 +48,6 @@ export function InsightPickerDialog() {
|
|
|
62
48
|
onSaveAsNew(true);
|
|
63
49
|
}
|
|
64
50
|
}, [openInsightId, onSaveAsNew]);
|
|
65
|
-
const includeTags = useMemo(() => isFilteringByTagsEnabled
|
|
66
|
-
? tagsConfiguration?.includeObjectsWithTags?.map((tag) => objRefToString(tag))
|
|
67
|
-
: undefined, [isFilteringByTagsEnabled, tagsConfiguration?.includeObjectsWithTags]);
|
|
68
|
-
const excludeTags = useMemo(() => isFilteringByTagsEnabled
|
|
69
|
-
? tagsConfiguration?.excludeObjectsWithTags?.map((tag) => objRefToString(tag))
|
|
70
|
-
: undefined, [isFilteringByTagsEnabled, tagsConfiguration?.excludeObjectsWithTags]);
|
|
71
51
|
const handleSelect = useCallback((insightRef) => {
|
|
72
52
|
setIsDialogOpen(false);
|
|
73
53
|
onOpenInsight(insightRef);
|
|
@@ -103,5 +83,5 @@ export function InsightPickerDialog() {
|
|
|
103
83
|
},
|
|
104
84
|
},
|
|
105
85
|
];
|
|
106
|
-
return (_jsxs("div", { className: "s-report_select report-select editor-header-item", children: [_jsx(Button, { className: "gd-button-secondary type-metric customizable", value:
|
|
86
|
+
return (_jsxs("div", { className: "s-report_select report-select editor-header-item", children: [_jsx(Button, { className: "gd-button-secondary type-metric customizable", value: label, disabled: isDisabled, onClick: () => setIsDialogOpen(true) }), isDialogOpen ? (_jsx(Dialog, { className: "open-visualizations-dialog", containerClassName: "open-visualizations-dialog-container", isModal: false, shouldCloseOnClick: () => true, onClose: () => setIsDialogOpen(false), children: _jsx("div", { className: "open-visualizations s-open-visualizations", children: _jsx(InsightPicker, { workspace: workspace, author: hasOwnershipSupport ? author : undefined, includeTags: includeTags, excludeTags: excludeTags, enabledVisualizationClassesUrls: enabledVisualizationUrls, selectedInsightId: openInsightId, metadataTimeZone: metadataTimeZone, enableSemanticSearch: isSemanticSearchEnabled, width: 740, ...pickerState, onSelect: handleSelect, onDescriptionPanelOpen: onDescriptionTooltipOpened, menuActions: menuActions }) }) })) : null] }));
|
|
107
87
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IAnalyticalDesignerHeaderContext, type IAnalyticalDesignerOpenProps } from "../../embedding/editorHeaderSlotTypes.js";
|
|
2
|
+
export declare function useOpenProps(context: IAnalyticalDesignerHeaderContext): IAnalyticalDesignerOpenProps;
|
|
3
|
+
/**
|
|
4
|
+
* Default of the Open slot: the picker variant the props ask for.
|
|
5
|
+
*/
|
|
6
|
+
export declare function DefaultOpen(props: IAnalyticalDesignerOpenProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=OpenControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenControl.d.ts","sourceRoot":"","sources":["../../../src/components/header/OpenControl.tsx"],"names":[],"mappings":"AAWA,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACpC,MAAM,0CAA0C,CAAC;AAgClD,wBAAgB,YAAY,CAAC,OAAO,EAAE,gCAAgC,GAAG,4BAA4B,CAwCpG;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,4BAA4B,2CAM9D"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { useIntl } from "react-intl";
|
|
5
|
+
import { useSelector } from "react-redux";
|
|
6
|
+
import { createSelector } from "reselect";
|
|
7
|
+
import { objRefToString } from "@gooddata/sdk-model";
|
|
8
|
+
import { openReport } from "../../actions/open_actions.js";
|
|
9
|
+
import { enableCatalogSmartSearchResults, enableEnhancedInsightPicker, enableVisualizationFilteringByTags, } from "../../selectors/feature_flag_selector.js";
|
|
10
|
+
import { canOpenReport, isReportOpeningSelector } from "../../selectors/open_report_selector.js";
|
|
11
|
+
import { openReportIdSelector } from "../../selectors/report_selector.js";
|
|
12
|
+
import { getTagsConfiguration } from "../../selectors/route_selector.js";
|
|
13
|
+
import { getEnabledVisualizationClassesUrls } from "../../services/visualization_class_service.js";
|
|
14
|
+
import { useGuardedCallback } from "./editorHeaderContext.js";
|
|
15
|
+
import { InsightPickerDialog } from "./InsightPickerDialog.js";
|
|
16
|
+
import { VisualizationsDropdown } from "./VisualizationsDropdown.js";
|
|
17
|
+
// Tags come as ObjRef (idRef) from the route; the pickers expect their identifiers, and only with the flag on.
|
|
18
|
+
const pickerTagsSelector = createSelector(enableVisualizationFilteringByTags, getTagsConfiguration, (isFilteringByTagsEnabled, tagsConfiguration) => ({
|
|
19
|
+
includeTags: isFilteringByTagsEnabled
|
|
20
|
+
? tagsConfiguration?.includeObjectsWithTags?.map((tag) => objRefToString(tag))
|
|
21
|
+
: undefined,
|
|
22
|
+
excludeTags: isFilteringByTagsEnabled
|
|
23
|
+
? tagsConfiguration?.excludeObjectsWithTags?.map((tag) => objRefToString(tag))
|
|
24
|
+
: undefined,
|
|
25
|
+
}));
|
|
26
|
+
const runOpen = (dispatch, _state, ref) => dispatch(openReport(ref, false));
|
|
27
|
+
export function useOpenProps(context) {
|
|
28
|
+
const intl = useIntl();
|
|
29
|
+
const isDisabled = !useSelector(canOpenReport);
|
|
30
|
+
const isLoading = useSelector(isReportOpeningSelector);
|
|
31
|
+
const selectedInsightId = useSelector(openReportIdSelector);
|
|
32
|
+
const isEnhancedInsightPickerEnabled = useSelector(enableEnhancedInsightPicker);
|
|
33
|
+
const { includeTags, excludeTags } = useSelector(pickerTagsSelector);
|
|
34
|
+
const enabledVisualizationUrls = useSelector(getEnabledVisualizationClassesUrls);
|
|
35
|
+
const isSemanticSearchEnabled = useSelector(enableCatalogSmartSearchResults);
|
|
36
|
+
const onOpenInsight = useGuardedCallback(canOpenReport, runOpen);
|
|
37
|
+
const label = intl.formatMessage({ id: "openReportPlaceholder" });
|
|
38
|
+
return useMemo(() => ({
|
|
39
|
+
...context,
|
|
40
|
+
label,
|
|
41
|
+
isDisabled,
|
|
42
|
+
isLoading,
|
|
43
|
+
...(selectedInsightId ? { selectedInsightId } : {}),
|
|
44
|
+
pickerVariant: isEnhancedInsightPickerEnabled ? "dialog" : "dropdown",
|
|
45
|
+
...(includeTags ? { includeTags } : {}),
|
|
46
|
+
...(excludeTags ? { excludeTags } : {}),
|
|
47
|
+
enabledVisualizationUrls,
|
|
48
|
+
isSemanticSearchEnabled,
|
|
49
|
+
onOpenInsight,
|
|
50
|
+
}), [
|
|
51
|
+
context,
|
|
52
|
+
label,
|
|
53
|
+
isDisabled,
|
|
54
|
+
isLoading,
|
|
55
|
+
selectedInsightId,
|
|
56
|
+
isEnhancedInsightPickerEnabled,
|
|
57
|
+
includeTags,
|
|
58
|
+
excludeTags,
|
|
59
|
+
enabledVisualizationUrls,
|
|
60
|
+
isSemanticSearchEnabled,
|
|
61
|
+
onOpenInsight,
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Default of the Open slot: the picker variant the props ask for.
|
|
66
|
+
*/
|
|
67
|
+
export function DefaultOpen(props) {
|
|
68
|
+
return props.pickerVariant === "dialog" ? (_jsx(InsightPickerDialog, { ...props })) : (_jsx(VisualizationsDropdown, { ...props }));
|
|
69
|
+
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { type IAnalyticalDesignerOptionsProps } from "../../../embedding/editorHeaderSlotTypes.js";
|
|
2
|
+
/**
|
|
3
|
+
* Default of the Options slot: a button that opens the menu of the given items.
|
|
4
|
+
*/
|
|
5
|
+
export declare function DefaultOptions({ label, accessibleName, isDisabled, items, }: IAnalyticalDesignerOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
2
6
|
//# sourceMappingURL=OptionsButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsButton.d.ts","sourceRoot":"","sources":["../../../../src/components/header/OptionsMenu/OptionsButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OptionsButton.d.ts","sourceRoot":"","sources":["../../../../src/components/header/OptionsMenu/OptionsButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAInG;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC3B,KAAK,EACL,cAAc,EACd,UAAU,EACV,KAAK,GACR,EAAE,+BAA+B,2CA2BjC"}
|
|
@@ -1,12 +1,22 @@
|
|
|
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) 2007-2026 GoodData Corporation
|
|
3
|
-
import {
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
4
|
import { Button } from "@gooddata/sdk-ui-kit";
|
|
5
5
|
import { OptionsMenu } from "./OptionsMenu.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Default of the Options slot: a button that opens the menu of the given items.
|
|
8
|
+
*/
|
|
9
|
+
export function DefaultOptions({ label, accessibleName, isDisabled, items, }) {
|
|
10
|
+
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
11
|
+
const toggleMenu = useCallback(() => {
|
|
12
|
+
setIsMenuOpen((open) => !open);
|
|
13
|
+
}, []);
|
|
14
|
+
const closeMenu = useCallback(() => {
|
|
15
|
+
setIsMenuOpen(false);
|
|
16
|
+
}, []);
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { className: "gd-button-secondary s-options-button editor-header-item", value: label, disabled: isDisabled, onClick: toggleMenu, accessibilityConfig: {
|
|
18
|
+
ariaLabel: accessibleName,
|
|
19
|
+
ariaHaspopup: "menu",
|
|
20
|
+
ariaExpanded: isMenuOpen,
|
|
21
|
+
} }), isMenuOpen ? _jsx(OptionsMenu, { items: items, onClose: closeMenu }) : null] }));
|
|
22
|
+
}
|
|
@@ -1,63 +1,11 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onOpenAsReport: (title: string) => void;
|
|
6
|
-
showDialogExportCsv: (mode: ExportCsvMode) => void;
|
|
7
|
-
showDialogExportReport: () => void;
|
|
8
|
-
showDialogExportPdf: () => void;
|
|
9
|
-
openInAnalyticalDesigner: () => ReturnType<typeof openInAnalyticalDesignerAction>;
|
|
1
|
+
import { type AnalyticalDesignerOptionsItem } from "../../../embedding/editorHeaderSlotTypes.js";
|
|
2
|
+
interface IOptionsMenuProps {
|
|
3
|
+
items: readonly AnalyticalDesignerOptionsItem[];
|
|
4
|
+
onClose: () => void;
|
|
10
5
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exportRawBubbleTextProvider?: BubbleTextProvider;
|
|
16
|
-
isOpenAsReportDisabled: boolean;
|
|
17
|
-
isExportVisible: boolean;
|
|
18
|
-
isExportCSVDisabled: boolean;
|
|
19
|
-
isExportRawCSVDisabled: boolean;
|
|
20
|
-
isExportXLSXDisabled: boolean;
|
|
21
|
-
isExportPDFDisabled: boolean;
|
|
22
|
-
exportToCsvSupported: boolean;
|
|
23
|
-
exportToXlsxSupported: boolean;
|
|
24
|
-
exportToPdfSupported: boolean;
|
|
25
|
-
isEditFromKD: boolean;
|
|
26
|
-
hiddenActions: string[];
|
|
27
|
-
enableRawExports: boolean;
|
|
28
|
-
hasPartialDataLimitBreaks: boolean;
|
|
29
|
-
isAccessibilityModeEnabled: boolean;
|
|
30
|
-
isEnableTimezoneChange: boolean;
|
|
31
|
-
}
|
|
32
|
-
interface IOptionsMenuOwnProps {
|
|
33
|
-
isShowOptionsMenu: boolean;
|
|
34
|
-
toggleOptionsMenu: () => void;
|
|
35
|
-
}
|
|
36
|
-
type IOptionsMenuProps = IOptionsMenuDispatchProps & IOptionsMenuStateProps & IOptionsMenuOwnProps;
|
|
37
|
-
export declare const OptionsMenuBase: import("react").MemoExoticComponent<({ exportBubbleTextProvider, exportRawBubbleTextProvider, isExportVisible, isExportCSVDisabled, isExportRawCSVDisabled, isExportXLSXDisabled, isExportPDFDisabled, exportToCsvSupported, exportToXlsxSupported, exportToPdfSupported, isEditFromKD, hiddenActions, enableRawExports, hasPartialDataLimitBreaks, isAccessibilityModeEnabled, isEnableTimezoneChange, isShowOptionsMenu, toggleOptionsMenu, showDialogExportCsv, showDialogExportReport, showDialogExportPdf, openInAnalyticalDesigner, }: IOptionsMenuProps) => import("react/jsx-runtime").JSX.Element>;
|
|
38
|
-
export declare const OptionsMenu: import("react-redux").ConnectedComponent<import("react").MemoExoticComponent<({ exportBubbleTextProvider, exportRawBubbleTextProvider, isExportVisible, isExportCSVDisabled, isExportRawCSVDisabled, isExportXLSXDisabled, isExportPDFDisabled, exportToCsvSupported, exportToXlsxSupported, exportToPdfSupported, isEditFromKD, hiddenActions, enableRawExports, hasPartialDataLimitBreaks, isAccessibilityModeEnabled, isEnableTimezoneChange, isShowOptionsMenu, toggleOptionsMenu, showDialogExportCsv, showDialogExportReport, showDialogExportPdf, openInAnalyticalDesigner, }: IOptionsMenuProps) => import("react/jsx-runtime").JSX.Element>, {
|
|
39
|
-
context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null>;
|
|
40
|
-
store?: import("redux").Store;
|
|
41
|
-
bubbleTextProvider?: BubbleTextProvider;
|
|
42
|
-
exportBubbleTextProvider?: BubbleTextProvider;
|
|
43
|
-
exportRawBubbleTextProvider?: BubbleTextProvider;
|
|
44
|
-
isOpenAsReportDisabled: boolean;
|
|
45
|
-
isExportVisible: boolean;
|
|
46
|
-
isExportCSVDisabled: boolean;
|
|
47
|
-
isExportRawCSVDisabled: boolean;
|
|
48
|
-
isExportXLSXDisabled: boolean;
|
|
49
|
-
isExportPDFDisabled: boolean;
|
|
50
|
-
exportToCsvSupported: boolean;
|
|
51
|
-
exportToXlsxSupported: boolean;
|
|
52
|
-
exportToPdfSupported: boolean;
|
|
53
|
-
isEditFromKD: boolean;
|
|
54
|
-
hiddenActions: string[];
|
|
55
|
-
enableRawExports: boolean;
|
|
56
|
-
hasPartialDataLimitBreaks: boolean;
|
|
57
|
-
isAccessibilityModeEnabled: boolean;
|
|
58
|
-
isEnableTimezoneChange: boolean;
|
|
59
|
-
isShowOptionsMenu: boolean;
|
|
60
|
-
toggleOptionsMenu: () => void;
|
|
61
|
-
}>;
|
|
6
|
+
/**
|
|
7
|
+
* The options menu overlay. Selecting an action closes the menu and starts the action.
|
|
8
|
+
*/
|
|
9
|
+
export declare function OptionsMenu({ items, onClose }: IOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
62
10
|
export {};
|
|
63
11
|
//# sourceMappingURL=OptionsMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/header/OptionsMenu/OptionsMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"OptionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/header/OptionsMenu/OptionsMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,6BAA6B,EAErC,MAAM,6CAA6C,CAAC;AA6CrD,UAAU,iBAAiB;IACvB,KAAK,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAChD,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,iBAAiB,2CAwChE"}
|