@sisense/sdk-ui-vue 1.1.0 → 1.3.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.
Files changed (35) hide show
  1. package/dist/index.js +56693 -47471
  2. package/dist/src/components/charts/area-chart.d.ts +2 -2
  3. package/dist/src/components/charts/areamap-chart.d.ts +4 -10
  4. package/dist/src/components/charts/bar-chart.d.ts +2 -2
  5. package/dist/src/components/charts/boxplot-chart.d.ts +6 -6
  6. package/dist/src/components/charts/chart-widget.d.ts +6 -6
  7. package/dist/src/components/charts/chart.d.ts +6 -6
  8. package/dist/src/components/charts/column-chart.d.ts +2 -2
  9. package/dist/src/components/charts/dashboard-widget.d.ts +4 -4
  10. package/dist/src/components/charts/funnel-chart.d.ts +2 -2
  11. package/dist/src/components/charts/index.d.ts +1 -0
  12. package/dist/src/components/charts/indicator-chart.d.ts +2 -2
  13. package/dist/src/components/charts/line-chart.d.ts +2 -2
  14. package/dist/src/components/charts/pie-chart.d.ts +2 -2
  15. package/dist/src/components/charts/polar-chart.d.ts +2 -2
  16. package/dist/src/components/charts/scatter-chart.d.ts +2 -2
  17. package/dist/src/components/charts/scattermap-chart.d.ts +37 -0
  18. package/dist/src/components/charts/sunburst-chart.d.ts +2 -2
  19. package/dist/src/components/charts/table-widget.d.ts +2 -2
  20. package/dist/src/components/charts/table.d.ts +2 -2
  21. package/dist/src/components/charts/treemap-chart.d.ts +2 -2
  22. package/dist/src/components/context-menu.d.ts +12 -0
  23. package/dist/src/components/drilldown-breadcrumbs.d.ts +14 -0
  24. package/dist/src/components/drilldown-widget.vue.d.ts +46 -0
  25. package/dist/src/helpers/use-reducer.d.ts +10 -0
  26. package/dist/src/hooks/use-custom-drilldown.d.ts +85 -0
  27. package/dist/src/hooks/use-execute-query-by-widget-id.d.ts +1 -3
  28. package/dist/src/hooks/use-execute-query.d.ts +4 -4
  29. package/dist/src/lib.d.ts +11 -2
  30. package/dist/src/providers/sisense-context-provider.d.ts +1 -6
  31. package/dist/src/providers/theme-provider.d.ts +1 -1
  32. package/dist/src/setup-helper.d.ts +12 -0
  33. package/dist/src/types.d.ts +5 -0
  34. package/dist/src/utils.d.ts +3 -0
  35. package/package.json +4 -1
