@sisense/sdk-ui-vue 2.34.0 → 2.36.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.cjs +1 -1
- package/dist/index.js +76 -49
- package/dist/src/components/charts/area-chart.d.ts +12 -20
- package/dist/src/components/charts/area-range-chart.d.ts +39 -28
- package/dist/src/components/charts/areamap-chart.d.ts +23 -25
- package/dist/src/components/charts/bar-chart.d.ts +16 -25
- package/dist/src/components/charts/boxplot-chart.d.ts +22 -26
- package/dist/src/components/charts/calendar-heatmap-chart.d.ts +16 -22
- package/dist/src/components/charts/chart.d.ts +14 -43
- package/dist/src/components/charts/column-chart.d.ts +16 -25
- package/dist/src/components/charts/funnel-chart.d.ts +23 -26
- package/dist/src/components/charts/indicator-chart.d.ts +90 -20
- package/dist/src/components/charts/kpi-chart.d.ts +16 -18
- package/dist/src/components/charts/line-chart.d.ts +17 -25
- package/dist/src/components/charts/pie-chart.d.ts +20 -23
- package/dist/src/components/charts/pivot-table.d.ts +251 -18
- package/dist/src/components/charts/polar-chart.d.ts +16 -24
- package/dist/src/components/charts/sankey-chart.d.ts +13 -14
- package/dist/src/components/charts/scatter-chart.d.ts +23 -23
- package/dist/src/components/charts/scattermap-chart.d.ts +19 -23
- package/dist/src/components/charts/streamgraph-chart.d.ts +51 -17
- package/dist/src/components/charts/sunburst-chart.d.ts +15 -23
- package/dist/src/components/charts/table.d.ts +27 -24
- package/dist/src/components/charts/treemap-chart.d.ts +15 -23
- package/dist/src/components/dashboard/dashboard-model.d.ts +14 -0
- package/dist/src/components/dashboard/index.d.ts +1 -0
- package/dist/src/components/filters/criteria-filter-tile.d.ts +8 -0
- package/dist/src/components/filters/date-range-filter-tile.d.ts +8 -0
- package/dist/src/components/filters/filter-tile.d.ts +12 -1
- package/dist/src/components/filters/index.d.ts +2 -2
- package/dist/src/components/filters/member-filter-tile.d.ts +8 -0
- package/dist/src/components/widgets/chart-widget.d.ts +44 -46
- package/dist/src/components/widgets/index.d.ts +5 -2
- package/dist/src/components/widgets/widget-by-id.d.ts +20 -1
- package/dist/src/components/widgets/widget-config.d.ts +57 -0
- package/dist/src/components/widgets/widget-header-config.d.ts +6 -0
- package/dist/src/components/widgets/widget-model.d.ts +14 -0
- package/dist/src/components/widgets/widget.d.ts +46 -10
- package/dist/src/composables/use-get-widget-model.d.ts +2 -1
- package/dist/src/sdk-ui-core-exports.d.ts +1 -1
- package/dist/src/utilities/dashboard-model-translator.d.ts +1 -1
- package/dist/src/utilities/widget-model-translator.d.ts +5 -2
- package/package.json +3 -3
|
@@ -10,34 +10,26 @@ export interface SunburstChartProps extends SunburstChartPropsPreact {
|
|
|
10
10
|
* It maintains compatibility with Vue's reactivity system while preserving the functionality of the SunburstChart.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the SunburstChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
<SunburstChart
|
|
17
|
-
:dataOptions="sunburstChartProps.dataOptions"
|
|
18
|
-
:dataSet="sunburstChartProps.dataSet"
|
|
19
|
-
:filters="sunburstChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import {
|
|
26
|
-
* import
|
|
27
|
-
* import
|
|
16
|
+
* import { SunburstChart } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
28
19
|
*
|
|
29
|
-
* const
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
* const chartProps = ref({
|
|
21
|
+
* dataOptions: {
|
|
22
|
+
* category: [DM.Commerce.Condition, DM.Commerce.AgeRange],
|
|
23
|
+
* value: [measureFactory.sum(DM.Commerce.Quantity, 'Total Quantity')],
|
|
24
|
+
* },
|
|
25
|
+
* });
|
|
26
|
+
* </script>
|
|
27
|
+
*
|
|
28
|
+
* <template>
|
|
29
|
+
* <SunburstChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
30
|
+
* </template>
|
|
39
31
|
* ```
|
|
40
|
-
* <img src="media://
|
|
32
|
+
* <img src="media://sunburst-chart-example-1.png" width="700px" />
|
|
41
33
|
* @param props - Sunburst Chart properties
|
|
42
34
|
* @returns Sunburst Chart component
|
|
43
35
|
* @group Charts
|
|
@@ -5,36 +5,39 @@ export { TableProps };
|
|
|
5
5
|
* Table with aggregation and pagination.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* Here's how you can use the Table component in a Vue application:
|
|
9
8
|
* ```vue
|
|
10
|
-
* <template>
|
|
11
|
-
* <Table :dataOptions="tableProps.dataOptions" :dataSet="tableProps.dataSet"
|
|
12
|
-
:styleOptions="tableProps.styleOptions" :filters="tableProps.filters" />
|
|
13
|
-
* </template>
|
|
14
|
-
*
|
|
15
9
|
* <script setup lang="ts">
|
|
16
10
|
* import { ref } from 'vue';
|
|
17
|
-
* import {
|
|
18
|
-
* import
|
|
19
|
-
* import
|
|
20
|
-
*
|
|
21
|
-
* const dimProductName = DM.DimProducts.ProductName;
|
|
22
|
-
* const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
|
|
11
|
+
* import { Table } from '@sisense/sdk-ui-vue';
|
|
12
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
13
|
+
* import * as DM from './sample-ecommerce';
|
|
23
14
|
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
15
|
+
* const tableProps = ref({
|
|
16
|
+
* dataOptions: {
|
|
17
|
+
* columns: [
|
|
18
|
+
* { column: DM.Commerce.Date.Years, name: 'Year', dateFormat: 'yyyy' },
|
|
19
|
+
* DM.Commerce.Condition,
|
|
20
|
+
* measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
|
|
21
|
+
* ],
|
|
22
|
+
* },
|
|
23
|
+
* styleOptions: {
|
|
24
|
+
* rowsPerPage: 12,
|
|
25
|
+
* height: 420,
|
|
26
|
+
* header: { color: { enabled: true, backgroundColor: '#94F5F0', textColor: '#121A23' } },
|
|
27
|
+
* rows: { alternatingColor: { enabled: true, backgroundColor: '#f2f2f2' } },
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
35
30
|
* </script>
|
|
31
|
+
*
|
|
32
|
+
* <template>
|
|
33
|
+
* <Table
|
|
34
|
+
* :dataSet="DM.DataSource"
|
|
35
|
+
* :dataOptions="tableProps.dataOptions"
|
|
36
|
+
* :styleOptions="tableProps.styleOptions"
|
|
37
|
+
* />
|
|
38
|
+
* </template>
|
|
36
39
|
* ```
|
|
37
|
-
* <img src="media://
|
|
40
|
+
* <img src="media://table-example-1.png" width="700px" />
|
|
38
41
|
* @param props - Table properties
|
|
39
42
|
* @returns Table component
|
|
40
43
|
* @group Data Grids
|
|
@@ -11,34 +11,26 @@ export interface TreemapChartProps extends TreemapChartPropsPreact {
|
|
|
11
11
|
* This type of chart can be used instead of a column chart for comparing a large number of categories and sub-categories.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* Here's how you can use the TreemapChart component in a Vue application:
|
|
15
14
|
* ```vue
|
|
16
|
-
* <template>
|
|
17
|
-
<TreemapChart
|
|
18
|
-
:dataOptions="treemapChartProps.dataOptions"
|
|
19
|
-
:dataSet="treemapChartProps.dataSet"
|
|
20
|
-
:filters="treemapChartProps.filters"
|
|
21
|
-
/>
|
|
22
|
-
* </template>
|
|
23
|
-
*
|
|
24
15
|
* <script setup lang="ts">
|
|
25
16
|
* import { ref } from 'vue';
|
|
26
|
-
* import {
|
|
27
|
-
* import
|
|
28
|
-
* import
|
|
17
|
+
* import { TreemapChart } from '@sisense/sdk-ui-vue';
|
|
18
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
19
|
+
* import * as DM from './sample-ecommerce';
|
|
29
20
|
*
|
|
30
|
-
* const
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
* const chartProps = ref({
|
|
22
|
+
* dataOptions: {
|
|
23
|
+
* category: [{ column: DM.Commerce.Condition, isColored: true }, DM.Commerce.AgeRange],
|
|
24
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue)],
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
* </script>
|
|
28
|
+
*
|
|
29
|
+
* <template>
|
|
30
|
+
* <TreemapChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
31
|
+
* </template>
|
|
40
32
|
* ```
|
|
41
|
-
* <img src="media://
|
|
33
|
+
* <img src="media://treemap-chart-example-1.png" width="700px" />
|
|
42
34
|
* @param props - Treemap chart properties
|
|
43
35
|
* @returns Treemap Chart component
|
|
44
36
|
* @group Charts
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type DashboardModel as DashboardModelPreact } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { type WidgetModel } from '../widgets/widget-model';
|
|
3
|
+
/**
|
|
4
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardModel}
|
|
5
|
+
*
|
|
6
|
+
* @group Fusion Assets
|
|
7
|
+
* @fusionEmbed
|
|
8
|
+
*/
|
|
9
|
+
export interface DashboardModel extends Omit<DashboardModelPreact, 'widgets'> {
|
|
10
|
+
/**
|
|
11
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardModel.widgets}
|
|
12
|
+
*/
|
|
13
|
+
widgets: WidgetModel[];
|
|
14
|
+
}
|
|
@@ -80,6 +80,10 @@ export declare const CriteriaFilterTile: import("vue").DefineComponent<{
|
|
|
80
80
|
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.onEdit}
|
|
81
81
|
*/
|
|
82
82
|
onEdit: PropType<(() => void) | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.config}
|
|
85
|
+
*/
|
|
86
|
+
config: PropType<import("@sisense/sdk-ui-preact").FilterTileConfig | undefined>;
|
|
83
87
|
}, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
84
88
|
[key: string]: any;
|
|
85
89
|
}>) | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -120,4 +124,8 @@ export declare const CriteriaFilterTile: import("vue").DefineComponent<{
|
|
|
120
124
|
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.onEdit}
|
|
121
125
|
*/
|
|
122
126
|
onEdit: PropType<(() => void) | undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.config}
|
|
129
|
+
*/
|
|
130
|
+
config: PropType<import("@sisense/sdk-ui-preact").FilterTileConfig | undefined>;
|
|
123
131
|
}>>, {}, {}>;
|
|
@@ -102,6 +102,10 @@ export declare const DateRangeFilterTile: import("vue").DefineComponent<{
|
|
|
102
102
|
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onEdit}
|
|
103
103
|
*/
|
|
104
104
|
onEdit: PropType<(() => void) | undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.config}
|
|
107
|
+
*/
|
|
108
|
+
config: PropType<import("@sisense/sdk-ui-preact").FilterTileConfig | undefined>;
|
|
105
109
|
}, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
106
110
|
[key: string]: any;
|
|
107
111
|
}>) | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -162,4 +166,8 @@ export declare const DateRangeFilterTile: import("vue").DefineComponent<{
|
|
|
162
166
|
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onEdit}
|
|
163
167
|
*/
|
|
164
168
|
onEdit: PropType<(() => void) | undefined>;
|
|
169
|
+
/**
|
|
170
|
+
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.config}
|
|
171
|
+
*/
|
|
172
|
+
config: PropType<import("@sisense/sdk-ui-preact").FilterTileConfig | undefined>;
|
|
165
173
|
}>>, {}, {}>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FilterTileMenuTargets } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import type { FilterTileActionsConfig, FilterTileConfig, FilterTileHeaderConfig, FilterTileMenuActionItem, FilterTileMenuConfig, FilterTileMenuItem, FilterTileMenuSubmenuItem, FilterTileMenuTarget, FilterTileProps as FilterTilePropsPreact } from '@sisense/sdk-ui-preact';
|
|
2
3
|
import type { PropType } from 'vue';
|
|
4
|
+
/** Reexport related types */
|
|
5
|
+
export { FilterTileMenuTargets, type FilterTileActionsConfig, type FilterTileConfig, type FilterTileHeaderConfig, type FilterTileMenuActionItem, type FilterTileMenuConfig, type FilterTileMenuItem, type FilterTileMenuSubmenuItem, type FilterTileMenuTarget, };
|
|
3
6
|
/**
|
|
4
7
|
* Props of the {@link @sisense/sdk-ui-vue!FilterTile | `FilterTile`} component.
|
|
5
8
|
*/
|
|
@@ -62,6 +65,10 @@ export declare const FilterTile: import("vue").DefineComponent<{
|
|
|
62
65
|
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.onEdit}
|
|
63
66
|
*/
|
|
64
67
|
onEdit: PropType<((levelIndex?: number | undefined) => void) | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.config}
|
|
70
|
+
*/
|
|
71
|
+
config: PropType<FilterTileConfig | undefined>;
|
|
65
72
|
}, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
66
73
|
[key: string]: any;
|
|
67
74
|
}>) | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -91,4 +98,8 @@ export declare const FilterTile: import("vue").DefineComponent<{
|
|
|
91
98
|
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.onEdit}
|
|
92
99
|
*/
|
|
93
100
|
onEdit: PropType<((levelIndex?: number | undefined) => void) | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.config}
|
|
103
|
+
*/
|
|
104
|
+
config: PropType<FilterTileConfig | undefined>;
|
|
94
105
|
}>>, {}, {}>;
|
|
@@ -2,5 +2,5 @@ export { DateRangeFilterTile, type DateRangeFilterTileProps } from './date-range
|
|
|
2
2
|
export { MemberFilterTile, type MemberFilterTileProps } from './member-filter-tile';
|
|
3
3
|
export { CriteriaFilterTile, type CriteriaFilterTileProps } from './criteria-filter-tile';
|
|
4
4
|
export { RelativeDateFilterTile, type RelativeDateFilterTileProps, } from './relative-date-filter-tile';
|
|
5
|
-
export { FilterTile, type FilterTileProps } from './filter-tile';
|
|
6
|
-
export { FiltersPanel, type FiltersPanelProps } from './filters-panel';
|
|
5
|
+
export { FilterTile, type FilterTileProps, FilterTileMenuTargets, type FilterTileActionsConfig, type FilterTileConfig, type FilterTileHeaderConfig, type FilterTileMenuActionItem, type FilterTileMenuConfig, type FilterTileMenuItem, type FilterTileMenuSubmenuItem, type FilterTileMenuTarget, } from './filter-tile';
|
|
6
|
+
export { FiltersPanel, type FiltersPanelProps, type FiltersPanelConfig } from './filters-panel';
|
|
@@ -91,6 +91,10 @@ export declare const MemberFilterTile: import("vue").DefineComponent<{
|
|
|
91
91
|
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.onEdit}
|
|
92
92
|
*/
|
|
93
93
|
onEdit: PropType<(() => void) | undefined>;
|
|
94
|
+
/**
|
|
95
|
+
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.config}
|
|
96
|
+
*/
|
|
97
|
+
config: PropType<import("@sisense/sdk-ui-preact").FilterTileConfig | undefined>;
|
|
94
98
|
}, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
95
99
|
[key: string]: any;
|
|
96
100
|
}>) | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -138,4 +142,8 @@ export declare const MemberFilterTile: import("vue").DefineComponent<{
|
|
|
138
142
|
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.onEdit}
|
|
139
143
|
*/
|
|
140
144
|
onEdit: PropType<(() => void) | undefined>;
|
|
145
|
+
/**
|
|
146
|
+
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.config}
|
|
147
|
+
*/
|
|
148
|
+
config: PropType<import("@sisense/sdk-ui-preact").FilterTileConfig | undefined>;
|
|
141
149
|
}>>, {}, {}>;
|
|
@@ -1,59 +1,57 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { ChartWidgetProps } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import type { ChartWidgetProps as ChartWidgetPropsPreact } from '@sisense/sdk-ui-preact';
|
|
3
3
|
import type { PropType } from 'vue';
|
|
4
|
-
|
|
4
|
+
import type { ChartWidgetConfig } from './widget-config';
|
|
5
|
+
/**
|
|
6
|
+
* Props of the {@link @sisense/sdk-ui-vue!ChartWidget | `ChartWidget`} component.
|
|
7
|
+
*/
|
|
8
|
+
export interface ChartWidgetProps extends Omit<ChartWidgetPropsPreact, 'config'> {
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.config}
|
|
11
|
+
*
|
|
12
|
+
* @category Widget
|
|
13
|
+
*/
|
|
14
|
+
config?: ChartWidgetConfig;
|
|
15
|
+
}
|
|
5
16
|
/**
|
|
6
17
|
* The Chart Widget component extending the {@link Chart} component to support widget style options.
|
|
7
18
|
* It can be used along with the {@link DrilldownWidget} component to support advanced data drilldown.
|
|
8
19
|
* @example
|
|
9
|
-
* Here's how you can use the ChartWidget component in a Vue application:
|
|
10
20
|
* ```vue
|
|
11
|
-
* <template>
|
|
12
|
-
<DrilldownWidget :drilldownPaths="drilldownPaths" :initialDimension="dimProductName">
|
|
13
|
-
<template
|
|
14
|
-
#chart="{ drilldownFilters, drilldownDimension, onDataPointsSelected, onContextMenu }"
|
|
15
|
-
>
|
|
16
|
-
<ChartWidget
|
|
17
|
-
chart-type="bar"
|
|
18
|
-
v-bind:filters="drilldownFilters"
|
|
19
|
-
:dataOptions="{
|
|
20
|
-
...chartProps.dataOptions,
|
|
21
|
-
category: [drilldownDimension],
|
|
22
|
-
}"
|
|
23
|
-
:highlight-selection-disabled="true"
|
|
24
|
-
:dataSet="chartProps.dataSet"
|
|
25
|
-
:style="chartProps.styleOptions"
|
|
26
|
-
:on-data-points-selected="(dataPoints:any,event:any) => {
|
|
27
|
-
onDataPointsSelected(dataPoints);
|
|
28
|
-
onContextMenu({ left: event.clientX, top: event.clientY });
|
|
29
|
-
}"
|
|
30
|
-
:on-data-point-click="(dataPoint:any,event:any) => {
|
|
31
|
-
onDataPointsSelected([dataPoint]);
|
|
32
|
-
onContextMenu({ left: event.clientX, top: event.clientY });
|
|
33
|
-
}"
|
|
34
|
-
:on-data-point-context-menu="(dataPoint:any,event:any) => {
|
|
35
|
-
onDataPointsSelected([dataPoint]);
|
|
36
|
-
onContextMenu({ left: event.clientX, top: event.clientY });
|
|
37
|
-
}"
|
|
38
|
-
/>
|
|
39
|
-
</template>
|
|
40
|
-
</DrilldownWidget>
|
|
41
|
-
* </template>
|
|
42
|
-
*
|
|
43
21
|
* <script setup lang="ts">
|
|
44
22
|
* import { ref } from 'vue';
|
|
45
|
-
* import {
|
|
46
|
-
* import
|
|
47
|
-
* import
|
|
48
|
-
|
|
49
|
-
* const
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
23
|
+
* import { type ChartDataOptions, type ChartType, ChartWidget } from '@sisense/sdk-ui-vue';
|
|
24
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
25
|
+
* import * as DM from './sample-ecommerce';
|
|
26
|
+
*
|
|
27
|
+
* const chartProps = ref<{
|
|
28
|
+
* chartType: ChartType;
|
|
29
|
+
* title: string;
|
|
30
|
+
* description: string;
|
|
31
|
+
* dataOptions: ChartDataOptions;
|
|
32
|
+
* }>({
|
|
33
|
+
* chartType: 'column',
|
|
34
|
+
* title: 'Revenue by Quarter',
|
|
35
|
+
* description: 'This chart shows the total revenue by quarter.',
|
|
36
|
+
* dataOptions: {
|
|
37
|
+
* category: [DM.Commerce.Date.Quarters],
|
|
38
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
39
|
+
* breakBy: [],
|
|
40
|
+
* },
|
|
53
41
|
* });
|
|
54
42
|
* </script>
|
|
43
|
+
*
|
|
44
|
+
* <template>
|
|
45
|
+
* <ChartWidget
|
|
46
|
+
* :chartType="chartProps.chartType"
|
|
47
|
+
* :title="chartProps.title"
|
|
48
|
+
* :description="chartProps.description"
|
|
49
|
+
* :dataSource="DM.DataSource"
|
|
50
|
+
* :dataOptions="chartProps.dataOptions"
|
|
51
|
+
* />
|
|
52
|
+
* </template>
|
|
55
53
|
* ```
|
|
56
|
-
* <img src="media://
|
|
54
|
+
* <img src="media://chart-widget-example-1.png" width="700px" />
|
|
57
55
|
* @param props - ChartWidget properties
|
|
58
56
|
* @returns ChartWidget component representing a chart type as specified in `ChartWidgetProps.`{@link ChartWidgetProps.chartType | chartType}
|
|
59
57
|
* @group Dashboards
|
|
@@ -156,7 +154,7 @@ export declare const ChartWidget: import("vue").DefineComponent<{
|
|
|
156
154
|
*
|
|
157
155
|
* @category Widget
|
|
158
156
|
*/
|
|
159
|
-
config: PropType<
|
|
157
|
+
config: PropType<ChartWidgetConfig | undefined>;
|
|
160
158
|
/**
|
|
161
159
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.id}
|
|
162
160
|
*
|
|
@@ -288,7 +286,7 @@ export declare const ChartWidget: import("vue").DefineComponent<{
|
|
|
288
286
|
*
|
|
289
287
|
* @category Widget
|
|
290
288
|
*/
|
|
291
|
-
config: PropType<
|
|
289
|
+
config: PropType<ChartWidgetConfig | undefined>;
|
|
292
290
|
/**
|
|
293
291
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.id}
|
|
294
292
|
*
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { ChartWidget, type ChartWidgetProps } from './chart-widget';
|
|
2
2
|
export { WidgetById, type WidgetByIdProps } from './widget-by-id';
|
|
3
|
-
export { PivotTableWidget } from './pivot-table-widget';
|
|
4
|
-
export { Widget, type WidgetProps, type WithCommonWidgetProps, type TextWidgetProps, type CustomWidgetProps, type
|
|
3
|
+
export { PivotTableWidget, type PivotTableWidgetProps } from './pivot-table-widget';
|
|
4
|
+
export { Widget, type WidgetProps, type WithCommonWidgetProps, type TextWidgetProps, type CustomWidgetProps, type FilterWidgetProps, } from './widget';
|
|
5
|
+
export * from './widget-config';
|
|
6
|
+
export * from './widget-header-config';
|
|
7
|
+
export * from './widget-model';
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WidgetByIdProps as WidgetByIdPropsPreact } from '@sisense/sdk-ui-preact';
|
|
3
3
|
import type { PropType } from 'vue';
|
|
4
|
+
import type { WidgetConfig } from './widget-config';
|
|
4
5
|
/**
|
|
5
6
|
* Props of the {@link @sisense/sdk-ui-vue!WidgetById | `WidgetById`} component.
|
|
6
7
|
*/
|
|
7
|
-
export interface WidgetByIdProps extends WidgetByIdPropsPreact {
|
|
8
|
+
export interface WidgetByIdProps extends Omit<WidgetByIdPropsPreact, 'config'> {
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.config}
|
|
11
|
+
*
|
|
12
|
+
* @category Widget
|
|
13
|
+
*/
|
|
14
|
+
config?: WidgetConfig;
|
|
8
15
|
}
|
|
9
16
|
/**
|
|
10
17
|
* The `WidgetById` component, which is a thin wrapper on the {@link ChartWidget} component,
|
|
@@ -111,6 +118,12 @@ export declare const WidgetById: import("vue").DefineComponent<{
|
|
|
111
118
|
* @category Widget
|
|
112
119
|
*/
|
|
113
120
|
styleOptions: PropType<import("@sisense/sdk-ui-preact").WidgetByIdStyleOptions | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.config}
|
|
123
|
+
*
|
|
124
|
+
* @category Widget
|
|
125
|
+
*/
|
|
126
|
+
config: PropType<WidgetConfig | undefined>;
|
|
114
127
|
/**
|
|
115
128
|
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.title}
|
|
116
129
|
*
|
|
@@ -218,6 +231,12 @@ export declare const WidgetById: import("vue").DefineComponent<{
|
|
|
218
231
|
* @category Widget
|
|
219
232
|
*/
|
|
220
233
|
styleOptions: PropType<import("@sisense/sdk-ui-preact").WidgetByIdStyleOptions | undefined>;
|
|
234
|
+
/**
|
|
235
|
+
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.config}
|
|
236
|
+
*
|
|
237
|
+
* @category Widget
|
|
238
|
+
*/
|
|
239
|
+
config: PropType<WidgetConfig | undefined>;
|
|
221
240
|
/**
|
|
222
241
|
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.title}
|
|
223
242
|
*
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ChartWidgetConfig as ChartWidgetConfigPreact, type CustomWidgetConfig as CustomWidgetConfigPreact, type FilterWidgetConfig as FilterWidgetConfigPreact, type PivotTableWidgetConfig as PivotTableWidgetConfigPreact, type TextWidgetConfig as TextWidgetConfigPreact } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { type WidgetHeaderConfig } from './widget-header-config';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration of a chart widget.
|
|
5
|
+
*/
|
|
6
|
+
export interface ChartWidgetConfig extends Omit<ChartWidgetConfigPreact, 'header'> {
|
|
7
|
+
/**
|
|
8
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetConfig.header}
|
|
9
|
+
*/
|
|
10
|
+
header?: WidgetHeaderConfig;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Configuration of a pivot table widget.
|
|
14
|
+
*/
|
|
15
|
+
export interface PivotTableWidgetConfig extends Omit<PivotTableWidgetConfigPreact, 'header'> {
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc @sisense/sdk-ui!PivotTableWidgetConfig.header}
|
|
18
|
+
*/
|
|
19
|
+
header?: WidgetHeaderConfig;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Configuration of a custom widget.
|
|
23
|
+
*/
|
|
24
|
+
export interface CustomWidgetConfig extends Omit<CustomWidgetConfigPreact, 'header'> {
|
|
25
|
+
/**
|
|
26
|
+
* {@inheritDoc @sisense/sdk-ui!CustomWidgetConfig.header}
|
|
27
|
+
*/
|
|
28
|
+
header?: WidgetHeaderConfig;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Configuration of a text widget.
|
|
32
|
+
*/
|
|
33
|
+
export interface TextWidgetConfig extends Omit<TextWidgetConfigPreact, 'header'> {
|
|
34
|
+
/**
|
|
35
|
+
* {@inheritDoc @sisense/sdk-ui!TextWidgetConfig.header}
|
|
36
|
+
*/
|
|
37
|
+
header?: WidgetHeaderConfig;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Configuration of a filter widget.
|
|
41
|
+
*
|
|
42
|
+
* @beta
|
|
43
|
+
*/
|
|
44
|
+
export interface FilterWidgetConfig extends Omit<FilterWidgetConfigPreact, 'header'> {
|
|
45
|
+
/**
|
|
46
|
+
* {@inheritDoc @sisense/sdk-ui!FilterWidgetConfig.header}
|
|
47
|
+
*/
|
|
48
|
+
header?: WidgetHeaderConfig;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Configuration of a widget — the union of every widget-type-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* Used where the widget type is not known statically, for example {@link WidgetModel.config}. When
|
|
54
|
+
* the widget type is known, prefer that widget's own configuration type, which lists only the
|
|
55
|
+
* options the widget supports.
|
|
56
|
+
*/
|
|
57
|
+
export type WidgetConfig = ChartWidgetConfig | PivotTableWidgetConfig | CustomWidgetConfig | TextWidgetConfig | FilterWidgetConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type WidgetModel as WidgetModelPreact } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { type WidgetConfig } from './widget-config';
|
|
3
|
+
/**
|
|
4
|
+
* {@inheritDoc @sisense/sdk-ui!WidgetModel}
|
|
5
|
+
*
|
|
6
|
+
* @group Fusion Assets
|
|
7
|
+
* @fusionEmbed
|
|
8
|
+
*/
|
|
9
|
+
export interface WidgetModel extends Omit<WidgetModelPreact, 'config'> {
|
|
10
|
+
/**
|
|
11
|
+
* {@inheritDoc @sisense/sdk-ui!WidgetModel.config}
|
|
12
|
+
*/
|
|
13
|
+
config?: WidgetConfig;
|
|
14
|
+
}
|