@sisense/sdk-ui 2.18.1 → 2.19.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 +26 -26
- package/dist/ai.js +458 -443
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +21 -19
- package/dist/index.cjs +218 -218
- package/dist/index.js +4349 -4311
- package/dist/index.umd.js +380 -362
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +2 -1
- package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/process-function/custom-formula/process-custom-formula.d.ts +4 -2
- package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/process-function/custom-formula/validate-custom-formula.d.ts +11 -0
- package/dist/packages/sdk-ui/src/chart/helpers/use-synced-data.d.ts +5 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/apply-event-handlers.d.ts +19 -0
- package/dist/packages/sdk-ui/src/common/components/loading-overlay.d.ts +3 -4
- package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/components/toolbar/edit-toggle.d.ts +4 -0
- package/dist/packages/sdk-ui/src/dashboard/components/toolbar/filter-toggle.d.ts +4 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/{use-edit-mode-toolbar.d.ts → use-edit-mode-with-history.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +11 -2
- package/dist/{use-common-filters-Cps0frVZ.cjs → use-common-filters-34N34d-K.cjs} +113 -95
- package/dist/{use-common-filters-Db1VFZvT.js → use-common-filters-YqBj1IAH.js} +7431 -7416
- package/package.json +8 -8
|
@@ -80,6 +80,12 @@ export interface NlqResponseData extends ExpandedQueryModel {
|
|
|
80
80
|
userMsg: string;
|
|
81
81
|
/** @internal */
|
|
82
82
|
clarification?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Unique timestamp identifier for the response, used for memoization
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
timestamp?: string;
|
|
83
89
|
}
|
|
84
90
|
export interface NlqResponse {
|
|
85
91
|
data: NlqResponseData;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Data, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
3
|
import type { NlqResponseData } from '../../ai';
|
|
3
4
|
import { ChartWidgetProps } from '../../props';
|
|
@@ -58,4 +59,4 @@ export interface NlqChartWidgetProps {
|
|
|
58
59
|
* @group Generative AI
|
|
59
60
|
* @internal
|
|
60
61
|
*/
|
|
61
|
-
export declare const NlqChartWidget:
|
|
62
|
+
export declare const NlqChartWidget: import("react").NamedExoticComponent<NlqChartWidgetProps>;
|
|
@@ -2,8 +2,10 @@ import { FunctionContext, ProcessedArg } from '../../types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Custom processor for measureFactory.customFormula that:
|
|
4
4
|
* - Validates formula bracket references match context keys
|
|
5
|
-
* - Validates all context keys are used in the formula
|
|
6
|
-
* - Validates context is not empty
|
|
5
|
+
* - Validates all context keys are used in the formula (when context is provided)
|
|
6
|
+
* - Validates context is not empty only when formula contains bracket references
|
|
7
|
+
* - Allows empty context when formula has no bracket references (e.g., MOD(10, 7))
|
|
8
|
+
* - Validates formula is not empty
|
|
7
9
|
* - Transforms context items by executing nested function calls
|
|
8
10
|
* - Converts attribute strings to actual attribute objects
|
|
9
11
|
*
|
|
@@ -25,6 +25,9 @@ export interface FormulaValidationOptions {
|
|
|
25
25
|
* Validates that all bracket references in a custom formula exist in the provided context
|
|
26
26
|
* and provides helpful error messages for debugging.
|
|
27
27
|
*
|
|
28
|
+
* Empty context is allowed when the formula contains no bracket references (e.g., MOD(10, 7)).
|
|
29
|
+
* Context is required only when the formula contains bracket references.
|
|
30
|
+
*
|
|
28
31
|
* @example
|
|
29
32
|
* ```typescript
|
|
30
33
|
* const result = validateFormulaReferences(
|
|
@@ -36,6 +39,14 @@ export interface FormulaValidationOptions {
|
|
|
36
39
|
* throw new Error(result.errors.join('; '));
|
|
37
40
|
* }
|
|
38
41
|
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* // Empty context is allowed when no bracket references exist
|
|
46
|
+
* const result = validateFormulaReferences('MOD(10, 7)', {});
|
|
47
|
+
* // result.isValid === true
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
39
50
|
* @param formula - The formula string containing bracket references
|
|
40
51
|
* @param context - The context object mapping keys to attributes/measures/filters
|
|
41
52
|
* @param options - Additional validation options
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { Attribute, Data, DataSource, Filter, FilterRelations, Measure } from '@sisense/sdk-data';
|
|
3
2
|
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
4
3
|
import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
|
|
@@ -15,9 +14,12 @@ type UseSyncedDataProps = {
|
|
|
15
14
|
filters?: Filter[] | FilterRelations;
|
|
16
15
|
highlights?: Filter[];
|
|
17
16
|
refreshCounter?: number;
|
|
18
|
-
setIsLoading?: Dispatch<SetStateAction<boolean>>;
|
|
19
17
|
enabled?: boolean;
|
|
20
18
|
loadData: LoadDataFunction;
|
|
21
19
|
};
|
|
22
|
-
export declare const useSyncedData: ({ dataSet, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, filters, highlights, refreshCounter,
|
|
20
|
+
export declare const useSyncedData: ({ dataSet, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, filters, highlights, refreshCounter, enabled, loadData, }: UseSyncedDataProps) => {
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
data: Data;
|
|
23
|
+
dataOptions: ChartDataOptionsInternal;
|
|
24
|
+
};
|
|
23
25
|
export {};
|
|
@@ -1,12 +1,30 @@
|
|
|
1
|
+
import Highcharts from '@sisense/sisense-charts';
|
|
1
2
|
import { ChartDataOptionsInternal } from '..';
|
|
2
3
|
import { HighchartsOptionsInternal } from '../chart-options-processor/chart-options-service';
|
|
3
4
|
import { SisenseChartDataPointEventHandler, SisenseChartDataPointsEventHandler } from '../sisense-chart/types';
|
|
4
5
|
import { HighchartsPointerEvent, HighchartsSelectEvent } from '../types';
|
|
6
|
+
type HighchartsChartWithCustomProperties = Highcharts.Chart & {
|
|
7
|
+
/**
|
|
8
|
+
* Custom property that indicates that redraw was triggered by drill action,
|
|
9
|
+
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
isDrillingDownAction?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Method to drill up
|
|
15
|
+
* Exposed Highchart internal method
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
drillUp: () => void;
|
|
20
|
+
};
|
|
5
21
|
export type HighchartsEventOptions = {
|
|
6
22
|
chart: {
|
|
7
23
|
zoomType?: string;
|
|
8
24
|
events: {
|
|
9
25
|
selection?: (ev: HighchartsSelectEvent) => void;
|
|
26
|
+
drilldown?: (this: HighchartsChartWithCustomProperties) => void;
|
|
27
|
+
redraw?: (this: HighchartsChartWithCustomProperties) => void;
|
|
10
28
|
};
|
|
11
29
|
};
|
|
12
30
|
plotOptions: {
|
|
@@ -40,3 +58,4 @@ export declare function withEventHandlers(dataOptions: ChartDataOptionsInternal,
|
|
|
40
58
|
onDataPointContextMenu?: SisenseChartDataPointEventHandler;
|
|
41
59
|
onDataPointsSelected?: SisenseChartDataPointsEventHandler;
|
|
42
60
|
}): (chartOptions: HighchartsOptionsInternal) => HighchartsOptionsInternal;
|
|
61
|
+
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Component that displays a loading overlay.
|
|
4
|
-
* Overlay is active when query is executed within a chart.
|
|
5
4
|
*
|
|
6
|
-
* @param isVisible - visibility of the overlay.
|
|
5
|
+
* @param isVisible - visibility of the overlay (not work if loading indicator is disabled in app config).
|
|
7
6
|
* @returns Child component wrapped in dynamic overlay.
|
|
8
7
|
* @internal
|
|
9
8
|
*/
|
|
10
9
|
export declare const LoadingOverlay: ({ isVisible, children, }: {
|
|
11
|
-
isVisible
|
|
12
|
-
children
|
|
10
|
+
isVisible?: boolean | undefined;
|
|
11
|
+
children?: ReactNode;
|
|
13
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardContainerProps } from '../../dashboard/types';
|
|
2
|
-
export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource,
|
|
2
|
+
export declare const DashboardContainer: ({ editMode, onLayoutChange, renderToolbar, title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, filterPanelCollapsed, onFilterPanelCollapsedChange, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,10 @@ export interface EditToggleProps {
|
|
|
13
13
|
* Whether the history is currently enabled
|
|
14
14
|
*/
|
|
15
15
|
isHistoryEnabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Color of the edit toggle button
|
|
18
|
+
*/
|
|
19
|
+
color?: string;
|
|
16
20
|
/**
|
|
17
21
|
* Callback function called when the edit toggle button is clicked
|
|
18
22
|
*/
|
|
@@ -4,6 +4,10 @@ export interface FilterToggleProps {
|
|
|
4
4
|
* Whether the filter panel is currently collapsed
|
|
5
5
|
*/
|
|
6
6
|
isFilterPanelCollapsed: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Color of the filter toggle button
|
|
9
|
+
*/
|
|
10
|
+
color?: string;
|
|
7
11
|
/**
|
|
8
12
|
* Callback function called when the filter toggle button is clicked
|
|
9
13
|
*/
|
|
@@ -51,4 +51,4 @@ export interface UseEditModeToolbarResult {
|
|
|
51
51
|
* @returns Layout state and toolbar component
|
|
52
52
|
* @internal
|
|
53
53
|
*/
|
|
54
|
-
export declare function
|
|
54
|
+
export declare function useEditModeWithHistory({ initialLayout, onApply, onCancel, historyCapacity, }: UseEditModeToolbarProps): UseEditModeToolbarResult;
|
|
@@ -96,16 +96,25 @@ export interface DashboardContainerProps {
|
|
|
96
96
|
title: string;
|
|
97
97
|
layoutOptions?: DashboardLayoutOptions;
|
|
98
98
|
config?: DashboardConfig;
|
|
99
|
+
editMode: boolean;
|
|
99
100
|
widgets: WidgetProps[];
|
|
100
101
|
filters: Filter[] | FilterRelations;
|
|
101
102
|
onFiltersChange: (filters: Filter[] | FilterRelations) => void;
|
|
102
103
|
defaultDataSource?: DataSource;
|
|
104
|
+
filterPanelCollapsed: boolean;
|
|
105
|
+
onFilterPanelCollapsedChange: (collapsed: boolean) => void;
|
|
103
106
|
/**
|
|
104
|
-
* Callback to receive changes
|
|
107
|
+
* Callback to receive layout changes
|
|
105
108
|
*
|
|
106
109
|
* @internal
|
|
107
110
|
*/
|
|
108
|
-
|
|
111
|
+
onLayoutChange: (layout: WidgetsPanelLayout) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Render the toolbar
|
|
114
|
+
*
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
renderToolbar?: () => ReactNode;
|
|
109
118
|
}
|
|
110
119
|
/**
|
|
111
120
|
* Dashboard filters panel configuration
|