@sisense/sdk-ui-vue 1.3.0 → 1.4.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.
- package/dist/index.js +81798 -64908
- package/dist/src/components/charts/area-chart.d.ts +20 -7
- package/dist/src/components/charts/areamap-chart.d.ts +19 -7
- package/dist/src/components/charts/bar-chart.d.ts +21 -8
- package/dist/src/components/charts/boxplot-chart.d.ts +23 -9
- package/dist/src/components/charts/chart-widget.d.ts +38 -7
- package/dist/src/components/charts/chart.d.ts +12 -23
- package/dist/src/components/charts/column-chart.d.ts +21 -8
- package/dist/src/components/charts/dashboard-widget.d.ts +9 -9
- package/dist/src/components/charts/funnel-chart.d.ts +19 -5
- package/dist/src/components/charts/index.d.ts +1 -0
- package/dist/src/components/charts/indicator-chart.d.ts +18 -7
- package/dist/src/components/charts/line-chart.d.ts +18 -6
- package/dist/src/components/charts/pie-chart.d.ts +20 -8
- package/dist/src/components/charts/pivot-table.d.ts +41 -0
- package/dist/src/components/charts/polar-chart.d.ts +20 -8
- package/dist/src/components/charts/scatter-chart.d.ts +26 -8
- package/dist/src/components/charts/scattermap-chart.d.ts +20 -5
- package/dist/src/components/charts/sunburst-chart.d.ts +14 -6
- package/dist/src/components/charts/table-widget.d.ts +4 -2
- package/dist/src/components/charts/table.d.ts +4 -3
- package/dist/src/components/charts/treemap-chart.d.ts +19 -7
- package/dist/src/components/context-menu.d.ts +32 -0
- package/dist/src/components/drilldown-breadcrumbs.d.ts +41 -0
- package/dist/src/components/drilldown-widget.d.ts +44 -0
- package/dist/src/components/drilldown-widget.vue.d.ts +2 -44
- package/dist/src/components/filters/basic-member-filter-tile.d.ts +1 -0
- package/dist/src/components/filters/criteria-filter-tile.d.ts +19 -4
- package/dist/src/components/filters/date-range-filter-tile.d.ts +14 -5
- package/dist/src/components/filters/member-filter-tile.d.ts +16 -5
- package/dist/src/composables/index.d.ts +6 -0
- package/dist/src/composables/use-execute-query-by-widget-id.d.ts +42 -0
- package/dist/src/composables/use-execute-query.d.ts +44 -0
- package/dist/src/composables/use-get-dashboard-model.d.ts +41 -0
- package/dist/src/composables/use-get-dashboard-models.d.ts +38 -0
- package/dist/src/composables/use-get-shared-formula.d.ts +45 -0
- package/dist/src/composables/use-get-widget-model.d.ts +41 -0
- package/dist/src/composables/use-tracking.d.ts +39 -0
- package/dist/src/lib.d.ts +2 -8
- package/dist/src/providers/index.d.ts +1 -1
- package/dist/src/providers/sisense-context-provider.d.ts +50 -5
- package/dist/src/providers/theme-provider.d.ts +61 -6
- package/dist/src/sdk-ui-core-exports.d.ts +5 -0
- package/dist/src/utils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/src/hooks/index.d.ts +0 -6
- package/dist/src/hooks/use-execute-query-by-widget-id.d.ts +0 -7
- package/dist/src/hooks/use-execute-query.d.ts +0 -11
- package/dist/src/hooks/use-get-dashboard-model.d.ts +0 -4
- package/dist/src/hooks/use-get-dashboard-models.d.ts +0 -4
- package/dist/src/hooks/use-get-shared-formula.d.ts +0 -4
- package/dist/src/hooks/use-get-widget-model.d.ts +0 -4
- /package/dist/src/{hooks → composables}/use-custom-drilldown.d.ts +0 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
import type { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from '@sisense/sdk-ui-preact';
|
2
|
+
import { type ToRefs } from 'vue';
|
3
|
+
import type { MaybeWithRefs } from '../types';
|
4
|
+
/**
|
5
|
+
* A Vue composable function `useExecuteQueryByWidgetId` for executing queries by widget ID using the Sisense SDK.
|
6
|
+
* It simplifies the process of fetching data related to a specific widget based on provided parameters and manages
|
7
|
+
* the query's loading, success, and error states. This composable integrates with the Sisense application context
|
8
|
+
* to perform queries and handle their results within Vue components.
|
9
|
+
*
|
10
|
+
* @param {ExecuteQueryByWidgetIdParams} params - Parameters for executing the query, including widget ID, filters,
|
11
|
+
* and other relevant query options. The `filters` parameter allows for specifying dynamic filters for the query.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* Here's how to use `useExecuteQueryByWidgetId` within a Vue component:
|
15
|
+
* ```vue
|
16
|
+
* <script setup>
|
17
|
+
* import { ref } from 'vue';
|
18
|
+
* import { useExecuteQueryByWidgetId } from './composables/useExecuteQueryByWidgetId';
|
19
|
+
*
|
20
|
+
* const widgetId = ref('your_widget_id_here');
|
21
|
+
* const filters = ref([...]); // Define filters if necessary
|
22
|
+
*
|
23
|
+
* const { data, isLoading, isError, isSuccess, error } = useExecuteQueryByWidgetId({
|
24
|
+
* widgetId,
|
25
|
+
* filters,
|
26
|
+
* enabled: true, // Optional: Use to enable/disable the query execution
|
27
|
+
* });
|
28
|
+
* </script>
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* This composable returns an object containing reactive state management properties for the query:
|
32
|
+
* - `data`: The result of the query, undefined until the query completes successfully.
|
33
|
+
* - `isLoading`: A boolean indicating if the query is currently loading.
|
34
|
+
* - `isError`: A boolean indicating if an error occurred during the query execution.
|
35
|
+
* - `isSuccess`: A boolean indicating if the query executed successfully.
|
36
|
+
* - `error`: An Error object containing the error details if an error occurred.
|
37
|
+
* - `query`: The query object returned by the SDK, useful for debugging or advanced handling.
|
38
|
+
*
|
39
|
+
* Utilizing this composable allows for declarative and reactive handling of widget-specific queries within Vue applications,
|
40
|
+
* facilitating easier data fetching and state management with the Sisense SDK.
|
41
|
+
*/
|
42
|
+
export declare const useExecuteQueryByWidgetId: (params: MaybeWithRefs<ExecuteQueryByWidgetIdParams>) => ToRefs<QueryByWidgetIdState>;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { type ExecuteQueryParams } from '@sisense/sdk-ui-preact';
|
2
|
+
import type { MaybeWithRefs } from '../types';
|
3
|
+
/**
|
4
|
+
* A Vue composable function `useExecuteQuery` for executing Sisense queries with flexible parameters.
|
5
|
+
* It handles query execution, including loading, error, and success states, and enables dynamic query configuration
|
6
|
+
* through reactive parameters. This composable is particularly useful for applications requiring data from Sisense
|
7
|
+
* analytics, offering a reactive and declarative approach to data fetching and state management.
|
8
|
+
*
|
9
|
+
* @param {MaybeWithRefs<ExecuteQueryParams>} params - The parameters for the query, supporting reactive Vue refs.
|
10
|
+
* Includes details such as `dataSource`, `dimensions`, `measures`, `filters`, and more, allowing for comprehensive
|
11
|
+
* query configuration. The `filters` parameter supports dynamic filtering based on user interaction or other application
|
12
|
+
* state changes.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* How to use `useExecuteQuery` within a Vue component:
|
16
|
+
* ```vue
|
17
|
+
* <script setup>
|
18
|
+
* import { ref } from 'vue';
|
19
|
+
* import { useExecuteQuery } from './composables/useExecuteQuery';
|
20
|
+
*
|
21
|
+
* const dataSource = ref('your_data_source_id');
|
22
|
+
* // Set up other query parameters as needed (dimensions, measures, filters, etc.)
|
23
|
+
*
|
24
|
+
* const { data, isLoading, isError, isSuccess, error } = useExecuteQuery({
|
25
|
+
* dataSource,
|
26
|
+
* dimensions: [...],
|
27
|
+
* measures: [...],
|
28
|
+
* filters: [...],
|
29
|
+
* // Additional query parameters
|
30
|
+
* });
|
31
|
+
* </script>
|
32
|
+
* ```
|
33
|
+
*
|
34
|
+
* The composable returns an object with the following reactive properties to manage the query state:
|
35
|
+
* - `data`: The data returned from the query. It remains `undefined` until the query completes successfully.
|
36
|
+
* - `isLoading`: Indicates if the query is in progress.
|
37
|
+
* - `isError`: Indicates if an error occurred during query execution.
|
38
|
+
* - `isSuccess`: Indicates if the query executed successfully without errors.
|
39
|
+
* - `error`: Contains the error object if an error occurred during the query.
|
40
|
+
*
|
41
|
+
* This composable facilitates integrating Sisense data fetching into Vue applications, enabling developers
|
42
|
+
* to easily manage query states and dynamically adjust query parameters based on application needs.
|
43
|
+
*/
|
44
|
+
export declare const useExecuteQuery: (params: MaybeWithRefs<ExecuteQueryParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").QueryState>;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import type { MaybeWithRefs } from '../types';
|
2
|
+
import type { GetDashboardModelParams } from '@sisense/sdk-ui-preact';
|
3
|
+
/**
|
4
|
+
* A Vue composable function `useGetDashboardModel` for fetching a Sisense dashboard model.
|
5
|
+
* It simplifies the process of retrieving detailed dashboard data, including widgets if specified,
|
6
|
+
* by managing the loading, success, and error states of the request. This composable is especially useful
|
7
|
+
* for Vue applications that need to integrate Sisense dashboard analytics, providing a reactive way to fetch
|
8
|
+
* and display dashboard data.
|
9
|
+
*
|
10
|
+
* @param {GetDashboardModelParams} params - The parameters for fetching the dashboard model, including the
|
11
|
+
* dashboard OID and an option to include widgets within the dashboard. Supports dynamic parameter values through
|
12
|
+
* Vue refs, allowing for reactive dashboard loading based on user interactions or other application states.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* How to use `useGetDashboardModel` within a Vue component to fetch and display a Sisense dashboard:
|
16
|
+
* ```vue
|
17
|
+
* <script setup>
|
18
|
+
* import { ref } from 'vue';
|
19
|
+
* import { useGetDashboardModel } from './composables/useGetDashboardModel';
|
20
|
+
*
|
21
|
+
* const dashboardOid = ref('your_dashboard_oid');
|
22
|
+
* const includeWidgets = ref(true); // Decide whether to include widgets in the dashboard model
|
23
|
+
*
|
24
|
+
* const { data: dashboardModel, isLoading, isError, error } = useGetDashboardModel({
|
25
|
+
* dashboardOid,
|
26
|
+
* includeWidgets,
|
27
|
+
* });
|
28
|
+
* </script>
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* The composable returns an object with reactive properties to manage the state of the dashboard model fetching process:
|
32
|
+
* - `dashboard`: The fetched dashboard model data, which is `undefined` until the fetch completes successfully.
|
33
|
+
* - `isLoading`: Indicates if the dashboard model is currently being fetched.
|
34
|
+
* - `isError`: Indicates if an error occurred during the fetch process.
|
35
|
+
* - `isSuccess`: Indicates if the dashboard model was successfully fetched without errors.
|
36
|
+
* - `error`: Contains the error object if an error occurred during the fetch.
|
37
|
+
*
|
38
|
+
* Utilizing this composable enables developers to declaratively integrate Sisense dashboard analytics into their Vue applications,
|
39
|
+
* managing data fetching and state with minimal boilerplate code.
|
40
|
+
*/
|
41
|
+
export declare const useGetDashboardModel: (params: MaybeWithRefs<GetDashboardModelParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DashboardModelState>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import type { GetDashboardModelsParams } from '@sisense/sdk-ui-preact';
|
2
|
+
import type { MaybeWithRefs } from '../types';
|
3
|
+
/**
|
4
|
+
* A Vue composable function `useGetDashboardModels` for fetching multiple Sisense dashboard models.
|
5
|
+
* This function abstracts the complexities of managing API calls and state management for fetching an array of
|
6
|
+
* dashboard models from Sisense. It provides a reactive interface to handle loading, success, and error states,
|
7
|
+
* making it easier to integrate Sisense analytics within Vue applications.
|
8
|
+
*
|
9
|
+
* @param {GetDashboardModelsParams} params - Parameters for fetching the dashboard models, which can include filters,
|
10
|
+
* sorting options, and pagination settings to customize the fetch operation. The parameters allow for precise control
|
11
|
+
* over which dashboards are retrieved and in what order.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* How to use `useGetDashboardModels` within a Vue component to fetch and list Sisense dashboards:
|
15
|
+
* ```vue
|
16
|
+
* <script setup>
|
17
|
+
* import { ref } from 'vue';
|
18
|
+
* import { useGetDashboardModels } from './composables/useGetDashboardModels';
|
19
|
+
*
|
20
|
+
* const params = ref({
|
21
|
+
* // Define your parameters here, such as pagination settings, filters, etc.
|
22
|
+
* });
|
23
|
+
*
|
24
|
+
* const { data: dashboardModels, isLoading, isError, error } = useGetDashboardModels(params);
|
25
|
+
* </script>
|
26
|
+
* ```
|
27
|
+
*
|
28
|
+
* The composable returns an object with reactive properties that represent the state of the fetch operation:
|
29
|
+
* - `data`: An array of dashboard models returned from the fetch operation. This is `undefined` until the operation completes successfully.
|
30
|
+
* - `isLoading`: A boolean indicating whether the fetch operation is currently in progress.
|
31
|
+
* - `isError`: A boolean indicating whether an error occurred during the fetch operation.
|
32
|
+
* - `isSuccess`: A boolean indicating whether the fetch operation completed successfully without any errors.
|
33
|
+
* - `error`: An error object containing details about any errors that occurred during the fetch operation.
|
34
|
+
*
|
35
|
+
* This composable is ideal for Vue applications requiring a list of Sisense dashboards, providing a streamlined, reactive
|
36
|
+
* way to fetch and manage the state of multiple dashboard models.
|
37
|
+
*/
|
38
|
+
export declare const useGetDashboardModels: (params: MaybeWithRefs<GetDashboardModelsParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DashboardModelsState>;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import type { UseGetSharedFormulaParams } from '@sisense/sdk-ui-preact';
|
2
|
+
import type { MaybeWithRefs } from '../types';
|
3
|
+
/**
|
4
|
+
* A Vue composable function `useGetSharedFormula` for retrieving shared formulas from Sisense.
|
5
|
+
* This function enables fetching a shared formula either by its unique OID or by its name and associated data source,
|
6
|
+
* providing flexibility in how shared formulas are accessed. It manages the fetch operation's state, including loading,
|
7
|
+
* success, and error states, offering a reactive way to integrate Sisense formulas into Vue applications.
|
8
|
+
*
|
9
|
+
* @param {UseGetSharedFormulaParams} params - Parameters for fetching the shared formula, including the formula's OID,
|
10
|
+
* or its name and the data source. This allows for precise specification of the formula to be fetched, supporting dynamic
|
11
|
+
* values through Vue refs for reactive fetching based on user interactions or other application states.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* How to use `useGetSharedFormula` within a Vue component to fetch a shared formula:
|
15
|
+
* ```vue
|
16
|
+
* <script setup>
|
17
|
+
* import { ref } from 'vue';
|
18
|
+
* import { useGetSharedFormula } from './composables/useGetSharedFormula';
|
19
|
+
*
|
20
|
+
* // To fetch by OID
|
21
|
+
* const paramsByOid = ref({
|
22
|
+
* oid: 'your_formula_oid',
|
23
|
+
* });
|
24
|
+
*
|
25
|
+
* // Or to fetch by name and dataSource
|
26
|
+
* const paramsByName = ref({
|
27
|
+
* name: 'your_formula_name',
|
28
|
+
* dataSource: 'your_data_source_id',
|
29
|
+
* });
|
30
|
+
*
|
31
|
+
* const { data: formula, isLoading, isError, error } = useGetSharedFormula(paramsByOid);
|
32
|
+
* // Or use `paramsByName` instead of `paramsByOid` depending on the fetching method
|
33
|
+
* </script>
|
34
|
+
* ```
|
35
|
+
*
|
36
|
+
* The composable returns an object with reactive properties to manage the state of the shared formula fetching process:
|
37
|
+
* - `data`: The fetched shared formula, which is `undefined` until the operation completes successfully. It can be either a `CalculatedMeasure` or `DimensionalCalculatedMeasure` based on the fetch result.
|
38
|
+
* - `isLoading`: Indicates whether the fetch operation is currently in progress.
|
39
|
+
* - `isError`: Indicates whether an error occurred during the fetch operation.
|
40
|
+
* - `isSuccess`: Indicates whether the fetch operation completed successfully without any errors.
|
41
|
+
* - `error`: Contains the error object if an error occurred during the fetch.
|
42
|
+
*
|
43
|
+
* This composable provides a streamlined, reactive approach to fetching shared formulas from Sisense, facilitating their integration into Vue applications for enhanced data analytics capabilities.
|
44
|
+
*/
|
45
|
+
export declare const useGetSharedFormula: (params: MaybeWithRefs<UseGetSharedFormulaParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").SharedFormulaState>;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import type { GetWidgetModelParams, WidgetModel } from '@sisense/sdk-ui-preact';
|
2
|
+
import type { MaybeWithRefs } from '../types';
|
3
|
+
/**
|
4
|
+
* A Vue composable function `useGetWidgetModel` for retrieving widget models from a Sisense dashboard.
|
5
|
+
* It is designed to fetch a specific widget model based on the provided dashboard and widget OIDs, handling the loading,
|
6
|
+
* success, and error states of the fetch operation. This composable is particularly useful for Vue applications that
|
7
|
+
* require detailed information about a Sisense widget for data visualization or analytics purposes.
|
8
|
+
*
|
9
|
+
* @param {GetWidgetModelParams} params - The parameters for fetching the widget model, including the `dashboardOid`
|
10
|
+
* (the OID of the dashboard containing the widget) and the `widgetOid` (the OID of the widget to fetch). This allows for
|
11
|
+
* precise and dynamic fetching of widget models based on application needs.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* How to use `useGetWidgetModel` within a Vue component to fetch and display widget information:
|
15
|
+
* ```vue
|
16
|
+
* <script setup>
|
17
|
+
* import { ref } from 'vue';
|
18
|
+
* import { useGetWidgetModel } from './composables/useGetWidgetModel';
|
19
|
+
*
|
20
|
+
* const dashboardOid = ref('your_dashboard_oid');
|
21
|
+
* const widgetOid = ref('your_widget_oid');
|
22
|
+
*
|
23
|
+
* const { data: widgetModel, isLoading, isError, error } = useGetWidgetModel({
|
24
|
+
* dashboardOid,
|
25
|
+
* widgetOid,
|
26
|
+
* });
|
27
|
+
* </script>
|
28
|
+
* ```
|
29
|
+
*
|
30
|
+
* The composable returns an object with reactive properties that represent the state of the widget model fetch operation:
|
31
|
+
* - `data`: The fetched widget model, which is `undefined` until the operation is successfully completed. The widget model
|
32
|
+
* contains detailed information about the widget, such as its configuration, data, and settings.
|
33
|
+
* - `isLoading`: A boolean indicating whether the fetch operation is currently in progress.
|
34
|
+
* - `isError`: A boolean indicating whether an error occurred during the fetch operation.
|
35
|
+
* - `isSuccess`: A boolean indicating whether the fetch operation was successfully completed without any errors.
|
36
|
+
* - `error`: An error object containing details about any errors that occurred during the fetch operation.
|
37
|
+
*
|
38
|
+
* This composable streamlines the process of fetching and managing Sisense widget models within Vue applications, providing
|
39
|
+
* developers with a reactive and efficient way to integrate Sisense data visualizations and analytics.
|
40
|
+
*/
|
41
|
+
export declare const useGetWidgetModel: (params: MaybeWithRefs<GetWidgetModelParams>) => import("vue").ToRefs<import("@sisense/sdk-ui-preact").DataState<WidgetModel>>;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* @internal
|
3
|
+
* A Vue composable function `useTracking` designed to track the usage of hooks within Vue applications
|
4
|
+
* using the Sisense SDK. It sends tracking information to the server whenever a specified hook is used,
|
5
|
+
* helping in the analysis and optimization of application performance and usage patterns. This composable
|
6
|
+
* is intended for internal use and aids in monitoring the integration and efficiency of Sisense SDK hooks.
|
7
|
+
*
|
8
|
+
* @param {string} hookName - The name of the hook being tracked. This identifier is used to log the hook
|
9
|
+
* event uniquely, facilitating the collection of usage data for specific hooks within the application.
|
10
|
+
*
|
11
|
+
* @example
|
12
|
+
* How to use `useTracking` to track the usage of a custom hook:
|
13
|
+
* ```javascript
|
14
|
+
* import { useTracking } from './composables/useTracking';
|
15
|
+
*
|
16
|
+
* // Example hook that utilizes useTracking for monitoring its usage
|
17
|
+
* export const useCustomHook = () => {
|
18
|
+
* const { hasTrackedRef } = useTracking('useCustomHook');
|
19
|
+
*
|
20
|
+
* // Hook implementation...
|
21
|
+
*
|
22
|
+
* return {
|
23
|
+
* // Return values of your custom hook
|
24
|
+
* };
|
25
|
+
* };
|
26
|
+
* ```
|
27
|
+
*
|
28
|
+
* The composable returns an object containing:
|
29
|
+
* - `hasTrackedRef`: A Vue ref that indicates whether the tracking for the hook has been successfully
|
30
|
+
* sent to the server. It starts as `false` and is set to `true` once tracking is completed, preventing
|
31
|
+
* duplicate tracking events.
|
32
|
+
*
|
33
|
+
* This internal utility composable is essential for maintaining insights into the usage of custom hooks
|
34
|
+
* within applications leveraging the Sisense SDK, enabling developers and analysts to understand and optimize
|
35
|
+
* hook interactions and performance.
|
36
|
+
*/
|
37
|
+
export declare const useTracking: (hookName: string) => {
|
38
|
+
hasTrackedRef: import("vue").Ref<boolean>;
|
39
|
+
};
|
package/dist/src/lib.d.ts
CHANGED
@@ -1,14 +1,8 @@
|
|
1
|
-
/**
|
2
|
-
* @packageDocumentation
|
3
|
-
* @alpha
|
4
|
-
*/
|
5
1
|
export { DrilldownBreadcrumbs } from './components/drilldown-breadcrumbs';
|
6
2
|
export * from './components/charts';
|
7
3
|
export * from './components/filters';
|
8
4
|
export * from './providers';
|
9
|
-
export * from './
|
5
|
+
export * from './composables';
|
10
6
|
export * from './components/context-menu';
|
11
7
|
export { default as DrilldownWidget } from './components/drilldown-widget.vue';
|
12
|
-
|
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';
|
8
|
+
export * from './sdk-ui-core-exports';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export { SisenseContextProvider, createSisenseContextConnector } from './sisense-context-provider';
|
1
|
+
export { SisenseContextProvider, createSisenseContextConnector, getApp, } from './sisense-context-provider';
|
2
2
|
export { ThemeProvider, createThemeContextConnector } from './theme-provider';
|
@@ -1,13 +1,15 @@
|
|
1
|
-
import type { PropType } from 'vue';
|
1
|
+
import type { PropType, Ref } from 'vue';
|
2
2
|
import { ClientApplication } from '@sisense/sdk-ui-preact';
|
3
3
|
/**
|
4
4
|
* Gets Sisense application
|
5
|
+
* @internal
|
5
6
|
*/
|
6
|
-
export declare const getApp: () =>
|
7
|
+
export declare const getApp: () => Ref<ClientApplication | undefined>;
|
7
8
|
/**
|
8
9
|
* Creates Sisense context connector
|
10
|
+
* @internal
|
9
11
|
*/
|
10
|
-
export declare const createSisenseContextConnector: () => {
|
12
|
+
export declare const createSisenseContextConnector: (app: ClientApplication) => {
|
11
13
|
prepareContext(): Promise<{
|
12
14
|
app: ClientApplication;
|
13
15
|
isInitialized: boolean;
|
@@ -15,8 +17,51 @@ export declare const createSisenseContextConnector: () => {
|
|
15
17
|
renderContextProvider: (contextData: import("@sisense/sdk-ui-preact").CustomSisenseContext | undefined, children: import("preact").VNode<{}>, error?: Error | undefined) => import("preact").VNode<{}>;
|
16
18
|
};
|
17
19
|
/**
|
18
|
-
* Sisense Context Provider
|
20
|
+
* Sisense Context Provider Component allowing you to connect to
|
21
|
+
* a Sisense instance and provide that context
|
22
|
+
* to all Compose SDK components in your application.
|
19
23
|
*
|
24
|
+
* @example
|
25
|
+
* Here's how to use the `SisenseContextProvider` component to wrap your Sisense-enabled application:
|
26
|
+
* Add SisenseContextProvider to the main component of your app as below and then wrap
|
27
|
+
* other SDK components inside this component.
|
28
|
+
* ```vue
|
29
|
+
* <template>
|
30
|
+
* <SisenseContextProvider
|
31
|
+
* :url="sisenseUrl"
|
32
|
+
* :defaultDataSource="defaultDataSource"
|
33
|
+
* :ssoEnabled="true"
|
34
|
+
* :token="authToken"
|
35
|
+
* :wat="watToken"
|
36
|
+
* :appConfig="appConfigurations"
|
37
|
+
* :showRuntimeErrors="true"
|
38
|
+
* :enableTracking="false"
|
39
|
+
* >
|
40
|
+
* <!-- Your application components here -->
|
41
|
+
* </SisenseContextProvider>
|
42
|
+
* </template>
|
43
|
+
*
|
44
|
+
* <script>
|
45
|
+
* import { ref } from 'vue';
|
46
|
+
* import SisenseContextProvider from './SisenseContextProvider.vue';
|
47
|
+
*
|
48
|
+
* export default {
|
49
|
+
* components: { SisenseContextProvider },
|
50
|
+
* setup() {
|
51
|
+
* const sisenseUrl = ref('https://your-sisense-instance.com');
|
52
|
+
* const defaultDataSource = ref('default_datasource_id');
|
53
|
+
* const authToken = ref('your_auth_token');
|
54
|
+
* const watToken = ref('your_wat_token');
|
55
|
+
* const appConfigurations = ref({});
|
56
|
+
*
|
57
|
+
* return { sisenseUrl, defaultDataSource, authToken, watToken, appConfigurations };
|
58
|
+
* }
|
59
|
+
* };
|
60
|
+
* </script>
|
61
|
+
* ```
|
62
|
+
*
|
63
|
+
* @param props - Sisense context provider props
|
64
|
+
* @returns A Sisense Context Provider Component
|
20
65
|
*/
|
21
66
|
export declare const SisenseContextProvider: import("vue").DefineComponent<{
|
22
67
|
defaultDataSource: PropType<string | undefined>;
|
@@ -35,7 +80,7 @@ export declare const SisenseContextProvider: import("vue").DefineComponent<{
|
|
35
80
|
enableTracking: PropType<boolean | undefined>;
|
36
81
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
37
82
|
[key: string]: any;
|
38
|
-
}>[] |
|
83
|
+
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
39
84
|
defaultDataSource: PropType<string | undefined>;
|
40
85
|
url: PropType<string>;
|
41
86
|
ssoEnabled: PropType<boolean | undefined>;
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import type { PropType } from 'vue';
|
1
|
+
import type { PropType, Ref } from 'vue';
|
2
|
+
import type { CompleteThemeSettings } from '@sisense/sdk-ui-preact';
|
2
3
|
/**
|
3
4
|
* Gets Theme context
|
4
5
|
*/
|
5
|
-
export declare const getThemeContext: () => {
|
6
|
+
export declare const getThemeContext: () => Ref<{
|
6
7
|
chart: {
|
7
8
|
textColor: string;
|
8
9
|
secondaryTextColor: string;
|
@@ -23,11 +24,11 @@ export declare const getThemeContext: () => {
|
|
23
24
|
primaryButtonTextColor: string;
|
24
25
|
primaryButtonHoverColor: string;
|
25
26
|
};
|
26
|
-
};
|
27
|
+
}> | undefined;
|
27
28
|
/**
|
28
29
|
* Creates theme context connector
|
29
30
|
*/
|
30
|
-
export declare const createThemeContextConnector: () => {
|
31
|
+
export declare const createThemeContextConnector: (themeSettings?: CompleteThemeSettings) => {
|
31
32
|
prepareContext(): Promise<{
|
32
33
|
themeSettings: {
|
33
34
|
chart: {
|
@@ -80,7 +81,61 @@ export declare const createThemeContextConnector: () => {
|
|
80
81
|
}, children: import("preact").VNode<{}>, error?: Error | undefined) => import("preact").VNode<{}>;
|
81
82
|
};
|
82
83
|
/**
|
83
|
-
* Theme
|
84
|
+
* Theme provider, which allows you to adjust the look and feel of child components.
|
85
|
+
*
|
86
|
+
* @example
|
87
|
+
* Example of a theme provider, which changes the colors and font of the nested indicator chart:
|
88
|
+
* ```vue
|
89
|
+
* <template>
|
90
|
+
* <ThemeProvider :theme="customTheme">
|
91
|
+
* <IndicatorChart .... />
|
92
|
+
* </ThemeProvider>
|
93
|
+
* </template>
|
94
|
+
*
|
95
|
+
* <script>
|
96
|
+
* import { ref } from 'vue';
|
97
|
+
* import ThemeProvider from './ThemeProvider.vue';
|
98
|
+
*
|
99
|
+
* export default {
|
100
|
+
* components: { ThemeProvider },
|
101
|
+
* setup() {
|
102
|
+
* const customTheme = ref({
|
103
|
+
chart: {
|
104
|
+
backgroundColor: '#333333',
|
105
|
+
textColor: 'orange',
|
106
|
+
secondaryTextColor: 'purple',
|
107
|
+
},
|
108
|
+
typography: {
|
109
|
+
fontFamily: 'impact',
|
110
|
+
},
|
111
|
+
* });
|
112
|
+
*
|
113
|
+
* return { customTheme };
|
114
|
+
* }
|
115
|
+
* };
|
116
|
+
* </script>
|
117
|
+
* ```
|
118
|
+
*
|
119
|
+
* Alternatively, to fetch theme settings based on a theme ID:
|
120
|
+
* ```vue
|
121
|
+
* <template>
|
122
|
+
* <ThemeProvider :theme="'theme_id_string'">
|
123
|
+
* <!-- Components that will use the fetched theme settings -->
|
124
|
+
* </ThemeProvider>
|
125
|
+
* </template>
|
126
|
+
* ```
|
127
|
+
*
|
128
|
+
* Indicator chart with custom theme settings:
|
129
|
+
* <img src="media://indicator-chart-example-2.png" width="400px" />
|
130
|
+
*
|
131
|
+
*
|
132
|
+
* For comparison, indicator chart with default theme settings:
|
133
|
+
*
|
134
|
+
* <img src="media://indicator-chart-example-1.png" width="400px" />
|
135
|
+
* @see {@link ThemeSettings} and {@link IndicatorChart}
|
136
|
+
* @param props - Theme provider props
|
137
|
+
* @returns A Theme Provider component * @prop {Object | String} theme - Theme settings object for custom themes or a string identifier to fetch theme settings. When provided as an object, it merges with the default theme settings. When provided as a string, it attempts to fetch theme settings using the provided ID.
|
138
|
+
* @prop {Boolean} skipTracking [internal] - Specifies whether to skip tracking of theme usage. Intended for internal use and debugging purposes.
|
84
139
|
*/
|
85
140
|
export declare const ThemeProvider: import("vue").DefineComponent<{
|
86
141
|
theme: PropType<string | import("@sisense/sdk-ui-preact").ThemeSettings | undefined>;
|
@@ -90,7 +145,7 @@ export declare const ThemeProvider: import("vue").DefineComponent<{
|
|
90
145
|
skipTracking: PropType<boolean | undefined>;
|
91
146
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
92
147
|
[key: string]: any;
|
93
|
-
}>[] |
|
148
|
+
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
94
149
|
theme: PropType<string | import("@sisense/sdk-ui-preact").ThemeSettings | undefined>;
|
95
150
|
/**
|
96
151
|
* @internal
|
@@ -0,0 +1,5 @@
|
|
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, AreaChartProps, BarChartProps, ChartProps, LineChartProps, ColumnChartProps, FunnelChartProps, PolarChartProps, ScatterChartProps, PieChartProps, TreemapChartProps, SunburstChartProps, IndicatorChartProps, MemberFilterTileProps, CriteriaFilterTileProps, DateRangeFilterTileProps, ChartWidgetProps, TableWidgetProps, TableProps, PivotTableProps, DrilldownBreadcrumbsProps, BoxplotChartProps, AreamapChartProps, ScattermapChartProps, SisenseContextProviderProps, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, ExecuteCsvQueryParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, 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, ChartStyleOptions, LineStyleOptions, AreaStyleOptions, StackableStyleOptions, PieStyleOptions, FunnelStyleOptions, PolarStyleOptions, IndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, NumericBarIndicatorStyleOptions, GaugeIndicatorStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, ChartWidgetStyleOptions, WidgetStyleOptions, DashboardWidgetStyleOptions, TableStyleOptions, PivotTableStyleOptions, DataLimits, Legend, Markers, Labels, IndicatorComponents, ScatterMarkerSize, LineWidth, AxisLabel, Convolution, SeriesLabels, X2Title, ScattermapMarkers, WidgetModel, DashboardModel, BeforeRenderHandler, DataPoint, ScatterDataPoint, HighchartsOptions, BoxplotDataPoint, AppConfig, DateConfig, MenuItemSection, MonthOfYear, DayOfWeek, DateLevel, ThemeOid, GetDashboardModelOptions, GetDashboardModelsOptions, SeriesChartType, MenuPosition, ThemeSettings, Color, ColorPaletteTheme, Navigator, DrilldownOptions, DrilldownSelection, CriteriaFilterType, Member, FilterVariant, } from '@sisense/sdk-ui-preact';
|
3
|
+
import type { ContextMenuProps as ContextMenuPropsPreact, ThemeProviderProps as ThemeProviderPropsPreact } from '@sisense/sdk-ui-preact';
|
4
|
+
export type ContextMenuProps = Omit<ContextMenuPropsPreact, 'children'>;
|
5
|
+
export type ThemeProviderProps = Omit<ThemeProviderPropsPreact, 'children'>;
|
package/dist/src/utils.d.ts
CHANGED
@@ -1,3 +1,6 @@
|
|
1
1
|
import type { MaybeRef, MaybeWithRefs } from './types';
|
2
2
|
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
|
+
};
|
3
6
|
export declare function collectRefs<T extends {}>(objectWithRefs: MaybeWithRefs<T>): unknown[];
|
package/package.json
CHANGED
@@ -1,6 +0,0 @@
|
|
1
|
-
export { useExecuteQuery } from './use-execute-query';
|
2
|
-
export { useExecuteQueryByWidgetId } from './use-execute-query-by-widget-id';
|
3
|
-
export { useGetDashboardModel } from './use-get-dashboard-model';
|
4
|
-
export { useGetDashboardModels } from './use-get-dashboard-models';
|
5
|
-
export { useGetSharedFormula } from './use-get-shared-formula';
|
6
|
-
export { useGetWidgetModel } from './use-get-widget-model';
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import type { ExecuteQueryByWidgetIdParams } from '@sisense/sdk-ui-preact';
|
2
|
-
export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => Promise<{
|
3
|
-
data: {
|
4
|
-
data: import("@sisense/sdk-data").QueryResultData;
|
5
|
-
query: import("@sisense/sdk-ui/dist/query/execute-query").QueryDescription;
|
6
|
-
};
|
7
|
-
}>;
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { type ToRefs } from 'vue';
|
2
|
-
import { type ExecuteQueryParams, type QueryState } from '@sisense/sdk-ui-preact';
|
3
|
-
import type { MaybeWithRefs } from '../types';
|
4
|
-
/**
|
5
|
-
* A hook function that executes a data query.
|
6
|
-
* TODO Document
|
7
|
-
*
|
8
|
-
*
|
9
|
-
* @returns TODO
|
10
|
-
*/
|
11
|
-
export declare const useExecuteQuery: (params: MaybeWithRefs<ExecuteQueryParams>) => ToRefs<QueryState>;
|
File without changes
|