@sisense/sdk-ui-angular 1.31.0 → 1.33.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.
Files changed (125) hide show
  1. package/dist/ai/lib/component-wrapper-helpers/context-connectors.d.ts +10 -0
  2. package/dist/ai/lib/component-wrapper-helpers/index.d.ts +2 -0
  3. package/dist/ai/lib/component-wrapper-helpers/template.d.ts +2 -0
  4. package/dist/ai/lib/components/chatbot.component.d.ts +132 -0
  5. package/dist/ai/lib/components/get-nlg-insights.component.d.ts +141 -0
  6. package/dist/ai/lib/components/index.d.ts +2 -0
  7. package/dist/ai/lib/sdk-ai.module.d.ts +40 -5
  8. package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -0
  9. package/dist/ai/lib/services/ai.service.d.ts +88 -0
  10. package/dist/ai/lib/services/index.d.ts +1 -0
  11. package/dist/ai/public-api.d.ts +6 -0
  12. package/dist/esm2020/ai/lib/component-wrapper-helpers/context-connectors.mjs +20 -0
  13. package/dist/esm2020/ai/lib/component-wrapper-helpers/index.mjs +3 -0
  14. package/dist/esm2020/ai/lib/component-wrapper-helpers/template.mjs +5 -0
  15. package/dist/esm2020/ai/lib/components/chatbot.component.mjs +138 -0
  16. package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +145 -0
  17. package/dist/esm2020/ai/lib/components/index.mjs +3 -0
  18. package/dist/esm2020/ai/lib/sdk-ai.module.mjs +40 -6
  19. package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +3 -0
  20. package/dist/esm2020/ai/lib/services/ai.service.mjs +137 -0
  21. package/dist/esm2020/ai/lib/services/index.mjs +2 -0
  22. package/dist/esm2020/ai/public-api.mjs +7 -1
  23. package/dist/esm2020/lib/component-wrapper-helpers/index.mjs +2 -1
  24. package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -1
  25. package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -1
  26. package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +1 -1
  27. package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +1 -1
  28. package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +1 -1
  29. package/dist/esm2020/lib/components/charts/chart.component.mjs +1 -1
  30. package/dist/esm2020/lib/components/charts/column-chart.component.mjs +1 -1
  31. package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +1 -1
  32. package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +1 -1
  33. package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -1
  34. package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -1
  35. package/dist/esm2020/lib/components/charts/pivot-table.component.mjs +1 -1
  36. package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -1
  37. package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -1
  38. package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +1 -1
  39. package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +1 -1
  40. package/dist/esm2020/lib/components/charts/table.component.mjs +1 -1
  41. package/dist/esm2020/lib/components/charts/treemap-chart.component.mjs +1 -1
  42. package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +4 -4
  43. package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +1 -1
  44. package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +1 -1
  45. package/dist/esm2020/lib/components/filters/criteria-filter-tile.component.mjs +1 -1
  46. package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +1 -1
  47. package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +1 -1
  48. package/dist/esm2020/lib/components/filters/relative-date-filter-tile.component.mjs +1 -1
  49. package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +1 -1
  50. package/dist/esm2020/lib/components/widgets/index.mjs +2 -1
  51. package/dist/esm2020/lib/components/widgets/pivot-table-widget.component.mjs +127 -0
  52. package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +1 -1
  53. package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +1 -1
  54. package/dist/esm2020/lib/decorators/index.mjs +3 -0
  55. package/dist/esm2020/lib/decorators/trackable.decorator.mjs +2 -1
  56. package/dist/esm2020/lib/sdk-ui-core-exports.mjs +2 -2
  57. package/dist/esm2020/lib/sdk-ui.module.mjs +10 -6
  58. package/dist/esm2020/lib/services/query.service.mjs +31 -5
  59. package/dist/esm2020/lib/services/sisense-context.service.mjs +3 -3
  60. package/dist/esm2020/lib/services/theme.service.mjs +3 -3
  61. package/dist/esm2020/lib/types/dashboard-config.mjs +2 -0
  62. package/dist/esm2020/lib/types/index.mjs +2 -1
  63. package/dist/esm2020/lib/utilities/dashboard-helpers.mjs +119 -0
  64. package/dist/esm2020/lib/utilities/dashboard-model-translator.mjs +49 -0
  65. package/dist/esm2020/lib/utilities/index.mjs +7 -0
  66. package/dist/esm2020/lib/utilities/widget-model-translator.mjs +304 -0
  67. package/dist/esm2020/public-api.mjs +6 -25
  68. package/dist/esm2020/version.mjs +2 -2
  69. package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +471 -8
  70. package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
  71. package/dist/fesm2015/sisense-sdk-ui-angular.mjs +671 -43
  72. package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
  73. package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +466 -8
  74. package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
  75. package/dist/fesm2020/sisense-sdk-ui-angular.mjs +668 -42
  76. package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
  77. package/dist/lib/component-wrapper-helpers/index.d.ts +1 -0
  78. package/dist/lib/components/charts/area-chart.component.d.ts +3 -0
  79. package/dist/lib/components/charts/area-range-chart.component.d.ts +3 -0
  80. package/dist/lib/components/charts/areamap-chart.component.d.ts +3 -0
  81. package/dist/lib/components/charts/bar-chart.component.d.ts +3 -0
  82. package/dist/lib/components/charts/boxplot-chart.component.d.ts +3 -0
  83. package/dist/lib/components/charts/chart.component.d.ts +3 -0
  84. package/dist/lib/components/charts/column-chart.component.d.ts +3 -0
  85. package/dist/lib/components/charts/funnel-chart.component.d.ts +3 -0
  86. package/dist/lib/components/charts/indicator-chart.component.d.ts +3 -0
  87. package/dist/lib/components/charts/line-chart.component.d.ts +3 -0
  88. package/dist/lib/components/charts/pie-chart.component.d.ts +3 -0
  89. package/dist/lib/components/charts/pivot-table.component.d.ts +3 -0
  90. package/dist/lib/components/charts/polar-chart.component.d.ts +3 -0
  91. package/dist/lib/components/charts/scatter-chart.component.d.ts +3 -0
  92. package/dist/lib/components/charts/scattermap-chart.component.d.ts +3 -0
  93. package/dist/lib/components/charts/sunburst-chart.component.d.ts +3 -0
  94. package/dist/lib/components/charts/table.component.d.ts +3 -2
  95. package/dist/lib/components/charts/treemap-chart.component.d.ts +3 -0
  96. package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +11 -5
  97. package/dist/lib/components/dashboard/dashboard.component.d.ts +8 -2
  98. package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +3 -0
  99. package/dist/lib/components/filters/criteria-filter-tile.component.d.ts +3 -0
  100. package/dist/lib/components/filters/date-range-filter-tile.component.d.ts +3 -0
  101. package/dist/lib/components/filters/member-filter-tile.component.d.ts +3 -0
  102. package/dist/lib/components/filters/relative-date-filter-tile.component.d.ts +3 -0
  103. package/dist/lib/components/widgets/chart-widget.component.d.ts +3 -0
  104. package/dist/lib/components/widgets/index.d.ts +1 -0
  105. package/dist/lib/components/widgets/pivot-table-widget.component.d.ts +127 -0
  106. package/dist/lib/components/widgets/table-widget.component.d.ts +5 -0
  107. package/dist/lib/components/widgets/widget-by-id.component.d.ts +3 -2
  108. package/dist/lib/decorators/index.d.ts +2 -0
  109. package/dist/lib/decorators/trackable.decorator.d.ts +1 -0
  110. package/dist/lib/sdk-ui-core-exports.d.ts +2 -2
  111. package/dist/lib/sdk-ui.module.d.ts +6 -5
  112. package/dist/lib/services/plugins.service.d.ts +1 -1
  113. package/dist/lib/services/query.service.d.ts +29 -3
  114. package/dist/lib/services/sisense-context.service.d.ts +2 -2
  115. package/dist/lib/services/theme.service.d.ts +2 -2
  116. package/dist/lib/types/dashboard-config.d.ts +24 -0
  117. package/dist/lib/types/index.d.ts +1 -0
  118. package/dist/lib/utilities/dashboard-helpers.d.ts +105 -0
  119. package/dist/lib/utilities/dashboard-model-translator.d.ts +47 -0
  120. package/dist/lib/utilities/index.d.ts +23 -0
  121. package/dist/lib/utilities/widget-model-translator.d.ts +289 -0
  122. package/dist/package.json +1 -1
  123. package/dist/public-api.d.ts +5 -22
  124. package/dist/version.d.ts +1 -1
  125. package/package.json +4 -4
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Injectable, Inject, NgModule, Optional, EventEmitter, Component, ViewChild, Input, Output } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
- import { createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getWidgetModel, getHierarchyModels, getDefaultThemeSettings, getThemeSettingsByOid, ComponentAdapter, createElement, MemberFilterTile, DateRangeFilterTile, RelativeDateFilterTile, CriteriaFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, WidgetById, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DashboardById, Dashboard, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
5
- export { boxWhiskerProcessResult, dashboardHelpers, dashboardModelTranslator, widgetModelTranslator } from '@sisense/sdk-ui-preact';
4
+ import { createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, createClientApplication, executeQuery, executeQueryByWidgetId, executePivotQuery, getDashboardModel, getDashboardModels, getWidgetModel, getHierarchyModels, getDefaultThemeSettings, getThemeSettingsByOid, ComponentAdapter, createElement, MemberFilterTile, DateRangeFilterTile, RelativeDateFilterTile, CriteriaFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, WidgetById, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, PivotTableWidget, DashboardById, Dashboard, DrilldownBreadcrumbs, ContextMenu, dashboardModelTranslator as dashboardModelTranslator$1, dashboardHelpers as dashboardHelpers$1, widgetModelTranslator as widgetModelTranslator$1 } from '@sisense/sdk-ui-preact';
5
+ export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
6
6
  import { __awaiter, __decorate } from 'tslib';
7
7
  import { map, BehaviorSubject } from 'rxjs';
8
8
  import merge from 'ts-deepmerge';
@@ -97,8 +97,8 @@ const templateWithContent = `
97
97
  *
98
98
  * ```ts
99
99
  * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
100
- * url="<instance url>" // replace with the URL of your Sisense instance
101
- * token="<api token>" // replace with the API token of your user account
100
+ * url: "<instance url>", // replace with the URL of your Sisense instance
101
+ * token: "<api token>", // replace with the API token of your user account
102
102
  * defaultDataSource: DM.DataSource,
103
103
  * };
