@sisense/sdk-ui 2.25.0 → 2.26.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 (92) hide show
  1. package/dist/ai.cjs +33 -33
  2. package/dist/ai.js +626 -639
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +1010 -865
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{apply-styled-options-to-query-BsBTwL6W.js → apply-styled-options-to-query-Bzt2GrgO.js} +1459 -1426
  8. package/dist/apply-styled-options-to-query-COD9fRYD.cjs +1 -0
  9. package/dist/dimensions-Ce2zWFrs.js +204 -0
  10. package/dist/dimensions-u3w5qNF0.cjs +1 -0
  11. package/dist/index.cjs +380 -380
  12. package/dist/index.js +17024 -16696
  13. package/dist/index.umd.js +649 -660
  14. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -0
  15. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +11 -0
  16. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +12 -0
  17. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +5 -2
  18. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +16 -0
  19. package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +2 -3
  20. package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +10 -0
  21. package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +2 -0
  22. package/dist/packages/sdk-ui/src/domains/drilldown/components/drilldown-widget/drilldown-widget.d.ts +2 -2
  23. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +2 -1
  24. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +2 -2
  25. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +1 -1
  26. package/dist/packages/sdk-ui/src/domains/query-execution/core/date-formats/simple-date-format-replacers.d.ts +13 -0
  27. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-pivot-query/use-execute-pivot-query.d.ts +2 -2
  28. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query/use-execute-query.d.ts +2 -2
  29. package/dist/packages/sdk-ui/src/domains/visualizations/components/area-chart.d.ts +2 -2
  30. package/dist/packages/sdk-ui/src/domains/visualizations/components/areamap-chart.d.ts +2 -2
  31. package/dist/packages/sdk-ui/src/domains/visualizations/components/bar-chart.d.ts +2 -2
  32. package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts +2 -2
  33. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/chart.d.ts +2 -2
  34. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +1 -1
  35. package/dist/packages/sdk-ui/src/domains/visualizations/components/column-chart.d.ts +2 -2
  36. package/dist/packages/sdk-ui/src/domains/visualizations/components/funnel-chart.d.ts +2 -2
  37. package/dist/packages/sdk-ui/src/domains/visualizations/components/line-chart.d.ts +2 -2
  38. package/dist/packages/sdk-ui/src/domains/visualizations/components/pie-chart/pie-chart.d.ts +2 -2
  39. package/dist/packages/sdk-ui/src/domains/visualizations/components/polar-chart.d.ts +2 -2
  40. package/dist/packages/sdk-ui/src/domains/visualizations/components/scatter-chart.d.ts +2 -2
  41. package/dist/packages/sdk-ui/src/domains/visualizations/components/scattermap-chart.d.ts +2 -2
  42. package/dist/packages/sdk-ui/src/domains/visualizations/components/sunburst-chart/sunburst-chart.d.ts +2 -2
  43. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/table.d.ts +2 -2
  44. package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts +2 -2
  45. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +6 -6
  46. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +6 -1
  47. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts +2 -1
  48. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/axis-section.d.ts +29 -1
  49. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +1 -0
  50. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/tooltip-utils.d.ts +1 -1
  51. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/compose-code-to-readable.d.ts +24 -4
  52. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +3 -0
  53. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +6 -2
  54. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +6 -1
  55. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +118 -2
  56. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +18 -0
  57. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/use-scroller-location-save.d.ts +8 -0
  58. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +9 -0
  59. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/widget-by-id.d.ts +2 -2
  60. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +10 -0
  61. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/use-get-widget-model.d.ts +2 -2
  62. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +170 -0
  63. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +8 -14
  64. package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +3 -3
  65. package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +12 -1
  66. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +10 -2
  67. package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +10 -3
  68. package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +2 -2
  69. package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +2 -2
  70. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +9 -0
  71. package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +3 -4
  72. package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +1 -0
  73. package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
  74. package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +1 -1
  75. package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +2 -0
  76. package/dist/packages/sdk-ui/src/types.d.ts +7 -7
  77. package/dist/{types-GFLaiax5.cjs → types-COBvZZm_.cjs} +1 -1
  78. package/dist/{types-BBp2sp_s.js → types-D6jCGncV.js} +1 -1
  79. package/dist/{use-hover-mptQLQ4S.js → use-hover-B1HPf4hF.js} +6190 -6093
  80. package/dist/{use-hover-DsnmY-p_.cjs → use-hover-CaQrW_gv.cjs} +112 -112
  81. package/dist/{utils-DTUC-wtI.js → utils-BQtueE3Z.js} +9591 -9422
  82. package/dist/utils-CAubp1g1.cjs +179 -0
  83. package/dist/{widget-composer-D0BZrLna.js → widget-composer-BAJFWk3t.js} +3 -3
  84. package/dist/{widget-composer-CDb2iOoS.cjs → widget-composer-C75b-E6W.cjs} +1 -1
  85. package/package.json +8 -8
  86. package/dist/apply-styled-options-to-query-mFJvsssw.cjs +0 -1
  87. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +0 -2
  88. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/table-widget.d.ts +0 -22
  89. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +0 -61
  90. package/dist/parse-compose-code-DfZskSng.js +0 -352
  91. package/dist/parse-compose-code-v4J9BrUg.cjs +0 -1
  92. package/dist/utils-BlNqPAG8.cjs +0 -190
