@sisense/sdk-ui-vue 2.32.0 → 2.33.1

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.
@@ -18,3 +18,4 @@ export { AreamapChart, type AreamapChartProps } from './areamap-chart';
18
18
  export { ScattermapChart, type ScattermapChartProps } from './scattermap-chart';
19
19
  export { StreamgraphChart, type StreamgraphChartProps } from './streamgraph-chart';
20
20
  export { AreaRangeChart, type AreaRangeChartProps } from './area-range-chart';
21
+ export { SankeyChart, type SankeyChartProps } from './sankey-chart';
@@ -0,0 +1,178 @@
1
+ import type { SankeyChartProps as SankeyChartPropsPreact } from '@sisense/sdk-ui-preact';
2
+ import type { PropType } from 'vue';
3
+ /**
4
+ * Props of the {@link @sisense/sdk-ui-vue!SankeyChart | `SankeyChart`} component.
5
+ */
6
+ export interface SankeyChartProps extends SankeyChartPropsPreact {
7
+ }
8
+ /**
9
+ * A Vue component that visualizes flow and volume between nodes using a Sankey diagram.
10
+ *
11
+ * Node width represents the total flow through that node; link width represents the flow
12
+ * between two connected nodes.
13
+ *
14
+ * @example
15
+ * Here's how you can use the SankeyChart component in a Vue application:
16
+ * ```vue
17
+ * <template>
18
+ * <SankeyChart
19
+ * :dataOptions="sankeyChartProps.dataOptions"
20
+ * :dataSet="sankeyChartProps.dataSet"
21
+ * :styleOptions="sankeyChartProps.styleOptions"
22
+ * />
23
+ * </template>
24
+ *
25
+ * <script setup lang="ts">
26
+ * import { ref } from 'vue';
27
+ * import { measureFactory } from '@sisense/sdk-data';
28
+ * import * as DM from '../assets/sample-ecommerce';
29
+ * import { SankeyChart, type SankeyChartProps } from '@sisense/sdk-ui-vue';
30
+ *
31
+ * const sankeyChartProps = ref<SankeyChartProps>({
32
+ * dataSet: DM.DataSource,
33
+ * dataOptions: {
34
+ * category: [DM.Commerce.Gender, DM.Commerce.AgeRange],
35
+ * value: measureFactory.sum(DM.Commerce.Revenue, 'Revenue'),
36
+ * },
37
+ * styleOptions: {
38
+ * orientation: 'horizontal',
39
+ * nodeAlignment: 'top',
40
+ * },
41
+ * });
42
+ * </script>
43
+ * ```
44
+ * @param {SankeyChartProps} - Sankey chart properties
45
+ * @returns Sankey Chart component
46
+ * @group Charts
47
+ */
48
+ export declare const SankeyChart: import("vue").DefineComponent<{
49
+ /**
50
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.dataOptions}
51
+ *
52
+ * @category Chart
53
+ */
54
+ dataOptions: {
55
+ type: PropType<import("@sisense/sdk-ui-preact").SankeyChartDataOptions>;
56
+ required: true;
57
+ };
58
+ /**
59
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.dataSet}
60
+ *
61
+ * @category Data
62
+ */
63
+ dataSet: PropType<import("@sisense/sdk-data").DataSource | import("@sisense/sdk-data").Data | undefined>;
64
+ /**
65
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.filters}
66
+ *
67
+ * @category Data
68
+ */
69
+ filters: PropType<import("@sisense/sdk-data").FilterRelations | import("@sisense/sdk-data").Filter[] | undefined>;
70
+ /**
71
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.highlights}
72
+ *
73
+ * @category Data
74
+ */
75
+ highlights: PropType<import("@sisense/sdk-data").Filter[] | undefined>;
76
+ /**
77
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.styleOptions}
78
+ *
79
+ * @category Chart
80
+ */
81
+ styleOptions: PropType<import("@sisense/sdk-ui-preact").SankeyStyleOptions | undefined>;
82
+ /**
83
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onBeforeRender}
84
+ *
85
+ * @category Callbacks
86
+ */
87
+ onBeforeRender: PropType<import("@sisense/sdk-ui-preact").BeforeRenderHandler | undefined>;
88
+ /**
89
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataReady}
90
+ *
91
+ * @category Callbacks
92
+ */
93
+ onDataReady: PropType<((data: import("@sisense/sdk-data").Data) => import("@sisense/sdk-data").Data) | undefined>;
94
+ /**
95
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataPointClick}
96
+ *
97
+ * @category Callbacks
98
+ */
99
+ onDataPointClick: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | undefined>;
100
+ /**
101
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataPointContextMenu}
102
+ *
103
+ * @category Callbacks
104
+ */
105
+ onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | undefined>;
106
+ /**
107
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataPointsSelected}
108
+ *
109
+ * @category Callbacks
110
+ */
111
+ onDataPointsSelected: PropType<import("@sisense/sdk-ui-preact").DataPointsEventHandler | undefined>;
112
+ }, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
113
+ [key: string]: any;
114
+ }>) | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
115
+ /**
116
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.dataOptions}
117
+ *
118
+ * @category Chart
119
+ */
120
+ dataOptions: {
121
+ type: PropType<import("@sisense/sdk-ui-preact").SankeyChartDataOptions>;
122
+ required: true;
123
+ };
124
+ /**
125
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.dataSet}
126
+ *
127
+ * @category Data
128
+ */
129
+ dataSet: PropType<import("@sisense/sdk-data").DataSource | import("@sisense/sdk-data").Data | undefined>;
130
+ /**
131
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.filters}
132
+ *
133
+ * @category Data
134
+ */
135
+ filters: PropType<import("@sisense/sdk-data").FilterRelations | import("@sisense/sdk-data").Filter[] | undefined>;
136
+ /**
137
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.highlights}
138
+ *
139
+ * @category Data
140
+ */
141
+ highlights: PropType<import("@sisense/sdk-data").Filter[] | undefined>;
142
+ /**
143
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.styleOptions}
144
+ *
145
+ * @category Chart
146
+ */
147
+ styleOptions: PropType<import("@sisense/sdk-ui-preact").SankeyStyleOptions | undefined>;
148
+ /**
149
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onBeforeRender}
150
+ *
151
+ * @category Callbacks
152
+ */
153
+ onBeforeRender: PropType<import("@sisense/sdk-ui-preact").BeforeRenderHandler | undefined>;
154
+ /**
155
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataReady}
156
+ *
157
+ * @category Callbacks
158
+ */
159
+ onDataReady: PropType<((data: import("@sisense/sdk-data").Data) => import("@sisense/sdk-data").Data) | undefined>;
160
+ /**
161
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataPointClick}
162
+ *
163
+ * @category Callbacks
164
+ */
165
+ onDataPointClick: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | undefined>;
166
+ /**
167
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataPointContextMenu}
168
+ *
169
+ * @category Callbacks
170
+ */
171
+ onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").DataPointEventHandler | undefined>;
172
+ /**
173
+ * {@inheritDoc @sisense/sdk-ui!SankeyChartProps.onDataPointsSelected}
174
+ *
175
+ * @category Callbacks
176
+ */
177
+ onDataPointsSelected: PropType<import("@sisense/sdk-ui-preact").DataPointsEventHandler | undefined>;
178
+ }>>, {}, {}>;
@@ -1,6 +1,6 @@
1
1
  import type { DashboardByIdConfig as DashboardByIdConfigPreact, DashboardByIdProps as DashboardByIdPropsPreact } from '@sisense/sdk-ui-preact';
