@sisense/sdk-ui 1.21.0 → 1.22.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 +48 -48
- package/dist/ai.js +793 -764
- package/dist/analytics-composer.cjs +18 -18
- package/dist/analytics-composer.js +595 -595
- package/dist/{get-widget-options-NhNoIBS9.js → get-widget-options-DTIulxC2.js} +5993 -5761
- package/dist/{get-widget-options-BmZF5Ztf.cjs → get-widget-options-DixoCEhn.cjs} +76 -76
- package/dist/index.cjs +71 -71
- package/dist/index.js +8097 -7730
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +1 -1
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +4 -0
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +57 -13
- package/dist/packages/sdk-ui/src/app/settings/settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/boxplot-utils.d.ts +5 -4
- package/dist/packages/sdk-ui/src/chart/chart.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +1 -1
- package/dist/packages/sdk-ui/src/common/hooks/use-fetch.d.ts +1 -1
- package/dist/packages/sdk-ui/src/common/hooks/use-synced-state.d.ts +19 -0
- package/dist/packages/sdk-ui/src/common-filters/selection-utils.d.ts +9 -1
- package/dist/packages/sdk-ui/src/common-filters/use-common-filters.d.ts +4 -2
- package/dist/packages/sdk-ui/src/dashboard/dashboard-by-id.d.ts +1 -2
- package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +86 -9
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +9 -1
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +18 -0
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +30 -0
- package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +40 -0
- package/dist/packages/sdk-ui/src/dashboard-widget/dashboard-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard-widget/translate-widget-data-options.d.ts +12 -2
- package/dist/packages/sdk-ui/src/dashboard-widget/utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/decorators/hook-decorators/with-tracking.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-display.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +2 -2
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/formulas/use-get-shared-formula.d.ts +2 -2
- package/dist/packages/sdk-ui/src/index.d.ts +16 -6
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model-translator.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/dashboard/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +22 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +63 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts +38 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-model.d.ts +1 -2
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-models.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/hierarchy/use-get-hierarchy-models.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/widget/use-get-widget-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +18 -0
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +39 -20
- package/dist/packages/sdk-ui/src/query-execution/execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/use-execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/translation/custom-translations-loader.d.ts +10 -0
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +97 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +194 -0
- package/dist/packages/sdk-ui/src/types.d.ts +24 -3
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-utils.d.ts +7 -0
- package/dist/packages/sdk-ui/src/widgets/common/{use-drilldown.d.ts → use-drilldown-core.d.ts} +7 -8
- package/dist/packages/sdk-ui/src/widgets/common-widget.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widgets/hooks/use-drilldown.d.ts +25 -0
- package/dist/packages/sdk-ui/src/widgets/hooks/use-with-drilldown.d.ts +12 -0
- package/dist/packages/sdk-ui/src/widgets/widget.d.ts +9 -0
- package/dist/{table-widget-BPmucihM.js → table-widget-CLL1iN3H.js} +14606 -14487
- package/dist/{table-widget-BikAZUJv.cjs → table-widget-CYCcYqzZ.cjs} +173 -173
- package/package.json +9 -9
- package/dist/packages/sdk-ui/src/ai/api/errors.d.ts +0 -4
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-connector.d.ts +0 -19
|
@@ -45,9 +45,41 @@ export declare const resources: {
|
|
|
45
45
|
secondsDateTimeLevelSupportedOnlyForLive: string;
|
|
46
46
|
missingMenuRoot: string;
|
|
47
47
|
missingDataSource: string;
|
|
48
|
+
incorrectOnDataReadyHandler: string;
|
|
49
|
+
undefinedDataSource: string;
|
|
50
|
+
emptyModel: string;
|
|
51
|
+
missingMetadata: string;
|
|
52
|
+
missingModelTitle: string;
|
|
53
|
+
httpClientNotFound: string;
|
|
54
|
+
serverSettingsNotLoaded: string;
|
|
55
|
+
requiredColumnMissing: string;
|
|
56
|
+
unexpectedChartType: string;
|
|
57
|
+
noRowNumColumn: string;
|
|
58
|
+
ticIntervalCalculationFailed: string;
|
|
59
|
+
polarChartDesignOptionsExpected: string;
|
|
60
|
+
polarChartDesignOptionsNotExpected: string;
|
|
61
|
+
indicatorInvalidRelativeSize: string;
|
|
62
|
+
unsupportedMapType: string;
|
|
63
|
+
mapLoadingFailed: string;
|
|
64
|
+
cascadingFilterOriginalNotFound: string;
|
|
65
|
+
dashboardLoadFailed: string;
|
|
66
|
+
dashboardWithOidNotFound: string;
|
|
67
|
+
widgetWithOidNotFound: string;
|
|
68
|
+
widgetEmptyResponse: string;
|
|
69
|
+
dateFilterIncorrectOperator: string;
|
|
70
|
+
synchronizedFilterInvalidProps: string;
|
|
71
|
+
methodNotImplemented: string;
|
|
72
|
+
noPivotClient: string;
|
|
73
|
+
unexpectedCacheValue: string;
|
|
74
|
+
notAMembersFilter: string;
|
|
75
|
+
drilldownNoInitialDimension: string;
|
|
48
76
|
};
|
|
49
77
|
errorBoxText: string;
|
|
50
78
|
chartNoData: string;
|
|
79
|
+
filters: string;
|
|
80
|
+
widgetDetails: string;
|
|
81
|
+
cancel: string;
|
|
82
|
+
includeAll: string;
|
|
51
83
|
criteriaFilter: {
|
|
52
84
|
displayModePrefix: string;
|
|
53
85
|
equals: string;
|
|
@@ -76,7 +108,9 @@ export declare const resources: {
|
|
|
76
108
|
last: string;
|
|
77
109
|
next: string;
|
|
78
110
|
from: string;
|
|
111
|
+
to: string;
|
|
79
112
|
count: string;
|
|
113
|
+
select: string;
|
|
80
114
|
today: string;
|
|
81
115
|
days: string;
|
|
82
116
|
weeks: string;
|
|
@@ -86,6 +120,11 @@ export declare const resources: {
|
|
|
86
120
|
earliestDate: string;
|
|
87
121
|
latestDate: string;
|
|
88
122
|
todayOutOfRange: string;
|
|
123
|
+
dateRange: {
|
|
124
|
+
fromTo: string;
|
|
125
|
+
from: string;
|
|
126
|
+
to: string;
|
|
127
|
+
};
|
|
89
128
|
};
|
|
90
129
|
boxplot: {
|
|
91
130
|
tooltip: {
|
|
@@ -122,6 +161,7 @@ export declare const resources: {
|
|
|
122
161
|
};
|
|
123
162
|
};
|
|
124
163
|
unsupportedFilterMessage: string;
|
|
164
|
+
unsupportedFilter: string;
|
|
125
165
|
commonFilter: {
|
|
126
166
|
clearSelectionButton: string;
|
|
127
167
|
selectMenuItem: string;
|
|
@@ -131,6 +171,63 @@ export declare const resources: {
|
|
|
131
171
|
drilldown: {
|
|
132
172
|
drillMenuItem: string;
|
|
133
173
|
breadcrumbsAllSuffix: string;
|
|
174
|
+
breadcrumbsPrev: string;
|
|
175
|
+
breadcrumbsNext: string;
|
|
176
|
+
popover: {
|
|
177
|
+
members: string;
|
|
178
|
+
table: string;
|
|
179
|
+
column: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
widgetHeader: {
|
|
183
|
+
info: {
|
|
184
|
+
details: string;
|
|
185
|
+
tooltip: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
plugins: {
|
|
189
|
+
registerPrompt: string;
|
|
190
|
+
};
|
|
191
|
+
ai: {
|
|
192
|
+
analyticsChatbot: string;
|
|
193
|
+
dataTopics: string;
|
|
194
|
+
chatbotDescription: string;
|
|
195
|
+
topicSelectPrompt: string;
|
|
196
|
+
betaLabel: string;
|
|
197
|
+
preview: string;
|
|
198
|
+
clearHistoryPrompt: string;
|
|
199
|
+
config: {
|
|
200
|
+
inputPromptText: string;
|
|
201
|
+
welcomeText: string;
|
|
202
|
+
suggestionsWelcomeText: string;
|
|
203
|
+
};
|
|
204
|
+
buttons: {
|
|
205
|
+
insights: string;
|
|
206
|
+
correctResponse: string;
|
|
207
|
+
incorrectResponse: string;
|
|
208
|
+
clearChat: string;
|
|
209
|
+
refresh: string;
|
|
210
|
+
readMore: string;
|
|
211
|
+
collapse: string;
|
|
212
|
+
yes: string;
|
|
213
|
+
no: string;
|
|
214
|
+
seeMore: string;
|
|
215
|
+
};
|
|
216
|
+
disclaimer: {
|
|
217
|
+
poweredByAi: string;
|
|
218
|
+
rateRequest: string;
|
|
219
|
+
};
|
|
220
|
+
errors: {
|
|
221
|
+
chatUnavailable: string;
|
|
222
|
+
fetchHistory: string;
|
|
223
|
+
recommendationsNotAvailable: string;
|
|
224
|
+
insightsNotAvailable: string;
|
|
225
|
+
unexpectedChatResponse: string;
|
|
226
|
+
unexpected: string;
|
|
227
|
+
unknownResponse: string;
|
|
228
|
+
invalidInput: string;
|
|
229
|
+
noAvailableDataTopics: string;
|
|
230
|
+
};
|
|
134
231
|
};
|
|
135
232
|
};
|
|
136
233
|
uk: {
|
|
@@ -176,9 +273,41 @@ export declare const resources: {
|
|
|
176
273
|
secondsDateTimeLevelSupportedOnlyForLive: string;
|
|
177
274
|
missingMenuRoot: string;
|
|
178
275
|
missingDataSource: string;
|
|
276
|
+
incorrectOnDataReadyHandler: string;
|
|
277
|
+
undefinedDataSource: string;
|
|
278
|
+
emptyModel: string;
|
|
279
|
+
missingMetadata: string;
|
|
280
|
+
missingModelTitle: string;
|
|
281
|
+
httpClientNotFound: string;
|
|
282
|
+
serverSettingsNotLoaded: string;
|
|
283
|
+
requiredColumnMissing: string;
|
|
284
|
+
unexpectedChartType: string;
|
|
285
|
+
noRowNumColumn: string;
|
|
286
|
+
ticIntervalCalculationFailed: string;
|
|
287
|
+
polarChartDesignOptionsExpected: string;
|
|
288
|
+
polarChartDesignOptionsNotExpected: string;
|
|
289
|
+
indicatorInvalidRelativeSize: string;
|
|
290
|
+
unsupportedMapType: string;
|
|
291
|
+
mapLoadingFailed: string;
|
|
292
|
+
cascadingFilterOriginalNotFound: string;
|
|
293
|
+
dashboardLoadFailed: string;
|
|
294
|
+
dashboardWithOidNotFound: string;
|
|
295
|
+
widgetWithOidNotFound: string;
|
|
296
|
+
widgetEmptyResponse: string;
|
|
297
|
+
dateFilterIncorrectOperator: string;
|
|
298
|
+
synchronizedFilterInvalidProps: string;
|
|
299
|
+
methodNotImplemented: string;
|
|
300
|
+
noPivotClient: string;
|
|
301
|
+
unexpectedCacheValue: string;
|
|
302
|
+
notAMembersFilter: string;
|
|
303
|
+
drilldownNoInitialDimension: string;
|
|
179
304
|
};
|
|
180
305
|
errorBoxText: string;
|
|
181
306
|
chartNoData: string;
|
|
307
|
+
filters: string;
|
|
308
|
+
widgetDetails: string;
|
|
309
|
+
cancel: string;
|
|
310
|
+
includeAll: string;
|
|
182
311
|
criteriaFilter: {
|
|
183
312
|
displayModePrefix: string;
|
|
184
313
|
equals: string;
|
|
@@ -207,7 +336,9 @@ export declare const resources: {
|
|
|
207
336
|
last: string;
|
|
208
337
|
next: string;
|
|
209
338
|
from: string;
|
|
339
|
+
to: string;
|
|
210
340
|
count: string;
|
|
341
|
+
select: string;
|
|
211
342
|
today: string;
|
|
212
343
|
days: string;
|
|
213
344
|
weeks: string;
|
|
@@ -217,6 +348,11 @@ export declare const resources: {
|
|
|
217
348
|
earliestDate: string;
|
|
218
349
|
latestDate: string;
|
|
219
350
|
todayOutOfRange: string;
|
|
351
|
+
dateRange: {
|
|
352
|
+
fromTo: string;
|
|
353
|
+
from: string;
|
|
354
|
+
to: string;
|
|
355
|
+
};
|
|
220
356
|
};
|
|
221
357
|
boxplot: {
|
|
222
358
|
tooltip: {
|
|
@@ -253,6 +389,7 @@ export declare const resources: {
|
|
|
253
389
|
};
|
|
254
390
|
};
|
|
255
391
|
unsupportedFilterMessage: string;
|
|
392
|
+
unsupportedFilter: string;
|
|
256
393
|
commonFilter: {
|
|
257
394
|
clearSelectionButton: string;
|
|
258
395
|
selectMenuItem: string;
|
|
@@ -262,6 +399,63 @@ export declare const resources: {
|
|
|
262
399
|
drilldown: {
|
|
263
400
|
drillMenuItem: string;
|
|
264
401
|
breadcrumbsAllSuffix: string;
|
|
402
|
+
breadcrumbsPrev: string;
|
|
403
|
+
breadcrumbsNext: string;
|
|
404
|
+
popover: {
|
|
405
|
+
members: string;
|
|
406
|
+
table: string;
|
|
407
|
+
column: string;
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
widgetHeader: {
|
|
411
|
+
info: {
|
|
412
|
+
details: string;
|
|
413
|
+
tooltip: string;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
plugins: {
|
|
417
|
+
registerPrompt: string;
|
|
418
|
+
};
|
|
419
|
+
ai: {
|
|
420
|
+
analyticsChatbot: string;
|
|
421
|
+
dataTopics: string;
|
|
422
|
+
chatbotDescription: string;
|
|
423
|
+
topicSelectPrompt: string;
|
|
424
|
+
betaLabel: string;
|
|
425
|
+
preview: string;
|
|
426
|
+
clearHistoryPrompt: string;
|
|
427
|
+
config: {
|
|
428
|
+
inputPromptText: string;
|
|
429
|
+
welcomeText: string;
|
|
430
|
+
suggestionsWelcomeText: string;
|
|
431
|
+
};
|
|
432
|
+
buttons: {
|
|
433
|
+
insights: string;
|
|
434
|
+
correctResponse: string;
|
|
435
|
+
incorrectResponse: string;
|
|
436
|
+
clearChat: string;
|
|
437
|
+
refresh: string;
|
|
438
|
+
readMore: string;
|
|
439
|
+
collapse: string;
|
|
440
|
+
yes: string;
|
|
441
|
+
no: string;
|
|
442
|
+
seeMore: string;
|
|
443
|
+
};
|
|
444
|
+
disclaimer: {
|
|
445
|
+
poweredByAi: string;
|
|
446
|
+
rateRequest: string;
|
|
447
|
+
};
|
|
448
|
+
errors: {
|
|
449
|
+
chatUnavailable: string;
|
|
450
|
+
fetchHistory: string;
|
|
451
|
+
recommendationsNotAvailable: string;
|
|
452
|
+
insightsNotAvailable: string;
|
|
453
|
+
unexpectedChatResponse: string;
|
|
454
|
+
unexpected: string;
|
|
455
|
+
unknownResponse: string;
|
|
456
|
+
invalidInput: string;
|
|
457
|
+
noAvailableDataTopics: string;
|
|
458
|
+
};
|
|
265
459
|
};
|
|
266
460
|
};
|
|
267
461
|
};
|
|
@@ -921,11 +921,8 @@ export type WidgetThemeSettings = {
|
|
|
921
921
|
* @internal
|
|
922
922
|
*/
|
|
923
923
|
export type DashboardThemeSettings = {
|
|
924
|
-
/** Background color */
|
|
925
924
|
backgroundColor?: string;
|
|
926
|
-
/** Width of the divider line between widgets */
|
|
927
925
|
dividerLineWidth?: number;
|
|
928
|
-
/** Divider line color */
|
|
929
926
|
dividerLineColor?: string;
|
|
930
927
|
};
|
|
931
928
|
/**
|
|
@@ -1435,3 +1432,27 @@ export type LoadingIndicatorConfig = {
|
|
|
1435
1432
|
* Data options with arbitrary keys. This is typically used in the context of a plugin widget.
|
|
1436
1433
|
*/
|
|
1437
1434
|
export type GenericDataOptions = Record<string, Array<StyledColumn | StyledMeasureColumn>>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Translation resources with nested structure.
|
|
1437
|
+
*/
|
|
1438
|
+
export type NestedTranslationResources = {
|
|
1439
|
+
[key: string]: string | NestedTranslationResources;
|
|
1440
|
+
};
|
|
1441
|
+
/**
|
|
1442
|
+
* Custom translation object.
|
|
1443
|
+
*/
|
|
1444
|
+
export type CustomTranslationObject = {
|
|
1445
|
+
/**
|
|
1446
|
+
* The language code of the translations.
|
|
1447
|
+
*/
|
|
1448
|
+
language: string;
|
|
1449
|
+
/**
|
|
1450
|
+
* The translation resources.
|
|
1451
|
+
*/
|
|
1452
|
+
resources: NestedTranslationResources;
|
|
1453
|
+
/**
|
|
1454
|
+
* The package name of the translations.
|
|
1455
|
+
* Default value is `sdkUi`.
|
|
1456
|
+
*/
|
|
1457
|
+
packageName?: string;
|
|
1458
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataPoint, ChartType, ChartDataOptions } from '../../types';
|
|
2
|
+
import { Attribute } from '@sisense/sdk-data';
|
|
3
|
+
import { ScatterDataPoint } from '../..';
|
|
4
|
+
export declare function getDrilldownInitialDimension(chartType: ChartType, dataOptions: ChartDataOptions): Attribute | undefined;
|
|
5
|
+
export declare function isDrilldownApplicableToChart(chartType: ChartType, dataOptions: ChartDataOptions): boolean;
|
|
6
|
+
export declare function applyDrilldownDimension(chartType: ChartType, dataOptions: ChartDataOptions, drilldownDimension: Attribute): ChartDataOptions;
|
|
7
|
+
export declare function prepareDrilldownSelectionPoints(points: (DataPoint | ScatterDataPoint)[], nativeEvent: MouseEvent, dataOptions: ChartDataOptions): DataPoint[];
|
package/dist/packages/sdk-ui/src/widgets/common/{use-drilldown.d.ts → use-drilldown-core.d.ts}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type TFunction } from '@sisense/sdk-common';
|
|
2
2
|
import { Attribute, Column, MembersFilter } from '@sisense/sdk-data';
|
|
3
|
-
import { StyledColumn, DrilldownSelection, DataPoint, ChartDataPoint
|
|
3
|
+
import { StyledColumn, DrilldownSelection, DataPoint, ChartDataPoint } from '../../types.js';
|
|
4
4
|
import { Hierarchy } from '../../models';
|
|
5
|
-
type
|
|
6
|
-
drilldownPaths
|
|
5
|
+
type UseDrilldownCoreParams = {
|
|
6
|
+
drilldownPaths?: (Attribute | Hierarchy)[];
|
|
7
7
|
initialDimension: Column | StyledColumn;
|
|
8
8
|
drilldownSelections?: DrilldownSelection[];
|
|
9
9
|
onDrilldownSelectionsChange?: (selections: DrilldownSelection[]) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const useDrilldownCore: (params: UseDrilldownCoreParams) => {
|
|
12
|
+
drilldownSelections: DrilldownSelection[];
|
|
13
|
+
availableDrilldownPaths: (Attribute | Hierarchy)[];
|
|
12
14
|
drilldownFilters: MembersFilter[];
|
|
13
15
|
drilldownFiltersDisplayValues: string[][];
|
|
14
16
|
drilldownDimension: Attribute;
|
|
15
17
|
selectDrilldown: (points: DataPoint[], nextDimension: Attribute, hierarchy?: Hierarchy) => void;
|
|
16
18
|
sliceDrilldownSelections: (i: number) => void;
|
|
17
19
|
clearDrilldownSelections: () => void;
|
|
18
|
-
drilldownSelections: DrilldownSelection[];
|
|
19
|
-
availableDrilldownPaths: (Attribute | Hierarchy)[];
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* @internal
|
|
@@ -26,7 +26,6 @@ export declare const processDrilldownSelections: (drilldownSelections: Drilldown
|
|
|
26
26
|
drilldownFiltersDisplayValues: string[][];
|
|
27
27
|
drilldownDimension: Attribute;
|
|
28
28
|
};
|
|
29
|
+
export declare function getDisplayMemberNameFromDataPoint(point: ChartDataPoint): string;
|
|
29
30
|
export declare function getMemberNameFromDataPoint(point: ChartDataPoint): string;
|
|
30
|
-
export declare function getSelectionTitleMenuItem(points: DataPoint[], drilldownDimension: Attribute): MenuItemSection;
|
|
31
|
-
export declare function getDrilldownMenuItems(availableDrilldownPaths: (Attribute | Hierarchy)[], drilldownDimension: Attribute, selectFn: (nextDimension: Attribute, hierarchy?: Hierarchy) => void, translate: TFunction): MenuItemSection;
|
|
32
31
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Attribute, Column } from '@sisense/sdk-data';
|
|
2
|
+
import { type TFunction } from '@sisense/sdk-common';
|
|
3
|
+
import { StyledColumn, DrilldownSelection, DataPoint, MenuPosition, MenuItemSection } from '../../types.js';
|
|
4
|
+
import { Hierarchy } from '../../models';
|
|
5
|
+
import { OpenMenuFn } from '../../common/components/menu/types.js';
|
|
6
|
+
type UseDrilldownParams = {
|
|
7
|
+
initialDimension: Column | StyledColumn;
|
|
8
|
+
drilldownPaths?: (Attribute | Hierarchy)[];
|
|
9
|
+
drilldownSelections?: DrilldownSelection[];
|
|
10
|
+
/**
|
|
11
|
+
* todo: make it optional when we will have a public `MenuProvider`.
|
|
12
|
+
* Without provided function, it should open internal menu with the help of `useMenu` hook
|
|
13
|
+
*/
|
|
14
|
+
openMenu: OpenMenuFn;
|
|
15
|
+
onDrilldownSelectionsChange?: (selections: DrilldownSelection[]) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const useDrilldown: ({ initialDimension, drilldownPaths, drilldownSelections, openMenu, onDrilldownSelectionsChange, }: UseDrilldownParams) => {
|
|
18
|
+
drilldownDimension: Attribute;
|
|
19
|
+
drilldownFilters: import("@sisense/sdk-data").MembersFilter[];
|
|
20
|
+
breadcrumbs: import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
openDrilldownMenu: (position: MenuPosition, points: DataPoint[]) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare function getSelectionTitleMenuItem(points: DataPoint[], drilldownDimension: Attribute): MenuItemSection;
|
|
24
|
+
export declare function getDrilldownMenuItems(availableDrilldownPaths: (Attribute | Hierarchy)[], drilldownDimension: Attribute, selectFn: (nextDimension: Attribute, hierarchy?: Hierarchy) => void, translate: TFunction): MenuItemSection;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DrilldownSelection } from '../../types.js';
|
|
2
|
+
import { ChartWidgetProps } from '../../props.js';
|
|
3
|
+
type UseWithDrilldownParams = {
|
|
4
|
+
propsToExtend: ChartWidgetProps;
|
|
5
|
+
onDrilldownSelectionsChange?: (selections: DrilldownSelection[]) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const useWithDrilldown: ({ propsToExtend, onDrilldownSelectionsChange, }: UseWithDrilldownParams) => {
|
|
8
|
+
propsWithDrilldown: ChartWidgetProps;
|
|
9
|
+
isDrilldownEnabled: boolean | 0;
|
|
10
|
+
breadcrumbs: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export {};
|