@@ -1,3 +1,4 @@
1
+ import type { TFunction } from '@sisense/sdk-common';
1
2
  import type { BaseQueryParams } from '../../../../domains/query-execution/types';
2
3
  import type { QueryDefinitionViewModel } from './types';
3
4
  /**
@@ -6,7 +7,10 @@ import type { QueryDefinitionViewModel } from './types';
6
7
  * Operators (comparison/sort) are not derived from BaseQueryParams in v1.
7
8
  *
8
9
  * @param params - BaseQueryParams from chart or query
10
+ * @param t - Optional i18n translate function. When provided, date-level (`DimensionalLevelAttribute`)
11
+ * dimensions and filters use `attribute.datetimeName.*` strings (e.g. "Months in Date"). When omitted,
12
+ * labels match the previous behavior (`attr.name` only).
9
13
  * @returns QueryDefinitionViewModel (pills and connectors)
10
- * @internal
14
+ * @sisenseInternal
11
15
  */
12
- export declare function baseQueryParamsToViewModel(params: BaseQueryParams): QueryDefinitionViewModel;
16
+ export declare function baseQueryParamsToViewModel(params: BaseQueryParams, t?: TFunction): QueryDefinitionViewModel;
@@ -1,5 +1,10 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import type { QueryPillItem } from './types';
3
+ /**
4
+ * Props for {@link QueryPill}.
5
+ *
6
+ * @sisenseInternal
7
+ */
3
8
  export interface QueryPillProps {
4
9
  item: QueryPillItem;
5
10
  showTooltip?: boolean;
@@ -8,6 +13,6 @@ export interface QueryPillProps {
8
13
  /**
9
14
  * Read-only query-definition pill; JSON tooltip is a portal bubble with a real triangle.
10
15
  *
11
- * @internal
16
+ * @sisenseInternal
12
17
  */
13
18
  export declare const QueryPill: FunctionComponent<QueryPillProps>;
@@ -1,6 +1,7 @@
1
+ import type { PivotGrandTotals } from '@sisense/sdk-data';
1
2
  import { AppSettings } from '../../../../../infra/app/settings/settings.js';
2
- import type { AreaStyleOptions, AxisLabel, CompleteThemeSettings, DataLimits, IndicatorStyleOptions, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, PieStyleOptions, SeriesLabels, WidgetStyleOptions } from '../../../../../types.js';
3
- import type { AxisStyle, CartesianWidgetStyle, WidgetDesign, WidgetStyle, WidgetSubtype } from '../types.js';
3
+ import type { AreamapType, AreaStyleOptions, AxisLabel, CompleteThemeSettings, DataLimits, FunnelStyleOptions, IndicatorStyleOptions, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, PieStyleOptions, PivotTableWidgetStyleOptions, PolarStyleOptions, ScattermapStyleOptions, ScatterStyleOptions, SeriesLabels, StackableStyleOptions, SunburstStyleOptions, TableStyleOptions, TreemapStyleOptions, WidgetStyleOptions } from '../../../../../types.js';
4
+ import type { AxisStyle, CartesianWidgetStyle, FunnelWidgetStyle, PivotWidgetStyle, PolarWidgetStyle, ScattermapWidgetStyle, ScatterWidgetStyle, SunburstWidgetStyle, TableWidgetStyle, TreemapWidgetStyle, WidgetDesign, WidgetStyle, WidgetSubtype } from '../types.js';
4
5
  /**
5
6
  * Maps SDK legend options to Fusion DTO legend style.
6
7
  *
@@ -117,4 +118,119 @@ export declare function toLineWidgetStyle(styleOptions: LineStyleOptions): Carte
117
118
  * @returns Fusion CartesianWidgetStyle for the widget DTO
118
119
  */
119
120
  export declare function toAreaWidgetStyle(styleOptions: AreaStyleOptions, widgetSubtype: WidgetSubtype): CartesianWidgetStyle;
121
+ /**
122
+ * Converts funnel chart style options to Fusion FunnelWidgetStyle DTO.
123
+ * Inverse of {@link extractFunnelChartStyleOptions}.
124
+ *
125
+ * @param styleOptions - Funnel style options from WidgetModel.styleOptions
126
+ * @returns Fusion FunnelWidgetStyle for the widget DTO
127
+ * @internal
128
+ */
129
+ export declare function toFunnelWidgetStyle(styleOptions: FunnelStyleOptions): FunnelWidgetStyle;
130
+ /**
131
+ * Converts treemap chart style options to Fusion TreemapWidgetStyle DTO.
132
+ * Inverse of {@link extractTreemapChartStyleOptions}.
133
+ *
134
+ * @param styleOptions - Treemap style options from WidgetModel.styleOptions
135
+ * @returns Fusion TreemapWidgetStyle for the widget DTO
136
+ * @internal
137
+ */
138
+ export declare function toTreemapWidgetStyle(styleOptions: TreemapStyleOptions): TreemapWidgetStyle;
139
+ /**
140
+ * Converts sunburst chart style options to Fusion SunburstWidgetStyle DTO.
141
+ * Inverse of {@link extractSunburstChartStyleOptions}.
142
+ *
143
+ * @param styleOptions - Sunburst style options from WidgetModel.styleOptions
144
+ * @returns Fusion SunburstWidgetStyle for the widget DTO
145
+ * @internal
146
+ */
147
+ export declare function toSunburstWidgetStyle(styleOptions: SunburstStyleOptions): SunburstWidgetStyle;
148
+ /**
149
+ * Converts bar chart style options to Fusion CartesianWidgetStyle DTO.
150
+ * Used when serializing a bar chart widget back to WidgetDto.
151
+ *
152
+ * @param styleOptions - Bar/stackable style options from WidgetModel.styleOptions
153
+ * @param widgetSubtype - Resolved Fusion widget subtype (e.g. 'bar/classic', 'bar/stacked', 'bar/stacked100')
154
+ * @returns Fusion CartesianWidgetStyle for the widget DTO
155
+ * @internal
156
+ */
157
+ export declare function toBarWidgetStyle(styleOptions: StackableStyleOptions, widgetSubtype: WidgetSubtype): CartesianWidgetStyle;
158
+ /**
159
+ * Converts column chart style options to Fusion CartesianWidgetStyle DTO.
160
+ * Used when serializing a column chart widget back to WidgetDto.
161
+ *
162
+ * @param styleOptions - Column/stackable style options from WidgetModel.styleOptions
163
+ * @param widgetSubtype - Resolved Fusion widget subtype (e.g. 'column/classic', 'column/stackedcolumn', 'column/stackedcolumn100')
164
+ * @returns Fusion CartesianWidgetStyle for the widget DTO
165
+ * @internal
166
+ */
167
+ export declare const toColumnWidgetStyle: typeof toBarWidgetStyle;
168
+ /**
169
+ * Converts polar chart style options to Fusion PolarWidgetStyle DTO.
170
+ * Uses `categories` / `axis` field names (instead of `xAxis` / `yAxis` used by Cartesian charts).
171
+ * Used when serializing a polar chart widget back to WidgetDto.
172
+ *
173
+ * @param styleOptions - Polar style options from WidgetModel.styleOptions
174
+ * @returns Fusion PolarWidgetStyle for the widget DTO
175
+ * @internal
176
+ */
177
+ export declare function toPolarWidgetStyle(styleOptions: PolarStyleOptions): PolarWidgetStyle;
178
+ /**
179
+ * Maps SDK scatter marker size to Fusion DTO marker size style.
180
+ * Inverse of the extraction performed by `extractScatterChartStyleOptions`.
181
+ *
182
+ * @internal
183
+ */
184
+ export declare function toScatterMarkerSizeStyle(markerSize?: ScatterStyleOptions['markerSize']): ScatterWidgetStyle['markerSize'];
185
+ /**
186
+ * Converts scatter chart style options to Fusion ScatterWidgetStyle DTO.
187
+ * Inverse of `extractScatterChartStyleOptions`.
188
+ *
189
+ * @param styleOptions - Scatter style options from WidgetModel.styleOptions
190
+ * @returns Fusion ScatterWidgetStyle for the widget DTO
191
+ * @internal
192
+ */
193
+ export declare function toScatterWidgetStyle(styleOptions: ScatterStyleOptions): ScatterWidgetStyle;
194
+ /**
195
+ * Converts scattermap style options to Fusion ScattermapWidgetStyle DTO.
196
+ * Inverse of `extractScattermapChartStyleOptions`. Missing SDK fields fall back
197
+ * to Fusion's scattermap defaults so the emitted DTO always carries a fully
198
+ * populated `markers` object (Fusion assumes it is always set).
199
+ *
200
+ * @param styleOptions - Scattermap style options from WidgetModel.styleOptions
201
+ * @returns Fusion ScattermapWidgetStyle for the widget DTO
202
+ * @internal
203
+ */
204
+ export declare function toScattermapWidgetStyle(styleOptions: ScattermapStyleOptions): ScattermapWidgetStyle;
205
+ /**
206
+ * Maps an SDK areamap `mapType` to the Fusion widget subtype used as the DTO
207
+ * `subtype` field. Inverse of the `subtype → mapType` mapping performed by
208
+ * {@link extractAreamapChartStyleOptions}. Defaults to `areamap/world` when
209
+ * `mapType` is unset or unrecognized — matching Fusion default.
210
+ *
211
+ * @internal
212
+ */
213
+ export declare function toAreamapSubtype(mapType?: AreamapType): 'areamap/world' | 'areamap/usa';
214
+ /**
215
+ * Converts table style options to Fusion TableWidgetStyle DTO.
216
+ * Used when serializing a table widget back to WidgetDto.
217
+ *
218
+ * @param styleOptions - Table style options from WidgetModel.styleOptions
219
+ * @returns Fusion TableWidgetStyle for the widget DTO
220
+ * @internal
221
+ */
222
+ export declare function toTableWidgetStyle(styleOptions: TableStyleOptions): TableWidgetStyle;
223
+ /**
224
+ * Converts pivot table style options to Fusion PivotWidgetStyle DTO.
225
+ * Inverse of {@link extractPivotTableStyleOptions}.
226
+ *
227
+ * Grand totals come from {@link PivotTableDataOptions.grandTotals} in the WidgetModel, not
228
+ * from `styleOptions`, so they are passed in separately.
229
+ *
230
+ * @param styleOptions - Pivot table style options from WidgetModel.styleOptions
231
+ * @param grandTotals - Grand totals config from WidgetModel.dataOptions.grandTotals
232
+ * @returns Fusion PivotWidgetStyle for the widget DTO
233
+ * @internal
234
+ */
235
+ export declare function toPivotTableWidgetStyle(styleOptions: PivotTableWidgetStyleOptions, grandTotals?: PivotGrandTotals): PivotWidgetStyle;
120
236
  export {};
@@ -236,6 +236,15 @@ export type PanelItem = {
236
236
  databars?: boolean;
237
237
  width?: number;
238
238
  colorIndex?: number;
239
+ /**
240
+ * Marker-size range carried on the `size` panel item of a scattermap widget.
241
+ * Fusion reads `items[0].format.size.min/max` and overwrites `style.markers.size.min/max`
242
+ * at widget load — so this is the source of truth for rendered marker sizes.
243
+ */
244
+ size?: {
245
+ min?: number;
246
+ max?: number;
247
+ };
239
248
  };
240
249
  jaql: WidgetJaql;
241
250
  disabled?: boolean;
@@ -522,6 +531,15 @@ export type ScattermapWidgetStyle = WidgetContainerStyleOptions & {
522
531
  defaultSize: number;
523
532
  min: number;
524
533
  max: number;
534
+ /**
535
+ * Fusion-internal UI state / slider bounds. Not read by the renderer but
536
+ * present on widgets produced by the Fusion wizard, so they are included
537
+ * when writing the DTO so round-trips keep them intact.
538
+ */
539
+ inactive?: boolean;
540
+ lowest?: number;
541
+ highest?: number;
542
+ step?: number;
525
543
  };
526
544
  };
527
545
  };