2
2
  import type { PropType } from 'vue';
3
- import type { DashboardHeaderConfig } from './dashboard';
3
+ import { type DashboardHeaderConfig } from './dashboard-header-config';
4
4
  /**
5
5
  * Configuration for the {@link @sisense/sdk-ui-vue!DashboardById | `DashboardById`} component.
6
6
  */
@@ -0,0 +1,87 @@
1
+ import { type DashboardHeaderConfig as DashboardHeaderConfigPreact, type DashboardHeaderItemComponentProps, type DashboardHeaderItem as DashboardHeaderItemPreact } from '@sisense/sdk-ui-preact';
2
+ import type { Component, DefineComponent } from 'vue';
3
+ /**
4
+ * A Vue component that renders the content of a custom dashboard header item.
5
+ * This can be a Vue component options object, a `defineComponent` result, or any valid Vue component.
6
+ *
7
+ * The item size resolved by the header layout is provided via the `size` prop.
8
+ *
9
+ * @example
10
+ * A Vue header item component rendering an export button that uses its resolved size:
11
+ * ```vue
12
+ * <script setup lang="ts">
13
+ * import { type DashboardHeaderItemComponentProps } from '@sisense/sdk-ui-vue';
14
+ *
15
+ * const props = defineProps<DashboardHeaderItemComponentProps>();
16
+ *
17
+ * const onExport = () => {
18
+ * // trigger the export
19
+ * };
20
+ * </script>
21
+ * <template>
22
+ * <button :style="{ height: props.size.height + 'px' }" @click="onExport">Export</button>
23
+ * </template>
24
+ * ```
25
+ */
26
+ export type DashboardHeaderItemComponent = Component<DashboardHeaderItemComponentProps> | DefineComponent<DashboardHeaderItemComponentProps>;
27
+ /**
28
+ * A custom item to inject into the dashboard header.
29
+ */
30
+ export interface DashboardHeaderItem extends Omit<DashboardHeaderItemPreact, 'component'> {
31
+ /**
32
+ * Vue component that renders the content of the item.
33
+ */
34
+ component: DashboardHeaderItemComponent;
35
+ }
36
+ /**
37
+ * A dashboard header item after the built-in and custom items have been ordered (position applied).
38
+ *
39
+ * This is the shape passed to {@link DashboardHeaderConfig.onBeforeRender}.
40
+ *
41
+ * For custom items, `component` is the same Vue component that was registered in
42
+ * {@link DashboardHeaderConfig.items}, so items can be matched by component identity as well as by
43
+ * `id`. For built-in items, `component` is an opaque handle to an internal renderer: reorder, keep,
44
+ * or remove such an item, but do not invoke or replace its component.
45
+ */
46
+ export type DashboardResolvedHeaderItem = Omit<DashboardHeaderItem, 'position'>;
47
+ /**
48
+ * Transforms the fully ordered list of dashboard header items right before rendering.
49
+ */
50
+ export type DashboardHeaderItemsTransform = (items: ReadonlyArray<DashboardResolvedHeaderItem>) => DashboardResolvedHeaderItem[];
51
+ /**
52
+ * Configuration for the dashboard header.
53
+ *
54
+ * Injects custom {@link DashboardHeaderItem | items} into the header and, via
55
+ * {@link DashboardHeaderConfig.onBeforeRender | `onBeforeRender`}, reorders or removes the
56
+ * built-in items (referenced by {@link DashboardHeaderTargets}).
57
+ *
58
+ * @example
59
+ * Add a custom item after the title and hide the built-in title:
60
+ * ```ts
61
+ * import { DashboardHeaderTargets, type DashboardConfig } from '@sisense/sdk-ui-vue';
62
+ * import ExportButton from './export-button.vue';
63
+ *
64
+ * const config: DashboardConfig = {
65
+ * header: {
66
+ * items: [
67
+ * {
68
+ * id: 'export',
69
+ * component: ExportButton,
70
+ * position: { type: 'after', target: DashboardHeaderTargets.Title },
71
+ * },
72
+ * ],
73
+ * onBeforeRender: (items) => items.filter((item) => item.id !== DashboardHeaderTargets.Title),
74
+ * },
75
+ * };
76
+ * ```
77
+ */
78
+ export interface DashboardHeaderConfig extends Omit<DashboardHeaderConfigPreact, 'items' | 'onBeforeRender'> {
79
+ /**
80
+ * {@inheritDoc @sisense/sdk-ui!DashboardHeaderConfig.items}
81
+ */
82
+ items?: DashboardHeaderItem[];
83
+ /**
84
+ * {@inheritDoc @sisense/sdk-ui!DashboardHeaderConfig.onBeforeRender}
85
+ */
86
+ onBeforeRender?: DashboardHeaderItemsTransform;
87
+ }
@@ -1,12 +1,11 @@
1
- import type { DashboardConfig as DashboardConfigPreact, DashboardFiltersPanelConfig, DashboardHeaderConfig as DashboardHeaderConfigPreact, DashboardProps as DashboardPropsPreact } from '@sisense/sdk-ui-preact';
1
+ import { DashboardHeaderTargets } from '@sisense/sdk-ui-preact';
2
+ import type { DashboardConfig as DashboardConfigPreact, DashboardFiltersPanelConfig, DashboardHeaderItemComponentProps, DashboardHeaderItemPosition, DashboardHeaderItemSize, DashboardHeaderTarget, DashboardProps as DashboardPropsPreact } from '@sisense/sdk-ui-preact';
2
3
  import type { PropType } from 'vue';
