@sisense/sdk-ui-vue 1.32.0 → 1.34.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 (64) hide show
  1. package/dist/ai.cjs +388 -0
  2. package/dist/ai.d.ts +1 -0
  3. package/dist/ai.js +3846 -0
  4. package/dist/index.cjs +1 -1063
  5. package/dist/index.js +1475 -105580
  6. package/dist/packages/sdk-ui-vue/src/ai/components/chatbot.d.ts +73 -0
  7. package/dist/packages/sdk-ui-vue/src/ai/components/get-nlg-insights.d.ts +90 -0
  8. package/dist/packages/sdk-ui-vue/src/ai/components/index.d.ts +2 -0
  9. package/dist/packages/sdk-ui-vue/src/ai/composables/index.d.ts +3 -0
  10. package/dist/packages/sdk-ui-vue/src/ai/composables/use-get-nlg-insights.d.ts +45 -0
  11. package/dist/packages/sdk-ui-vue/src/ai/composables/use-get-nlq-result.d.ts +42 -0
  12. package/dist/packages/sdk-ui-vue/src/ai/composables/use-get-query-recommendations.d.ts +50 -0
  13. package/dist/packages/sdk-ui-vue/src/ai/helpers/context-connectors/ai-context-connector.d.ts +7 -0
  14. package/dist/packages/sdk-ui-vue/src/ai/helpers/context-connectors/index.d.ts +1 -0
  15. package/dist/packages/sdk-ui-vue/src/ai/index.d.ts +4 -0
  16. package/dist/packages/sdk-ui-vue/src/ai/providers/ai-context-provider/ai-context-provider.d.ts +46 -0
  17. package/dist/packages/sdk-ui-vue/src/ai/providers/ai-context-provider/ai-context.d.ts +9 -0
  18. package/dist/packages/sdk-ui-vue/src/ai/providers/ai-context-provider/index.d.ts +2 -0
  19. package/dist/packages/sdk-ui-vue/src/ai/providers/index.d.ts +1 -0
  20. package/dist/packages/sdk-ui-vue/src/ai/sdk-ui-core-exports.d.ts +1 -0
  21. package/dist/packages/sdk-ui-vue/src/components/charts/chart.d.ts +4 -4
  22. package/dist/packages/sdk-ui-vue/src/components/charts/scattermap-chart.d.ts +2 -2
  23. package/dist/packages/sdk-ui-vue/src/components/dashboard/dashboard-by-id.d.ts +9 -8
  24. package/dist/packages/sdk-ui-vue/src/components/dashboard/dashboard.d.ts +13 -8
  25. package/dist/packages/sdk-ui-vue/src/components/filters/relative-date-filter-tile.d.ts +2 -2
  26. package/dist/packages/sdk-ui-vue/src/components/widgets/chart-widget.d.ts +4 -4
  27. package/dist/packages/sdk-ui-vue/src/components/widgets/dashboard-widget.d.ts +4 -4
  28. package/dist/packages/sdk-ui-vue/src/components/widgets/widget-by-id.d.ts +4 -4
  29. package/dist/packages/sdk-ui-vue/src/composables/index.d.ts +1 -0
  30. package/dist/packages/sdk-ui-vue/src/composables/use-execute-csv-query.d.ts +43 -0
  31. package/dist/packages/sdk-ui-vue/src/composables/use-plugins.d.ts +1 -5
  32. package/dist/packages/sdk-ui-vue/src/composables/use-tracking.d.ts +15 -15
  33. package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/index.d.ts +3 -0
  34. package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/plugins-context-connector.d.ts +8 -0
  35. package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/sisense-context-connector.d.ts +6 -0
  36. package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/theme-context-connector.d.ts +6 -0
  37. package/dist/packages/sdk-ui-vue/src/helpers/setup-helper.d.ts +21 -0
  38. package/dist/packages/sdk-ui-vue/src/helpers/use-reducer.d.ts +1 -1
  39. package/dist/packages/sdk-ui-vue/src/helpers/use-ref-state.d.ts +5 -0
  40. package/dist/packages/sdk-ui-vue/src/lib.d.ts +2 -1
  41. package/dist/packages/sdk-ui-vue/src/providers/index.d.ts +3 -3
  42. package/dist/packages/sdk-ui-vue/src/providers/plugins-provider/index.d.ts +2 -0
  43. package/dist/packages/sdk-ui-vue/src/providers/plugins-provider/plugins-context.d.ts +10 -0
  44. package/dist/packages/sdk-ui-vue/src/providers/plugins-provider/plugins-provider.d.ts +11 -0
  45. package/dist/packages/sdk-ui-vue/src/providers/sisense-context-provider/index.d.ts +2 -0
  46. package/dist/packages/sdk-ui-vue/src/providers/{sisense-context-provider.d.ts → sisense-context-provider/sisense-context-provider.d.ts} +2 -18
  47. package/dist/packages/sdk-ui-vue/src/providers/sisense-context-provider/sisense-context.d.ts +9 -0
  48. package/dist/packages/sdk-ui-vue/src/providers/theme-provider/index.d.ts +2 -0
  49. package/dist/packages/sdk-ui-vue/src/providers/theme-provider/theme-context.d.ts +7 -0
  50. package/dist/packages/sdk-ui-vue/src/providers/{theme-provider.d.ts → theme-provider/theme-provider.d.ts} +4 -22
  51. package/dist/packages/sdk-ui-vue/src/sdk-ui-core-exports.d.ts +2 -2
  52. package/dist/packages/sdk-ui-vue/src/types/dashboard-config.d.ts +24 -0
  53. package/dist/packages/sdk-ui-vue/src/types/index.d.ts +2 -0
  54. package/dist/packages/sdk-ui-vue/src/types/maybe-ref.d.ts +14 -0
  55. package/dist/packages/sdk-ui-vue/src/utilities/dashboard-helpers.d.ts +105 -0
  56. package/dist/packages/sdk-ui-vue/src/utilities/dashboard-model-translator.d.ts +37 -0
  57. package/dist/packages/sdk-ui-vue/src/utilities/index.d.ts +23 -0
  58. package/dist/packages/sdk-ui-vue/src/utilities/widget-model-translator.d.ts +247 -0
  59. package/dist/use-tracking-0536543b.js +105839 -0
  60. package/dist/use-tracking-07070102.cjs +1075 -0
  61. package/package.json +19 -4
  62. package/dist/packages/sdk-ui-vue/src/providers/plugins-provider.d.ts +0 -33
  63. package/dist/packages/sdk-ui-vue/src/setup-helper.d.ts +0 -19
  64. package/dist/packages/sdk-ui-vue/src/types.d.ts +0 -6
