@sisense/sdk-ui 1.5.0 → 1.7.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/ai-context-provider.d.ts +1 -0
- package/dist/ai/api/chat-api-provider.d.ts +1 -1
- package/dist/ai/api/chat-history.d.ts +18 -0
- package/dist/ai/api/chat-rest-api.d.ts +3 -0
- package/dist/ai/api/errors.d.ts +4 -1
- package/dist/ai/api/hooks.d.ts +2 -13
- package/dist/ai/api/types.d.ts +21 -19
- package/dist/ai/chat-config.d.ts +10 -3
- package/dist/ai/chat-intro-blurb.d.ts +4 -0
- package/dist/ai/chat-style-provider.d.ts +15 -0
- package/dist/ai/chatbot.d.ts +8 -0
- package/dist/ai/{error-page.d.ts → common/error-container.d.ts} +1 -1
- package/dist/ai/get-nlg-query-result.d.ts +3 -3
- package/dist/ai/index.d.ts +2 -0
- package/dist/ai/messages/feedback-wrapper.d.ts +2 -1
- package/dist/ai/messages/insights-message.d.ts +6 -1
- package/dist/ai/messages/message-list-resolver.d.ts +1 -2
- package/dist/ai/messages/message-resolver.d.ts +1 -3
- package/dist/ai/messages/nlq-message-group.d.ts +10 -0
- package/dist/ai/suggestions/index.d.ts +1 -1
- package/dist/ai/suggestions/suggestion-item.d.ts +1 -2
- package/dist/ai/suggestions/suggestion-list.d.ts +1 -1
- package/dist/ai/suggestions/suggestions-with-intro.d.ts +2 -2
- package/dist/ai/translators/code-templates.d.ts +11 -0
- package/dist/ai/translators/generate-code.d.ts +9 -0
- package/dist/ai/translators/index.d.ts +4 -0
- package/dist/ai/translators/model-translator.d.ts +50 -0
- package/dist/ai/translators/query-translator.d.ts +122 -0
- package/dist/ai/translators/translate-props-to-code.d.ts +8 -0
- package/dist/ai/translators/types.d.ts +105 -0
- package/dist/ai/translators/use-get-data-source.d.ts +12 -0
- package/dist/ai/translators/utils.d.ts +2 -0
- package/dist/ai/use-chat-session.d.ts +10 -3
- package/dist/ai/use-get-nlg-query-result.d.ts +6 -6
- package/dist/ai/use-get-query-recommendations.d.ts +1 -0
- package/dist/ai.js +7037 -3332
- package/dist/alert-box/alert-box.d.ts +1 -1
- package/dist/app/client-application.d.ts +27 -0
- package/dist/app/settings/settings.d.ts +1 -1
- package/dist/area-chart.d.ts +1 -0
- package/dist/areamap-chart.d.ts +1 -0
- package/dist/bar-chart.d.ts +3 -0
- package/dist/boxplot-chart.d.ts +1 -0
- package/dist/boxplot-utils.d.ts +3 -1
- package/dist/chart/chart.d.ts +1 -0
- package/dist/chart-options-processor/translations/base-design-options.d.ts +1 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +1 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/legacy-chart-options-to-theme-settings-dictionary.d.ts +2 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +1 -2
- package/dist/column-chart.d.ts +4 -0
- package/dist/common/components/loading-indicator.d.ts +2 -0
- package/dist/common/hooks/use-fetch.d.ts +42 -0
- package/dist/const.d.ts +1 -0
- package/dist/dashboard-widget/dashboard-widget.d.ts +2 -0
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +5 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -0
- package/dist/dashboard-widget/types.d.ts +3 -2
- package/dist/dynamic-size-container/dynamic-size-container.d.ts +4 -3
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +1 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -0
- package/dist/formulas/use-get-shared-formula.d.ts +2 -0
- package/dist/funnel-chart.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6680 -37439
- package/dist/indicator-chart.d.ts +1 -0
- package/dist/line-chart.d.ts +1 -0
- package/dist/models/dashboard/get-dashboard-models.d.ts +1 -3
- package/dist/models/dashboard/translate-dashboard.d.ts +1 -1
- package/dist/models/dashboard/types.d.ts +17 -0
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +2 -0
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -0
- package/dist/models/widget/use-get-widget-model.d.ts +2 -0
- package/dist/models/widget/widget-model.d.ts +11 -1
- package/dist/pie-chart.d.ts +1 -0
- package/dist/pivot-table/formatters/data-cell-formatters/data-cell-value-formatter.d.ts +3 -0
- package/dist/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
- package/dist/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +3 -0
- package/dist/pivot-table/formatters/header-cell-formatters/index.d.ts +1 -0
- package/dist/pivot-table/formatters/index.d.ts +2 -0
- package/dist/pivot-table/formatters/types.d.ts +4 -0
- package/dist/pivot-table/formatters/utils.d.ts +5 -0
- package/dist/pivot-table/pivot-table.d.ts +1 -0
- package/dist/pivot-table/sorting-utils.d.ts +56 -0
- package/dist/pivot-table/use-apply-pivot-table-formatting.d.ts +11 -0
- package/dist/pivot-table/use-get-pivot-table-query.d.ts +1 -1
- package/dist/polar-chart.d.ts +1 -0
- package/dist/props.d.ts +5 -4
- package/dist/query/execute-query.d.ts +5 -5
- package/dist/query-execution/execute-query-by-widget-id.d.ts +2 -0
- package/dist/query-execution/execute-query.d.ts +1 -0
- package/dist/query-execution/index.d.ts +2 -1
- package/dist/query-execution/query-params-comparator.d.ts +8 -0
- package/dist/query-execution/types.d.ts +7 -0
- package/dist/query-execution/use-execute-csv-query.d.ts +1 -0
- package/dist/query-execution/use-execute-pivot-query.d.ts +1 -0
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -0
- package/dist/query-execution/use-execute-query.d.ts +4 -10
- package/dist/query-execution/use-query-cache.d.ts +10 -0
- package/dist/scatter-chart.d.ts +1 -0
- package/dist/scattermap-chart.d.ts +1 -0
- package/dist/sisense-context/sisense-context-provider.d.ts +1 -0
- package/dist/sisense-context/sisense-query-client-provider.d.ts +2 -0
- package/dist/sunburst-chart.d.ts +1 -0
- package/dist/table/table.d.ts +1 -0
- package/dist/theme-provider/theme-provider.d.ts +7 -0
- package/dist/treemap-chart.d.ts +1 -0
- package/dist/types.d.ts +2 -2
- package/dist/useQuery-aa258c0d.js +121301 -0
- package/dist/utils/create-cache.d.ts +33 -0
- package/dist/widgets/chart-widget.d.ts +1 -0
- package/dist/widgets/common/context-menu.d.ts +5 -0
- package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs.d.ts +5 -0
- package/dist/widgets/drilldown-widget.d.ts +1 -0
- package/package.json +14 -9
- package/dist/chart-data-processor/utils.d.ts +0 -10
- package/dist/utils/not-available-value.d.ts +0 -3
- package/dist/with-tracking-0799ec25.js +0 -78081
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type CacheKey = string;
|
|
2
|
+
/**
|
|
3
|
+
* Function to create cache key from params of the async function you want to cache
|
|
4
|
+
*/
|
|
5
|
+
export type CreateCacheKeyFn<AsyncFnToCache extends AsyncFn> = (...params: Parameters<AsyncFnToCache>) => CacheKey;
|
|
6
|
+
type AsyncFn = (...params: any[]) => Promise<any>;
|
|
7
|
+
export type CreateCacheFn = <AsyncFnToCache extends AsyncFn>(createCacheKey: CreateCacheKeyFn<AsyncFnToCache>, options?: CacheOptions) => {
|
|
8
|
+
withCache: (fn: AsyncFnToCache) => AsyncFnToCache;
|
|
9
|
+
clearCache: (specificKey?: CacheKey) => void;
|
|
10
|
+
};
|
|
11
|
+
type CacheOptions = {
|
|
12
|
+
cacheMaxSize?: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Universal cache creator for any async function
|
|
16
|
+
*
|
|
17
|
+
* @param createCacheKey - function to create cache key from params of the async function you want to cache
|
|
18
|
+
* @param options - optional object with cache options
|
|
19
|
+
* @returns - object with two methods: withCache and clearCache.
|
|
20
|
+
* "withCache" is a function that wraps the async function you want to cache.
|
|
21
|
+
* "clearCache" is a function to clear the cache.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const myAsyncFn = async (a: number, b: number) => a + b;
|
|
25
|
+
*
|
|
26
|
+
* // define here how to create cache-key for your function
|
|
27
|
+
* const createExecuteQueryCacheKey: CreateCacheKeyFn<typeof myAsyncFn> = (a, b) => `${a}+${b}`;
|
|
28
|
+
*
|
|
29
|
+
* const { withCache, clearCache } = createCache(createExecuteQueryCacheKey);
|
|
30
|
+
* const executeQueryWithCache = withCache(executeQuery);
|
|
31
|
+
*/
|
|
32
|
+
export declare const createCache: CreateCacheFn;
|
|
33
|
+
export {};
|
|
@@ -22,5 +22,6 @@ import { ChartWidgetProps } from '../props';
|
|
|
22
22
|
* <img src="media://chart-widget-with-drilldown-example-1.png" width="800px" />
|
|
23
23
|
* @param props - ChartWidget properties
|
|
24
24
|
* @returns ChartWidget component representing a chart type as specified in `ChartWidgetProps.`{@link ChartWidgetProps.chartType | chartType}
|
|
25
|
+
* @group Chart Utilities
|
|
25
26
|
*/
|
|
26
27
|
export declare const ChartWidget: FunctionComponent<ChartWidgetProps>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ContextMenuProps } from '../../props';
|
|
3
|
+
/**
|
|
4
|
+
* Context menu of a Drilldown Widget
|
|
5
|
+
*
|
|
6
|
+
* @group Drilldown
|
|
7
|
+
*/
|
|
3
8
|
export declare const ContextMenu: ({ position, closeContextMenu, itemSections, children, }: ContextMenuProps) => JSX.Element;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DrilldownBreadcrumbsProps } from '../../../props';
|
|
3
3
|
export declare const BREADCRUMBS_BORDER_COLOR = "#F2F2F2";
|
|
4
|
+
/**
|
|
5
|
+
* Drilldown breadcrumbs component
|
|
6
|
+
*
|
|
7
|
+
* @group Drilldown
|
|
8
|
+
*/
|
|
4
9
|
export declare const DrilldownBreadcrumbs: React.FC<DrilldownBreadcrumbsProps>;
|
|
@@ -45,5 +45,6 @@ import { DrilldownWidgetProps } from '../props';
|
|
|
45
45
|
* ```
|
|
46
46
|
* @param props - DrilldownWidget properties
|
|
47
47
|
* @returns DrilldownWidget wrapper component
|
|
48
|
+
* @group Drilldown
|
|
48
49
|
*/
|
|
49
50
|
export declare const DrilldownWidget: ({ drilldownDimensions, initialDimension, config, children, }: DrilldownWidgetProps) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.7.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"@emotion/react": "^11.10.5",
|
|
40
40
|
"@emotion/styled": "^11.10.5",
|
|
41
41
|
"@mui/material": "^5.11.6",
|
|
42
|
-
"@sisense/sdk-common": "^1.
|
|
43
|
-
"@sisense/sdk-data": "^1.
|
|
44
|
-
"@sisense/sdk-pivot-client": "^1.
|
|
45
|
-
"@sisense/sdk-query-client": "^1.
|
|
46
|
-
"@sisense/sdk-rest-client": "^1.
|
|
47
|
-
"@sisense/sdk-tracking": "^1.
|
|
48
|
-
"@sisense/sisense-charts": "5.1.0-alpha-
|
|
42
|
+
"@sisense/sdk-common": "^1.7.0",
|
|
43
|
+
"@sisense/sdk-data": "^1.7.0",
|
|
44
|
+
"@sisense/sdk-pivot-client": "^1.7.0",
|
|
45
|
+
"@sisense/sdk-query-client": "^1.7.0",
|
|
46
|
+
"@sisense/sdk-rest-client": "^1.7.0",
|
|
47
|
+
"@sisense/sdk-tracking": "^1.7.0",
|
|
48
|
+
"@sisense/sisense-charts": "5.1.0-alpha-831b13b4.0",
|
|
49
49
|
"@tanstack/react-query": "4.36.1",
|
|
50
50
|
"classnames": "^2.3.2",
|
|
51
51
|
"colorjs.io": "^0.4.3",
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"react-number-format": "^5.1.0",
|
|
68
68
|
"ts-deepmerge": "6.0.2",
|
|
69
69
|
"ts-essentials": "^9.3.0",
|
|
70
|
-
"whatwg-fetch": "^3.6.2"
|
|
70
|
+
"whatwg-fetch": "^3.6.2",
|
|
71
|
+
"yaml": "^2.4.0"
|
|
71
72
|
},
|
|
72
73
|
"scripts": {
|
|
73
74
|
"dev": "vite",
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
],
|
|
93
94
|
"devDependencies": {
|
|
94
95
|
"@babel/preset-env": "^7.20.2",
|
|
96
|
+
"@monaco-editor/react": "^4.6.0",
|
|
95
97
|
"@mui/icons-material": "^5.14.9",
|
|
96
98
|
"@mui/x-data-grid": "^6.16.0",
|
|
97
99
|
"@mui/x-data-grid-pro": "^6.16.0",
|
|
@@ -114,6 +116,7 @@
|
|
|
114
116
|
"@types/react": "18.2.0",
|
|
115
117
|
"@types/react-datepicker": "^4.11.2",
|
|
116
118
|
"@types/react-dom": "18.2.0",
|
|
119
|
+
"@types/react-grid-layout": "^1.3.5",
|
|
117
120
|
"@types/react-plotly.js": "^2.6.0",
|
|
118
121
|
"@vitejs/plugin-react-swc": "^3.3.0",
|
|
119
122
|
"autoprefixer": "^10.4.14",
|
|
@@ -121,12 +124,14 @@
|
|
|
121
124
|
"canvas": "^2.11.2",
|
|
122
125
|
"eslint": "^8.40.0",
|
|
123
126
|
"jsdom": "^22.1.0",
|
|
127
|
+
"monaco-editor": "^0.45.0",
|
|
124
128
|
"msw": "2.2.1",
|
|
125
129
|
"plotly.js": "^2.25.2",
|
|
126
130
|
"postcss": "^8.4.31",
|
|
127
131
|
"prettier": "2.8.4",
|
|
128
132
|
"react": "18.2.0",
|
|
129
133
|
"react-dom": "^18.2.0",
|
|
134
|
+
"react-grid-layout": "^1.4.4",
|
|
130
135
|
"react-json-view": "^1.21.3",
|
|
131
136
|
"react-plotly.js": "^2.6.0",
|
|
132
137
|
"sass": "1.58.3",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ChartType } from '../types';
|
|
2
|
-
import { DataTable } from '../chart-data-processor/table-processor';
|
|
3
|
-
/**
|
|
4
|
-
* Remove rows with 'N/A' values for charts that do not support visualization of this type of value
|
|
5
|
-
*
|
|
6
|
-
* @param chartType - type of chart
|
|
7
|
-
* @param dataTable - Chart data table
|
|
8
|
-
* @returns Chart data table
|
|
9
|
-
*/
|
|
10
|
-
export declare function handleNAInTable(chartType: ChartType, dataTable: DataTable): DataTable;
|