@sisense/sdk-ui 2.25.0 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +36 -36
- package/dist/ai.js +968 -989
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1010 -865
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{apply-styled-options-to-query-BsBTwL6W.js → apply-styled-options-to-query-BzMAmDnD.js} +1471 -1433
- package/dist/apply-styled-options-to-query-k10gkPCG.cjs +1 -0
- package/dist/dimensions-C3WSSE5j.js +204 -0
- package/dist/dimensions-huCJK0y6.cjs +1 -0
- package/dist/index.cjs +422 -422
- package/dist/index.js +17880 -17278
- package/dist/index.umd.js +652 -663
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-models.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +18 -4
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +19 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +8 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +12 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +5 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +2 -3
- package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/drilldown/components/drilldown-widget/drilldown-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/drilldown/hooks/use-drilldown.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/drilldown/hooks/use-hierarchies-loader.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/filters/components/custom-filter-tile.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +11 -3
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +51 -1
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/query-execution/core/date-formats/simple-date-format-replacers.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-pivot-query/use-execute-pivot-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query/use-execute-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/area-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/areamap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/bar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/scattermap/utils/map.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/types.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/column-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/funnel-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/line-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pie-chart/pie-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/sorting-utils.d.ts +4 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/polar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/scatter-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/scattermap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/sunburst-chart/sunburst-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/hooks/use-table-data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/table.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/translate-data-options.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/validate-data-options/validate-data-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/apply-event-handlers.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +6 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/series-processor.d.ts +1 -37
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/series-labels.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/axis-section.d.ts +29 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/tooltip-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/compose-code-to-readable.d.ts +24 -4
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition-style-constants.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +8 -4
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +6 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-with-pivot-table-widget-drilldown.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/utils.d.ts +0 -5
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/apply-partial-dto-style.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/extract-unsupported-style-options.d.ts +31 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +118 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +19 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/use-scroller-location-save.d.ts +8 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +10 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/widget-by-id.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/use-get-widget-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +183 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +45 -14
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +12 -0
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +13 -7
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +12 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +49 -2
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +2 -0
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +0 -1
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +10 -3
- package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +24 -10
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +3 -4
- package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-from-json.d.ts +5 -5
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-jaql.d.ts +4 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-json.d.ts +5 -5
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +4 -4
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +5 -0
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +13 -2
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +22 -20
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +2 -2
- package/dist/packages/sdk-ui/src/shared/components/menu/context-menu/menu.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +2 -0
- package/dist/packages/sdk-ui/src/types.d.ts +10 -10
- package/dist/{types-GFLaiax5.cjs → types-Cq47e5cy.cjs} +1 -1
- package/dist/{types-BBp2sp_s.js → types-CzqDZ83C.js} +1 -1
- package/dist/{use-hover-mptQLQ4S.js → use-hover-CkmV6eu9.js} +10368 -10193
- package/dist/{use-hover-DsnmY-p_.cjs → use-hover-D_mBUhp9.cjs} +114 -114
- package/dist/utils-DM5vp1gw.cjs +179 -0
- package/dist/{utils-DTUC-wtI.js → utils-Db3U6oHa.js} +8810 -8670
- package/dist/{widget-composer-D0BZrLna.js → widget-composer-BiGVKN49.js} +108 -108
- package/dist/{widget-composer-CDb2iOoS.cjs → widget-composer-CZ0_bPXK.cjs} +7 -7
- package/package.json +9 -8
- package/dist/apply-styled-options-to-query-mFJvsssw.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/drilldown/hooks/use-synced-drilldown-paths-manager.d.ts +0 -113
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +0 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/table-widget.d.ts +0 -22
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +0 -61
- package/dist/parse-compose-code-DfZskSng.js +0 -352
- package/dist/parse-compose-code-v4J9BrUg.cjs +0 -1
- package/dist/utils-BlNqPAG8.cjs +0 -190
|
@@ -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 {};
|
|
@@ -32,7 +32,7 @@ export type CsdkPluginWidgetType = 'tabber-buttons';
|
|
|
32
32
|
/**
|
|
33
33
|
* The type of a widget on a dashboard.
|
|
34
34
|
*/
|
|
35
|
-
export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | 'heatmap' | TextWidgetType | FusionPluginWidgetType |
|
|
35
|
+
export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | 'heatmap' | TextWidgetType | FusionPluginWidgetType | string;
|
|
36
36
|
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst' | 'boxplot/full' | 'boxplot/hollow' | 'map/scatter' | 'areamap/world' | 'areamap/usa' | 'richtexteditor';
|
|
37
37
|
export declare enum WidgetDashboardFilterMode {
|
|
38
38
|
FILTER = "filter",
|
|
@@ -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
|
*
|
|
@@ -18,7 +27,7 @@ export { mergeFilters, getFilterRelationsFromJaql, convertFilterRelationsModelTo
|
|
|
18
27
|
*/
|
|
19
28
|
export declare function getChartType(fusionWidgetType: FusionWidgetType): ChartType | undefined;
|
|
20
29
|
export declare function getFusionWidgetTypeFromChartType(chartType: ChartType): FusionWidgetType;
|
|
21
|
-
export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType): FusionWidgetType;
|
|
30
|
+
export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType, customWidgetType?: string): FusionWidgetType;
|
|
22
31
|
export declare function getWidgetType(fusionWidgetType: FusionWidgetType): WidgetType;
|
|
23
32
|
export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
|
|
24
33
|
export declare function isSupportedWidgetType(fusionWidgetType: string): fusionWidgetType is FusionWidgetType;
|
|
@@ -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,183 @@
|
|
|
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 type { GenericDataOptions } from '../../../../types.js';
|
|
4
|
+
import { ScattermapStyleOptions } from '../../../../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Builds DTO panels for a line chart widget. The category panel is named `x-axis`,
|
|
7
|
+
* matching the Fusion convention for line/area charts.
|
|
8
|
+
*
|
|
9
|
+
* @param dataOptions - Cartesian chart data options from the WidgetModel
|
|
10
|
+
* @returns Fusion panels: x-axis, values, break by
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function toLinePanels(dataOptions: CartesianChartDataOptions): Panel[];
|
|
14
|
+
/**
|
|
15
|
+
* Builds DTO panels for an area chart widget. The category panel is named `x-axis`,
|
|
16
|
+
* matching the Fusion convention for line/area charts.
|
|
17
|
+
*
|
|
18
|
+
* @param dataOptions - Cartesian chart data options from the WidgetModel
|
|
19
|
+
* @returns Fusion panels: x-axis, values, break by
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function toAreaPanels(dataOptions: CartesianChartDataOptions): Panel[];
|
|
23
|
+
/**
|
|
24
|
+
* Builds DTO panels for a bar chart widget. The category panel is named `categories`.
|
|
25
|
+
*
|
|
26
|
+
* @param dataOptions - Cartesian chart data options from the WidgetModel
|
|
27
|
+
* @returns Fusion panels: categories, values, break by
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare function toBarPanels(dataOptions: CartesianChartDataOptions): Panel[];
|
|
31
|
+
/**
|
|
32
|
+
* Builds DTO panels for a column chart widget. The category panel is named `categories`.
|
|
33
|
+
*
|
|
34
|
+
* @param dataOptions - Cartesian chart data options from the WidgetModel
|
|
35
|
+
* @returns Fusion panels: categories, values, break by
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function toColumnPanels(dataOptions: CartesianChartDataOptions): Panel[];
|
|
39
|
+
/**
|
|
40
|
+
* Builds DTO panels for a polar chart widget. The category panel is named `categories`.
|
|
41
|
+
*
|
|
42
|
+
* @param dataOptions - Cartesian chart data options from the WidgetModel
|
|
43
|
+
* @returns Fusion panels: categories, values, break by
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function toPolarPanels(dataOptions: CartesianChartDataOptions): Panel[];
|
|
47
|
+
/**
|
|
48
|
+
* Builds the single `columns` panel for a table widget. Attributes are emitted first,
|
|
49
|
+
* then measure columns, preserving the order produced by {@link getTableAttributesAndMeasures}.
|
|
50
|
+
*
|
|
51
|
+
* @param dataOptions - Internal table data options from the WidgetModel
|
|
52
|
+
* @returns Single-element array with the `columns` panel
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export declare function toTablePanels(dataOptions: TableDataOptionsInternal): Panel[];
|
|
56
|
+
/**
|
|
57
|
+
* Builds DTO panels for an indicator widget. Emits `value`, `min`, `max`, and `secondary`
|
|
58
|
+
* panels in that order; a panel is emitted even when its backing list is empty so that
|
|
59
|
+
* the DTO panel order is stable across widgets.
|
|
60
|
+
*
|
|
61
|
+
* @param dataOptions - Indicator chart data options from the WidgetModel
|
|
62
|
+
* @returns Fusion panels: value, min, max, secondary
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export declare function toIndicatorPanels(dataOptions: IndicatorChartDataOptions): Panel[];
|
|
66
|
+
/**
|
|
67
|
+
* Builds DTO panels for a pie chart widget. Category items carry `format.members` when
|
|
68
|
+
* a flat `seriesToColorMap` is present so per-slice colors round-trip.
|
|
69
|
+
*
|
|
70
|
+
* @param dataOptions - Categorical chart data options from the WidgetModel
|
|
71
|
+
* @returns Fusion panels: categories, values
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
export declare function toPiePanels(dataOptions: CategoricalChartDataOptions): Panel[];
|
|
75
|
+
/**
|
|
76
|
+
* Builds DTO panels for a funnel chart widget. Category items carry `format.members` when
|
|
77
|
+
* a flat `seriesToColorMap` is present so per-step colors round-trip.
|
|
78
|
+
*
|
|
79
|
+
* @param dataOptions - Categorical chart data options from the WidgetModel
|
|
80
|
+
* @returns Fusion panels: categories, values
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
export declare function toFunnelPanels(dataOptions: CategoricalChartDataOptions): Panel[];
|
|
84
|
+
/**
|
|
85
|
+
* Builds DTO panels for a sunburst chart widget. Each category item carries the nested
|
|
86
|
+
* `format.members` entry matching its column title so per-level colors round-trip.
|
|
87
|
+
*
|
|
88
|
+
* @param dataOptions - Categorical chart data options from the WidgetModel
|
|
89
|
+
* @returns Fusion panels: categories, values
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
export declare function toSunburstPanels(dataOptions: CategoricalChartDataOptions): Panel[];
|
|
93
|
+
/**
|
|
94
|
+
* Builds DTO panels for a treemap chart widget. The measures panel is renamed to `size`
|
|
95
|
+
* and an extra `color` panel is emitted (see {@link toTreemapColorPanel}) so Fusion can
|
|
96
|
+
* restore the per-value color assignments.
|
|
97
|
+
*
|
|
98
|
+
* @param dataOptions - Categorical chart data options from the WidgetModel
|
|
99
|
+
* @returns Fusion panels: categories, size, color
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export declare function toTreemapPanels(dataOptions: CategoricalChartDataOptions): Panel[];
|
|
103
|
+
/**
|
|
104
|
+
* Builds DTO panels for a scatter chart widget. All panels declared by the Fusion
|
|
105
|
+
* scatter manifest are always emitted (in this exact order: x-axis, y-axis, point,
|
|
106
|
+
* Break By / Color, size), even when no column is configured — Fusion's renderer
|
|
107
|
+
* accesses panels by name and throws "the panel '<name>' was not found" when a
|
|
108
|
+
* declared panel is missing. Slots without a column are emitted with `items: []`.
|
|
109
|
+
*
|
|
110
|
+
* Slot names are remapped to Fusion's conventions: `x`→`x-axis`, `y`→`y-axis`,
|
|
111
|
+
* `breakByPoint`→`point`, `breakByColor`→`Break By / Color`, `size`→`size`.
|
|
112
|
+
*
|
|
113
|
+
* When a flat `seriesToColorMap` is present and `breakByColor` has a column, its
|
|
114
|
+
* entries are attached to the `Break By / Color` item as `format.members` so
|
|
115
|
+
* Fusion restores the per-series colors on round-trip.
|
|
116
|
+
*
|
|
117
|
+
* @param dataOptions - Scatter chart data options from the WidgetModel
|
|
118
|
+
* @returns Fusion panels in fixed order; every declared panel is always present
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
export declare function toScatterPanels(dataOptions: ScatterChartDataOptions): Panel[];
|
|
122
|
+
/**
|
|
123
|
+
* Builds DTO panels for a pivot table widget: `rows`, `columns`, and `values` (in that
|
|
124
|
+
* order). Rows and columns are treated as attributes; values as measures. Grand totals
|
|
125
|
+
* live on the style in the DTO and are written separately by
|
|
126
|
+
* {@link toPivotTableWidgetStyle}.
|
|
127
|
+
*
|
|
128
|
+
* @param dataOptions - Pivot table data options from the WidgetModel
|
|
129
|
+
* @returns Fusion panels: rows, columns, values
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
export declare function toPivotTablePanels(dataOptions: PivotTableDataOptions): Panel[];
|
|
133
|
+
/**
|
|
134
|
+
* Builds DTO panels for a scattermap chart widget. All panels declared by the
|
|
135
|
+
* Fusion scattermap manifest are always emitted (in this exact order: `geo`,
|
|
136
|
+
* `color`, `size`, `details`), even when a slot has no column — Fusion's
|
|
137
|
+
* renderer accesses panels by name and throws "the panel '<name>' was not found"
|
|
138
|
+
* when a declared panel is missing. Slots without a column are emitted with
|
|
139
|
+
* `items: []`.
|
|
140
|
+
*
|
|
141
|
+
* Each geo item carries its `geoLevel` when the styled column supplies one so
|
|
142
|
+
* the country/state/city level round-trips. `color` holds a single measure
|
|
143
|
+
* (range-colored in Fusion), `size` holds a single measure, `details` holds a
|
|
144
|
+
* single attribute or measure.
|
|
145
|
+
*
|
|
146
|
+
* The size panel item additionally carries `format.size = { min, max }` when
|
|
147
|
+
* marker-size options are provided. Fusion reads `items[0].format.size.min/max` at widget load and overwrites
|
|
148
|
+
* `style.markers.size.min/max`, so this item-level format is the source of truth
|
|
149
|
+
* for rendered marker sizes — emitting the style alone is not enough.
|
|
150
|
+
*
|
|
151
|
+
* @param dataOptions - Scattermap chart data options from the WidgetModel
|
|
152
|
+
* @param markerSize - Optional marker-size options from WidgetModel.styleOptions.markers.size
|
|
153
|
+
* @returns Fusion panels in fixed order; every declared panel is always present
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
export declare function toScattermapPanels(dataOptions: ScattermapChartDataOptions, markerSize?: NonNullable<ScattermapStyleOptions['markers']>['size']): Panel[];
|
|
157
|
+
/**
|
|
158
|
+
* Builds DTO panels for an areamap chart widget. All panels declared by the
|
|
159
|
+
* Fusion areamap manifest are always emitted (in this exact order: `geo`,
|
|
160
|
+
* `color`), even when a slot has no column — Fusion's renderer accesses panels
|
|
161
|
+
* by name and throws "the panel '<name>' was not found" when a declared panel
|
|
162
|
+
* is missing. Slots without a column are emitted with `items: []`.
|
|
163
|
+
*
|
|
164
|
+
* The geo slot is a single attribute (country/state). The color slot is a
|
|
165
|
+
* single measure; Fusion's manifest range-colors it at render time.
|
|
166
|
+
*
|
|
167
|
+
* @param dataOptions - Areamap chart data options from the WidgetModel
|
|
168
|
+
* @returns Fusion panels in fixed order; every declared panel is always present
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
export declare function toAreamapPanels(dataOptions: AreamapChartDataOptions): Panel[];
|
|
172
|
+
/**
|
|
173
|
+
* Builds DTO panels for a plugin / custom widget. Each key in {@link GenericDataOptions}
|
|
174
|
+
* becomes one panel; every Column is normalised then converted to a JAQL panel item via
|
|
175
|
+
* the same helper chart widgets use, so the DTO round-trips through `fromWidgetDto`
|
|
176
|
+
* without further translation. The `filters` key is reserved by the DTO schema and
|
|
177
|
+
* emitted separately from `widgetModel.filters`, so it is skipped here.
|
|
178
|
+
*
|
|
179
|
+
* @param dataOptions - Generic data options keyed by the plugin's input names
|
|
180
|
+
* @returns One Fusion panel per declared input
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
export declare function toCustomWidgetPanels(dataOptions: GenericDataOptions | undefined): Panel[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JaqlDataSourceForDto } from '@sisense/sdk-data';
|
|
2
|
+
import type { JumpToDashboardConfig, JumpToDashboardConfigForPivot } from '../../../../domains/dashboarding/hooks/jtd/jtd-types.js';
|
|
2
3
|
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
|
|
3
4
|
import { ChartWidgetProps } from '../../../../domains/widgets/components/chart-widget/types';
|
|
4
5
|
import { CommonWidgetProps } from '../../../../domains/widgets/components/common-widget/types';
|
|
5
6
|
import { CustomWidgetProps } from '../../../../domains/widgets/components/custom-widget/types';
|
|
6
7
|
import { PivotTableWidgetProps } from '../../../../domains/widgets/components/pivot-table-widget/types';
|
|
7
|
-
import { TableWidgetProps } from '../../../../domains/widgets/components/table-widget/types';
|
|
8
8
|
import { TextWidgetProps } from '../../../../domains/widgets/components/text-widget/types';
|
|
9
9
|
import { WidgetDto } from '../../../../domains/widgets/components/widget-by-id/types.js';
|
|
10
10
|
import { WidgetProps } from '../../../../domains/widgets/components/widget/types';
|
|
@@ -85,19 +85,6 @@ export declare function toPivotTableProps(widgetModel: WidgetModel): PivotTableP
|
|
|
85
85
|
* Note: this method is not supported for pivot widgets.
|
|
86
86
|
*/
|
|
87
87
|
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
88
|
/**
|
|
102
89
|
* Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
|
|
103
90
|
*
|
|
@@ -144,6 +131,26 @@ export declare function toCommonWidgetProps(widgetModel: WidgetModel): CommonWid
|
|
|
144
131
|
* ```
|
|
145
132
|
*/
|
|
146
133
|
export declare function toWidgetProps(widgetModel: WidgetModel): WidgetProps;
|
|
134
|
+
/**
|
|
135
|
+
* Returns Jump to Dashboard configuration for a {@link WidgetModel} that was built from
|
|
136
|
+
* Fusion via {@link fromWidgetDto}.
|
|
137
|
+
*
|
|
138
|
+
* @param widgetModel - The {@link WidgetModel} built from Fusion via {@link fromWidgetDto};
|
|
139
|
+
*
|
|
140
|
+
* @returns `JumpToDashboardConfig`, `JumpToDashboardConfigForPivot`, or `null` when the model is not
|
|
141
|
+
* Fusion-sourced, or the widget has no versioned JTD.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* const widgetProps = widgetModelTranslator.toWidgetProps(widgetModel);
|
|
146
|
+
* const jtdConfig = widgetModelTranslator.toJtdConfig(widgetModel);
|
|
147
|
+
* // When jtdConfig is non-null, pass widgetProps and jtdConfig to useJtdWidget; otherwise render the widget with widgetProps alone.
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* @sisenseInternal
|
|
151
|
+
* @alpha
|
|
152
|
+
*/
|
|
153
|
+
export declare function toJtdConfig(widgetModel: WidgetModel): JumpToDashboardConfig | JumpToDashboardConfigForPivot | null;
|
|
147
154
|
/**
|
|
148
155
|
* Creates a {@link WidgetModel} from a widget DTO.
|
|
149
156
|
*
|
|
@@ -162,6 +169,30 @@ export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?: Comp
|
|
|
162
169
|
* @internal
|
|
163
170
|
*/
|
|
164
171
|
export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps): WidgetModel;
|
|
172
|
+
/**
|
|
173
|
+
* Creates a {@link WidgetModel} from a {@link PivotTableWidgetProps}.
|
|
174
|
+
*
|
|
175
|
+
* @param pivotTableWidgetProps - The PivotTableWidgetProps to be converted to a widget model
|
|
176
|
+
* @returns WidgetModel
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
export declare function fromPivotTableWidgetProps(pivotTableWidgetProps: PivotTableWidgetProps): WidgetModel;
|
|
180
|
+
/**
|
|
181
|
+
* Creates a {@link WidgetModel} from a {@link TextWidgetProps}.
|
|
182
|
+
*
|
|
183
|
+
* @param textWidgetProps - The TextWidgetProps to be converted to a widget model
|
|
184
|
+
* @returns WidgetModel
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
export declare function fromTextWidgetProps(textWidgetProps: TextWidgetProps): WidgetModel;
|
|
188
|
+
/**
|
|
189
|
+
* Creates a {@link WidgetModel} from a {@link CustomWidgetProps}.
|
|
190
|
+
*
|
|
191
|
+
* @param customWidgetProps - The CustomWidgetProps to be converted to a widget model
|
|
192
|
+
* @returns WidgetModel
|
|
193
|
+
* @internal
|
|
194
|
+
*/
|
|
195
|
+
export declare function fromCustomWidgetProps(customWidgetProps: CustomWidgetProps): WidgetModel;
|
|
165
196
|
/**
|
|
166
197
|
* Creates a {@link WidgetModel} from a {@link WidgetProps}.
|
|
167
198
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { EmptyObject } from '@sisense/sdk-query-client/src/helpers/utility-types';
|
|
3
|
+
import type { JumpToDashboardConfig, JumpToDashboardConfigForPivot } from '../../../domains/dashboarding/hooks/jtd/jtd-types';
|
|
3
4
|
import { ChartDataOptions, PivotTableDataOptions } from '../../../domains/visualizations/core/chart-data-options/types';
|
|
4
5
|
import { ChartType, DrilldownOptions, PivotTableDrilldownOptions, WidgetStyleOptions } from '../../../types';
|
|
5
6
|
import type { WidgetType } from '../components/widget/types';
|
|
@@ -70,5 +71,16 @@ export interface WidgetModel {
|
|
|
70
71
|
* Widget drilldown options.
|
|
71
72
|
*/
|
|
72
73
|
drilldownOptions: DrilldownOptions | PivotTableDrilldownOptions;
|
|
74
|
+
/**
|
|
75
|
+
* Jump to Dashboard configuration for this widget, when the model was built from a Fusion
|
|
76
|
+
* `WidgetDto` via `fromWidgetDto`. Populated with the same translation as dashboard
|
|
77
|
+
* `fromDashboardDto` uses for `widgetsOptions` (via `translateWidgetsOptions` →
|
|
78
|
+
* `jumpToDashboardConfigFromWidgetDto`). Omitted or `undefined` when the model is not
|
|
79
|
+
* Fusion-sourced (e.g. from widget props) or the widget has no versioned JTD.
|
|
80
|
+
*
|
|
81
|
+
* @see {@link widgetModelTranslator.toJtdConfig}
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
jtdConfig?: JumpToDashboardConfig | JumpToDashboardConfigForPivot;
|
|
73
85
|
}
|
|
74
86
|
export declare const isWidgetModel: (widget: any) => widget is WidgetModel;
|
|
@@ -10,17 +10,23 @@ export declare const LEGACY_NARRATIVE_ENDPOINT = "api/v2/ai/nlg/queryResult";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export type GetNarrativeOptions = {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
canGenerateNarrativeViaAI?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* When provided and the primary request returns a 400, the request is retried once with this
|
|
16
|
+
* fallback payload. Intended for trend/forecast stripping when the backend cannot handle them.
|
|
17
|
+
*/
|
|
18
|
+
fallbackRequestOn400?: NarrativeRequest;
|
|
15
19
|
};
|
|
16
20
|
/**
|
|
17
|
-
* Fetches Narrative. Single place for endpoint logic:
|
|
18
|
-
*
|
|
21
|
+
* Fetches Narrative. Single place for endpoint logic: when `canGenerateNarrativeViaAI` is truthy,
|
|
22
|
+
* try the unified endpoint first and fall back to legacy on 404; otherwise hit legacy directly.
|
|
23
|
+
* When `fallbackRequestOn400` is provided and the primary request returns a 400, the request is
|
|
24
|
+
* retried once with the fallback payload.
|
|
19
25
|
*
|
|
20
26
|
* @param httpClient - HttpClient instance
|
|
21
27
|
* @param request - Narration request payload
|
|
22
|
-
* @param options - Optional;
|
|
23
|
-
* @returns Promise with narration
|
|
28
|
+
* @param options - Optional; `canGenerateNarrativeViaAI` (typically from `app.settings.narrative`)
|
|
29
|
+
* @returns Promise that resolves with narration JSON or `undefined` (same semantics as `HttpClient.post`)
|
|
24
30
|
* @internal
|
|
25
31
|
*/
|
|
26
|
-
export declare function getNarrative(httpClient: HttpClient, request: NarrativeRequest, options?: GetNarrativeOptions): Promise<NarrativeResponse>;
|
|
32
|
+
export declare function getNarrative(httpClient: HttpClient, request: NarrativeRequest, options?: GetNarrativeOptions): Promise<NarrativeResponse | undefined>;
|
|
@@ -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:
|
|
98
|
+
patchWidgetInDashboard: (dashboardOid: string, widgetOid: string, patch: PatchWidgetInDashboardBody, sharedMode?: boolean) => Promise<WidgetDto | undefined>;
|
|
88
99
|
/**
|
|
89
100
|
* Get shared formulas by ids
|
|
90
101
|
*
|