@sisense/sdk-ui 1.21.0 → 1.23.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 +57 -49
- package/dist/ai.js +844 -744
- package/dist/analytics-composer.cjs +89 -148
- package/dist/analytics-composer.js +1198 -1481
- package/dist/{get-widget-options-NhNoIBS9.js → derive-chart-family-CTpRObm1.js} +11138 -11042
- package/dist/{get-widget-options-BmZF5Ztf.cjs → derive-chart-family-DcALKnKU.cjs} +100 -100
- package/dist/index.cjs +116 -116
- package/dist/index.js +9303 -8779
- package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +3 -23
- package/dist/packages/sdk-ui/src/ai/chart/chart-insights.d.ts +5 -0
- package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +41 -0
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/icons/ai-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/ai/index.d.ts +2 -3
- package/dist/packages/sdk-ui/src/ai/messages/chart-message.d.ts +1 -2
- package/dist/packages/sdk-ui/src/ai/use-get-data-source-fields.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → code}/code-templates.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → code}/generate-code.d.ts +3 -3
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → common}/utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +12 -1
- package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → query}/query-translator.d.ts +2 -3
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +149 -0
- package/dist/packages/sdk-ui/src/{ai/messages → analytics-composer/widget/chart-options}/get-widget-options.d.ts +5 -14
- package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-filters.d.ts +2 -0
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-props.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/widget/widget-composer.d.ts +15 -0
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +5 -1
- package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +1 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +60 -16
- package/dist/packages/sdk-ui/src/app/settings/settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/app/settings/types/user.d.ts +0 -1
- 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/helpers/derive-chart-family.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart-data-options/utils.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/components/menu/types.d.ts +1 -0
- 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/decorators/hook-decorators/with-tracking.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/common/member-radio.d.ts +8 -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/filters/components/member-filter-tile/member-list.d.ts +1 -0
- package/dist/packages/sdk-ui/src/formulas/use-get-shared-formula.d.ts +2 -2
- package/dist/packages/sdk-ui/src/index.d.ts +28 -13
- 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/translate-dashboard-utils.d.ts +1 -1
- 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 +3 -4
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-models.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/hierarchy/hierarchy-model-translator.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 +19 -1
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/props.d.ts +47 -24
- 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/types.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/sisense-context/custom-sisense-context-provider.d.ts +1 -3
- package/dist/packages/sdk-ui/src/sisense-context/sisense-context.d.ts +3 -0
- package/dist/packages/sdk-ui/src/translation/i18n-provider.d.ts +3 -1
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +114 -2
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +206 -4
- package/dist/packages/sdk-ui/src/types.d.ts +33 -5
- package/dist/packages/sdk-ui/src/utils/filters.d.ts +1 -0
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/dashboard-widget.d.ts +4 -3
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +4800 -0
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-panel-color-format.d.ts +3 -3
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-data-options.d.ts +15 -5
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-drilldown-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-filters.d.ts +85 -83
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/use-fetch-widget-dto-model.d.ts +3 -3
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/utils.d.ts +6 -13
- package/dist/packages/sdk-ui/src/widget-by-id/widget-by-id.d.ts +26 -0
- 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} +14 -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 +27 -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 → useQuery-1xZMqnAI.js} +40059 -39949
- package/dist/useQuery-D9rZ58KS.cjs +821 -0
- package/dist/widget-composer-B17DVa2A.cjs +101 -0
- package/dist/widget-composer-DqjH_6dw.js +448 -0
- package/package.json +9 -9
- package/dist/packages/sdk-ui/src/ai/api/errors.d.ts +0 -4
- package/dist/packages/sdk-ui/src/ai/messages/jaql-element.d.ts +0 -28
- package/dist/packages/sdk-ui/src/analytics-composer/translators/index.d.ts +0 -3
- package/dist/packages/sdk-ui/src/analytics-composer/translators/model-translator.d.ts +0 -48
- package/dist/packages/sdk-ui/src/analytics-composer/translators/translate-filters-to-code.d.ts +0 -2
- package/dist/packages/sdk-ui/src/analytics-composer/translators/types.d.ts +0 -95
- package/dist/packages/sdk-ui/src/dashboard-widget/translate-dashboard-filters.d.ts +0 -4798
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-connector.d.ts +0 -19
- package/dist/table-widget-BikAZUJv.cjs +0 -821
- /package/dist/packages/sdk-ui/src/analytics-composer/{translators → query}/query-templates.d.ts +0 -0
- /package/dist/packages/sdk-ui/src/analytics-composer/{translators/translate-props-to-code.d.ts → widget/stringify-props.d.ts} +0 -0
- /package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-style-options.d.ts +0 -0
package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GetDashboardModelParams } from '../../../models';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
import { UseDashboardModelAction } from './use-dashboard-model-reducer';
|
|
4
|
+
export interface UseDashboardModelParams extends GetDashboardModelParams {
|
|
5
|
+
/**
|
|
6
|
+
* Boolean flag indicating whether changes to the dashboard state should be saved to the dashboard in Fusion
|
|
7
|
+
* @default true
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
persist?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This hook allows you to retrieve and manage a dashboard model from a Sisense instance.
|
|
14
|
+
* It handles fetching the existing dashboard, managing its local state, and saving any changes back to the Sisense server.
|
|
15
|
+
* (only filters persist supported for now)
|
|
16
|
+
*
|
|
17
|
+
* @returns Dashboard load state that contains the status of the execution, the result dashboard model, or the error if any, function to dispatch changes to the dashboard model.
|
|
18
|
+
* @group Fusion Embed
|
|
19
|
+
* @fusionEmbed
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const useDashboardModel: (args_0: UseDashboardModelParams) => {
|
|
23
|
+
dashboard: import('../../../models').UseDashboardModelState;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
isError: boolean;
|
|
26
|
+
dispatchChanges: Dispatch<UseDashboardModelAction>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* {@link useDashboardModel} without tracking to be used inside other hooks or components in Compose SDK.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function useDashboardModelInternal({ dashboardOid, includeWidgets, includeFilters, persist, }: UseDashboardModelParams): {
|
|
34
|
+
dashboard: import('../../../models').UseDashboardModelState;
|
|
35
|
+
isLoading: boolean;
|
|
36
|
+
isError: boolean;
|
|
37
|
+
dispatchChanges: Dispatch<UseDashboardModelAction>;
|
|
38
|
+
};
|
|
@@ -72,7 +72,7 @@ export type DashboardModelSuccessState = {
|
|
|
72
72
|
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
|
-
* An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `
|
|
75
|
+
* An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `WidgetById`:
|
|
76
76
|
```tsx
|
|
77
77
|
const { dashboard, isLoading, isError } = useGetDashboardModel({
|
|
78
78
|
dashboardOid: '6448665edac1920034bce7a8',
|
|
@@ -89,7 +89,7 @@ export type DashboardModelSuccessState = {
|
|
|
89
89
|
<div>
|
|
90
90
|
{`Dashboard Title - ${dashboard.title}`}
|
|
91
91
|
{dashboard.widgets?.map((widget) => (
|
|
92
|
-
<
|
|
92
|
+
<WidgetById key={widget.oid} widgetOid={widget.oid} dashboardOid={dashboard.oid} />
|
|
93
93
|
))}
|
|
94
94
|
</div>
|
|
95
95
|
);
|
|
@@ -97,7 +97,7 @@ export type DashboardModelSuccessState = {
|
|
|
97
97
|
return null;
|
|
98
98
|
```
|
|
99
99
|
* @returns Dashboard load state that contains the status of the execution, the result dashboard model, or the error if any
|
|
100
|
-
* @group Fusion
|
|
100
|
+
* @group Fusion Assets
|
|
101
101
|
* @fusionEmbed
|
|
102
102
|
*/
|
|
103
103
|
export declare const useGetDashboardModel: (params: GetDashboardModelParams) => DashboardModelState;
|
|
@@ -105,7 +105,6 @@ export declare const useGetDashboardModel: (params: GetDashboardModelParams) =>
|
|
|
105
105
|
* {@link useGetDashboardModel} without tracking to be used inside other hooks or components in Compose SDK.
|
|
106
106
|
*
|
|
107
107
|
* @param params - Parameters of the dashboard to be retrieved
|
|
108
|
-
*
|
|
109
108
|
* @internal
|
|
110
109
|
*/
|
|
111
110
|
export declare function useGetDashboardModelInternal(params: GetDashboardModelParams): DashboardModelState;
|
|
@@ -82,7 +82,7 @@ export type DashboardModelsSuccessState = {
|
|
|
82
82
|
return null;
|
|
83
83
|
```
|
|
84
84
|
* @returns Load state that contains the status of the execution, the result dashboards, or the error if any
|
|
85
|
-
* @group Fusion
|
|
85
|
+
* @group Fusion Assets
|
|
86
86
|
* @fusionEmbed
|
|
87
87
|
*/
|
|
88
88
|
export declare const useGetDashboardModels: (params?: GetDashboardModelsParams | undefined) => DashboardModelsState;
|
|
@@ -62,7 +62,7 @@ export type HierarchyModelsSuccessState = {
|
|
|
62
62
|
status: 'success';
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
|
-
* React hook that retrieves existing hierarchy models from a Fusion
|
|
65
|
+
* React hook that retrieves existing hierarchy models from a Fusion instance.
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
68
|
* Retrieve the hierarchy models and render their counts.
|
|
@@ -84,7 +84,7 @@ export type HierarchyModelsSuccessState = {
|
|
|
84
84
|
return null;
|
|
85
85
|
```
|
|
86
86
|
* @returns Load state that contains the status of the execution, the result hierarchy models, or the error if one has occurred
|
|
87
|
-
* @group Fusion
|
|
87
|
+
* @group Fusion Assets
|
|
88
88
|
* @fusionEmbed
|
|
89
89
|
*/
|
|
90
90
|
export declare const useGetHierarchyModels: (params: GetHierarchiesParams) => HierarchyModelsState;
|
|
@@ -69,7 +69,7 @@ export type WidgetModelSuccessState = {
|
|
|
69
69
|
status: 'success';
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
72
|
-
* React hook that retrieves an existing widget model from a Fusion
|
|
72
|
+
* React hook that retrieves an existing widget model from a Fusion instance.
|
|
73
73
|
*
|
|
74
74
|
* **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
75
75
|
*
|
|
@@ -89,7 +89,7 @@ export type WidgetModelSuccessState = {
|
|
|
89
89
|
* - [Modify Chart Type](https://www.sisense.com/platform/compose-sdk/playground/?example=fusion-assets%2Fuse-get-widget-model-change-chart-type)
|
|
90
90
|
*
|
|
91
91
|
* @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
|
|
92
|
-
* @group Fusion
|
|
92
|
+
* @group Fusion Assets
|
|
93
93
|
* @fusionEmbed
|
|
94
94
|
*/
|
|
95
95
|
export declare const useGetWidgetModel: (params: GetWidgetModelParams) => WidgetModelState;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../query-execution';
|
|
2
2
|
import { WidgetModel } from './widget-model.js';
|
|
3
3
|
import { ChartProps, ChartWidgetProps, WidgetProps, PivotTableProps, PivotTableWidgetProps, PluginWidgetProps, TableProps, TableWidgetProps, TextWidgetProps, CommonWidgetProps } from '../../props';
|
|
4
|
+
import { JaqlDataSource } from '@sisense/sdk-data';
|
|
4
5
|
import { CompleteThemeSettings } from '../../types.js';
|
|
5
|
-
import { WidgetDto } from '../../
|
|
6
|
+
import { WidgetDto } from '../../widget-by-id/types.js';
|
|
6
7
|
import { AppSettings } from '../../app/settings/settings.js';
|
|
7
8
|
/**
|
|
8
9
|
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
|
|
@@ -143,3 +144,20 @@ export declare function toWidgetProps(widgetModel: WidgetModel): WidgetProps;
|
|
|
143
144
|
* @internal
|
|
144
145
|
*/
|
|
145
146
|
export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): WidgetModel;
|
|
147
|
+
/**
|
|
148
|
+
* Creates a {@link WidgetModel} from a {@link ChartWidgetProps}.
|
|
149
|
+
*
|
|
150
|
+
* @param chartWidgetProps - The ChartWidgetProps to be converted to a widget model
|
|
151
|
+
* @returns WidgetModel
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps): WidgetModel;
|
|
155
|
+
/**
|
|
156
|
+
* Translates a {@link WidgetModel} to {@link WidgetDto}.
|
|
157
|
+
*
|
|
158
|
+
* @param widgetModel - The WidgetModel to be converted to a widgetDto
|
|
159
|
+
* @param dataSource - The full datasource details
|
|
160
|
+
* @returns WidgetDto
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource: JaqlDataSource): WidgetDto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartDataOptions, PivotTableDataOptions } from '../../chart-data-options/types';
|
|
3
|
-
import { WidgetType } from '../../
|
|
3
|
+
import { WidgetType } from '../../widget-by-id/types';
|
|
4
4
|
import { ChartProps, ChartWidgetProps, PivotTableProps, TableProps, TableWidgetProps, PivotTableWidgetProps, TextWidgetProps } from '../../props';
|
|
5
5
|
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../query-execution';
|
|
6
6
|
import { ChartType, DrilldownOptions, WidgetStyleOptions } from '../../types';
|
|
@@ -12,7 +12,7 @@ export type WidgetDataOptions = ChartDataOptions | PivotTableDataOptions | Empty
|
|
|
12
12
|
/**
|
|
13
13
|
* Model of Sisense widget defined in the abstractions of Compose SDK.
|
|
14
14
|
*
|
|
15
|
-
* @group Fusion
|
|
15
|
+
* @group Fusion Assets
|
|
16
16
|
* @fusionEmbed
|
|
17
17
|
*/
|
|
18
18
|
export interface WidgetModel {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Attribute, Filter, Measure, DataSource, Data, QueryResultData, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
-
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions,
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, WidgetByIdStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions, RegularChartType, RegularChartStyleOptions, TabularChartStyleOptions, TableStyleOptions, AreaRangeStyleOptions, DrilldownSelection, TextWidgetStyleOptions, GenericDataOptions, DashboardWidgetStyleOptions } from './types';
|
|
3
3
|
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
4
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
5
|
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions, RegularChartDataOptions, TabularChartDataOptions, RangeChartDataOptions } from './chart-data-options/types';
|
|
6
6
|
import { AppConfig } from './app/client-application';
|
|
7
7
|
import { ExecuteQueryParams, QueryByWidgetIdState } from './query-execution';
|
|
8
|
-
import { FiltersMergeStrategy } from './
|
|
8
|
+
import { FiltersMergeStrategy } from './widget-by-id/types';
|
|
9
9
|
import { HookEnableParam } from './common/hooks/types';
|
|
10
10
|
import { ExecuteQueryResult } from './query-execution/types';
|
|
11
11
|
import { Hierarchy } from './models';
|
|
12
|
+
import { BeforeMenuOpenHandler } from './common/components/menu/types';
|
|
12
13
|
export type { MenuItemSection, HighchartsOptions };
|
|
13
14
|
/**
|
|
14
15
|
* Configurations and authentication for Sisense Context.
|
|
@@ -91,17 +92,6 @@ export interface SisenseContextProviderProps {
|
|
|
91
92
|
* @category Sisense App Error Handling
|
|
92
93
|
*/
|
|
93
94
|
onError?: (error: Error) => void;
|
|
94
|
-
/**
|
|
95
|
-
* Boolean flag to enable sending tracking events to the Sisense instance.
|
|
96
|
-
*
|
|
97
|
-
* If not specified, the default value is `true`.
|
|
98
|
-
*
|
|
99
|
-
* Deprecated: Use {@link AppConfig.trackingConfig | trackingConfig.enabled }
|
|
100
|
-
*
|
|
101
|
-
* @deprecated Use {@link AppConfig.trackingConfig | trackingConfig.enabled }
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
enableTracking?: boolean;
|
|
105
95
|
/**
|
|
106
96
|
* Boolean flag to enable sending silent pre-authentication requests to the Sisense instance.
|
|
107
97
|
* Used to check if user is already authenticated, check is performed in an ivisible iframe.
|
|
@@ -157,7 +147,7 @@ export interface ExecuteQueryProps {
|
|
|
157
147
|
*
|
|
158
148
|
* OR
|
|
159
149
|
*
|
|
160
|
-
* (2) `ThemeOid` -- Theme identifier as defined in a Fusion
|
|
150
|
+
* (2) `ThemeOid` -- Theme identifier as defined in a Fusion instance (**Admin > App Configuration > Look and Feel**).
|
|
161
151
|
* See [Customizing the Sisense User Interface](https://docs.sisense.com/main/SisenseLinux/customizing-the-sisense-user-interface.htm) for more details.
|
|
162
152
|
*/
|
|
163
153
|
export type ThemeProviderProps = PropsWithChildren<{
|
|
@@ -259,7 +249,7 @@ interface HighchartsBasedChartEventProps {
|
|
|
259
249
|
* [options values](https://api.highcharts.com/highcharts/) and then return the modified options
|
|
260
250
|
* object. The returned options are then used when rendering the chart.
|
|
261
251
|
*
|
|
262
|
-
* This callback is not supported for Indicator Chart, Areamap Chart,
|
|
252
|
+
* This callback is not supported for Indicator Chart, Areamap Chart, Scattermap Chart, and Table.
|
|
263
253
|
*
|
|
264
254
|
* For an example of how the `onBeforeRender` callback can be used, see the
|
|
265
255
|
* [Compose SDK Charts Guide](/guides/sdk/guides/charts/guide-compose-sdk-charts.html#callbacks).
|
|
@@ -268,11 +258,21 @@ interface HighchartsBasedChartEventProps {
|
|
|
268
258
|
*/
|
|
269
259
|
onBeforeRender?: BeforeRenderHandler;
|
|
270
260
|
}
|
|
261
|
+
interface BaseChartEventProps {
|
|
262
|
+
/**
|
|
263
|
+
* A callback that allows to modify data immediately after it has been retrieved.
|
|
264
|
+
* Can be used to inject modification of queried data.
|
|
265
|
+
*
|
|
266
|
+
* @category Callbacks
|
|
267
|
+
* @internal
|
|
268
|
+
*/
|
|
269
|
+
onDataReady?: (data: Data) => Data;
|
|
270
|
+
}
|
|
271
271
|
/**
|
|
272
272
|
* Event props for regular (non-specific) charts which uses DataPoint type
|
|
273
273
|
* to describe data points for events.
|
|
274
274
|
*/
|
|
275
|
-
interface RegularChartEventProps extends HighchartsBasedChartEventProps {
|
|
275
|
+
interface RegularChartEventProps extends BaseChartEventProps, HighchartsBasedChartEventProps {
|
|
276
276
|
/**
|
|
277
277
|
* A callback that allows you to customize what happens when a data point is clicked.
|
|
278
278
|
*
|
|
@@ -302,7 +302,7 @@ interface RegularChartEventProps extends HighchartsBasedChartEventProps {
|
|
|
302
302
|
* Event props for Scatter chart which uses ScatterDataPoint type
|
|
303
303
|
* to describe data points for events.
|
|
304
304
|
*/
|
|
305
|
-
interface ScatterChartEventProps extends HighchartsBasedChartEventProps {
|
|
305
|
+
interface ScatterChartEventProps extends BaseChartEventProps, HighchartsBasedChartEventProps {
|
|
306
306
|
/**
|
|
307
307
|
* Click handler callback for a data point
|
|
308
308
|
*
|
|
@@ -350,7 +350,7 @@ interface ScattermapChartEventProps {
|
|
|
350
350
|
* Event props for Boxplot chart which uses BoxplotDataPoint type
|
|
351
351
|
* to describe data points for events.
|
|
352
352
|
*/
|
|
353
|
-
interface BoxplotChartEventProps extends HighchartsBasedChartEventProps {
|
|
353
|
+
interface BoxplotChartEventProps extends BaseChartEventProps, HighchartsBasedChartEventProps {
|
|
354
354
|
/**
|
|
355
355
|
* Click handler callback for a data point
|
|
356
356
|
*
|
|
@@ -375,7 +375,7 @@ interface BoxplotChartEventProps extends HighchartsBasedChartEventProps {
|
|
|
375
375
|
*
|
|
376
376
|
* @internal
|
|
377
377
|
*/
|
|
378
|
-
export interface BaseChartProps {
|
|
378
|
+
export interface BaseChartProps extends BaseChartEventProps {
|
|
379
379
|
/**
|
|
380
380
|
* Data set for a chart using one of the following options. If neither option is specified, the chart
|
|
381
381
|
* will use the `defaultDataSource` specified in the parent `SisenseContextProvider`
|
|
@@ -471,7 +471,7 @@ export interface BaseChartProps {
|
|
|
471
471
|
/**
|
|
472
472
|
* Chart props to be able to react on chart events.
|
|
473
473
|
*/
|
|
474
|
-
interface ChartEventProps extends HighchartsBasedChartEventProps {
|
|
474
|
+
interface ChartEventProps extends BaseChartEventProps, HighchartsBasedChartEventProps {
|
|
475
475
|
/**
|
|
476
476
|
* Click handler callback for a data point
|
|
477
477
|
*
|
|
@@ -797,9 +797,9 @@ export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProp
|
|
|
797
797
|
styleOptions?: ScatterStyleOptions;
|
|
798
798
|
}
|
|
799
799
|
/**
|
|
800
|
-
* Props for the {@link
|
|
800
|
+
* Props for the {@link WidgetById} component
|
|
801
801
|
*/
|
|
802
|
-
export interface
|
|
802
|
+
export interface WidgetByIdProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'> {
|
|
803
803
|
/**
|
|
804
804
|
* Identifier of the widget
|
|
805
805
|
*
|
|
@@ -859,7 +859,7 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
|
|
|
859
859
|
*
|
|
860
860
|
* @category Widget
|
|
861
861
|
*/
|
|
862
|
-
styleOptions?:
|
|
862
|
+
styleOptions?: WidgetByIdStyleOptions;
|
|
863
863
|
/**
|
|
864
864
|
* {@inheritDoc ChartWidgetProps.drilldownOptions}
|
|
865
865
|
*
|
|
@@ -868,6 +868,19 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
|
|
|
868
868
|
*/
|
|
869
869
|
drilldownOptions?: DrilldownOptions;
|
|
870
870
|
}
|
|
871
|
+
/**
|
|
872
|
+
* Props for the {@link DashboardWidget} component
|
|
873
|
+
*
|
|
874
|
+
* @deprecated Use {@link WidgetById} and {@link WidgetByIdProps} instead
|
|
875
|
+
*/
|
|
876
|
+
export interface DashboardWidgetProps extends WidgetByIdProps {
|
|
877
|
+
/**
|
|
878
|
+
* Style options for the widget including the widget container and the chart or table inside.
|
|
879
|
+
*
|
|
880
|
+
* @category Widget
|
|
881
|
+
*/
|
|
882
|
+
styleOptions?: DashboardWidgetStyleOptions;
|
|
883
|
+
}
|
|
871
884
|
/**
|
|
872
885
|
* Props for the {@link ChartWidget} component
|
|
873
886
|
*
|
|
@@ -1162,12 +1175,22 @@ export interface PluginWidgetProps {
|
|
|
1162
1175
|
* This is used to extend the props of a widget with its respective widget type.
|
|
1163
1176
|
*/
|
|
1164
1177
|
export type WithWidgetType<W extends ChartWidgetProps | PivotTableWidgetProps | TextWidgetProps | PluginWidgetProps, T extends 'chart' | 'pivot' | 'text' | 'plugin'> = W & {
|
|
1178
|
+
/**
|
|
1179
|
+
* Widget type
|
|
1180
|
+
*/
|
|
1165
1181
|
widgetType: T;
|
|
1166
1182
|
};
|
|
1167
1183
|
/**
|
|
1168
1184
|
* Props for the facade widget component.
|
|
1169
1185
|
*/
|
|
1170
|
-
export type CommonWidgetProps = WithWidgetType<ChartWidgetProps, 'chart'> | WithWidgetType<PivotTableWidgetProps, 'pivot'> | WithWidgetType<TextWidgetProps, 'text'> | WithWidgetType<PluginWidgetProps, 'plugin'
|
|
1186
|
+
export type CommonWidgetProps = (WithWidgetType<ChartWidgetProps, 'chart'> | WithWidgetType<PivotTableWidgetProps, 'pivot'> | WithWidgetType<TextWidgetProps, 'text'> | WithWidgetType<PluginWidgetProps, 'plugin'>) & {
|
|
1187
|
+
/**
|
|
1188
|
+
* Optional handler function to process menu options before opening the context menu.
|
|
1189
|
+
*
|
|
1190
|
+
* @internal
|
|
1191
|
+
*/
|
|
1192
|
+
onBeforeMenuOpen?: BeforeMenuOpenHandler;
|
|
1193
|
+
};
|
|
1171
1194
|
/**
|
|
1172
1195
|
* Props for the widget component within a container component like dashboard.
|
|
1173
1196
|
*/
|
|
@@ -35,7 +35,7 @@ import { ExecuteQueryByWidgetIdProps } from '../props';
|
|
|
35
35
|
* ```
|
|
36
36
|
* @param props - ExecuteQueryByWidgetId properties
|
|
37
37
|
* @returns ExecuteQueryByWidgetId component
|
|
38
|
-
* @group Fusion
|
|
38
|
+
* @group Fusion Assets
|
|
39
39
|
* @fusionEmbed
|
|
40
40
|
*/
|
|
41
41
|
export declare const ExecuteQueryByWidgetId: FunctionComponent<ExecuteQueryByWidgetIdProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Attribute, DataSource, Filter, FilterRelations, Measure, PivotAttribute, PivotGrandTotals, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
|
|
2
2
|
import { DataLoadAction } from '../common/hooks/data-load-state-reducer';
|
|
3
|
-
import { FiltersMergeStrategy } from '../
|
|
3
|
+
import { FiltersMergeStrategy } from '../widget-by-id/types';
|
|
4
4
|
/**
|
|
5
5
|
* State of a query execution.
|
|
6
6
|
*/
|
|
@@ -28,7 +28,7 @@ import { QueryResultData } from '@sisense/sdk-data';
|
|
|
28
28
|
```
|
|
29
29
|
* See also hook {@link useExecuteQuery}, which execute a query specified in code.
|
|
30
30
|
* @returns Query state that contains the status of the query execution, the result data, the constructed query parameters, or the error if any occurred
|
|
31
|
-
* @group Fusion
|
|
31
|
+
* @group Fusion Assets
|
|
32
32
|
* @fusionEmbed
|
|
33
33
|
*/
|
|
34
34
|
export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => QueryByWidgetIdState;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren, type FunctionComponent } from 'react';
|
|
2
2
|
import { SisenseContextPayload } from './sisense-context';
|
|
3
3
|
/** @internal */
|
|
4
|
-
export type CustomSisenseContext = SisenseContextPayload
|
|
5
|
-
showRuntimeErrors: boolean;
|
|
6
|
-
};
|
|
4
|
+
export type CustomSisenseContext = SisenseContextPayload;
|
|
7
5
|
/** @internal */
|
|
8
6
|
export type CustomSisenseContextProviderProps = {
|
|
9
7
|
context?: CustomSisenseContext;
|
|
@@ -9,6 +9,9 @@ export type SisenseContextPayload = {
|
|
|
9
9
|
packageName: string;
|
|
10
10
|
onTrackingEvent?: (payload: TrackingEventDetails) => void;
|
|
11
11
|
};
|
|
12
|
+
errorBoundary: {
|
|
13
|
+
showErrorBox: boolean;
|
|
14
|
+
};
|
|
12
15
|
};
|
|
13
16
|
export declare const SisenseContext: import("react").Context<SisenseContextPayload>;
|
|
14
17
|
export declare const useSisenseContext: () => SisenseContextPayload;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { CustomTranslationObject } from '../types';
|
|
2
3
|
type I18nProviderProps = {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
userLanguage?: string;
|
|
6
|
+
customTranslations?: CustomTranslationObject[];
|
|
5
7
|
};
|
|
6
|
-
export declare const I18nProvider: ({ children, userLanguage }: I18nProviderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export declare const I18nProvider: ({ children, userLanguage, customTranslations, }: I18nProviderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
9
|
export {};
|
|
@@ -4,8 +4,8 @@ export declare const translation: {
|
|
|
4
4
|
componentRenderError: string;
|
|
5
5
|
sisenseContextNoAuthentication: string;
|
|
6
6
|
chartNoSisenseContext: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
widgetByIdNoSisenseContext: string;
|
|
8
|
+
widgetByIdInvalidIdentifier: string;
|
|
9
9
|
dashboardWidgetsInvalidIdentifiers: string;
|
|
10
10
|
executeQueryNoSisenseContext: string;
|
|
11
11
|
executeQueryNoDataSource: string;
|
|
@@ -41,9 +41,42 @@ export declare const translation: {
|
|
|
41
41
|
secondsDateTimeLevelSupportedOnlyForLive: string;
|
|
42
42
|
missingMenuRoot: string;
|
|
43
43
|
missingDataSource: string;
|
|
44
|
+
incorrectOnDataReadyHandler: string;
|
|
45
|
+
undefinedDataSource: string;
|
|
46
|
+
emptyModel: string;
|
|
47
|
+
missingMetadata: string;
|
|
48
|
+
missingModelTitle: string;
|
|
49
|
+
httpClientNotFound: string;
|
|
50
|
+
serverSettingsNotLoaded: string;
|
|
51
|
+
requiredColumnMissing: string;
|
|
52
|
+
unexpectedChartType: string;
|
|
53
|
+
noRowNumColumn: string;
|
|
54
|
+
ticIntervalCalculationFailed: string;
|
|
55
|
+
polarChartDesignOptionsExpected: string;
|
|
56
|
+
polarChartDesignOptionsNotExpected: string;
|
|
57
|
+
indicatorInvalidRelativeSize: string;
|
|
58
|
+
unsupportedMapType: string;
|
|
59
|
+
mapLoadingFailed: string;
|
|
60
|
+
cascadingFilterOriginalNotFound: string;
|
|
61
|
+
dashboardLoadFailed: string;
|
|
62
|
+
dashboardWithOidNotFound: string;
|
|
63
|
+
widgetWithOidNotFound: string;
|
|
64
|
+
widgetEmptyResponse: string;
|
|
65
|
+
dateFilterIncorrectOperator: string;
|
|
66
|
+
synchronizedFilterInvalidProps: string;
|
|
67
|
+
methodNotImplemented: string;
|
|
68
|
+
noPivotClient: string;
|
|
69
|
+
unexpectedCacheValue: string;
|
|
70
|
+
notAMembersFilter: string;
|
|
71
|
+
drilldownNoInitialDimension: string;
|
|
72
|
+
otherWidgetTypesNotSupported: string;
|
|
44
73
|
};
|
|
45
74
|
errorBoxText: string;
|
|
46
75
|
chartNoData: string;
|
|
76
|
+
filters: string;
|
|
77
|
+
widgetDetails: string;
|
|
78
|
+
cancel: string;
|
|
79
|
+
includeAll: string;
|
|
47
80
|
criteriaFilter: {
|
|
48
81
|
displayModePrefix: string;
|
|
49
82
|
equals: string;
|
|
@@ -72,7 +105,9 @@ export declare const translation: {
|
|
|
72
105
|
last: string;
|
|
73
106
|
next: string;
|
|
74
107
|
from: string;
|
|
108
|
+
to: string;
|
|
75
109
|
count: string;
|
|
110
|
+
select: string;
|
|
76
111
|
today: string;
|
|
77
112
|
days: string;
|
|
78
113
|
weeks: string;
|
|
@@ -82,6 +117,11 @@ export declare const translation: {
|
|
|
82
117
|
earliestDate: string;
|
|
83
118
|
latestDate: string;
|
|
84
119
|
todayOutOfRange: string;
|
|
120
|
+
dateRange: {
|
|
121
|
+
fromTo: string;
|
|
122
|
+
from: string;
|
|
123
|
+
to: string;
|
|
124
|
+
};
|
|
85
125
|
};
|
|
86
126
|
boxplot: {
|
|
87
127
|
tooltip: {
|
|
@@ -118,6 +158,7 @@ export declare const translation: {
|
|
|
118
158
|
};
|
|
119
159
|
};
|
|
120
160
|
unsupportedFilterMessage: string;
|
|
161
|
+
unsupportedFilter: string;
|
|
121
162
|
commonFilter: {
|
|
122
163
|
clearSelectionButton: string;
|
|
123
164
|
selectMenuItem: string;
|
|
@@ -127,6 +168,77 @@ export declare const translation: {
|
|
|
127
168
|
drilldown: {
|
|
128
169
|
drillMenuItem: string;
|
|
129
170
|
breadcrumbsAllSuffix: string;
|
|
171
|
+
breadcrumbsPrev: string;
|
|
172
|
+
breadcrumbsNext: string;
|
|
173
|
+
popover: {
|
|
174
|
+
members: string;
|
|
175
|
+
table: string;
|
|
176
|
+
column: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
widgetHeader: {
|
|
180
|
+
info: {
|
|
181
|
+
details: string;
|
|
182
|
+
tooltip: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
plugins: {
|
|
186
|
+
registerPrompt: string;
|
|
187
|
+
};
|
|
188
|
+
ai: {
|
|
189
|
+
analyticsChatbot: string;
|
|
190
|
+
dataTopics: string;
|
|
191
|
+
chatbotDescription: string;
|
|
192
|
+
topicSelectPrompt: string;
|
|
193
|
+
betaLabel: string;
|
|
194
|
+
preview: string;
|
|
195
|
+
clearHistoryPrompt: string;
|
|
196
|
+
config: {
|
|
197
|
+
inputPromptText: string;
|
|
198
|
+
welcomeText: string;
|
|
199
|
+
suggestionsWelcomeText: string;
|
|
200
|
+
};
|
|
201
|
+
buttons: {
|
|
202
|
+
insights: string;
|
|
203
|
+
correctResponse: string;
|
|
204
|
+
incorrectResponse: string;
|
|
205
|
+
clearChat: string;
|
|
206
|
+
refresh: string;
|
|
207
|
+
readMore: string;
|
|
208
|
+
collapse: string;
|
|
209
|
+
yes: string;
|
|
210
|
+
no: string;
|
|
211
|
+
seeMore: string;
|
|
212
|
+
};
|
|
213
|
+
disclaimer: {
|
|
214
|
+
poweredByAi: string;
|
|
215
|
+
rateRequest: string;
|
|
216
|
+
};
|
|
217
|
+
errors: {
|
|
218
|
+
chatUnavailable: string;
|
|
219
|
+
fetchHistory: string;
|
|
220
|
+
recommendationsNotAvailable: string;
|
|
221
|
+
insightsNotAvailable: string;
|
|
222
|
+
unexpectedChatResponse: string;
|
|
223
|
+
unexpected: string;
|
|
224
|
+
unknownResponse: string;
|
|
225
|
+
invalidInput: string;
|
|
226
|
+
noAvailableDataTopics: string;
|
|
227
|
+
};
|
|
130
228
|
};
|
|
131
229
|
};
|
|
230
|
+
/**
|
|
231
|
+
* A reference type containing all currently used translation keys.
|
|
232
|
+
* This type serves as a complete resource for creating custom translations,
|
|
233
|
+
* ensuring that all required keys are present and included.
|
|
234
|
+
* It can also be used as Partial to make sure custom translation does not contain any typos.
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```typescript
|
|
238
|
+
* import { TranslationDictionary } from '@sisense/sdk-ui';
|
|
239
|
+
*
|
|
240
|
+
* const customTranslationResources: Partial<TranslationDictionary> = {
|
|
241
|
+
* ```
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
132
244
|
export type TranslationDictionary = typeof translation;
|