@sisense/sdk-ui 2.7.0 → 2.9.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 +29 -29
- package/dist/ai.js +175 -193
- package/dist/analytics-composer/node.cjs +1 -0
- package/dist/analytics-composer/node.d.ts +1 -0
- package/dist/analytics-composer/node.js +897 -0
- package/dist/analytics-composer.cjs +118 -118
- package/dist/analytics-composer.js +2244 -2951
- package/dist/{derive-chart-family-DvYmrG1k.js → derive-chart-family-BLG1sO1D.js} +41019 -47803
- package/dist/derive-chart-family-QPmz5DJ3.cjs +656 -0
- package/dist/{dimensions-WmjaZcrG.js → dimensions-B2jz151s.js} +2 -3
- package/dist/dimensions-CVJeJ8mi.cjs +1 -0
- package/dist/execute-query-Cp3se7Yb.cjs +1 -0
- package/dist/execute-query-agpyzZz6.js +6406 -0
- package/dist/index.cjs +25 -25
- package/dist/index.js +6612 -6353
- package/dist/index.umd.js +355 -389
- package/dist/packages/sdk-ui/src/ai/common/icon-button.d.ts +1 -3
- package/dist/packages/sdk-ui/src/ai/messages/clickable-message.d.ts +0 -1
- package/dist/packages/sdk-ui/src/analytics-composer/index-node.d.ts +9 -0
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/common.d.ts +26 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts +44 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts +30 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query-to-jaql.d.ts +18 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query.d.ts +224 -0
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +28 -1
- package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +3 -1
- package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +3 -1
- package/dist/packages/sdk-ui/src/chart/helpers/use-translated-data-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/y-axis.d.ts +28 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/helpers/design-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/line-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data/index.d.ts +10 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data-options/index.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/design-options/index.d.ts +18 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/polar-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/area-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/helpers/design-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/labels-spacing.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/labels-spacing.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/labels-spacing.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/helpers/highchart-options/stacking.d.ts +21 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +9 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +7 -7
- package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart-data/data-coloring/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +155 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-settings.d.ts +39 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-transformers.d.ts +45 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/date-utils.d.ts +27 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +33 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +0 -10
- package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/defaults/cartesian.d.ts +4 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +5 -12
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +2 -2
- package/dist/packages/sdk-ui/src/common/icons/drag-handle-icon.d.ts +2 -1
- package/dist/packages/sdk-ui/src/const.d.ts +2 -0
- package/dist/packages/sdk-ui/src/custom-widgets-provider/types.d.ts +10 -1
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +5 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-edit-mode-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
- package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +1 -1
- package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +23 -0
- package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +45 -2
- package/dist/packages/sdk-ui/src/pivot-table/formatters/utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/get-pivot-table-data-point.d.ts +4 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts +32 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/use-apply-pivot-table-cell-events.d.ts +18 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +6 -3
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +8 -4
- package/dist/packages/sdk-ui/src/props.d.ts +122 -1
- package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +7 -6
- package/dist/packages/sdk-ui/src/query/date-formats/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query/execute-query.d.ts +3 -1
- package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/types.d.ts +9 -2
- package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/types.d.ts +57 -3
- package/dist/packages/sdk-ui/src/utils/__development-utils__/highcharts-options-builder-collector.d.ts +61 -0
- package/dist/packages/sdk-ui/src/utils/__development-utils__/input-output-collector.d.ts +125 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -1
- package/dist/packages/sdk-ui/src/widget-by-id/translate-panel-color-format.d.ts +9 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-statistical-models.d.ts +10 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +0 -14
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +6 -4
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -6
- package/dist/types-BYUVZb6u.js +80 -0
- package/dist/types-QUSMO7gF.cjs +1 -0
- package/dist/use-common-filters-DmdADAhl.cjs +350 -0
- package/dist/{use-common-filters-CVgB69Xe.js → use-common-filters-wo5IRF5u.js} +6326 -6441
- package/dist/{widget-composer-B4eAv2pf.js → widget-composer-BG4HonVl.js} +159 -239
- package/dist/{widget-composer-D0FZj1tX.cjs → widget-composer-CGp5yOny.cjs} +9 -9
- package/package.json +27 -17
- package/dist/derive-chart-family-BCY-GLVZ.cjs +0 -672
- package/dist/dimensions-DAISVpEZ.cjs +0 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +0 -41
- package/dist/use-common-filters-CRrL9rOQ.cjs +0 -350
|
@@ -975,6 +975,10 @@ export type DashboardThemeSettings = {
|
|
|
975
975
|
secondaryTextColor?: string;
|
|
976
976
|
/** Background color for the dashboard toolbar */
|
|
977
977
|
backgroundColor?: string;
|
|
978
|
+
/** Divider line color for the dashboard toolbar */
|
|
979
|
+
dividerLineColor?: string;
|
|
980
|
+
/** Divider line width for the dashboard toolbar */
|
|
981
|
+
dividerLineWidth?: number;
|
|
978
982
|
};
|
|
979
983
|
};
|
|
980
984
|
/**
|
|
@@ -986,14 +990,24 @@ export type FilterThemeSettings = {
|
|
|
986
990
|
titleColor?: string;
|
|
987
991
|
/** Background color */
|
|
988
992
|
backgroundColor?: string;
|
|
993
|
+
/** Divider line color for the filter panel */
|
|
994
|
+
dividerLineColor?: string;
|
|
995
|
+
/** Divider line width for the filter panel */
|
|
996
|
+
dividerLineWidth?: number;
|
|
989
997
|
/**
|
|
990
|
-
* Border color
|
|
998
|
+
* Border color for the filter panel component
|
|
999
|
+
*
|
|
1000
|
+
* **Note:** Does not apply to filter panel inside `Dashboard`
|
|
1001
|
+
* use dividerLineColor and dividerLineWidth instead
|
|
991
1002
|
*
|
|
992
1003
|
* @internal
|
|
993
1004
|
* */
|
|
994
1005
|
borderColor?: string;
|
|
995
1006
|
/**
|
|
996
|
-
* Border width
|
|
1007
|
+
* Border width for the filter panel component
|
|
1008
|
+
*
|
|
1009
|
+
* **Note:** Does not apply to filter panel inside `Dashboard`
|
|
1010
|
+
* use dividerLineColor and dividerLineWidth instead
|
|
997
1011
|
*
|
|
998
1012
|
* @internal
|
|
999
1013
|
* */
|
|
@@ -1311,7 +1325,16 @@ export type TextWidgetStyleOptions = {
|
|
|
1311
1325
|
/**
|
|
1312
1326
|
* Style settings defining the look and feel of CustomWidget
|
|
1313
1327
|
*/
|
|
1314
|
-
export type CustomWidgetStyleOptions = Record<string, unknown> &
|
|
1328
|
+
export type CustomWidgetStyleOptions = WidgetContainerStyleOptions & Record<string, unknown> & {
|
|
1329
|
+
/**
|
|
1330
|
+
* The width of the custom widget component.
|
|
1331
|
+
*/
|
|
1332
|
+
width?: number;
|
|
1333
|
+
/**
|
|
1334
|
+
* The height of the custom widget component.
|
|
1335
|
+
*/
|
|
1336
|
+
height?: number;
|
|
1337
|
+
};
|
|
1315
1338
|
/**
|
|
1316
1339
|
* Runs type guard check for ThemeOid.
|
|
1317
1340
|
*
|
|
@@ -1476,6 +1499,37 @@ export type TextWidgetDataPoint = {
|
|
|
1476
1499
|
/** HTML content of the text widget */
|
|
1477
1500
|
html?: string;
|
|
1478
1501
|
};
|
|
1502
|
+
/** Data point in a PivotTable. */
|
|
1503
|
+
export type PivotTableDataPoint = {
|
|
1504
|
+
/**
|
|
1505
|
+
* Boolean flag that defines if the data point is a data cell
|
|
1506
|
+
*
|
|
1507
|
+
* @internal
|
|
1508
|
+
*/
|
|
1509
|
+
isDataCell: boolean;
|
|
1510
|
+
/**
|
|
1511
|
+
* Boolean flag that defines if the data point is a caption cell
|
|
1512
|
+
*
|
|
1513
|
+
* @internal
|
|
1514
|
+
*/
|
|
1515
|
+
isCaptionCell: boolean;
|
|
1516
|
+
/**
|
|
1517
|
+
* Boolean flag that defines if the data point is a total cell (subtotal or grandtotal)
|
|
1518
|
+
*
|
|
1519
|
+
* @internal
|
|
1520
|
+
*/
|
|
1521
|
+
isTotalCell: boolean;
|
|
1522
|
+
/**
|
|
1523
|
+
* A collection of data point entries that represents values for all related `dataOptions`.
|
|
1524
|
+
*
|
|
1525
|
+
* @internal
|
|
1526
|
+
*/
|
|
1527
|
+
entries: {
|
|
1528
|
+
rows?: DataPointEntry[];
|
|
1529
|
+
columns?: DataPointEntry[];
|
|
1530
|
+
values?: DataPointEntry[];
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1479
1533
|
/**
|
|
1480
1534
|
* Data point in an Areamap chart.
|
|
1481
1535
|
*/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for decorating HighchartsOptionsBuilder objects with input/output collection.
|
|
3
|
+
* This enables comprehensive runtime data collection for all builder methods,
|
|
4
|
+
* making it easier to generate unit tests and understand builder behavior.
|
|
5
|
+
*/
|
|
6
|
+
import { HighchartsOptionsBuilder, HighchartBasedChartTypes } from '../../chart/restructured-charts/highchart-based-charts/types';
|
|
7
|
+
/**
|
|
8
|
+
* Generic decorator that wraps all methods of an object with input/output collection.
|
|
9
|
+
* Uses currying pattern: withMethodsInputOutputCollection(config)(objectToDecorate)
|
|
10
|
+
*
|
|
11
|
+
* This enables comprehensive runtime data collection for all object methods,
|
|
12
|
+
* making it easier to generate unit tests and understand object behavior.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Configuration options for the collection behavior
|
|
15
|
+
* @returns Function that takes the object to decorate and returns the decorated object
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Basic usage:
|
|
20
|
+
* const instrumentedBuilder = withMethodsInputOutputCollection({
|
|
21
|
+
* objectName: 'myChartBuilder',
|
|
22
|
+
* maxSnapshots: 50
|
|
23
|
+
* })(myChartBuilder);
|
|
24
|
+
*
|
|
25
|
+
* // After running the application:
|
|
26
|
+
* printCollectedInfo(); // Shows data for all object methods
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function withMethodsInputOutputCollection<T extends Record<string, any>>(options: {
|
|
30
|
+
/** Name identifier for the object (used in collection namespacing) */
|
|
31
|
+
objectName: string;
|
|
32
|
+
/** Maximum number of unique snapshots to collect per method (default: 100) */
|
|
33
|
+
maxSnapshots?: number;
|
|
34
|
+
}): (obj: T) => T;
|
|
35
|
+
/**
|
|
36
|
+
* Specific decorator for HighchartsOptionsBuilder that follows the generic pattern.
|
|
37
|
+
* Uses currying pattern: withHighchartsOptionsBuilderCollection(config)(builderToDecorate)
|
|
38
|
+
*
|
|
39
|
+
* Each method gets its own collection namespace (e.g., "barBuilder.getChart", "barBuilder.getSeries")
|
|
40
|
+
* to enable granular analysis of how different parts of the chart configuration are built.
|
|
41
|
+
*
|
|
42
|
+
* @param options - Configuration options for the collection behavior
|
|
43
|
+
* @returns Function that takes the builder to decorate and returns the decorated builder
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const instrumentedBuilder = withHighchartsOptionsBuilderDataCollections({
|
|
48
|
+
* builderName: 'myChartBuilder',
|
|
49
|
+
* maxSnapshots: 50
|
|
50
|
+
* })(myChartBuilder);
|
|
51
|
+
*
|
|
52
|
+
* // After running the application:
|
|
53
|
+
* printCollectedInfo(); // Shows data for all builder methods
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare function withHighchartsOptionsBuilderDataCollection<CT extends HighchartBasedChartTypes>(options: {
|
|
57
|
+
/** Name identifier for the builder (used in collection namespacing) */
|
|
58
|
+
builderName: string;
|
|
59
|
+
/** Maximum number of unique snapshots to collect per method (default: 100) */
|
|
60
|
+
maxSnapshots?: number;
|
|
61
|
+
}): (builder: HighchartsOptionsBuilder<CT>) => HighchartsOptionsBuilder<CT>;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input/Output Collection Decorator for Runtime Test Data Generation
|
|
3
|
+
*
|
|
4
|
+
* This module provides a decorator that collects unique input/output snapshots
|
|
5
|
+
* of function calls during runtime. This is useful for generating unit test data
|
|
6
|
+
* from actual application usage.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* 1. Wrap your function with the decorator:
|
|
10
|
+
* ```ts
|
|
11
|
+
* // With configuration:
|
|
12
|
+
* const myFunction = withInputOutputCollection({ maxSnapshots: 100 })(originalFunction);
|
|
13
|
+
*
|
|
14
|
+
* // With custom function name:
|
|
15
|
+
* const myFunction = withInputOutputCollection({
|
|
16
|
+
* maxSnapshots: 100,
|
|
17
|
+
* functionName: 'myCustomName'
|
|
18
|
+
* })(originalFunction);
|
|
19
|
+
*
|
|
20
|
+
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* 2. Run your application and exercise the function with various inputs
|
|
24
|
+
*
|
|
25
|
+
* 3. In the browser console (development only), call:
|
|
26
|
+
* - `printCollectedInfo()` - to view all collected data
|
|
27
|
+
* - `getCollectedData()` - to get data programmatically
|
|
28
|
+
* - `exportCollectedDataAsJson()` - to export as JSON string with function serialization
|
|
29
|
+
* - `parseCollectedDataFromJson(jsonString)` - to parse exported JSON and get function placeholders
|
|
30
|
+
* - `clearCollectedData()` - to clear collected data
|
|
31
|
+
* - `cleanup()` - to completely clean up the collector
|
|
32
|
+
*
|
|
33
|
+
* Features:
|
|
34
|
+
* - Intelligent deduplication prevents collecting identical input/output pairs
|
|
35
|
+
* - Robust deep equality checking handles functions, dates, and complex objects
|
|
36
|
+
* - Statistics tracking shows total calls vs unique snapshots
|
|
37
|
+
* - Configurable maximum number of snapshots
|
|
38
|
+
* - Deep cloning of inputs and outputs to avoid reference issues
|
|
39
|
+
* - Proper function serialization for unit test generation
|
|
40
|
+
* - Browser console integration for easy access (development only)
|
|
41
|
+
* - Automatic cleanup when no collected data remains
|
|
42
|
+
*/
|
|
43
|
+
interface CollectedData {
|
|
44
|
+
id: string;
|
|
45
|
+
timestamp: number;
|
|
46
|
+
args: any[];
|
|
47
|
+
result: any;
|
|
48
|
+
}
|
|
49
|
+
interface CollectionStore {
|
|
50
|
+
functionName: string;
|
|
51
|
+
data: CollectedData[];
|
|
52
|
+
totalCalls: number;
|
|
53
|
+
duplicateSkips: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Decorator that collects unique input/output snapshots for a function during runtime.
|
|
57
|
+
* Useful for generating unit test data from actual application usage.
|
|
58
|
+
*
|
|
59
|
+
* Uses currying pattern: withInputOutputCollection(config)(functionToDecorate)
|
|
60
|
+
*
|
|
61
|
+
* @param options - Configuration options for the collector
|
|
62
|
+
* @returns Function that takes the function to decorate and returns the decorated function
|
|
63
|
+
*/
|
|
64
|
+
export declare function withInputOutputCollection<TFunction extends (...args: any[]) => any>(options?: {
|
|
65
|
+
/** Maximum number of unique snapshots to collect (default: 100) */
|
|
66
|
+
maxSnapshots?: number;
|
|
67
|
+
/** Custom equality function for comparing arguments (default: deep equality) */
|
|
68
|
+
equalityFn?: (a: any[], b: any[]) => boolean;
|
|
69
|
+
/** Optional custom function name (defaults to function.name) */
|
|
70
|
+
functionName?: string;
|
|
71
|
+
}): (originalFunction: TFunction) => TFunction;
|
|
72
|
+
/**
|
|
73
|
+
* Prints all collected input/output data to the console.
|
|
74
|
+
* This function is attached to the window object for easy access in the browser.
|
|
75
|
+
*/
|
|
76
|
+
export declare function printCollectedInfo(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Returns all collected data as a serializable object.
|
|
79
|
+
* Useful for exporting test data programmatically.
|
|
80
|
+
*/
|
|
81
|
+
export declare function getCollectedData(): Record<string, CollectionStore>;
|
|
82
|
+
/**
|
|
83
|
+
* Clears all collected data.
|
|
84
|
+
* Useful for resetting the collection state.
|
|
85
|
+
* Removes window utilities if no data remains.
|
|
86
|
+
*/
|
|
87
|
+
export declare function clearCollectedData(functionName?: string): void;
|
|
88
|
+
/**
|
|
89
|
+
* Completely cleans up the input/output collector.
|
|
90
|
+
* Clears all data and removes window utilities.
|
|
91
|
+
* Useful for cleanup in test environments or when the collector is no longer needed.
|
|
92
|
+
*/
|
|
93
|
+
export declare function cleanup(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Exports collected data as JSON string with proper function serialization.
|
|
96
|
+
* Functions are represented as `[[Function - {functionName}]]` strings for easy replacement in unit tests.
|
|
97
|
+
*
|
|
98
|
+
* Example output:
|
|
99
|
+
* ```json
|
|
100
|
+
* {
|
|
101
|
+
* "buildHighchartsOptions": {
|
|
102
|
+
* "functionName": "buildHighchartsOptions",
|
|
103
|
+
* "data": [{
|
|
104
|
+
* "args": [{ "onBeforeRender": "[[Function - customRenderer]]" }],
|
|
105
|
+
* "result": { "chart": { "type": "line" } }
|
|
106
|
+
* }]
|
|
107
|
+
* }
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* Useful for saving test data to files.
|
|
112
|
+
*/
|
|
113
|
+
export declare function exportCollectedDataAsJson(): string;
|
|
114
|
+
/**
|
|
115
|
+
* Parses JSON data exported by exportCollectedDataAsJson and provides a function map for mocking.
|
|
116
|
+
* This is a utility function for unit tests to easily replace function placeholders with mocks.
|
|
117
|
+
*
|
|
118
|
+
* @param jsonData - The JSON string exported by exportCollectedDataAsJson
|
|
119
|
+
* @returns Object containing parsed data and a list of function placeholders found
|
|
120
|
+
*/
|
|
121
|
+
export declare function parseCollectedDataFromJson(jsonData: string): {
|
|
122
|
+
data: Record<string, CollectionStore>;
|
|
123
|
+
functionPlaceholders: string[];
|
|
124
|
+
};
|
|
125
|
+
export {};
|
|
@@ -4781,7 +4781,7 @@ export declare function getDashboardFilters(dashboardFilters: Array<FilterDto |
|
|
|
4781
4781
|
column: string;
|
|
4782
4782
|
datasource?: import("@sisense/sdk-data").JaqlDataSource | undefined;
|
|
4783
4783
|
title: string;
|
|
4784
|
-
level?: "years" | "quarters" | "months" | "weeks" | "
|
|
4784
|
+
level?: "years" | "quarters" | "months" | "weeks" | "days" | "minutes" | undefined;
|
|
4785
4785
|
sort?: "desc" | "asc" | undefined;
|
|
4786
4786
|
in?: {
|
|
4787
4787
|
selected?: {
|
|
@@ -3,4 +3,13 @@ import { ValueToColorMap, MultiColumnValueToColorMap, Color } from '../types.js'
|
|
|
3
3
|
import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types.js';
|
|
4
4
|
export declare const createValueColorOptions: (format?: PanelColorFormat, customPaletteColors?: Color[]) => DataColorOptions | undefined;
|
|
5
5
|
export declare const createValueToColorMap: (membersFormat: PanelMembersFormat) => ValueToColorMap;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a PanelColorFormat from DataColorOptions
|
|
8
|
+
*
|
|
9
|
+
* TODO: basic use cases done for the studio assistant, need more testing with real Fusion widgets
|
|
10
|
+
*
|
|
11
|
+
* @param options The DataColorOptions to convert
|
|
12
|
+
* @returns The corresponding PanelColorFormat
|
|
13
|
+
*/
|
|
14
|
+
export declare const createPanelColorFormat: (options: DataColorOptions | undefined, paletteColors?: Color[]) => PanelColorFormat | undefined;
|
|
6
15
|
export declare const createValueToColorMultiColumnsMap: (items: PanelItem[]) => MultiColumnValueToColorMap;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StyledMeasureColumn } from '../types.js';
|
|
2
|
+
import { StatisticalModels } from './types.js';
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare function applyStatisticalModels(dataOption: StyledMeasureColumn, statisticalModels?: StatisticalModels): StyledMeasureColumn;
|
|
5
|
+
/**
|
|
6
|
+
* Create statistical models from styled measure column
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function createStatisticalModels(column: StyledMeasureColumn): StatisticalModels | undefined;
|
|
@@ -2,20 +2,6 @@ import { JaqlDataSource } from '@sisense/sdk-data';
|
|
|
2
2
|
import { StyledMeasureColumn, StyledColumn, Color } from '../types.js';
|
|
3
3
|
import { Panel, PanelItem, FusionWidgetType, WidgetStyle, BoxplotWidgetStyle } from './types.js';
|
|
4
4
|
import { WidgetDataOptions } from '../models/index.js';
|
|
5
|
-
/** @internal */
|
|
6
|
-
export declare function applyStatisticalModels(dataOption: StyledMeasureColumn, statisticalModels?: {
|
|
7
|
-
forecast?: {
|
|
8
|
-
isEnabled: boolean;
|
|
9
|
-
isViewerDisabled: boolean;
|
|
10
|
-
confidence: number;
|
|
11
|
-
forecastPeriod: number;
|
|
12
|
-
};
|
|
13
|
-
trend?: {
|
|
14
|
-
isEnabled: boolean;
|
|
15
|
-
isViewerDisabled: boolean;
|
|
16
|
-
trendType: string;
|
|
17
|
-
};
|
|
18
|
-
}): StyledMeasureColumn;
|
|
19
5
|
export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledColumn | StyledMeasureColumn;
|
|
20
6
|
/** @internal */
|
|
21
7
|
export declare function createPanelItem(column: StyledColumn | StyledMeasureColumn): PanelItem;
|
|
@@ -184,25 +184,26 @@ export type StatisticalModels = {
|
|
|
184
184
|
};
|
|
185
185
|
forecastPeriod: number;
|
|
186
186
|
confidence: number;
|
|
187
|
-
modelType:
|
|
187
|
+
modelType: 'en' | 'aa' | 'hw' | 'fb';
|
|
188
188
|
boundaries: {
|
|
189
189
|
upper: {
|
|
190
190
|
isEnabled: boolean;
|
|
191
|
-
value: null;
|
|
191
|
+
value: number | null;
|
|
192
192
|
};
|
|
193
193
|
lower: {
|
|
194
194
|
isEnabled: boolean;
|
|
195
|
-
value: null;
|
|
195
|
+
value: number | null;
|
|
196
196
|
};
|
|
197
197
|
isInt: {
|
|
198
198
|
isEnabled: boolean;
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
|
+
isAccessible: boolean;
|
|
201
202
|
};
|
|
202
203
|
trend?: {
|
|
203
204
|
isEnabled: boolean;
|
|
204
205
|
isViewerDisabled: boolean;
|
|
205
|
-
trendType:
|
|
206
|
+
trendType: 'linear' | 'logarithmic' | 'smooth' | 'local';
|
|
206
207
|
ignoreAnomalies: boolean;
|
|
207
208
|
trendOnForecast: boolean;
|
|
208
209
|
compare: {
|
|
@@ -261,6 +262,7 @@ export type PanelColorFormatSingle = {
|
|
|
261
262
|
type: 'color';
|
|
262
263
|
color?: string;
|
|
263
264
|
colorIndex?: number;
|
|
265
|
+
isHandPickedColor?: boolean;
|
|
264
266
|
};
|
|
265
267
|
export type PanelColorFormatRange = {
|
|
266
268
|
type: 'range';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChartSubtype } from '../chart-options-processor/subtype-to-design-options.js';
|
|
2
2
|
import { ChartType, RenderToolbarHandler } from '../types.js';
|
|
3
3
|
import { Panel, PanelItem, TextWidgetDtoStyle, WidgetStyle, WidgetSubtype, FusionWidgetType } from './types.js';
|
|
4
|
-
import { ChartProps, ChartWidgetProps, PivotTableWidgetProps, CustomWidgetProps, TextWidgetProps, CommonWidgetProps, WithCommonWidgetProps, WidgetProps, WidgetType } from '../props';
|
|
4
|
+
import { ChartProps, ChartWidgetProps, PivotTableWidgetProps, CustomWidgetProps, TextWidgetProps, CommonWidgetProps, WithCommonWidgetProps, WidgetProps, WidgetType, PivotTableProps } from '../props';
|
|
5
5
|
import { WidgetTypeInternal } from '../models/widget/types';
|
|
6
6
|
import { WidgetModel } from '../models';
|
|
7
7
|
export { mergeFilters, getFilterRelationsFromJaql, convertFilterRelationsModelToJaql, getFilterCompareId, } from '@sisense/sdk-data';
|
|
@@ -97,7 +97,7 @@ export declare function registerDataPointClickHandler(widgetProps: WidgetProps,
|
|
|
97
97
|
*
|
|
98
98
|
* @internal
|
|
99
99
|
*/
|
|
100
|
-
export declare function registerDataPointContextMenuHandler(widgetProps: WidgetProps, handler: NonNullable<ChartProps['onDataPointContextMenu']>): void;
|
|
100
|
+
export declare function registerDataPointContextMenuHandler(widgetProps: WidgetProps, handler: NonNullable<ChartProps['onDataPointContextMenu'] | PivotTableProps['onDataPointContextMenu']>): void;
|
|
101
101
|
/**
|
|
102
102
|
* Registers new "onDataPointsSelected" handler for the Widget component
|
|
103
103
|
*
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledPrevButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
3
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
-
}, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
|
|
2
|
+
export declare const StyledPrevButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
|
|
5
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
4
|
}, {}, {}>;
|
|
7
|
-
export declare const StyledNextButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
8
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
9
|
-
}, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
|
|
5
|
+
export declare const StyledNextButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
|
|
10
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
7
|
}, {}, {}>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { f as i, g as l, h as n, i as o, D as d, k as u, M as s } from "./execute-query-agpyzZz6.js";
|
|
2
|
+
class m extends d {
|
|
3
|
+
constructor(e, t) {
|
|
4
|
+
var r;
|
|
5
|
+
super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = u(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return this.expression;
|
|
9
|
+
}
|
|
10
|
+
jaql(e) {
|
|
11
|
+
return e === !0 ? this.metadataItem.jaql : this.metadataItem;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets a serializable representation of the element
|
|
15
|
+
*/
|
|
16
|
+
serialize() {
|
|
17
|
+
const e = super.serialize();
|
|
18
|
+
return e.metadataItem = this.metadataItem, e.type = this.type, e;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const c = {
|
|
22
|
+
text: s.TextAttribute,
|
|
23
|
+
numeric: s.NumericAttribute,
|
|
24
|
+
datetime: s.DateLevel
|
|
25
|
+
}, h = (a) => a && a.__serializable === "JaqlElement";
|
|
26
|
+
function p(a) {
|
|
27
|
+
var e;
|
|
28
|
+
return new m(a, (e = c[a.jaql.datatype]) !== null && e !== void 0 ? e : "numeric");
|
|
29
|
+
}
|
|
30
|
+
function y(a) {
|
|
31
|
+
const { jaql: e } = a;
|
|
32
|
+
if (e.formula)
|
|
33
|
+
return i(e);
|
|
34
|
+
const t = l(e);
|
|
35
|
+
return "agg" in e && e.dim && e.datatype ? n({
|
|
36
|
+
expression: e.dim,
|
|
37
|
+
dataType: e.datatype,
|
|
38
|
+
agg: e.agg || "",
|
|
39
|
+
granularity: t,
|
|
40
|
+
format: void 0,
|
|
41
|
+
sort: e.sort,
|
|
42
|
+
title: e.title,
|
|
43
|
+
dataSource: e.datasource
|
|
44
|
+
}) : e.dim && e.datatype ? o({
|
|
45
|
+
expression: e.dim,
|
|
46
|
+
dataType: e.datatype,
|
|
47
|
+
granularity: t,
|
|
48
|
+
sort: e.sort,
|
|
49
|
+
title: e.title,
|
|
50
|
+
panel: a.panel,
|
|
51
|
+
dataSource: e.datasource
|
|
52
|
+
}) : p(a);
|
|
53
|
+
}
|
|
54
|
+
const q = {
|
|
55
|
+
jaql: {
|
|
56
|
+
datasource: {
|
|
57
|
+
title: "",
|
|
58
|
+
type: "elasticube"
|
|
59
|
+
},
|
|
60
|
+
metadata: []
|
|
61
|
+
},
|
|
62
|
+
queryTitle: "",
|
|
63
|
+
chartRecommendations: {}
|
|
64
|
+
}, f = {
|
|
65
|
+
model: "",
|
|
66
|
+
metadata: [],
|
|
67
|
+
chart: {},
|
|
68
|
+
queryTitle: ""
|
|
69
|
+
}, E = (a) => "widgetProps" in a, j = (a) => "dashboardOid" in a && "widgetOid" in a, b = (a) => "dashboardProps" in a, T = (a) => "dashboardOid" in a;
|
|
70
|
+
export {
|
|
71
|
+
f as E,
|
|
72
|
+
m as J,
|
|
73
|
+
T as a,
|
|
74
|
+
q as b,
|
|
75
|
+
y as c,
|
|
76
|
+
E as d,
|
|
77
|
+
b as e,
|
|
78
|
+
h as f,
|
|
79
|
+
j as i
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./execute-query-Cp3se7Yb.cjs");class s extends a.DimensionalElement{constructor(e,r){var i;super((i=e.jaql.title)!==null&&i!==void 0?i:"",r),this.__serializable="JaqlElement",this.expression=e.jaql.dim||e.jaql.formula,this.metadataItem=e,e.jaql.agg?this.aggregation=e.jaql.agg:delete this.aggregation,e.jaql.formula?this.formula=e.jaql.formula:delete this.formula,e.jaql.sort?this.sortType=a.getSortType(e.jaql.sort):delete this.sortType,this.skipValidation=!0}get id(){return this.expression}jaql(e){return e===!0?this.metadataItem.jaql:this.metadataItem}serialize(){const e=super.serialize();return e.metadataItem=this.metadataItem,e.type=this.type,e}}const l={text:a.MetadataTypes.TextAttribute,numeric:a.MetadataTypes.NumericAttribute,datetime:a.MetadataTypes.DateLevel},d=t=>t&&t.__serializable==="JaqlElement";function n(t){var e;return new s(t,(e=l[t.jaql.datatype])!==null&&e!==void 0?e:"numeric")}function o(t){const{jaql:e}=t;if(e.formula)return a.createCalculatedMeasureHelper(e);const r=a.getGranularityFromJaql(e);return"agg"in e&&e.dim&&e.datatype?a.createMeasureHelper({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:r,format:void 0,sort:e.sort,title:e.title,dataSource:e.datasource}):e.dim&&e.datatype?a.createAttributeHelper({expression:e.dim,dataType:e.datatype,granularity:r,sort:e.sort,title:e.title,panel:t.panel,dataSource:e.datasource}):n(t)}const u={jaql:{datasource:{title:"",type:"elasticube"},metadata:[]},queryTitle:"",chartRecommendations:{}},m={model:"",metadata:[],chart:{},queryTitle:""},c=t=>"widgetProps"in t,p=t=>"dashboardOid"in t&&"widgetOid"in t,g=t=>"dashboardProps"in t,y=t=>"dashboardOid"in t;exports.EMPTY_EXPANDED_QUERY_MODEL=u;exports.EMPTY_SIMPLE_QUERY_MODEL=m;exports.JaqlElement=s;exports.createDimensionalElementFromMetadataItem=o;exports.isByIdDashboardCodeParams=y;exports.isByIdWidgetCodeParams=p;exports.isClientSideDashboardCodeParams=g;exports.isClientSideWidgetCodeParams=c;exports.isJaqlElement=d;
|