@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 { map, BehaviorSubject } from 'rxjs';
7
7
  import { __decorate } from 'tslib';
8
8
  import merge from 'ts-deepmerge';
@@ -94,8 +94,8 @@ const templateWithContent = `
94
94
  *
95
95
  * ```ts
96
96
  * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
97
- * url="<instance url>" // replace with the URL of your Sisense instance
98
- * token="<api token>" // replace with the API token of your user account
97
+ * url: "<instance url>", // replace with the URL of your Sisense instance
98
+ * token: "<api token>", // replace with the API token of your user account
99
99
  * defaultDataSource: DM.DataSource,
100
100
  * };
101
101
  *
@@ -168,7 +168,7 @@ let QueryService = class QueryService {
168
168
  * @return Query result
169
169
  */
170
170
  async executeQuery(params) {
171
- const { dataSource, dimensions, measures, filters, highlights, count, offset, onBeforeQuery } = params;
171
+ const { dataSource, dimensions, measures, filters, highlights, count, offset, beforeQuery, onBeforeQuery, } = params;
172
172
  const app = await this.sisenseContextService.getApp();
173
173
  const { filters: filterList, relations: filterRelations } = getFilterListAndRelationsJaql(filters);
174
174
  const data = await executeQuery({
@@ -180,7 +180,7 @@ let QueryService = class QueryService {
180
180
  highlights,
181
181
  count,
182
182
  offset,
183
- }, app, { onBeforeQuery });
183
+ }, app, { onBeforeQuery: beforeQuery ?? onBeforeQuery });
184
184
  return { data };
185
185
  }
186
186
  /**
@@ -194,13 +194,39 @@ let QueryService = class QueryService {
194
194
  return executeQueryByWidgetId({
195
195
  ...params,
196
196
  app,
197
+ onBeforeQuery: params.beforeQuery ?? params.onBeforeQuery,
197
198
  });
198
199
  }
200
+ /**
201
+ * Executes a data query for a pivot table.
202
+ *
203
+ * @param params - Pivot query parameters
204
+ * @return Pivot query result
205
+ * @beta
206
+ */
207
+ async executePivotQuery(params) {
208
+ const { dataSource, rows, columns, values, grandTotals, filters, highlights, count, offset, beforeQuery, } = params;
209
+ const { filters: filterList, relations: filterRelations } = getFilterListAndRelationsJaql(filters);
210
+ const app = await this.sisenseContextService.getApp();
211
+ const data = await executePivotQuery({
212
+ dataSource,
213
+ rows,
214
+ columns,
215
+ values,
216
+ grandTotals,
217
+ filters: filterList,
218
+ filterRelations,
219
+ highlights,
220
+ count,
221
+ offset,
222
+ }, app, { onBeforeQuery: beforeQuery });
223
+ return { data };
224
+ }
199
225
  };
200
226
  QueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, deps: [{ token: SisenseContextService }], target: i0.ɵɵFactoryTarget.Injectable });
201
227
  QueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, providedIn: 'root' });
202
228
  QueryService = __decorate([
203
- TrackableService(['executeQuery', 'executeQueryByWidgetId'])
229
+ TrackableService(['executeQuery', 'executeQueryByWidgetId', 'executePivotQuery'])
204
230
  ], QueryService);
205
231
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, decorators: [{
206
232
  type: Injectable,
@@ -390,7 +416,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
390
416
  }]
391
417
  }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
392
418
 
393
- var packageVersion = '1.31.0';
419
+ var packageVersion = '1.33.0';
394
420
 
395
421
  function Trackable(target, propertyKey, descriptor) {
396
422
  const originalMethod = descriptor.value;
@@ -400,6 +426,7 @@ function Trackable(target, propertyKey, descriptor) {
400
426
  };
401
427
  return descriptor;
402
428
  }
