@gooddata/sdk-ui-analytical-designer 11.67.0-alpha.3 → 11.67.0-alpha.4

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
@@ -19,11 +19,13 @@ import { IColorPalette } from '@gooddata/sdk-model';
19
19
  import { ICommandFailedBody } from '@gooddata/sdk-embedding';
20
20
  import { IDrillEvent } from '@gooddata/sdk-ui';
21
21
  import { IEntitlementDescriptor } from '@gooddata/sdk-model';
22
+ import { IFilter } from '@gooddata/sdk-model';
22
23
  import { IFilterContextContent } from '@gooddata/sdk-embedding';
23
24
  import { IInsight } from '@gooddata/sdk-model';
24
25
  import { IInsightDefinition } from '@gooddata/sdk-model';
25
26
  import { ILocale } from '@gooddata/sdk-model';
26
27
  import { IObjectMeta } from '@gooddata/sdk-embedding';
28
+ import { IObjectPermissionsObject } from '@gooddata/sdk-backend-spi';
27
29
  import { ISeparators } from '@gooddata/sdk-model';
28
30
  import { ISlotProps } from '@gooddata/sdk-ui-kit';
29
31
  import { ITheme } from '@gooddata/sdk-model';
@@ -33,7 +35,9 @@ import { IUserWorkspaceSettings } from '@gooddata/sdk-backend-spi';
33
35
  import { IWorkspacePermissions } from '@gooddata/sdk-model';
34
36
  import { ObjRef } from '@gooddata/sdk-model';
35
37
  import { ReactElement } from 'react';
38
+ import { ReactNode } from 'react';
36
39
  import { Ref } from 'react';
40
+ import { ShareStatus } from '@gooddata/sdk-model';
37
41
 
38
42
  /**
39
43
  * Analytical Designer as a React component.
@@ -76,6 +80,20 @@ export declare type AnalyticalDesignerEvent<T extends AnalyticalDesignerEventTyp
76
80
  */
77
81
  export declare type AnalyticalDesignerEventType = keyof IAnalyticalDesignerEventDataMap;
78
82
 
83
+ /**
84
+ * How the editor header is placed next to the catalog.
85
+ *
86
+ * @remarks
87
+ * - `legacy`: the header spans the editor and its information starts after the catalog width.
88
+ *
89
+ * - `compact`: the header spans the editor and its information starts at the left edge.
90
+ *
91
+ * - `catalogSidebar`: the header starts next to the collapsible catalog and follows its width.
92
+ *
93
+ * @alpha
94
+ */
95
+ export declare type AnalyticalDesignerHeaderLayoutMode = "legacy" | "compact" | "catalogSidebar";
96
+
79
97
  /**
80
98
  * An action of the Analytical Designer header that a host can hide.
81
99
  *
@@ -83,6 +101,25 @@ export declare type AnalyticalDesignerEventType = keyof IAnalyticalDesignerEvent
83
101
  */
84
102
  export declare type AnalyticalDesignerHiddenAction = "open" | "clear" | "export" | "save" | "saveAs" | "openInAnalyticalDesigner";
85
103
 
