@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.
Files changed (152) hide show
  1. package/NOTICE +16 -233
  2. package/README.md +13 -5
  3. package/esm/Root.d.ts +0 -2
  4. package/esm/Root.d.ts.map +1 -1
  5. package/esm/Root.js +0 -4
  6. package/esm/actions/app_context_actions.d.ts.map +1 -1
  7. package/esm/actions/app_context_actions.js +2 -4
  8. package/esm/actions/dialogs_actions.d.ts +2 -2
  9. package/esm/actions/dialogs_actions.js +2 -2
  10. package/esm/components/Editor.d.ts.map +1 -1
  11. package/esm/components/Editor.js +31 -2
  12. package/esm/components/EditorHeader.d.ts +19 -1
  13. package/esm/components/EditorHeader.d.ts.map +1 -1
  14. package/esm/components/EditorHeader.js +38 -86
  15. package/esm/components/ReportDescription.d.ts +8 -1
  16. package/esm/components/ReportDescription.d.ts.map +1 -1
  17. package/esm/components/ReportDescription.js +37 -7
  18. package/esm/components/buckets/MeasureAttributeFilterOrganized.d.ts.map +1 -1
  19. package/esm/components/buckets/MeasureAttributeFilterOrganized.js +1 -1
  20. package/esm/components/buckets/MeasureDateFilter.d.ts.map +1 -1
  21. package/esm/components/buckets/MeasureDateFilter.js +1 -1
  22. package/esm/components/buckets/categories/DateDatasetsDropdown.d.ts.map +1 -1
  23. package/esm/components/filterBar/dateFilter/TimeComparisonSection/TimeComparisonTypesDropdown.d.ts.map +1 -1
  24. package/esm/components/header/CancelButton.d.ts +13 -0
  25. package/esm/components/header/CancelButton.d.ts.map +1 -0
  26. package/esm/components/header/CancelButton.js +32 -0
  27. package/esm/components/header/ClearButton.d.ts +7 -0
  28. package/esm/components/header/ClearButton.d.ts.map +1 -0
  29. package/esm/components/header/ClearButton.js +24 -0
  30. package/esm/components/header/EditorActions.d.ts +14 -0
  31. package/esm/components/header/EditorActions.d.ts.map +1 -0
  32. package/esm/components/header/EditorActions.js +71 -0
  33. package/esm/components/header/Embed/EmbedButton.d.ts +6 -1
  34. package/esm/components/header/Embed/EmbedButton.d.ts.map +1 -1
  35. package/esm/components/header/Embed/EmbedButton.js +48 -48
  36. package/esm/components/header/Embed/EmbedInsightDialogContainer.d.ts +6 -0
  37. package/esm/components/header/Embed/EmbedInsightDialogContainer.d.ts.map +1 -0
  38. package/esm/components/header/Embed/EmbedInsightDialogContainer.js +52 -0
  39. package/esm/components/header/Embed/EmbedMenu.d.ts +6 -4
  40. package/esm/components/header/Embed/EmbedMenu.d.ts.map +1 -1
  41. package/esm/components/header/Embed/EmbedMenu.js +2 -6
  42. package/esm/components/header/InsightPickerDialog.d.ts +5 -1
  43. package/esm/components/header/InsightPickerDialog.d.ts.map +1 -1
  44. package/esm/components/header/InsightPickerDialog.js +9 -29
  45. package/esm/components/header/OpenControl.d.ts +7 -0
  46. package/esm/components/header/OpenControl.d.ts.map +1 -0
  47. package/esm/components/header/OpenControl.js +69 -0
  48. package/esm/components/header/OptionsMenu/OptionsButton.d.ts +5 -1
  49. package/esm/components/header/OptionsMenu/OptionsButton.d.ts.map +1 -1
  50. package/esm/components/header/OptionsMenu/OptionsButton.js +19 -9
  51. package/esm/components/header/OptionsMenu/OptionsMenu.d.ts +8 -60
  52. package/esm/components/header/OptionsMenu/OptionsMenu.d.ts.map +1 -1
  53. package/esm/components/header/OptionsMenu/OptionsMenu.js +56 -112
  54. package/esm/components/header/OptionsMenu/OptionsMenuItem.d.ts +3 -4
  55. package/esm/components/header/OptionsMenu/OptionsMenuItem.d.ts.map +1 -1
  56. package/esm/components/header/OptionsMenu/OptionsMenuItem.js +5 -9
  57. package/esm/components/header/OptionsMenu/useOptionsProps.d.ts +26 -0
  58. package/esm/components/header/OptionsMenu/useOptionsProps.d.ts.map +1 -0
  59. package/esm/components/header/OptionsMenu/useOptionsProps.js +188 -0
  60. package/esm/components/header/SaveAsNewReportButton.d.ts +6 -1
  61. package/esm/components/header/SaveAsNewReportButton.d.ts.map +1 -1
  62. package/esm/components/header/SaveAsNewReportButton.js +20 -10
  63. package/esm/components/header/SaveReportButton.d.ts +6 -1
  64. package/esm/components/header/SaveReportButton.d.ts.map +1 -1
  65. package/esm/components/header/SaveReportButton.js +41 -18
  66. package/esm/components/header/TimezoneDialog.d.ts +1 -1
  67. package/esm/components/header/TimezoneDialog.js +1 -1
  68. package/esm/components/header/UndoRedoButtons.d.ts +7 -0
  69. package/esm/components/header/UndoRedoButtons.d.ts.map +1 -0
  70. package/esm/components/header/UndoRedoButtons.js +31 -0
  71. package/esm/components/header/VisualizationInfo.d.ts +11 -0
  72. package/esm/components/header/VisualizationInfo.d.ts.map +1 -0
  73. package/esm/components/header/VisualizationInfo.js +47 -0
  74. package/esm/components/header/VisualizationTitle.d.ts +7 -0
  75. package/esm/components/header/VisualizationTitle.d.ts.map +1 -0
  76. package/esm/components/header/VisualizationTitle.js +36 -0
  77. package/esm/components/header/VisualizationsDropdown.d.ts +5 -1
  78. package/esm/components/header/VisualizationsDropdown.d.ts.map +1 -1
  79. package/esm/components/header/VisualizationsDropdown.js +7 -33
  80. package/esm/components/header/editorHeaderContext.d.ts +20 -0
  81. package/esm/components/header/editorHeaderContext.d.ts.map +1 -0
  82. package/esm/components/header/editorHeaderContext.js +58 -0
  83. package/esm/components/header/share/InsightAccess.d.ts +30 -1
  84. package/esm/components/header/share/InsightAccess.d.ts.map +1 -1
  85. package/esm/components/header/share/InsightAccess.js +81 -18
  86. package/esm/components/header/share/InsightAccessChip.d.ts +2 -2
  87. package/esm/components/header/share/InsightAccessChip.d.ts.map +1 -1
  88. package/esm/components/header/share/InsightAccessChip.js +3 -3
  89. package/esm/embedding/AnalyticalDesignerEmbedded.d.ts +1 -1
  90. package/esm/embedding/AnalyticalDesignerEmbedded.js +1 -1
  91. package/esm/embedding/editorHeaderSlotTypes.d.ts +569 -0
  92. package/esm/embedding/editorHeaderSlotTypes.d.ts.map +1 -0
  93. package/esm/embedding/editorHeaderSlotTypes.js +2 -0
  94. package/esm/embedding/slots.d.ts +73 -0
  95. package/esm/embedding/slots.d.ts.map +1 -1
  96. package/esm/index.d.ts +1 -0
  97. package/esm/index.d.ts.map +1 -1
  98. package/esm/postMessageApi/outgoing/metrics_changed_events.d.ts +1 -1
  99. package/esm/postMessageApi/outgoing/metrics_changed_events.js +1 -1
  100. package/esm/postMessageApi/outgoing/post_event_helper.d.ts +1 -1
  101. package/esm/postMessageApi/outgoing/post_event_helper.d.ts.map +1 -1
  102. package/esm/postMessageApi/outgoing/post_event_helper.js +1 -1
  103. package/esm/postMessageApi/sagas/control_filtering_saga.js +1 -1
  104. package/esm/sdk-ui-analytical-designer.d.ts +664 -0
  105. package/esm/selectors/editor_header_selector.d.ts +225 -0
  106. package/esm/selectors/editor_header_selector.d.ts.map +1 -1
  107. package/esm/selectors/editor_header_selector.js +8 -1
  108. package/esm/selectors/insight_access_selector.d.ts +185 -4
  109. package/esm/selectors/insight_access_selector.d.ts.map +1 -1
  110. package/esm/selectors/insight_access_selector.js +5 -3
  111. package/esm/selectors/report_title_selector.d.ts +6 -6
  112. package/esm/selectors/report_title_selector.d.ts.map +1 -1
  113. package/esm/selectors/report_title_selector.js +4 -3
  114. package/esm/selectors/report_visualization_selector.d.ts +4 -0
  115. package/esm/selectors/report_visualization_selector.d.ts.map +1 -1
  116. package/esm/selectors/save_report_selector.d.ts +7 -0
  117. package/esm/selectors/save_report_selector.d.ts.map +1 -1
  118. package/esm/selectors/save_report_selector.js +11 -1
  119. package/esm/selectors/uri_selector.js +1 -1
  120. package/esm/store/app_context/app_context_slices.d.ts.map +1 -1
  121. package/esm/store/app_context/app_context_slices.js +2 -3
  122. package/esm/store/app_context/session_id_reducer.d.ts +2 -3
  123. package/esm/store/app_context/session_id_reducer.d.ts.map +1 -1
  124. package/esm/store/app_context/session_id_reducer.js +2 -3
  125. package/esm/store/intl/intl_slice.d.ts.map +1 -1
  126. package/esm/store/intl/intl_slice.js +2 -3
  127. package/esm/translations/en-US.json +8 -0
  128. package/esm/utils/browser_detect.d.ts +2 -1
  129. package/esm/utils/browser_detect.d.ts.map +1 -1
  130. package/esm/utils/browser_detect.js +21 -3
  131. package/esm/utils/dropdown.d.ts +6 -2
  132. package/esm/utils/dropdown.d.ts.map +1 -1
  133. package/esm/utils/dropdown.js +10 -3
  134. package/package.json +23 -31
  135. package/styles/css/catalog.css +2 -2
  136. package/styles/css/catalog_sidebar.css +1 -1
  137. package/styles/css/catalog_sidebar.css.map +1 -1
  138. package/styles/css/editor_canvas.css +1 -1
  139. package/styles/css/editor_header.css +16 -1
  140. package/styles/css/editor_header.css.map +1 -1
  141. package/styles/css/main.css +20 -5
  142. package/styles/css/main.css.map +1 -1
  143. package/styles/scss/catalog.scss +2 -2
  144. package/styles/scss/catalog_sidebar.scss +2 -1
  145. package/styles/scss/editor_canvas.scss +1 -1
  146. package/styles/scss/editor_header.scss +20 -1
  147. package/esm/components/ReportTitle.d.ts +0 -2
  148. package/esm/components/ReportTitle.d.ts.map +0 -1
  149. package/esm/components/ReportTitle.js +0 -51
  150. package/esm/components/header/Embed/utils.d.ts +0 -4
  151. package/esm/components/header/Embed/utils.d.ts.map +0 -1
  152. 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 { useDispatch, useSelector } from "react-redux";
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 { useTheme } from "@gooddata/sdk-ui-theme-provider";
11
- import { hideDialog } from "../../../actions/dialogs_actions.js";
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 { getColorPalette } from "../../../store/app_context/app_context_selectors.js";
22
- import { getShowEmbedInsightDialog } from "../../../store/dialogs/dialogs_selectors.js";
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
- export function EmbedButton() {
28
- const [isMenuOpen, setMenuOpen] = useState(false);
15
+ const canEmbed = (state) => !isReportBlankSelector(state);
16
+ const runEmbed = (dispatch) => dispatch(createEmbedDialogOpenAction());
17
+ export function useEmbedProps(context) {
29
18
  const intl = useIntl();
30
- const theme = useTheme();
31
- const dispatch = useDispatch();
32
- const isReportBlank = useSelector((state) => isReportBlankSelector(state));
33
- const insight = useSelector((state) => getInsightForSaveViaMd(state));
34
- const settings = useSelector((state) => getFeatureFlags(state));
35
- const colorPalette = useSelector((state) => getColorPalette(state));
36
- const documentationUrl = useSelector((state) => documentationUrlSelector(state));
37
- const executionConfig = useSelector((state) => getExecutionConfig(state));
38
- const workspaceId = useSelector((state) => getProjectId(state));
39
- const isEmbedDialogVisible = useSelector((state) => getShowEmbedInsightDialog(state));
40
- const messages = useSelector((state) => getIntlMessagesForLocale(state));
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
- dispatch(createEmbedDialogOpenAction());
47
- }, [dispatch]);
48
- const onDialogClose = useCallback(() => {
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
- isReportBlank: boolean;
3
- isCodeGenerationSupported: boolean;
4
- embedAnalyticalDesignerLink: string;
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({ isReportBlank, embedAnalyticalDesignerLink, toggleMenu, onMenuItemClick, }: IEmbedMenuProps): import("react/jsx-runtime").JSX.Element;
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":"AAWA,MAAM,WAAW,eAAe;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,yBAAyB,EAAE,OAAO,CAAC;IACnC,2BAA2B,EAAE,MAAM,CAAC;IACpC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,SAAS,CAAC,EACtB,aAAa,EACb,2BAA2B,EAC3B,UAAU,EACV,eAAe,GAClB,EAAE,eAAe,2CAuCjB"}
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({ isReportBlank, embedAnalyticalDesignerLink, toggleMenu, onMenuItemClick, }) {
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: intl.formatMessage({ id: "embedInsightDialog.embed.menu.title" }), disabled: isReportBlank, disableMessage: intl.formatMessage({
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
- export declare function InsightPickerDialog(): import("react/jsx-runtime").JSX.Element;
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":"AA8CA,wBAAgB,mBAAmB,4CAsJlC"}
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, useMemo, useRef, useState } from "react";
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, objRefToString, uriRef } from "@gooddata/sdk-model";
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 { getProjectId, getUserLoginMD5, getUserUri } from "../../selectors/bootstrap_selector.js";
16
- import { enableCatalogSmartSearchResults, enableVisualizationFilteringByTags, getMetadataTimeZone, } from "../../selectors/feature_flag_selector.js";
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
- export function InsightPickerDialog() {
27
- const workspaceId = useSelector(getProjectId);
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: buttonText, 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: workspaceId, author: hasOwnershipSupport ? author : undefined, includeTags: includeTags, excludeTags: excludeTags, enabledVisualizationClassesUrls: enabledVisualizationClassesUrls, selectedInsightId: openInsightId, metadataTimeZone: metadataTimeZone, enableSemanticSearch: isSmartSearchResultsEnabled, width: 740, ...pickerState, onSelect: handleSelect, onDescriptionPanelOpen: onDescriptionTooltipOpened, menuActions: menuActions }) }) })) : null] }));
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
- export declare const OptionsButton: import("react").MemoExoticComponent<(_props: Record<string, unknown>) => import("react/jsx-runtime").JSX.Element>;
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":"AAQA,eAAO,MAAM,aAAa,+CAAuC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,6CAiBtF,CAAC"}
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 { Fragment, memo, useState } from "react";
3
+ import { useCallback, useState } from "react";
4
4
  import { Button } from "@gooddata/sdk-ui-kit";