429
+ /** @internal */
403
430
  function TrackableService(trackableMethods) {
404
431
  return function (ServiceClass) {
405
432
  trackableMethods.forEach((methodName) => {
@@ -440,8 +467,8 @@ async function track(action, methodName) {
440
467
  *
441
468
  * ```ts
442
469
  * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
443
- * url="<instance url>" // replace with the URL of your Sisense instance
444
- * token="<api token>" // replace with the API token of your user account
470
+ * url: "<instance url>", // replace with the URL of your Sisense instance
471
+ * token: "<api token>", // replace with the API token of your user account
445
472
  * defaultDataSource: DM.DataSource,
446
473
  * };
447
474
  *
@@ -4031,6 +4058,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4031
4058
  type: Output
4032
4059
  }] } });
4033
4060
 
4061
+ /**
4062
+ * The Pivot Table Widget component extends the {@link PivotTableComponent} component to support widget features,
4063
+ * including a header, widget style options, and more.
4064
+ *
4065
+ * @example
4066
+ * ```html
4067
+ <csdk-pivot-table-widget
4068
+ [dataSource]="pivotProps.dataSource"
4069
+ [dataOptions]="pivotProps.dataOptions"
4070
+ [filters]="pivotProps.filters"
4071
+ [styleOptions]="pivotProps.styleOptions"
4072
+ [title]="pivotProps.title"
4073
+ [description]="pivotProps.description"
4074
+ />
4075
+ * ```
4076
+ * ```ts
4077
+ import { Component } from '@angular/core';
4078
+ import { type PivotTableWidgetProps } from '@sisense/sdk-ui-angular';
4079
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
4080
+ import * as DM from '../../assets/sample-ecommerce';
4081
+
4082
+ @Component({
4083
+ selector: 'app-analytics',
4084
+ templateUrl: './analytics.component.html',
4085
+ styleUrls: ['./analytics.component.scss'],
4086
+ })
4087
+ export class AnalyticsComponent {
4088
+
4089
+ pivotProps: PivotTableWidgetProps = {
4090
+ dataSource: DM.DataSource,
4091
+ dataOptions: {
4092
+ rows: [
4093
+ { column: DM.Category.Category, includeSubTotals: true },
4094
+ { column: DM.Commerce.AgeRange, includeSubTotals: true },
4095
+ DM.Commerce.Condition,
4096
+ ],
4097
+ columns: [{ column: DM.Commerce.Gender, includeSubTotals: true }],
4098
+ values: [
4099
+ measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
4100
+ {
4101
+ column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
4102
+ totalsCalculation: 'sum',
4103
+ dataBars: true,
4104
+ },
4105
+ ],
4106
+ grandTotals: { title: 'Grand Total', rows: true, columns: true },
4107
+ },
4108
+ filters: [filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])],
4109
+ styleOptions: { width: 1400, height: 600, rowsPerPage: 25 },
4110
+ title: 'Pivot Table Widget',
4111
+ description: 'Pivot Table Widget Description',
4112
+ };
4113
+ }
4114
+ * ```
4115
+ * <img src="media://angular-pivot-table-widget-example.png" width="800px" />
4116
+ * @group Dashboards
4117
+ * @beta
4118
+ */
4119
+ class PivotTableWidgetComponent {
4120
+ constructor(sisenseContextService, themeService) {
4121
+ this.sisenseContextService = sisenseContextService;
4122
+ this.themeService = themeService;
4123
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
4124
+ createSisenseContextConnector(this.sisenseContextService),
4125
+ createThemeContextConnector(this.themeService),
4126
+ ]);
4127
+ }
4128
+ /** @internal */
4129
+ ngAfterViewInit() {
4130
+ this.componentAdapter.render(this.preactRef.nativeElement);
4131
+ }
4132
+ /** @internal */
4133
+ ngOnChanges() {
4134
+ if (this.preactRef) {
4135
+ this.componentAdapter.render(this.preactRef.nativeElement);
4136
+ }
4137
+ }
4138
+ createPreactComponent() {
4139
+ const props = {
4140
+ dataSource: this.dataSource,
4141
+ dataOptions: this.dataOptions,
4142
+ filters: this.filters,
4143
+ highlights: this.highlights,
4144
+ styleOptions: this.styleOptions,
4145
+ title: this.title,
4146
+ description: this.description,
4147
+ };
4148
+ return createElement(PivotTableWidget, props);
4149
+ }
4150
+ /** @internal */
4151
+ ngOnDestroy() {
4152
+ this.componentAdapter.destroy();
4153
+ }
4154
+ }
4155
+ 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 });
4156
+ 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 });
4157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableWidgetComponent, decorators: [{
4158
+ type: Component,
4159
+ args: [{
4160
+ selector: 'csdk-pivot-table-widget',
4161
+ template,
4162
+ }]
4163
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
4164
+ type: ViewChild,
4165
+ args: [rootId]
4166
+ }], dataSource: [{
4167
+ type: Input
4168
+ }], dataOptions: [{
4169
+ type: Input
4170
+ }], filters: [{
4171
+ type: Input
4172
+ }], highlights: [{
4173
+ type: Input
4174
+ }], styleOptions: [{
4175
+ type: Input
4176
+ }], title: [{
4177
+ type: Input
4178
+ }], description: [{
4179
+ type: Input
4180
+ }] } });
4181
+
4034
4182
  /**
4035
4183
  * An Angular component used for easily rendering a dashboard by its ID created in a Sisense Fusion instance.
4036
4184
  *
@@ -4110,7 +4258,7 @@ class DashboardByIdComponent {
4110
4258
  createPreactComponent() {
4111
4259
  const props = {
4112
4260
  dashboardOid: this.dashboardOid,
4113
- persist: this.persist,
4261
+ config: this.config,
4114
4262
  };
4115
4263
  return createElement(DashboardById, props);
4116
4264
  }
@@ -4122,7 +4270,7 @@ class DashboardByIdComponent {
4122
4270
  }
4123
4271
  }
4124
4272
  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 });
4125
- 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 });
4273
+ 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 });
4126
4274
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, decorators: [{
4127
4275
  type: Component,
4128
4276
  args: [{
@@ -4134,7 +4282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4134
4282
  args: [rootId]
4135
4283
  }], dashboardOid: [{
4136
4284
  type: Input
4137
- }], persist: [{
4285
+ }], config: [{
4138
4286
  type: Input
4139
4287
  }] } });
4140
4288
 
@@ -4465,8 +4613,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4465
4613
  *
4466
4614
  * ```ts
4467
4615
  * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
4468
- * url="<instance url>" // replace with the URL of your Sisense instance
4469
- * token="<api token>" // replace with the API token of your user account
4616
+ * url: "<instance url>", // replace with the URL of your Sisense instance
4617
+ * token: "<api token>", // replace with the API token of your user account
4470
4618
  * defaultDataSource: DM.DataSource,
4471
4619
  * };
4472
4620
  *
@@ -4518,7 +4666,8 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
4518
4666
  AreamapChartComponent,
4519
4667
  PivotTableComponent,
4520
4668
  DashboardByIdComponent,
4521
- DashboardComponent], imports: [CommonModule, DecoratorsModule], exports: [ChartComponent,
4669
+ DashboardComponent,
4670
+ PivotTableWidgetComponent], imports: [CommonModule, DecoratorsModule], exports: [ChartComponent,
4522
4671
  TableComponent,
4523
4672
  ChartWidgetComponent,
4524
4673
  ColumnChartComponent,
@@ -4548,7 +4697,8 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
4548
4697
  AreamapChartComponent,
4549
4698
  PivotTableComponent,
4550
4699
  DashboardByIdComponent,
4551
- DashboardComponent] });
4700
+ DashboardComponent,
4701
+ PivotTableWidgetComponent] });
4552
4702
  SdkUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, imports: [CommonModule, DecoratorsModule] });