3
4
  import type { WidgetProps } from '../widgets';
4
- export { DashboardFiltersPanelConfig };
5
- /**
6
- * Configuration for the dashboard header.
7
- */
8
- export interface DashboardHeaderConfig extends Omit<DashboardHeaderConfigPreact, 'items' | 'onBeforeRender'> {
9
- }
5
+ import { type DashboardHeaderConfig } from './dashboard-header-config';
6
+ export { DashboardHeaderTargets };
7
+ export type { DashboardFiltersPanelConfig, DashboardHeaderItemComponentProps, DashboardHeaderItemPosition, DashboardHeaderItemSize, DashboardHeaderTarget, };
8
+ export type { DashboardHeaderConfig, DashboardHeaderItem, DashboardHeaderItemComponent, DashboardHeaderItemsTransform, DashboardResolvedHeaderItem, } from './dashboard-header-config';
10
9
  /**
11
10
  * Configuration for the {@link @sisense/sdk-ui-vue!Dashboard | `Dashboard`} component.
12
11
  */
@@ -50,7 +50,7 @@ export declare const WidgetById: import("vue").DefineComponent<{
50
50
  */
51
51
  description: PropType<string | undefined>;
52
52
  /** @internal */
53
- drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
53
+ drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | undefined>;
54
54
  /**
55
55
  * {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.filters}
56
56
  *
@@ -157,7 +157,7 @@ export declare const WidgetById: import("vue").DefineComponent<{
157
157
  */
158
158
  description: PropType<string | undefined>;
159
159
  /** @internal */
160
- drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
160
+ drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | undefined>;
161
161
  /**
162
162
  * {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.filters}
163
163
  *
@@ -63,7 +63,7 @@ export declare const Widget: import("vue").DefineComponent<{
63
63
  * @category Widget
64
64
  */
65
65
  widgetType: {
66
- type: PropType<"filter" | "chart" | "pivot" | "text" | "custom">;
66
+ type: PropType<"filter" | "text" | "custom" | "chart" | "pivot">;
67
67
  required: true;
68
68
  };
69
69
  /**
@@ -89,7 +89,7 @@ export declare const Widget: import("vue").DefineComponent<{
89
89
  *
90
90
  * @category Chart
91
91
  */
92
- dataOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDataOptions | import("@sisense/sdk-ui-preact").GenericDataOptions | import("@sisense/sdk-ui-preact").ChartDataOptions | undefined>;
92
+ dataOptions: PropType<import("@sisense/sdk-ui-preact").GenericDataOptions | import("@sisense/sdk-ui-preact").ChartDataOptions | import("@sisense/sdk-ui-preact").PivotTableDataOptions | undefined>;
93
93
  /**
94
94
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.filters}
95
95
  *
@@ -107,7 +107,7 @@ export declare const Widget: import("vue").DefineComponent<{
107
107
  *
108
108
  * @category Widget
109
109
  */
110
- styleOptions: PropType<import("@sisense/sdk-ui-preact").TextWidgetStyleOptions | import("@sisense/sdk-ui-preact").WidgetContainerStyleOptions | import("@sisense/sdk-ui-preact").CustomWidgetStyleOptions | import("@sisense/sdk-ui-preact").PivotTableWidgetStyleOptions | import("@sisense/sdk-ui-preact").ChartWidgetStyleOptions | undefined>;
110
+ styleOptions: PropType<import("@sisense/sdk-ui-preact").WidgetContainerStyleOptions | import("@sisense/sdk-ui-preact").CustomWidgetStyleOptions | import("@sisense/sdk-ui-preact").ChartWidgetStyleOptions | import("@sisense/sdk-ui-preact").PivotTableWidgetStyleOptions | import("@sisense/sdk-ui-preact").TextWidgetStyleOptions | undefined>;
111
111
  /**
112
112
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.config}
113
113
  *
@@ -126,7 +126,7 @@ export declare const Widget: import("vue").DefineComponent<{
126
126
  *
127
127
  * @category Widget
128
128
  */
129
- drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
129
+ drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | undefined>;
130
130
  /**
131
131
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.title}
132
132
  *
@@ -170,13 +170,13 @@ export declare const Widget: import("vue").DefineComponent<{
170
170
  *
171
171
  * @category Callbacks
172
172
  */
173
- onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").CustomWidgetDataPointEventHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | 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").KpiDataPointEventHandler | import("@sisense/sdk-ui-preact").TextWidgetDataPointEventHandler | undefined>;
173
+ onDataPointClick: PropType<import("@sisense/sdk-ui-preact").CustomWidgetDataPointEventHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | 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").KpiDataPointEventHandler | import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").TextWidgetDataPointEventHandler | undefined>;
174
174
  /**
175
175
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
176
176
  *
177
177
  * @category Callbacks
178
178
  */