@@ -93,13 +93,13 @@ export declare const WidgetById: import("vue").DefineComponent<{
93
93
  *
94
94
  * @category Callbacks
95
95
  */
96
- onDataPointClick: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").AreamapDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").ScattermapDataPointEventHandler | undefined>;
96
+ onDataPointClick: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").AreamapDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").ScattermapDataPointEventHandler | undefined>;
97
97
  /**
98
98
  * {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.onDataPointContextMenu}
99
99
  *
100
100
  * @category Callbacks
101
101
  */
102
- onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | undefined>;
102
+ onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | undefined>;
103
103
  /**
104
104
  * {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.onDataPointsSelected}
105
105
  *
@@ -192,13 +192,13 @@ export declare const WidgetById: import("vue").DefineComponent<{
192
192
  *
193
193
  * @category Callbacks
194
194
  */
195
- onDataPointClick: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").AreamapDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").ScattermapDataPointEventHandler | undefined>;
195
+ onDataPointClick: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").AreamapDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").ScattermapDataPointEventHandler | undefined>;
196
196
  /**
197
197
  * {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.onDataPointContextMenu}
198
198
  *
199
199
  * @category Callbacks
200
200
  */
201
- onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | undefined>;
201
+ onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | undefined>;
202
202
  /**
203
203
  * {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.onDataPointsSelected}
204
204
  *
@@ -1,5 +1,6 @@
1
1
  export { useExecuteQuery } from './use-execute-query.js';
2
2
  export { useExecuteQueryByWidgetId } from './use-execute-query-by-widget-id.js';
3
+ export { useExecuteCsvQuery } from './use-execute-csv-query.js';
3
4
  export { useGetDashboardModel } from './use-get-dashboard-model.js';
4
5
  export { useGetDashboardModels } from './use-get-dashboard-models.js';
5
6
  export { useGetSharedFormula } from './use-get-shared-formula.js';
@@ -0,0 +1,43 @@
1
+ import { type ExecuteCsvQueryParams, type CsvQueryState } from '@sisense/sdk-ui-preact';
2
+ import type { MaybeRefOrWithRefs } from '../types';
3
+ /**
4
+ * A Vue composable function `useExecuteCsvQuery` that executes a CSV data query.
5
+
6
+ * @param {MaybeRefOrWithRefs<ExecuteQueryParams>} params - The parameters for the query, supporting reactive Vue refs.
7
+ * Includes details such as `dataSource`, `dimensions`, `measures`, `filters`, and more, allowing for comprehensive
8
+ * query configuration. The `filters` parameter supports dynamic filtering based on user interaction or other application
9
+ * state changes.
10
+ *
11
+ * @example
12
+ * How to use `useExecuteCsvQuery` within a Vue component:
13
+ * ```vue
14
+ * <script setup>
15
+ * import { ref } from 'vue';
16
+ * import { useExecuteCsvQuery } from '@sisense/sdk-ui-vue';
17
+ *
18
+ * const dataSource = ref('your_data_source_id');
19
+ * // Set up other query parameters as needed (dimensions, measures, filters, etc.)
20
+ *
21
+ * const { data, isLoading, isError, isSuccess, error } = useExecuteCsvQuery({
22
+ * dataSource,
23
+ * dimensions: [...],
24
+ * measures: [...],
25
+ * filters: [...],
26
+ * config: { asDataStream: false },
27
+ * // Additional query parameters
28
+ * });
29
+ * </script>
30
+ * ```
31
+ *
32
+ * The composable returns an object with the following reactive properties to manage the query state:
33
+ * - `data`: The CSV data (string or Blob) returned from the query. It remains `undefined` until the query completes successfully.
34
+ * - `isLoading`: Indicates if the query is in progress.
35
+ * - `isError`: Indicates if an error occurred during query execution.
36
+ * - `isSuccess`: Indicates if the query executed successfully without errors.
37
+ * - `error`: Contains the error object if an error occurred during the query.
38
+ *
39
+ * This composable facilitates integrating Sisense data fetching into Vue applications, enabling developers
40
+ * to easily manage query states and dynamically adjust query parameters based on application needs.
41
+ * @group Queries
42
+ */
43
+ export declare const useExecuteCsvQuery: (params: MaybeRefOrWithRefs<ExecuteCsvQueryParams>) => import("vue").ToRefs<CsvQueryState>;
@@ -1,8 +1,4 @@
1
1
  /**
2
2
  * @internal
3
3
  */
