@sisense/sdk-ui-vue 2.16.1 → 2.18.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/ai.cjs +79 -79
- package/dist/ai.js +53 -53
- package/dist/index.cjs +1 -1
- package/dist/index.js +735 -695
- package/dist/packages/sdk-ui-vue/src/components/charts/pivot-table.d.ts +48 -15
- package/dist/packages/sdk-ui-vue/src/components/widgets/pivot-table-widget.d.ts +46 -9
- package/dist/packages/sdk-ui-vue/src/components/widgets/widget-by-id.d.ts +2 -2
- package/dist/packages/sdk-ui-vue/src/components/widgets/widget.d.ts +4 -4
- package/dist/packages/sdk-ui-vue/src/composables/index.d.ts +1 -0
- package/dist/packages/sdk-ui-vue/src/composables/use-jtd-widget.d.ts +85 -0
- package/dist/packages/sdk-ui-vue/src/sdk-ui-core-exports.d.ts +1 -1
- package/dist/packages/sdk-ui-vue/src/utilities/widget-model-translator.d.ts +26 -1
- package/dist/{use-tracking-13883d10.js → use-tracking-6074c5d5.js} +94402 -89624
- package/dist/use-tracking-8c41e6ec.cjs +3092 -0
- package/package.json +2 -2
- package/dist/use-tracking-9d38eeb8.cjs +0 -3089
|
@@ -15,29 +15,38 @@ export { PivotTableProps };
|
|
|
15
15
|
* <script setup lang="ts">
|
|
16
16
|
* import { ref } from 'vue';
|
|
17
17
|
* import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
18
|
-
* import * as DM from '../assets/sample-retail-model';
|
|
19
18
|
* import { PivotTable, type PivotTableProps } from '@sisense/sdk-ui-vue';
|
|
19
|
+
* import * as DM from '../assets/sample-retail-model';
|
|
20
20
|
*
|
|
21
|
+
* const dimCategoryName = DM.DimProducts.CategoryName;
|
|
22
|
+
* const dimColor = DM.DimProducts.Color;
|
|
21
23
|
* const dimProductName = DM.DimProducts.ProductName;
|
|
22
24
|
* const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
*
|
|
26
|
+
* const pivotTableProps = ref<PivotTableProps>({
|
|
27
|
+
* dataSet: DM.DataSource,
|
|
28
|
+
* dataOptions: {
|
|
29
|
+
* rows: [dimProductName, dimColor],
|
|
30
|
+
* columns: [dimCategoryName],
|
|
31
|
+
* values: [measureTotalRevenue],
|
|
32
|
+
* },
|
|
33
|
+
* styleOptions: {
|
|
34
|
+
* width: 1200,
|
|
35
|
+
* height: 500,
|
|
36
|
+
* },
|
|
37
|
+
* filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 1000)],
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
36
40
|
* </script>
|
|
37
41
|
* ```
|
|
38
42
|
* <img src="media://vue-pivot-table-example.png" width="800px" />
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Configuration options can also be applied within the scope of a `<SisenseContextProvider>` to control the default behavior of PivotTable, by changing available settings within `appConfig.chartConfig.tabular.*`
|
|
46
|
+
*
|
|
47
|
+
* Follow the link to {@link AppConfig} for more details on the available settings.
|
|
48
|
+
*
|
|
39
49
|
* @group Data Grids
|
|
40
|
-
* @beta
|
|
41
50
|
*/
|
|
42
51
|
export declare const PivotTable: import("vue").DefineComponent<{
|
|
43
52
|
/**
|
|
@@ -75,6 +84,18 @@ export declare const PivotTable: import("vue").DefineComponent<{
|
|
|
75
84
|
* @category Representation
|
|
76
85
|
*/
|
|
77
86
|
styleOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableStyleOptions | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableProps.onDataPointClick}
|
|
89
|
+
*
|
|
90
|
+
* @category Callbacks
|
|
91
|
+
*/
|
|
92
|
+
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableProps.onDataPointContextMenu}
|
|
95
|
+
*
|
|
96
|
+
* @category Callbacks
|
|
97
|
+
*/
|
|
98
|
+
onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
78
99
|
}, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
79
100
|
[key: string]: any;
|
|
80
101
|
}>) | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -113,4 +134,16 @@ export declare const PivotTable: import("vue").DefineComponent<{
|
|
|
113
134
|
* @category Representation
|
|
114
135
|
*/
|
|
115
136
|
styleOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableStyleOptions | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableProps.onDataPointClick}
|
|
139
|
+
*
|
|
140
|
+
* @category Callbacks
|
|
141
|
+
*/
|
|
142
|
+
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableProps.onDataPointContextMenu}
|
|
145
|
+
*
|
|
146
|
+
* @category Callbacks
|
|
147
|
+
*/
|
|
148
|
+
onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
116
149
|
}>>, {}, {}>;
|
|
@@ -9,15 +9,45 @@ export { PivotTableWidgetProps };
|
|
|
9
9
|
* Here's how you can use the PivotTableWidget component in a Vue application:
|
|
10
10
|
* ```vue
|
|
11
11
|
* <template>
|
|
12
|
-
* <PivotTableWidget
|
|
12
|
+
* <PivotTableWidget
|
|
13
|
+
* :dataSource="pivotTableWidgetProps.dataSource"
|
|
14
|
+
* :filters="pivotTableWidgetProps.filters"
|
|
15
|
+
* :dataOptions="pivotTableWidgetProps.dataOptions"
|
|
16
|
+
* :styleOptions="pivotTableWidgetProps.styleOptions"
|
|
17
|
+
* :title="pivotTableWidgetProps.title"
|
|
18
|
+
* />
|
|
13
19
|
* </template>
|
|
14
20
|
*
|
|
15
21
|
* <script setup lang="ts">
|
|
16
22
|
* import { ref } from 'vue';
|
|
17
|
-
* import {
|
|
23
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
24
|
+
* import { PivotTableWidget, type PivotTableWidgetProps } from '@sisense/sdk-ui-vue';
|
|
25
|
+
* import * as DM from '../assets/sample-ecommerce-model';
|
|
18
26
|
*
|
|
19
|
-
* const pivotTableWidgetProps = ref({
|
|
20
|
-
*
|
|
27
|
+
* const pivotTableWidgetProps = ref<PivotTableWidgetProps>({
|
|
28
|
+
* dataSource: DM.DataSource,
|
|
29
|
+
* dataOptions: {
|
|
30
|
+
* rows: [DM.Category.Category],
|
|
31
|
+
* values: [measureFactory.sum(DM.Commerce.Cost, 'Total Cost')],
|
|
32
|
+
* },
|
|
33
|
+
* filters: [],
|
|
34
|
+
* title: 'Pivot Table Widget Example',
|
|
35
|
+
* styleOptions: {
|
|
36
|
+
* spaceAround: 'Medium',
|
|
37
|
+
* cornerRadius: 'Large',
|
|
38
|
+
* shadow: 'Light',
|
|
39
|
+
* border: true,
|
|
40
|
+
* borderColor: '#e0e0e0',
|
|
41
|
+
* backgroundColor: '#ffffff',
|
|
42
|
+
* header: {
|
|
43
|
+
* hidden: false,
|
|
44
|
+
* titleTextColor: '#333333',
|
|
45
|
+
* titleAlignment: 'Center',
|
|
46
|
+
* dividerLine: true,
|
|
47
|
+
* dividerLineColor: '#e0e0e0',
|
|
48
|
+
* backgroundColor: '#f5f5f5',
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
21
51
|
* });
|
|
22
52
|
* </script>
|
|
23
53
|
* ```
|
|
@@ -25,7 +55,6 @@ export { PivotTableWidgetProps };
|
|
|
25
55
|
* @param props - Pivot Table Widget properties
|
|
26
56
|
* @returns Widget component representing a pivot table
|
|
27
57
|
* @group Dashboards
|
|
28
|
-
* @beta
|
|
29
58
|
*/
|
|
30
59
|
export declare const PivotTableWidget: import("vue").DefineComponent<{
|
|
31
60
|
/**
|
|
@@ -61,6 +90,12 @@ export declare const PivotTableWidget: import("vue").DefineComponent<{
|
|
|
61
90
|
* @category Widget
|
|
62
91
|
*/
|
|
63
92
|
styleOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableWidgetStyleOptions | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.drilldownOptions}
|
|
95
|
+
*
|
|
96
|
+
* @category Widget
|
|
97
|
+
*/
|
|
98
|
+
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | undefined>;
|
|
64
99
|
/**
|
|
65
100
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.title}
|
|
66
101
|
*
|
|
@@ -91,14 +126,12 @@ export declare const PivotTableWidget: import("vue").DefineComponent<{
|
|
|
91
126
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.onDataPointClick}
|
|
92
127
|
*
|
|
93
128
|
* @category Callbacks
|
|
94
|
-
* @internal
|
|
95
129
|
*/
|
|
96
130
|
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
97
131
|
/**
|
|
98
132
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.onDataPointContextMenu}
|
|
99
133
|
*
|
|
100
134
|
* @category Callbacks
|
|
101
|
-
* @internal
|
|
102
135
|
*/
|
|
103
136
|
onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
104
137
|
/**
|
|
@@ -151,6 +184,12 @@ export declare const PivotTableWidget: import("vue").DefineComponent<{
|
|
|
151
184
|
* @category Widget
|
|
152
185
|
*/
|
|
153
186
|
styleOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableWidgetStyleOptions | undefined>;
|
|
187
|
+
/**
|
|
188
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.drilldownOptions}
|
|
189
|
+
*
|
|
190
|
+
* @category Widget
|
|
191
|
+
*/
|
|
192
|
+
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | undefined>;
|
|
154
193
|
/**
|
|
155
194
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.title}
|
|
156
195
|
*
|
|
@@ -181,14 +220,12 @@ export declare const PivotTableWidget: import("vue").DefineComponent<{
|
|
|
181
220
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.onDataPointClick}
|
|
182
221
|
*
|
|
183
222
|
* @category Callbacks
|
|
184
|
-
* @internal
|
|
185
223
|
*/
|
|
186
224
|
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
187
225
|
/**
|
|
188
226
|
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.onDataPointContextMenu}
|
|
189
227
|
*
|
|
190
228
|
* @category Callbacks
|
|
191
|
-
* @internal
|
|
192
229
|
*/
|
|
193
230
|
onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
|
|
194
231
|
/**
|
|
@@ -52,7 +52,7 @@ export declare const WidgetById: import("vue").DefineComponent<{
|
|
|
52
52
|
*/
|
|
53
53
|
description: PropType<string | undefined>;
|
|
54
54
|
/** @internal */
|
|
55
|
-
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
55
|
+
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
56
56
|
/**
|
|
57
57
|
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.filters}
|
|
58
58
|
*
|
|
@@ -163,7 +163,7 @@ export declare const WidgetById: import("vue").DefineComponent<{
|
|
|
163
163
|
*/
|
|
164
164
|
description: PropType<string | undefined>;
|
|
165
165
|
/** @internal */
|
|
166
|
-
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
166
|
+
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
167
167
|
/**
|
|
168
168
|
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.filters}
|
|
169
169
|
*
|
|
@@ -113,7 +113,7 @@ export declare const Widget: import("vue").DefineComponent<{
|
|
|
113
113
|
*
|
|
114
114
|
* @category Widget
|
|
115
115
|
*/
|
|
116
|
-
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
116
|
+
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
117
117
|
/**
|
|
118
118
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.title}
|
|
119
119
|
*
|
|
@@ -157,7 +157,7 @@ export declare const Widget: import("vue").DefineComponent<{
|
|
|
157
157
|
*
|
|
158
158
|
* @category Callbacks
|
|
159
159
|
*/
|
|
160
|
-
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").
|
|
160
|
+
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | 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 | import("@sisense/sdk-ui-preact").IndicatorDataPointEventHandler | import("@sisense/sdk-ui-preact").CalendarHeatmapDataPointEventHandler | import("@sisense/sdk-ui-preact").TextWidgetDataPointEventHandler | undefined>;
|
|
161
161
|
/**
|
|
162
162
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
|
|
163
163
|
*
|
|
@@ -238,7 +238,7 @@ export declare const Widget: import("vue").DefineComponent<{
|
|
|
238
238
|
*
|
|
239
239
|
* @category Widget
|
|
240
240
|
*/
|
|
241
|
-
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
241
|
+
drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
|
|
242
242
|
/**
|
|
243
243
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.title}
|
|
244
244
|
*
|
|
@@ -282,7 +282,7 @@ export declare const Widget: import("vue").DefineComponent<{
|
|
|
282
282
|
*
|
|
283
283
|
* @category Callbacks
|
|
284
284
|
*/
|
|
285
|
-
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").
|
|
285
|
+
onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | 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 | import("@sisense/sdk-ui-preact").IndicatorDataPointEventHandler | import("@sisense/sdk-ui-preact").CalendarHeatmapDataPointEventHandler | import("@sisense/sdk-ui-preact").TextWidgetDataPointEventHandler | undefined>;
|
|
286
286
|
/**
|
|
287
287
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
|
|
288
288
|
*
|
|
@@ -12,5 +12,6 @@ export { useGetHierarchyModels } from './use-get-hierarchy-models.js';
|
|
|
12
12
|
export { useFetch } from './use-fetch.js';
|
|
13
13
|
export { useCustomWidgets, type CustomWidgetComponent, type CustomWidgetComponentProps, type GenericDataOptions, } from './use-custom-widgets.js';
|
|
14
14
|
export { useComposedDashboard, type ComposableDashboardProps } from './use-composed-dashboard.js';
|
|
15
|
+
export { useJtdWidget } from './use-jtd-widget.js';
|
|
15
16
|
export type { UseFetchOptions } from './use-fetch.js';
|
|
16
17
|
export type { GetFilterMembersParams, GetFilterMembersData, FilterMembersState, FilterMembersLoadingState, FilterMembersErrorState, FilterMembersSuccessState, } from './use-get-filter-members.js';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type JumpToDashboardConfig, type JumpToDashboardConfigForPivot, type WidgetProps } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { type Ref } from 'vue';
|
|
3
|
+
import type { MaybeRef, MaybeRefOrWithRefs } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Composable to add Jump To Dashboard (JTD) functionality to individual Widget components.
|
|
6
|
+
*
|
|
7
|
+
* Jump To Dashboard (JTD) allows users to navigate from one dashboard to another when interacting with widgets,
|
|
8
|
+
* such as clicking on chart data points or using context menus. This composable is particularly useful when rendering
|
|
9
|
+
* Widget components directly (not through a Dashboard component), but you still want JTD navigation functionality.
|
|
10
|
+
*
|
|
11
|
+
* For widgets that are part of a dashboard, consider using `applyJtdConfig` or `applyJtdConfigs` instead,
|
|
12
|
+
* as they apply JTD configuration at the dashboard level rather than individual widget level.
|
|
13
|
+
*
|
|
14
|
+
* Note: dashboard-only 'includeDashboardFilters' is not supported and would just be ignored, since we do not have a dashboard in the current context.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* Basic JTD configuration with right-click navigation.
|
|
18
|
+
* ```vue
|
|
19
|
+
* <script setup>
|
|
20
|
+
* import { ref } from 'vue';
|
|
21
|
+
* import { Widget, useJtdWidget } from '@sisense/sdk-ui-vue';
|
|
22
|
+
*
|
|
23
|
+
* const myWidgetProps = ref({
|
|
24
|
+
* id: 'widget-1',
|
|
25
|
+
* widgetType: 'chart',
|
|
26
|
+
* dataSource: 'Sample ECommerce',
|
|
27
|
+
* // ... other widget props
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* const jtdConfig = {
|
|
31
|
+
* targets: [{ id: 'dashboard-1', caption: 'Sales Dashboard' }],
|
|
32
|
+
* interaction: {
|
|
33
|
+
* triggerMethod: 'rightclick',
|
|
34
|
+
* captionPrefix: 'Jump to'
|
|
35
|
+
* }
|
|
36
|
+
* };
|
|
37
|
+
*
|
|
38
|
+
* const widgetWithJtd = useJtdWidget(myWidgetProps, jtdConfig);
|
|
39
|
+
* </script>
|
|
40
|
+
*
|
|
41
|
+
* <template>
|
|
42
|
+
* <Widget v-bind="widgetWithJtd" />
|
|
43
|
+
* </template>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* JTD configuration with multiple targets and custom styling.
|
|
48
|
+
* ```vue
|
|
49
|
+
* <script setup>
|
|
50
|
+
* import { ref } from 'vue';
|
|
51
|
+
* import { Widget, useJtdWidget } from '@sisense/sdk-ui-vue';
|
|
52
|
+
*
|
|
53
|
+
* const chartProps = ref({ ... });
|
|
54
|
+
*
|
|
55
|
+
* const jtdConfig = {
|
|
56
|
+
* enabled: true,
|
|
57
|
+
* targets: [
|
|
58
|
+
* { id: 'sales-dashboard', caption: 'Sales Analysis' },
|
|
59
|
+
* { id: 'marketing-dashboard', caption: 'Marketing Insights' }
|
|
60
|
+
* ],
|
|
61
|
+
* interaction: {
|
|
62
|
+
* triggerMethod: 'click',
|
|
63
|
+
* captionPrefix: 'Navigate to',
|
|
64
|
+
* showIcon: true
|
|
65
|
+
* },
|
|
66
|
+
* filtering: {
|
|
67
|
+
* mergeWithTargetFilters: true,
|
|
68
|
+
* includeWidgetFilters: true
|
|
69
|
+
* }
|
|
70
|
+
* };
|
|
71
|
+
*
|
|
72
|
+
* const widgetWithJtd = useJtdWidget(chartProps, jtdConfig);
|
|
73
|
+
* </script>
|
|
74
|
+
*
|
|
75
|
+
* <template>
|
|
76
|
+
* <Widget v-bind="widgetWithJtd" />
|
|
77
|
+
* </template>
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @param widgetProps - Widget properties to enhance with JTD functionality (can be a ref or plain object)
|
|
81
|
+
* @param config - Jump To Dashboard configuration
|
|
82
|
+
* @returns Computed ref containing enhanced widget props with JTD navigation capabilities
|
|
83
|
+
* @group Dashboards
|
|
84
|
+
*/
|
|
85
|
+
export declare const useJtdWidget: (widgetProps: MaybeRef<WidgetProps | null>, config: MaybeRefOrWithRefs<JumpToDashboardConfig | JumpToDashboardConfigForPivot>) => Ref<WidgetProps | null>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { boxWhiskerProcessResult, extractDimensionsAndMeasures } from '@sisense/sdk-ui-preact';
|
|
2
|
-
export type { ChartType, CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, CalendarHeatmapChartType, ScattermapChartType, AreamapChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, CalendarHeatmapSubtype, WidgetType, CartesianWidgetType, CategoricalWidgetType, TabularWidgetType, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, GetHierarchyModelsParams, ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, CalendarHeatmapChartDataOptions, 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, StreamgraphStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, CalendarHeatmapStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, ChartWidgetStyleOptions, WidgetStyleOptions, WidgetByIdStyleOptions, TableStyleOptions, PivotTableStyleOptions, AreaRangeStyleOptions, DataLimits, Legend, Markers, Labels, IndicatorComponents, ScatterMarkerSize, LineWidth, LineOptions, DashStyle, EndCapType, AxisLabel, Convolution, SeriesLabels, X2Title, ScattermapMarkers, CalendarHeatmapViewType, WidgetModel, DashboardModel, BeforeRenderHandler, DataPoint, ScatterDataPoint, HighchartsOptions, BoxplotDataPoint, CalendarHeatmapDataPoint, CalendarDayOfWeek, 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, TranslationConfig, } from '@sisense/sdk-ui-preact';
|
|
2
|
+
export type { ChartType, CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, CalendarHeatmapChartType, ScattermapChartType, AreamapChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, CalendarHeatmapSubtype, WidgetType, CartesianWidgetType, CategoricalWidgetType, TabularWidgetType, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, GetHierarchyModelsParams, ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, CalendarHeatmapChartDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, TableDataOptions, PivotTableDataOptions, WidgetDataOptions, NumberFormatConfig, DecimalScale, DataColorCondition, ConditionalDataColorOptions, DataColorOptions, RangeDataColorOptions, UniformDataColorOptions, ValueToColorMap, MultiColumnValueToColorMap, SortDirection, BoxWhiskerType, ScattermapLocationLevel, StyledColumn, StyledMeasureColumn, PivotRowsSort, DataOptionLocation, ChartStyleOptions, LineStyleOptions, AreaStyleOptions, StackableStyleOptions, PieStyleOptions, FunnelStyleOptions, PolarStyleOptions, IndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, NumericBarIndicatorStyleOptions, GaugeIndicatorStyleOptions, ScatterStyleOptions, TreemapStyleOptions, StreamgraphStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, CalendarHeatmapStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, ChartWidgetStyleOptions, WidgetStyleOptions, WidgetByIdStyleOptions, TableStyleOptions, PivotTableStyleOptions, AreaRangeStyleOptions, DataLimits, Legend, Markers, Labels, IndicatorComponents, ScatterMarkerSize, LineWidth, LineOptions, DashStyle, EndCapType, AxisLabel, Convolution, SeriesLabels, X2Title, ScattermapMarkers, CalendarHeatmapViewType, WidgetModel, DashboardModel, BeforeRenderHandler, DataPoint, ScatterDataPoint, HighchartsOptions, BoxplotDataPoint, CalendarHeatmapDataPoint, CalendarDayOfWeek, IndicatorBeforeRenderHandler, IndicatorRenderOptions, DashboardLayoutOptions, WidgetsPanelLayout, WidgetsPanelColumnLayout, WidgetId, JumpToDashboardConfig, JumpToDashboardConfigForPivot, WidgetsOptions, AppConfig, DateConfig, MenuItemSection, MonthOfYear, DayOfWeek, DateLevel, ThemeOid, GetDashboardModelOptions, GetDashboardModelsOptions, SeriesChartType, MenuPosition, ThemeSettings, Color, ColorPaletteTheme, Navigator, DrilldownOptions, DrilldownSelection, PivotTableDrilldownOptions, PivotTableSelectableDrilldownOptions, PivotTableNonSelectableDrilldownOptions, Member, FilterVariant, TranslationConfig, } from '@sisense/sdk-ui-preact';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExecutePivotQueryParams, type ExecuteQueryParams, type PivotTableWidgetProps, type TextWidgetProps, type WidgetModel } from '@sisense/sdk-ui-preact';
|
|
2
2
|
import type { ChartProps, PivotTableProps, TableProps } from '../components/charts';
|
|
3
|
-
import type { ChartWidgetProps } from '../components/widgets';
|
|
3
|
+
import type { ChartWidgetProps, WidgetProps } from '../components/widgets';
|
|
4
4
|
/**
|
|
5
5
|
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
|
|
6
6
|
*
|
|
@@ -245,3 +245,28 @@ const textWidgetProps = computed(() =>
|
|
|
245
245
|
* Use {@link toPivotTableWidgetProps} instead for getting props for the pivot table widget.
|
|
246
246
|
*/
|
|
247
247
|
export declare function toTextWidgetProps(widgetModel: WidgetModel): TextWidgetProps;
|
|
248
|
+
/**
|
|
249
|
+
* Translates {@link WidgetModel} to {@link WidgetProps}.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```vue
|
|
253
|
+
* <script setup lang="ts">
|
|
254
|
+
* import { widgetModelTranslator, useGetWidgetModel, Widget } from '@sisense/sdk-ui-vue';
|
|
255
|
+
* import { computed } from 'vue';
|
|
256
|
+
*
|
|
257
|
+
* const { data: widgetModel } = useGetWidgetModel({
|
|
258
|
+
* dashboardOid: 'your-dashboard-oid',
|
|
259
|
+
* widgetOid: 'your-widget-oid',
|
|
260
|
+
* });
|
|
261
|
+
*
|
|
262
|
+
* const widgetProps = computed(() =>
|
|
263
|
+
* widgetModel.value ? widgetModelTranslator.toWidgetProps(widgetModel.value) : null,
|
|
264
|
+
* );
|
|
265
|
+
* </script>
|
|
266
|
+
*
|
|
267
|
+
* <template>
|
|
268
|
+
* <Widget v-if="widgetProps" v-bind="widgetProps" />
|
|
269
|
+
* </template>
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
export declare function toWidgetProps(widgetModel: WidgetModel): WidgetProps;
|