104
104
  *
@@ -171,7 +171,7 @@ let QueryService = class QueryService {
171
171
  */
172
172
  executeQuery(params) {
173
173
  return __awaiter(this, void 0, void 0, function* () {
174
- const { dataSource, dimensions, measures, filters, highlights, count, offset, onBeforeQuery } = params;
174
+ const { dataSource, dimensions, measures, filters, highlights, count, offset, beforeQuery, onBeforeQuery, } = params;
175
175
  const app = yield this.sisenseContextService.getApp();
176
176
  const { filters: filterList, relations: filterRelations } = getFilterListAndRelationsJaql(filters);
177
177
  const data = yield executeQuery({
@@ -183,7 +183,7 @@ let QueryService = class QueryService {
183
183
  highlights,
184
184
  count,
185
185
  offset,
186
- }, app, { onBeforeQuery });
186
+ }, app, { onBeforeQuery: beforeQuery !== null && beforeQuery !== void 0 ? beforeQuery : onBeforeQuery });
187
187
  return { data };
188
188
  });
189
189
  }
@@ -194,16 +194,44 @@ let QueryService = class QueryService {
194
194
  * @returns Query result
195
195
  */
196
196
  executeQueryByWidgetId(params) {
197
+ var _a;
197
198
  return __awaiter(this, void 0, void 0, function* () {
198
199
  const app = yield this.sisenseContextService.getApp();
199
- return executeQueryByWidgetId(Object.assign(Object.assign({}, params), { app }));
200
+ return executeQueryByWidgetId(Object.assign(Object.assign({}, params), { app, onBeforeQuery: (_a = params.beforeQuery) !== null && _a !== void 0 ? _a : params.onBeforeQuery }));
201
+ });
202
+ }
203
+ /**
204
+ * Executes a data query for a pivot table.
205
+ *
206
+ * @param params - Pivot query parameters
207
+ * @return Pivot query result
208
+ * @beta
209
+ */
210
+ executePivotQuery(params) {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ const { dataSource, rows, columns, values, grandTotals, filters, highlights, count, offset, beforeQuery, } = params;
213
+ const { filters: filterList, relations: filterRelations } = getFilterListAndRelationsJaql(filters);
214
+ const app = yield this.sisenseContextService.getApp();
215
+ const data = yield executePivotQuery({
216
+ dataSource,
217
+ rows,
218
+ columns,
219
+ values,
220
+ grandTotals,
221
+ filters: filterList,
222
+ filterRelations,
223
+ highlights,
224
+ count,
225
+ offset,
226
+ }, app, { onBeforeQuery: beforeQuery });
227
+ return { data };
200
228
  });