104
+ /**
105
+ * How the default Open control offers the visualizations.
106
+ *
107
+ * @remarks
108
+ * - `dialog`: a dialog with the visualization picker.
109
+ *
110
+ * - `dropdown`: a dropdown list.
111
+ *
112
+ * @alpha
113
+ */
114
+ export declare type AnalyticalDesignerInsightPickerVariant = "dialog" | "dropdown";
115
+
116
+ /**
117
+ * An item of the options menu.
118
+ *
119
+ * @alpha
120
+ */
121
+ export declare type AnalyticalDesignerOptionsItem = IAnalyticalDesignerOptionsAction | IAnalyticalDesignerOptionsSection | IAnalyticalDesignerOptionsSeparator;
122
+
86
123
  /**
87
124
  * Component a host assigns to an Analytical Designer slot. It receives the default implementation of
88
125
  * the region and the props the default would get.
@@ -135,6 +172,47 @@ export declare interface IAnalyticalDesignerCacheReset {
135
172
  resetCatalogs?: () => void;
136
173
  }
137
174
 
175
+ /**
176
+ * Props of the control that leaves the editor without saving.
177
+ *
178
+ * @alpha
179
+ */
180
+ export declare interface IAnalyticalDesignerCancelProps extends IAnalyticalDesignerHeaderContext {
181
+ /**
182
+ * Label of the control.
183
+ */
184
+ label: string;
185
+ /**
186
+ * Whether leaving is refused now, because the visualization is being saved.
187
+ */
188
+ isDisabled: boolean;
189
+ /**
190
+ * Requests leaving the editor, with the same flow as `IAnalyticalDesignerVisualizationInfoProps.onRequestBack`.
191
+ * Ignored while `isDisabled` is true.
192
+ */
193
+ onCancel: () => void;
194
+ }
195
+
196
+ /**
197
+ * Props of the control that clears the visualization.
198
+ *
199
+ * @alpha
200
+ */
201
+ export declare interface IAnalyticalDesignerClearProps extends IAnalyticalDesignerHeaderContext {
202
+ /**
203
+ * Label of the control.
204
+ */
205
+ label: string;
206
+ /**
207
+ * Whether there is nothing to clear, or the visualization is being saved.
208
+ */
209
+ isDisabled: boolean;
210
+ /**
211
+ * Clears the visualization. Ignored when the control is disabled.
212
+ */
213
+ onClear: () => void;
214
+ }
215
+
138
216
  /**
139
217
  * Configuration of Analytical Designer.
140
218
  *
@@ -248,6 +326,92 @@ export declare interface IAnalyticalDesignerConfig {
248
326
  telemetryCallbacks?: IAnalyticalDesignerTelemetryCallbacks;
249
327
  }
250
328
 
329
+ /**
330
+ * One control in the editor actions region.
331
+ *
332
+ * @alpha
333
+ */
334
+ export declare interface IAnalyticalDesignerEditorAction {
335
+ /**
336
+ * Stable identifier of the control. Built-in controls are `undoRedo`, `clear`, `open`, `cancel`,
337
+ * `saveAs`, `save`, `embed` and `options`. Prefix the identifier of a custom control with `custom:`.
338
+ */
339
+ id: string;
340
+ /**
341
+ * The rendered control.
342
+ */
343
+ content: ReactNode;
344
+ }
345
+
346
+ /**
347
+ * Props of the editor actions region.
348
+ *
349
+ * @alpha
350
+ */
351
+ export declare interface IAnalyticalDesignerEditorActionsProps extends IAnalyticalDesignerHeaderContext {
352
+ /**
353
+ * The controls in their order, already rendered with their own slots. Filter, reorder or add items
354
+ * and pass the list to the default.
355
+ */
356
+ items: readonly IAnalyticalDesignerEditorAction[];
357
+ }
358
+
359
+ /**
360
+ * Props of the editor header region.
361
+ *
362
+ * @remarks
363
+ * The children come already rendered with their own slots. Render each of them at most once; leave one
364
+ * out to hide it. The default arranges them in one row.
365
+ *
366
+ * @alpha
367
+ */
368
+ export declare interface IAnalyticalDesignerEditorHeaderProps extends IAnalyticalDesignerHeaderContext {
369
+ /**
370
+ * The visualization information region (the VisualizationInfo slot).
371
+ */
372
+ visualizationInfo: ReactNode;
373
+ /**
374
+ * The editor actions region (the EditorActions slot).
375
+ */
376
+ editorActions: ReactNode;
377
+ }
378
+
379
+ /**
380
+ * Props of the control that embeds the visualization.
381
+ *
382
+ * @alpha
383
+ */
384
+ export declare interface IAnalyticalDesignerEmbedProps extends IAnalyticalDesignerHeaderContext {
385
+ /**
386
+ * Accessible name of the control.
387
+ */
388
+ label: string;
389
+ /**
390
+ * Label of the choice that shows the code embedding the visualization.
391
+ */
392
+ embedInsightLabel: string;
393
+ /**
394
+ * Whether the visualization cannot be embedded, because it is empty.
395
+ */
396
+ isEmbedInsightDisabled: boolean;
397
+ /**
398
+ * Why the visualization cannot be embedded.
399
+ */
400
+ embedInsightDisabledReason?: string;
401
+ /**
402
+ * Label of the choice that opens the documentation about embedding Analytical Designer.
403
+ */
404
+ documentationLabel: string;
405
+ /**
406
+ * Address of the documentation about embedding Analytical Designer.
407
+ */
408
+ documentationUrl: string;
409
+ /**
410
+ * Opens the dialog with the code embedding the visualization. Ignored when it cannot be embedded.
411
+ */
412
+ onEmbedInsight: () => void;
413
+ }
414
+
251
415
  /**
252
416
  * Props of the region shown when Analytical Designer cannot start.
253
417
  *
@@ -357,6 +521,56 @@ export declare interface IAnalyticalDesignerEventDataMap {
357
521
  apiTokenIsAboutToExpire: Record<string, never>;
358
522
  }
359
523
 
524
+ /**
525
+ * Data that every editor header slot receives.
526
+ *
527
+ * @alpha
528
+ */
529
+ export declare interface IAnalyticalDesignerHeaderContext {
530
+ /**
531
+ * Layout of the header.
532
+ */
533
+ layout: IAnalyticalDesignerHeaderLayout;
534
+ /**
535
+ * Identifier of the workspace that Analytical Designer works in.
536
+ */
537
+ workspace: string;
538
+ /**
539
+ * Reference of the saved visualization. Undefined for a visualization that is not saved yet.
540
+ */
541
+ insightRef?: ObjRef;
542
+ /**
543
+ * Current title of the visualization. Empty for an untitled visualization.
544
+ */
545
+ title: string;
546
+ /**
547
+ * Whether the visualization differs from its last saved version, whether or not it can be saved now. A
548
+ * visualization that is not saved yet has changes once it is not blank. Always false in read-only mode.
549
+ */
550
+ hasUnsavedChanges: boolean;
551
+ }
552
+
553
+ /**
554
+ * Layout of the editor header.
555
+ *
556
+ * @alpha
557
+ */
558
+ export declare interface IAnalyticalDesignerHeaderLayout {
559
+ /**
560
+ * How the header is placed next to the catalog.
561
+ */
562
+ mode: AnalyticalDesignerHeaderLayoutMode;
563
+ /**
564
+ * Whether the catalog is collapsed. Analytical Designer then shows its own restore control before the
565
+ * header content.
566
+ */
567
+ isCatalogCollapsed: boolean;
568
+ /**
569
+ * Whether the catalog can be collapsed.
570
+ */
571
+ canCollapseCatalog: boolean;
572
+ }
573
+
360
574
  /**
361
575
  * Payload of the event Analytical Designer emits when it opens an insight.
362
576
  *
@@ -389,6 +603,148 @@ export declare interface IAnalyticalDesignerLoadingProps {
389
603
  className?: string;
390
604
  }
391
605
 
606
+ /**
607
+ * Props of the control that opens a saved visualization, including its picker.
608
+ *
609
+ * @alpha
610
+ */
611
+ export declare interface IAnalyticalDesignerOpenProps extends IAnalyticalDesignerHeaderContext {
612
+ /**
613
+ * Label of the control.
614
+ */
615
+ label: string;
616
+ /**
617
+ * Whether a visualization cannot be opened now, because one is being saved or opened.
618
+ */
619
+ isDisabled: boolean;
620
+ /**
621
+ * Whether a visualization is being opened.
622
+ */
623
+ isLoading: boolean;
624
+ /**
625
+ * Identifier of the visualization that is open. Undefined for a visualization that is not saved yet.
626
+ */
627
+ selectedInsightId?: string;
628
+ /**
629
+ * How the default offers the visualizations.
630
+ */
631
+ pickerVariant: AnalyticalDesignerInsightPickerVariant;
632
+ /**
633
+ * Only visualizations with one of these tags are offered. Undefined offers all.
634
+ */
635
+ includeTags?: string[];
636
+ /**
637
+ * Visualizations with one of these tags are not offered.
638
+ */
639
+ excludeTags?: string[];
640
+ /**
641
+ * Visualization class URLs Analytical Designer can edit. Other visualizations are shown as unknown.
642
+ */
643
+ enabledVisualizationUrls: string[];
644
+ /**
645
+ * Whether the picker searches semantically too.
646
+ */
647
+ isSemanticSearchEnabled: boolean;
648
+ /**
649
+ * Opens a saved visualization.
650
+ *
651
+ * @remarks
652
+ * Analytical Designer asks for confirmation when the current visualization has unsaved changes. The call
653
+ * requests the opening; the `insightOpened` event reports it. Ignored while `isDisabled` is true.
654
+ */
655
+ onOpenInsight: (ref: ObjRef) => void;
656
+ }
657
+
658
+ /**
659
+ * An action in the options menu.
660
+ *
661
+ * @alpha
662
+ */
663
+ export declare interface IAnalyticalDesignerOptionsAction {
664
+ type: "action";
665
+ /**
666
+ * Stable identifier of the item. Built-in actions are `openInAnalyticalDesigner`, `exportXlsx`,
667
+ * `exportPdf`, `exportCsv`, `exportCsvRaw` and `changeTimezone`. Prefix a custom identifier with
668
+ * `custom:`.
669
+ */
670
+ id: string;
671
+ /**
672
+ * Label of the action.
673
+ */
674
+ label: string;
675
+ /**
676
+ * Whether the action is disabled.
677
+ */
678
+ isDisabled: boolean;
679
+ /**
680
+ * Why the action is disabled.
681
+ */
682
+ disabledTooltip?: string;
683
+ /**
684
+ * Starts the action. A built-in action starts its usual flow, such as an export dialog, and ignores
685
+ * the call while it is disabled.
686
+ */
687
+ onSelect: () => void;
688
+ }
689
+
690
+ /**
691
+ * Props of the options menu, including its trigger.
692
+ *
693
+ * @remarks
694
+ * The default drops sections without actions and separators that separate nothing, so filtered items need
695
+ * no cleanup.
696
+ *
697
+ * @alpha
698
+ */
699
+ export declare interface IAnalyticalDesignerOptionsProps extends IAnalyticalDesignerHeaderContext {
700
+ /**
701
+ * Text of the trigger.
702
+ */
703
+ label: string;
704
+ /**
705
+ * Accessible name of the trigger.
706
+ */
707
+ accessibleName: string;
708
+ /**
709
+ * Whether the trigger is disabled.
710
+ */
711
+ isDisabled: boolean;
712
+ /**
713
+ * Items of the menu in their order.
714
+ */
715
+ items: readonly AnalyticalDesignerOptionsItem[];
716
+ }
717
+
718
+ /**
719
+ * A section label in the options menu. It labels the actions after it, up to the next section or separator.
720
+ *
721
+ * @alpha
722
+ */
723
+ export declare interface IAnalyticalDesignerOptionsSection {
724
+ type: "section";
725
+ /**
726
+ * Stable identifier of the item. The built-in section is `exportSection`.
727
+ */
728
+ id: string;
729
+ /**
730
+ * Label of the section.
731
+ */
732
+ label: string;
733
+ }
734
+
735
+ /**
736
+ * A separator in the options menu.
737
+ *
738
+ * @alpha
739
+ */
740
+ export declare interface IAnalyticalDesignerOptionsSeparator {
741
+ type: "separator";
742
+ /**
743
+ * Stable identifier of the item. The built-in separator is `timezoneSeparator`.
744
+ */
745
+ id: string;
746
+ }
747
+
392
748
  /**
393
749
  * Props of the Analytical Designer component.
394
750
  *
@@ -453,9 +809,74 @@ export declare interface IAnalyticalDesignerProps {
453
809
  apiRef?: Ref<IAnalyticalDesignerApi>;
454
810
  }
455
811
 
812
+ /**
813
+ * Props of the control that saves the visualization as a new one.
814
+ *
815
+ * @alpha
816
+ */
817
+ export declare interface IAnalyticalDesignerSaveAsProps extends IAnalyticalDesignerHeaderContext {
818
+ /**
819
+ * Label of the control. It changes while the visualization is being saved as a new one.
820
+ */
821
+ label: string;
822
+ /**
823
+ * Whether the visualization cannot be saved as a new one now.
824
+ */
825
+ isDisabled: boolean;
826
+ /**
827
+ * Whether the visualization is being saved as a new one.
828
+ */
829
+ isSaving: boolean;
830
+ /**
831
+ * Starts saving the visualization as a new one. Ignored when the control is disabled.
832
+ */
833
+ onSaveAs: () => void;
834
+ }
835
+
836
+ /**
837
+ * Props of the control that saves the visualization.
838
+ *
839
+ * @alpha
840
+ */
841
+ export declare interface IAnalyticalDesignerSaveProps extends IAnalyticalDesignerHeaderContext {
842
+ /**
843
+ * Label of the control. It changes while the visualization is being saved.
844
+ */
845
+ label: string;
846
+ /**
847
+ * Whether the visualization cannot be saved now.
848
+ */
849
+ isDisabled: boolean;
850
+ /**
851
+ * Whether the visualization is being saved.
852
+ */
853
+ isSaving: boolean;
854
+ /**
855
+ * Why the control is disabled, when there is a reason to tell the user.
856
+ */
857
+ disabledTooltip?: string;
858
+ /**
859
+ * Starts saving the visualization. Ignored when the control is disabled.
860
+ */
861
+ onSave: () => void;
862
+ }
863
+
456
864
  /**
457
865
  * Regions of Analytical Designer that a host can replace or wrap.
458
866
  *
867
+ * @remarks
868
+ * The editor header slots form a tree: EditorHeader holds VisualizationInfo and EditorActions,
869
+ * VisualizationInfo holds VisualizationTitle, VisualizationDescription and VisualizationAccess, and
870
+ * EditorActions holds UndoRedo, Clear, Open, Cancel, SaveAs, Save, Embed and Options. A slot can hide its
871
+ * region by returning `null`, replace it using the data and callbacks in `defaultProps`, or render
872
+ * `Default` with changed props or next to its own content. A region receives its children already
873
+ * rendered with their slots.
874
+ *
875
+ * A control that Analytical Designer does not show, for its permissions, configuration (`hiddenActions`)
876
+ * or mode, does not render its slot. Hiding or changing a control grants no permission: the callbacks in
877
+ * `defaultProps` check again when called. Define slot components outside render, so that they keep their
878
+ * state.
879
+ *
459
880
  * @alpha
460
881
  */