179
- onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").CustomWidgetDataPointContextMenuHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").CalendarHeatmapDataPointEventHandler | import("@sisense/sdk-ui-preact").KpiDataPointEventHandler | undefined>;
179
+ onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").CustomWidgetDataPointContextMenuHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").CalendarHeatmapDataPointEventHandler | import("@sisense/sdk-ui-preact").KpiDataPointEventHandler | import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
180
180
  /**
181
181
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointsSelected}
182
182
  *
@@ -201,7 +201,7 @@ export declare const Widget: import("vue").DefineComponent<{
201
201
  * @category Widget
202
202
  */
203
203
  widgetType: {
204
- type: PropType<"filter" | "chart" | "pivot" | "text" | "custom">;
204
+ type: PropType<"filter" | "text" | "custom" | "chart" | "pivot">;
205
205
  required: true;
206
206
  };
207
207
  /**
@@ -227,7 +227,7 @@ export declare const Widget: import("vue").DefineComponent<{
227
227
  *
228
228
  * @category Chart
229
229
  */
230
- dataOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDataOptions | import("@sisense/sdk-ui-preact").GenericDataOptions | import("@sisense/sdk-ui-preact").ChartDataOptions | undefined>;
230
+ dataOptions: PropType<import("@sisense/sdk-ui-preact").GenericDataOptions | import("@sisense/sdk-ui-preact").ChartDataOptions | import("@sisense/sdk-ui-preact").PivotTableDataOptions | undefined>;
231
231
  /**
232
232
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.filters}
233
233
  *
@@ -245,7 +245,7 @@ export declare const Widget: import("vue").DefineComponent<{
245
245
  *
246
246
  * @category Widget
247
247
  */