@@ -0,0 +1,85 @@
1
+ import type { Attribute, Column } from '@sisense/sdk-data';
2
+ import { type DataPoint, type StyledColumn } from '@sisense/sdk-ui-preact';
3
+ import { type Ref } from 'vue';
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const useCustomDrilldown: ({ drilldownDimensions, initialDimension, }: {
8
+ drilldownDimensions: Ref<Attribute[]>;
9
+ initialDimension: Column | StyledColumn;
10
+ }) => {
11
+ selectDrilldown: (points: DataPoint[], nextDimension: Attribute) => void;
12
+ sliceDrilldownSelections: (i: number) => void;
13
+ clearDrilldownSelections: () => void;
14
+ drilldownSelections: Ref<{
15
+ points: ({
16
+ value?: string | number | undefined;
17
+ categoryValue?: string | number | undefined;
18
+ categoryDisplayValue?: string | undefined;
19
+ seriesValue?: string | number | undefined;
20
+ } | {
21
+ x?: string | number | undefined;
22
+ y?: string | number | undefined;
23
+ size?: number | undefined;
24
+ breakByPoint?: string | undefined;
25
+ breakByColor?: string | undefined;
26
+ } | {
27
+ boxMin: number;
28
+ boxMedian: number;
29
+ boxMax: number;
30
+ whiskerMin: number;
31
+ whiskerMax: number;
32
+ categoryValue?: string | number | undefined;
33
+ categoryDisplayValue?: string | undefined;
34
+ } | {
35
+ geoName: string;
36
+ originalValue: number;
37
+ formattedOriginalValue: string;
38
+ color?: import("@sisense/sdk-ui-preact").Color | undefined;
39
+ })[];
40
+ nextDimension: {
41
+ readonly expression: string;
42
+ getSort: () => import("@sisense/sdk-data").Sort;
43
+ sort: (sort: import("@sisense/sdk-data").Sort) => Attribute;
44
+ name: string;
45
+ readonly type: string;
46
+ readonly description: string;
47
+ readonly id: string;
48
+ serializable: () => any;
49
+ toJSON: () => any;
50
+ jaql: (nested?: boolean | undefined) => any;
51
+ skipValidation?: boolean | undefined;
52
+ };
53
+ }[]>;
54
+ availableDrilldowns: import("vue").ComputedRef<Attribute[]>;
55
+ drilldownDimension: Ref<Attribute | undefined>;
56
+ drilldownFilters: Ref<{
57
+ readonly members: any[];
58
+ readonly id: string;
59
+ serializable: () => any;
60
+ filterJaql: () => any;
61
+ readonly attribute: {
62
+ readonly expression: string;
63
+ getSort: () => import("@sisense/sdk-data").Sort;
64
+ sort: (sort: import("@sisense/sdk-data").Sort) => Attribute;
65
+ name: string;
66
+ readonly type: string;
67
+ readonly description: string;
68
+ readonly id: string;
69
+ serializable: () => any;
70
+ toJSON: () => any;
71
+ jaql: (nested?: boolean | undefined) => any;
72
+ skipValidation?: boolean | undefined;
73
+ };
74
+ readonly filterType: string;
75
+ readonly guid: string;
76
+ readonly name: string;
77
+ isScope: boolean;
78
+ jaql: (nested?: boolean | undefined) => any;
79
+ readonly description: string;
80
+ readonly type: string;
81
+ toJSON: () => any;
82
+ toString: () => string;
83
+ }[]>;
84
+ drilldownFiltersDisplayValues: Ref<string[][]>;
85
+ };
@@ -2,8 +2,6 @@ import type { ExecuteQueryByWidgetIdParams } from '@sisense/sdk-ui-preact';
2
2
  export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => Promise<{
3
3
  data: {
4
4
  data: import("@sisense/sdk-data").QueryResultData;
5
- query: Omit<import("@sisense/sdk-ui-preact").ExecuteQueryParams, "filters"> & {
6
- filters?: import("@sisense/sdk-data").Filter[] | undefined;
7
- };
5
+ query: import("@sisense/sdk-ui/dist/query/execute-query").QueryDescription;
8
6
  };
9
7
  }>;
@@ -1,4 +1,6 @@
1
- import type { ExecuteQueryParams } from '@sisense/sdk-ui-preact';
1
+ import { type ToRefs } from 'vue';
2
+ import { type ExecuteQueryParams, type QueryState } from '@sisense/sdk-ui-preact';
3
+ import type { MaybeWithRefs } from '../types';
2
4
  /**
3
5
  * A hook function that executes a data query.
4
6
  * TODO Document
@@ -6,6 +8,4 @@ import type { ExecuteQueryParams } from '@sisense/sdk-ui-preact';
6
8
  *
7
9
  * @returns TODO
8
10
  */
9
- export declare const useExecuteQuery: (params: ExecuteQueryParams) => Promise<{
10
- data: import("@sisense/sdk-data").QueryResultData;
11
- }>;
11
+ export declare const useExecuteQuery: (params: MaybeWithRefs<ExecuteQueryParams>) => ToRefs<QueryState>;
package/dist/src/lib.d.ts CHANGED
@@ -1,5 +1,14 @@
1
- export { SisenseContextProvider, ThemeProvider } from './providers';
1
+ /**
2
+ * @packageDocumentation
3
+ * @alpha
4
+ */
5
+ export { DrilldownBreadcrumbs } from './components/drilldown-breadcrumbs';
2
6
  export * from './components/charts';
3
7
  export * from './components/filters';
8
+ export * from './providers';
4
9
  export * from './hooks';