@@ -0,0 +1,8 @@
1
+ import type { WidgetDto } from '../../../../domains/widgets/components/widget-by-id/types';
2
+ /**
3
+ * Returns a debounced function that persists the navigator scroller position
4
+ * for the given widget via a PATCH to the dashboard API.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare function useScrollerLocationSave(dashboardOid: string, widgetOid: string, currentOptions?: NonNullable<WidgetDto['options']>): (min: number, max: number) => void;
@@ -11,6 +11,15 @@ import { TextWidgetProps } from '../text-widget/types';
11
11
  import { WidgetProps, WidgetType, WithCommonWidgetProps } from '../widget/types';
12
12
  import { CsdkPluginWidgetType, FusionPluginWidgetType, FusionWidgetType, Panel, PanelItem, TextWidgetDtoStyle, WidgetStyle, WidgetSubtype } from './types.js';
13
13
  export { mergeFilters, getFilterRelationsFromJaql, convertFilterRelationsModelToJaql, getFilterCompareId, } from '@sisense/sdk-data';
14
+ /**
15
+ * Returns `true` when a panel item's jaql represents a measure — either a base-measure
16
+ * aggregation (`jaql.agg`) or a calculated measure (`jaql.formula`). Mirrors Fusion's
17
+ * `isMeasure` dimension helper so CSDK code can evaluate the same "is measure?" checks
18
+ * Fusion's widget manifests rely on.
19
+ *
20
+ * @internal
21
+ */
22
+ export declare function isMeasurePanelItem(item: PanelItem): boolean;
14
23
  /**
15
24
  * Returns the corresponding chart type for a given widget type
16
25
  *
@@ -15,8 +15,8 @@ import { WidgetByIdProps } from '../../../../props.js';
15
15
  *
16
16
  * <iframe
17
17
  * src='https://csdk-playground.sisense.com/?example=fusion-assets%2Ffusion-widgets&mode=docs'
18
- * width=800
19
- * height=870
18
+ * width='800'
19
+ * height='870'
20
20
  * style='border:none;'
21
21
  * />
22
22
  *
@@ -0,0 +1,10 @@
1
+ import type { WidgetProps } from '../widget/types';
2
+ /**
3
+ * Injects the navigator scroller-change callback into the widget's navigator style options.
4
+ * Only activates when the widget has a navigator configuration so the event handler is not
5
+ * registered on charts that never show the navigator.
6
+ *
7
+ * @param onScrollerChange - Invoked with navigator min/max when the scroller moves.
8
+ * @returns Widget props transformer for use in a `flow` pipeline.
9
+ */
10
+ export declare function withNavigatorScrollSave(onScrollerChange: (min: number, max: number) => void): (widgetProps: WidgetProps) => WidgetProps;
@@ -79,8 +79,8 @@ export type WidgetModelSuccessState = {
79
79
  *
80
80
  * <iframe
81
81
  * src='https://csdk-playground.sisense.com/?example=fusion-assets%2Fuse-get-widget-model&mode=docs'
82
- * width=800
83
- * height=870
82
+ * width='800'
83
+ * height='870'
84
84
  * style='border:none;'
85
85
  * />
86
86
  *
@@ -0,0 +1,170 @@
1
+ import { AreamapChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, IndicatorChartDataOptions, PivotTableDataOptions, ScatterChartDataOptions, ScattermapChartDataOptions, TableDataOptionsInternal } from '../../../../domains/visualizations/core/chart-data-options/types.js';
2
+ import { Panel } from '../../../../domains/widgets/components/widget-by-id/types.js';
3
+ import { ScattermapStyleOptions } from '../../../../types.js';
4
+ /**
5
+ * Builds DTO panels for a line chart widget. The category panel is named `x-axis`,
6
+ * matching the Fusion convention for line/area charts.
7
+ *
8
+ * @param dataOptions - Cartesian chart data options from the WidgetModel
9
+ * @returns Fusion panels: x-axis, values, break by
10
+ * @internal
11
+ */
12
+ export declare function toLinePanels(dataOptions: CartesianChartDataOptions): Panel[];
13
+ /**
14
+ * Builds DTO panels for an area chart widget. The category panel is named `x-axis`,
15
+ * matching the Fusion convention for line/area charts.
16
+ *
17
+ * @param dataOptions - Cartesian chart data options from the WidgetModel
18
+ * @returns Fusion panels: x-axis, values, break by
19
+ * @internal
20
+ */
21
+ export declare function toAreaPanels(dataOptions: CartesianChartDataOptions): Panel[];
22
+ /**
23
+ * Builds DTO panels for a bar chart widget. The category panel is named `categories`.
24
+ *
25
+ * @param dataOptions - Cartesian chart data options from the WidgetModel
26
+ * @returns Fusion panels: categories, values, break by
27
+ * @internal
28
+ */
29
+ export declare function toBarPanels(dataOptions: CartesianChartDataOptions): Panel[];
30
+ /**
31
+ * Builds DTO panels for a column chart widget. The category panel is named `categories`.
32
+ *
33
+ * @param dataOptions - Cartesian chart data options from the WidgetModel
34
+ * @returns Fusion panels: categories, values, break by
35
+ * @internal
36
+ */
37
+ export declare function toColumnPanels(dataOptions: CartesianChartDataOptions): Panel[];
38
+ /**
39
+ * Builds DTO panels for a polar chart widget. The category panel is named `categories`.
40
+ *
41
+ * @param dataOptions - Cartesian chart data options from the WidgetModel
42
+ * @returns Fusion panels: categories, values, break by
43
+ * @internal
44
+ */
45
+ export declare function toPolarPanels(dataOptions: CartesianChartDataOptions): Panel[];
46
+ /**
47
+ * Builds the single `columns` panel for a table widget. Attributes are emitted first,
48
+ * then measure columns, preserving the order produced by {@link getTableAttributesAndMeasures}.
49
+ *
50
+ * @param dataOptions - Internal table data options from the WidgetModel
51
+ * @returns Single-element array with the `columns` panel
52
+ * @internal
53
+ */
54
+ export declare function toTablePanels(dataOptions: TableDataOptionsInternal): Panel[];
55
+ /**
56
+ * Builds DTO panels for an indicator widget. Emits `value`, `min`, `max`, and `secondary`
57
+ * panels in that order; a panel is emitted even when its backing list is empty so that
58
+ * the DTO panel order is stable across widgets.
59
+ *
60
+ * @param dataOptions - Indicator chart data options from the WidgetModel
61
+ * @returns Fusion panels: value, min, max, secondary
62
+ * @internal
63
+ */
64
+ export declare function toIndicatorPanels(dataOptions: IndicatorChartDataOptions): Panel[];
65
+ /**
66
+ * Builds DTO panels for a pie chart widget. Category items carry `format.members` when
67
+ * a flat `seriesToColorMap` is present so per-slice colors round-trip.
68
+ *
69
+ * @param dataOptions - Categorical chart data options from the WidgetModel
70
+ * @returns Fusion panels: categories, values
71
+ * @internal
72
+ */
73
+ export declare function toPiePanels(dataOptions: CategoricalChartDataOptions): Panel[];
74
+ /**
75
+ * Builds DTO panels for a funnel chart widget. Category items carry `format.members` when
76
+ * a flat `seriesToColorMap` is present so per-step colors round-trip.
77
+ *
78
+ * @param dataOptions - Categorical chart data options from the WidgetModel
79
+ * @returns Fusion panels: categories, values
80
+ * @internal
81
+ */
82
+ export declare function toFunnelPanels(dataOptions: CategoricalChartDataOptions): Panel[];
83
+ /**
84
+ * Builds DTO panels for a sunburst chart widget. Each category item carries the nested
85
+ * `format.members` entry matching its column title so per-level colors round-trip.
86
+ *
87
+ * @param dataOptions - Categorical chart data options from the WidgetModel
88
+ * @returns Fusion panels: categories, values
89
+ * @internal
90
+ */
91
+ export declare function toSunburstPanels(dataOptions: CategoricalChartDataOptions): Panel[];
92
+ /**
93
+ * Builds DTO panels for a treemap chart widget. The measures panel is renamed to `size`
94
+ * and an extra `color` panel is emitted (see {@link toTreemapColorPanel}) so Fusion can
95
+ * restore the per-value color assignments.
96
+ *
97
+ * @param dataOptions - Categorical chart data options from the WidgetModel
98
+ * @returns Fusion panels: categories, size, color
99
+ * @internal
100
+ */
101
+ export declare function toTreemapPanels(dataOptions: CategoricalChartDataOptions): Panel[];
102
+ /**
103
+ * Builds DTO panels for a scatter chart widget. All panels declared by the Fusion
104
+ * scatter manifest are always emitted (in this exact order: x-axis, y-axis, point,
105
+ * Break By / Color, size), even when no column is configured — Fusion's renderer
106
+ * accesses panels by name and throws "the panel '<name>' was not found" when a
107
+ * declared panel is missing. Slots without a column are emitted with `items: []`.
108
+ *
109
+ * Slot names are remapped to Fusion's conventions: `x`→`x-axis`, `y`→`y-axis`,
110
+ * `breakByPoint`→`point`, `breakByColor`→`Break By / Color`, `size`→`size`.
111
+ *
112
+ * When a flat `seriesToColorMap` is present and `breakByColor` has a column, its
113
+ * entries are attached to the `Break By / Color` item as `format.members` so
114
+ * Fusion restores the per-series colors on round-trip.
115
+ *
116
+ * @param dataOptions - Scatter chart data options from the WidgetModel
117
+ * @returns Fusion panels in fixed order; every declared panel is always present
118
+ * @internal
119
+ */
120
+ export declare function toScatterPanels(dataOptions: ScatterChartDataOptions): Panel[];
121
+ /**
122
+ * Builds DTO panels for a pivot table widget: `rows`, `columns`, and `values` (in that
123
+ * order). Rows and columns are treated as attributes; values as measures. Grand totals
124
+ * live on the style in the DTO and are written separately by
125
+ * {@link toPivotTableWidgetStyle}.
126
+ *
127
+ * @param dataOptions - Pivot table data options from the WidgetModel
128
+ * @returns Fusion panels: rows, columns, values
129
+ * @internal
130
+ */
131
+ export declare function toPivotTablePanels(dataOptions: PivotTableDataOptions): Panel[];
132
+ /**
133
+ * Builds DTO panels for a scattermap chart widget. All panels declared by the
134
+ * Fusion scattermap manifest are always emitted (in this exact order: `geo`,
135
+ * `color`, `size`, `details`), even when a slot has no column — Fusion's
136
+ * renderer accesses panels by name and throws "the panel '<name>' was not found"
137
+ * when a declared panel is missing. Slots without a column are emitted with
138
+ * `items: []`.
139
+ *
140
+ * Each geo item carries its `geoLevel` when the styled column supplies one so
141
+ * the country/state/city level round-trips. `color` holds a single measure
142
+ * (range-colored in Fusion), `size` holds a single measure, `details` holds a
143
+ * single attribute or measure.
144
+ *
145
+ * The size panel item additionally carries `format.size = { min, max }` when
146
+ * marker-size options are provided. Fusion reads `items[0].format.size.min/max` at widget load and overwrites
147
+ * `style.markers.size.min/max`, so this item-level format is the source of truth
148
+ * for rendered marker sizes — emitting the style alone is not enough.
149
+ *
150
+ * @param dataOptions - Scattermap chart data options from the WidgetModel
151
+ * @param markerSize - Optional marker-size options from WidgetModel.styleOptions.markers.size
152
+ * @returns Fusion panels in fixed order; every declared panel is always present
153
+ * @internal
154
+ */
155
+ export declare function toScattermapPanels(dataOptions: ScattermapChartDataOptions, markerSize?: NonNullable<ScattermapStyleOptions['markers']>['size']): Panel[];
156
+ /**
157
+ * Builds DTO panels for an areamap chart widget. All panels declared by the
158
+ * Fusion areamap manifest are always emitted (in this exact order: `geo`,
159
+ * `color`), even when a slot has no column — Fusion's renderer accesses panels
160
+ * by name and throws "the panel '<name>' was not found" when a declared panel
161
+ * is missing. Slots without a column are emitted with `items: []`.
162
+ *
163
+ * The geo slot is a single attribute (country/state). The color slot is a
164
+ * single measure; Fusion's manifest range-colors it at render time.
165
+ *
166
+ * @param dataOptions - Areamap chart data options from the WidgetModel
167
+ * @returns Fusion panels in fixed order; every declared panel is always present
168
+ * @internal
169
+ */
170
+ export declare function toAreamapPanels(dataOptions: AreamapChartDataOptions): Panel[];
@@ -4,7 +4,6 @@ import { ChartWidgetProps } from '../../../../domains/widgets/components/chart-w
4
4
  import { CommonWidgetProps } from '../../../../domains/widgets/components/common-widget/types';
5
5
  import { CustomWidgetProps } from '../../../../domains/widgets/components/custom-widget/types';
6
6
  import { PivotTableWidgetProps } from '../../../../domains/widgets/components/pivot-table-widget/types';
7
- import { TableWidgetProps } from '../../../../domains/widgets/components/table-widget/types';
8
7
  import { TextWidgetProps } from '../../../../domains/widgets/components/text-widget/types';
9
8
  import { WidgetDto } from '../../../../domains/widgets/components/widget-by-id/types.js';
10
9
  import { WidgetProps } from '../../../../domains/widgets/components/widget/types';
@@ -85,19 +84,6 @@ export declare function toPivotTableProps(widgetModel: WidgetModel): PivotTableP
85
84
  * Note: this method is not supported for pivot widgets.
86
85
  */
87
86
  export declare function toChartWidgetProps(widgetModel: WidgetModel): ChartWidgetProps;
88
- /**
89
- * Translates a {@link WidgetModel} to the props for rendering a table widget.
90
- *
91
- * @example
92
- * ```tsx
93
- * <TableWidget {...widgetModelTranslator.toTableWidgetProps(widgetModel)} />
94
- * ```
95
- *
96
- * Note: this method is not supported for chart widgets.
97
- * Use {@link toChartWidgetProps} instead for getting props for the <ChartWidget> component.
98
- * @internal
99
- */
100
- export declare function toTableWidgetProps(widgetModel: WidgetModel): TableWidgetProps;
101
87
  /**
102
88
  * Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
103
89
  *
@@ -162,6 +148,14 @@ export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?: Comp
162
148
  * @internal
163
149
  */
164
150
  export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps): WidgetModel;