248
- styleOptions: PropType<import("@sisense/sdk-ui-preact").TextWidgetStyleOptions | import("@sisense/sdk-ui-preact").WidgetContainerStyleOptions | import("@sisense/sdk-ui-preact").CustomWidgetStyleOptions | import("@sisense/sdk-ui-preact").PivotTableWidgetStyleOptions | import("@sisense/sdk-ui-preact").ChartWidgetStyleOptions | undefined>;
248
+ styleOptions: PropType<import("@sisense/sdk-ui-preact").WidgetContainerStyleOptions | import("@sisense/sdk-ui-preact").CustomWidgetStyleOptions | import("@sisense/sdk-ui-preact").ChartWidgetStyleOptions | import("@sisense/sdk-ui-preact").PivotTableWidgetStyleOptions | import("@sisense/sdk-ui-preact").TextWidgetStyleOptions | undefined>;
249
249
  /**
250
250
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.config}
251
251
  *
@@ -264,7 +264,7 @@ export declare const Widget: import("vue").DefineComponent<{
264
264
  *
265
265
  * @category Widget
266
266
  */
267
- drilldownOptions: PropType<import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | import("@sisense/sdk-ui-preact").DrilldownOptions | undefined>;
267
+ drilldownOptions: PropType<import("@sisense/sdk-ui-preact").DrilldownOptions | import("@sisense/sdk-ui-preact").PivotTableDrilldownOptions | undefined>;
268
268
  /**
269
269
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.title}
270
270
  *
@@ -308,13 +308,13 @@ export declare const Widget: import("vue").DefineComponent<{
308
308
  *
309
309
  * @category Callbacks
310
310
  */
311
- onDataPointClick: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").CustomWidgetDataPointEventHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | 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").KpiDataPointEventHandler | import("@sisense/sdk-ui-preact").TextWidgetDataPointEventHandler | undefined>;
311
+ onDataPointClick: PropType<import("@sisense/sdk-ui-preact").CustomWidgetDataPointEventHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | 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").KpiDataPointEventHandler | import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").TextWidgetDataPointEventHandler | undefined>;
312
312
  /**
313
313
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
314
314
  *
315
315
  * @category Callbacks
316
316
  */