4553
4703
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, decorators: [{
4554
4704
  type: NgModule,
@@ -4585,6 +4735,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4585
4735
  PivotTableComponent,
4586
4736
  DashboardByIdComponent,
4587
4737
  DashboardComponent,
4738
+ PivotTableWidgetComponent,
4588
4739
  ],
4589
4740
  imports: [CommonModule, DecoratorsModule],
4590
4741
  exports: [
@@ -4619,44 +4770,519 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4619
4770
  PivotTableComponent,
4620
4771
  DashboardByIdComponent,
4621
4772
  DashboardComponent,
4773
+ PivotTableWidgetComponent,
4622
4774
  ],
4623
4775
  providers: [],
4624
4776
  }]
4625
4777
  }] });
4626
4778
 
4779
+ /**
4780
+ * Translates {@link DashboardModel} to {@link DashboardProps}.
4781
+ *
4782
+ * @example
4783
+ * ```html
4784
+ <csdk-dashboard
4785
+ *ngIf="dashboard"
4786
+ [title]="dashboard.title"
4787
+ [layoutOptions]="dashboard.layoutOptions"
4788
+ [widgets]="dashboard.widgets"
4789
+ [filters]="dashboard.filters"
4790
+ [defaultDataSource]="dashboard.defaultDataSource"
4791
+ [widgetsOptions]="dashboard.widgetsOptions"
4792
+ />
4793
+ * ```
4794
+ *
4795
+ * ```ts
4796
+ import { Component } from '@angular/core';
4797
+ import {
4798
+ type DashboardProps,
4799
+ DashboardService,
4800
+ dashboardModelTranslator,
4801
+ } from '@sisense/sdk-ui-angular';
4802
+
4803
+ @Component({
4804
+ selector: 'app-dashboard',
4805
+ templateUrl: './dashboard.component.html',
4806
+ styleUrls: ['./dashboard.component.scss'],
4807
+ })
4808
+ export class DashboardComponent {
4809
+ dashboard: DashboardProps | null = null;
4810
+
4811
+ constructor(private dashboardService: DashboardService) {}
4812
+
4813
+ async ngOnInit(): Promise<void> {
4814
+ const dashboardModel = await this.dashboardService.getDashboardModel('your-dashboard-oid', {
4815
+ includeWidgets: true,
4816
+ includeFilters: true,
4817
+ });
4818
+ this.dashboard = dashboardModelTranslator.toDashboardProps(dashboardModel);
4819
+ }
4820
+ }
4821
+ * ```
4822
+ */
4823
+ function toDashboardProps(dashboardModel) {
4824
+ return dashboardModelTranslator$1.toDashboardProps(dashboardModel);
4825
+ }
4826
+
4827
+ var dashboardModelTranslator = /*#__PURE__*/Object.freeze({
4828
+ __proto__: null,
4829
+ toDashboardProps: toDashboardProps
4830
+ });
4831
+
4832
+ /**
4833
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilters}
4834
+ *
4835
+ * @example
4836
+ * Replace all filters on a dashboard with a new set of filters.
4837
+ * ```ts
4838
+ * const existingDashboard: DashboardProps = {...}
4839
+ * const newFilters: Filter[] = [{...}, {...}, ...];
4840
+ * const updatedDashboard = dashboardHelpers.replaceFilters(existingDashboard, newFilters);
4841
+ * ```
4842
+ * @param dashboard - The original dashboard (`DashboardProps`) whose filters are to be replaced.
4843
+ * @param newFilters - An array of new filters or filter relations to set on the dashboard.
4844
+ * @returns A new dashboard instance with the updated filters.
4845
+ */
4846
+ const replaceFilters = (dashboard, newFilters) => {
4847
+ return dashboardHelpers$1.replaceFilters(dashboard, newFilters);
4848
+ };
4849
+ /**
4850
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilter}
4851
+ *
4852
+ * @example
4853
+ * Add a new filter to a dashboard.
4854
+ * ```ts
4855
+ * const existingDashboard: DashboardProps = {...};
4856
+ * const newFilter: Filter = {...};
4857
+ * const updatedDashboard = dashboardHelpers.addFilter(existingDashboard, newFilter);
4858
+ * ```
4859
+ * @param dashboard - The original dashboard (`DashboardProps`) to which the filter will be added.
4860
+ * @param newFilter - The filter to add to the dashboard.
4861
+ * @returns A new dashboard instance with the new filter added.
4862
+ */
4863
+ const addFilter = (dashboard, newFilter) => {
4864
+ return dashboardHelpers$1.addFilter(dashboard, newFilter);
4865
+ };
4866
+ /**
4867
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilters}
4868
+ *
4869
+ * @example
4870
+ * Add multiple new filters to a dashboard.
4871
+ * ```ts
4872
+ * const existingDashboard: DashboardProps = {...};
4873
+ * const newFilters: Filter[] = [{...}, {...}, ...];
4874
+ * const updatedDashboard = dashboardHelpers.addFilters(existingDashboard, newFilters);
4875
+ * ```
4876
+ * @param dashboard - The original dashboard (`DashboardProps`) to which the filters will be added.
4877
+ * @param newFilters - An array of filters to add to the dashboard.
4878
+ * @returns A new dashboard instance with the new filters added.
4879
+ */
4880
+ const addFilters = (dashboard, newFilters) => {
4881
+ return dashboardHelpers$1.addFilters(dashboard, newFilters);
4882
+ };
4883
+ /**
4884
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilter}
4885
+ *
4886
+ * @example
4887
+ * Replace a filter in a dashboard.
4888
+ * ```ts
4889
+ * const existingDashboard: DashboardProps = {...};
4890
+ * const filterToReplace: Filter = {...};
4891
+ * const newFilter: Filter = {...};
4892
+ * const updatedDashboard = dashboardHelpers.replaceFilter(existingDashboard, filterToReplace, newFilter);
4893
+ * ```
4894
+ * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to be replaced.
4895
+ * @param filterToReplace - The existing filter to be replaced.
4896
+ * @param newFilter - The new filter to replace the existing one.
4897
+ * @returns A new dashboard instance with the specified filter replaced.
4898
+ */
4899
+ const replaceFilter = (dashboard, filterToReplace, newFilter) => {
4900
+ return dashboardHelpers$1.replaceFilter(dashboard, filterToReplace, newFilter);
4901
+ };
4902
+ /**
4903
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.modifyFilter}
4904
+ *
4905
+ * @deprecated Use {@link replaceFilter} instead
4906
+ *
4907
+ * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
4908
+ * @param filterToModify - The existing filter to be modified.
4909
+ * @param newFilter - The new filter to replace the existing one.
4910
+ * @returns A new dashboard instance with the specified filter modified.
4911
+ */
4912
+ const modifyFilter = (dashboard, filterToModify, newFilter) => {
4913
+ return dashboardHelpers$1.modifyFilter(dashboard, filterToModify, newFilter);
4914
+ };
4915
+ /**
4916
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilter}
4917
+ *
4918
+ * @example
4919
+ * Remove a filter from a dashboard.
4920
+ * ```ts
4921
+ * const existingDashboard: DashboardProps = {...};
4922
+ * const filterToRemove: Filter = {...};
4923
+ * const updatedDashboard = dashboardHelpers.removeFilter(existingDashboard, filterToRemove);
4924
+ * ```
4925
+ * @param dashboard - The original dashboard (`DashboardProps`) from which to remove the filter.
4926
+ * @param filterToRemove - The filter to be removed.
4927
+ * @returns A new dashboard instance with the specified filter removed.
4928
+ */
4929
+ const removeFilter = (dashboard, filterToRemove) => {
4930
+ return dashboardHelpers$1.removeFilter(dashboard, filterToRemove);
4931
+ };
4932
+ /**
4933
+ * {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilters}
4934
+ *
4935
+ * @example
4936
+ * Remove multiple filters from a dashboard.
4937
+ * ```ts
4938
+ * const existingDashboard: DashboardProps = {...};
4939
+ * const filtersToRemove: Filter[] = [{...}, {...}, ...];
4940
+ * const updatedDashboard = dashboardHelpers.removeFilters(existingDashboard, filtersToRemove);
4941
+ * ```
4942
+ * @param dashboard - The original dashboard (`DashboardProps`) from which the specified filters are removed.
4943
+ * @param filtersToRemove - An array of filters to remove.
4944
+ * @returns A new dashboard instance with the specified filters removed.
4945
+ */
4946
+ const removeFilters = (dashboard, filtersToRemove) => {
4947
+ return dashboardHelpers$1.removeFilters(dashboard, filtersToRemove);
4948
+ };
4949
+
4950
+ var dashboardHelpers = /*#__PURE__*/Object.freeze({
4951
+ __proto__: null,
4952
+ addFilter: addFilter,
4953
+ addFilters: addFilters,
4954
+ modifyFilter: modifyFilter,
4955
+ removeFilter: removeFilter,
4956
+ removeFilters: removeFilters,
4957
+ replaceFilter: replaceFilter,
4958
+ replaceFilters: replaceFilters
4959
+ });
4960
+
4961
+ /**
4962
+ * Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
4963
+ *
4964
+ * @example
4965
+ * ```ts
4966
+ const widgetModel = await widgetService.getWidgetModel({
4967
+ dashboardOid: 'your-dashboard-oid',
4968
+ widgetOid: 'your-widget-oid'
4969
+ });
4970
+ const executeQueryParams = widgetModelTranslator.toExecuteQueryParams(widgetModel);
4971
+ const queryResult = await queryService.executeQuery(executeQueryParams);
4972
+ * ```
4973
+ *
4974
+ * Note: this method is not supported for getting pivot query.
4975
+ * Use {@link toExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
4976
+ */
4977
+ const toExecuteQueryParams = (widgetModel) => {
4978
+ return widgetModelTranslator$1.toExecuteQueryParams(widgetModel);
4979
+ };
4980
+ /**
4981
+ * Translates a {@link WidgetModel} to the parameters for executing a query for the pivot widget.
4982
+ *
4983
+ * @example
4984
+ * ```ts
4985
+ const widgetModel = await widgetService.getWidgetModel({
4986
+ dashboardOid: 'your-dashboard-oid',
4987
+ widgetOid: 'your-widget-oid'
4988
+ });
4989
+ const executePivotQueryParams = widgetModelTranslator.toExecutePivotQueryParams(widgetModel);
4990
+ const queryResult = await queryService.executePivotQuery(executeQueryParams);
4991
+ * ```
4992
+ *
4993
+ * Note: this method is supported only for getting pivot query.
4994
+ * Use {@link toExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
4995
+ */
4996
+ const toExecutePivotQueryParams = (widgetModel) => {
4997
+ return widgetModelTranslator$1.toExecutePivotQueryParams(widgetModel);
4998
+ };
4999
+ /**
5000
+ * Translates a {@link WidgetModel} to the props for rendering a chart.
5001
+ *
5002
+ * @example
5003
+ * ```html
5004
+ <csdk-chart
5005
+ *ngIf="chartProps"
5006
+ [chartType]="chartProps.chartType"
5007
+ [dataSet]="chartProps.dataSet"
5008
+ [dataOptions]="chartProps.dataOptions"
5009
+ [filters]="chartProps.filters"
5010
+ [highlights]="chartProps.highlights"
5011
+ [styleOptions]="chartProps.styleOptions"
5012
+ />
5013
+ * ```
5014
+ *
5015
+ * ```ts
5016
+ import { Component } from '@angular/core';
5017
+ import {
5018
+ type ChartProps
5019
+ WidgetService,
5020
+ widgetModelTranslator,
5021
+ } from '@sisense/sdk-ui-angular';
5022
+
5023
+ @Component({
5024
+ selector: 'app-example',
5025
+ templateUrl: './example.component.html',
5026
+ styleUrls: ['./example.component.scss'],
5027
+ })
5028
+ export class ExampleComponent {
5029
+ chartProps: ChartProps | null = null;
5030
+
5031
+ constructor(private widgetService: WidgetService) {}
5032
+
5033
+ async ngOnInit(): Promise<void> {
5034
+ const widgetModel = await widgetService.getWidgetModel({
5035
+ dashboardOid: 'your-dashboard-oid',
5036
+ widgetOid: 'your-widget-oid'
5037
+ });
5038
+ this.chartProps = widgetModelTranslator.toChartProps(widgetModel);
5039
+ }
5040
+ }
5041
+ * ```
5042
+ *
5043
+ * Note: this method is not supported for pivot widgets.
5044
+ * Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
5045
+ */
5046
+ function toChartProps(widgetModel) {
5047
+ return widgetModelTranslator$1.toChartProps(widgetModel);
5048
+ }
5049
+ /**
5050
+ * Translates a {@link WidgetModel} to the props for rendering a table.
5051
+ *
5052
+ * @example
5053
+ * ```html
5054
+ <csdk-table
5055
+ *ngIf="tableProps"
5056
+ [dataSet]="tableProps.dataSet"
5057
+ [dataOptions]="tableProps.dataOptions"
5058
+ [filters]="tableProps.filters"
5059
+ [styleOptions]="tableProps.styleOptions"
5060
+ />
5061
+ * ```
5062
+ *
5063
+ * ```ts
5064
+ import { Component } from '@angular/core';
5065
+ import {
5066
+ type TableProps
5067
+ WidgetService,
5068
+ widgetModelTranslator,
5069
+ } from '@sisense/sdk-ui-angular';
5070
+
5071
+ @Component({
5072
+ selector: 'app-example',
5073
+ templateUrl: './example.component.html',
5074
+ styleUrls: ['./example.component.scss'],
5075
+ })
5076
+ export class ExampleComponent {
5077
+ tableProps: TableProps | null = null;
5078
+
5079
+ constructor(private widgetService: WidgetService) {}
5080
+
5081
+ async ngOnInit(): Promise<void> {
5082
+ const widgetModel = await widgetService.getWidgetModel({
5083
+ dashboardOid: 'your-dashboard-oid',
5084
+ widgetOid: 'your-widget-oid'
5085
+ });
5086
+ this.tableProps = widgetModelTranslator.toTableProps(widgetModel);
5087
+ }
5088
+ }
5089
+ * ```
5090
+ *
5091
+ * Note: this method is not supported for chart and pivot widgets.
5092
+ * Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
5093
+ * Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
5094
+ */
5095
+ function toTableProps(widgetModel) {
5096
+ return widgetModelTranslator$1.toTableProps(widgetModel);
5097
+ }
5098
+ /**
5099
+ * Translates a {@link WidgetModel} to the props for rendering a pivot table.
5100
+ *
5101
+ * @example
5102
+ * ```html
5103
+ <csdk-pivot-table
5104
+ *ngIf="pivotTableProps"
5105
+ [dataSet]="pivotTableProps.dataSet"
5106
+ [dataOptions]="pivotTableProps.dataOptions"
5107
+ [filters]="pivotTableProps.filters"
5108
+ [styleOptions]="pivotTableProps.styleOptions"
5109
+ />
5110
+ * ```
5111
+ *
5112
+ * ```ts
5113
+ import { Component } from '@angular/core';
5114
+ import {
5115
+ type PivotTableProps
5116
+ WidgetService,
5117
+ widgetModelTranslator,
5118
+ } from '@sisense/sdk-ui-angular';
5119
+
5120
+ @Component({
5121
+ selector: 'app-example',
5122
+ templateUrl: './example.component.html',
5123
+ styleUrls: ['./example.component.scss'],
5124
+ })
5125
+ export class ExampleComponent {
5126
+ pivotTableProps: PivotTableProps | null = null;
5127
+
5128
+ constructor(private widgetService: WidgetService) {}
5129
+
5130
+ async ngOnInit(): Promise<void> {
5131
+ const widgetModel = await widgetService.getWidgetModel({
5132
+ dashboardOid: 'your-dashboard-oid',
5133
+ widgetOid: 'your-widget-oid'
5134
+ });
5135
+ this.pivotTableProps = widgetModelTranslator.toPivotTableProps(widgetModel);
5136
+ }
5137
+ }
5138
+ * ```
5139
+ *
5140
+ * Note: this method is not supported for chart or table widgets.
5141
+ * Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
5142
+ * Use {@link toTableProps} instead for getting props for the {@link TableComponent}.
5143
+ */
5144
+ function toPivotTableProps(widgetModel) {
5145
+ return widgetModelTranslator$1.toPivotTableProps(widgetModel);
5146
+ }
5147
+ /**
5148
+ * Translates a {@link WidgetModel} to the props for rendering a chart widget.
5149
+ *
5150
+ * @example
5151
+ * ```html
5152
+ <csdk-chart-widget
5153
+ *ngIf="chartWidgetProps"
5154
+ [chartType]="chartWidgetProps.chartType"
5155
+ [dataSource]="chartWidgetProps.dataSource"
5156
+ [dataOptions]="chartWidgetProps.dataOptions"
5157
+ [filters]="chartWidgetProps.filters"
5158
+ [highlights]="chartWidgetProps.highlights"
5159
+ [styleOptions]="chartWidgetProps.styleOptions"
5160
+ />
5161
+ * ```
5162
+ *
5163
+ * ```ts
5164
+ import { Component } from '@angular/core';
5165
+ import {
5166
+ type ChartWidgetProps
5167
+ WidgetService,
5168
+ widgetModelTranslator,
5169
+ } from '@sisense/sdk-ui-angular';
5170
+
5171
+ @Component({
5172
+ selector: 'app-example',
5173
+ templateUrl: './example.component.html',
5174
+ styleUrls: ['./example.component.scss'],
5175
+ })
5176
+ export class ExampleComponent {
5177
+ chartWidgetProps: ChartWidgetProps | null = null;
5178
+
5179
+ constructor(private widgetService: WidgetService) {}
5180
+
5181
+ async ngOnInit(): Promise<void> {
5182
+ const widgetModel = await widgetService.getWidgetModel({
5183
+ dashboardOid: 'your-dashboard-oid',
5184
+ widgetOid: 'your-widget-oid'
5185
+ });
5186
+ this.chartWidgetProps = widgetModelTranslator.toChartWidgetProps(widgetModel);
5187
+ }
5188
+ }
5189
+ * ```
5190
+ *
5191
+ * Note: this method is not supported for pivot widgets.
5192
+ */
5193
+ function toChartWidgetProps(widgetModel) {
5194
+ return widgetModelTranslator$1.toChartWidgetProps(widgetModel);
5195
+ }
5196
+ /**
5197
+ * Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
5198
+ *
5199
+ * @example
5200
+ * ```html
5201
+ <csdk-pivot-table-widget
5202
+ *ngIf="pivotWidgetProps"
5203
+ [dataSet]="pivotWidgetProps.dataSet"
5204
+ [dataOptions]="pivotWidgetProps.dataOptions"
5205
+ [filters]="pivotWidgetProps.filters"
5206
+ [styleOptions]="pivotWidgetProps.styleOptions"
5207
+ />
5208
+ * ```
5209
+ *
5210
+ * ```ts
5211
+ import { Component } from '@angular/core';
5212
+ import {
5213
+ type PivotTableWidgetProps
5214
+ WidgetService,
5215
+ widgetModelTranslator,
5216
+ } from '@sisense/sdk-ui-angular';
5217
+
5218
+ @Component({
5219
+ selector: 'app-example',
5220
+ templateUrl: './example.component.html',
5221
+ styleUrls: ['./example.component.scss'],
5222
+ })
5223
+ export class ExampleComponent {
5224
+ pivotWidgetProps: PivotTableWidgetProps | null = null;
5225
+
5226
+ constructor(private widgetService: WidgetService) {}
5227
+
5228
+ async ngOnInit(): Promise<void> {
5229
+ const widgetModel = await widgetService.getWidgetModel({
5230
+ dashboardOid: 'your-dashboard-oid',
5231
+ widgetOid: 'your-widget-oid'
5232
+ });
5233
+ this.pivotWidgetProps = widgetModelTranslator.toPivotTableWidgetProps(widgetModel);
5234
+ }
5235
+ }
5236
+ * ```
5237
+ *
5238
+ * Note: this method is not supported for chart or table widgets.
5239
+ * Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
5240
+ */
5241
+ function toPivotTableWidgetProps(widgetModel) {
5242
+ return widgetModelTranslator$1.toPivotTableWidgetProps(widgetModel);
5243
+ }
5244
+ /**
5245
+ * Translates a {@link WidgetModel} to the props for rendering a text widget.
5246
+ *
5247
+ * @example
5248
+ * ```ts
5249
+ const widgetModel = await widgetService.getWidgetModel({
5250
+ dashboardOid: 'your-dashboard-oid',
5251
+ widgetOid: 'your-widget-oid'
5252
+ });
5253
+ const textWidgetProps = widgetModelTranslator.toTextWidgetProps(widgetModel);
5254
+ * ```
5255
+ *
5256
+ * Note: this method is not supported for chart or pivot widgets.
5257
+ * Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
5258
+ * Use {@link toPivotTableWidgetProps} instead for getting props for the pivot table widget.
5259
+ */
5260
+ function toTextWidgetProps(widgetModel) {
5261
+ return widgetModelTranslator$1.toTextWidgetProps(widgetModel);
5262
+ }
5263
+
5264
+ var widgetModelTranslator = /*#__PURE__*/Object.freeze({
5265
+ __proto__: null,
5266
+ toChartProps: toChartProps,
5267
+ toChartWidgetProps: toChartWidgetProps,
5268
+ toExecutePivotQueryParams: toExecutePivotQueryParams,
5269
+ toExecuteQueryParams: toExecuteQueryParams,
5270
+ toPivotTableProps: toPivotTableProps,
5271
+ toPivotTableWidgetProps: toPivotTableWidgetProps,
5272
+ toTableProps: toTableProps,
5273
+ toTextWidgetProps: toTextWidgetProps
5274
+ });
5275
+
4627
5276
  // This file re-exports common types/utils from @sisense/sdk-ui-preact
