@sisense/sdk-ui-angular 1.32.0 → 1.34.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/lib/component-wrapper-helpers/context-connectors.d.ts +2 -2
- package/dist/ai/lib/components/chatbot.component.d.ts +3 -5
- package/dist/ai/lib/components/get-nlg-insights.component.d.ts +3 -5
- package/dist/ai/lib/sdk-ai.module.d.ts +0 -1
- package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/ai/lib/services/ai.service.d.ts +1 -2
- package/dist/ai/public-api.d.ts +2 -2
- package/dist/esm2020/ai/lib/component-wrapper-helpers/context-connectors.mjs +15 -9
- package/dist/esm2020/ai/lib/components/chatbot.component.mjs +10 -13
- package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +10 -13
- package/dist/esm2020/ai/lib/sdk-ai.module.mjs +2 -3
- package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/ai/lib/services/ai.service.mjs +2 -3
- package/dist/esm2020/ai/public-api.mjs +3 -3
- package/dist/esm2020/lib/component-wrapper-helpers/context-connectors.mjs +60 -36
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/chart.component.mjs +8 -10
- package/dist/esm2020/lib/components/charts/column-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/index.mjs +13 -13
- package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/pivot-table.component.mjs +8 -9
- package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/table.component.mjs +8 -10
- package/dist/esm2020/lib/components/charts/treemap-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/context-menu.component.mjs +9 -9
- package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +11 -12
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +8 -9
- package/dist/esm2020/lib/components/dashboard/index.mjs +2 -2
- package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/criteria-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/index.mjs +3 -3
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/relative-date-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/index.mjs +4 -4
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +8 -10
- package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +8 -9
- package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +18 -19
- package/dist/esm2020/lib/components/widgets/index.mjs +5 -4
- package/dist/esm2020/lib/components/widgets/pivot-table-widget.component.mjs +126 -0
- package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +8 -9
- package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +8 -9
- package/dist/esm2020/lib/decorators/decorators.module.mjs +1 -1
- package/dist/esm2020/lib/decorators/index.mjs +2 -2
- package/dist/esm2020/lib/decorators/trackable.decorator.mjs +2 -2
- package/dist/esm2020/lib/sdk-ui-core-exports.mjs +2 -2
- package/dist/esm2020/lib/sdk-ui.module.mjs +9 -6
- package/dist/esm2020/lib/services/dashboard.service.mjs +1 -1
- package/dist/esm2020/lib/services/hierarchy.service.mjs +1 -1
- package/dist/esm2020/lib/services/index.mjs +4 -4
- package/dist/esm2020/lib/services/plugins.service.mjs +1 -1
- package/dist/esm2020/lib/services/query.service.mjs +60 -6
- package/dist/esm2020/lib/services/sisense-context.service.mjs +1 -1
- package/dist/esm2020/lib/services/theme.service.mjs +2 -2
- package/dist/esm2020/lib/services/widget.service.mjs +1 -1
- package/dist/esm2020/lib/types/chart-event-props.mjs +1 -1
- package/dist/esm2020/lib/types/dashboard-config.mjs +2 -0
- package/dist/esm2020/lib/types/index.mjs +4 -3
- package/dist/esm2020/lib/utilities/dashboard-helpers.mjs +118 -0
- package/dist/esm2020/lib/utilities/dashboard-model-translator.mjs +49 -0
- package/dist/esm2020/lib/utilities/index.mjs +7 -0
- package/dist/esm2020/lib/utilities/widget-model-translator.mjs +304 -0
- package/dist/esm2020/public-api.mjs +5 -4
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +32 -36
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +2651 -1987
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +32 -34
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +2653 -1988
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/component-wrapper-helpers/context-connectors.d.ts +5 -5
- package/dist/lib/components/charts/area-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/area-range-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/areamap-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/bar-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/boxplot-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/chart.component.d.ts +1 -2
- package/dist/lib/components/charts/column-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/funnel-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/index.d.ts +12 -12
- package/dist/lib/components/charts/indicator-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/line-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/pie-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/pivot-table.component.d.ts +1 -1
- package/dist/lib/components/charts/polar-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/scatter-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/scattermap-chart.component.d.ts +1 -1
- package/dist/lib/components/charts/sunburst-chart.component.d.ts +1 -2
- package/dist/lib/components/charts/table.component.d.ts +1 -2
- package/dist/lib/components/charts/treemap-chart.component.d.ts +1 -2
- package/dist/lib/components/context-menu.component.d.ts +1 -1
- package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +10 -7
- package/dist/lib/components/dashboard/dashboard.component.d.ts +6 -3
- package/dist/lib/components/dashboard/index.d.ts +1 -1
- package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +1 -1
- package/dist/lib/components/filters/criteria-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/filters/date-range-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/filters/index.d.ts +2 -2
- package/dist/lib/components/filters/member-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/filters/relative-date-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/index.d.ts +3 -3
- package/dist/lib/components/widgets/chart-widget.component.d.ts +1 -2
- package/dist/lib/components/widgets/dashboard-widget.component.d.ts +1 -1
- package/dist/lib/components/widgets/drilldown-widget.component.d.ts +2 -5
- package/dist/lib/components/widgets/index.d.ts +4 -3
- package/dist/lib/components/widgets/pivot-table-widget.component.d.ts +127 -0
- package/dist/lib/components/widgets/table-widget.component.d.ts +1 -1
- package/dist/lib/components/widgets/widget-by-id.component.d.ts +1 -1
- package/dist/lib/decorators/index.d.ts +1 -1
- package/dist/lib/sdk-ui-core-exports.d.ts +2 -2
- package/dist/lib/sdk-ui.module.d.ts +4 -4
- package/dist/lib/services/dashboard.service.d.ts +1 -1
- package/dist/lib/services/hierarchy.service.d.ts +1 -1
- package/dist/lib/services/index.d.ts +3 -3
- package/dist/lib/services/plugins.service.d.ts +1 -1
- package/dist/lib/services/query.service.d.ts +44 -3
- package/dist/lib/services/sisense-context.service.d.ts +1 -1
- package/dist/lib/services/theme.service.d.ts +1 -1
- package/dist/lib/types/dashboard-config.d.ts +24 -0
- package/dist/lib/types/index.d.ts +3 -2
- package/dist/lib/utilities/dashboard-helpers.d.ts +104 -0
- package/dist/lib/utilities/dashboard-model-translator.d.ts +47 -0
- package/dist/lib/utilities/index.d.ts +23 -0
- package/dist/lib/utilities/widget-model-translator.d.ts +289 -0
- package/dist/package.json +1 -1
- package/dist/public-api.d.ts +5 -4
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { type TextWidgetProps, type WidgetModel } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { ChartProps, ChartWidgetProps, PivotTableProps, PivotTableWidgetProps, TableProps } from '../components';
|
|
3
|
+
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../services';
|
|
4
|
+
/**
|
|
5
|
+
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
10
|
+
dashboardOid: 'your-dashboard-oid',
|
|
11
|
+
widgetOid: 'your-widget-oid'
|
|
12
|
+
});
|
|
13
|
+
const executeQueryParams = widgetModelTranslator.toExecuteQueryParams(widgetModel);
|
|
14
|
+
const queryResult = await queryService.executeQuery(executeQueryParams);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Note: this method is not supported for getting pivot query.
|
|
18
|
+
* Use {@link toExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
|
|
19
|
+
*/
|
|
20
|
+
export declare const toExecuteQueryParams: (widgetModel: WidgetModel) => ExecuteQueryParams;
|
|
21
|
+
/**
|
|
22
|
+
* Translates a {@link WidgetModel} to the parameters for executing a query for the pivot widget.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
27
|
+
dashboardOid: 'your-dashboard-oid',
|
|
28
|
+
widgetOid: 'your-widget-oid'
|
|
29
|
+
});
|
|
30
|
+
const executePivotQueryParams = widgetModelTranslator.toExecutePivotQueryParams(widgetModel);
|
|
31
|
+
const queryResult = await queryService.executePivotQuery(executeQueryParams);
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Note: this method is supported only for getting pivot query.
|
|
35
|
+
* Use {@link toExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
|
|
36
|
+
*/
|
|
37
|
+
export declare const toExecutePivotQueryParams: (widgetModel: WidgetModel) => ExecutePivotQueryParams;
|
|
38
|
+
/**
|
|
39
|
+
* Translates a {@link WidgetModel} to the props for rendering a chart.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```html
|
|
43
|
+
<csdk-chart
|
|
44
|
+
*ngIf="chartProps"
|
|
45
|
+
[chartType]="chartProps.chartType"
|
|
46
|
+
[dataSet]="chartProps.dataSet"
|
|
47
|
+
[dataOptions]="chartProps.dataOptions"
|
|
48
|
+
[filters]="chartProps.filters"
|
|
49
|
+
[highlights]="chartProps.highlights"
|
|
50
|
+
[styleOptions]="chartProps.styleOptions"
|
|
51
|
+
/>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
import { Component } from '@angular/core';
|
|
56
|
+
import {
|
|
57
|
+
type ChartProps
|
|
58
|
+
WidgetService,
|
|
59
|
+
widgetModelTranslator,
|
|
60
|
+
} from '@sisense/sdk-ui-angular';
|
|
61
|
+
|
|
62
|
+
@Component({
|
|
63
|
+
selector: 'app-example',
|
|
64
|
+
templateUrl: './example.component.html',
|
|
65
|
+
styleUrls: ['./example.component.scss'],
|
|
66
|
+
})
|
|
67
|
+
export class ExampleComponent {
|
|
68
|
+
chartProps: ChartProps | null = null;
|
|
69
|
+
|
|
70
|
+
constructor(private widgetService: WidgetService) {}
|
|
71
|
+
|
|
72
|
+
async ngOnInit(): Promise<void> {
|
|
73
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
74
|
+
dashboardOid: 'your-dashboard-oid',
|
|
75
|
+
widgetOid: 'your-widget-oid'
|
|
76
|
+
});
|
|
77
|
+
this.chartProps = widgetModelTranslator.toChartProps(widgetModel);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* Note: this method is not supported for pivot widgets.
|
|
83
|
+
* Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toChartProps(widgetModel: WidgetModel): ChartProps;
|
|
86
|
+
/**
|
|
87
|
+
* Translates a {@link WidgetModel} to the props for rendering a table.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```html
|
|
91
|
+
<csdk-table
|
|
92
|
+
*ngIf="tableProps"
|
|
93
|
+
[dataSet]="tableProps.dataSet"
|
|
94
|
+
[dataOptions]="tableProps.dataOptions"
|
|
95
|
+
[filters]="tableProps.filters"
|
|
96
|
+
[styleOptions]="tableProps.styleOptions"
|
|
97
|
+
/>
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* ```ts
|
|
101
|
+
import { Component } from '@angular/core';
|
|
102
|
+
import {
|
|
103
|
+
type TableProps
|
|
104
|
+
WidgetService,
|
|
105
|
+
widgetModelTranslator,
|
|
106
|
+
} from '@sisense/sdk-ui-angular';
|
|
107
|
+
|
|
108
|
+
@Component({
|
|
109
|
+
selector: 'app-example',
|
|
110
|
+
templateUrl: './example.component.html',
|
|
111
|
+
styleUrls: ['./example.component.scss'],
|
|
112
|
+
})
|
|
113
|
+
export class ExampleComponent {
|
|
114
|
+
tableProps: TableProps | null = null;
|
|
115
|
+
|
|
116
|
+
constructor(private widgetService: WidgetService) {}
|
|
117
|
+
|
|
118
|
+
async ngOnInit(): Promise<void> {
|
|
119
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
120
|
+
dashboardOid: 'your-dashboard-oid',
|
|
121
|
+
widgetOid: 'your-widget-oid'
|
|
122
|
+
});
|
|
123
|
+
this.tableProps = widgetModelTranslator.toTableProps(widgetModel);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* Note: this method is not supported for chart and pivot widgets.
|
|
129
|
+
* Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
|
|
130
|
+
* Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
|
|
131
|
+
*/
|
|
132
|
+
export declare function toTableProps(widgetModel: WidgetModel): TableProps;
|
|
133
|
+
/**
|
|
134
|
+
* Translates a {@link WidgetModel} to the props for rendering a pivot table.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```html
|
|
138
|
+
<csdk-pivot-table
|
|
139
|
+
*ngIf="pivotTableProps"
|
|
140
|
+
[dataSet]="pivotTableProps.dataSet"
|
|
141
|
+
[dataOptions]="pivotTableProps.dataOptions"
|
|
142
|
+
[filters]="pivotTableProps.filters"
|
|
143
|
+
[styleOptions]="pivotTableProps.styleOptions"
|
|
144
|
+
/>
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* ```ts
|
|
148
|
+
import { Component } from '@angular/core';
|
|
149
|
+
import {
|
|
150
|
+
type PivotTableProps
|
|
151
|
+
WidgetService,
|
|
152
|
+
widgetModelTranslator,
|
|
153
|
+
} from '@sisense/sdk-ui-angular';
|
|
154
|
+
|
|
155
|
+
@Component({
|
|
156
|
+
selector: 'app-example',
|
|
157
|
+
templateUrl: './example.component.html',
|
|
158
|
+
styleUrls: ['./example.component.scss'],
|
|
159
|
+
})
|
|
160
|
+
export class ExampleComponent {
|
|
161
|
+
pivotTableProps: PivotTableProps | null = null;
|
|
162
|
+
|
|
163
|
+
constructor(private widgetService: WidgetService) {}
|
|
164
|
+
|
|
165
|
+
async ngOnInit(): Promise<void> {
|
|
166
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
167
|
+
dashboardOid: 'your-dashboard-oid',
|
|
168
|
+
widgetOid: 'your-widget-oid'
|
|
169
|
+
});
|
|
170
|
+
this.pivotTableProps = widgetModelTranslator.toPivotTableProps(widgetModel);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* Note: this method is not supported for chart or table widgets.
|
|
176
|
+
* Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
|
|
177
|
+
* Use {@link toTableProps} instead for getting props for the {@link TableComponent}.
|
|
178
|
+
*/
|
|
179
|
+
export declare function toPivotTableProps(widgetModel: WidgetModel): PivotTableProps;
|
|
180
|
+
/**
|
|
181
|
+
* Translates a {@link WidgetModel} to the props for rendering a chart widget.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```html
|
|
185
|
+
<csdk-chart-widget
|
|
186
|
+
*ngIf="chartWidgetProps"
|
|
187
|
+
[chartType]="chartWidgetProps.chartType"
|
|
188
|
+
[dataSource]="chartWidgetProps.dataSource"
|
|
189
|
+
[dataOptions]="chartWidgetProps.dataOptions"
|
|
190
|
+
[filters]="chartWidgetProps.filters"
|
|
191
|
+
[highlights]="chartWidgetProps.highlights"
|
|
192
|
+
[styleOptions]="chartWidgetProps.styleOptions"
|
|
193
|
+
/>
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* ```ts
|
|
197
|
+
import { Component } from '@angular/core';
|
|
198
|
+
import {
|
|
199
|
+
type ChartWidgetProps
|
|
200
|
+
WidgetService,
|
|
201
|
+
widgetModelTranslator,
|
|
202
|
+
} from '@sisense/sdk-ui-angular';
|
|
203
|
+
|
|
204
|
+
@Component({
|
|
205
|
+
selector: 'app-example',
|
|
206
|
+
templateUrl: './example.component.html',
|
|
207
|
+
styleUrls: ['./example.component.scss'],
|
|
208
|
+
})
|
|
209
|
+
export class ExampleComponent {
|
|
210
|
+
chartWidgetProps: ChartWidgetProps | null = null;
|
|
211
|
+
|
|
212
|
+
constructor(private widgetService: WidgetService) {}
|
|
213
|
+
|
|
214
|
+
async ngOnInit(): Promise<void> {
|
|
215
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
216
|
+
dashboardOid: 'your-dashboard-oid',
|
|
217
|
+
widgetOid: 'your-widget-oid'
|
|
218
|
+
});
|
|
219
|
+
this.chartWidgetProps = widgetModelTranslator.toChartWidgetProps(widgetModel);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* Note: this method is not supported for pivot widgets.
|
|
225
|
+
*/
|
|
226
|
+
export declare function toChartWidgetProps(widgetModel: WidgetModel): ChartWidgetProps;
|
|
227
|
+
/**
|
|
228
|
+
* Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```html
|
|
232
|
+
<csdk-pivot-table-widget
|
|
233
|
+
*ngIf="pivotWidgetProps"
|
|
234
|
+
[dataSet]="pivotWidgetProps.dataSet"
|
|
235
|
+
[dataOptions]="pivotWidgetProps.dataOptions"
|
|
236
|
+
[filters]="pivotWidgetProps.filters"
|
|
237
|
+
[styleOptions]="pivotWidgetProps.styleOptions"
|
|
238
|
+
/>
|
|
239
|
+
* ```
|
|
240
|
+
*
|
|
241
|
+
* ```ts
|
|
242
|
+
import { Component } from '@angular/core';
|
|
243
|
+
import {
|
|
244
|
+
type PivotTableWidgetProps
|
|
245
|
+
WidgetService,
|
|
246
|
+
widgetModelTranslator,
|
|
247
|
+
} from '@sisense/sdk-ui-angular';
|
|
248
|
+
|
|
249
|
+
@Component({
|
|
250
|
+
selector: 'app-example',
|
|
251
|
+
templateUrl: './example.component.html',
|
|
252
|
+
styleUrls: ['./example.component.scss'],
|
|
253
|
+
})
|
|
254
|
+
export class ExampleComponent {
|
|
255
|
+
pivotWidgetProps: PivotTableWidgetProps | null = null;
|
|
256
|
+
|
|
257
|
+
constructor(private widgetService: WidgetService) {}
|
|
258
|
+
|
|
259
|
+
async ngOnInit(): Promise<void> {
|
|
260
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
261
|
+
dashboardOid: 'your-dashboard-oid',
|
|
262
|
+
widgetOid: 'your-widget-oid'
|
|
263
|
+
});
|
|
264
|
+
this.pivotWidgetProps = widgetModelTranslator.toPivotTableWidgetProps(widgetModel);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
* ```
|
|
268
|
+
*
|
|
269
|
+
* Note: this method is not supported for chart or table widgets.
|
|
270
|
+
* Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
|
|
271
|
+
*/
|
|
272
|
+
export declare function toPivotTableWidgetProps(widgetModel: WidgetModel): PivotTableWidgetProps;
|
|
273
|
+
/**
|
|
274
|
+
* Translates a {@link WidgetModel} to the props for rendering a text widget.
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* ```ts
|
|
278
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
279
|
+
dashboardOid: 'your-dashboard-oid',
|
|
280
|
+
widgetOid: 'your-widget-oid'
|
|
281
|
+
});
|
|
282
|
+
const textWidgetProps = widgetModelTranslator.toTextWidgetProps(widgetModel);
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* Note: this method is not supported for chart or pivot widgets.
|
|
286
|
+
* Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
|
|
287
|
+
* Use {@link toPivotTableWidgetProps} instead for getting props for the pivot table widget.
|
|
288
|
+
*/
|
|
289
|
+
export declare function toTextWidgetProps(widgetModel: WidgetModel): TextWidgetProps;
|
package/dist/package.json
CHANGED
package/dist/public-api.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public API Surface of @sisense/sdk-ui-angular
|
|
3
3
|
*/
|
|
4
|
-
export * from './lib/sdk-ui.module';
|
|
5
4
|
export * from './lib/components';
|
|
6
|
-
export * from './lib/
|
|
5
|
+
export * from './lib/sdk-ui.module';
|
|
7
6
|
export * from './lib/sdk-ui-core-exports';
|
|
8
|
-
export
|
|
9
|
-
export {
|
|
7
|
+
export * from './lib/services';
|
|
8
|
+
export type { AreamapDataPointEvent, AreamapDataPointEventHandler, BoxplotDataPointEvent, BoxplotDataPointEventHandler, ChartDataPointEvent, ChartDataPointsEvent, DashboardByIdConfig, DashboardConfig, DashboardFiltersPanelConfig, DataPointEvent, DataPointEventHandler, DataPointsEvent, DataPointsEventHandler, ScatterDataPointEvent, ScatterDataPointEventHandler, ScatterDataPointsEvent, ScatterDataPointsEventHandler, ScattermapDataPointEvent, ScattermapDataPointEventHandler, } from './lib/types';
|
|
9
|
+
export * from './lib/utilities';
|
|
10
|
+
export { createPluginsContextConnector, createSisenseContextConnector, createThemeContextConnector, } from './lib/component-wrapper-helpers';
|
|
10
11
|
export { TrackableService } from './lib/decorators';
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.34.0";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.34.0",
|
|
15
15
|
"author": "Sisense",
|
|
16
16
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
17
17
|
"main": "dist",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"prebuild": "yarn sync-version && node ./scripts/generate-build-package-config.cjs",
|
|
61
61
|
"postbuild": "rm ./src/package.json",
|
|
62
62
|
"watch": "ng build --watch --configuration development",
|
|
63
|
-
"lint": "eslint .",
|
|
64
|
-
"lint:fix": "
|
|
63
|
+
"lint": "eslint . --quiet",
|
|
64
|
+
"lint:fix": "run lint --fix",
|
|
65
65
|
"format": "prettier --write .",
|
|
66
66
|
"format:check": "prettier --check .",
|
|
67
67
|
"test": "TZ=utc run vitest run",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@sisense/sdk-data": "^1.
|
|
80
|
-
"@sisense/sdk-tracking": "^1.
|
|
81
|
-
"@sisense/sdk-ui-preact": "^1.
|
|
79
|
+
"@sisense/sdk-data": "^1.34.0",
|
|
80
|
+
"@sisense/sdk-tracking": "^1.34.0",
|
|
81
|
+
"@sisense/sdk-ui-preact": "^1.34.0",
|
|
82
82
|
"rxjs": "^7.8.1",
|
|
83
83
|
"ts-deepmerge": "^6.2.0",
|
|
84
84
|
"tslib": "^2.3.0"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"ng-packagr": "^15.2.2",
|
|
96
96
|
"prettier": "2.8.4",
|
|
97
97
|
"typescript": "~4.9.4",
|
|
98
|
-
"vitest": "^2.1.
|
|
98
|
+
"vitest": "^2.1.9"
|
|
99
99
|
},
|
|
100
100
|
"volta": {
|
|
101
101
|
"extends": "../../package.json"
|