317
- onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | import("@sisense/sdk-ui-preact").CustomWidgetDataPointContextMenuHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").CalendarHeatmapDataPointEventHandler | import("@sisense/sdk-ui-preact").KpiDataPointEventHandler | undefined>;
317
+ onDataPointContextMenu: PropType<import("@sisense/sdk-ui-preact").CustomWidgetDataPointContextMenuHandler<import("@sisense/sdk-ui-preact").AbstractDataPointWithEntries> | import("@sisense/sdk-ui-preact").DataPointEventHandler | import("@sisense/sdk-ui-preact").ScatterDataPointEventHandler | import("@sisense/sdk-ui-preact").BoxplotDataPointEventHandler | import("@sisense/sdk-ui-preact").CalendarHeatmapDataPointEventHandler | import("@sisense/sdk-ui-preact").KpiDataPointEventHandler | import("@sisense/sdk-ui-preact").PivotTableDataPointEventHandler | undefined>;
318
318
  /**
319
319
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointsSelected}
320
320
  *
@@ -0,0 +1,64 @@
1
+ import { type PreactNode } from '@sisense/sdk-ui-preact';
2
+ import { type Component, type DefineComponent } from 'vue';
3
+ import { type VueComponentAdapterContexts } from './vue-component-adapter';
4
+ /**
5
+ * A preact component. Its render output matches the preact-facing component interfaces, so a
6
+ * component produced by {@link ComponentTranslator.toPreactComponent} can be handed to any of them
7
+ * (custom widget map, dashboard header item, ...).
8
+ *
9
+ * @internal
10
+ */
11
+ export type PreactComponent<Props> = (props: Props) => PreactNode;
12
+ /**
13
+ * A Vue component: a component options object, a `defineComponent` result, or any valid Vue
14
+ * component.
15
+ *
16
+ * @internal
17
+ */
18
+ export type VueComponent<Props> = Component<Props> | DefineComponent<Props>;
19
+ type AnyObject = Record<string, any>;
20
+ /**
21
+ * Translates components between Vue and preact in both directions.
22
+ *
23
+ * Shared infrastructure for features that let consumers pass a native Vue component into an
24
+ * otherwise preact-facing interface — custom widgets and dashboard header items today, widget and
25
+ * filter-tile headers in the future — and that hand preact components back to consumers, where
26
+ * every component is exposed as a real Vue component.
27
+ *
28
+ * The two methods are inverses of each other, and translation is stable: the same input always
29
+ * yields the same output instance, so the renderer sees a constant component identity across
30
+ * re-renders (no unmount/remount) and consumers get back the very component they passed in.
31
+ * Translating a wrapper back always unwraps it, so a component never gets wrapped twice.
32
+ *
33
+ * The translator owns no live component instances: it produces components and adapter *factories*,
34
+ * and each adapter is created and destroyed by the wrapper that mounts it. Both registries are
35
+ * keyed weakly, so nothing has to be released explicitly when the host component unmounts.
36
+ *
37
+ * @internal
38
+ */
39
+ export type ComponentTranslator = ReturnType<typeof createComponentTranslator>;
40
+ /**
41
+ * Creates a {@link ComponentTranslator}.
42
+ *
43
+ * @param contexts - Parent contexts provided to each Vue component adapted for preact, captured in
44
+ * the host component's `setup`.
45
+ * @internal
46
+ */
47
+ export declare function createComponentTranslator(contexts: VueComponentAdapterContexts): {
48
+ /**
49
+ * Translates a Vue component into a preact component.
50
+ *
51
+ * A Vue wrapper produced by {@link fromPreactComponent} is unwrapped back to the preact
52
+ * component it renders, rather than being wrapped a second time.
53
+ */
54
+ toPreactComponent: <Props extends AnyObject>(component: VueComponent<Props>) => PreactComponent<Props>;
55
+ /**
56
+ * Translates a preact component into a Vue component.
57
+ *
58
+ * A preact wrapper produced by {@link toPreactComponent} is unwrapped back to the Vue component
59
+ * it renders; any other preact component is wrapped in a generated Vue component that renders
60
+ * it, so consumers can render it in a Vue template like any other component.
61
+ */
62
+ fromPreactComponent: <Props_1 extends AnyObject>(component: PreactComponent<Props_1>) => VueComponent<Props_1>;
63
+ };
64
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { DashboardByIdProps as DashboardByIdPropsPreact, DashboardProps as DashboardPropsPreact } from '@sisense/sdk-ui-preact';
2
+ import type { DashboardProps } from '../components/dashboard/dashboard';
3
+ import type { DashboardByIdProps } from '../components/dashboard/dashboard-by-id';
4
+ import type { ComponentTranslator } from './component-translator';
5
+ /**
6
+ * Converts Vue `Dashboard` props into the preact props rendered by the underlying component.
7
+ *
8
+ * The object structure is always translated — for Vue that is the `config.header` section, whose
9
+ * shape matches preact's apart from the flavor of the components it carries.
10
+ *
11
+ * `componentTranslator` additionally converts the components carried in the props (today the custom
12
+ * `config.header` items) into preact components. Pass it whenever the result will be **rendered**.
13
+ * Omit it for pure props manipulation — filter helpers, dashboard model translation, prop
14
+ * composition — where the components are never rendered and are carried through as they are.
15
+ */
16
+ export declare function toPreactDashboardProps(vueProps: DashboardProps, componentTranslator?: ComponentTranslator): DashboardPropsPreact;
17
+ /**
18
+ * Converts preact `Dashboard` props into Vue props.
19
+ *
20
+ * `componentTranslator` additionally resolves the components carried in the props back to the Vue
21
+ * components they wrap. Omit it for pure props manipulation, where the components are carried
22
+ * through as they are.
23
+ */
24
+ export declare function toDashboardProps(preactProps: DashboardPropsPreact, componentTranslator?: ComponentTranslator): DashboardProps;
25
+ /**
26
+ * Converts Vue `DashboardById` props into the preact props rendered by the underlying component.
27
+ *
28
+ * Behaves like {@link toPreactDashboardProps}: the structure is always translated, and
29
+ * `componentTranslator` additionally converts the components carried in `config.header`.
30
+ */
31
+ export declare function toPreactDashboardByIdProps(vueProps: DashboardByIdProps, componentTranslator?: ComponentTranslator): DashboardByIdPropsPreact;
32
+ /** Mirror of {@link toPreactDashboardByIdProps} for the preact -> Vue direction. */
33
+ export declare function toDashboardByIdProps(preactProps: DashboardByIdPropsPreact, componentTranslator?: ComponentTranslator): DashboardByIdProps;
@@ -6,9 +6,18 @@ export declare function toDeepRaw<T>(data: T): T;
6
6
  /**
7
7
  * Renders a component without children.
8
8
  *
9
+ * `props` is either the component's reactive props object, or a getter returning the props to
10
+ * render. Use a getter when the Vue-flavored props need converting into the preact props shape
11
+ * (e.g. converting Vue components carried in props into preact components): it is called on every
12
+ * render, so prop updates keep flowing through Vue's reactivity. Converting once before calling
13
+ * this helper would instead snapshot the props at `setup` time and freeze them.
14
+ *
15
+ * A props object is unwrapped with {@link toDeepRaw} before rendering; a getter owns that step, so
16
+ * it can convert the already-unwrapped props.
17
+ *
9
18
  * @internal
10
19
  */