461
882
  export declare interface IAnalyticalDesignerSlots {
@@ -467,6 +888,65 @@ export declare interface IAnalyticalDesignerSlots {
467
888
  * Shown when Analytical Designer cannot start.
468
889
  */
469
890
  Error?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerErrorProps>;
891
+ /**
892
+ * The editor header, with the visualization information and the editor actions. Wrap the default to
893
+ * add content above or below it. Analytical Designer keeps the catalog restore control outside it.
894
+ */
895
+ EditorHeader?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerEditorHeaderProps>;
896
+ /**
897
+ * The visualization title, description, access, indicators and dashboard usages. Wrap the default to
898
+ * add a Back control before the title.
899
+ */
900
+ VisualizationInfo?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerVisualizationInfoProps>;
901
+ /**
902
+ * The controls on the right of the header.
903
+ */
904
+ EditorActions?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerEditorActionsProps>;
905
+ /**
906
+ * The visualization title.
907
+ */
908
+ VisualizationTitle?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerVisualizationTitleProps>;
909
+ /**
910
+ * The visualization description, including its bubble.
911
+ */
912
+ VisualizationDescription?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerVisualizationDescriptionProps>;
913
+ /**
914
+ * Who can open the visualization, including the sharing dialog. Rendered also where the built-in
915
+ * sharing is unavailable.
916
+ */
917
+ VisualizationAccess?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerVisualizationAccessProps>;
918
+ /**
919
+ * The undo and redo controls, as one control.
920
+ */
921
+ UndoRedo?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerUndoRedoProps>;
922
+ /**
923
+ * The control that clears the visualization.
924
+ */
925
+ Clear?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerClearProps>;
926
+ /**
927
+ * The control that opens a saved visualization, including its picker.
928
+ */
929
+ Open?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerOpenProps>;
930
+ /**
931
+ * The control that leaves the editor without saving, when Analytical Designer offers it.
932
+ */
933
+ Cancel?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerCancelProps>;
934
+ /**
935
+ * The control that saves the visualization as a new one, when Analytical Designer offers it.
936
+ */
937
+ SaveAs?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerSaveAsProps>;
938
+ /**
939
+ * The control that saves the visualization.
940
+ */
941
+ Save?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerSaveProps>;
942
+ /**
943
+ * The control that embeds the visualization, including its menu.
944
+ */
945
+ Embed?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerEmbedProps>;
946
+ /**
947
+ * The options menu with exports and the time zone, including its trigger.
948
+ */
949
+ Options?: AnalyticalDesignerSlotComponent<IAnalyticalDesignerOptionsProps>;
470
950
  }
471
951
 
472
952
  /**
@@ -491,4 +971,188 @@ export declare interface IAnalyticalDesignerTelemetryCallbacks {
491
971
  trackTiming: (variable: string, label: string, valueMs: number, data?: Record<string, unknown>) => void;
492
972
  }
493
973
 
974
+ /**
975
+ * Props of the undo and redo controls, which are one control.
976
+ *
977
+ * @remarks
978
+ * The default owns its localized tooltips and accessible names; a replacement supplies its own.
979
+ *
980
+ * @alpha
981
+ */
982
+ export declare interface IAnalyticalDesignerUndoRedoProps extends IAnalyticalDesignerHeaderContext {
983
+ /**
984
+ * Whether there is nothing to undo, or the visualization is being saved.
985
+ */
986
+ isUndoDisabled: boolean;
987
+ /**
988
+ * Whether there is nothing to redo, or the visualization is being saved.
989
+ */
990
+ isRedoDisabled: boolean;
991
+ /**
992
+ * Undoes the last change. Ignored when undo is disabled.
993
+ */
994
+ onUndo: () => void;
995
+ /**
996
+ * Redoes the last undone change. Ignored when redo is disabled.
997
+ */
998
+ onRedo: () => void;
999
+ }
1000
+
1001
+ /**
1002
+ * Props of the visualization access.
1003
+ *
1004
+ * @remarks
1005
+ * Analytical Designer resolves this slot also where its own sharing is unavailable, for example when a host
1006
+ * embeds it, so that the host can render its own access control there. The access level is read only
1007
+ * after `onRequestAccessSummary` is called.
1008
+ *
1009
+ * @alpha
1010
+ */
1011
+ export declare interface IAnalyticalDesignerVisualizationAccessProps extends IAnalyticalDesignerHeaderContext {
1012
+ /**
1013
+ * Whether the built-in sharing is available. The default renders nothing when it is not.
1014
+ */
1015
+ isDefaultAvailable: boolean;
1016
+ /**
1017
+ * Whether the user may change who can open the visualization.
1018
+ */
1019
+ canManageAccess: boolean;
1020
+ /**
1021
+ * The saved visualization whose access is managed. Undefined for a visualization that is not saved
1022
+ * yet; its access is then a draft applied on its first save.
1023
+ */
1024
+ target?: IObjectPermissionsObject;
1025
+ /**
1026
+ * Title of the visualization for the sharing UI, with the untitled placeholder for an empty title.
1027
+ */
1028
+ objectTitle: string;
1029
+ /**
1030
+ * Access level of the visualization: `private` when only its owner can open it, `shared` when some users or
1031
+ * groups can, and `public` when everyone in the workspace can. Undefined until requested, while loading, or
1032
+ * when the read failed.
1033
+ */
1034
+ accessLevel?: ShareStatus;
1035
+ /**
1036
+ * Whether the access level is being read.
1037
+ */
1038
+ isAccessLoading: boolean;
1039
+ /**
1040
+ * Whether the access level could not be read.
1041
+ */
1042
+ isAccessError: boolean;
1043
+ /**
1044
+ * Starts reading the access level, once. Ignored when the built-in sharing is unavailable.
1045
+ */
1046
+ onRequestAccessSummary: () => void;
1047
+ }
1048
+
1049
+ /**
1050
+ * Props of the visualization description.
1051
+ *
1052
+ * @alpha
1053
+ */
1054
+ export declare interface IAnalyticalDesignerVisualizationDescriptionProps extends IAnalyticalDesignerHeaderContext {
1055
+ /**
1056
+ * Current description of the visualization. Empty when it has none.
1057
+ */
1058
+ description: string;
1059
+ /**
1060
+ * Label of the action that adds a description.
1061
+ */
1062
+ addLabel: string;
1063
+ /**
1064
+ * Text shown in the empty description editor.
1065
+ */
1066
+ placeholder: string;
1067
+ /**
1068
+ * Whether the description can be changed.
1069
+ */
1070
+ isEditable: boolean;
1071
+ /**
1072
+ * Filters of the visualization, which references in the rich text description resolve against.
1073
+ */
1074
+ filters: IFilter[];
1075
+ /**
1076
+ * Number separators for the references in the description.
1077
+ */
1078
+ separators?: ISeparators;
1079
+ /**
1080
+ * Changes the description. Ignored when the description cannot be changed.
1081
+ */
1082
+ onDescriptionChange: (description: string) => void;
1083
+ }
1084
+
1085
+ /**
1086
+ * Props of the region with the visualization title, description and access.
1087
+ *
1088
+ * @remarks
1089
+ * The children come already rendered with their own slots. Render each of them at most once.
1090
+ *
1091
+ * @alpha
1092
+ */
1093
+ export declare interface IAnalyticalDesignerVisualizationInfoProps extends IAnalyticalDesignerHeaderContext {
1094
+ /**
1095
+ * The visualization title (the VisualizationTitle slot).
1096
+ */
1097
+ visualizationTitle: ReactNode;
1098
+ /**
1099
+ * The visualization description (the VisualizationDescription slot).
1100
+ */
1101
+ visualizationDescription: ReactNode;
1102
+ /**
1103
+ * The visualization access (the VisualizationAccess slot).
1104
+ */
1105
+ visualizationAccess: ReactNode;
1106
+ /**
1107
+ * The lock and unsaved changes indicators.
1108
+ */
1109
+ indicators: ReactNode;
1110
+ /**
1111
+ * The dashboards that use the visualization, when Analytical Designer shows them.
1112
+ */
1113
+ usages: ReactNode;
1114
+ /**
1115
+ * Whether a navigation request is refused now, because the visualization is being saved.
1116
+ */
1117
+ isNavigationDisabled: boolean;
1118
+ /**
1119
+ * Requests leaving the editor, for a Back control.
1120
+ *
1121
+ * @remarks
1122
+ * Starts the cancellation flow that `IAnalyticalDesignerApi.requestCancellation()` starts too: Analytical
1123
+ * Designer asks for confirmation when there are unsaved changes and then emits the `insightEditingCancelled`
1124
+ * event, on which the host navigates. Navigate only on that event. Unlike that command, the request is
1125
+ * ignored while `isNavigationDisabled` is true.
1126
+ */
1127
+ onRequestBack: () => void;
1128
+ }
1129
+
1130
+ /**
1131
+ * Props of the visualization title.
1132
+ *
1133
+ * @alpha
1134
+ */
1135
+ export declare interface IAnalyticalDesignerVisualizationTitleProps extends IAnalyticalDesignerHeaderContext {
1136
+ /**
1137
+ * Text shown when the visualization has no title.
1138
+ */
1139
+ placeholder: string;
1140
+ /**
1141
+ * Maximum length of the title.
1142
+ */
1143
+ maxLength: number;
1144
+ /**
1145
+ * Whether the title can be changed.
1146
+ */
1147
+ isEditable: boolean;
1148
+ /**
1149
+ * Whether the visualization is locked, for example because it is inherited from a parent workspace.
1150
+ */
1151
+ isLocked: boolean;
1152
+ /**
1153
+ * Changes the title. Ignored when the title cannot be changed.
1154
+ */
1155
+ onTitleChange: (title: string) => void;
1156
+ }
1157
+
494
1158
  export { }