@sisense/sdk-ui-vue 1.10.1 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,7 +36,6 @@ import type { PropType } from 'vue';
36
36
  * @param props - Areamap chart properties
37
37
  * @returns Areamap Chart component
38
38
  * @group Charts
39
- * @beta
40
39
  */
41
40
  export declare const AreamapChart: import("vue").DefineComponent<{
42
41
  dataOptions: PropType<import("@sisense/sdk-ui-preact").AreamapChartDataOptions>;
@@ -37,7 +37,6 @@ import type { PropType } from 'vue';
37
37
  * @param props - Boxplot chart properties
38
38
  * @returns Boxplot Chart component
39
39
  * @group Charts
40
- * @beta
41
40
  */
42
41
  export declare const BoxplotChart: import("vue").DefineComponent<{
43
42
  dataOptions: PropType<import("@sisense/sdk-ui-preact").BoxplotChartDataOptions | import("@sisense/sdk-ui-preact").BoxplotChartCustomDataOptions>;
@@ -35,12 +35,13 @@ const pivotTableProps = ref<PivotTableProps>({
35
35
  * ```
36
36
  * <img src="media://vue-pivot-table-example.png" width="800px" />
37
37
  * @group Data Grids
38
- * @alpha
38
+ * @beta
39
39
  */
40
40
  export declare const PivotTable: import("vue").DefineComponent<{
41
41
  dataOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDataOptions>;
42
42
  dataSet: PropType<import("@sisense/sdk-data").DataSource | undefined>;
43
43
  filters: PropType<import("@sisense/sdk-data").Filter[] | import("@sisense/sdk-data").FilterRelations | undefined>;
44
+ highlights: PropType<import("@sisense/sdk-data").Filter[] | undefined>;
44
45
  refreshCounter: PropType<number | undefined>;
45
46
  styleOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableStyleOptions | undefined>;
46
47
  }, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -49,6 +50,7 @@ export declare const PivotTable: import("vue").DefineComponent<{
49
50
  dataOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDataOptions>;
50
51
  dataSet: PropType<import("@sisense/sdk-data").DataSource | undefined>;
51
52
  filters: PropType<import("@sisense/sdk-data").Filter[] | import("@sisense/sdk-data").FilterRelations | undefined>;
53
+ highlights: PropType<import("@sisense/sdk-data").Filter[] | undefined>;
52
54
  refreshCounter: PropType<number | undefined>;
53
55
  styleOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableStyleOptions | undefined>;
54
56
  }>>, {}, {}>;
@@ -36,7 +36,6 @@ import type { PropType } from 'vue';
36
36
  * @param props - Scattermap chart properties
37
37
  * @returns Scattermap Chart component
38
38
  * @group Charts
39
- * @beta
40
39
  */
41
40
  export declare const ScattermapChart: import("vue").DefineComponent<{
42
41
  dataOptions: PropType<import("@sisense/sdk-ui-preact").ScattermapChartDataOptions>;
@@ -35,7 +35,6 @@ import type { PropType } from 'vue';
35
35
  * @param props - Sunburst Chart properties
36
36
  * @returns Sunburst Chart component
37
37
  * @group Charts
38
- * @beta
39
38
  */
40
39
  export declare const SunburstChart: import("vue").DefineComponent<{
41
40
  dataOptions: PropType<import("@sisense/sdk-ui-preact").CategoricalChartDataOptions>;
@@ -26,7 +26,7 @@ export declare const BasicMemberFilterTile: import("vue").DefineComponent<{
26
26
  initialSelectedMembers: PropType<import("@sisense/sdk-ui/dist/filters/components/member-filter-tile/members-reducer").SelectedMember[] | undefined>;
27
27
  isDependent: PropType<boolean | undefined>;
28
28
  maxAllowedMembers: PropType<number | undefined>;
29
- onUpdateSelectedMembers: PropType<((members: string[]) => void) | undefined>;
29
+ onUpdateSelectedMembers: PropType<((members: string[], disabled?: boolean | undefined) => void) | undefined>;
30
30
  shouldUpdateSelectedMembers: PropType<boolean | undefined>;
31
31
  title: PropType<string>;
32
32
  }, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -36,7 +36,7 @@ export declare const BasicMemberFilterTile: import("vue").DefineComponent<{
36
36
  initialSelectedMembers: PropType<import("@sisense/sdk-ui/dist/filters/components/member-filter-tile/members-reducer").SelectedMember[] | undefined>;
37
37
  isDependent: PropType<boolean | undefined>;
38
38
  maxAllowedMembers: PropType<number | undefined>;
39
- onUpdateSelectedMembers: PropType<((members: string[]) => void) | undefined>;
39
+ onUpdateSelectedMembers: PropType<((members: string[], disabled?: boolean | undefined) => void) | undefined>;
40
40
  shouldUpdateSelectedMembers: PropType<boolean | undefined>;
41
41
  title: PropType<string>;
42
42
  }>>, {}, {}>;
@@ -4,3 +4,5 @@ export { useGetDashboardModel } from './use-get-dashboard-model.js';
4
4
  export { useGetDashboardModels } from './use-get-dashboard-models.js';
5
5
  export { useGetSharedFormula } from './use-get-shared-formula.js';
6
6
  export { useGetWidgetModel } from './use-get-widget-model.js';
7
+ export { useFetch } from './use-fetch.js';
8
+ export type { UseFetchOptions } from './use-fetch.js';
@@ -75,6 +75,7 @@ export declare const useCustomDrilldown: ({ drilldownDimensions, initialDimensio
75
75
  };
76
76
  readonly filterType: string;
77
77
  readonly guid: string;
78
+ disabled: boolean;
78
79
  readonly name: string;
79
80
  isScope: boolean;
80
81
  jaql: (nested?: boolean | undefined) => any;
@@ -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 { MaybeWithRefs } from '../types';
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: MaybeWithRefs<ExecuteQueryByWidgetIdParams>) => ToRefs<QueryByWidgetIdState>;
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 { MaybeWithRefs } from '../types';
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 {MaybeWithRefs<ExecuteQueryParams>} params - The parameters for the query, supporting reactive Vue refs.
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: MaybeWithRefs<ExecuteQueryParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").QueryState>;
45
+ export declare const useExecuteQuery: (params: MaybeRefOrWithRefs<ExecuteQueryParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").QueryState>;
@@ -0,0 +1,49 @@
1
+ import type { DataState, RequestConfig } from '@sisense/sdk-ui-preact';
2
+ import { type ToRefs } from 'vue';
3
+ import type { MaybeRef, MaybeRefOrWithRefs } from '../types';
4
+ /**
5
+ * The options for the `useFetch` composable function.
6
+ */
7
+ export type UseFetchOptions = {
8
+ /** The request configuration object. */
9
+ requestConfig?: RequestConfig;
10
+ /** A boolean indicating whether the fetch operation is enabled. */
11
+ enabled?: boolean;
12
+ };
13
+ /**
14
+ * A Vue composable function `useFetch` that allows to make authorized fetch request to any Sisense API.
15
+ *
16
+ * @param path - The endpoint path to fetch data from. This should be a relative path like '/api/v1/endpoint'
17
+ * @param init - The request init object
18
+ * @param options - The additional request options
19
+ *
20
+ * @example
21
+ * How to use `useFetch` within a Vue component to fetch and display widget information:
22
+ * ```vue
23
+ * <script setup>
24
+ * import { ref } from "vue";
25
+ * import { useFetch } from "./composables/useFetch";
26
+ *
27
+ * const enabled = ref(true);
28
+ * const { data, isLoading, isError, error } = useFetch(
29
+ * "api/v1/elasticubes/getElasticubes",
30
+ * {
31
+ * method: "POST",
32
+ * },
33
+ * {
34
+ * enabled,
35
+ * });
36
+ * </script>
37
+ * ```
38
+ *
39
+ * The composable returns an object with reactive properties that represent the state of the data fetch operation:
40
+ * - `data`: The fetched data, which is `undefined` until the operation is successfully completed.
41
+ * - `isLoading`: A boolean indicating whether the fetch operation is currently in progress.
42
+ * - `isError`: A boolean indicating whether an error occurred during the fetch operation.
43
+ * - `isSuccess`: A boolean indicating whether the fetch operation was successfully completed without any errors.
44
+ * - `error`: An error object containing details about any errors that occurred during the fetch operation.
45
+ *
46
+ * @group Fusion Embed
47
+ * @fusionEmbed
48
+ */
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 { MaybeWithRefs } from '../types';
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: MaybeWithRefs<GetDashboardModelParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DashboardModelState>;
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 { MaybeWithRefs } from '../types';
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: MaybeWithRefs<GetDashboardModelsParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DashboardModelsState>;
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 { MaybeWithRefs } from '../types';
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: MaybeWithRefs<UseGetSharedFormulaParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").SharedFormulaState>;
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 { MaybeWithRefs } from '../types';
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: MaybeWithRefs<GetWidgetModelParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DataState<WidgetModel>>;
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
- hover: {
105
- color: string;
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
- hover: {
215
- color: string;
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
- hover: {
322
- color: string;
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;
@@ -1,5 +1,4 @@
1
1
  import { type Slots } from 'vue';
2
- export declare function isObject(value: unknown): boolean;
3
2
  export declare function getRawData<T>(data: T): T;
4
3
  export declare function toDeepRaw<T>(data: T): T;
5
4
  /**
@@ -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]: Ref<T[Property]> | T[Property];
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>;
@@ -1,6 +1,6 @@
1
- import type { MaybeRef, MaybeWithRefs } from './types';
1
+ import { type Ref } from 'vue';
2
+ import type { MaybeRef, MaybeRefOrWithRefs, MaybeWithRefs } from './types';
3
+ export declare function isObject(value: unknown): boolean;
2
4
  export declare function toPlainValue<T>(value: MaybeRef<T>): T;
3
- export declare function toPlainValues<T extends object>(refObj: T): {
4
- [K in keyof T]: T[K] extends MaybeRef<infer R> ? R : T[K];
5
- };
6
- export declare function collectRefs<T extends {}>(objectWithRefs: MaybeWithRefs<T>): unknown[];
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.10.1",
14
+ "version": "1.12.0",
15
15
  "type": "module",
16
- "main": "./dist/index.js",
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.10.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"