4
- export declare const usePlugins: () => {
5
- pluginMap: Map<string, import("@sisense/sdk-ui").PluginComponent<import("@sisense/sdk-ui").PluginComponentProps<import("@sisense/sdk-ui").GenericDataOptions, any>>> & Omit<Map<string, import("@sisense/sdk-ui").PluginComponent<import("@sisense/sdk-ui").PluginComponentProps<import("@sisense/sdk-ui").GenericDataOptions, any>>>, keyof Map<any, any>>;
6
- registerPlugin: (pluginType: string, plugin: import("@sisense/sdk-ui").PluginComponent<import("@sisense/sdk-ui").PluginComponentProps<import("@sisense/sdk-ui").GenericDataOptions, any>>) => void;
7
- getPlugin: (pluginType: string) => import("@sisense/sdk-ui").PluginComponent<import("@sisense/sdk-ui").PluginComponentProps<import("@sisense/sdk-ui").GenericDataOptions, any>> | undefined;
8
- };
4
+ export declare const usePlugins: () => import("@sisense/sdk-ui").CustomPluginsContext;
@@ -1,40 +1,40 @@
1
1
  /**
2
- * A Vue composable function `useTracking` designed to track the usage of hooks within Vue applications
3
- * using the Sisense SDK. It sends tracking information to the server whenever a specified hook is used,
2
+ * A Vue composable function `useTracking` designed to track the usage of composables within Vue applications
3
+ * using the Sisense SDK. It sends tracking information to the server whenever a specified composable is used,
4
4
  * helping in the analysis and optimization of application performance and usage patterns. This composable
5
- * is intended for internal use and aids in monitoring the integration and efficiency of Sisense SDK hooks.
5
+ * is intended for internal use and aids in monitoring the integration and efficiency of Sisense SDK composables.
6
6
  *
7
- * @param {string} hookName - The name of the hook being tracked. This identifier is used to log the hook
8
- * event uniquely, facilitating the collection of usage data for specific hooks within the application.
7
+ * @param {string} composableName - The name of the composable being tracked. This identifier is used to log the composable
8
+ * event uniquely, facilitating the collection of usage data for specific composables within the application.
9
9
  *
10
10
  * @example
11
- * How to use `useTracking` to track the usage of a custom hook:
11
+ * How to use `useTracking` to track the usage of a custom composable:
12
12
  * ```javascript
13
13
  * import { useTracking } from '@sisense/sdk-ui-vue';
14
14
  *
15
- * // Example hook that utilizes useTracking for monitoring its usage
16
- * export const useCustomHook = () => {
17
- * const { hasTrackedRef } = useTracking('useCustomHook');
15
+ * // Example composable that utilizes useTracking for monitoring its usage
16
+ * export const useCustomComposable = () => {
17
+ * const { hasTrackedRef } = useTracking('useCustomComposable');
18
18
  *
19
- * // Hook implementation...
19
+ * // composable implementation...
20
20
  *
21
21
  * return {
22
- * // Return values of your custom hook
22
+ * // Return values of your custom composable
23
23
  * };
24
24
  * };
25
25
  * ```
26
26
  *
27
27
  * The composable returns an object containing:
28
- * - `hasTrackedRef`: A Vue ref that indicates whether the tracking for the hook has been successfully
28
+ * - `hasTrackedRef`: A Vue ref that indicates whether the tracking for the composable has been successfully
29
29
  * sent to the server. It starts as `false` and is set to `true` once tracking is completed, preventing
30
30
  * duplicate tracking events.
31
31
  *
32
- * This internal utility composable is essential for maintaining insights into the usage of custom hooks
32
+ * This internal utility composable is essential for maintaining insights into the usage of custom composables
33
33
  * within applications leveraging the Sisense SDK, enabling developers and analysts to understand and optimize
34
- * hook interactions and performance.
34
+ * composable interactions and performance.
35
35
  *
36
36
  * @internal
37
37
  */