151
+ /**
152
+ * Creates a {@link WidgetModel} from a {@link PivotTableWidgetProps}.
153
+ *
154
+ * @param pivotTableWidgetProps - The PivotTableWidgetProps to be converted to a widget model
155
+ * @returns WidgetModel
156
+ * @internal
157
+ */
158
+ export declare function fromPivotTableWidgetProps(pivotTableWidgetProps: PivotTableWidgetProps): WidgetModel;
165
159
  /**
166
160
  * Creates a {@link WidgetModel} from a {@link WidgetProps}.
167
161
  *
@@ -10,16 +10,16 @@ export declare const LEGACY_NARRATIVE_ENDPOINT = "api/v2/ai/nlg/queryResult";
10
10
  * @internal
11
11
  */
12
12
  export type GetNarrativeOptions = {
13
- isUnifiedNarrationEnabled?: boolean;
13
+ isUnified?: boolean;
14
14
  isSisenseAiEnabled?: boolean;
15
15
  };
16
16
  /**
17
- * Fetches Narrative. Single place for endpoint logic: isUnifiedNarrationEnabled === false → legacy only;
17
+ * Fetches Narrative. Single place for endpoint logic: `isUnified === false` → legacy only;
18
18
  * otherwise try unified endpoint first, fall back to legacy on 404.
19
19
  *
20
20
  * @param httpClient - HttpClient instance
21
21
  * @param request - Narration request payload
22
- * @param options - Optional; isUnifiedNarrationEnabled (from props.isUnifiedNarrationEnabled)
22
+ * @param options - Optional; `isUnified` / `isSisenseAiEnabled` (e.g. from `app.settings.narrative`)
23
23
  * @returns Promise with narration response
24
24
  * @internal
25
25
  */
