@sisense/sdk-ui-vue 1.10.1 → 1.11.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;
@@ -0,0 +1,49 @@
1
+ import type { DataState, RequestConfig } from '@sisense/sdk-ui-preact';
2
+ import { type ToRefs } from 'vue';
3
+ import type { MaybeRef, MaybeWithRefs } 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?: MaybeRef<RequestInit> | MaybeWithRefs<RequestInit>, options?: MaybeRef<UseFetchOptions> | MaybeWithRefs<UseFetchOptions>) => ToRefs<DataState<TData>>;
@@ -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,6 +1,6 @@
1
+ import { type Ref } from 'vue';
1
2
  import type { MaybeRef, 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 toPlainValues<T extends object>(refObj: MaybeRef<T> | MaybeWithRefs<T>): T;
6
+ export declare function collectRefs(...params: (MaybeRef<unknown> | MaybeWithRefs<unknown>)[]): Ref<unknown>[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.10.1",
14
+ "version": "1.11.0",
15
15
  "type": "module",
16
16
  "main": "./dist/index.js",
17
17
  "module": "./dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "format:check": "prettier --check ."
35
35
  },
36
36
  "dependencies": {
37
- "@sisense/sdk-ui-preact": "^1.10.1",
37
+ "@sisense/sdk-ui-preact": "^1.11.0",
38
38
  "deepmerge": "^4.3.1",
39
39
  "lodash": "^4.17.21",
40
40
  "vue": "^3.3.2"