@sisense/sdk-ui 2.12.0 → 2.14.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 +19 -19
- package/dist/ai.js +623 -613
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +252 -217
- package/dist/analytics-composer.cjs +18 -18
- package/dist/analytics-composer.js +18 -9
- package/dist/{derive-chart-family-mugR7Ty1.cjs → derive-chart-family-DJUpWKOP.cjs} +69 -64
- package/dist/{derive-chart-family-YIDiS_iY.js → derive-chart-family-D_bylSQy.js} +8340 -8069
- package/dist/{dimensions-DmRfLrT-.js → dimensions-CTUJhW-M.js} +1 -1
- package/dist/{dimensions-CyzZ0dbM.cjs → dimensions-CdNGgk9I.cjs} +1 -1
- package/dist/execute-query-CNt566O5.cjs +1 -0
- package/dist/{execute-query-BCEeyd9s.js → execute-query-DyjkDYHG.js} +1494 -1431
- package/dist/index.cjs +24 -24
- package/dist/index.js +7449 -7168
- package/dist/index.umd.js +351 -349
- package/dist/packages/sdk-ui/src/ai/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +22 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +3 -2
- package/dist/packages/sdk-ui/src/app/settings/settings.d.ts +49 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/constants.d.ts +12 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/index.d.ts +25 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/continuous-axes-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/helpers.d.ts +24 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/split-axes-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/chart-options.d.ts +9 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/index.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/calendar-data-generator.d.ts +12 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/series-options.d.ts +9 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap-charts-grid.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-helpers.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-per-chart-instance.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/sizing-helpers.d.ts +16 -3
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/view-helpers.d.ts +4 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-chart-options.d.ts +7 -6
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/utils/calendar-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/funnel-chart/design-options/index.d.ts +14 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/design-options/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/treemap-chart/design-options/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +12 -15
- package/dist/packages/sdk-ui/src/chart-options-processor/series-labels.d.ts +17 -17
- package/dist/packages/sdk-ui/src/chart-options-processor/stack-labels.d.ts +18 -22
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +7 -6
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/funnel-plot-options.d.ts +12 -17
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-plot-options.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-labels.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/common/components/menu/context-menu/context-menu.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/helpers.d.ts +11 -0
- package/dist/packages/sdk-ui/src/dashboard/components/toolbar/edit-toggle.d.ts +25 -0
- package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +0 -30
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +3 -2
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-tabber.d.ts +25 -10
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +83 -11
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -1
- package/dist/packages/sdk-ui/src/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +15 -3
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -10
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +5 -5
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/tabber.d.ts +21 -0
- package/dist/packages/sdk-ui/src/models/widget/{widget-model-translator.d.ts → widget-model-translator/widget-model-translator.d.ts} +15 -15
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +6 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +7 -1
- package/dist/packages/sdk-ui/src/props.d.ts +8 -20
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +2 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/types.d.ts +157 -107
- package/dist/packages/sdk-ui/src/utils/gradient.d.ts +396 -0
- package/dist/packages/sdk-ui/src/utils/omit-undefined.d.ts +21 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/tabber.d.ts +23 -0
- package/dist/packages/sdk-ui/src/widget-by-id/{translate-widget-style-options.d.ts → translate-widget-style-options/translate-widget-style-options.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +38 -3
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +30 -2
- package/dist/packages/sdk-ui/src/widgets/tabber/tabber-buttons-widget.d.ts +8 -0
- package/dist/packages/sdk-ui/src/widgets/tabber/types.d.ts +110 -0
- package/dist/{types-CevYjGN4.cjs → types-D1qM-ltg.cjs} +1 -1
- package/dist/{types-DVAfvbpR.js → types-DglXXR-Q.js} +1 -1
- package/dist/{use-common-filters-DIF4c8WP.js → use-common-filters-BGrn7zoW.js} +22269 -21424
- package/dist/use-common-filters-DxzCHhgF.cjs +846 -0
- package/dist/{widget-composer-C0lZpwN6.cjs → widget-composer-C24YJEek.cjs} +6 -10
- package/dist/{widget-composer-BB5Jrgae.js → widget-composer-lBv40CFf.js} +132 -135
- package/package.json +7 -7
- package/dist/execute-query-Xt9drS3G.cjs +0 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/highcharts-options-builder.d.ts +0 -8
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options.d.ts +0 -12
- package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +0 -41
- package/dist/use-common-filters-BXdnB4GI.cjs +0 -845
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A position value for gradient stops, ranging from 0 (start) to 1 (end).
|
|
3
|
+
*/
|
|
4
|
+
export type GradientPosition = number;
|
|
5
|
+
/**
|
|
6
|
+
* A color value that can be a CSS color string, hex value, or rgba/hsla string.
|
|
7
|
+
*/
|
|
8
|
+
export type ColorValue = string;
|
|
9
|
+
/**
|
|
10
|
+
* A gradient stop defining a color at a specific position in the gradient.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const stop: GradientStop = {
|
|
15
|
+
* position: 0.5,
|
|
16
|
+
* color: '#ffffff'
|
|
17
|
+
* };
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export interface GradientStop {
|
|
21
|
+
/**
|
|
22
|
+
* Position in the gradient where 0 is the start and 1 is the end.
|
|
23
|
+
* Must be between 0 and 1 inclusive.
|
|
24
|
+
*/
|
|
25
|
+
position: GradientPosition;
|
|
26
|
+
/**
|
|
27
|
+
* Color at this position. Can be any valid CSS color value.
|
|
28
|
+
*/
|
|
29
|
+
color: ColorValue;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Linear gradient direction configuration.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const direction: LinearGradientDirection = {
|
|
37
|
+
* x1: 0, y1: 0, // Start point (top-left)
|
|
38
|
+
* x2: 0, y2: 1 // End point (bottom-left)
|
|
39
|
+
* };
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export interface LinearGradientDirection {
|
|
43
|
+
/**
|
|
44
|
+
* X coordinate of the start point (0-1)
|
|
45
|
+
*/
|
|
46
|
+
x1: number;
|
|
47
|
+
/**
|
|
48
|
+
* Y coordinate of the start point (0-1)
|
|
49
|
+
*/
|
|
50
|
+
y1: number;
|
|
51
|
+
/**
|
|
52
|
+
* X coordinate of the end point (0-1)
|
|
53
|
+
*/
|
|
54
|
+
x2: number;
|
|
55
|
+
/**
|
|
56
|
+
* Y coordinate of the end point (0-1)
|
|
57
|
+
*/
|
|
58
|
+
y2: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Radial gradient configuration.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const radial: RadialGradientConfig = {
|
|
66
|
+
* centerX: 0.5,
|
|
67
|
+
* centerY: 0.5,
|
|
68
|
+
* radius: 0.8
|
|
69
|
+
* };
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export interface RadialGradientConfig {
|
|
73
|
+
/**
|
|
74
|
+
* X coordinate of the center point (0-1)
|
|
75
|
+
*/
|
|
76
|
+
centerX: number;
|
|
77
|
+
/**
|
|
78
|
+
* Y coordinate of the center point (0-1)
|
|
79
|
+
*/
|
|
80
|
+
centerY: number;
|
|
81
|
+
/**
|
|
82
|
+
* Radius of the gradient (0-1)
|
|
83
|
+
*/
|
|
84
|
+
radius: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Linear gradient color configuration.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const linearGradient: LinearGradientColor = {
|
|
92
|
+
* type: 'linear',
|
|
93
|
+
* direction: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
94
|
+
* stops: [
|
|
95
|
+
* { position: 0, color: '#003399' },
|
|
96
|
+
* { position: 0.5, color: '#ffffff' },
|
|
97
|
+
* { position: 1, color: '#3366AA' }
|
|
98
|
+
* ]
|
|
99
|
+
* };
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export interface LinearGradientColor {
|
|
103
|
+
/**
|
|
104
|
+
* Type discriminator for linear gradients
|
|
105
|
+
*/
|
|
106
|
+
type: 'linear';
|
|
107
|
+
/**
|
|
108
|
+
* Direction of the linear gradient
|
|
109
|
+
*/
|
|
110
|
+
direction: LinearGradientDirection;
|
|
111
|
+
/**
|
|
112
|
+
* Color stops along the gradient
|
|
113
|
+
*/
|
|
114
|
+
stops: readonly GradientStop[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Radial gradient color configuration.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const radialGradient: RadialGradientColor = {
|
|
122
|
+
* type: 'radial',
|
|
123
|
+
* center: { centerX: 0.5, centerY: 0.5, radius: 0.8 },
|
|
124
|
+
* stops: [
|
|
125
|
+
* { position: 0, color: '#ff0000' },
|
|
126
|
+
* { position: 1, color: '#0000ff' }
|
|
127
|
+
* ]
|
|
128
|
+
* };
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export interface RadialGradientColor {
|
|
132
|
+
/**
|
|
133
|
+
* Type discriminator for radial gradients
|
|
134
|
+
*/
|
|
135
|
+
type: 'radial';
|
|
136
|
+
/**
|
|
137
|
+
* Center and radius configuration
|
|
138
|
+
*/
|
|
139
|
+
center: RadialGradientConfig;
|
|
140
|
+
/**
|
|
141
|
+
* Color stops along the gradient
|
|
142
|
+
*/
|
|
143
|
+
stops: readonly GradientStop[];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Enhanced gradient color options that provide better type safety and developer experience.
|
|
147
|
+
*
|
|
148
|
+
* This is a discriminated union that allows for either linear or radial gradients,
|
|
149
|
+
* with comprehensive type checking and better IntelliSense support.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```ts
|
|
153
|
+
* // Linear gradient example
|
|
154
|
+
* const linearGradient: GradientColor = {
|
|
155
|
+
* type: 'linear',
|
|
156
|
+
* direction: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
157
|
+
* stops: [
|
|
158
|
+
* { position: 0, color: '#003399' },
|
|
159
|
+
* { position: 0.5, color: '#ffffff' },
|
|
160
|
+
* { position: 1, color: '#3366AA' }
|
|
161
|
+
* ]
|
|
162
|
+
* };
|
|
163
|
+
*
|
|
164
|
+
* // Radial gradient example
|
|
165
|
+
* const radialGradient: GradientColor = {
|
|
166
|
+
* type: 'radial',
|
|
167
|
+
* center: { centerX: 0.5, centerY: 0.5, radius: 0.8 },
|
|
168
|
+
* stops: [
|
|
169
|
+
* { position: 0, color: '#ff0000' },
|
|
170
|
+
* { position: 1, color: '#0000ff' }
|
|
171
|
+
* ]
|
|
172
|
+
* };
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
export type GradientColor = LinearGradientColor | RadialGradientColor;
|
|
176
|
+
/**
|
|
177
|
+
* Utility type to check if a value is a linear gradient.
|
|
178
|
+
*
|
|
179
|
+
* @param value - The value to check
|
|
180
|
+
* @returns True if the value is a linear gradient
|
|
181
|
+
*/
|
|
182
|
+
export declare const isLinearGradient: (value: any) => value is LinearGradientColor;
|
|
183
|
+
/**
|
|
184
|
+
* Utility type to check if a value is a radial gradient.
|
|
185
|
+
*
|
|
186
|
+
* @param value - The value to check
|
|
187
|
+
* @returns True if the value is a radial gradient
|
|
188
|
+
*/
|
|
189
|
+
export declare const isRadialGradient: (value: any) => value is RadialGradientColor;
|
|
190
|
+
/**
|
|
191
|
+
* Utility type to check if a value is any gradient.
|
|
192
|
+
*
|
|
193
|
+
* @param value - The value to check
|
|
194
|
+
* @returns True if the value is a gradient
|
|
195
|
+
*/
|
|
196
|
+
export declare const isGradient: (value: any) => value is GradientColor;
|
|
197
|
+
/**
|
|
198
|
+
* Common gradient direction presets for convenience.
|
|
199
|
+
*/
|
|
200
|
+
export declare const GradientDirections: {
|
|
201
|
+
/**
|
|
202
|
+
* Top to bottom gradient
|
|
203
|
+
*/
|
|
204
|
+
readonly topToBottom: {
|
|
205
|
+
readonly x1: 0;
|
|
206
|
+
readonly y1: 0;
|
|
207
|
+
readonly x2: 0;
|
|
208
|
+
readonly y2: 1;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Bottom to top gradient
|
|
212
|
+
*/
|
|
213
|
+
readonly bottomToTop: {
|
|
214
|
+
readonly x1: 0;
|
|
215
|
+
readonly y1: 1;
|
|
216
|
+
readonly x2: 0;
|
|
217
|
+
readonly y2: 0;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Left to right gradient
|
|
221
|
+
*/
|
|
222
|
+
readonly leftToRight: {
|
|
223
|
+
readonly x1: 0;
|
|
224
|
+
readonly y1: 0;
|
|
225
|
+
readonly x2: 1;
|
|
226
|
+
readonly y2: 0;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Right to left gradient
|
|
230
|
+
*/
|
|
231
|
+
readonly rightToLeft: {
|
|
232
|
+
readonly x1: 1;
|
|
233
|
+
readonly y1: 0;
|
|
234
|
+
readonly x2: 0;
|
|
235
|
+
readonly y2: 0;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Diagonal top-left to bottom-right
|
|
239
|
+
*/
|
|
240
|
+
readonly diagonalTopLeft: {
|
|
241
|
+
readonly x1: 0;
|
|
242
|
+
readonly y1: 0;
|
|
243
|
+
readonly x2: 1;
|
|
244
|
+
readonly y2: 1;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Diagonal top-right to bottom-left
|
|
248
|
+
*/
|
|
249
|
+
readonly diagonalTopRight: {
|
|
250
|
+
readonly x1: 1;
|
|
251
|
+
readonly y1: 0;
|
|
252
|
+
readonly x2: 0;
|
|
253
|
+
readonly y2: 1;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Common radial gradient presets for convenience.
|
|
258
|
+
*/
|
|
259
|
+
export declare const RadialGradientPresets: {
|
|
260
|
+
/**
|
|
261
|
+
* Center-focused radial gradient
|
|
262
|
+
*/
|
|
263
|
+
readonly center: {
|
|
264
|
+
readonly centerX: 0.5;
|
|
265
|
+
readonly centerY: 0.5;
|
|
266
|
+
readonly radius: 0.8;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Top-left focused radial gradient
|
|
270
|
+
*/
|
|
271
|
+
readonly topLeft: {
|
|
272
|
+
readonly centerX: 0;
|
|
273
|
+
readonly centerY: 0;
|
|
274
|
+
readonly radius: 1;
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Top-right focused radial gradient
|
|
278
|
+
*/
|
|
279
|
+
readonly topRight: {
|
|
280
|
+
readonly centerX: 1;
|
|
281
|
+
readonly centerY: 0;
|
|
282
|
+
readonly radius: 1;
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Bottom-left focused radial gradient
|
|
286
|
+
*/
|
|
287
|
+
readonly bottomLeft: {
|
|
288
|
+
readonly centerX: 0;
|
|
289
|
+
readonly centerY: 1;
|
|
290
|
+
readonly radius: 1;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* Bottom-right focused radial gradient
|
|
294
|
+
*/
|
|
295
|
+
readonly bottomRight: {
|
|
296
|
+
readonly centerX: 1;
|
|
297
|
+
readonly centerY: 1;
|
|
298
|
+
readonly radius: 1;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Helper function to create a linear gradient with common direction presets.
|
|
303
|
+
*
|
|
304
|
+
* @param direction - The gradient direction
|
|
305
|
+
* @param stops - The color stops
|
|
306
|
+
* @returns A linear gradient configuration
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```ts
|
|
310
|
+
* const gradient = createLinearGradient(
|
|
311
|
+
* GradientDirections.topToBottom,
|
|
312
|
+
* [
|
|
313
|
+
* { position: 0, color: '#003399' },
|
|
314
|
+
* { position: 1, color: '#3366AA' }
|
|
315
|
+
* ]
|
|
316
|
+
* );
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
export declare const createLinearGradient: (direction: LinearGradientDirection, stops: readonly GradientStop[]) => LinearGradientColor;
|
|
320
|
+
/**
|
|
321
|
+
* Helper function to create a radial gradient with common presets.
|
|
322
|
+
*
|
|
323
|
+
* @param center - The gradient center configuration
|
|
324
|
+
* @param stops - The color stops
|
|
325
|
+
* @returns A radial gradient configuration
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```ts
|
|
329
|
+
* const gradient = createRadialGradient(
|
|
330
|
+
* RadialGradientPresets.center,
|
|
331
|
+
* [
|
|
332
|
+
* { position: 0, color: '#ff0000' },
|
|
333
|
+
* { position: 1, color: '#0000ff' }
|
|
334
|
+
* ]
|
|
335
|
+
* );
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
export declare const createRadialGradient: (center: RadialGradientConfig, stops: readonly GradientStop[]) => RadialGradientColor;
|
|
339
|
+
/**
|
|
340
|
+
* Inner compatibility interface that matches the original Highcharts GradientColorObject structure.
|
|
341
|
+
*
|
|
342
|
+
* This interface is provided for backward compatibility with existing Highcharts integrations.
|
|
343
|
+
* For new code, prefer using the enhanced {@link GradientColor} types.
|
|
344
|
+
*
|
|
345
|
+
* @internal
|
|
346
|
+
*/
|
|
347
|
+
export interface HighchartsGradientColorObject {
|
|
348
|
+
/**
|
|
349
|
+
* Linear gradient configuration (inner format)
|
|
350
|
+
*/
|
|
351
|
+
linearGradient?: {
|
|
352
|
+
x1: number;
|
|
353
|
+
y1: number;
|
|
354
|
+
x2: number;
|
|
355
|
+
y2: number;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Radial gradient configuration (inner format)
|
|
359
|
+
*/
|
|
360
|
+
radialGradient?: {
|
|
361
|
+
cx: number;
|
|
362
|
+
cy: number;
|
|
363
|
+
r: number;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Color stops in inner format [position, color]
|
|
367
|
+
*/
|
|
368
|
+
stops: [number, string][];
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Converts a modern GradientColor to the inner Highcharts format.
|
|
372
|
+
*
|
|
373
|
+
* @param gradient - The modern gradient color
|
|
374
|
+
* @returns The inner format gradient color object
|
|
375
|
+
*
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
export declare const toGradientHighchartsFormat: (gradient: GradientColor) => HighchartsGradientColorObject;
|
|
379
|
+
/**
|
|
380
|
+
* Converts a inner Highcharts gradient to the modern format.
|
|
381
|
+
*
|
|
382
|
+
* @param highchartGradient - The inner gradient color object
|
|
383
|
+
* @returns The modern gradient color format
|
|
384
|
+
*
|
|
385
|
+
* @internal
|
|
386
|
+
*/
|
|
387
|
+
export declare const fromHighchartsGradientFormat: (highchartGradient: HighchartsGradientColorObject) => GradientColor;
|
|
388
|
+
/**
|
|
389
|
+
* Converts a color to the inner Highcharts format if it is a gradient, otherwise returns the color as is.
|
|
390
|
+
*
|
|
391
|
+
* @param color - The color to convert
|
|
392
|
+
* @returns The inner format gradient color object or the color as is
|
|
393
|
+
*
|
|
394
|
+
* @internal
|
|
395
|
+
*/
|
|
396
|
+
export declare const withGradientConversion: <T>(color: T) => HighchartsGradientColorObject | Exclude<T, GradientColor>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively removes properties with undefined values and empty objects from an object.
|
|
3
|
+
*
|
|
4
|
+
* @param obj - The object to process
|
|
5
|
+
* @returns A new object with undefined properties and empty objects removed
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const input = {
|
|
10
|
+
* a: 1,
|
|
11
|
+
* b: undefined,
|
|
12
|
+
* c: { d: 2, e: undefined },
|
|
13
|
+
* f: [1, undefined, 3],
|
|
14
|
+
* g: {}
|
|
15
|
+
* };
|
|
16
|
+
*
|
|
17
|
+
* const result = omitUndefinedAndEmpty(input);
|
|
18
|
+
* // Result: { a: 1, c: { d: 2 }, f: [1, 3] }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function omitUndefinedAndEmpty<T>(obj: T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './translate-widget-style-options.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TabberButtonsWidgetStyleOptions } from '../../types.js';
|
|
2
|
+
import { TabberWidgetDtoStyle } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Extracts style options from TabberWidgetDtoStyle.
|
|
5
|
+
* Pure function that transforms tabber widget DTO style to CSDK style options.
|
|
6
|
+
* Removes fields that belong in customOptions and renames background color fields.
|
|
7
|
+
* Background colors are applied when provided, regardless of the useSelectedBkg/useUnselectedBkg flags.
|
|
8
|
+
*
|
|
9
|
+
* @param tabberStyleDto - The tabber widget style from DTO
|
|
10
|
+
* @returns The tabber widget style options for CSDK
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractTabberButtonsWidgetStyleOptions(tabberStyleDto: TabberWidgetDtoStyle): TabberButtonsWidgetStyleOptions;
|
|
13
|
+
/**
|
|
14
|
+
* Extracts custom options from TabberWidgetDtoStyle.
|
|
15
|
+
* Pure function that extracts tab names and active tab index from DTO style.
|
|
16
|
+
*
|
|
17
|
+
* @param tabberStyleDto - The tabber widget style from DTO
|
|
18
|
+
* @returns Object containing tab names and active tab index
|
|
19
|
+
*/
|
|
20
|
+
export declare function extractTabberButtonsWidgetCustomOptions(tabberStyleDto: TabberWidgetDtoStyle): {
|
|
21
|
+
tabNames: string[];
|
|
22
|
+
activeTab: number;
|
|
23
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AlignmentTypes, ChartStyleOptions, GaugeIndicatorStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, PivotTableStyleOptions, RadiusSizes, ShadowsTypes, SpaceSizes, TableStyleOptions, TextWidgetStyleOptions, WidgetStyleOptions } from '
|
|
2
|
-
import { FusionWidgetType, IndicatorWidgetStyle, PivotWidgetStyle, TableWidgetStyle, WidgetDesign, WidgetDto, WidgetSubtype } from '
|
|
1
|
+
import { AlignmentTypes, ChartStyleOptions, GaugeIndicatorStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, PivotTableStyleOptions, RadiusSizes, ShadowsTypes, SpaceSizes, TabberButtonsWidgetStyleOptions, TableStyleOptions, TextWidgetStyleOptions, WidgetStyleOptions } from '../../types.js';
|
|
2
|
+
import { FusionWidgetType, IndicatorWidgetStyle, PivotWidgetStyle, TableWidgetStyle, WidgetDesign, WidgetDto, WidgetSubtype } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to extract table chart style options from WidgetDto
|
|
5
5
|
*/
|
|
@@ -12,7 +12,7 @@ export declare function extractPivotTableStyleOptions(widgetStyle: PivotWidgetSt
|
|
|
12
12
|
/**
|
|
13
13
|
* Helper function to extract style options from WidgetDto
|
|
14
14
|
*/
|
|
15
|
-
export declare function extractStyleOptions<WType extends FusionWidgetType>(widgetType: WType, widget: WidgetDto): ChartStyleOptions | TableStyleOptions | TextWidgetStyleOptions;
|
|
15
|
+
export declare function extractStyleOptions<WType extends FusionWidgetType>(widgetType: WType, widget: WidgetDto): ChartStyleOptions | TableStyleOptions | TextWidgetStyleOptions | TabberButtonsWidgetStyleOptions;
|
|
16
16
|
export declare const getFlattenWidgetDesign: (widgetDesign: WidgetDesign) => {
|
|
17
17
|
backgroundColor: string;
|
|
18
18
|
spaceAround: SpaceSizes;
|
|
@@ -36,4 +36,4 @@ export declare const getFlattenWidgetDesign: (widgetDesign: WidgetDesign) => {
|
|
|
36
36
|
* @param isWidgetDesignStyleEnabled - The flag to enable the widget design style
|
|
37
37
|
* @returns The merged widget style
|
|
38
38
|
*/
|
|
39
|
-
export declare function getStyleWithWidgetDesign(widgetStyle: ChartStyleOptions | TableStyleOptions | TextWidgetStyleOptions, widgetDesign?: WidgetDesign, isWidgetDesignStyleEnabled?: boolean): WidgetStyleOptions;
|
|
39
|
+
export declare function getStyleWithWidgetDesign(widgetStyle: ChartStyleOptions | TableStyleOptions | TextWidgetStyleOptions | TabberButtonsWidgetStyleOptions, widgetDesign?: WidgetDesign, isWidgetDesignStyleEnabled?: boolean): WidgetStyleOptions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseJaql, FormulaContext, FormulaJaql, Jaql, JaqlDataSource, JaqlSortDirection } from '@sisense/sdk-data';
|
|
2
2
|
import { JtdConfigDto } from '../dashboard/hooks/jtd/jtd-types';
|
|
3
3
|
import { HierarchyId } from '../models/hierarchy';
|
|
4
|
-
import { LEGACY_DESIGN_TYPES } from '../themes/legacy-design-settings';
|
|
5
4
|
import { WidgetContainerStyleOptions } from '../types';
|
|
5
|
+
import { LEGACY_DESIGN_TYPES } from '../themes/legacy-design-settings';
|
|
6
6
|
/**
|
|
7
7
|
* The type of a widget on a dashboard that is a variant of Cartesian widget.
|
|
8
8
|
*/
|
|
@@ -19,10 +19,20 @@ export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg' | 'pivot' | 'pi
|
|
|
19
19
|
* The type of a widget on a dashboard that is a variant of text widget.
|
|
20
20
|
*/
|
|
21
21
|
export type TextWidgetType = 'richtexteditor';
|
|
22
|
+
/**
|
|
23
|
+
* The type of a widget on a dashboard that is a variant of plugin widget.
|
|
24
|
+
* This represents the widget type in Fusion/DTO layer.
|
|
25
|
+
*/
|
|
26
|
+
export type FusionPluginWidgetType = 'WidgetsTabber';
|
|
27
|
+
/**
|
|
28
|
+
* The type of a plugin widget in Compose SDK.
|
|
29
|
+
* This represents the widget type used internally in CSDK components.
|
|
30
|
+
*/
|
|
31
|
+
export type CsdkPluginWidgetType = 'tabber-buttons';
|
|
22
32
|
/**
|
|
23
33
|
* The type of a widget on a dashboard.
|
|
24
34
|
*/
|
|
25
|
-
export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | 'heatmap' | TextWidgetType | 'custom';
|
|
35
|
+
export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | 'heatmap' | TextWidgetType | FusionPluginWidgetType | 'custom';
|
|
26
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';
|
|
27
37
|
export declare enum WidgetDashboardFilterMode {
|
|
28
38
|
FILTER = "filter",
|
|
@@ -532,7 +542,7 @@ export type CalendarHeatmapWidgetStyle = {
|
|
|
532
542
|
export type WidgetStyle = {
|
|
533
543
|
widgetDesign?: WidgetDesign;
|
|
534
544
|
narration?: any;
|
|
535
|
-
} & (CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | PieWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle | PivotWidgetStyle | CalendarHeatmapWidgetStyle | TextWidgetDtoStyle);
|
|
545
|
+
} & (CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | PieWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle | PivotWidgetStyle | CalendarHeatmapWidgetStyle | TextWidgetDtoStyle | TabberWidgetDtoStyle);
|
|
536
546
|
export declare enum FiltersMergeStrategyEnum {
|
|
537
547
|
WIDGET_FIRST = "widgetFirst",
|
|
538
548
|
CODE_FIRST = "codeFirst",
|
|
@@ -561,4 +571,29 @@ export type TextWidgetDtoStyle = {
|
|
|
561
571
|
textAlign: 'center';
|
|
562
572
|
};
|
|
563
573
|
};
|
|
574
|
+
/**
|
|
575
|
+
* The data transfer object (DTO) containing info of a tabber widget style.
|
|
576
|
+
*/
|
|
577
|
+
export type TabberWidgetDtoStyle = {
|
|
578
|
+
tabs: {
|
|
579
|
+
displayWidgetIds: string[];
|
|
580
|
+
hideWidgetIds: string[];
|
|
581
|
+
title: string;
|
|
582
|
+
}[];
|
|
583
|
+
activeTab: string;
|
|
584
|
+
descriptionColor: string;
|
|
585
|
+
selectedBkgColor: string;
|
|
586
|
+
selectedColor: string;
|
|
587
|
+
showDescription: boolean;
|
|
588
|
+
showSeparators: boolean;
|
|
589
|
+
showTitle: boolean;
|
|
590
|
+
tabCornerRadius: 'SMALL' | 'MEDIUM' | 'LARGE' | 'NONE';
|
|
591
|
+
tabsAlignment: 'LEFT' | 'CENTER' | 'RIGHT';
|
|
592
|
+
tabsInterval: 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
593
|
+
tabsSize: 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
594
|
+
unselectedBkgColor: string;
|
|
595
|
+
unselectedColor: string;
|
|
596
|
+
useSelectedBkg: boolean;
|
|
597
|
+
useUnselectedBkg: boolean;
|
|
598
|
+
};
|
|
564
599
|
export {};
|
|
@@ -3,7 +3,7 @@ import { WidgetModel } from '../models';
|
|
|
3
3
|
import { WidgetTypeInternal } from '../models/widget/types';
|
|
4
4
|
import { ChartProps, ChartWidgetProps, CommonWidgetProps, CustomWidgetProps, PivotTableProps, PivotTableWidgetProps, TextWidgetProps, WidgetProps, WidgetType, WithCommonWidgetProps } from '../props';
|
|
5
5
|
import { ChartType, RenderToolbarHandler } from '../types.js';
|
|
6
|
-
import { FusionWidgetType, Panel, PanelItem, TextWidgetDtoStyle, WidgetStyle, WidgetSubtype } from './types.js';
|
|
6
|
+
import { CsdkPluginWidgetType, FusionPluginWidgetType, FusionWidgetType, Panel, PanelItem, TextWidgetDtoStyle, WidgetStyle, WidgetSubtype } from './types.js';
|
|
7
7
|
export { mergeFilters, getFilterRelationsFromJaql, convertFilterRelationsModelToJaql, getFilterCompareId, } from '@sisense/sdk-data';
|
|
8
8
|
/**
|
|
9
9
|
* Returns the corresponding chart type for a given widget type
|
|
@@ -15,7 +15,35 @@ export declare function getFusionWidgetTypeFromChartType(chartType: ChartType):
|
|
|
15
15
|
export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType): FusionWidgetType;
|
|
16
16
|
export declare function getWidgetType(fusionWidgetType: FusionWidgetType): WidgetType;
|
|
17
17
|
export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
|
|
18
|
-
export declare function isSupportedWidgetType(fusionWidgetType:
|
|
18
|
+
export declare function isSupportedWidgetType(fusionWidgetType: string): fusionWidgetType is FusionWidgetType;
|
|
19
|
+
/**
|
|
20
|
+
* Check if the given fusion widget type is a supported plugin widget (in DTO format).
|
|
21
|
+
* @param fusionWidgetType - The fusion widget type from DTO
|
|
22
|
+
* @returns True if it's a supported plugin widget
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function isSupportedPluginFusionWidget(fusionWidgetType: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if the given CSDK widget type is a supported plugin widget (in CSDK format).
|
|
28
|
+
* @param csdkWidgetType - The CSDK custom widget type
|
|
29
|
+
* @returns True if it's a supported plugin widget
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare function isSupportedPluginCsdkWidget(csdkWidgetType: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Map a Fusion plugin widget type (DTO) to CSDK plugin widget type.
|
|
35
|
+
* @param fusionType - The Fusion plugin widget type from DTO
|
|
36
|
+
* @returns The corresponding CSDK plugin widget type
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function fusionPluginWidgetTypeToCsdk(fusionType: FusionPluginWidgetType): CsdkPluginWidgetType;
|
|
40
|
+
/**
|
|
41
|
+
* Map a CSDK plugin widget type to Fusion plugin widget type (DTO).
|
|
42
|
+
* @param csdkType - The CSDK plugin widget type
|
|
43
|
+
* @returns The corresponding Fusion plugin widget type for DTO
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function csdkPluginWidgetTypeToFusion(csdkType: CsdkPluginWidgetType): FusionPluginWidgetType;
|
|
19
47
|
/**
|
|
20
48
|
* Widget types that support Jump To Dashboard (JTD) functionality
|
|
21
49
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabberButtonsWidgetProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Visual representation of a Fusion's widget with tabber buttons
|
|
5
|
+
* @param props - Tabber buttons widget props
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const TabberButtonsWidget: React.FunctionComponent<TabberButtonsWidgetProps>;
|