@@ -6,6 +6,17 @@ import { PaletteDto } from '../../infra/api/types/palette-dto';
6
6
  import { HierarchyDto, SharedFormulaDto, WidgetDto } from '../../domains/widgets/components/widget-by-id/types';
7
7
  import { TranslatableError } from '../translation/translatable-error';
8
8
  import type { DashboardDto } from './types/dashboard-dto';
9
+ /** PATCH body for persisting Highcharts navigator scroller bounds on a dashboard widget. */
10
+ export type WidgetDashboardScrollerLocationPatch = {
11
+ options: Partial<NonNullable<WidgetDto['options']>> & {
12
+ previousScrollerLocation: {
13
+ min: number;
14
+ max: number;
15
+ };
16
+ };
17
+ };
18
+ /** Supported PATCH bodies for `RestApi.patchWidgetInDashboard`. */
19
+ export type PatchWidgetInDashboardBody = Partial<Pick<WidgetDto, 'title'>> | WidgetDashboardScrollerLocationPatch;
9
20
  type GetDashboardsOptions = {
10
21
  searchByTitle?: string;
11
22
  fields?: string[];
@@ -84,7 +95,7 @@ export declare class RestApi {
84
95
  /**
85
96
  * Partially update a widget in a dashboard.
86
97
  */
87
- patchWidgetInDashboard: (dashboardOid: string, widgetOid: string, patch: Partial<Pick<WidgetDto, 'title'>>, sharedMode?: boolean) => Promise<WidgetDto | undefined>;
98
+ patchWidgetInDashboard: (dashboardOid: string, widgetOid: string, patch: PatchWidgetInDashboardBody, sharedMode?: boolean) => Promise<WidgetDto | undefined>;
88
99
  /**
89
100
  * Get shared formulas by ids
90
101
  *
@@ -13,6 +13,7 @@ export type AppSettings = Required<ConfigurableAppSettings> & ServerSettings;
13
13
  type ConfigurableAppSettings = AppConfig;
14
14
  /**
15
15
  * User role permissions
16
+ *
16
17
  * @internal
17
18
  */
18
19
  type RoleManifest = {
@@ -63,14 +64,21 @@ type ServerSettings = {
63
64
  serverLanguage: string;
64
65
  serverVersion: string;
65
66
  serverFeatures: FeatureMap;
66
- isUnifiedNarrationEnabled?: boolean;
67
- isSisenseAiEnabled?: boolean;
67
+ narrative: {
68
+ /** From `api/v2/settings/ai` narration.enabled */
69
+ isEnabled: boolean;
70
+ /** From globals.props.narrationUnified */
71
+ isUnified: boolean;
72
+ /** Computed: unlimited (API sisenseAIEnabled or props) or credit-based narratives */
73
+ isSisenseAiEnabled: boolean;
74
+ };
68
75
  user: {
69
76
  tenant: {
70
77
  name: string;
71
78
  };
72
79
  /**
73
80
  * User role permissions
81
+ *
74
82
  * @internal
75
83
  */
76
84
  permissions: RoleManifest;
@@ -5,17 +5,22 @@ import { CustomWidgetComponent, CustomWidgetComponentProps } from './types';
5
5
  * @example
6
6
  * Example of registering a custom widget in a dashboard:
7
7
  * ```tsx
8
+ * import { useEffect } from 'react';
8
9
  * import { useCustomWidgets, DashboardById } from '@sisense/sdk-ui';
9
10
  * import CustomHistogramWidget from './custom-histogram-widget';
10
11
  *
11
12
  * const Example = () => {
12
- * const { registerCustomWidget } = useCustomWidgets();
13
- * registerCustomWidget('histogramwidget', CustomHistogramWidget);
13
+ * const { registerCustomWidget, unregisterCustomWidget } = useCustomWidgets();
14
+ *
15
+ * useEffect(() => {
16
+ * registerCustomWidget('histogramwidget', CustomHistogramWidget);
17
+ * // Optionally unregister on unmount (e.g. if the widget should only be available within this component)
18
+ * return () => unregisterCustomWidget('histogramwidget');
19
+ * }, [registerCustomWidget, unregisterCustomWidget]);
14
20
  *
15
21
  * return <DashboardById dashboardOid="your-dashboard-oid" />;
16
22
  * }
17
23
  * ```
18
- *
19
24
  * @group Dashboards
20
25
  */
21
26
  export declare const useCustomWidgets: () => UseCustomWidgetsResult;
@@ -25,6 +30,8 @@ export declare const useCustomWidgets: () => UseCustomWidgetsResult;
25
30
  export type UseCustomWidgetsResult = {
26
31
  /** Registers a custom widget. */
27
32
  registerCustomWidget: <T = CustomWidgetComponentProps>(customWidgetType: string, customWidget: CustomWidgetComponent<T>) => void;
33
+ /** Unregisters a legacy custom widget for the given type name. */
34
+ unregisterCustomWidget: (customWidgetType: string) => void;
28
35
  /** Checks if a custom widget is registered. */
29
36
  hasCustomWidget: (customWidgetType: string) => boolean;
30
37
  /** Gets a custom widget. */
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { WidgetPlugin } from './widget-plugins/types.js';
2
+ import type { AnyWidgetPlugin } from './widget-plugins/types.js';
3
3
  import type { WidgetPluginRegistry } from './widget-plugins/widget-plugin-registry.js';
4
4
  /**
5
5
  * Context for accessing registered plugins
@@ -10,7 +10,7 @@ export interface PluginContextValue {
10
10
  /**
11
11
  * Validated widget plugin declarations (metadata)
12
12
  */
13
- widgetPlugins: readonly WidgetPlugin[];
13
+ widgetPlugins: readonly AnyWidgetPlugin[];
14
14
  /**
15
15
  * Central widget component registry (used for lookup and legacy bridge)
16
16
  */
@@ -1,4 +1,4 @@
1
- import type { WidgetPlugin } from './widget-plugins/types.js';
1
+ import type { AnyWidgetPlugin } from './widget-plugins/types.js';
2
2
  /**
3
3
  * Base plugin information
4
4
  *
@@ -55,4 +55,4 @@ export interface PluginValidationResult {
55
55
  *
56
56
  * @sisenseInternal
57
57
  */
58
- export type Plugin = WidgetPlugin;
58
+ export type Plugin = AnyWidgetPlugin;
@@ -131,6 +131,15 @@ export interface WidgetPlugin<Props = CustomVisualizationProps, StyleOptions = C
131
131
  };
132
132
  };
133
133
  }
134
+ /**
135
+ * Any Widget plugin declaration
136
+ * Represents heterogeneous widget plugin declarations at registry/context boundaries.
137
+ * Generic params are intentionally erased because each plugin can define distinct props/style types.
138
+ * Do not consume component prop types from this alias directly.
139
+ *
140
+ * @sisenseInternal
141
+ */
142
+ export type AnyWidgetPlugin = WidgetPlugin<any, any>;
134
143
  /**
135
144
  * Props passed to a user-defined custom visualization component.
136
145
  *