4628
5277
  // Re-exports utils from @sisense/sdk-ui-preact
4629
5278
 
4630
- /*
4631
- * Public API Surface of @sisense/sdk-ui-angular
4632
- */
4633
5279
  /**
4634
- * @packageDocumentation
4635
- * @groupDescription Charts
4636
- * Angular components and utilities for working with charts
4637
- * @groupDescription Data Grids
4638
- * Angular components for data grids
4639
- * @groupDescription Drilldown
4640
- * Angular components for creating drilldown experiences
4641
- * @groupDescription Filter Tiles
4642
- * Angular filter tile components
4643
- * @groupDescription Contexts
4644
- * Angular context modules, services, and variables
4645
- * @groupDescription Queries
4646
- * Angular query service
4647
- * @groupDescription Dashboards
4648
- * Angular components and utilities for working with dashboards
4649
- * @groupDescription Fusion Assets
4650
- * Angular modules, services, and components for working with Fusion dashboards, widgets, queries, and formulas
4651
- * @groupDescription Interfaces
4652
- * TypeScript interfaces for components and services listed above
4653
- * @groupDescription Type Aliases
4654
- * TypeScript type aliases for components and services listed above
5280
+ * Public API Surface of @sisense/sdk-ui-angular
4655
5281
  */
4656
5282
 
4657
5283
  /**
4658
5284
  * Generated bundle index. Do not edit.
4659
5285
  */
4660
5286
 
4661
- 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 };
5287
+ 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 };
4662
5288
  //# sourceMappingURL=sisense-sdk-ui-angular.mjs.map