@sisense/sdk-ui 2.30.0 → 2.31.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 (112) hide show
  1. package/dist/ai.cjs +2 -2
  2. package/dist/ai.js +6 -6
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +1841 -1321
  5. package/dist/analytics-composer.cjs +2 -2
  6. package/dist/analytics-composer.js +8 -8
  7. package/dist/apply-styled-options-to-query-BddNnNsW.js +7028 -0
  8. package/dist/apply-styled-options-to-query-BrP6xVFh.cjs +1 -0
  9. package/dist/index-BcggtLDg.js +847 -0
  10. package/dist/index-DhUTJSni.cjs +1 -0
  11. package/dist/index.cjs +443 -417
  12. package/dist/index.js +23357 -23604
  13. package/dist/index.umd.js +818 -716
  14. package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header/constants.d.ts +16 -0
  15. package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header-config.d.ts → dashboard-header/dashboard-header-config.d.ts} +17 -22
  16. package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header-targets.d.ts → dashboard-header/dashboard-header-targets.d.ts} +0 -4
  17. package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header-title.d.ts → dashboard-header/dashboard-header-title.d.ts} +1 -1
  18. package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header.d.ts → dashboard-header/dashboard-header.d.ts} +1 -4
  19. package/dist/packages/sdk-ui/src/domains/dashboarding/components/toolbar/edit-toggle.d.ts +5 -0
  20. package/dist/packages/sdk-ui/src/domains/dashboarding/components/toolbar/filter-toggle.d.ts +5 -0
  21. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-helpers.d.ts +1 -1
  22. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +10 -0
  23. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-module/types.d.ts +9 -2
  24. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard.d.ts +0 -1
  25. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-edit-mode-with-history.d.ts +0 -1
  26. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-updates-persistence.d.ts +2 -1
  27. package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/update-types.d.ts +4 -1
  28. package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +30 -13
  29. package/dist/packages/sdk-ui/src/domains/dashboarding/utils.d.ts +29 -6
  30. package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/filters-panel.d.ts +0 -1
  31. package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative.d.ts +1 -1
  32. package/dist/packages/sdk-ui/src/domains/narrative/core/get-widget-narrative-from-widget-props.d.ts +4 -4
  33. package/dist/packages/sdk-ui/src/domains/narrative/core/{widget-narrative-options.d.ts → widget-narrative-config.d.ts} +12 -12
  34. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +8 -8
  35. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +2 -2
  36. package/dist/packages/sdk-ui/src/domains/shared/header/header-item-cell.d.ts +25 -0
  37. package/dist/packages/sdk-ui/src/domains/shared/header/header-item-size.d.ts +2 -1
  38. package/dist/packages/sdk-ui/src/domains/shared/header/header-items-renderer.d.ts +6 -2
  39. package/dist/packages/sdk-ui/src/domains/shared/header/index.d.ts +1 -0
  40. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/helpers/calc-column-widths.d.ts +19 -1
  41. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/styles/style-constants.d.ts +1 -1
  42. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/types.d.ts +5 -0
  43. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +0 -1
  44. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +1 -0
  45. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +30 -0
  46. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +1 -1
  47. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-options.d.ts +2 -2
  48. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-series.d.ts +1 -1
  49. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +2 -10
  50. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +1 -2
  51. package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-excel-download.d.ts +2 -2
  52. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +2 -9
  53. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-excel-download.d.ts +1 -2
  54. package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +25 -9
  55. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +1 -0
  56. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/categorical-labels-style.d.ts +94 -0
  57. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/series-label-affix-style.d.ts +59 -0
  58. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +13 -1
  59. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/widget-narrative-style.d.ts +8 -8
  60. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +72 -1
  61. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +5 -6
  62. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +11 -0
  63. package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +1 -3
  64. package/dist/packages/sdk-ui/src/infra/app/types.d.ts +4 -5
  65. package/dist/packages/sdk-ui/src/infra/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +8 -0
  66. package/dist/packages/sdk-ui/src/infra/modules/types.d.ts +24 -5
  67. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +11 -5
  68. package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +2 -2
  69. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/custom-formula/validate-custom-formula.d.ts +11 -0
  70. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/datetime-filter-processors.d.ts +6 -0
  71. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/measure-processors.d.ts +16 -0
  72. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +4 -0
  73. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-member-validation.d.ts +2 -0
  74. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-range-validation.d.ts +2 -0
  75. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-relative-validation.d.ts +1 -0
  76. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-validation-utils.d.ts +40 -0
  77. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/flatten-filters.d.ts +5 -0
  78. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/normalize-member-for-granularity.d.ts +5 -0
  79. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/query-datetime-validation.d.ts +7 -0
  80. package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +16 -1
  81. package/dist/packages/sdk-ui/src/modules/analytics-composer/widget/to-widget-code.d.ts +1 -1
  82. package/dist/packages/sdk-ui/src/props.d.ts +1 -2
  83. package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +1 -5
  84. package/dist/packages/sdk-ui/src/public-api/beta.d.ts +3 -1
  85. package/dist/packages/sdk-ui/src/public-api/public.d.ts +4 -1
  86. package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +0 -1
  87. package/dist/packages/sdk-ui/src/shared/components/alert/alert.d.ts +1 -50
  88. package/dist/packages/sdk-ui/src/shared/components/alert/index.d.ts +2 -2
  89. package/dist/packages/sdk-ui/src/shared/components/no-results-overlay/images/index.d.ts +1 -1
  90. package/dist/packages/sdk-ui/src/shared/components/quota-notification/quota-notification.d.ts +3 -10
  91. package/dist/packages/sdk-ui/src/shared/components/radio.d.ts +1 -0
  92. package/dist/packages/sdk-ui/src/shared/hooks/use-synced-state.d.ts +6 -7
  93. package/dist/packages/sdk-ui/src/shared/icons/warning-icon.d.ts +2 -3
  94. package/dist/packages/sdk-ui/src/shared/icons/x-circle-icon.d.ts +2 -3
  95. package/dist/packages/sdk-ui/src/shared/utils/color/color-interpolation.d.ts +1 -1
  96. package/dist/packages/sdk-ui/src/shared/utils/color/colorjs.d.ts +36 -0
  97. package/dist/packages/sdk-ui/src/shared/utils/gradient.d.ts +3 -2
  98. package/dist/packages/sdk-ui/src/types.d.ts +30 -19
  99. package/dist/{quota-notification-DqabeDbO.js → quota-notification-BMxiL8zu.js} +12530 -12922
  100. package/dist/quota-notification-CsGmQ05h.cjs +750 -0
  101. package/dist/{types-DecTaxy7.js → types-BB6n10Af.js} +1 -1
  102. package/dist/{types-DSNnndG6.cjs → types-CMUXHDie.cjs} +1 -1
  103. package/dist/{utils-L-HO2pCd.js → utils-C39pRlFD.js} +14643 -14371
  104. package/dist/utils-CL2eytnK.cjs +180 -0
  105. package/dist/{widget-composer-CyWQaInf.cjs → widget-composer-DDulWu8l.cjs} +85 -10
  106. package/dist/{widget-composer-u6NMLm1C.js → widget-composer-DrfnZQa0.js} +350 -259
  107. package/package.json +13 -16
  108. package/dist/apply-styled-options-to-query-BK1NnV4P.js +0 -6453
  109. package/dist/apply-styled-options-to-query-Dl8vVNxo.cjs +0 -1
  110. package/dist/packages/sdk-ui/src/shared/hooks/use-quota-warning-dismissed.d.ts +0 -8
  111. package/dist/quota-notification-gYE6PTWA.cjs +0 -750
  112. package/dist/utils-Cpeyj9TN.cjs +0 -179
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Layout constants for the dashboard header.
3
+ */
4
+ /**
5
+ * Default (and minimum) dashboard header height (px): the default 28px item plus the 10px top/bottom
6
+ * padding. The header grows beyond this when an item is taller than the default.
7
+ */
8
+ export declare const DASHBOARD_HEADER_HEIGHT = 48;
9
+ /**
10
+ * Default size (px) for dashboard header items that don't specify their own size.
11
+ */
12
+ export declare const DASHBOARD_HEADER_ITEM_SIZE = 28;
13
+ /**
14
+ * Gap (px) between adjacent dashboard header items (matches Fusion's 10px spacing).
15
+ */
16
+ export declare const DASHBOARD_HEADER_ITEMS_GAP = 10;
@@ -1,27 +1,28 @@
1
1
  import { ReactNode } from 'react';