201
229
  }
202
230
  };
203
231
  QueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, deps: [{ token: SisenseContextService }], target: i0.ɵɵFactoryTarget.Injectable });
204
232
  QueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, providedIn: 'root' });
205
233
  QueryService = __decorate([
206
- TrackableService(['executeQuery', 'executeQueryByWidgetId'])
234
+ TrackableService(['executeQuery', 'executeQueryByWidgetId', 'executePivotQuery'])
207
235
  ], QueryService);
208
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, decorators: [{
209
237
  type: Injectable,
@@ -401,7 +429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
401
429
  }]
402
430
  }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
403
431
 
404
- var packageVersion = '1.31.0';
432
+ var packageVersion = '1.33.0';
405
433
 
406
434
  function Trackable(target, propertyKey, descriptor) {
407
435
  const originalMethod = descriptor.value;
@@ -411,6 +439,7 @@ function Trackable(target, propertyKey, descriptor) {
411
439
  };
412
440
  return descriptor;
413
441
  }
442
+ /** @internal */
414
443
  function TrackableService(trackableMethods) {
415
444
  return function (ServiceClass) {
416
445
  trackableMethods.forEach((methodName) => {
@@ -454,8 +483,8 @@ function track(action, methodName) {
454
483
  *
455
484
  * ```ts
456
485
  * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
457
- * url="<instance url>" // replace with the URL of your Sisense instance
458
- * token="<api token>" // replace with the API token of your user account
486
+ * url: "<instance url>", // replace with the URL of your Sisense instance
487
+ * token: "<api token>", // replace with the API token of your user account
459
488
  * defaultDataSource: DM.DataSource,
460
489
  * };
461
490
  *
@@ -4050,6 +4079,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4050
4079
  type: Output
4051
4080
  }] } });
4052
4081
 
4082
+ /**
4083
+ * The Pivot Table Widget component extends the {@link PivotTableComponent} component to support widget features,
4084
+ * including a header, widget style options, and more.
4085
+ *
4086
+ * @example
4087
+ * ```html
4088
+ <csdk-pivot-table-widget
4089
+ [dataSource]="pivotProps.dataSource"
4090
+ [dataOptions]="pivotProps.dataOptions"
4091
+ [filters]="pivotProps.filters"
4092
+ [styleOptions]="pivotProps.styleOptions"
4093
+ [title]="pivotProps.title"
4094
+ [description]="pivotProps.description"
4095
+ />
4096
+ * ```
4097
+ * ```ts
4098
+ import { Component } from '@angular/core';
4099
+ import { type PivotTableWidgetProps } from '@sisense/sdk-ui-angular';
4100
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
4101
+ import * as DM from '../../assets/sample-ecommerce';
4102
+
4103
+ @Component({
4104
+ selector: 'app-analytics',
4105
+ templateUrl: './analytics.component.html',
4106
+ styleUrls: ['./analytics.component.scss'],
4107
+ })
4108
+ export class AnalyticsComponent {
4109
+
4110
+ pivotProps: PivotTableWidgetProps = {
4111
+ dataSource: DM.DataSource,
4112
+ dataOptions: {
4113
+ rows: [
4114
+ { column: DM.Category.Category, includeSubTotals: true },
4115
+ { column: DM.Commerce.AgeRange, includeSubTotals: true },
4116
+ DM.Commerce.Condition,
4117
+ ],
4118
+ columns: [{ column: DM.Commerce.Gender, includeSubTotals: true }],
4119
+ values: [
4120
+ measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
4121
+ {
4122
+ column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
4123
+ totalsCalculation: 'sum',
4124
+ dataBars: true,
4125
+ },
4126
+ ],
4127
+ grandTotals: { title: 'Grand Total', rows: true, columns: true },
4128
+ },
4129
+ filters: [filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])],
4130
+ styleOptions: { width: 1400, height: 600, rowsPerPage: 25 },
4131
+ title: 'Pivot Table Widget',
4132
+ description: 'Pivot Table Widget Description',
4133
+ };
4134
+ }
4135
+ * ```
4136
+ * <img src="media://angular-pivot-table-widget-example.png" width="800px" />
4137
+ * @group Dashboards
4138
+ * @beta
4139
+ */
4140
+ class PivotTableWidgetComponent {
4141
+ constructor(sisenseContextService, themeService) {
4142
+ this.sisenseContextService = sisenseContextService;
4143
+ this.themeService = themeService;
4144
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
4145
+ createSisenseContextConnector(this.sisenseContextService),
4146
+ createThemeContextConnector(this.themeService),
4147
+ ]);
4148
+ }
4149
+ /** @internal */
4150
+ ngAfterViewInit() {
4151
+ this.componentAdapter.render(this.preactRef.nativeElement);
4152
+ }
4153
+ /** @internal */
4154
+ ngOnChanges() {
4155
+ if (this.preactRef) {
4156
+ this.componentAdapter.render(this.preactRef.nativeElement);
4157
+ }
4158
+ }
4159
+ createPreactComponent() {
4160
+ const props = {
4161
+ dataSource: this.dataSource,
4162
+ dataOptions: this.dataOptions,
4163
+ filters: this.filters,
4164
+ highlights: this.highlights,
4165
+ styleOptions: this.styleOptions,
4166
+ title: this.title,
4167
+ description: this.description,
4168
+ };
4169
+ return createElement(PivotTableWidget, props);
4170
+ }
4171
+ /** @internal */
4172
+ ngOnDestroy() {
4173
+ this.componentAdapter.destroy();
4174
+ }
4175
+ }
4176
+ PivotTableWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
4177
+ PivotTableWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PivotTableWidgetComponent, selector: "csdk-pivot-table-widget", inputs: { dataSource: "dataSource", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", title: "title", description: "description" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
4178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableWidgetComponent, decorators: [{
4179
+ type: Component,
4180
+ args: [{
4181
+ selector: 'csdk-pivot-table-widget',
4182
+ template,
4183
+ }]
4184
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
4185
+ type: ViewChild,
4186
+ args: [rootId]
4187
+ }], dataSource: [{
4188
+ type: Input
4189
+ }], dataOptions: [{
4190
+ type: Input
4191
+ }], filters: [{
4192
+ type: Input
4193
+ }], highlights: [{
4194
+ type: Input
4195
+ }], styleOptions: [{
4196
+ type: Input
4197
+ }], title: [{
4198
+ type: Input
4199
+ }], description: [{
4200
+ type: Input
4201
+ }] } });
4202
+
4053
4203
  /**
4054
4204
  * An Angular component used for easily rendering a dashboard by its ID created in a Sisense Fusion instance.
4055
4205
  *
@@ -4129,7 +4279,7 @@ class DashboardByIdComponent {
4129
4279
  createPreactComponent() {
4130
4280
  const props = {
4131
4281
  dashboardOid: this.dashboardOid,
4132
- persist: this.persist,
4282
+ config: this.config,
4133
4283
  };
4134
4284
  return createElement(DashboardById, props);
4135
4285
  }
@@ -4141,7 +4291,7 @@ class DashboardByIdComponent {
4141
4291
  }
4142
4292
  }
4143
4293
  DashboardByIdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }, { token: PluginsService }], target: i0.ɵɵFactoryTarget.Component });
4144
- DashboardByIdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardByIdComponent, selector: "csdk-dashboard-by-id", inputs: { dashboardOid: "dashboardOid", persist: "persist" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
4294
+ DashboardByIdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardByIdComponent, selector: "csdk-dashboard-by-id", inputs: { dashboardOid: "dashboardOid", config: "config" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
4145
4295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, decorators: [{
4146
4296
  type: Component,
4147
4297
  args: [{
@@ -4153,7 +4303,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4153
4303
  args: [rootId]
4154
4304
  }], dashboardOid: [{
4155
4305
  type: Input
4156
- }], persist: [{
4306
+ }], config: [{
4157
4307
  type: Input
4158
4308
  }] } });
4159
4309
 
@@ -4484,8 +4634,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4484
4634
  *
4485
4635
  * ```ts
4486
4636
  * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
4487
- * url="<instance url>" // replace with the URL of your Sisense instance
4488
- * token="<api token>" // replace with the API token of your user account
4637
+ * url: "<instance url>", // replace with the URL of your Sisense instance
4638
+ * token: "<api token>", // replace with the API token of your user account
4489
4639
  * defaultDataSource: DM.DataSource,
4490
4640
  * };
4491
4641
  *
@@ -4537,7 +4687,8 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
4537
4687
  AreamapChartComponent,
4538
4688
  PivotTableComponent,
4539
4689
  DashboardByIdComponent,
4540
- DashboardComponent], imports: [CommonModule, DecoratorsModule], exports: [ChartComponent,
4690
+ DashboardComponent,
4691
+ PivotTableWidgetComponent], imports: [CommonModule, DecoratorsModule], exports: [ChartComponent,
4541
4692
  TableComponent,
4542
4693
  ChartWidgetComponent,
4543
4694
  ColumnChartComponent,
@@ -4567,7 +4718,8 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
4567
4718
  AreamapChartComponent,
4568
4719
  PivotTableComponent,
4569
4720
  DashboardByIdComponent,
4570
- DashboardComponent] });
4721
+ DashboardComponent,
4722
+ PivotTableWidgetComponent] });
4571
4723
  SdkUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, imports: [CommonModule, DecoratorsModule] });