5
- export type { AreaChartProps, BarChartProps, ChartProps, LineChartProps, ColumnChartProps, FunnelChartProps, PolarChartProps, ScatterChartProps, PieChartProps, TreemapChartProps, SunburstChartProps, IndicatorChartProps, MemberFilterTileProps, CriteriaFilterTileProps, DateRangeFilterTileProps, ChartWidgetProps, TableWidgetProps, TableProps, CustomSisenseContextProviderProps, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, ExecuteCsvQueryParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, BoxplotChartProps, AreamapChartProps, } from '@sisense/sdk-ui-preact';
10
+ export * from './components/context-menu';
11
+ export { default as DrilldownWidget } from './components/drilldown-widget.vue';
12
+ import type { ContextMenuProps as ContextMenuPropsPreact } from '@sisense/sdk-ui-preact';
13
+ export type ContextMenuProps = Omit<ContextMenuPropsPreact, 'children'>;
14
+ export type { AreaChartProps, BarChartProps, ChartProps, LineChartProps, ColumnChartProps, FunnelChartProps, PolarChartProps, ScatterChartProps, PieChartProps, TreemapChartProps, SunburstChartProps, IndicatorChartProps, MemberFilterTileProps, CriteriaFilterTileProps, DateRangeFilterTileProps, ChartWidgetProps, TableWidgetProps, TableProps, CustomSisenseContextProviderProps, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, ExecuteCsvQueryParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, DrilldownBreadcrumbsProps, BoxplotChartProps, AreamapChartProps, SisenseContextProviderProps, ThemeProviderProps, ScattermapChartProps, } from '@sisense/sdk-ui-preact';
@@ -1,10 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { SisenseContextProviderProps } from '@sisense/sdk-ui-preact';
3
2
  import { ClientApplication } from '@sisense/sdk-ui-preact';
4
- /**
5
- * Gets Sisense context
6
- */
7
- export declare const getSisenseContext: () => SisenseContextProviderProps;
8
3
  /**
9
4
  * Gets Sisense application
10
5
  */
@@ -40,7 +35,7 @@ export declare const SisenseContextProvider: import("vue").DefineComponent<{
40
35
  enableTracking: PropType<boolean | undefined>;
41
36
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
42
37
  [key: string]: any;
43
- }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ }>[] | null | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
39
  defaultDataSource: PropType<string | undefined>;
45
40
  url: PropType<string>;
46
41
  ssoEnabled: PropType<boolean | undefined>;
@@ -90,7 +90,7 @@ export declare const ThemeProvider: import("vue").DefineComponent<{
90
90
  skipTracking: PropType<boolean | undefined>;
91
91
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
92
92
  [key: string]: any;
93
- }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
93
+ }>[] | null | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
94
94
  theme: PropType<string | import("@sisense/sdk-ui-preact").ThemeSettings | undefined>;
95
95
  /**
96
96
  * @internal
@@ -1,6 +1,18 @@
1
+ import { type Slots } from 'vue';
1
2
  export declare function isObject(value: unknown): boolean;
2
3
  export declare function getRawData<T>(data: T): T;
3
4
  export declare function toDeepRaw<T>(data: T): T;
5
+ /**
6
+ * @internal
7
+ * @description This is a helper function to render a component without children.
8
+ */
4
9
  export declare const setupHelper: <P, C>(component: C, props: P) => (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
5
10
  [key: string]: any;
6
11
  }>) | null;
12
+ /**
13
+ * @internal
14
+ * @description This is a helper function to render a component with children.
15
+ */
16
+ export declare const setupHelperWithChildren: <P, C>(component: C, props: P, slots: Slots, contexts?: []) => () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
17
+ [key: string]: any;
18
+ }>[];
@@ -0,0 +1,5 @@
1
+ import type { Ref } from 'vue';
2
+ export type MaybeRef<T> = Ref<T> | T;
3
+ export type MaybeWithRefs<T> = {
4
+ [Property in keyof T]: Ref<T[Property]> | T[Property];
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { MaybeRef, MaybeWithRefs } from './types';
2
+ export declare function toPlainValue<T>(value: MaybeRef<T>): T;
3
+ export declare function collectRefs<T extends {}>(objectWithRefs: MaybeWithRefs<T>): unknown[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.1.0",
14
+ "version": "1.3.0",
15
15
  "type": "module",
16
16
  "main": "./dist/index.js",
17
17
  "module": "./dist/index.js",
@@ -34,10 +34,13 @@
34
34
  "format:check": "prettier --check ."
35
35
  },
36
36
  "dependencies": {
37
+ "deepmerge": "^4.3.1",
38
+ "lodash": "^4.17.21",
37
39
  "vue": "^3.3.2"
38
40
  },
39
41
  "devDependencies": {
40
42
  "@rushstack/eslint-patch": "^1.2.0",
43
+ "@types/lodash": "^4.14.194",
41
44
  "@types/node": "^18.14.2",
42
45
  "@vitejs/plugin-vue": "^4.0.0",
43
46
  "@vue/eslint-config-prettier": "^7.1.0",