@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
|
@@ -9,8 +9,8 @@ import { FunnelChartProps } from '../../../props';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=charts%2Ffunnel-chart&mode=docs'
|
|
12
|
-
* width=800
|
|
13
|
-
* height=870
|
|
12
|
+
* width='800'
|
|
13
|
+
* height='870'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
|
@@ -10,8 +10,8 @@ import { PieChartProps } from '../../../../props';
|
|
|
10
10
|
*
|
|
11
11
|
* <iframe
|
|
12
12
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fpie-chart&mode=docs'
|
|
13
|
-
* width=800
|
|
14
|
-
* height=870
|
|
13
|
+
* width='800'
|
|
14
|
+
* height='870'
|
|
15
15
|
* style='border:none;'
|
|
16
16
|
* />
|
|
17
17
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/sorting-utils.d.ts
CHANGED
|
@@ -9,4 +9,8 @@ export type PivotSortCriteria = {
|
|
|
9
9
|
rows: PivotRowsSortCriteria[];
|
|
10
10
|
};
|
|
11
11
|
export declare function normalizePivotSort(sortType: SortDirection | PivotRowsSort): PivotRowsSort;
|
|
12
|
+
/**
|
|
13
|
+
* Type guard for the complex pivot sort shape (as opposed to a bare `SortDirection` string).
|
|
14
|
+
*/
|
|
15
|
+
export declare function isPivotRowsSort(sort: unknown): sort is PivotRowsSort;
|
|
12
16
|
export declare function preparePivotRowsSortCriteriaList({ type, settings, sortDetails }: SortingSettingsChangePayload, dataOptionsInternal: PivotTableDataOptionsInternal): PivotRowsSortCriteria[];
|
|
@@ -15,8 +15,8 @@ import { ScatterChartProps } from '../../../props';
|
|
|
15
15
|
*
|
|
16
16
|
* <iframe
|
|
17
17
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fscatter-chart&mode=docs'
|
|
18
|
-
* width=800
|
|
19
|
-
* height=870
|
|
18
|
+
* width='800'
|
|
19
|
+
* height='870'
|
|
20
20
|
* style='border:none;'
|
|
21
21
|
* />
|
|
22
22
|
*
|
|
@@ -9,8 +9,8 @@ import { ScattermapChartProps } from '../../../props';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fmap-scatter&mode=docs'
|
|
12
|
-
* width=1000
|
|
13
|
-
* height=900
|
|
12
|
+
* width='1000'
|
|
13
|
+
* height='900'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
|
@@ -11,8 +11,8 @@ import { SunburstChartProps } from '../../../../props';
|
|
|
11
11
|
*
|
|
12
12
|
* <iframe
|
|
13
13
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fsunburst-chart&mode=docs'
|
|
14
|
-
* width=800
|
|
15
|
-
* height=870
|
|
14
|
+
* width='800'
|
|
15
|
+
* height='870'
|
|
16
16
|
* style='border:none;'
|
|
17
17
|
* />
|
|
18
18
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/table/hooks/use-table-data.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Attribute, Data, DataSource, Filter, FilterRelationsJaql, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { TableDataOptionsInternal } from '../../../core/chart-data-options/types';
|
|
3
|
+
import { DataColumnNamesMapping } from '../../../core/chart-data-options/validate-data-options';
|
|
3
4
|
type UseDataProps = {
|
|
4
5
|
dataSet: Data | DataSource | undefined;
|
|
5
6
|
dataOptions: TableDataOptionsInternal | null;
|
|
7
|
+
dataColumnNamesMapping: DataColumnNamesMapping;
|
|
6
8
|
filters: Filter[] | undefined;
|
|
7
9
|
filterRelations: FilterRelationsJaql | undefined;
|
|
8
10
|
count: number;
|
|
@@ -12,5 +14,5 @@ export declare const getTableAttributesAndMeasures: (dataOptions: TableDataOptio
|
|
|
12
14
|
attributes: Attribute[];
|
|
13
15
|
measures: Measure[];
|
|
14
16
|
};
|
|
15
|
-
export declare const useTableData: ({ dataSet, dataOptions: originalDataOptions, filters, filterRelations, count, offset, }: UseDataProps) => [Data | null, TableDataOptionsInternal | null];
|
|
17
|
+
export declare const useTableData: ({ dataSet, dataOptions: originalDataOptions, dataColumnNamesMapping: originalDataColumnNamesMapping, filters, filterRelations, count, offset, }: UseDataProps) => [Data | null, TableDataOptionsInternal | null, DataColumnNamesMapping];
|
|
16
18
|
export {};
|
|
@@ -9,8 +9,8 @@ import { TableProps } from '../../../../props';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=tables%2Faggregated-table&mode=docs'
|
|
12
|
-
* width=800
|
|
13
|
-
* height=870
|
|
12
|
+
* width='800'
|
|
13
|
+
* height='870'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ import { TreemapChartProps } from '../../../../props';
|
|
|
11
11
|
*
|
|
12
12
|
* <iframe
|
|
13
13
|
* src='https://csdk-playground.sisense.com/?example=charts%2Ftreemap-chart&mode=docs'
|
|
14
|
-
* width=800
|
|
15
|
-
* height=870
|
|
14
|
+
* width='800'
|
|
15
|
+
* height='870'
|
|
16
16
|
* style='border:none;'
|
|
17
17
|
* />
|
|
18
18
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Attribute, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartType } from '../../../../types';
|
|
3
3
|
import { CategoricalChartDataOptions, CategoricalChartDataOptionsInternal, ChartDataOptions, ChartDataOptionsInternal, PivotTableDataOptions, PivotTableDataOptionsInternal, StyledColumn, StyledMeasureColumn, TableDataOptions, TableDataOptionsInternal } from './types';
|
|
4
|
+
import { DataColumnNamesMapping } from './validate-data-options';
|
|
4
5
|
export declare function translateChartDataOptions(chartType: ChartType, dataOptions: ChartDataOptions): ChartDataOptionsInternal;
|
|
5
6
|
export declare const translateCategoricalChartDataOptions: (categorical: CategoricalChartDataOptions) => CategoricalChartDataOptionsInternal;
|
|
6
7
|
/**
|
|
@@ -18,6 +19,18 @@ export declare function getStyledMeasureColumns(dataOptions: ChartDataOptionsInt
|
|
|
18
19
|
export declare function getAttributes(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Attribute[];
|
|
19
20
|
export declare function getMeasures(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Measure[];
|
|
20
21
|
export declare function translateTableDataOptions(dataOptions: TableDataOptions): TableDataOptionsInternal;
|
|
22
|
+
/**
|
|
23
|
+
* Returns a shallow copy of the table data options whose measure columns carry
|
|
24
|
+
* unique alias names, paired with the unique-name -> original-name mapping.
|
|
25
|
+
*
|
|
26
|
+
* Pure: neither the input data options nor the user's measure refs are
|
|
27
|
+
* mutated. Each renamed column wraps a fresh measure clone whose prototype is
|
|
28
|
+
* the original measure (so methods like `jaql()` keep working).
|
|
29
|
+
*/
|
|
30
|
+
export declare function withUniqueMeasureNames(dataOptions: TableDataOptionsInternal): {
|
|
31
|
+
dataOptions: TableDataOptionsInternal;
|
|
32
|
+
mapping: DataColumnNamesMapping;
|
|
33
|
+
};
|
|
21
34
|
/**
|
|
22
35
|
* Translates pivot table data options to the internal structure.
|
|
23
36
|
*/
|
|
@@ -652,12 +652,12 @@ export type IndicatorChartDataOptionsInternal = {
|
|
|
652
652
|
/** @internal */
|
|
653
653
|
export interface BoxplotChartDataOptionsInternal {
|
|
654
654
|
category?: StyledColumn;
|
|
655
|
-
boxMin
|
|
656
|
-
boxMedian
|
|
657
|
-
boxMax
|
|
658
|
-
whiskerMin
|
|
659
|
-
whiskerMax
|
|
660
|
-
outliersCount
|
|
655
|
+
boxMin?: StyledMeasureColumn;
|
|
656
|
+
boxMedian?: StyledMeasureColumn;
|
|
657
|
+
boxMax?: StyledMeasureColumn;
|
|
658
|
+
whiskerMin?: StyledMeasureColumn;
|
|
659
|
+
whiskerMax?: StyledMeasureColumn;
|
|
660
|
+
outliersCount?: StyledMeasureColumn;
|
|
661
661
|
outliers?: StyledColumn;
|
|
662
662
|
valueTitle: string;
|
|
663
663
|
}
|
|
@@ -10,6 +10,15 @@ export type DataColumnNamesMapping = Record<string, string>;
|
|
|
10
10
|
* @returns - The mapping of unique names to original names.
|
|
11
11
|
*/
|
|
12
12
|
export declare const generateUniqueDataColumnsNames: (measures: Measure[]) => DataColumnNamesMapping;
|
|
13
|
+
/**
|
|
14
|
+
* Pure variant of {@link generateUniqueDataColumnsNames}: returns a fresh array of
|
|
15
|
+
* measure clones whose `name` is the unique alias, alongside the mapping. The
|
|
16
|
+
* input measures are not mutated.
|
|
17
|
+
*/
|
|
18
|
+
export declare const applyUniqueDataColumnsNames: (measures: Measure[]) => {
|
|
19
|
+
measures: Measure[];
|
|
20
|
+
mapping: DataColumnNamesMapping;
|
|
21
|
+
};
|
|
13
22
|
/**
|
|
14
23
|
* Applies default chart data options based on input chart type.
|
|
15
24
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Highcharts from '@sisense/sisense-charts';
|
|
2
2
|
import type { SeriesLegendItemClickCallbackFunction } from '@sisense/sisense-charts';
|
|
3
|
-
import { ChartDataOptionsInternal } from '
|
|
4
|
-
import { HighchartsPointerEvent, HighchartsSelectEvent } from '../../../../types';
|
|
3
|
+
import { ChartDataOptionsInternal } from '../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
4
|
+
import { HighchartsPointerEvent, HighchartsSelectEvent } from '../../../../types.js';
|
|
5
5
|
import { SisenseChartDataPointEventHandler, SisenseChartDataPointsEventHandler } from '../../components/chart/components/sisense-chart/types';
|
|
6
6
|
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
7
7
|
type HighchartsChartWithCustomProperties = Highcharts.Chart & {
|
|
@@ -62,6 +62,11 @@ export interface YAxisSettingsResult {
|
|
|
62
62
|
* @returns true if continuous datetime X-axis should be used
|
|
63
63
|
*/
|
|
64
64
|
export declare const isContinuousDatetimeXAxis: (xDataOptions: CartesianChartDataOptionsInternal['x']) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Returns true when every X-axis dimension is a datetime column.
|
|
67
|
+
* Used to decide whether multi-granularity date charts can still show the navigator.
|
|
68
|
+
*/
|
|
69
|
+
export declare const areAllDatetimeXAxes: (xDataOptions: CartesianChartDataOptionsInternal['x']) => boolean;
|
|
65
70
|
/**
|
|
66
71
|
* Builds Y-axis metadata from chart data and options
|
|
67
72
|
*
|
|
@@ -87,7 +92,7 @@ export declare const getXAxisOrientation: (chartType: ChartType, yAxisChartTypes
|
|
|
87
92
|
* @param isContinuous - Whether X-axis is continuous
|
|
88
93
|
* @returns Categories metadata object
|
|
89
94
|
*/
|
|
90
|
-
export declare const buildCategoriesMeta: (chartData: CartesianChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: ChartDesignOptions, isContinuous: boolean) => CategoriesMeta;
|
|
95
|
+
export declare const buildCategoriesMeta: (chartData: CartesianChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: ChartDesignOptions, isContinuous: boolean, dateFormatter?: ((date: Date, format: string) => string) | undefined) => CategoriesMeta;
|
|
91
96
|
/**
|
|
92
97
|
* Builds X-axis settings based on whether it's continuous datetime or categorical
|
|
93
98
|
*
|
|
@@ -32,43 +32,7 @@ interface SeriesProcessingConfig {
|
|
|
32
32
|
/**
|
|
33
33
|
* Process and format series data for the chart
|
|
34
34
|
*/
|
|
35
|
-
export declare function processSeries(config: SeriesProcessingConfig):
|
|
36
|
-
borderRadius?: string | number | undefined;
|
|
37
|
-
groupPadding?: number | undefined;
|
|
38
|
-
pointPadding?: number | undefined;
|
|
39
|
-
shadow?: boolean | undefined;
|
|
40
|
-
linecap?: string | undefined;
|
|
41
|
-
dashStyle?: import("../../../../../../types").DashStyle | undefined;
|
|
42
|
-
lineWidth?: number | undefined;
|
|
43
|
-
dataLabels: {
|
|
44
|
-
formatter: (this: import("../../tooltip").HighchartsDataPointContext) => string;
|
|
45
|
-
enabled: boolean;
|
|
46
|
-
rotation?: number | undefined;
|
|
47
|
-
inside?: boolean | undefined;
|
|
48
|
-
align?: "left" | "center" | "right" | undefined;
|
|
49
|
-
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
50
|
-
style?: import("../../translations/types").TextStyle | undefined;
|
|
51
|
-
backgroundColor?: string | import("../../../../../..").HighchartsGradientColorObject | undefined;
|
|
52
|
-
borderColor?: string | import("../../../../../..").HighchartsGradientColorObject | undefined;
|
|
53
|
-
borderRadius?: number | undefined;
|
|
54
|
-
borderWidth?: number | undefined;
|
|
55
|
-
padding?: number | undefined;
|
|
56
|
-
x?: number | undefined;
|
|
57
|
-
y?: number | undefined;
|
|
58
|
-
};
|
|
59
|
-
connectNulls: boolean;
|
|
60
|
-
marker: import("../../translations/marker-section").MarkerSettings;
|
|
61
|
-
type?: string | undefined;
|
|
62
|
-
showInNavigator: boolean;
|
|
63
|
-
stickyTracking: boolean;
|
|
64
|
-
boostThreshold: number;
|
|
65
|
-
turboThreshold: number;
|
|
66
|
-
color: string | undefined;
|
|
67
|
-
yAxis: number;
|
|
68
|
-
name: string;
|
|
69
|
-
data: import("../../translations/translations-to-highcharts").SeriesPointStructure[];
|
|
70
|
-
levels?: any;
|
|
71
|
-
}[];
|
|
35
|
+
export declare function processSeries(config: SeriesProcessingConfig): any[];
|
|
72
36
|
/**
|
|
73
37
|
* Apply additional series configuration based on chart type
|
|
74
38
|
*/
|
|
@@ -16,7 +16,7 @@ import { DataLabelsSettings } from './translations/value-label-section';
|
|
|
16
16
|
/**
|
|
17
17
|
* Highcharts options
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
19
|
+
* @alpha
|
|
20
20
|
*/
|
|
21
21
|
export type HighchartsOptions = Pick<Options, keyof Options>;
|
|
22
22
|
/**
|
|
@@ -63,6 +63,7 @@ export type SeriesType = HighchartsSeriesValues & {
|
|
|
63
63
|
legendIndex?: number;
|
|
64
64
|
dashStyle?: string;
|
|
65
65
|
lineWidth?: number;
|
|
66
|
+
step?: boolean | 'left' | 'center' | 'right';
|
|
66
67
|
zIndex?: number;
|
|
67
68
|
keys?: string[];
|
|
68
69
|
nullColor?: string;
|
|
@@ -119,6 +120,7 @@ export type PlotOptions = {
|
|
|
119
120
|
softThreshold?: boolean;
|
|
120
121
|
fillOpacity?: number;
|
|
121
122
|
connectNulls?: boolean;
|
|
123
|
+
step?: boolean | 'left' | 'center' | 'right';
|
|
122
124
|
animation?: {
|
|
123
125
|
duration?: number;
|
|
124
126
|
};
|
package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const applyNumberFormatToPlotBands: (dataOptions: ChartDataOption
|
|
|
18
18
|
* @param dataOptions -
|
|
19
19
|
* @param designOptions -
|
|
20
20
|
* @param continuousDatetimeXAxis -
|
|
21
|
+
* @param dateFormatter - When set, formats datetime x1/x2 labels from raw values (dual categorical axes)
|
|
21
22
|
*/
|
|
22
|
-
export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: DesignOptions, continuousDatetimeXAxis: boolean) => CategoryIndexMapPlotBands;
|
|
23
|
+
export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: DesignOptions, continuousDatetimeXAxis: boolean, dateFormatter?: ((date: Date, format: string) => string) | undefined) => CategoryIndexMapPlotBands;
|
|
23
24
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HighchartsGradientColorObject } from '../../../../shared/utils/gradient';
|
|
2
|
-
import { SeriesLabels, TextStyle } from '
|
|
2
|
+
import { SeriesLabels, TextStyle } from '../../../../types.js';
|
|
3
3
|
type DataLabelsOptions = {
|
|
4
4
|
enabled: boolean;
|
|
5
5
|
rotation?: number;
|
|
@@ -23,6 +23,14 @@ export interface AxisLabelsFormatterContextObject {
|
|
|
23
23
|
categories: (string | number)[];
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Subset of the Highcharts axis `afterSetExtremes` event payload used for navigator scroll persistence.
|
|
28
|
+
*/
|
|
29
|
+
export type NavigatorAxisSetExtremesEvent = {
|
|
30
|
+
min: number;
|
|
31
|
+
max: number;
|
|
32
|
+
trigger?: string;
|
|
33
|
+
};
|
|
26
34
|
export type AxisSettings = {
|
|
27
35
|
type?: 'linear' | 'logarithmic';
|
|
28
36
|
title?: {
|
|
@@ -74,6 +82,9 @@ export type AxisSettings = {
|
|
|
74
82
|
description?: string;
|
|
75
83
|
rangeDescription?: string;
|
|
76
84
|
};
|
|
85
|
+
events?: {
|
|
86
|
+
afterSetExtremes?: (e: NavigatorAxisSetExtremesEvent) => void;
|
|
87
|
+
};
|
|
77
88
|
};
|
|
78
89
|
export type StackLabel = {
|
|
79
90
|
style?: TextStyle;
|
|
@@ -118,4 +129,21 @@ export type AxisPlotBand = {
|
|
|
118
129
|
};
|
|
119
130
|
};
|
|
120
131
|
export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
|
|
121
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Merges a navigator scroll callback into the primary X-axis `afterSetExtremes` handler.
|
|
134
|
+
* Preserves any existing `events` and prior `afterSetExtremes` implementation.
|
|
135
|
+
*
|
|
136
|
+
* @param axes - Axis settings (first entry is treated as the primary X-axis).
|
|
137
|
+
* @param onScrollerChange - Invoked only when extremes change due to the navigator scroller.
|
|
138
|
+
* @returns New axis settings array with the merged handler on the first axis.
|
|
139
|
+
*/
|
|
140
|
+
export declare const attachNavigatorScrollerToPrimaryXAxis: (axes: readonly AxisSettings[], onScrollerChange: (min: number, max: number) => void) => AxisSettings[];
|
|
141
|
+
/**
|
|
142
|
+
* Transformer that merges a navigator scroll callback into the primary X-axis `afterSetExtremes` handler.
|
|
143
|
+
* No-ops when no callback is provided.
|
|
144
|
+
*
|
|
145
|
+
* @param onScrollerChange - Optional callback invoked when the navigator scroller changes extremes.
|
|
146
|
+
* @returns Transformer function over an axis settings array.
|
|
147
|
+
*/
|
|
148
|
+
export declare const withScrollerEvent: (onScrollerChange?: ((min: number, max: number) => void) | undefined) => (axes: readonly AxisSettings[]) => AxisSettings[];
|
|
149
|
+
export declare const getDefaultDateFormat: (granularity?: string) => "yyyy" | "MM/yyyy" | "ww yyyy" | "HH:mm" | "HH:mm:ss" | "M/d/yy" | "HH" | "yyyy Q" | "M/d/yy HH" | undefined;
|
|
@@ -26,8 +26,8 @@ export declare function prepareSunburstLevels(chartData: CategoricalChartData, d
|
|
|
26
26
|
align?: "left" | "center" | "right" | undefined;
|
|
27
27
|
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
28
28
|
style?: import("../types").TextStyle | undefined;
|
|
29
|
-
backgroundColor?: string | import("
|
|
30
|
-
borderColor?: string | import("
|
|
29
|
+
backgroundColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
30
|
+
borderColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
31
31
|
borderRadius?: number | undefined;
|
|
32
32
|
borderWidth?: number | undefined;
|
|
33
33
|
padding?: number | undefined;
|
|
@@ -84,8 +84,8 @@ export declare function prepareSunburstSeries(chartData: CategoricalChartData, d
|
|
|
84
84
|
align?: "left" | "center" | "right" | undefined;
|
|
85
85
|
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
86
86
|
style?: import("../types").TextStyle | undefined;
|
|
87
|
-
backgroundColor?: string | import("
|
|
88
|
-
borderColor?: string | import("
|
|
87
|
+
backgroundColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
88
|
+
borderColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
89
89
|
borderRadius?: number | undefined;
|
|
90
90
|
borderWidth?: number | undefined;
|
|
91
91
|
padding?: number | undefined;
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
import type { FunctionCall } from '@sisense/sdk-data';
|
|
2
1
|
import type { QueryPillItem } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Structured tooltip model produced by {@link getQueryPillTooltipModel}.
|
|
4
|
+
*
|
|
5
|
+
* @sisenseInternal
|
|
6
|
+
*/
|
|
3
7
|
export type TooltipModel = {
|
|
4
8
|
layoutText: string;
|
|
5
9
|
typeLabel: 'Measure' | 'Dimension' | 'Filter';
|
|
10
|
+
/** Resolved field path or display fallback; may duplicate {@link TooltipModel.formula}. */
|
|
6
11
|
column: string;
|
|
7
12
|
formula: string;
|
|
13
|
+
/** When false, the UI omits the "Column:" row (empty/`-` or same as the pill display name). */
|
|
14
|
+
showColumnInTooltip: boolean;
|
|
15
|
+
/** When false, the UI omits the "Formula:" row (identical to Column, e.g. plain DM dimensions). */
|
|
16
|
+
showFormulaInTooltip: boolean;
|
|
8
17
|
};
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Strips `measureFactory.`, `filterFactory.`, and `DM.` from compose code for tooltip display.
|
|
20
|
+
* Preserves the rest of the string (including quoted literals). Rare titles containing `DM.`
|
|
21
|
+
* inside quotes may be altered.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function simplifyComposeCodeForTooltip(composeCode: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Builds the structured tooltip model rendered by {@link QueryPill} from a {@link QueryPillItem}.
|
|
28
|
+
* Returns `null` when the item has no tooltip-eligible data (e.g. operator pills or pills without `tooltipData`).
|
|
29
|
+
*
|
|
30
|
+
* @sisenseInternal
|
|
31
|
+
*/
|
|
12
32
|
export declare function getQueryPillTooltipModel(item: QueryPillItem): TooltipModel | null;
|
|
@@ -2,5 +2,8 @@ export { QueryDefinition } from './query-definition';
|
|
|
2
2
|
export type { QueryDefinitionProps } from './query-definition';
|
|
3
3
|
export { QueryPill } from './query-pill';
|
|
4
4
|
export type { QueryPillProps } from './query-pill';
|
|
5
|
+
export { baseQueryParamsToViewModel } from './query-params-to-view-model';
|
|
6
|
+
export { getQueryPillTooltipModel } from './compose-code-to-readable';
|
|
7
|
+
export type { TooltipModel } from './compose-code-to-readable';
|
|
5
8
|
export type { QueryPillCategory, QueryPillItem, ConnectorItem, QueryDefinitionViewModel, } from './types';
|
|
6
9
|
export { isConnectorItem, isPillItem } from './types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared typography for the query-definition row, pill labels, and tooltip body.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const QUERY_DEFINITION_TEXT_STYLE: {
|
|
7
|
+
readonly fontSize: "13px";
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Pill label line height matches design spec on top of {@link QUERY_DEFINITION_TEXT_STYLE}.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const QUERY_PILL_LABEL_STYLE: {
|
|
15
|
+
readonly lineHeight: "17px";
|
|
16
|
+
readonly fontSize: "13px";
|
|
17
|
+
};
|
package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FunctionComponent } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ExecuteQueryParams } from '../../../../domains/query-execution/types';
|
|
3
3
|
import type { ChartProps } from '../../../../props';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the QueryDefinition component.
|
|
@@ -7,8 +7,8 @@ import type { ChartProps } from '../../../../props';
|
|
|
7
7
|
* @sisenseInternal
|
|
8
8
|
*/
|
|
9
9
|
export interface QueryDefinitionProps {
|
|
10
|
-
/** Either chart props (uses getTranslatedDataOptions internally) or
|
|
11
|
-
query:
|
|
10
|
+
/** Either chart props (uses getTranslatedDataOptions internally) or query params (same shape as {@link useExecuteQuery}) */
|
|
11
|
+
query: ExecuteQueryParams | ChartProps;
|
|
12
12
|
/** When true (default), pills show JSON tooltip on hover. */
|
|
13
13
|
showTooltip?: boolean;
|
|
14
14
|
/**
|
|
@@ -1,12 +1,16 @@
|
|
|
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
|
/**
|
|
4
5
|
* Builds the query definition view model from base query params.
|
|
5
6
|
* Order: Measures → "by" → Dimensions → "for"/"where" → Filters.
|
|
6
|
-
* Operators (comparison/sort) are not derived from
|
|
7
|
+
* Operators (comparison/sort) are not derived from base query fields in v1.
|
|
7
8
|
*
|
|
8
|
-
* @param params -
|
|
9
|
+
* @param params - Base query fields from chart or query; accepts {@link ExecuteQueryParams} (execution-only fields are ignored).
|
|
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
|
-
* @
|
|
14
|
+
* @sisenseInternal
|
|
11
15
|
*/
|
|
12
|
-
export declare function baseQueryParamsToViewModel(params: BaseQueryParams): QueryDefinitionViewModel;
|
|
16
|
+
export declare function baseQueryParamsToViewModel(params: BaseQueryParams, t?: TFunction): QueryDefinitionViewModel;
|
package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts
CHANGED
|
@@ -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
|
-
* @
|
|
16
|
+
* @sisenseInternal
|
|
12
17
|
*/
|
|
13
18
|
export declare const QueryPill: FunctionComponent<QueryPillProps>;
|
|
@@ -7,7 +7,6 @@ type UseWithPivotTableWidgetDrilldownParams = {
|
|
|
7
7
|
};
|
|
8
8
|
type UseWithPivotTableWidgetDrilldownResult = {
|
|
9
9
|
propsWithDrilldown: PivotTableWidgetProps;
|
|
10
|
-
isDrilldownEnabled: boolean;
|
|
11
10
|
breadcrumbs: JSX.Element;
|
|
12
11
|
};
|
|
13
12
|
export declare function useWithPivotTableWidgetDrilldown(params: UseWithPivotTableWidgetDrilldownParams): UseWithPivotTableWidgetDrilldownResult;
|
|
@@ -10,11 +10,6 @@ import { DataOptionLocation, DrilldownSelection } from '../../../../types';
|
|
|
10
10
|
* @returns The initial dimension location.
|
|
11
11
|
*/
|
|
12
12
|
export declare function getInitialDimensionLocation(dataOptions: PivotTableDataOptions, drilldownTarget: Attribute | DataOptionLocation, drilldownSelections: DrilldownSelection[]): DataOptionLocation | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Checks if drilldown is applicable to a pivot table.
|
|
15
|
-
* Drilldown requires the pivot table to have at least one selectable attribute (row or column dimension).
|
|
16
|
-
*/
|
|
17
|
-
export declare function isDrilldownApplicableToPivot(dataOptions: PivotTableDataOptions): boolean;
|
|
18
13
|
/**
|
|
19
14
|
* Applies a drilldown dimension to pivot table data options.
|
|
20
15
|
* Replaces the target dimension (first row or column that doesn't match the drilldown dimension).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WidgetStyle } from '../types.js';
|
|
2
|
+
import type { UnsupportedStyleOptions } from './extract-unsupported-style-options.js';
|
|
3
|
+
/**
|
|
4
|
+
* Layers `partialStyle` (the unsupported style fields snapshot from the original
|
|
5
|
+
* Fusion DTO, see {@link extractUnsupportedStyleOptions}) underneath the freshly
|
|
6
|
+
* `rebuiltStyle` produced by `to*WidgetStyle`.
|
|
7
|
+
*
|
|
8
|
+
* Priority (highest to lowest):
|
|
9
|
+
* 1. `rebuiltStyle` — values produced by the SDK → DTO translation.
|
|
10
|
+
* 2. `partialStyle` — values plucked from the original DTO.
|
|
11
|
+
*
|
|
12
|
+
* Implemented with `lodash-es/merge`, which performs a deep merge and skips
|
|
13
|
+
* `undefined` source values, so any field the rebuild does emit takes precedence
|
|
14
|
+
* while gap fields the rebuild leaves untouched are filled in from `partialStyle`.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyPartialDtoStyle<T extends WidgetStyle>(rebuiltStyle: T, partialStyle?: UnsupportedStyleOptions): T;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WidgetDto, WidgetStyle } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Loose record of unsupported style fields preserved from the original
|
|
4
|
+
* Fusion DTO. Returned by {@link extractUnsupportedStyleOptions}.
|
|
5
|
+
*
|
|
6
|
+
* Typed as `Record<string, unknown>` because the keys and shapes go beyond
|
|
7
|
+
* what `WidgetStyle` declares — e.g. `'center/value'` on sunburst, or
|
|
8
|
+
* `'borders/grid'` on table widgets. Stored on
|
|
9
|
+
* `SpecificWidgetOptions.partialDtoOptions.style` and re-attached when
|
|
10
|
+
* serializing back to a DTO via `applyPartialDtoStyle` so values survive
|
|
11
|
+
* Fusion → CSDK → Fusion round-trips.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export type UnsupportedStyleOptions = Record<string, unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Extracts the style fields that the CSDK widget model does not currently
|
|
18
|
+
* translate to first-class `WidgetStyleOptions` for the given widget type.
|
|
19
|
+
*
|
|
20
|
+
* The result is stored on `SpecificWidgetOptions.partialDtoOptions.style` and
|
|
21
|
+
* re-attached during CSDK → Fusion serialization (see `applyPartialDtoStyle`).
|
|
22
|
+
* Returns an empty object for widget types that have no known unsupported
|
|
23
|
+
* style fields, or for unknown / plugin types whose raw style is opaque to
|
|
24
|
+
* the CSDK.
|
|
25
|
+
*
|
|
26
|
+
* @param widgetType - Fusion widget type from `WidgetDto.type`
|
|
27
|
+
* @param style - Raw `WidgetDto.style` from the server
|
|
28
|
+
* @returns A partial style containing only known-unsupported fields
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function extractUnsupportedStyleOptions(widgetType: WidgetDto['type'], style: WidgetStyle | undefined): UnsupportedStyleOptions;
|