2
+ import { DashboardHeaderTarget } from './dashboard-header-targets';
2
3
  /**
3
4
  * Size of a custom dashboard header item, in pixels.
4
- *
5
- * @alpha
6
5
  */
7
6
  export interface DashboardHeaderItemSize {
8
7
  /**
9
8
  * Fixed width of the item, in pixels.
10
9
  *
11
10
  * If omitted, it falls back to the default dashboard header item size of `28px`.
11
+ *
12
+ * @default 28
12
13
  */
13
14
  width?: number;
14
15
  /**
15
16
  * Fixed height of the item, in pixels.
16
17
  *
17
- * If omitted, falls back to the default dashboard header item size of `28px`.
18
+ * If omitted, it falls back to the default dashboard header item size of `28px`.
19
+ *
20
+ * @default 28
18
21
  */
19
22
  height?: number;
20
23
  }
21
24
  /**
22
25
  * Props passed to a {@link DashboardHeaderItemComponent} when it is rendered.
23
- *
24
- * @alpha
25
26
  */
26
27
  export interface DashboardHeaderItemComponentProps {
27
28
  /** The size resolved for the item by the header layout, with defaults applied. */
@@ -38,29 +39,25 @@ export interface DashboardHeaderItemComponentProps {
38
39
  }
39
40
  /**
40
41
  * A React component that renders the content of a custom dashboard header item.
41
- *
42
- * @alpha
43
42
  */
44
43
  export type DashboardHeaderItemComponent = (props: DashboardHeaderItemComponentProps) => ReactNode;
45
44
  /**
46
45
  * Position of a custom dashboard header item relative to the other items.
47
46
  *
48
- * - `auto` (default) — placed in the trailing group, after the center spacer.
47
+ * - `auto` (default) — automatic placement.
49
48
  * - `before` / `after` — placed immediately before/after the item with the given `target` id.
50
49
  * Pass a {@link DashboardHeaderTargets} constant to anchor to a built-in item (works even when
51
50
  * that built-in is currently hidden), or any custom item id to anchor to another injected item.
52
51
  * - `first` / `last` — placed at the very start/end of the header.
53
- *
54
- * @alpha
55
52
  */
56
53
  export type DashboardHeaderItemPosition = {
57
54
  type: 'auto';
58
55
  } | {
59
56
  type: 'before';
60
- target: string;
57
+ target: DashboardHeaderTarget | string;
61
58
  } | {
62
59
  type: 'after';
63
- target: string;
60
+ target: DashboardHeaderTarget | string;
64
61
  } | {
65
62
  type: 'first';
66
63
  } | {
@@ -68,8 +65,6 @@ export type DashboardHeaderItemPosition = {
68
65
  };
69
66
  /**
70
67
  * A custom item to inject into the dashboard header.
71
- *
72
- * @alpha
73
68
  */
74
69
  export interface DashboardHeaderItem {
75
70
  /**
@@ -97,22 +92,22 @@ export interface DashboardHeaderItem {
97
92
  * A dashboard header item after the built-in and custom items have been ordered (position applied).
98
93
  *
99
94
  * This is the shape passed to {@link DashboardHeaderConfig.onBeforeRender}.
100
- *
101
- * @alpha
102
95
  */
103
96
  export type DashboardResolvedHeaderItem = Omit<DashboardHeaderItem, 'position'>;
104
97
  /**
105
98
  * Transforms the fully ordered list of dashboard header items right before rendering.
106
- *
107
- * @alpha
108
99
  */
109
100
  export type DashboardHeaderItemsTransform = (items: ReadonlyArray<DashboardResolvedHeaderItem>) => DashboardResolvedHeaderItem[];
110
101
  /**
111
102
  * Configuration for the dashboard header items.
112
- *
113
- * @alpha
114
103
  */
115
104
  export interface DashboardHeaderConfig {
105
+ /**
106
+ * Boolean flag that determines whether the dashboard header is visible.
107
+ *
108
+ * If not specified, the default value is `true`.
109
+ */
110
+ visible?: boolean;
116
111
  /**
117
112
  * Custom items to inject into the header.
118
113
  *
@@ -120,8 +115,8 @@ export interface DashboardHeaderConfig {
120
115
  */
121
116
  items?: DashboardHeaderItem[];
122
117
  /**
123
- * Advanced hook to inspect and rewrite the full, ordered list of header items (built-in +
124
- * custom) right before rendering.
118
+ * Advanced callback to inspect and rewrite the full, ordered list of header items (built-in +
119
+ * custom) right before rendering. The only way to modify or remove built-in items.
125
120
  */
126
121
  onBeforeRender?: DashboardHeaderItemsTransform;
127
122
  }
@@ -5,8 +5,6 @@
5
5
  * A target stays valid even when it is not currently shown (e.g. the filter toggle when
6
6
  * its icon is disabled): the position resolves as if the built-in were there, so the custom item lands
7
7
  * in a stable spot regardless of which built-ins happen to be visible.
8
- *
9
- * @alpha
10
8
  */
11
9
  export declare const DashboardHeaderTargets: {
12
10
  /** The dashboard title. */
@@ -24,7 +22,5 @@ export declare const DashboardHeaderTargets: {
24
22
  };
25
23
  /**
26
24
  * Union of the built-in dashboard header item ids, usable as `target` for `before`/`after` positions.
27
- *
28
- * @alpha
29
25
  */
30
26
  export type DashboardHeaderTarget = (typeof DashboardHeaderTargets)[keyof typeof DashboardHeaderTargets];
@@ -1,4 +1,4 @@
1
- import { HeaderItem } from '../../../domains/shared/header';
1
+ import { HeaderItem } from '../../../../domains/shared/header';
2
2
  /**
3
3
  * Props for {@link DashboardHeaderTitle}.
4
4
  */
@@ -1,7 +1,4 @@
1
- import { DashboardHeaderProps } from '../../../domains/dashboarding/types';
2
- export declare const DASHBOARD_HEADER_HEIGHT = 48;
3
- /** Default size (px) for dashboard header items that don't specify their own size. */
4
- export declare const DASHBOARD_HEADER_ITEM_SIZE = 28;
1
+ import { DashboardHeaderProps } from '../../../../domains/dashboarding/types';
5
2
  /**
6
3
  * Dashboard header.
7
4
  *
@@ -17,6 +17,11 @@ export interface EditToggleProps {
17
17
  * Color of the edit toggle button
18
18
  */
19
19
  color?: string;
20
+ /**
21
+ * Size (px) of the square button box, provided by the header layout. Defaults to the dashboard
22
+ * header item size.
23
+ */
24
+ size?: number;
20
25
  /**
21
26
  * Callback function called when the edit toggle button is clicked
22
27
  */
@@ -8,6 +8,11 @@ export interface FilterToggleProps {
8
8
  * Color of the filter toggle button
9
9
  */
10
10
  color?: string;
11
+ /**
12
+ * Size (px) of the square button box, provided by the header layout. Defaults to the dashboard
13
+ * header item size.
14
+ */
15
+ size?: number;
11
16
  /**
12
17
  * Callback function called when the filter toggle button is clicked
13
18
  */
@@ -1,5 +1,5 @@
1
1
  import { Filter, FilterRelations } from '@sisense/sdk-data';
2
- import { DashboardHeaderItem } from './components/dashboard-header-config.js';
2
+ import { DashboardHeaderItem } from './components/dashboard-header/dashboard-header-config.js';
3
3
  import type { JumpToDashboardConfig } from './hooks/jtd/jtd-types.js';
4
4
  import { DashboardProps } from './types.js';
5
5
  /**
@@ -4,6 +4,16 @@ import { RestApi } from '../../../../../infra/api/rest-api';
4
4
  import { AppSettings } from '../../../../../infra/app/settings/settings';
5
5
  import { CompleteThemeSettingsInternal } from '../../../../../types';
6
6
  import { UseDashboardModelInternalAction } from './types.js';
7
+ /**
8
+ * Returns the Fusion `tableState.colResize.tableSize` for persisted column widths.
9
+ * Fusion renders each column as `(columnPx / sum(columns)) × tableSize`, so
10
+ * `tableSize` must equal the sum of column pixel widths for absolute px rendering.
11
+ *
12
+ * @param columnWidths - Column pixel widths in display order
13
+ * @returns Total table width in pixels
14
+ * @internal
15
+ */
16
+ export declare function toColResizeTableSize(columnWidths: readonly number[]): number;
7
17
  export type PersistDashboardModelMiddlewareParams = {
8
18
  /** Dashboard OID, or undefined if not initialized */
9
19
  dashboardOid: string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { Filter, FilterRelations } from '@sisense/sdk-data';
2
- import { WidgetsPanelLayout } from '../../../domains/dashboarding/dashboard-model';
2
+ import { SpecificWidgetOptions, WidgetsPanelLayout } from '../../../domains/dashboarding/dashboard-model';
3
3
  import { DashboardProps } from '../../../domains/dashboarding/types';
4
4
  import { WidgetProps } from '../../../domains/widgets/components/widget/types';
5
5
  /**
@@ -17,9 +17,16 @@ export interface DashboardStateApi {
17
17
  * persistence enabled; otherwise updates local state only.
18
18
  *
19
19
  * @param widget - The widget to add.
20
+ * @param options - Optional dashboard-level configuration for the new widget:
21
+ * - `widgetOptions`: dashboard-level options for the widget (e.g. filtersOptions, jtdConfig).
22
+ * - `widgetsPanelLayout`: explicit widgets-panel layout describing where the widget is placed;
23
+ * When omitted, the widget is appended in a new full-width row at the end of the first column.
20
24
  * @returns void
21
25
  */
22
- addWidget: (widget: WidgetProps) => void;
26
+ addWidget: (widget: WidgetProps, options?: {
27
+ widgetOptions?: SpecificWidgetOptions;
28
+ widgetsPanelLayout?: WidgetsPanelLayout;
29
+ }) => void;
23
30
  /**
24
31
  * Replaces the dashboard filters.
25
32
  *
@@ -4,7 +4,6 @@ import { DashboardProps } from '../../domains/dashboarding/types';
4
4
  * React component that renders a dashboard whose elements are customizable. It includes internal logic of applying common filters to widgets.
5
5
  *
6
6
  * **Note:** Dashboard and Widget extensions based on JS scripts and add-ons in Fusion – for example, Blox and Jump To Dashboard – are not supported.
7
- *
8
7
  * @example
9
8
  *
10
9
  * Example of rendering a Fusion dashboard using the `useGetDashboardModel hook and the `Dashboard` component.
@@ -46,7 +46,6 @@ export interface UseEditModeToolbarResult {
46
46
  }
47
47
  /**
48
48
  * Hook that provides layout state management with history tracking and a toolbar with undo/redo/cancel/apply buttons
49
- *
50
49
  * @param props Configuration options for the toolbar
51
50
  * @returns Layout state and toolbar component
52
51
  * @internal
@@ -5,7 +5,8 @@ type Persistence = Pick<DashboardPersistenceManager, 'updateWidget'> | undefined
5
5
  * Composition middleware that adds persistable widget-update plumbing to a
6
6
  * widget list. For each widget that exposes a known runtime-state callback
7
7
  * (currently only `styleOptions.navigator.onScrollerChange` for charts with
8
- * a navigator), the hook injects a handler that:
8
+ * a navigator, and `styleOptions.columns.onColumnsResize` for table charts with
9
+ * resizable columns), the hook injects a handler that:
9
10
  *
10
11
  * 1. Applies the update optimistically to local widget state (the parent
11
12
  * `useComposedDashboardInternal` re-renders with the new value).
@@ -20,6 +20,9 @@ export type WidgetPropsUpdate = {
20
20
  readonly max: number;
21
21
  };
22
22
  };
23
+ readonly columns?: {
24
+ readonly widths?: ReadonlyArray<number>;
25
+ };
23
26
  /**
24
27
  * For custom (plugin) widgets, `styleOptions` is an opaque deeply-partial
25
28
  * bag — arbitrary keys are deep-merged into the widget's opaque DTO
@@ -44,7 +47,7 @@ export type WidgetPropsUpdate = {
44
47
  * a persistable update for a specific widget. Not part of the public
45
48
  * `WidgetProps` surface — composition layer injects handlers into the
46
49
  * visualization's existing callback APIs (e.g.
47
- * `styleOptions.navigator.onScrollerChange`).
50
+ * `styleOptions.navigator.onScrollerChange`, `styleOptions.columns.onColumnsResize`).
48
51
  *
49
52
  * @internal
50
53
  */
@@ -1,5 +1,5 @@
1
1
  import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
2
- import { DashboardHeaderConfig } from '../../domains/dashboarding/components/dashboard-header-config';
2
+ import { DashboardHeaderConfig } from '../../domains/dashboarding/components/dashboard-header/dashboard-header-config';
3
3
  import { DashboardStyleOptions, WidgetsOptions, WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
4
4
  import { TabbersConfig } from '../../domains/dashboarding/hooks/use-tabber';
5
5
  import { FiltersPanelConfig } from '../../domains/filters/components/filters-panel/types';
@@ -166,21 +166,34 @@ export interface WidgetsPanelConfig {
166
166
  */
167
167
  editMode?: EditModeConfig;
168
168
  /**
169
- * Actions available for all widgets in the panel.
170
- *
171
- * @sisenseInternal
169
+ * Configuration for actions available on all widgets in the panel, such as
170
+ * downloading each widget's data.
172
171
  */
173
172
  actions?: {
174
173
  /**
175
- * Configuration for downloading a widget CSV.
174
+ * Configuration for the "Download as CSV" action on all widgets in the panel,
175
+ * which adds an item to each widget's header menu that exports the widget's
176
+ * underlying data as a CSV file.
176
177
  *
177
- * @sisenseInternal
178
+ * @example
179
+ * Enable CSV download for every widget in a dashboard:
180
+ * ```ts
181
+ * const dashboardConfig: DashboardConfig = {
182
+ * widgetsPanel: {
183
+ * actions: {
184
+ * downloadCsv: {
185
+ * enabled: true,
186
+ * },
187
+ * },
188
+ * },
189
+ * };
190
+ * ```
178
191
  */
179
192
  downloadCsv?: {
180
193
  /**
181
- * Determines whether the widgets possibility to download a CSV is enabled.
194
+ * Whether the "Download as CSV" action is enabled for all widgets in the panel.
182
195
  *
183
- * If not specified, the default value is `false`.
196
+ * @default false
184
197
  */
185
198
  enabled?: boolean;
186
199
  };
@@ -297,19 +310,21 @@ export interface DashboardConfig {
297
310
  */
298
311
  filtersPanel?: DashboardFiltersPanelConfig;
299
312
  /**
300
- * Configuration for the dashboard header
301
- *
302
- * @alpha
313
+ * Configuration for the dashboard header.
303
314
  */
304
315
  header?: DashboardHeaderConfig;
305
316
  /**
306
- * Configuration for the toolbar
317
+ * Configuration for the toolbar.
318
+ *
319
+ * @deprecated Use the `header` configuration section instead (`header.visible`).
307
320
  */
308
321
  toolbar?: {
309
322
  /**
310
323
  * Determines whether the toolbar is visible.
311
324
  *
312
325
  * If not specified, the default value is `true`.
326
+ *
327
+ * @deprecated Use `header.visible` instead.
313
328
  */
314
329
  visible: boolean;
315
330
  };
@@ -360,7 +375,9 @@ export type { DashboardPersistenceManager };
360
375
  */
361
376
  export interface DashboardProps {
362
377
  /**
363
- * Optional identifer of the dashboard
378
+ * Optional unique identifier of the dashboard.
379
+ *
380
+ * For dashboards loaded from Fusion (for example, via `DashboardById`), this is populated with the dashboard OID
364
381
  *
365
382
  * @internal
366
383
  */
@@ -1,6 +1,19 @@
1
+ import { DataSource } from '@sisense/sdk-data';
1
2
  import { WidgetProps } from '../../domains/widgets/components/widget/types';
2
- import { WidgetsPanelColumnLayout } from './types.js';
3
+ import { ContextfulTransformer } from '../../shared/utils/utility-types/transformer';
4
+ import { DashboardConfig, WidgetsPanelColumnLayout } from './types.js';
3
5
  export declare const getDividerStyle: (color: string, width: number) => string;
6
+ /**
7
+ * Resolves whether the dashboard header is visible from a dashboard config.
8
+ *
9
+ * The header is visible unless explicitly disabled. `header.visible` takes precedence; the
10
+ * deprecated `toolbar.visible` is honored as a fallback for backward compatibility (and emits a
11
+ * one-time deprecation warning when it is the value in effect).
12
+ *
13
+ * @param config - The dashboard config to resolve header visibility from.
14
+ * @returns Whether the dashboard header should be rendered.
15
+ */
16
+ export declare const isDashboardHeaderVisible: (config?: DashboardConfig) => boolean;
4
17
  /**
5
18
  * Gets the default layout for a set of widgets.
6
19
  *
@@ -11,14 +24,24 @@ export declare const getDividerStyle: (color: string, width: number) => string;
11
24
  */
12
25
  export declare const getDefaultWidgetsPanelLayout: (widgets: WidgetProps[]) => WidgetsPanelColumnLayout;
13
26
  /**
14
- * Returns a copy of the layout with a new full-width row holding `widgetId` appended to the first
15
- * column (a column is created if the layout has none). Pure; does not mutate the input.
27
+ * Contextful transformer that returns a copy of the layout with a new full-width row holding
28
+ * `widgetId` appended to the end of the first column (a column is created if the layout has none).
16
29
  *
17
- * @param layout - The current widgets-panel layout.
18
30
  * @param widgetId - The id of the widget to append.
19
- * @returns The layout with the widget appended.
31
+ * @returns A transformer over a widgets-panel layout.
32
+ */
33
+ export declare const withWidgetAppendedToPanelLayout: ContextfulTransformer<WidgetsPanelColumnLayout, string>;
34
+ /**
35
+ * Contextful transformer that resolves the data source for a widget being added to a dashboard.
36
+ *
37
+ * Keeps the widget's own `dataSource` when present; otherwise fills it from the first defined
38
+ * fallback (e.g. the dashboard default, then the app default). Text widgets, which have no data
39
+ * source, are returned unchanged.
40
+ *
41
+ * @param fallbackDataSources - Ordered fallback data sources; the first defined one is used.
42
+ * @returns A transformer over a widget that resolves its `dataSource`.
20
43
  */
21
- export declare const withWidgetAppendedToPanelLayout: (layout: WidgetsPanelColumnLayout, widgetId: string) => WidgetsPanelColumnLayout;
44
+ export declare const withResolvedWidgetDataSource: ContextfulTransformer<WidgetProps, Array<DataSource | undefined>>;
22
45
  /**
23
46
  * With optionally disabled auto height.
24
47
  *
@@ -51,7 +51,6 @@ export interface FiltersPanelProps {
51
51
  * );
52
52
  * }
53
53
  * ```
54
- *
55
54
  * @group Filter Tiles
56
55
  */
57
56
  export declare const FiltersPanel: import("react").FunctionComponent<FiltersPanelProps>;
@@ -5,7 +5,7 @@ import type { HookEnableParam } from '../../../shared/hooks/types';
5
5
  * Props for {@link WidgetNarrative}.
6
6
  *
7
7
  * @remarks
8
- * Narrative options are read from `widgetProps.aiOptions.narrative` for chart and pivot widgets.
8
+ * Narrative options are read from `widgetProps.config.narrative` for chart and pivot widgets.
9
9
  * Accepts {@link HookEnableParam}; `enabled` is forwarded to {@link useWidgetNarrativeState}.
10
10
  * @sisenseInternal
11
11
  */
@@ -1,18 +1,18 @@
1
+ import type { WidgetNarrativeConfig } from '../../../domains/narrative/core/widget-narrative-config';
1
2
  import type { ChartWidgetProps } from '../../../domains/widgets/components/chart-widget/types.js';
2
3
  import type { PivotTableWidgetProps } from '../../../domains/widgets/components/pivot-table-widget/types.js';
3
4
  import type { WidgetProps } from '../../../domains/widgets/components/widget/types.js';
4
- import type { WidgetNarrativeOptions } from '../../../types.js';
5
5
  type WidgetPropsWithNarrativeSupport = ChartWidgetProps | PivotTableWidgetProps | Extract<WidgetProps, {
6
6
  widgetType: 'chart';
7
7
  } | {
8
8
  widgetType: 'pivot';
9
9
  }>;
10
10
  /**
11
- * Returns narrative options from chart or pivot widget props (`aiOptions.narrative`).
11
+ * Returns narrative config from chart or pivot widget props (`config.narrative`).
12
12
  *
13
13
  * @param props - Chart or pivot widget props (standalone or {@link WidgetProps} chart/pivot branches)
14
- * @returns `WidgetNarrativeOptions` when present
14
+ * @returns `WidgetNarrativeConfig` when present
15
15
  * @internal
16
16
  */
17
- export declare function getWidgetNarrativeOptionsFromWidgetProps(props: WidgetPropsWithNarrativeSupport): WidgetNarrativeOptions | undefined;
17
+ export declare function getWidgetNarrativeConfigFromWidgetProps(props: WidgetPropsWithNarrativeSupport): WidgetNarrativeConfig | undefined;
18
18
  export {};
@@ -6,15 +6,14 @@
6
6
  * - `alone`: displayed alone, without any other widget content
7
7
  *
8
8
  * @default 'above'
9
- * @alpha
10
9
  */
11
10
  export type WidgetNarrativeDisplayLocation = 'above' | 'below' | 'alone';
12
11
  /**
13
12
  * Narrative configuration options for widgets.
14
13
  *
15
- * @alpha
14
+ * Set on a chart or pivot widget via {@link WidgetConfig}.
16
15
  */
17
- export type WidgetNarrativeOptions = {
16
+ export type WidgetNarrativeConfig = {
18
17
  /**
19
18
  * Verbosity for narrative generation.
20
19
  *
@@ -22,6 +21,8 @@ export type WidgetNarrativeOptions = {
22
21
  */
23
22
  verbosity?: 'low' | 'high';
24
23
  /**
24
+ * Whether to include trend and forecast in the narrative.
25
+ *
25
26
  * When `true`, any trend and forecast companion measures present on the widget are included in the narrative request.
26
27
  *
27
28
  * When `false`, they are not included in the narrative request.
@@ -30,6 +31,8 @@ export type WidgetNarrativeOptions = {
30
31
  */
31
32
  includeTrendAndForecast?: boolean;
32
33
  /**
34
+ * Whether the narrative is enabled for the widget.
35
+ *
33
36
  * When `true`, narrative is enabled for the widget.
34
37
  *
35
38
  * When `false`, narrative is disabled for the widget and will not be generated.
@@ -82,17 +85,15 @@ export type WidgetNarrativeOptions = {
82
85
  * Practical guidelines:
83
86
  * - Values above `~0.8` leave very little room for the chart.
84
87
  * - Values below `~0.1` may clip the collapsed narrative text (~46 px).
85
- * - Has no effect when {@link WidgetNarrativeOptions.displayLocation | displayLocation} is `'alone'`
88
+ * - Has no effect when {@link WidgetNarrativeConfig.displayLocation | displayLocation} is `'alone'`
86
89
  * (the chart is already hidden in that mode).
87
90
  */
88
91
  heightFraction?: number;
89
92
  };
90
93
  /**
91
- * {@link WidgetNarrativeOptions} with all optional fields filled using {@link getCompleteWidgetNarrativeOptions}.
92
- *
93
- * @alpha
94
+ * {@link WidgetNarrativeConfig} with all optional fields filled using {@link getCompleteWidgetNarrativeConfig}.
94
95
  */
95
- export type CompleteWidgetNarrativeOptions = {
96
+ export type CompleteWidgetNarrativeConfig = {
96
97
  enabled: boolean;
97
98
  verbosity: 'low' | 'high';
98
99
  displayLocation: WidgetNarrativeDisplayLocation;
@@ -101,14 +102,13 @@ export type CompleteWidgetNarrativeOptions = {
101
102
  feedback: {
102
103
  enabled: boolean;
103
104
  };
104
- /** Resolved from {@link WidgetNarrativeOptions.heightFraction}. `undefined` means no constraint. */
105
+ /** Resolved from {@link WidgetNarrativeConfig.heightFraction}. `undefined` means no constraint. */
105
106
  heightFraction: number | undefined;
106
107
  };
107
108
  /**
108
- * Returns {@link WidgetNarrativeOptions} with defaults applied for runtime.
109
+ * Returns {@link WidgetNarrativeConfig} with defaults applied for runtime.
109
110
  *
110
111
  * @param narrative - Optional narrative configuration to apply defaults to
111
112
  * @returns Complete narrative configuration with defaults applied
112
- * @alpha
113
113
  */
114
- export declare function getCompleteWidgetNarrativeOptions(narrative?: WidgetNarrativeOptions): CompleteWidgetNarrativeOptions;
114
+ export declare function getCompleteWidgetNarrativeConfig(narrative?: WidgetNarrativeConfig): CompleteWidgetNarrativeConfig;
@@ -4,12 +4,12 @@ import type { PivotTableWidgetProps } from '../../../domains/widgets/components/
4
4
  import type { WidgetProps, WithCommonWidgetProps } from '../../../domains/widgets/components/widget/types';
5
5
  import type { NarrativeRequest } from '../../../infra/api/narrative/narrative-api-types.js';
6
6
  import type { NarrativeQueryParams } from './build-narrative-request.js';
7
- import { type CompleteWidgetNarrativeOptions } from './widget-narrative-options.js';
7
+ import { type CompleteWidgetNarrativeConfig } from './widget-narrative-config.js';
8
8
  /**
9
9
  * Converts ChartWidgetProps to {@link NarrativeQueryParams} by extracting dimensions and measures
10
10
  * from the chart data options.
11
11
  *
12
- * @param props - ChartWidgetProps to convert. `aiOptions.narrative` supplies {@link WidgetNarrativeOptions}. Defaults are calculated via {@link getCompleteWidgetNarrativeOptions})
12
+ * @param props - ChartWidgetProps to convert. `config.narrative` supplies {@link WidgetNarrativeConfig}. Defaults are calculated via {@link getCompleteWidgetNarrativeConfig}
13
13
  * @param defaultDataSource - Optional default data source to use if props.dataSource is undefined
14
14
  * @returns Params ready for {@link prepareNarrativeRequest}
15
15
  * @throws If neither `props.dataSource` nor `defaultDataSource` is set
@@ -20,8 +20,8 @@ export declare function convertChartWidgetPropsToNarrativeParams(props: ChartWid
20
20
  * Builds a narrative API request from pivot widget props using the same JAQL as pivot query
21
21
  * execution ({@link getPivotJaqlQueryPayload}).
22
22
  *
23
- * @param props - Pivot widget props (`widgetType: 'pivot'`); `aiOptions.narrative` supplies
24
- * {@link WidgetNarrativeOptions} via {@link getWidgetNarrativeOptionsFromWidgetProps}
23
+ * @param props - Pivot widget props (`widgetType: 'pivot'`); `config.narrative` supplies
24
+ * {@link WidgetNarrativeConfig} via {@link getWidgetNarrativeConfigFromWidgetProps}
25
25
  * @param defaultDataSource - Used when `props.dataSource` is undefined
26
26
  * @returns Request ready for `getNarrative`
27
27
  * @throws If data source cannot be resolved, or pivot query description is invalid
@@ -44,13 +44,13 @@ export declare const convertChartWidgetPropsToUseGetNlgInsightsParams: typeof co
44
44
  */
45
45
  export declare function convertWidgetPropsToNarrativeParams(props: WithCommonWidgetProps<ChartWidgetProps, 'chart'> | WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'>, defaultDataSource?: DataSource): NarrativeRequest;
46
46
  /**
47
- * Completes widget narrative options from chart/pivot `WidgetProps` for NLG (`aiOptions.narrative`).
47
+ * Completes widget narrative options from chart/pivot `WidgetProps` for NLG (`config.narrative`).
48
48
  *
49
49
  * @param props - Widget props (chart, pivot, or other)
50
50
  * @returns Complete narrative defaults for non-chart/pivot types
51
51
  * @internal
52
52
  */
53
- export declare function getCompleteWidgetNarrativeOptionsFromWidgetProps(props: WidgetProps): CompleteWidgetNarrativeOptions;
53
+ export declare function getCompleteWidgetNarrativeConfigFromWidgetProps(props: WidgetProps): CompleteWidgetNarrativeConfig;
54
54
  /**
55
55
  * Error message for imperative callers (e.g. {@link getNlgInsightsFromWidget}) when chart or pivot widget
56
56
  * props omit `dataSource`, no defaultDataSource can be resolved from app context, and no defaultDataSource is provided.
@@ -82,8 +82,8 @@ export type WidgetNarrativeRequestPair = {
82
82
  * @returns `{ supported, narrativeRequest, narrativeFallbackRequest }`. `supported` is `false`
83
83
  * when the widget type is unsupported, when no data source can be resolved for chart/pivot, or
84
84
  * when the primary conversion fails.
85
- * @remarks {@link WidgetNarrativeOptions} are derived from `props.aiOptions?.narrative`
86
- * via {@link getWidgetNarrativeOptionsFromWidgetProps} and {@link getCompleteWidgetNarrativeOptions}.
85
+ * @remarks {@link WidgetNarrativeConfig} are derived from `props.config?.narrative`
86
+ * via {@link getWidgetNarrativeConfigFromWidgetProps} and {@link getCompleteWidgetNarrativeConfig}.
87
87
  * @internal
88
88
  */
89
89
  export declare function buildWidgetNarrativeRequests(props: WidgetProps, defaultDataSource?: DataSource): WidgetNarrativeRequestPair;
@@ -6,8 +6,8 @@ import { type WidgetNarrativeQueryState } from './use-widget-narrative-state.js'
6
6
  *
7
7
  * @remarks
8
8
  * Narrative endpoint selection uses `app.settings.narrative.canGenerateNarrativeViaAI` from
9
- * {@link useSisenseContext}. {@link WidgetNarrativeOptions} come from
10
- * `widgetProps.aiOptions.narrative` (see {@link getCompleteWidgetNarrativeOptions}).
9
+ * {@link useSisenseContext}. {@link WidgetNarrativeConfig} come from
10
+ * `widgetProps.config.narrative` (see {@link getCompleteWidgetNarrativeConfig}).
11
11
  *
12
12
  * The `enabled` flag follows {@link HookEnableParam} (defaults to `true` when omitted).
13
13
  * @sisenseInternal
@@ -0,0 +1,25 @@
1
+ import { ResolvedHeaderItem } from './types.js';
2
+ /**
3
+ * Props for {@link HeaderItemCell}.
4
+ */
5
+ export interface HeaderItemCellProps {
6
+ /** The resolved header item to render. */
7
+ item: ResolvedHeaderItem;
8
+ /**
9
+ * Default size (px) applied when the item doesn't specify one, letting each host pick its own
10
+ * default (the dashboard uses 28). Defaults to {@link DEFAULT_HEADER_ITEM_SIZE}.
11
+ */
12
+ defaultSize?: number;
13
+ }
14
+ /**
15
+ * Renders a single header item.
16
+ *
17
+ * This is the **header item component** every item flows through: it owns the item's layout box —
18
+ * the width behavior (from the internal `fill`), the orchestrator-provided height, and centering the
19
+ * content on both axes — so individual items only render their content and never manage header
20
+ * alignment themselves.
21
+ *
22
+ * An item shorter than the cell height is centered vertically; an item taller than the default grows
23
+ * its cell (and, via the row's `align-items: center`, the whole header) while staying centered.
24
+ */
25
+ export declare const HeaderItemCell: ({ item, defaultSize }: HeaderItemCellProps) => import("react/jsx-runtime").JSX.Element;