4572
4724
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, decorators: [{
4573
4725
  type: NgModule,
@@ -4604,6 +4756,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4604
4756
  PivotTableComponent,
4605
4757
  DashboardByIdComponent,
4606
4758
  DashboardComponent,
4759
+ PivotTableWidgetComponent,
4607
4760
  ],
4608
4761
  imports: [CommonModule, DecoratorsModule],
4609
4762
  exports: [
@@ -4638,44 +4791,519 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4638
4791
  PivotTableComponent,
4639
4792
  DashboardByIdComponent,
4640
4793
  DashboardComponent,
4794
+ PivotTableWidgetComponent,
4641
4795
  ],
4642
4796
  providers: [],
4643
4797
  }]
4644
4798
  }] });
4645
4799
 
4800
+ /**
4801
+ * Translates {@link DashboardModel} to {@link DashboardProps}.
4802
+ *
4803
+ * @example
4804
+ * ```html
4805
+ <csdk-dashboard
4806
+ *ngIf="dashboard"
4807
+ [title]="dashboard.title"
4808
+ [layoutOptions]="dashboard.layoutOptions"
4809
+ [widgets]="dashboard.widgets"
4810
+ [filters]="dashboard.filters"
4811
+ [defaultDataSource]="dashboard.defaultDataSource"
4812
+ [widgetsOptions]="dashboard.widgetsOptions"
4813
+ />
4814
+ * ```
4815
+ *
4816
+ * ```ts
4817
+ import { Component } from '@angular/core';
4818
+ import {
4819
+ type DashboardProps,
4820
+ DashboardService,
4821
+ dashboardModelTranslator,
4822
+ } from '@sisense/sdk-ui-angular';
4823
+
4824
+ @Component({
4825
+ selector: 'app-dashboard',
4826
+ templateUrl: './dashboard.component.html',
4827
+ styleUrls: ['./dashboard.component.scss'],
4828
+ })
4829
+ export class DashboardComponent {
4830
+ dashboard: DashboardProps | null = null;
4831
+
4832
+ constructor(private dashboardService: DashboardService) {}
4833
+
4834
+ async ngOnInit(): Promise<void> {
4835
+ const dashboardModel = await this.dashboardService.getDashboardModel('your-dashboard-oid', {
4836
+ includeWidgets: true,
4837
+ includeFilters: true,
4838
+ });
4839
+ this.dashboard = dashboardModelTranslator.toDashboardProps(dashboardModel);
4840
+ }
4841
+ }
4842
+ * ```
4843
+ */
4844
+ function toDashboardProps(dashboardModel) {
4845
+ return dashboardModelTranslator$1.toDashboardProps(dashboardModel);
4846
+ }
4847
+
4848
+ var dashboardModelTranslator = /*#__PURE__*/Object.freeze({
4849
+ __proto__: null,
4850
+ toDashboardProps: toDashboardProps
4851
+ });
4852
+
4853
+ /**
4854
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilters}
4855
+ *
4856
+ * @example
4857
+ * Replace all filters on a dashboard with a new set of filters.
4858
+ * ```ts
4859
+ * const existingDashboard: DashboardProps = {...}
4860
+ * const newFilters: Filter[] = [{...}, {...}, ...];
4861
+ * const updatedDashboard = dashboardHelpers.replaceFilters(existingDashboard, newFilters);
4862
+ * ```
4863
+ * @param dashboard - The original dashboard (`DashboardProps`) whose filters are to be replaced.
4864
+ * @param newFilters - An array of new filters or filter relations to set on the dashboard.
4865
+ * @returns A new dashboard instance with the updated filters.
4866
+ */
4867
+ const replaceFilters = (dashboard, newFilters) => {
4868
+ return dashboardHelpers$1.replaceFilters(dashboard, newFilters);
4869
+ };
4870
+ /**
4871
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilter}
4872
+ *
4873
+ * @example
4874
+ * Add a new filter to a dashboard.
4875
+ * ```ts
4876
+ * const existingDashboard: DashboardProps = {...};
4877
+ * const newFilter: Filter = {...};
4878
+ * const updatedDashboard = dashboardHelpers.addFilter(existingDashboard, newFilter);
4879
+ * ```
4880
+ * @param dashboard - The original dashboard (`DashboardProps`) to which the filter will be added.
4881
+ * @param newFilter - The filter to add to the dashboard.
4882
+ * @returns A new dashboard instance with the new filter added.
4883
+ */
4884
+ const addFilter = (dashboard, newFilter) => {
4885
+ return dashboardHelpers$1.addFilter(dashboard, newFilter);
4886
+ };
4887
+ /**
4888
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilters}
4889
+ *
4890
+ * @example
4891
+ * Add multiple new filters to a dashboard.
4892
+ * ```ts
4893
+ * const existingDashboard: DashboardProps = {...};
4894
+ * const newFilters: Filter[] = [{...}, {...}, ...];
4895
+ * const updatedDashboard = dashboardHelpers.addFilters(existingDashboard, newFilters);
4896
+ * ```
4897
+ * @param dashboard - The original dashboard (`DashboardProps`) to which the filters will be added.
4898
+ * @param newFilters - An array of filters to add to the dashboard.
4899
+ * @returns A new dashboard instance with the new filters added.
4900
+ */
4901
+ const addFilters = (dashboard, newFilters) => {
4902
+ return dashboardHelpers$1.addFilters(dashboard, newFilters);
4903
+ };
4904
+ /**
4905
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilter}
4906
+ *
4907
+ * @example
4908
+ * Replace a filter in a dashboard.
4909
+ * ```ts
4910
+ * const existingDashboard: DashboardProps = {...};
4911
+ * const filterToReplace: Filter = {...};
4912
+ * const newFilter: Filter = {...};
4913
+ * const updatedDashboard = dashboardHelpers.replaceFilter(existingDashboard, filterToReplace, newFilter);
4914
+ * ```
4915
+ * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to be replaced.
4916
+ * @param filterToReplace - The existing filter to be replaced.
4917
+ * @param newFilter - The new filter to replace the existing one.
4918
+ * @returns A new dashboard instance with the specified filter replaced.
4919
+ */
4920
+ const replaceFilter = (dashboard, filterToReplace, newFilter) => {
4921
+ return dashboardHelpers$1.replaceFilter(dashboard, filterToReplace, newFilter);
4922
+ };
4923
+ /**
4924
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.modifyFilter}
4925
+ *
4926
+ * @deprecated Use {@link replaceFilter} instead
4927
+ *
4928
+ * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
4929
+ * @param filterToModify - The existing filter to be modified.
4930
+ * @param newFilter - The new filter to replace the existing one.
4931
+ * @returns A new dashboard instance with the specified filter modified.
4932
+ */
4933
+ const modifyFilter = (dashboard, filterToModify, newFilter) => {
4934
+ return dashboardHelpers$1.modifyFilter(dashboard, filterToModify, newFilter);
4935
+ };
4936
+ /**
4937
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilter}
4938
+ *
4939
+ * @example
4940
+ * Remove a filter from a dashboard.
4941
+ * ```ts
4942
+ * const existingDashboard: DashboardProps = {...};
4943
+ * const filterToRemove: Filter = {...};
4944
+ * const updatedDashboard = dashboardHelpers.removeFilter(existingDashboard, filterToRemove);
4945
+ * ```
4946
+ * @param dashboard - The original dashboard (`DashboardProps`) from which to remove the filter.
4947
+ * @param filterToRemove - The filter to be removed.
4948
+ * @returns A new dashboard instance with the specified filter removed.
4949
+ */
4950
+ const removeFilter = (dashboard, filterToRemove) => {
4951
+ return dashboardHelpers$1.removeFilter(dashboard, filterToRemove);
4952
+ };
4953
+ /**
4954
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilters}
4955
+ *
4956
+ * @example
4957
+ * Remove multiple filters from a dashboard.
4958
+ * ```ts
4959
+ * const existingDashboard: DashboardProps = {...};
4960
+ * const filtersToRemove: Filter[] = [{...}, {...}, ...];
4961
+ * const updatedDashboard = dashboardHelpers.removeFilters(existingDashboard, filtersToRemove);
4962
+ * ```
4963
+ * @param dashboard - The original dashboard (`DashboardProps`) from which the specified filters are removed.
4964
+ * @param filtersToRemove - An array of filters to remove.
4965
+ * @returns A new dashboard instance with the specified filters removed.
4966
+ */
4967
+ const removeFilters = (dashboard, filtersToRemove) => {
4968
+ return dashboardHelpers$1.removeFilters(dashboard, filtersToRemove);
4969
+ };
4970
+
4971
+ var dashboardHelpers = /*#__PURE__*/Object.freeze({
4972
+ __proto__: null,
4973
+ addFilter: addFilter,
4974
+ addFilters: addFilters,
4975
+ modifyFilter: modifyFilter,
4976
+ removeFilter: removeFilter,
4977
+ removeFilters: removeFilters,
4978
+ replaceFilter: replaceFilter,
4979
+ replaceFilters: replaceFilters
4980
+ });
4981
+
4982
+ /**
4983
+ * Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
4984
+ *
4985
+ * @example
4986
+ * ```ts
4987
+ const widgetModel = await widgetService.getWidgetModel({
4988
+ dashboardOid: 'your-dashboard-oid',
4989
+ widgetOid: 'your-widget-oid'
4990
+ });
4991
+ const executeQueryParams = widgetModelTranslator.toExecuteQueryParams(widgetModel);
4992
+ const queryResult = await queryService.executeQuery(executeQueryParams);
4993
+ * ```
4994
+ *
4995
+ * Note: this method is not supported for getting pivot query.
4996
+ * Use {@link toExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
4997
+ */
4998
+ const toExecuteQueryParams = (widgetModel) => {
4999
+ return widgetModelTranslator$1.toExecuteQueryParams(widgetModel);
5000
+ };
5001
+ /**
5002
+ * Translates a {@link WidgetModel} to the parameters for executing a query for the pivot widget.
5003
+ *
5004
+ * @example
5005
+ * ```ts
5006
+ const widgetModel = await widgetService.getWidgetModel({
5007
+ dashboardOid: 'your-dashboard-oid',
5008
+ widgetOid: 'your-widget-oid'
5009
+ });
5010
+ const executePivotQueryParams = widgetModelTranslator.toExecutePivotQueryParams(widgetModel);
5011
+ const queryResult = await queryService.executePivotQuery(executeQueryParams);
5012
+ * ```
5013
+ *
5014
+ * Note: this method is supported only for getting pivot query.
5015
+ * Use {@link toExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
5016
+ */
5017
+ const toExecutePivotQueryParams = (widgetModel) => {
5018
+ return widgetModelTranslator$1.toExecutePivotQueryParams(widgetModel);
5019
+ };
5020
+ /**
5021
+ * Translates a {@link WidgetModel} to the props for rendering a chart.
5022
+ *
5023
+ * @example
5024
+ * ```html
5025
+ <csdk-chart
5026
+ *ngIf="chartProps"
5027
+ [chartType]="chartProps.chartType"
5028
+ [dataSet]="chartProps.dataSet"
5029
+ [dataOptions]="chartProps.dataOptions"
5030
+ [filters]="chartProps.filters"
5031
+ [highlights]="chartProps.highlights"
5032
+ [styleOptions]="chartProps.styleOptions"
5033
+ />
5034
+ * ```
5035
+ *
5036
+ * ```ts
5037
+ import { Component } from '@angular/core';
5038
+ import {
5039
+ type ChartProps
5040
+ WidgetService,
5041
+ widgetModelTranslator,
5042
+ } from '@sisense/sdk-ui-angular';
5043
+
5044
+ @Component({
5045
+ selector: 'app-example',
5046
+ templateUrl: './example.component.html',
5047
+ styleUrls: ['./example.component.scss'],
5048
+ })
5049
+ export class ExampleComponent {
5050
+ chartProps: ChartProps | null = null;
5051
+
5052
+ constructor(private widgetService: WidgetService) {}
5053
+
5054
+ async ngOnInit(): Promise<void> {
5055
+ const widgetModel = await widgetService.getWidgetModel({
5056
+ dashboardOid: 'your-dashboard-oid',
5057
+ widgetOid: 'your-widget-oid'
5058
+ });
5059
+ this.chartProps = widgetModelTranslator.toChartProps(widgetModel);
5060
+ }
5061
+ }
5062
+ * ```
5063
+ *
5064
+ * Note: this method is not supported for pivot widgets.
5065
+ * Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
5066
+ */
5067
+ function toChartProps(widgetModel) {
5068
+ return widgetModelTranslator$1.toChartProps(widgetModel);
5069
+ }
5070
+ /**
5071
+ * Translates a {@link WidgetModel} to the props for rendering a table.
5072
+ *
5073
+ * @example
5074
+ * ```html
5075
+ <csdk-table
5076
+ *ngIf="tableProps"
5077
+ [dataSet]="tableProps.dataSet"
5078
+ [dataOptions]="tableProps.dataOptions"
5079
+ [filters]="tableProps.filters"
5080
+ [styleOptions]="tableProps.styleOptions"
5081
+ />
5082
+ * ```
5083
+ *
5084
+ * ```ts
5085
+ import { Component } from '@angular/core';
5086
+ import {
5087
+ type TableProps
5088
+ WidgetService,
5089
+ widgetModelTranslator,
5090
+ } from '@sisense/sdk-ui-angular';
5091
+
5092
+ @Component({
5093
+ selector: 'app-example',
5094
+ templateUrl: './example.component.html',
5095
+ styleUrls: ['./example.component.scss'],
5096
+ })
5097
+ export class ExampleComponent {
5098
+ tableProps: TableProps | null = null;
5099
+
5100
+ constructor(private widgetService: WidgetService) {}
5101
+
5102
+ async ngOnInit(): Promise<void> {
5103
+ const widgetModel = await widgetService.getWidgetModel({
5104
+ dashboardOid: 'your-dashboard-oid',
5105
+ widgetOid: 'your-widget-oid'
5106
+ });
5107
+ this.tableProps = widgetModelTranslator.toTableProps(widgetModel);
5108
+ }
5109
+ }
5110
+ * ```
5111
+ *
5112
+ * Note: this method is not supported for chart and pivot widgets.
5113
+ * Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
5114
+ * Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
5115
+ */
5116
+ function toTableProps(widgetModel) {
5117
+ return widgetModelTranslator$1.toTableProps(widgetModel);
5118
+ }
5119
+ /**
5120
+ * Translates a {@link WidgetModel} to the props for rendering a pivot table.
5121
+ *
5122
+ * @example
5123
+ * ```html
5124
+ <csdk-pivot-table
5125
+ *ngIf="pivotTableProps"
5126
+ [dataSet]="pivotTableProps.dataSet"
5127
+ [dataOptions]="pivotTableProps.dataOptions"
5128
+ [filters]="pivotTableProps.filters"
5129
+ [styleOptions]="pivotTableProps.styleOptions"
5130
+ />
5131
+ * ```
5132
+ *
5133
+ * ```ts
5134
+ import { Component } from '@angular/core';
5135
+ import {
5136
+ type PivotTableProps
5137
+ WidgetService,
5138
+ widgetModelTranslator,
5139
+ } from '@sisense/sdk-ui-angular';
5140
+
5141
+ @Component({
5142
+ selector: 'app-example',
5143
+ templateUrl: './example.component.html',
5144
+ styleUrls: ['./example.component.scss'],
5145
+ })
5146
+ export class ExampleComponent {
5147
+ pivotTableProps: PivotTableProps | null = null;
5148
+
5149
+ constructor(private widgetService: WidgetService) {}
5150
+
5151
+ async ngOnInit(): Promise<void> {
5152
+ const widgetModel = await widgetService.getWidgetModel({
5153
+ dashboardOid: 'your-dashboard-oid',
5154
+ widgetOid: 'your-widget-oid'
5155
+ });
5156
+ this.pivotTableProps = widgetModelTranslator.toPivotTableProps(widgetModel);
5157
+ }
5158
+ }
5159
+ * ```
5160
+ *
5161
+ * Note: this method is not supported for chart or table widgets.
5162
+ * Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
5163
+ * Use {@link toTableProps} instead for getting props for the {@link TableComponent}.
5164
+ */
5165
+ function toPivotTableProps(widgetModel) {
5166
+ return widgetModelTranslator$1.toPivotTableProps(widgetModel);
5167
+ }
5168
+ /**
5169
+ * Translates a {@link WidgetModel} to the props for rendering a chart widget.
5170
+ *
5171
+ * @example
5172
+ * ```html
5173
+ <csdk-chart-widget
5174
+ *ngIf="chartWidgetProps"
5175
+ [chartType]="chartWidgetProps.chartType"
5176
+ [dataSource]="chartWidgetProps.dataSource"
5177
+ [dataOptions]="chartWidgetProps.dataOptions"
5178
+ [filters]="chartWidgetProps.filters"
5179
+ [highlights]="chartWidgetProps.highlights"
5180
+ [styleOptions]="chartWidgetProps.styleOptions"
5181
+ />
5182
+ * ```
5183
+ *
5184
+ * ```ts
5185
+ import { Component } from '@angular/core';
5186
+ import {
5187
+ type ChartWidgetProps
5188
+ WidgetService,
5189
+ widgetModelTranslator,
5190
+ } from '@sisense/sdk-ui-angular';
5191
+
5192
+ @Component({
5193
+ selector: 'app-example',
5194
+ templateUrl: './example.component.html',
5195
+ styleUrls: ['./example.component.scss'],
5196
+ })
5197
+ export class ExampleComponent {
5198
+ chartWidgetProps: ChartWidgetProps | null = null;
5199
+
5200
+ constructor(private widgetService: WidgetService) {}
5201
+
5202
+ async ngOnInit(): Promise<void> {
5203
+ const widgetModel = await widgetService.getWidgetModel({
5204
+ dashboardOid: 'your-dashboard-oid',
5205
+ widgetOid: 'your-widget-oid'
5206
+ });
5207
+ this.chartWidgetProps = widgetModelTranslator.toChartWidgetProps(widgetModel);
5208
+ }
5209
+ }
5210
+ * ```
5211
+ *
5212
+ * Note: this method is not supported for pivot widgets.
5213
+ */
5214
+ function toChartWidgetProps(widgetModel) {
5215
+ return widgetModelTranslator$1.toChartWidgetProps(widgetModel);
5216
+ }
5217
+ /**
5218
+ * Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
5219
+ *
5220
+ * @example
5221
+ * ```html
5222
+ <csdk-pivot-table-widget
5223
+ *ngIf="pivotWidgetProps"
5224
+ [dataSet]="pivotWidgetProps.dataSet"
5225
+ [dataOptions]="pivotWidgetProps.dataOptions"
5226
+ [filters]="pivotWidgetProps.filters"
5227
+ [styleOptions]="pivotWidgetProps.styleOptions"
5228
+ />
5229
+ * ```
5230
+ *
5231
+ * ```ts
5232
+ import { Component } from '@angular/core';
5233
+ import {
5234
+ type PivotTableWidgetProps
5235
+ WidgetService,
5236
+ widgetModelTranslator,
5237
+ } from '@sisense/sdk-ui-angular';
5238
+
5239
+ @Component({
5240
+ selector: 'app-example',
5241
+ templateUrl: './example.component.html',
5242
+ styleUrls: ['./example.component.scss'],
5243
+ })
5244
+ export class ExampleComponent {
5245
+ pivotWidgetProps: PivotTableWidgetProps | null = null;
5246
+
5247
+ constructor(private widgetService: WidgetService) {}
5248
+
5249
+ async ngOnInit(): Promise<void> {
5250
+ const widgetModel = await widgetService.getWidgetModel({
5251
+ dashboardOid: 'your-dashboard-oid',
5252
+ widgetOid: 'your-widget-oid'
5253
+ });
5254
+ this.pivotWidgetProps = widgetModelTranslator.toPivotTableWidgetProps(widgetModel);
5255
+ }
5256
+ }
5257
+ * ```
5258
+ *
5259
+ * Note: this method is not supported for chart or table widgets.
5260
+ * Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
5261
+ */
5262
+ function toPivotTableWidgetProps(widgetModel) {
5263
+ return widgetModelTranslator$1.toPivotTableWidgetProps(widgetModel);
5264
+ }
5265
+ /**
5266
+ * Translates a {@link WidgetModel} to the props for rendering a text widget.
5267
+ *
5268
+ * @example
5269
+ * ```ts
5270
+ const widgetModel = await widgetService.getWidgetModel({
5271
+ dashboardOid: 'your-dashboard-oid',
5272
+ widgetOid: 'your-widget-oid'
5273
+ });
5274
+ const textWidgetProps = widgetModelTranslator.toTextWidgetProps(widgetModel);
5275
+ * ```
5276
+ *
5277
+ * Note: this method is not supported for chart or pivot widgets.
5278
+ * Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
5279
+ * Use {@link toPivotTableWidgetProps} instead for getting props for the pivot table widget.
5280
+ */
5281
+ function toTextWidgetProps(widgetModel) {
5282
+ return widgetModelTranslator$1.toTextWidgetProps(widgetModel);
5283
+ }
5284
+
5285
+ var widgetModelTranslator = /*#__PURE__*/Object.freeze({
5286
+ __proto__: null,
5287
+ toChartProps: toChartProps,
5288
+ toChartWidgetProps: toChartWidgetProps,
5289
+ toExecutePivotQueryParams: toExecutePivotQueryParams,
5290
+ toExecuteQueryParams: toExecuteQueryParams,
5291
+ toPivotTableProps: toPivotTableProps,
5292
+ toPivotTableWidgetProps: toPivotTableWidgetProps,
5293
+ toTableProps: toTableProps,
5294
+ toTextWidgetProps: toTextWidgetProps
5295
+ });
5296
+
4646
5297
  // This file re-exports common types/utils from @sisense/sdk-ui-preact