38
- export declare const useTracking: (hookName: string) => {
38
+ export declare const useTracking: (composableName: string) => {
39
39
  hasTrackedRef: import("vue").Ref<boolean>;
40
40
  };
@@ -0,0 +1,3 @@
1
+ export * from './sisense-context-connector';
2
+ export * from './theme-context-connector';
3
+ export * from './plugins-context-connector';
@@ -0,0 +1,8 @@
1
+ import type { ContextConnector, CustomPluginsProviderProps } from '@sisense/sdk-ui-preact';
2
+ /**
3
+ * Creates plugins context connector
4
+ *
5
+ * @group Contexts
6
+ * @internal
7
+ */
8
+ export declare const createPluginsContextConnector: () => ContextConnector<CustomPluginsProviderProps>;
@@ -0,0 +1,6 @@
1
+ import type { ContextConnector, CustomSisenseContextProviderProps } from '@sisense/sdk-ui-preact';
2
+ /**
3
+ * Creates Sisense context connector
4
+ * @internal
5
+ */
6
+ export declare const createSisenseContextConnector: () => ContextConnector<CustomSisenseContextProviderProps>;
@@ -0,0 +1,6 @@
1
+ import type { ContextConnector, CustomThemeProviderProps } from '@sisense/sdk-ui-preact';
2
+ /**
3
+ * Creates theme context connector
4
+ * @internal
5
+ */
6
+ export declare const createThemeContextConnector: () => ContextConnector<CustomThemeProviderProps>;
@@ -0,0 +1,21 @@
1
+ import { type Slots } from 'vue';
2
+ import { type ContextConnector, type AnyComponentFunction } from '@sisense/sdk-ui-preact';
3
+ export declare function createDefaultContextConnectors(): (ContextConnector<import("@sisense/sdk-ui-preact").CustomSisenseContextProviderProps> | ContextConnector<import("@sisense/sdk-ui-preact").CustomThemeProviderProps> | ContextConnector<import("@sisense/sdk-ui-preact").CustomPluginsProviderProps>)[];
4
+ export declare function getRawData<T>(data: T): T;
5
+ export declare function toDeepRaw<T>(data: T): T;
6
+ /**
7
+ * Renders a component without children.
8
+ *
9
+ * @internal
10
+ */
11
+ export declare const setupHelper: <C extends AnyComponentFunction>(component: C, props: Parameters<C>[0], contextConnectors?: ContextConnector<any>[]) => (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ [key: string]: any;
13
+ }>) | null;
14
+ /**
15
+ * Renders a component with children.
16
+ *
17
+ * @internal
18
+ */
19
+ export declare const setupHelperWithChildren: <C extends AnyComponentFunction>(component: C, props: Parameters<C>[0], slots: Slots, contextConnectors?: ContextConnector<any>[]) => () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
20
+ [key: string]: any;
21
+ }>[];
@@ -1,4 +1,4 @@
1
- import { type Ref } from 'vue';
1
+ import type { Ref } from 'vue';
2
2
  type State = Record<string, unknown>;
