@sisense/sdk-ui-vue 1.2.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 +83668 -62966
- package/dist/src/components/charts/area-chart.d.ts +22 -9
- package/dist/src/components/charts/areamap-chart.d.ts +23 -17
- package/dist/src/components/charts/bar-chart.d.ts +23 -10
- package/dist/src/components/charts/boxplot-chart.d.ts +29 -15
- package/dist/src/components/charts/chart-widget.d.ts +42 -11
- package/dist/src/components/charts/chart.d.ts +16 -27
- package/dist/src/components/charts/column-chart.d.ts +23 -10
- package/dist/src/components/charts/dashboard-widget.d.ts +11 -11
- package/dist/src/components/charts/funnel-chart.d.ts +21 -7
- package/dist/src/components/charts/index.d.ts +1 -0
- package/dist/src/components/charts/indicator-chart.d.ts +20 -9
- package/dist/src/components/charts/line-chart.d.ts +20 -8
- package/dist/src/components/charts/pie-chart.d.ts +22 -10
- package/dist/src/components/charts/pivot-table.d.ts +41 -0
- package/dist/src/components/charts/polar-chart.d.ts +22 -10
- package/dist/src/components/charts/scatter-chart.d.ts +28 -10
- package/dist/src/components/charts/scattermap-chart.d.ts +22 -7
- package/dist/src/components/charts/sunburst-chart.d.ts +16 -8
- package/dist/src/components/charts/table-widget.d.ts +6 -4
- package/dist/src/components/charts/table.d.ts +6 -5
- package/dist/src/components/charts/treemap-chart.d.ts +21 -9
- 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/{hooks → composables}/use-custom-drilldown.d.ts +21 -2
- 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/helpers/use-reducer.d.ts +10 -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 +49 -9
- package/dist/src/providers/theme-provider.d.ts +60 -5
- package/dist/src/sdk-ui-core-exports.d.ts +5 -0
- package/dist/src/types.d.ts +5 -0
- package/dist/src/utils.d.ts +6 -0
- package/package.json +4 -1
- package/dist/src/hooks/index.d.ts +0 -6
- package/dist/src/hooks/use-execute-query-by-widget-id.d.ts +0 -9
- 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
@@ -1,18 +1,15 @@
|
|
1
|
-
import type { PropType } from 'vue';
|
2
|
-
import type { SisenseContextProviderProps } from '@sisense/sdk-ui-preact';
|
1
|
+
import type { PropType, Ref } from 'vue';
|
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
|
5
|
+
* @internal
|
10
6
|
*/
|
11
|
-
export declare const getApp: () =>
|
7
|
+
export declare const getApp: () => Ref<ClientApplication | undefined>;
|
12
8
|
/**
|
13
9
|
* Creates Sisense context connector
|
10
|
+
* @internal
|
14
11
|
*/
|
15
|
-
export declare const createSisenseContextConnector: () => {
|
12
|
+
export declare const createSisenseContextConnector: (app: ClientApplication) => {
|
16
13
|
prepareContext(): Promise<{
|
17
14
|
app: ClientApplication;
|
18
15
|
isInitialized: boolean;
|
@@ -20,8 +17,51 @@ export declare const createSisenseContextConnector: () => {
|
|
20
17
|
renderContextProvider: (contextData: import("@sisense/sdk-ui-preact").CustomSisenseContext | undefined, children: import("preact").VNode<{}>, error?: Error | undefined) => import("preact").VNode<{}>;
|
21
18
|
};
|
22
19
|
/**
|
23
|
-
* 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.
|
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
|
+
* ```
|
24
62
|
*
|
63
|
+
* @param props - Sisense context provider props
|
64
|
+
* @returns A Sisense Context Provider Component
|
25
65
|
*/
|
26
66
|
export declare const SisenseContextProvider: import("vue").DefineComponent<{
|
27
67
|
defaultDataSource: PropType<string | 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>;
|
@@ -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'>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { MaybeRef, MaybeWithRefs } from './types';
|
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
|
+
};
|
6
|
+
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.
|
14
|
+
"version": "1.4.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",
|
@@ -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,9 +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: Omit<import("@sisense/sdk-ui-preact").ExecuteQueryParams, "filters"> & {
|
6
|
-
filters?: import("@sisense/sdk-data").Filter[] | undefined;
|
7
|
-
};
|
8
|
-
};
|
9
|
-
}>;
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { ExecuteQueryParams } from '@sisense/sdk-ui-preact';
|
2
|
-
/**
|
3
|
-
* A hook function that executes a data query.
|
4
|
-
* TODO Document
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* @returns TODO
|
8
|
-
*/
|
9
|
-
export declare const useExecuteQuery: (params: ExecuteQueryParams) => Promise<{
|
10
|
-
data: import("@sisense/sdk-data").QueryResultData;
|
11
|
-
}>;
|