4647
5298
  // Re-exports utils from @sisense/sdk-ui-preact
4648
5299
 
4649
- /*
4650
- * Public API Surface of @sisense/sdk-ui-angular
4651
- */
4652
5300
  /**
4653
- * @packageDocumentation
4654
- * @groupDescription Charts
4655
- * Angular components and utilities for working with charts
4656
- * @groupDescription Data Grids
4657
- * Angular components for data grids
4658
- * @groupDescription Drilldown
4659
- * Angular components for creating drilldown experiences
4660
- * @groupDescription Filter Tiles
4661
- * Angular filter tile components
4662
- * @groupDescription Contexts
4663
- * Angular context modules, services, and variables
4664
- * @groupDescription Queries
4665
- * Angular query service
4666
- * @groupDescription Dashboards
4667
- * Angular components and utilities for working with dashboards
4668
- * @groupDescription Fusion Assets
4669
- * Angular modules, services, and components for working with Fusion dashboards, widgets, queries, and formulas
4670
- * @groupDescription Interfaces
4671
- * TypeScript interfaces for components and services listed above
4672
- * @groupDescription Type Aliases
4673
- * TypeScript type aliases for components and services listed above
5301
+ * Public API Surface of @sisense/sdk-ui-angular
4674
5302
  */
4675
5303
 
4676
5304
  /**
4677
5305
  * Generated bundle index. Do not edit.
4678
5306
  */
4679
5307
 
4680
- export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, CriteriaFilterTileComponent, DashboardByIdComponent, DashboardComponent, DashboardService, DashboardWidgetComponent, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FunnelChartComponent, HierarchyService, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PluginsService, PolarChartComponent, QueryService, RelativeDateFilterTileComponent, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TreemapChartComponent, WidgetByIdComponent, WidgetService };
5308
+ export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, CriteriaFilterTileComponent, DashboardByIdComponent, DashboardComponent, DashboardService, DashboardWidgetComponent, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FunnelChartComponent, HierarchyService, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PivotTableWidgetComponent, PluginsService, PolarChartComponent, QueryService, RelativeDateFilterTileComponent, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TrackableService, TreemapChartComponent, WidgetByIdComponent, WidgetService, createPluginsContextConnector, createSisenseContextConnector, createThemeContextConnector, dashboardHelpers, dashboardModelTranslator, widgetModelTranslator };
4681
5309
  //# sourceMappingURL=sisense-sdk-ui-angular.mjs.map