@sisense/sdk-ui 2.23.0 → 2.24.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 +3 -3
- package/dist/ai.js +7 -7
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1172 -986
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{dimensions-C0BmtTH2.js → dimensions-C1R5YRt-.js} +1 -1
- package/dist/{dimensions-2t18RSZC.cjs → dimensions-C7yXAoZs.cjs} +1 -1
- package/dist/{execute-query-DmAyVFF5.cjs → execute-query-0Y9Fn9Pf.cjs} +1 -1
- package/dist/{execute-query-CHYTupEo.js → execute-query-b9oy2Egy.js} +7 -4
- package/dist/{index-Dx6wvLd3.cjs → index-Ck-0gJC9.cjs} +1 -1
- package/dist/{index-DCAC0mJe.js → index-r66Tjiqj.js} +21 -1
- package/dist/index.cjs +599 -595
- package/dist/index.js +14631 -14441
- package/dist/index.umd.js +951 -947
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-csv-download.d.ts +24 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +20 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-translated-data-options.d.ts +12 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-csv-download.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-csv-download.d.ts +15 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-csv-download.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/tabber-buttons-widget/types.d.ts +8 -8
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +21 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +11 -2
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-csv-query-file-loader.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-with-csv-download-menu-item.d.ts +22 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-menu-button.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/custom-widgets-provider-adapter.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +11 -4
- package/dist/packages/sdk-ui/src/infra/plugins/custom-plugin-context-provider.d.ts +18 -0
- package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +29 -0
- package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/plugin-provider.d.ts +4 -2
- package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/types.d.ts +12 -4
- package/dist/packages/sdk-ui/src/infra/plugins/use-widget-plugin-registry.d.ts +7 -0
- package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/validate-plugins.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +302 -0
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +33 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +40 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/custom-formula/validate-custom-formula.d.ts +15 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +22 -6
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/parse-compose-code.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +5 -2
- package/dist/packages/sdk-ui/src/props.d.ts +19 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +2 -0
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +2 -0
- package/dist/packages/sdk-ui/src/shared/const.d.ts +5 -0
- package/dist/packages/sdk-ui/src/shared/types/menu-item.d.ts +5 -1
- package/dist/packages/sdk-ui/src/shared/utils/menu-item-converters.d.ts +12 -0
- package/dist/{quota-notification-RAaHp-eO.cjs → quota-notification-BqRYSJ7r.cjs} +137 -137
- package/dist/{quota-notification-CVl0isIV.js → quota-notification-CeKnEyQG.js} +11248 -11000
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +22 -2
- package/dist/translations/en-us.cjs +1 -1
- package/dist/translations/en-us.js +1 -1
- package/dist/translations/es-ar.cjs +1 -1
- package/dist/translations/es-ar.js +22 -2
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +22 -2
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +22 -2
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +24 -4
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +24 -4
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +24 -4
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +24 -4
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +22 -2
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +24 -4
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +22 -2
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +24 -4
- package/dist/{types-DZ4vWh8j.cjs → types-C0QU2tsE.cjs} +1 -1
- package/dist/{types-B96nVbgX.js → types-DJtC8_5_.js} +1 -1
- package/dist/{utils-ChqSLRbz.js → utils-BCp2ISWh.js} +208 -204
- package/dist/{utils-CgV-jWWQ.cjs → utils-D8O1_kl3.cjs} +16 -16
- package/dist/{widget-composer-Blul90Zb.cjs → widget-composer-BkHZISs7.cjs} +1 -1
- package/dist/{widget-composer-Cf_CN3Ux.js → widget-composer-CDNL9_XF.js} +3 -3
- package/package.json +8 -8
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/index.d.ts +0 -5
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-context.d.ts +0 -15
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import type { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
+
import { AnyObject } from '../../../shared/utils/utility-types';
|
|
4
|
+
import type { AbstractDataPointWithEntries, GenericDataOptions } from '../../../types';
|
|
5
|
+
import type { BasePluginInfo } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* Widget plugin declaration.
|
|
8
|
+
*
|
|
9
|
+
* @sisenseInternal
|
|
10
|
+
*/
|
|
11
|
+
export interface WidgetPlugin<Props = CustomVisualizationProps, StyleOptions = CustomVisualizationStyleOptions> extends BasePluginInfo {
|
|
12
|
+
/**
|
|
13
|
+
* The type of plugin
|
|
14
|
+
*/
|
|
15
|
+
pluginType: 'widget';
|
|
16
|
+
/**
|
|
17
|
+
* The custom widget declaration to be registered
|
|
18
|
+
*/
|
|
19
|
+
customWidget?: {
|
|
20
|
+
/**
|
|
21
|
+
* The unique name of the custom widget type (used for registration and identification)
|
|
22
|
+
* @example 'my-custom-widget'
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* The display name of the custom widget type (used for display in the UI)
|
|
27
|
+
* @example 'My Custom Widget'
|
|
28
|
+
*/
|
|
29
|
+
displayName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Configuration options for the custom widget
|
|
32
|
+
*/
|
|
33
|
+
config?: {
|
|
34
|
+
/**
|
|
35
|
+
* Configuration options for the widget header
|
|
36
|
+
*/
|
|
37
|
+
header?: {
|
|
38
|
+
/**
|
|
39
|
+
* Whether the header is visible.
|
|
40
|
+
* If not specified, the header is visible by default.
|
|
41
|
+
* @example true
|
|
42
|
+
*/
|
|
43
|
+
visible?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Definition of the custom visualization to be rendered in the new custom widget
|
|
48
|
+
*/
|
|
49
|
+
visualization: {
|
|
50
|
+
/**
|
|
51
|
+
* The custom visualization component to be rendered in the new custom widget
|
|
52
|
+
*/
|
|
53
|
+
Component: CustomVisualization<Props>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Definition of the design panel for the custom widget
|
|
57
|
+
*/
|
|
58
|
+
designPanel?: {
|
|
59
|
+
Component?: DesignPanel<StyleOptions>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Definition of the data panel for the custom widget
|
|
63
|
+
*/
|
|
64
|
+
dataPanel?: {
|
|
65
|
+
/**
|
|
66
|
+
* Configuration options for the data panel
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* {
|
|
70
|
+
* inputs: [
|
|
71
|
+
* { name: 'category', displayName: 'Category', type: 'dimension' },
|
|
72
|
+
* { name: 'value', displayName: 'Value', type: 'measure' },
|
|
73
|
+
* ],
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
config?: {
|
|
78
|
+
/**
|
|
79
|
+
* Inputs for the data panel
|
|
80
|
+
* @example
|
|
81
|
+
* ```tsx
|
|
82
|
+
* [
|
|
83
|
+
* { name: 'category', displayName: 'Category', type: 'dimension' },
|
|
84
|
+
* { name: 'value', displayName: 'Value', type: 'measure' },
|
|
85
|
+
* ]
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
inputs?: {
|
|
89
|
+
/**
|
|
90
|
+
* The name of the input
|
|
91
|
+
* @example 'category'
|
|
92
|
+
*/
|
|
93
|
+
name: string;
|
|
94
|
+
/**
|
|
95
|
+
* The display name of the input
|
|
96
|
+
* @example 'Category'
|
|
97
|
+
*/
|
|
98
|
+
displayName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The type of the input
|
|
101
|
+
*/
|
|
102
|
+
type: 'dimension' | 'measure';
|
|
103
|
+
/**
|
|
104
|
+
* The minimum number of items that can be selected
|
|
105
|
+
* @example 1
|
|
106
|
+
*/
|
|
107
|
+
minItems?: number;
|
|
108
|
+
/**
|
|
109
|
+
* The maximum number of items that can be selected
|
|
110
|
+
* @example 5
|
|
111
|
+
*/
|
|
112
|
+
maxItems?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Whether the items can be sorted
|
|
115
|
+
*/
|
|
116
|
+
canSort?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the items can be formatted
|
|
119
|
+
*/
|
|
120
|
+
canFormat?: boolean;
|
|
121
|
+
}[];
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* The icon of the custom widget to be displayed in the widget selector
|
|
125
|
+
* @example
|
|
126
|
+
* ```tsx
|
|
127
|
+
* const MyWidgetIcon = () => <PieChartIcon />;
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
icon?: () => ReactNode;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Props passed to a user-defined custom visualization component.
|
|
136
|
+
*
|
|
137
|
+
* @typeParam DataOptions - The shape of data options for this custom visualization
|
|
138
|
+
* @typeParam StyleOptions - The shape of style options for this custom visualization
|
|
139
|
+
* @typeParam DataPoint - The shape of data points for event handlers
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```tsx
|
|
143
|
+
* import { CustomVisualization, CustomVisualizationProps, CustomWidgetDataPoint, StyledColumn, StyledMeasureColumn, DataPointEntry, GenericDataOptions} from '@sisense/sdk-ui';
|
|
144
|
+
*
|
|
145
|
+
* interface MyDataOptions extends GenericDataOptions {
|
|
146
|
+
* category: StyledColumn[];
|
|
147
|
+
* value: StyledMeasureColumn[];
|
|
148
|
+
* }
|
|
149
|
+
*
|
|
150
|
+
* interface MyDataPoint extends CustomWidgetDataPoint {
|
|
151
|
+
* entries: {
|
|
152
|
+
* category: DataPointEntry[];
|
|
153
|
+
* value: DataPointEntry[];
|
|
154
|
+
* };
|
|
155
|
+
* }
|
|
156
|
+
*
|
|
157
|
+
* type MyNewChartProps = CustomVisualizationProps<MyDataOptions, {}, MyDataPoint>;
|
|
158
|
+
*
|
|
159
|
+
* const MyNewChart: CustomVisualization<MyNewChartProps> = (props) => {
|
|
160
|
+
* const { dataOptions, onDataPointClick } = props;
|
|
161
|
+
* // ... implementation based on props
|
|
162
|
+
* return <div>My New Awesome Chart</div>;
|
|
163
|
+
* };
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @sisenseInternal
|
|
167
|
+
*/
|
|
168
|
+
export interface CustomVisualizationProps<DataOptions = GenericDataOptions, StyleOptions = CustomVisualizationStyleOptions, DataPoint extends AbstractDataPointWithEntries = AbstractDataPointWithEntries> extends CustomVisualizationEventProps<DataPoint> {
|
|
169
|
+
/** Data source for the custom visualization */
|
|
170
|
+
dataSource?: DataSource;
|
|
171
|
+
/** Data options defining what data to display */
|
|
172
|
+
dataOptions: DataOptions;
|
|
173
|
+
/** Style options for customizing appearance */
|
|
174
|
+
styleOptions?: StyleOptions;
|
|
175
|
+
/** Filters to apply to the data */
|
|
176
|
+
filters?: Filter[] | FilterRelations;
|
|
177
|
+
/** Highlight filters for interactive highlighting */
|
|
178
|
+
highlights?: Filter[];
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Style options for a custom visualization.
|
|
182
|
+
*
|
|
183
|
+
* @sisenseInternal
|
|
184
|
+
*/
|
|
185
|
+
export interface CustomVisualizationStyleOptions extends AnyObject {
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A user-defined custom visualization component.
|
|
189
|
+
* This can be any visual representation of the data - chart, table, map, etc.
|
|
190
|
+
*
|
|
191
|
+
* @typeParam Props - The props type for the custom visualization component
|
|
192
|
+
* @sisenseInternal
|
|
193
|
+
*/
|
|
194
|
+
export type CustomVisualization<Props = CustomVisualizationProps> = (props: Props) => ReactNode;
|
|
195
|
+
/**
|
|
196
|
+
* Event props for custom visualizations with generic data point type.
|
|
197
|
+
*
|
|
198
|
+
* @typeParam DataPoint - The shape of data points for this custom visualization
|
|
199
|
+
* @sisenseInternal
|
|
200
|
+
*/
|
|
201
|
+
export interface CustomVisualizationEventProps<DataPoint extends AbstractDataPointWithEntries = AbstractDataPointWithEntries> {
|
|
202
|
+
/**
|
|
203
|
+
* Click handler callback for a data point
|
|
204
|
+
*
|
|
205
|
+
* @category Callbacks
|
|
206
|
+
*/
|
|
207
|
+
onDataPointClick?: CustomVisualizationDataPointEventHandler<DataPoint>;
|
|
208
|
+
/**
|
|
209
|
+
* Context menu handler callback for a data point
|
|
210
|
+
*
|
|
211
|
+
* @category Callbacks
|
|
212
|
+
*/
|
|
213
|
+
onDataPointContextMenu?: CustomVisualizationDataPointContextMenuHandler<DataPoint>;
|
|
214
|
+
/**
|
|
215
|
+
* Handler callback for selection of multiple data points
|
|
216
|
+
*
|
|
217
|
+
* @category Callbacks
|
|
218
|
+
*/
|
|
219
|
+
onDataPointsSelected?: CustomVisualizationDataPointsEventHandler<DataPoint>;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Generic event handler for custom visualization data point click.
|
|
223
|
+
*
|
|
224
|
+
* @typeParam T - The shape of the data point
|
|
225
|
+
* @example
|
|
226
|
+
* ```tsx
|
|
227
|
+
* const handleClick: CustomVisualizationDataPointEventHandler<MyChartDataPoint> = (point, event) => {
|
|
228
|
+
* console.log('Clicked:', point.label, point.value);
|
|
229
|
+
* };
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
* @sisenseInternal
|
|
233
|
+
*/
|
|
234
|
+
export type CustomVisualizationDataPointEventHandler<T extends AbstractDataPointWithEntries = AbstractDataPointWithEntries> = (point: CustomVisualizationDataPoint<T>, nativeEvent: PointerEvent | MouseEvent) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Represents a single data point in a custom visualization.
|
|
237
|
+
*
|
|
238
|
+
* This type is used to define the structure of a data point that is passed to event handlers
|
|
239
|
+
* like `onDataPointClick`. It typically extends `AbstractDataPointWithEntries` to include
|
|
240
|
+
* specific entries for categories, values, or other dimensions used in the widget.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* ```typescript
|
|
244
|
+
* interface MyChartDataPoint extends CustomVisualizationDataPoint {
|
|
245
|
+
* entries: {
|
|
246
|
+
* category: DataPointEntry[];
|
|
247
|
+
* value: DataPointEntry[];
|
|
248
|
+
* };
|
|
249
|
+
* }
|
|
250
|
+
*
|
|
251
|
+
* const onDataPointClick = (point: MyChartDataPoint) => {
|
|
252
|
+
* console.log('Clicked category:', point.entries.category[0].value);
|
|
253
|
+
* };
|
|
254
|
+
* ```
|
|
255
|
+
*
|
|
256
|
+
* @sisenseInternal
|
|
257
|
+
*/
|
|
258
|
+
export type CustomVisualizationDataPoint<T extends AbstractDataPointWithEntries = AbstractDataPointWithEntries> = T;
|
|
259
|
+
/**
|
|
260
|
+
* Generic event handler for custom widget data point context menu.
|
|
261
|
+
*
|
|
262
|
+
* @typeParam T - The shape of the data point
|
|
263
|
+
* @sisenseInternal
|
|
264
|
+
*/
|
|
265
|
+
export type CustomVisualizationDataPointContextMenuHandler<T extends AbstractDataPointWithEntries = AbstractDataPointWithEntries> = (
|
|
266
|
+
/** Data point that triggered the context menu */
|
|
267
|
+
point: CustomVisualizationDataPoint<T>,
|
|
268
|
+
/** Native browser event */
|
|
269
|
+
nativeEvent: MouseEvent) => void;
|
|
270
|
+
/**
|
|
271
|
+
* Generic event handler for custom visualization data points selection.
|
|
272
|
+
*
|
|
273
|
+
* @typeParam T - The shape of the data point
|
|
274
|
+
* @example
|
|
275
|
+
* ```tsx
|
|
276
|
+
* const handleSelect: CustomVisualizationDataPointsEventHandler<MyChartDataPoint> = (points, event) => {
|
|
277
|
+
* console.log('Selected:', points.length, 'points');
|
|
278
|
+
* };
|
|
279
|
+
* ```
|
|
280
|
+
*
|
|
281
|
+
* @sisenseInternal
|
|
282
|
+
*/
|
|
283
|
+
export type CustomVisualizationDataPointsEventHandler<T extends AbstractDataPointWithEntries = AbstractDataPointWithEntries> = (
|
|
284
|
+
/** Data points that were selected */
|
|
285
|
+
points: CustomVisualizationDataPoint<T>[],
|
|
286
|
+
/** Native browser event */
|
|
287
|
+
nativeEvent: MouseEvent) => void;
|
|
288
|
+
/**
|
|
289
|
+
* Props for the design panel component for the custom widget.
|
|
290
|
+
*
|
|
291
|
+
* @sisenseInternal
|
|
292
|
+
*/
|
|
293
|
+
export interface DesignPanelProps<StyleOptions = CustomVisualizationStyleOptions> {
|
|
294
|
+
styleOptions: StyleOptions;
|
|
295
|
+
onChange: (styleOptions: StyleOptions) => void;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* The design panel component for the custom widget.
|
|
299
|
+
*
|
|
300
|
+
* @sisenseInternal
|
|
301
|
+
*/
|
|
302
|
+
export type DesignPanel<StyleOptions = CustomVisualizationStyleOptions> = FunctionComponent<DesignPanelProps<StyleOptions>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CustomVisualization } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Central widget registration and lookup.
|
|
4
|
+
* Plugin-sourced entries take priority over legacy-sourced entries.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class WidgetPluginRegistry {
|
|
9
|
+
private readonly entries;
|
|
10
|
+
/**
|
|
11
|
+
* Register a widget component by type name.
|
|
12
|
+
* Plugin-sourced entries take priority over legacy-sourced entries.
|
|
13
|
+
* Within the same source, first-write-wins (no silent overwrites).
|
|
14
|
+
*/
|
|
15
|
+
register(widgetTypeName: string, component: CustomVisualization, source?: 'plugin' | 'legacy'): void;
|
|
16
|
+
/**
|
|
17
|
+
* Unregister a widget by type name and source.
|
|
18
|
+
* Only removes the entry if it matches the given source.
|
|
19
|
+
*/
|
|
20
|
+
unregister(widgetTypeName: string, source: 'plugin' | 'legacy'): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get a widget component by type name.
|
|
23
|
+
* When `source` is provided, returns the component only if the entry matches that source.
|
|
24
|
+
* When omitted, returns the component for any source (plugin takes priority over legacy).
|
|
25
|
+
*/
|
|
26
|
+
getComponent(widgetTypeName: string, source?: 'plugin' | 'legacy'): CustomVisualization | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a widget is registered.
|
|
29
|
+
* When `source` is provided, returns true only if an entry exists for that source.
|
|
30
|
+
* When omitted, returns true for any registered entry.
|
|
31
|
+
*/
|
|
32
|
+
has(widgetTypeName: string, source?: 'plugin' | 'legacy'): boolean;
|
|
33
|
+
}
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|
|
@@ -223,6 +223,8 @@ declare const _default: {
|
|
|
223
223
|
deleteWidget: string;
|
|
224
224
|
renameWidget: string;
|
|
225
225
|
distributeEqualWidth: string;
|
|
226
|
+
download: string;
|
|
227
|
+
csvFile: string;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
customWidgets: {
|
|
@@ -407,6 +409,24 @@ declare const _default: {
|
|
|
407
409
|
lockGroup: string;
|
|
408
410
|
unlockGroup: string;
|
|
409
411
|
};
|
|
412
|
+
toggleSwitch: string;
|
|
413
|
+
};
|
|
414
|
+
chart: {
|
|
415
|
+
indicator: {
|
|
416
|
+
label: string;
|
|
417
|
+
};
|
|
418
|
+
visualization: {
|
|
419
|
+
label: string;
|
|
420
|
+
};
|
|
421
|
+
pivotTable: {
|
|
422
|
+
label: string;
|
|
423
|
+
};
|
|
424
|
+
table: {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
loadingOverlay: {
|
|
429
|
+
label: string;
|
|
410
430
|
};
|
|
411
431
|
measures: {
|
|
412
432
|
countShort: string;
|