3
3
  type Action = {
4
4
  type: string;
@@ -0,0 +1,5 @@
1
+ import { type Ref } from 'vue';
2
+ type AnyObject = Record<string, any>;
3
+ export declare function updateRefObject<T extends AnyObject>(targetRef: Ref<T>, updateObj: Partial<T>): void;
4
+ export declare function useRefState<T>(initialValue?: T): [Ref<T>, (value: T) => void];
5
+ export {};
@@ -1,7 +1,7 @@
1
1
  export { DrilldownBreadcrumbs, type DrilldownBreadcrumbsProps, } from './components/drilldown-breadcrumbs';
2
2
  export * from './components/charts';
3
3
  export * from './components/filters';
4
- export * from './providers';
4
+ export { SisenseContextProvider, type SisenseContextProviderProps, ThemeProvider, type ThemeProviderProps, PluginsProvider, } from './providers';
5
5
  export * from './composables';
6
6
  export * from './components/context-menu';
7
7
  export * from './types';
@@ -10,3 +10,4 @@ export { type DrilldownWidgetProps } from './components/drilldown-widget';
10
10
  export * from './sdk-ui-core-exports';
11
11
  export * from './components/widgets';
12
12
  export * from './components/dashboard';
13
+ export * from './utilities';
@@ -1,3 +1,3 @@
1
- export { SisenseContextProvider, createSisenseContextConnector, getSisenseContext, type SisenseContextProviderProps, } from './sisense-context-provider';
2
- export { ThemeProvider, type ThemeProviderProps, createThemeContextConnector, } from './theme-provider';
3
- export { PluginsProvider, createPluginsContextConnector } from './plugins-provider';
1
+ export * from './sisense-context-provider';
2
+ export * from './theme-provider';
3
+ export * from './plugins-provider';
@@ -0,0 +1,2 @@
1
+ export * from './plugins-provider';
2
+ export * from './plugins-context';
@@ -0,0 +1,10 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { CustomPluginsContext } from '@sisense/sdk-ui-preact';
3
+ export declare const defaultPluginsContext: CustomPluginsContext;
4
+ export declare const pluginsContextKey: InjectionKey<Ref<CustomPluginsContext>>;
5
+ /**
6
+ * Gets Plugins context
7
+ *
8
+ * @group Contexts
9
+ */
10
+ export declare const getPluginsContext: () => Ref<CustomPluginsContext>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Provider for working with plugins fetched from an external environment.
3
+ *
4
+ * Provides methods for registering, retrieving, and interacting with plugins.
5
+ *
6
+ * @internal
7
+ * @group Contexts
8
+ */
9
+ export declare const PluginsProvider: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
@@ -0,0 +1,2 @@
1
+ export * from './sisense-context-provider';
2
+ export * from './sisense-context';
@@ -1,6 +1,5 @@
1
- import type { PropType, Ref } from 'vue';
1
+ import type { PropType } from 'vue';
2
2
  import type { SisenseContextProviderProps as SisenseContextProviderPropsPreact } from '@sisense/sdk-ui-preact';
3
- import { type CustomSisenseContext } from '@sisense/sdk-ui-preact';
4
3
  /**
5
4
  * Configurations and authentication for Sisense Context.
6
5
  *
@@ -12,19 +11,6 @@ import { type CustomSisenseContext } from '@sisense/sdk-ui-preact';
12
11
  */
13
12
  export interface SisenseContextProviderProps extends SisenseContextProviderPropsPreact {
14
13
  }
15
- /**
16
- * Gets Sisense application
17
- * @internal
18
- */
19
- export declare const getSisenseContext: () => Ref<import("@sisense/sdk-ui/dist/packages/sdk-ui/src/sisense-context/sisense-context").SisenseContextPayload>;
20
- /**
21
- * Creates Sisense context connector
22
- * @internal
23
- */
24
- export declare const createSisenseContextConnector: (context: CustomSisenseContext) => {
25
- prepareContext(): Promise<import("@sisense/sdk-ui/dist/packages/sdk-ui/src/sisense-context/sisense-context").SisenseContextPayload>;
26
- renderContextProvider: (contextData: import("@sisense/sdk-ui/dist/packages/sdk-ui/src/sisense-context/sisense-context").SisenseContextPayload | undefined, children: import("preact").VNode<{}>, error?: Error | undefined) => import("preact").VNode<{}>;
27
- };
28
14
  /**
29
15
  * Sisense Context Provider Component allowing you to connect to
30
16
  * a Sisense instance and provide that context
@@ -115,9 +101,7 @@ export declare const SisenseContextProvider: import("vue").DefineComponent<{
115
101
  type: PropType<boolean | undefined>;
116
102
  default: boolean;
117
103
  };
118
- }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
119
- [key: string]: any;
120
- }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
104
+ }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
121
105
  /**
122
106
  * {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.defaultDataSource}
123
107
  *
@@ -0,0 +1,9 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { CustomSisenseContext } from '@sisense/sdk-ui-preact';
3
+ export declare const defaultSisenseContext: CustomSisenseContext;
4
+ export declare const sisenseContextKey: InjectionKey<Ref<import("@sisense/sdk-ui/dist/packages/sdk-ui/src/sisense-context/sisense-context").SisenseContextPayload>>;
5
+ /**
6
+ * Gets sisense context
7
+ * @internal
8
+ */
9
+ export declare const getSisenseContext: () => Ref<CustomSisenseContext>;
@@ -0,0 +1,2 @@
1
+ export * from './theme-provider';
2
+ export * from './theme-context';
@@ -0,0 +1,7 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import { type CompleteThemeSettings } from '@sisense/sdk-ui-preact';
3
+ export declare const themeContextConfigKey: InjectionKey<Ref<CompleteThemeSettings>>;
4
+ /**
5
+ * Gets Theme context
6
+ */
7
+ export declare const getThemeContext: () => Ref<CompleteThemeSettings>;
@@ -1,28 +1,10 @@
1
- import type { PropType, Ref } from 'vue';
2
- import type { CompleteThemeSettings, ThemeProviderProps as ThemeProviderPropsPreact } from '@sisense/sdk-ui-preact';
1
+ import type { PropType } from 'vue';
2
+ import type { ThemeProviderProps as ThemeProviderPropsPreact, ThemeSettings } from '@sisense/sdk-ui-preact';
3
3
  /**
4
4
  * {@inheritDoc @sisense/sdk-ui!ThemeProviderProps}
5
5
  */
6
6
  export interface ThemeProviderProps extends Omit<ThemeProviderPropsPreact, 'children'> {
7
7
  }
8
- /**
9
- * Gets Theme context
10
- */
11
- export declare const getThemeContext: () => Ref<CompleteThemeSettings> | undefined;
12
- /**
13
- * Creates theme context connector
14
- * @internal
15
- */
16
- export declare const createThemeContextConnector: (themeSettings?: CompleteThemeSettings) => {
17
- prepareContext(): Promise<{
18
- themeSettings: CompleteThemeSettings;
19
- skipTracking: boolean;
20
- }>;
21
- renderContextProvider: (contextData: {
22
- themeSettings: CompleteThemeSettings;
23
- skipTracking?: boolean | undefined;
24
- }, children: import("preact").VNode<{}>, error?: Error | undefined) => import("preact").VNode<{}>;
25
- };
26
8
  /**
27
9
  * Theme provider, which allows you to adjust the look and feel of child components.
28
10
  *
@@ -86,7 +68,7 @@ export declare const createThemeContextConnector: (themeSettings?: CompleteTheme
86
68
  * @group Contexts
87
69
  */
88
70
  export declare const ThemeProvider: import("vue").DefineComponent<{
89
- theme: PropType<string | import("@sisense/sdk-ui-preact").ThemeSettings | undefined>;
71
+ theme: PropType<string | ThemeSettings | undefined>;
90
72
  /**
91
73
  * @internal
92
74
  */
@@ -94,7 +76,7 @@ export declare const ThemeProvider: import("vue").DefineComponent<{
94
76
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
95
77
  [key: string]: any;
96
78
  }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
97
- theme: PropType<string | import("@sisense/sdk-ui-preact").ThemeSettings | undefined>;
79
+ theme: PropType<string | ThemeSettings | undefined>;
98
80
  /**
99
81
  * @internal
100
82
  */
@@ -1,2 +1,2 @@
1
- export { boxWhiskerProcessResult, widgetModelTranslator, dashboardModelTranslator, dashboardHelpers, } from '@sisense/sdk-ui-preact';
2
- export type { ChartType, CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, AreamapChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, WidgetType, CartesianWidgetType, CategoricalWidgetType, TabularWidgetType, CommonWidgetProps, WidgetProps, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, GetHierarchyModelsParams, ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, TableDataOptions, PivotTableDataOptions, WidgetDataOptions, NumberFormatConfig, DecimalScale, DataColorCondition, ConditionalDataColorOptions, DataColorOptions, RangeDataColorOptions, UniformDataColorOptions, ValueToColorMap, MultiColumnValueToColorMap, SortDirection, BoxWhiskerType, ScattermapLocationLevel, StyledColumn, StyledMeasureColumn, PivotRowsSort, ChartStyleOptions, LineStyleOptions, AreaStyleOptions, StackableStyleOptions, PieStyleOptions, FunnelStyleOptions, PolarStyleOptions, IndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, NumericBarIndicatorStyleOptions, GaugeIndicatorStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, ChartWidgetStyleOptions, WidgetStyleOptions, DashboardWidgetStyleOptions, WidgetByIdStyleOptions, TableStyleOptions, PivotTableStyleOptions, AreaRangeStyleOptions, DataLimits, Legend, Markers, Labels, IndicatorComponents, ScatterMarkerSize, LineWidth, AxisLabel, Convolution, SeriesLabels, X2Title, ScattermapMarkers, WidgetModel, DashboardModel, BeforeRenderHandler, DataPoint, ScatterDataPoint, HighchartsOptions, BoxplotDataPoint, IndicatorBeforeRenderHandler, IndicatorRenderOptions, DashboardLayoutOptions, DashboardConfig, WidgetsPanelLayout, WidgetsPanelColumnLayout, WidgetId, WidgetsOptions, AppConfig, DateConfig, MenuItemSection, MonthOfYear, DayOfWeek, DateLevel, ThemeOid, GetDashboardModelOptions, GetDashboardModelsOptions, SeriesChartType, MenuPosition, ThemeSettings, Color, ColorPaletteTheme, Navigator, DrilldownOptions, DrilldownSelection, Member, FilterVariant, CriteriaFilterType, } from '@sisense/sdk-ui-preact';
1
+ export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
2
+ export type { ChartType, CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, AreamapChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, WidgetType, CartesianWidgetType, CategoricalWidgetType, TabularWidgetType, CommonWidgetProps, WidgetProps, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, GetHierarchyModelsParams, ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, TableDataOptions, PivotTableDataOptions, WidgetDataOptions, NumberFormatConfig, DecimalScale, DataColorCondition, ConditionalDataColorOptions, DataColorOptions, RangeDataColorOptions, UniformDataColorOptions, ValueToColorMap, MultiColumnValueToColorMap, SortDirection, BoxWhiskerType, ScattermapLocationLevel, StyledColumn, StyledMeasureColumn, PivotRowsSort, ChartStyleOptions, LineStyleOptions, AreaStyleOptions, StackableStyleOptions, PieStyleOptions, FunnelStyleOptions, PolarStyleOptions, IndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, NumericBarIndicatorStyleOptions, GaugeIndicatorStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, ChartWidgetStyleOptions, WidgetStyleOptions, DashboardWidgetStyleOptions, WidgetByIdStyleOptions, TableStyleOptions, PivotTableStyleOptions, AreaRangeStyleOptions, DataLimits, Legend, Markers, Labels, IndicatorComponents, ScatterMarkerSize, LineWidth, AxisLabel, Convolution, SeriesLabels, X2Title, ScattermapMarkers, WidgetModel, DashboardModel, BeforeRenderHandler, DataPoint, ScatterDataPoint, HighchartsOptions, BoxplotDataPoint, IndicatorBeforeRenderHandler, IndicatorRenderOptions, DashboardLayoutOptions, WidgetsPanelLayout, WidgetsPanelColumnLayout, WidgetId, WidgetsOptions, AppConfig, DateConfig, MenuItemSection, MonthOfYear, DayOfWeek, DateLevel, ThemeOid, GetDashboardModelOptions, GetDashboardModelsOptions, SeriesChartType, MenuPosition, ThemeSettings, Color, ColorPaletteTheme, Navigator, DrilldownOptions, DrilldownSelection, Member, FilterVariant, CriteriaFilterType, } from '@sisense/sdk-ui-preact';
@@ -0,0 +1,24 @@
1
+ import type { DashboardConfig as DashboardConfigPreact, DashboardByIdConfig as DashboardByIdConfigPreact, DashboardFiltersPanelConfig as DashboardFiltersPanelConfigPreact } from '@sisense/sdk-ui-preact';
2
+ /**
3
+ * {@inheritDoc @sisense/sdk-ui!DashboardFiltersPanelConfig}
4
+ */
5
+ export interface DashboardFiltersPanelConfig extends Omit<DashboardFiltersPanelConfigPreact, 'actions'> {
6
+ }
7
+ /**
8
+ * {@inheritDoc @sisense/sdk-ui!DashboardConfig}
9
+ */
10
+ export interface DashboardConfig extends Omit<DashboardConfigPreact, 'filtersPanel'> {
11
+ /**
12
+ * {@inheritDoc @sisense/sdk-ui!DashboardConfig.filtersPanel}
13
+ */
14
+ filtersPanel?: DashboardFiltersPanelConfig;
15
+ }
16
+ /**
17
+ * {@inheritDoc @sisense/sdk-ui!DashboardByIdConfig}
18
+ */
19
+ export interface DashboardByIdConfig extends Omit<DashboardByIdConfigPreact, 'filtersPanel'> {
20
+ /**
21
+ * {@inheritDoc @sisense/sdk-ui!DashboardByIdConfig.filtersPanel}
22
+ */
23
+ filtersPanel?: DashboardFiltersPanelConfig;
24
+ }
@@ -0,0 +1,2 @@
1
+ export * from './maybe-ref';
2
+ export * from './dashboard-config';
@@ -0,0 +1,14 @@
1
+ import type { Ref } from 'vue';
2
+ export type MaybeRef<T> = Ref<T> | T;
3
+ export type MaybeWithRefs<T extends object> = {
4
+ [Property in keyof T]: MaybeRef<T[Property]>;
5
+ };
6
+ export type MaybeRefOrWithRefs<T extends Object> = MaybeRef<T> | MaybeWithRefs<T>;
7
+ /**
8
+ * Converts all non-function properties of `T` into Vue refs while keeping function properties specified by `Fns` unchanged.
9
+ *
10
+ * @internal
11
+ */
12
+ export type ToRefsExceptFns<T, Fns extends keyof T> = {
13
+ [K in keyof Omit<T, Fns>]: Ref<T[K]>;
14
+ } & Pick<T, Fns>;
@@ -0,0 +1,105 @@
1
+ import type { Filter, FilterRelations } from '@sisense/sdk-data';
2
+ import type { DashboardProps } from '../components/dashboard';
3
+ /**
4
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilters}
5
+ *
6
+ * @example
7
+ * Replace all filters on a dashboard with a new set of filters.
8
+ * ```ts
9
+ * const existingDashboard: DashboardProps = {...}
10
+ * const newFilters: Filter[] = [{...}, {...}, ...];
11
+ * const updatedDashboard = dashboardHelpers.replaceFilters(existingDashboard, newFilters);
12
+ * ```
13
+ * @param dashboard - The original dashboard (`DashboardProps`) whose filters are to be replaced.
14
+ * @param newFilters - An array of new filters or filter relations to set on the dashboard.
15
+ * @returns A new dashboard instance with the updated filters.
16
+ */
17
+ export declare const replaceFilters: (dashboard: DashboardProps, newFilters: Filter[] | FilterRelations) => DashboardProps;
18
+ /**
19
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilter}
20
+ *
21
+ * @example
22
+ * Add a new filter to a dashboard.
23
+ * ```ts
24
+ * const existingDashboard: DashboardProps = {...};
25
+ * const newFilter: Filter = {...};
26
+ * const updatedDashboard = dashboardHelpers.addFilter(existingDashboard, newFilter);
27
+ * ```
28
+ * @param dashboard - The original dashboard (`DashboardProps`) to which the filter will be added.
29
+ * @param newFilter - The filter to add to the dashboard.
30
+ * @returns A new dashboard instance with the new filter added.
31
+ */
32
+ export declare const addFilter: (dashboard: DashboardProps, newFilter: Filter) => DashboardProps;
33
+ /**
34
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilters}
35
+ *
36
+ * @example
37
+ * Add multiple new filters to a dashboard.
38
+ * ```ts
39
+ * const existingDashboard: DashboardProps = {...};
40
+ * const newFilters: Filter[] = [{...}, {...}, ...];
41
+ * const updatedDashboard = dashboardHelpers.addFilters(existingDashboard, newFilters);
42
+ * ```
43
+ * @param dashboard - The original dashboard (`DashboardProps`) to which the filters will be added.
44
+ * @param newFilters - An array of filters to add to the dashboard.
45
+ * @returns A new dashboard instance with the new filters added.
46
+ */
47
+ export declare const addFilters: (dashboard: DashboardProps, newFilters: Filter[]) => DashboardProps;
48
+ /**
49
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilter}
50
+ *
51
+ * @example
52
+ * Replace a filter in a dashboard.
53
+ * ```ts
54
+ * const existingDashboard: DashboardProps = {...};
55
+ * const filterToReplace: Filter = {...};
56
+ * const newFilter: Filter = {...};
57
+ * const updatedDashboard = dashboardHelpers.replaceFilter(existingDashboard, filterToReplace, newFilter);
58
+ * ```
59
+ * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to be replaced.
60
+ * @param filterToReplace - The existing filter to be replaced.
61
+ * @param newFilter - The new filter to replace the existing one.
62
+ * @returns A new dashboard instance with the specified filter replaced.
63
+ */
64
+ export declare const replaceFilter: (dashboard: DashboardProps, filterToReplace: Filter, newFilter: Filter) => DashboardProps;
65
+ /**
66
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.modifyFilter}
67
+ *
68
+ * @deprecated Use {@link replaceFilter} instead
69
+ *
70
+ * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
71
+ * @param filterToModify - The existing filter to be modified.
72
+ * @param newFilter - The new filter to replace the existing one.
73
+ * @returns A new dashboard instance with the specified filter modified.
74
+ */
75
+ export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: Filter, newFilter: Filter) => DashboardProps;
76
+ /**
77
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilter}
78
+ *
79
+ * @example
80
+ * Remove a filter from a dashboard.
81
+ * ```ts
82
+ * const existingDashboard: DashboardProps = {...};
83
+ * const filterToRemove: Filter = {...};
84
+ * const updatedDashboard = dashboardHelpers.removeFilter(existingDashboard, filterToRemove);
85
+ * ```
86
+ * @param dashboard - The original dashboard (`DashboardProps`) from which to remove the filter.
87
+ * @param filterToRemove - The filter to be removed.
88
+ * @returns A new dashboard instance with the specified filter removed.
89
+ */
90
+ export declare const removeFilter: (dashboard: DashboardProps, filterToRemove: Filter) => DashboardProps;
91
+ /**
92
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilters}
93
+ *
94
+ * @example
95
+ * Remove multiple filters from a dashboard.
96
+ * ```ts
97
+ * const existingDashboard: DashboardProps = {...};
98
+ * const filtersToRemove: Filter[] = [{...}, {...}, ...];
99
+ * const updatedDashboard = dashboardHelpers.removeFilters(existingDashboard, filtersToRemove);
100
+ * ```
101
+ * @param dashboard - The original dashboard (`DashboardProps`) from which the specified filters are removed.
102
+ * @param filtersToRemove - An array of filters to remove.
103
+ * @returns A new dashboard instance with the specified filters removed.
104
+ */
105
+ export declare const removeFilters: (dashboard: DashboardProps, filtersToRemove: Filter[]) => DashboardProps;
@@ -0,0 +1,37 @@
1
+ import { type DashboardModel } from '@sisense/sdk-ui-preact';
2
+ import type { DashboardProps } from '../components/dashboard';
3
+ /**
4
+ * Translates {@link DashboardModel} to {@link DashboardProps}.
5
+ *
6
+ * @example
7
+ * ```vue
8
+ <script setup lang="ts">
9
+ import { dashboardModelTranslator, useGetDashboardModel, Dashboard } from '@sisense/sdk-ui-vue';
10
+ import { computed } from 'vue';
11
+
12
+ const { dashboard } = useGetDashboardModel({
13
+ dashboardOid: 'your-dashboard-oid',
14
+ includeWidgets: true,
15
+ includeFilters: true,
16
+ });
17
+
18
+ const dashboardProps = computed(() =>
19
+ dashboard.value ? dashboardModelTranslator.toDashboardProps(dashboard.value) : null,
20
+ );
21
+ </script>
22
+
23
+ <template>
24
+ <Dashboard
25
+ v-if="dashboardProps"
26
+ :title="dashboardProps.title"
27
+ :layoutOptions="dashboardProps.layoutOptions"
28
+ :widgets="dashboardProps.widgets"
29
+ :filters="dashboardProps.filters"
30
+ :defaultDataSource="dashboardProps.defaultDataSource"
31
+ :widgetsOptions="dashboardProps.widgetsOptions"
32
+ :styleOptions="dashboardProps.styleOptions"
33
+ />
34
+ </template>
35
+ * ```
36
+ */
37
+ export declare function toDashboardProps(dashboardModel: DashboardModel): DashboardProps;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * {@inheritDoc @sisense/sdk-ui!dashboardModelTranslator}
3
+ *
4
+ * @group Fusion Assets
5
+ * @fusionEmbed
6
+ * @shortDescription Utility functions to translate a Fusion dashboard model from and to other dashboard data structures
7
+ */
8
+ export * as dashboardModelTranslator from './dashboard-model-translator';
9
+ /**
10
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers}
11
+ *
12
+ * @group Dashboards
13
+ * @shortDescription Utility functions to manipulate dashboard elements
14
+ */
15
+ export * as dashboardHelpers from './dashboard-helpers';
16
+ /**
17
+ * {@inheritDoc @sisense/sdk-ui!widgetModelTranslator}
18
+ *
19
+ * @group Fusion Assets
20
+ * @fusionEmbed
21
+ * @shortDescription Utility functions to translate a Fusion widget model from and to other widget data structures
22
+ */
23
+ export * as widgetModelTranslator from './widget-model-translator';