11
- export declare const setupHelper: <C extends AnyComponentFunction>(component: C, props: Parameters<C>[0], contextConnectors?: ContextConnector<any>[]) => (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
20
+ export declare const setupHelper: <C extends AnyComponentFunction>(component: C, props: Parameters<C>[0] | (() => Parameters<C>[0]), contextConnectors?: ContextConnector<any>[]) => (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
21
  [key: string]: any;
13
22
  }>) | null;
14
23
  /**
@@ -1,7 +1,18 @@
1
- import type { CompleteThemeSettingsInternal, CustomSisenseContext } from '@sisense/sdk-ui-preact';
2
- import type { ExternalComponentAdapter } from '@sisense/sdk-ui-preact';
1
+ import { type CompleteThemeSettingsInternal, type CustomSisenseContext, type CustomWidgetsContextAdapter, type ExternalComponentAdapter } from '@sisense/sdk-ui-preact';
3
2
  import { type Component, type DefineComponent, type Ref } from 'vue';
4
3
  type AnyObject = Record<string, any>;
4
+ /**
5
+ * Parent Vue contexts captured when an adapter is created and provided to the adapted component's
6
+ * isolated Vue app, so it resolves Sisense, theme, and custom-widget context the same way it
7
+ * would inside the host application tree.
8
+ *
9
+ * @internal
10
+ */
11
+ export type VueComponentAdapterContexts = {
12
+ sisenseContext: Ref<CustomSisenseContext>;
13
+ themeContext: Ref<CompleteThemeSettingsInternal>;
14
+ customWidgetsContext: Ref<CustomWidgetsContextAdapter>;
15
+ };
5
16
  /**
6
17
  * Adapter class that manages the lifecycle of a Vue component
7
18
  * rendered within a Preact context. This provides efficient updates
@@ -20,11 +31,7 @@ export declare class VueComponentAdapter<Props extends AnyObject> implements Ext
20
31
  private container;
21
32
  private isDestroyed;
22
33
  private propsRef;
23
- constructor(componentClass: Component<Props> | DefineComponent<Props>, contexts: {
24
- sisenseContext: Ref<CustomSisenseContext>;
25
- themeContext: Ref<CompleteThemeSettingsInternal>;
26
- customWidgetsContext: Ref<any>;
27
- });
34
+ constructor(componentClass: Component<Props> | DefineComponent<Props>, contexts: VueComponentAdapterContexts);
28
35
  /**
29
36
  * Mounts the Vue component into the container element.
30
37
  * This should only be called once when the Preact wrapper mounts.
@@ -1,2 +1,3 @@
1
1
  export { boxWhiskerProcessResult, extractDimensionsAndMeasures, formatNumber, formatDate, getDefaultDateFormat, formatDataSet, } 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, CommonDataOptions, FormatDateOptions, FormatDataSetOptions, 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, WidgetsOptions, WidgetConfig, WidgetNarrativeConfig, WidgetNarrativeDisplayLocation, AppConfig, DateConfig, MenuItemSection, MonthOfYear, DayOfWeek, DateLevel, ThemeOid, GetDashboardModelOptions, GetDashboardModelsOptions, SeriesChartType, MenuPosition, ThemeSettings, Color, ColorPaletteTheme, Navigator, DrilldownOptions, DrilldownSelection, PivotTableDrilldownOptions, PivotTableSelectableDrilldownOptions, PivotTableNonSelectableDrilldownOptions, Member, FilterVariant, FilterWidgetProps, FilterWidgetFilterType, TranslationConfig, Plugin, } from '@sisense/sdk-ui-preact';
2
+ export { WidgetHeaderMenuTargets } from '@sisense/sdk-ui-preact';
3
+ export type { ChartType, CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, CalendarHeatmapChartType, ScattermapChartType, AreamapChartType, SankeyChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, CalendarHeatmapSubtype, WidgetType, CartesianWidgetType, CategoricalWidgetType, TabularWidgetType, ExecuteQueryByWidgetIdParams, ExecuteQueryParams, GetWidgetModelParams, GetSharedFormulaParams, GetDashboardModelParams, UseGetSharedFormulaParams, GetDashboardModelsParams, GetHierarchyModelsParams, CommonDataOptions, FormatDateOptions, FormatDataSetOptions, ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, CalendarHeatmapChartDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, SankeyChartDataOptions, 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, SankeyStyleOptions, 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, WidgetConfig, WidgetHeaderConfig, WidgetHeaderMenuActionItem, WidgetHeaderMenuConfig, WidgetHeaderMenuItem, WidgetHeaderMenuSubmenuItem, WidgetHeaderMenuTarget, WidgetNarrativeConfig, WidgetNarrativeDisplayLocation, AppConfig, DateConfig, MenuItemSection, MonthOfYear, DayOfWeek, DateLevel, ThemeOid, GetDashboardModelOptions, GetDashboardModelsOptions, SeriesChartType, MenuPosition, ThemeSettings, Color, ColorPaletteTheme, Navigator, DrilldownOptions, DrilldownSelection, PivotTableDrilldownOptions, PivotTableSelectableDrilldownOptions, PivotTableNonSelectableDrilldownOptions, Member, FilterVariant, FilterWidgetProps, FilterWidgetFilterType, TranslationConfig, Plugin, } from '@sisense/sdk-ui-preact';
@@ -1,5 +1,10 @@
1
1
  import type { Filter, FilterRelations } from '@sisense/sdk-data';
2
2
  import type { DashboardProps } from '../components/dashboard';
3
+ /**
4
+ * The helpers below manipulate props and never render them, so they convert the object structure
5
+ * only — passing no component translator, which carries the components in `config.header` through
6
+ * as they are.
7
+ */
3
8
  /**
4
9
  * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilters}
5
10
  *