@sisense/sdk-ui 1.6.0 → 1.7.1
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/api/chat-api-provider.d.ts +1 -1
- package/dist/ai/api/chat-history.d.ts +18 -0
- package/dist/ai/api/errors.d.ts +2 -0
- package/dist/ai/api/hooks.d.ts +2 -13
- package/dist/ai/api/types.d.ts +11 -9
- package/dist/ai/chat-style-provider.d.ts +15 -0
- package/dist/ai/chatbot.d.ts +7 -0
- package/dist/ai/{error-page.d.ts → common/error-container.d.ts} +1 -1
- package/dist/ai/suggestions/suggestion-item.d.ts +1 -2
- package/dist/ai/use-chat-session.d.ts +1 -0
- package/dist/ai.js +2064 -3702
- package/dist/alert-box/alert-box.d.ts +1 -1
- package/dist/app/client-application.d.ts +40 -0
- package/dist/app/settings/settings.d.ts +1 -1
- package/dist/boxplot-utils.d.ts +2 -1
- package/dist/chart-options-processor/common-highcharts-option-service.d.ts +1 -1
- package/dist/chart-options-processor/translations/base-design-options.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/common/hooks/use-fetch.d.ts +42 -0
- package/dist/const.d.ts +1 -0
- package/dist/dashboard-widget/dashboard-widget.d.ts +2 -1
- package/dist/dynamic-size-container/dynamic-size-container.d.ts +4 -3
- package/dist/formulas/use-get-shared-formula.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4707 -4459
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +2 -1
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
- package/dist/models/widget/use-get-widget-model.d.ts +2 -1
- package/dist/models/widget/widget-model.d.ts +2 -1
- 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/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/props.d.ts +3 -2
- package/dist/query/execute-query.d.ts +5 -5
- package/dist/query-execution/execute-query-by-widget-id.d.ts +2 -1
- 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-query-by-widget-id.d.ts +2 -1
- package/dist/query-execution/use-execute-query.d.ts +3 -10
- package/dist/query-execution/use-query-cache.d.ts +10 -0
- package/dist/sisense-context/sisense-query-client-provider.d.ts +2 -0
- package/dist/{with-tracking-e2a077f9.js → useQuery-a7ee8c12.js} +70365 -58171
- package/dist/utils/create-cache.d.ts +33 -0
- package/package.json +8 -8
|
@@ -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 {};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.7.1",
|
|
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.1",
|
|
43
|
+
"@sisense/sdk-data": "^1.7.1",
|
|
44
|
+
"@sisense/sdk-pivot-client": "^1.7.1",
|
|
45
|
+
"@sisense/sdk-query-client": "^1.7.1",
|
|
46
|
+
"@sisense/sdk-rest-client": "^1.7.1",
|
|
47
|
+
"@sisense/sdk-tracking": "^1.7.1",
|
|
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",
|