@sisense/sdk-ui-vue 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +1390 -0
- package/dist/index.js +21681 -21517
- package/dist/src/composables/use-execute-query-by-widget-id.d.ts +2 -2
- package/dist/src/composables/use-execute-query.d.ts +3 -3
- package/dist/src/composables/use-fetch.d.ts +2 -2
- package/dist/src/composables/use-get-dashboard-model.d.ts +2 -2
- package/dist/src/composables/use-get-dashboard-models.d.ts +2 -2
- package/dist/src/composables/use-get-shared-formula.d.ts +2 -2
- package/dist/src/composables/use-get-widget-model.d.ts +2 -2
- package/dist/src/providers/theme-provider.d.ts +51 -12
- package/dist/src/types.d.ts +3 -2
- package/dist/src/utils.d.ts +3 -3
- package/package.json +11 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from '@sisense/sdk-ui-preact';
|
2
2
|
import { type ToRefs } from 'vue';
|
3
|
-
import type {
|
3
|
+
import type { MaybeRefOrWithRefs } from '../types';
|
4
4
|
/**
|
5
5
|
* A Vue composable function `useExecuteQueryByWidgetId` for executing queries by widget ID using the Sisense SDK.
|
6
6
|
* It simplifies the process of fetching data related to a specific widget based on provided parameters and manages
|
@@ -42,4 +42,4 @@ import type { MaybeWithRefs } from '../types';
|
|
42
42
|
* @group Fusion Embed
|
43
43
|
* @fusionEmbed
|
44
44
|
*/
|
45
|
-
export declare const useExecuteQueryByWidgetId: (params:
|
45
|
+
export declare const useExecuteQueryByWidgetId: (params: MaybeRefOrWithRefs<ExecuteQueryByWidgetIdParams>) => ToRefs<QueryByWidgetIdState>;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { type ExecuteQueryParams } from '@sisense/sdk-ui-preact';
|
2
|
-
import type {
|
2
|
+
import type { MaybeRefOrWithRefs } from '../types';
|
3
3
|
/**
|
4
4
|
* A Vue composable function `useExecuteQuery` for executing Sisense queries with flexible parameters.
|
5
5
|
* It handles query execution, including loading, error, and success states, and enables dynamic query configuration
|
6
6
|
* through reactive parameters. This composable is particularly useful for applications requiring data from Sisense
|
7
7
|
* analytics, offering a reactive and declarative approach to data fetching and state management.
|
8
8
|
*
|
9
|
-
* @param {
|
9
|
+
* @param {MaybeRefOrWithRefs<ExecuteQueryParams>} params - The parameters for the query, supporting reactive Vue refs.
|
10
10
|
* Includes details such as `dataSource`, `dimensions`, `measures`, `filters`, and more, allowing for comprehensive
|
11
11
|
* query configuration. The `filters` parameter supports dynamic filtering based on user interaction or other application
|
12
12
|
* state changes.
|
@@ -42,4 +42,4 @@ import type { MaybeWithRefs } from '../types';
|
|
42
42
|
* to easily manage query states and dynamically adjust query parameters based on application needs.
|
43
43
|
* @group Queries
|
44
44
|
*/
|
45
|
-
export declare const useExecuteQuery: (params:
|
45
|
+
export declare const useExecuteQuery: (params: MaybeRefOrWithRefs<ExecuteQueryParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").QueryState>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { DataState, RequestConfig } from '@sisense/sdk-ui-preact';
|
2
2
|
import { type ToRefs } from 'vue';
|
3
|
-
import type { MaybeRef,
|
3
|
+
import type { MaybeRef, MaybeRefOrWithRefs } from '../types';
|
4
4
|
/**
|
5
5
|
* The options for the `useFetch` composable function.
|
6
6
|
*/
|
@@ -46,4 +46,4 @@ export type UseFetchOptions = {
|
|
46
46
|
* @group Fusion Embed
|
47
47
|
* @fusionEmbed
|
48
48
|
*/
|
49
|
-
export declare const useFetch: <TData = unknown>(path: MaybeRef<string>, init?:
|
49
|
+
export declare const useFetch: <TData = unknown>(path: MaybeRef<string>, init?: MaybeRefOrWithRefs<RequestInit>, options?: MaybeRefOrWithRefs<UseFetchOptions>) => ToRefs<DataState<TData>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { MaybeRefOrWithRefs } from '../types';
|
2
2
|
import type { GetDashboardModelParams } from '@sisense/sdk-ui-preact';
|
3
3
|
/**
|
4
4
|
* A Vue composable function `useGetDashboardModel` for fetching a Sisense dashboard model.
|
@@ -40,4 +40,4 @@ import type { GetDashboardModelParams } from '@sisense/sdk-ui-preact';
|
|
40
40
|
* @group Fusion Embed
|
41
41
|
* @fusionEmbed
|
42
42
|
*/
|
43
|
-
export declare const useGetDashboardModel: (params:
|
43
|
+
export declare const useGetDashboardModel: (params: MaybeRefOrWithRefs<GetDashboardModelParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DashboardModelState>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { GetDashboardModelsParams } from '@sisense/sdk-ui-preact';
|
2
|
-
import type {
|
2
|
+
import type { MaybeRefOrWithRefs } from '../types';
|
3
3
|
/**
|
4
4
|
* A Vue composable function `useGetDashboardModels` for fetching multiple Sisense dashboard models.
|
5
5
|
* This function abstracts the complexities of managing API calls and state management for fetching an array of
|
@@ -37,4 +37,4 @@ import type { MaybeWithRefs } from '../types';
|
|
37
37
|
* @group Fusion Embed
|
38
38
|
* @fusionEmbed
|
39
39
|
*/
|
40
|
-
export declare const useGetDashboardModels: (params:
|
40
|
+
export declare const useGetDashboardModels: (params: MaybeRefOrWithRefs<GetDashboardModelsParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DashboardModelsState>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { UseGetSharedFormulaParams } from '@sisense/sdk-ui-preact';
|
2
|
-
import type {
|
2
|
+
import type { MaybeRefOrWithRefs } from '../types';
|
3
3
|
/**
|
4
4
|
* A Vue composable function `useGetSharedFormula` for retrieving shared formulas from Sisense.
|
5
5
|
* This function enables fetching a shared formula either by its unique OID or by its name and associated data source,
|
@@ -44,4 +44,4 @@ import type { MaybeWithRefs } from '../types';
|
|
44
44
|
* @group Fusion Embed
|
45
45
|
* @fusionEmbed
|
46
46
|
*/
|
47
|
-
export declare const useGetSharedFormula: (params:
|
47
|
+
export declare const useGetSharedFormula: (params: MaybeRefOrWithRefs<UseGetSharedFormulaParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").SharedFormulaState>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { GetWidgetModelParams, WidgetModel } from '@sisense/sdk-ui-preact';
|
2
|
-
import type {
|
2
|
+
import type { MaybeRefOrWithRefs } from '../types';
|
3
3
|
/**
|
4
4
|
* A Vue composable function `useGetWidgetModel` for retrieving widget models from a Sisense dashboard.
|
5
5
|
* It is designed to fetch a specific widget model based on the provided dashboard and widget OIDs, handling the loading,
|
@@ -40,4 +40,4 @@ import type { MaybeWithRefs } from '../types';
|
|
40
40
|
* @group Fusion Embed
|
41
41
|
* @fusionEmbed
|
42
42
|
*/
|
43
|
-
export declare const useGetWidgetModel: (params:
|
43
|
+
export declare const useGetWidgetModel: (params: MaybeRefOrWithRefs<GetWidgetModelParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DataState<WidgetModel>>;
|
@@ -84,27 +84,40 @@ export declare const getThemeContext: () => Ref<{
|
|
84
84
|
borderGradient: [string, string] | null;
|
85
85
|
borderRadius: string;
|
86
86
|
hover: {
|
87
|
-
backgroundColor: string;
|
88
87
|
textColor: string;
|
88
|
+
backgroundColor: string;
|
89
89
|
};
|
90
90
|
loadingGradient: [string, string];
|
91
91
|
gap: string;
|
92
92
|
};
|
93
93
|
clickableMessages: {
|
94
|
-
backgroundColor: string;
|
95
94
|
textColor: string;
|
95
|
+
backgroundColor: string;
|
96
96
|
border: string | false;
|
97
|
+
borderGradient: [string, string] | null;
|
97
98
|
hover: {
|
98
99
|
textColor: string;
|
99
100
|
backgroundColor: string;
|
100
101
|
};
|
101
102
|
};
|
103
|
+
dataTopics: {
|
104
|
+
backgroundColor: string;
|
105
|
+
items: {
|
106
|
+
textColor: string;
|
107
|
+
backgroundColor: string;
|
108
|
+
};
|
109
|
+
};
|
102
110
|
icons: {
|
103
111
|
color: string;
|
104
|
-
|
105
|
-
|
112
|
+
feedbackIcons: {
|
113
|
+
hoverColor: string;
|
106
114
|
};
|
107
115
|
};
|
116
|
+
tooltips: {
|
117
|
+
backgroundColor: string;
|
118
|
+
textColor: string;
|
119
|
+
boxShadow: string;
|
120
|
+
};
|
108
121
|
};
|
109
122
|
}> | undefined;
|
110
123
|
/**
|
@@ -194,27 +207,40 @@ export declare const createThemeContextConnector: (themeSettings?: CompleteTheme
|
|
194
207
|
borderGradient: [string, string] | null;
|
195
208
|
borderRadius: string;
|
196
209
|
hover: {
|
197
|
-
backgroundColor: string;
|
198
210
|
textColor: string;
|
211
|
+
backgroundColor: string;
|
199
212
|
};
|
200
213
|
loadingGradient: [string, string];
|
201
214
|
gap: string;
|
202
215
|
};
|
203
216
|
clickableMessages: {
|
204
|
-
backgroundColor: string;
|
205
217
|
textColor: string;
|
218
|
+
backgroundColor: string;
|
206
219
|
border: string | false;
|
220
|
+
borderGradient: [string, string] | null;
|
207
221
|
hover: {
|
208
222
|
textColor: string;
|
209
223
|
backgroundColor: string;
|
210
224
|
};
|
211
225
|
};
|
226
|
+
dataTopics: {
|
227
|
+
backgroundColor: string;
|
228
|
+
items: {
|
229
|
+
textColor: string;
|
230
|
+
backgroundColor: string;
|
231
|
+
};
|
232
|
+
};
|
212
233
|
icons: {
|
213
234
|
color: string;
|
214
|
-
|
215
|
-
|
235
|
+
feedbackIcons: {
|
236
|
+
hoverColor: string;
|
216
237
|
};
|
217
238
|
};
|
239
|
+
tooltips: {
|
240
|
+
backgroundColor: string;
|
241
|
+
textColor: string;
|
242
|
+
boxShadow: string;
|
243
|
+
};
|
218
244
|
};
|
219
245
|
};
|
220
246
|
skipTracking: boolean;
|
@@ -301,27 +327,40 @@ export declare const createThemeContextConnector: (themeSettings?: CompleteTheme
|
|
301
327
|
borderGradient: [string, string] | null;
|
302
328
|
borderRadius: string;
|
303
329
|
hover: {
|
304
|
-
backgroundColor: string;
|
305
330
|
textColor: string;
|
331
|
+
backgroundColor: string;
|
306
332
|
};
|
307
333
|
loadingGradient: [string, string];
|
308
334
|
gap: string;
|
309
335
|
};
|
310
336
|
clickableMessages: {
|
311
|
-
backgroundColor: string;
|
312
337
|
textColor: string;
|
338
|
+
backgroundColor: string;
|
313
339
|
border: string | false;
|
340
|
+
borderGradient: [string, string] | null;
|
314
341
|
hover: {
|
315
342
|
textColor: string;
|
316
343
|
backgroundColor: string;
|
317
344
|
};
|
318
345
|
};
|
346
|
+
dataTopics: {
|
347
|
+
backgroundColor: string;
|
348
|
+
items: {
|
349
|
+
textColor: string;
|
350
|
+
backgroundColor: string;
|
351
|
+
};
|
352
|
+
};
|
319
353
|
icons: {
|
320
354
|
color: string;
|
321
|
-
|
322
|
-
|
355
|
+
feedbackIcons: {
|
356
|
+
hoverColor: string;
|
323
357
|
};
|
324
358
|
};
|
359
|
+
tooltips: {
|
360
|
+
backgroundColor: string;
|
361
|
+
textColor: string;
|
362
|
+
boxShadow: string;
|
363
|
+
};
|
325
364
|
};
|
326
365
|
};
|
327
366
|
skipTracking?: boolean | undefined;
|
package/dist/src/types.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { Ref } from 'vue';
|
2
2
|
export type MaybeRef<T> = Ref<T> | T;
|
3
|
-
export type MaybeWithRefs<T> = {
|
4
|
-
[Property in keyof T]:
|
3
|
+
export type MaybeWithRefs<T extends object> = {
|
4
|
+
[Property in keyof T]: MaybeRef<T[Property]>;
|
5
5
|
};
|
6
|
+
export type MaybeRefOrWithRefs<T extends Object> = MaybeRef<T> | MaybeWithRefs<T>;
|
package/dist/src/utils.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type Ref } from 'vue';
|
2
|
-
import type { MaybeRef, MaybeWithRefs } from './types';
|
2
|
+
import type { MaybeRef, MaybeRefOrWithRefs, MaybeWithRefs } from './types';
|
3
3
|
export declare function isObject(value: unknown): boolean;
|
4
4
|
export declare function toPlainValue<T>(value: MaybeRef<T>): T;
|
5
|
-
export declare function
|
6
|
-
export declare function collectRefs(...params: (MaybeRef<unknown> | MaybeWithRefs<
|
5
|
+
export declare function toPlainObject<T extends object>(refObj: MaybeRefOrWithRefs<T>): T;
|
6
|
+
export declare function collectRefs<UnknownObject extends object>(...params: (MaybeRef<unknown> | MaybeWithRefs<UnknownObject>)[]): Ref<unknown | UnknownObject>[];
|
package/package.json
CHANGED
@@ -11,11 +11,19 @@
|
|
11
11
|
"Sisense",
|
12
12
|
"Compose SDK"
|
13
13
|
],
|
14
|
-
"version": "1.
|
14
|
+
"version": "1.12.0",
|
15
15
|
"type": "module",
|
16
|
-
"main": "./dist/index.
|
16
|
+
"main": "./dist/index.cjs",
|
17
17
|
"module": "./dist/index.js",
|
18
18
|
"types": "./dist/index.d.ts",
|
19
|
+
"exports": {
|
20
|
+
".": {
|
21
|
+
"require": "./dist/index.cjs",
|
22
|
+
"import": "./dist/index.js",
|
23
|
+
"types": "./dist/index.d.ts",
|
24
|
+
"default": "./dist/index.js"
|
25
|
+
}
|
26
|
+
},
|
19
27
|
"author": "Sisense",
|
20
28
|
"license": "SEE LICENSE IN LICENSE.md",
|
21
29
|
"files": [
|
@@ -34,7 +42,7 @@
|
|
34
42
|
"format:check": "prettier --check ."
|
35
43
|
},
|
36
44
|
"dependencies": {
|
37
|
-
"@sisense/sdk-ui-preact": "^1.
|
45
|
+
"@sisense/sdk-ui-preact": "^1.12.0",
|
38
46
|
"deepmerge": "^4.3.1",
|
39
47
|
"lodash": "^4.17.21",
|
40
48
|
"vue": "^3.3.2"
|