5
5
  import { OptionsMenu } from "./OptionsMenu.js";
6
- export const OptionsButton = memo(function OptionsButton(_props) {
7
- const [isShowOptionsMenu, setIsShowOptionsMenu] = useState(false);
8
- const toggleOptionsMenu = () => {
9
- setIsShowOptionsMenu(!isShowOptionsMenu);
10
- };
11
- return (_jsxs(Fragment, { children: [_jsx(Button, { className: "gd-button-secondary s-options-button editor-header-item", value: "\u22EF", onClick: toggleOptionsMenu }), _jsx(OptionsMenu, { isShowOptionsMenu: isShowOptionsMenu, toggleOptionsMenu: toggleOptionsMenu })] }));
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 IntlShape } from "react-intl";
2
- import { type ExportCsvMode } from "../../../actions/export_report_actions.js";
3
- import { openInAnalyticalDesignerAction } from "../../../store/router/router_actions.js";
4
- interface IOptionsMenuDispatchProps {
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
- type BubbleTextProvider = (intl: IntlShape) => string;
12
- interface IOptionsMenuStateProps {
13
- bubbleTextProvider?: BubbleTextProvider;
14
- exportBubbleTextProvider?: BubbleTextProvider;
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,EAAE,KAAK,SAAS,EAA0B,MAAM,YAAY,CAAC;AAMpE,OAAO,EACH,KAAK,aAAa,EAIrB,MAAM,2CAA2C,CAAC;AAyBnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAWzF,UAAU,yBAAyB;IAC/B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,mBAAmB,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,wBAAwB,EAAE,MAAM,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;CACrF;AAED,KAAK,kBAAkB,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAAC;AAEtD,UAAU,sBAAsB;IAC5B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,wBAAwB,CAAC,EAAE,kBAAkB,CAAC;IAC9C,2BAA2B,CAAC,EAAE,kBAAkB,CAAC;IACjD,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,sBAAsB,EAAE,OAAO,CAAC;IAChC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yBAAyB,EAAE,OAAO,CAAC;IACnC,0BAA0B,EAAE,OAAO,CAAC;IACpC,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,UAAU,oBAAoB;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,KAAK,iBAAiB,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AA+BnG,eAAO,MAAM,eAAe,+gBAuBzB,iBAAiB,6CAiLlB,CAAC;AAEH,eAAO,MAAM,WAAW,wjBAnLrB,iBAAiB;;;yBA/EK,kBAAkB;+BACZ,kBAAkB;kCACf,kBAAkB;4BACxB,OAAO;qBACd,OAAO;yBACH,OAAO;4BACJ,OAAO;0BACT,OAAO;yBACR,OAAO;0BACN,OAAO;2BACN,OAAO;0BACR,OAAO;kBACf,OAAO;mBACN,MAAM,EAAE;sBACL,OAAO;+BACE,OAAO;gCACN,OAAO;4BACX,OAAO;uBAIZ,OAAO;uBACP,MAAM,IAAI;EAoPf,CAAC"}
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"}