@sisense/sdk-ui-angular 0.13.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 (65) hide show
  1. package/LICENSE.md +35 -0
  2. package/README.md +2 -0
  3. package/dist/README.md +2 -0
  4. package/dist/esm2020/lib/component-wrapper-helpers/context-connectors.mjs +29 -0
  5. package/dist/esm2020/lib/component-wrapper-helpers/index.mjs +2 -0
  6. package/dist/esm2020/lib/component-wrapper-helpers/template.mjs +3 -0
  7. package/dist/esm2020/lib/components/area-chart.component.mjs +82 -0
  8. package/dist/esm2020/lib/components/bar-chart.component.mjs +82 -0
  9. package/dist/esm2020/lib/components/basic-member-filter-tile.component.mjs +62 -0
  10. package/dist/esm2020/lib/components/chart-widget.component.mjs +112 -0
  11. package/dist/esm2020/lib/components/chart.component.mjs +169 -0
  12. package/dist/esm2020/lib/components/column-chart.component.mjs +82 -0
  13. package/dist/esm2020/lib/components/dashboard-widget.component.mjs +83 -0
  14. package/dist/esm2020/lib/components/funnel-chart.component.mjs +82 -0
  15. package/dist/esm2020/lib/components/index.mjs +17 -0
  16. package/dist/esm2020/lib/components/indicator-chart.component.mjs +48 -0
  17. package/dist/esm2020/lib/components/line-chart.component.mjs +82 -0
  18. package/dist/esm2020/lib/components/pie-chart.component.mjs +82 -0
  19. package/dist/esm2020/lib/components/polar-chart.component.mjs +82 -0
  20. package/dist/esm2020/lib/components/scatter-chart.component.mjs +82 -0
  21. package/dist/esm2020/lib/components/table-widget.component.mjs +72 -0
  22. package/dist/esm2020/lib/components/table.component.mjs +64 -0
  23. package/dist/esm2020/lib/components/treemap-chart.component.mjs +82 -0
  24. package/dist/esm2020/lib/sdk-ui.module.mjs +110 -0
  25. package/dist/esm2020/lib/services/index.mjs +4 -0
  26. package/dist/esm2020/lib/services/query.service.mjs +31 -0
  27. package/dist/esm2020/lib/services/sisense-context.service.mjs +59 -0
  28. package/dist/esm2020/lib/services/theme.service.mjs +90 -0
  29. package/dist/esm2020/lib/utility-types.mjs +2 -0
  30. package/dist/esm2020/public-api.mjs +7 -0
  31. package/dist/esm2020/sisense-sdk-ui-angular.mjs +5 -0
  32. package/dist/fesm2015/sisense-sdk-ui-angular.mjs +1610 -0
  33. package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -0
  34. package/dist/fesm2020/sisense-sdk-ui-angular.mjs +1598 -0
  35. package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -0
  36. package/dist/index.d.ts +5 -0
  37. package/dist/lib/component-wrapper-helpers/context-connectors.d.ts +5 -0
  38. package/dist/lib/component-wrapper-helpers/index.d.ts +1 -0
  39. package/dist/lib/component-wrapper-helpers/template.d.ts +2 -0
  40. package/dist/lib/components/area-chart.component.d.ts +67 -0
  41. package/dist/lib/components/bar-chart.component.d.ts +67 -0
  42. package/dist/lib/components/basic-member-filter-tile.component.d.ts +31 -0
  43. package/dist/lib/components/chart-widget.component.d.ts +75 -0
  44. package/dist/lib/components/chart.component.d.ts +167 -0
  45. package/dist/lib/components/column-chart.component.d.ts +62 -0
  46. package/dist/lib/components/dashboard-widget.component.d.ts +46 -0
  47. package/dist/lib/components/funnel-chart.component.d.ts +67 -0
  48. package/dist/lib/components/index.d.ts +16 -0
  49. package/dist/lib/components/indicator-chart.component.d.ts +41 -0
  50. package/dist/lib/components/line-chart.component.d.ts +67 -0
  51. package/dist/lib/components/pie-chart.component.d.ts +67 -0
  52. package/dist/lib/components/polar-chart.component.d.ts +67 -0
  53. package/dist/lib/components/scatter-chart.component.d.ts +67 -0
  54. package/dist/lib/components/table-widget.component.d.ts +40 -0
  55. package/dist/lib/components/table.component.d.ts +49 -0
  56. package/dist/lib/components/treemap-chart.component.d.ts +67 -0
  57. package/dist/lib/sdk-ui.module.d.ts +49 -0
  58. package/dist/lib/services/index.d.ts +3 -0
  59. package/dist/lib/services/query.service.d.ts +16 -0
  60. package/dist/lib/services/sisense-context.service.d.ts +41 -0
  61. package/dist/lib/services/theme.service.d.ts +71 -0
  62. package/dist/lib/utility-types.d.ts +11 -0
  63. package/dist/package.json +46 -0
  64. package/dist/public-api.d.ts +3 -0
  65. package/package.json +53 -0
@@ -0,0 +1,1598 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, ViewChild, Input, Output, InjectionToken, Injectable, Inject, Optional, NgModule } from '@angular/core';
3
+ import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, createClientApplication, getDefaultThemeSettings, getThemeSettingsByOid, Chart, Table, ChartWidget, TableWidget, DashboardWidget, executeQuery, executeQueryByWidgetId } from '@sisense/sdk-ui-preact';
4
+ import { CommonModule } from '@angular/common';
5
+ import { map, BehaviorSubject } from 'rxjs';
6
+ import merge from 'ts-deepmerge';
7
+
8
+ const rootId = 'preact';
9
+ const template = `<div #${rootId} style="width: 100%; height: 100%"></div>`;
10
+
11
+ /**
12
+ * Basic Member Filter Tile Component
13
+ *
14
+ * @internal
15
+ */
16
+ class BasicMemberFilterTileComponent {
17
+ constructor() {
18
+ this.selectedMembersUpdated = new EventEmitter();
19
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent());
20
+ }
21
+ /** @internal */
22
+ ngAfterViewInit() {
23
+ this.componentAdapter.render(this.preactRef.nativeElement);
24
+ }
25
+ /** @internal */
26
+ ngOnChanges() {
27
+ if (this.preactRef) {
28
+ this.componentAdapter.render(this.preactRef.nativeElement);
29
+ }
30
+ }
31
+ /** @internal */
32
+ ngOnDestroy() {
33
+ this.componentAdapter.destroy();
34
+ }
35
+ createPreactComponent() {
36
+ const props = {
37
+ allMembers: this.allMembers,
38
+ initialSelectedMembers: this.initialSelectedMembers,
39
+ title: this.title,
40
+ maxAllowedMembers: this.maxAllowedMembers,
41
+ onUpdateSelectedMembers: (members) => this.selectedMembersUpdated.emit(members),
42
+ };
43
+ return createElement(BasicMemberFilterTile, props);
44
+ }
45
+ }
46
+ BasicMemberFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BasicMemberFilterTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
+ BasicMemberFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BasicMemberFilterTileComponent, selector: "csdk-basic-member-filter-tile", inputs: { title: "title", allMembers: "allMembers", initialSelectedMembers: "initialSelectedMembers", maxAllowedMembers: "maxAllowedMembers" }, outputs: { selectedMembersUpdated: "selectedMembersUpdated" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #preact style=\"width: 100%; height: 100%\"></div>", isInline: true });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BasicMemberFilterTileComponent, decorators: [{
49
+ type: Component,
50
+ args: [{
51
+ selector: 'csdk-basic-member-filter-tile',
52
+ template,
53
+ }]
54
+ }], ctorParameters: function () { return []; }, propDecorators: { preactRef: [{
55
+ type: ViewChild,
56
+ args: [rootId]
57
+ }], title: [{
58
+ type: Input
59
+ }], allMembers: [{
60
+ type: Input
61
+ }], initialSelectedMembers: [{
62
+ type: Input
63
+ }], maxAllowedMembers: [{
64
+ type: Input
65
+ }], selectedMembersUpdated: [{
66
+ type: Output
67
+ }] } });
68
+
69
+ const createThemeContextConnector = (themeService) => {
70
+ return {
71
+ prepareContext() {
72
+ return themeService.getThemeSettings().pipe(map((themeSettings) => ({
73
+ themeSettings,
74
+ skipTracking: true,
75
+ })));
76
+ },
77
+ renderContextProvider: createContextProviderRenderer(CustomThemeProvider),
78
+ };
79
+ };
80
+ const createSisenseContextConnector = (sisenseContextService) => {
81
+ return {
82
+ async prepareContext() {
83
+ const { enableTracking, showRuntimeErrors } = sisenseContextService.getConfig();
84
+ const app = await sisenseContextService.getApp();
85
+ return {
86
+ app,
87
+ isInitialized: true,
88
+ enableTracking,
89
+ showRuntimeErrors,
90
+ };
91
+ },
92
+ renderContextProvider: createContextProviderRenderer(CustomSisenseContextProvider),
93
+ };
94
+ };
95
+
96
+ /**
97
+ * Token used to inject {@link SisenseContextConfig} into your application
98
+ *
99
+ * @example
100
+ * Example of importing {@link SdkUiModule} and injecting {@link SisenseContextConfig} into your application:
101
+ *
102
+ * ```ts
103
+ * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
104
+ * url="<instance url>" // replace with the URL of your Sisense instance
105
+ * token="<api token>" // replace with the API token of your user account
106
+ * defaultDataSource: DM.DataSource,
107
+ * };
108
+ *
109
+ * @NgModule({
110
+ * imports: [
111
+ * BrowserModule,
112
+ * SdkUiModule,
113
+ * ],
114
+ * declarations: [AppComponent],
115
+ * providers: [
116
+ * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },
117
+ * ],
118
+ * bootstrap: [AppComponent],
119
+ * })
120
+ * ```
121
+ */
122
+ const SISENSE_CONTEXT_CONFIG_TOKEN = new InjectionToken('Props for connecting to Sisense instance');
123
+ class SisenseContextService {
124
+ constructor(sisenseContextConfig) {
125
+ this.appPromise = createClientApplication(sisenseContextConfig);
126
+ const { enableTracking, showRuntimeErrors } = sisenseContextConfig;
127
+ this.config = {
128
+ ...sisenseContextConfig,
129
+ enableTracking: enableTracking ?? true,
130
+ showRuntimeErrors: showRuntimeErrors ?? true,
131
+ };
132
+ }
133
+ getApp() {
134
+ return this.appPromise;
135
+ }
136
+ getConfig() {
137
+ return this.config;
138
+ }
139
+ }
140
+ SisenseContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SisenseContextService, deps: [{ token: SISENSE_CONTEXT_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
141
+ SisenseContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SisenseContextService, providedIn: 'root' });
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SisenseContextService, decorators: [{
143
+ type: Injectable,
144
+ args: [{
145
+ providedIn: 'root',
146
+ }]
147
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
148
+ type: Inject,
149
+ args: [SISENSE_CONTEXT_CONFIG_TOKEN]
150
+ }] }]; } });
151
+
152
+ /**
153
+ * Token used to inject {@link ThemeConfig} into your application
154
+ *
155
+ * @example
156
+ *
157
+ * Example of injecting both {@link SisenseContextConfig} and {@link ThemeConfig} into your application:
158
+ *
159
+ * ```ts
160
+ * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
161
+ * url="<instance url>" // replace with the URL of your Sisense instance
162
+ * token="<api token>" // replace with the API token of your user account
163
+ * defaultDataSource: DM.DataSource,
164
+ * };
165
+ *
166
+ * @NgModule({
167
+ * imports: [
168
+ * BrowserModule,
169
+ * SdkUiModule,
170
+ * ],
171
+ * declarations: [AppComponent],
172
+ * providers: [
173
+ * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },
174
+ * {
175
+ * provide: THEME_CONFIG_TOKEN,
176
+ * useValue: {
177
+ * // initial theme settings
178
+ * } as ThemeConfig,
179
+ * },
180
+ * ],
181
+ * bootstrap: [AppComponent],
182
+ * })
183
+ * ```
184
+ */
185
+ const THEME_CONFIG_TOKEN = new InjectionToken('theme configuration');
186
+ class ThemeService {
187
+ constructor(sisenseContextService, themeConfig) {
188
+ this.sisenseContextService = sisenseContextService;
189
+ this.themeSettings$ = new BehaviorSubject(getDefaultThemeSettings());
190
+ void this.initThemeSettings(themeConfig?.theme);
191
+ }
192
+ async initThemeSettings(theme) {
193
+ const app = await this.sisenseContextService.getApp();
194
+ // apply system theme settings first
195
+ await this.applyThemeSettings(app.settings.serverThemeSettings);
196
+ if (theme) {
197
+ await this.applyThemeSettings(theme);
198
+ }
199
+ }
200
+ async applyThemeSettings(theme) {
201
+ try {
202
+ const app = await this.sisenseContextService.getApp();
203
+ const isThemeOid = typeof theme === 'string';
204
+ let userThemeSettings = theme;
205
+ if (isThemeOid) {
206
+ userThemeSettings = await getThemeSettingsByOid(theme, app.httpClient);
207
+ }
208
+ const mergedThemeSettings = merge.withOptions({ mergeArrays: false }, this.themeSettings$.value, userThemeSettings);
209
+ this.themeSettings$.next(mergedThemeSettings);
210
+ }
211
+ catch (error) {
212
+ this.themeSettings$.error(error);
213
+ }
214
+ }
215
+ getThemeSettings() {
216
+ return this.themeSettings$.asObservable();
217
+ }
218
+ async updateThemeSettings(theme) {
219
+ await this.applyThemeSettings(theme);
220
+ }
221
+ }
222
+ ThemeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ThemeService, deps: [{ token: SisenseContextService }, { token: THEME_CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
223
+ ThemeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ThemeService, providedIn: 'root' });
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ThemeService, decorators: [{
225
+ type: Injectable,
226
+ args: [{
227
+ providedIn: 'root',
228
+ }]
229
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: undefined, decorators: [{
230
+ type: Optional
231
+ }, {
232
+ type: Inject,
233
+ args: [THEME_CONFIG_TOKEN]
234
+ }] }]; } });
235
+
236
+ /**
237
+ * An Angular component used for easily switching chart types or rendering multiple series of different chart types.
238
+ *
239
+ * @example
240
+ * An example of using the `Chart` component to
241
+ * plot a column chart of the Sample Healthcare data source hosted in a Sisense instance:
242
+ * ```ts
243
+ * // Component behavior in .component.ts
244
+ * chart = {
245
+ * chartType: 'column' as ChartType,
246
+ * dataSet: DM.DataSource,
247
+ * dataOptions: {
248
+ * category: [DM.Admissions.Admission_Time.Months],
249
+ * value: [measures.count(DM.Admissions.Patient_ID, 'Total Patients')],
250
+ * breakBy: [],
251
+ * },
252
+ * filters: [filterFactory.members(DM.Doctors.Specialty, ['Oncology', 'Cardiology'])],
253
+ * styleOptions: {
254
+ * width: 800,
255
+ * height: 500,
256
+ * xAxis: {
257
+ * title: {
258
+ * text: 'Months',
259
+ * enabled: true,
260
+ * },
261
+ * },
262
+ * yAxis: {
263
+ * title: {
264
+ * text: 'Total Patients',
265
+ * enabled: true,
266
+ * },
267
+ * },
268
+ * },
269
+ * };
270
+ * ```
271
+ * ```html
272
+ * <!--Component HTML template in .component.html-->
273
+ * <csdk-chart
274
+ * [chartType]="chart.chartType"
275
+ * [dataSet]="chart.dataSet"
276
+ * [dataOptions]="chart.dataOptions"
277
+ * [filters]="chart.filters"
278
+ * [styleOptions]="chart.styleOptions"
279
+ * />
280
+ * ```
281
+ *
282
+ * <img src="media://angular-chart-data-source-example-1.png" width="800px" />
283
+ */
284
+ class ChartComponent {
285
+ /**
286
+ * Constructor for the `Chart` component.
287
+ *
288
+ * @param sisenseContextService - Sisense context service
289
+ * @param themeService - Theme service
290
+ */
291
+ constructor(
292
+ /**
293
+ * Sisense context service
294
+ *
295
+ * @category Constructor
296
+ */
297
+ sisenseContextService,
298
+ /**
299
+ * Theme service
300
+ *
301
+ * @category Constructor
302
+ */
303
+ themeService) {
304
+ this.sisenseContextService = sisenseContextService;
305
+ this.themeService = themeService;
306
+ /**
307
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointClick}
308
+ *
309
+ * @category Callbacks
310
+ */
311
+ this.dataPointClick = new EventEmitter();
312
+ /**
313
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointContextMenu}
314
+ *
315
+ * @category Callbacks
316
+ */
317
+ this.dataPointContextMenu = new EventEmitter();
318
+ /**
319
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointsSelected}
320
+ *
321
+ * @category Callbacks
322
+ */
323
+ this.dataPointsSelect = new EventEmitter();
324
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
325
+ createSisenseContextConnector(this.sisenseContextService),
326
+ createThemeContextConnector(this.themeService),
327
+ ]);
328
+ }
329
+ /**
330
+ * @internal
331
+ */
332
+ ngAfterViewInit() {
333
+ this.componentAdapter.render(this.preactRef.nativeElement);
334
+ }
335
+ /**
336
+ * @internal
337
+ */
338
+ ngOnChanges() {
339
+ if (this.preactRef) {
340
+ this.componentAdapter.render(this.preactRef.nativeElement);
341
+ }
342
+ }
343
+ createPreactComponent() {
344
+ const props = {
345
+ chartType: this.chartType,
346
+ dataSet: this.dataSet,
347
+ dataOptions: this.dataOptions,
348
+ filters: this.filters,
349
+ highlights: this.highlights,
350
+ styleOptions: this.styleOptions,
351
+ onBeforeRender: this.beforeRender?.bind(this),
352
+ onDataPointClick: (...[point, nativeEvent]) => this.dataPointClick.emit({ point, nativeEvent }),
353
+ onDataPointContextMenu: (...[point, nativeEvent]) => this.dataPointContextMenu.emit({ point, nativeEvent }),
354
+ onDataPointsSelected: (...[points, nativeEvent]) => this.dataPointsSelect.emit({ points, nativeEvent }),
355
+ };
356
+ return createElement(Chart, props);
357
+ }
358
+ /**
359
+ * @internal
360
+ */
361
+ ngOnDestroy() {
362
+ this.componentAdapter.destroy();
363
+ }
364
+ }
365
+ ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
366
+ ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartComponent, selector: "csdk-chart", inputs: { chartType: "chartType", dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #preact style=\"width: 100%; height: 100%\"></div>", isInline: true });
367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartComponent, decorators: [{
368
+ type: Component,
369
+ args: [{
370
+ selector: 'csdk-chart',
371
+ template,
372
+ }]
373
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
374
+ type: ViewChild,
375
+ args: [rootId]
376
+ }], chartType: [{
377
+ type: Input
378
+ }], dataSet: [{
379
+ type: Input
380
+ }], dataOptions: [{
381
+ type: Input
382
+ }], filters: [{
383
+ type: Input
384
+ }], highlights: [{
385
+ type: Input
386
+ }], styleOptions: [{
387
+ type: Input
388
+ }], beforeRender: [{
389
+ type: Input
390
+ }], dataPointClick: [{
391
+ type: Output
392
+ }], dataPointContextMenu: [{
393
+ type: Output
394
+ }], dataPointsSelect: [{
395
+ type: Output
396
+ }] } });
397
+
398
+ /**
399
+ * Table Component
400
+ */
401
+ class TableComponent {
402
+ constructor(sisenseContextService, themeService) {
403
+ this.sisenseContextService = sisenseContextService;
404
+ this.themeService = themeService;
405
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
406
+ createSisenseContextConnector(this.sisenseContextService),
407
+ createThemeContextConnector(this.themeService),
408
+ ]);
409
+ }
410
+ /** @internal */
411
+ ngAfterViewInit() {
412
+ this.componentAdapter.render(this.preactRef.nativeElement);
413
+ }
414
+ /** @internal */
415
+ ngOnChanges() {
416
+ if (this.preactRef) {
417
+ this.componentAdapter.render(this.preactRef.nativeElement);
418
+ }
419
+ }
420
+ createPreactComponent() {
421
+ const props = {
422
+ dataSet: this.dataSet,
423
+ dataOptions: this.dataOptions,
424
+ filters: this.filters,
425
+ styleOptions: this.styleOptions,
426
+ };
427
+ return createElement(Table, props);
428
+ }
429
+ /** @internal */
430
+ ngOnDestroy() {
431
+ this.componentAdapter.destroy();
432
+ }
433
+ }
434
+ TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
435
+ TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TableComponent, selector: "csdk-table", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", styleOptions: "styleOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #preact style=\"width: 100%; height: 100%\"></div>", isInline: true });
436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableComponent, decorators: [{
437
+ type: Component,
438
+ args: [{
439
+ selector: 'csdk-table',
440
+ template,
441
+ }]
442
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
443
+ type: ViewChild,
444
+ args: [rootId]
445
+ }], dataSet: [{
446
+ type: Input
447
+ }], dataOptions: [{
448
+ type: Input
449
+ }], filters: [{
450
+ type: Input
451
+ }], styleOptions: [{
452
+ type: Input
453
+ }] } });
454
+
455
+ /**
456
+ * Chart Widget Component
457
+ */
458
+ class ChartWidgetComponent {
459
+ constructor(sisenseContextService, themeService) {
460
+ this.sisenseContextService = sisenseContextService;
461
+ this.themeService = themeService;
462
+ /**
463
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointClick}
464
+ *
465
+ * @category Callbacks
466
+ */
467
+ this.dataPointClick = new EventEmitter();
468
+ /**
469
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointContextMenu}
470
+ *
471
+ * @category Callbacks
472
+ */
473
+ this.dataPointContextMenu = new EventEmitter();
474
+ /**
475
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointsSelected}
476
+ *
477
+ * @category Callbacks
478
+ */
479
+ this.dataPointsSelect = new EventEmitter();
480
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
481
+ createSisenseContextConnector(this.sisenseContextService),
482
+ createThemeContextConnector(this.themeService),
483
+ ]);
484
+ }
485
+ /** @internal */
486
+ ngAfterViewInit() {
487
+ this.componentAdapter.render(this.preactRef.nativeElement);
488
+ }
489
+ /** @internal */
490
+ ngOnChanges() {
491
+ if (this.preactRef) {
492
+ this.componentAdapter.render(this.preactRef.nativeElement);
493
+ }
494
+ }
495
+ createPreactComponent() {
496
+ const props = {
497
+ chartType: this.chartType,
498
+ dataSource: this.dataSource,
499
+ dataOptions: this.dataOptions,
500
+ filters: this.filters,
501
+ highlights: this.highlights,
502
+ styleOptions: this.styleOptions,
503
+ widgetStyleOptions: this.widgetStyleOptions,
504
+ drilldownOptions: this.drilldownOptions,
505
+ title: this.title,
506
+ description: this.description,
507
+ onBeforeRender: this.beforeRender?.bind(this),
508
+ onDataPointClick: (...[point, nativeEvent]) => this.dataPointClick.emit({ point, nativeEvent }),
509
+ onDataPointContextMenu: (...[point, nativeEvent]) => this.dataPointContextMenu.emit({ point, nativeEvent }),
510
+ onDataPointsSelected: (...[points, nativeEvent]) => this.dataPointsSelect.emit({ points, nativeEvent }),
511
+ };
512
+ return createElement(ChartWidget, props);
513
+ }
514
+ /** @internal */
515
+ ngOnDestroy() {
516
+ this.componentAdapter.destroy();
517
+ }
518
+ }
519
+ ChartWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
520
+ ChartWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWidgetComponent, selector: "csdk-chart-widget", inputs: { chartType: "chartType", dataSource: "dataSource", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", widgetStyleOptions: "widgetStyleOptions", drilldownOptions: "drilldownOptions", title: "title", description: "description", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #preact style=\"width: 100%; height: 100%\"></div>", isInline: true });
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, decorators: [{
522
+ type: Component,
523
+ args: [{
524
+ selector: 'csdk-chart-widget',
525
+ template,
526
+ }]
527
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
528
+ type: ViewChild,
529
+ args: [rootId]
530
+ }], chartType: [{
531
+ type: Input
532
+ }], dataSource: [{
533
+ type: Input
534
+ }], dataOptions: [{
535
+ type: Input
536
+ }], filters: [{
537
+ type: Input
538
+ }], highlights: [{
539
+ type: Input
540
+ }], styleOptions: [{
541
+ type: Input
542
+ }], widgetStyleOptions: [{
543
+ type: Input
544
+ }], drilldownOptions: [{
545
+ type: Input
546
+ }], title: [{
547
+ type: Input
548
+ }], description: [{
549
+ type: Input
550
+ }], beforeRender: [{
551
+ type: Input
552
+ }], dataPointClick: [{
553
+ type: Output
554
+ }], dataPointContextMenu: [{
555
+ type: Output
556
+ }], dataPointsSelect: [{
557
+ type: Output
558
+ }] } });
559
+
560
+ /**
561
+ * Column Chart Component
562
+ */
563
+ class ColumnChartComponent {
564
+ constructor() {
565
+ /**
566
+ * {@inheritDoc @sisense/sdk-ui!ColumnChartProps.onDataPointClick}
567
+ *
568
+ * @category Callbacks
569
+ */
570
+ this.dataPointClick = new EventEmitter();
571
+ /**
572
+ * {@inheritDoc @sisense/sdk-ui!ColumnChartProps.onDataPointContextMenu}
573
+ *
574
+ * @category Callbacks
575
+ */
576
+ this.dataPointContextMenu = new EventEmitter();
577
+ /**
578
+ * {@inheritDoc @sisense/sdk-ui!ColumnChartProps.onDataPointsSelected}
579
+ *
580
+ * @category Callbacks
581
+ */
582
+ this.dataPointsSelect = new EventEmitter();
583
+ /** @internal */
584
+ this.chartType = 'column';
585
+ }
586
+ }
587
+ ColumnChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
588
+ ColumnChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ColumnChartComponent, selector: "csdk-column-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
589
+ <csdk-chart
590
+ [chartType]="chartType"
591
+ [dataSet]="dataSet"
592
+ [dataOptions]="dataOptions"
593
+ [filters]="filters"
594
+ [highlights]="highlights"
595
+ [beforeRender]="beforeRender"
596
+ (dataPointClick)="dataPointClick.emit($event)"
597
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
598
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
599
+ />
600
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnChartComponent, decorators: [{
602
+ type: Component,
603
+ args: [{
604
+ selector: 'csdk-column-chart',
605
+ template: `
606
+ <csdk-chart
607
+ [chartType]="chartType"
608
+ [dataSet]="dataSet"
609
+ [dataOptions]="dataOptions"
610
+ [filters]="filters"
611
+ [highlights]="highlights"
612
+ [beforeRender]="beforeRender"
613
+ (dataPointClick)="dataPointClick.emit($event)"
614
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
615
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
616
+ />
617
+ `,
618
+ }]
619
+ }], propDecorators: { dataSet: [{
620
+ type: Input
621
+ }], dataOptions: [{
622
+ type: Input
623
+ }], filters: [{
624
+ type: Input
625
+ }], highlights: [{
626
+ type: Input
627
+ }], styleOptions: [{
628
+ type: Input
629
+ }], beforeRender: [{
630
+ type: Input
631
+ }], dataPointClick: [{
632
+ type: Output
633
+ }], dataPointContextMenu: [{
634
+ type: Output
635
+ }], dataPointsSelect: [{
636
+ type: Output
637
+ }] } });
638
+
639
+ /**
640
+ * Bar Chart Component
641
+ */
642
+ class BarChartComponent {
643
+ constructor() {
644
+ /**
645
+ * {@inheritDoc @sisense/sdk-ui!BarChartProps.onDataPointClick}
646
+ *
647
+ * @category Callbacks
648
+ */
649
+ this.dataPointClick = new EventEmitter();
650
+ /**
651
+ * {@inheritDoc @sisense/sdk-ui!BarChartProps.onDataPointContextMenu}
652
+ *
653
+ * @category Callbacks
654
+ */
655
+ this.dataPointContextMenu = new EventEmitter();
656
+ /**
657
+ * {@inheritDoc @sisense/sdk-ui!BarChartProps.onDataPointsSelected}
658
+ *
659
+ * @category Callbacks
660
+ */
661
+ this.dataPointsSelect = new EventEmitter();
662
+ /** @internal */
663
+ this.chartType = 'bar';
664
+ }
665
+ }
666
+ BarChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
667
+ BarChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BarChartComponent, selector: "csdk-bar-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
668
+ <csdk-chart
669
+ [chartType]="chartType"
670
+ [dataSet]="dataSet"
671
+ [dataOptions]="dataOptions"
672
+ [filters]="filters"
673
+ [highlights]="highlights"
674
+ [beforeRender]="beforeRender"
675
+ (dataPointClick)="dataPointClick.emit($event)"
676
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
677
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
678
+ />
679
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
680
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BarChartComponent, decorators: [{
681
+ type: Component,
682
+ args: [{
683
+ selector: 'csdk-bar-chart',
684
+ template: `
685
+ <csdk-chart
686
+ [chartType]="chartType"
687
+ [dataSet]="dataSet"
688
+ [dataOptions]="dataOptions"
689
+ [filters]="filters"
690
+ [highlights]="highlights"
691
+ [beforeRender]="beforeRender"
692
+ (dataPointClick)="dataPointClick.emit($event)"
693
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
694
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
695
+ />
696
+ `,
697
+ }]
698
+ }], propDecorators: { dataSet: [{
699
+ type: Input
700
+ }], dataOptions: [{
701
+ type: Input
702
+ }], filters: [{
703
+ type: Input
704
+ }], highlights: [{
705
+ type: Input
706
+ }], styleOptions: [{
707
+ type: Input
708
+ }], beforeRender: [{
709
+ type: Input
710
+ }], dataPointClick: [{
711
+ type: Output
712
+ }], dataPointContextMenu: [{
713
+ type: Output
714
+ }], dataPointsSelect: [{
715
+ type: Output
716
+ }] } });
717
+
718
+ /**
719
+ * Area Chart Component
720
+ */
721
+ class AreaChartComponent {
722
+ constructor() {
723
+ /**
724
+ * {@inheritDoc @sisense/sdk-ui!AreaChartProps.onDataPointClick}
725
+ *
726
+ * @category Callbacks
727
+ */
728
+ this.dataPointClick = new EventEmitter();
729
+ /**
730
+ * {@inheritDoc @sisense/sdk-ui!AreaChartProps.onDataPointContextMenu}
731
+ *
732
+ * @category Callbacks
733
+ */
734
+ this.dataPointContextMenu = new EventEmitter();
735
+ /**
736
+ * {@inheritDoc @sisense/sdk-ui!AreaChartProps.onDataPointsSelected}
737
+ *
738
+ * @category Callbacks
739
+ */
740
+ this.dataPointsSelect = new EventEmitter();
741
+ /** @internal */
742
+ this.chartType = 'area';
743
+ }
744
+ }
745
+ AreaChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
746
+ AreaChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AreaChartComponent, selector: "csdk-area-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
747
+ <csdk-chart
748
+ [chartType]="chartType"
749
+ [dataSet]="dataSet"
750
+ [dataOptions]="dataOptions"
751
+ [filters]="filters"
752
+ [highlights]="highlights"
753
+ [beforeRender]="beforeRender"
754
+ (dataPointClick)="dataPointClick.emit($event)"
755
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
756
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
757
+ />
758
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreaChartComponent, decorators: [{
760
+ type: Component,
761
+ args: [{
762
+ selector: 'csdk-area-chart',
763
+ template: `
764
+ <csdk-chart
765
+ [chartType]="chartType"
766
+ [dataSet]="dataSet"
767
+ [dataOptions]="dataOptions"
768
+ [filters]="filters"
769
+ [highlights]="highlights"
770
+ [beforeRender]="beforeRender"
771
+ (dataPointClick)="dataPointClick.emit($event)"
772
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
773
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
774
+ />
775
+ `,
776
+ }]
777
+ }], propDecorators: { dataSet: [{
778
+ type: Input
779
+ }], dataOptions: [{
780
+ type: Input
781
+ }], filters: [{
782
+ type: Input
783
+ }], highlights: [{
784
+ type: Input
785
+ }], styleOptions: [{
786
+ type: Input
787
+ }], beforeRender: [{
788
+ type: Input
789
+ }], dataPointClick: [{
790
+ type: Output
791
+ }], dataPointContextMenu: [{
792
+ type: Output
793
+ }], dataPointsSelect: [{
794
+ type: Output
795
+ }] } });
796
+
797
+ /**
798
+ * Line Chart Component
799
+ */
800
+ class LineChartComponent {
801
+ constructor() {
802
+ /**
803
+ * {@inheritDoc @sisense/sdk-ui!LineChartProps.onDataPointClick}
804
+ *
805
+ * @category Callbacks
806
+ */
807
+ this.dataPointClick = new EventEmitter();
808
+ /**
809
+ * {@inheritDoc @sisense/sdk-ui!LineChartProps.onDataPointContextMenu}
810
+ *
811
+ * @category Callbacks
812
+ */
813
+ this.dataPointContextMenu = new EventEmitter();
814
+ /**
815
+ * {@inheritDoc @sisense/sdk-ui!LineChartProps.onDataPointsSelected}
816
+ *
817
+ * @category Callbacks
818
+ */
819
+ this.dataPointsSelect = new EventEmitter();
820
+ /** @internal */
821
+ this.chartType = 'line';
822
+ }
823
+ }
824
+ LineChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
825
+ LineChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LineChartComponent, selector: "csdk-line-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
826
+ <csdk-chart
827
+ [chartType]="chartType"
828
+ [dataSet]="dataSet"
829
+ [dataOptions]="dataOptions"
830
+ [filters]="filters"
831
+ [highlights]="highlights"
832
+ [beforeRender]="beforeRender"
833
+ (dataPointClick)="dataPointClick.emit($event)"
834
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
835
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
836
+ />
837
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineChartComponent, decorators: [{
839
+ type: Component,
840
+ args: [{
841
+ selector: 'csdk-line-chart',
842
+ template: `
843
+ <csdk-chart
844
+ [chartType]="chartType"
845
+ [dataSet]="dataSet"
846
+ [dataOptions]="dataOptions"
847
+ [filters]="filters"
848
+ [highlights]="highlights"
849
+ [beforeRender]="beforeRender"
850
+ (dataPointClick)="dataPointClick.emit($event)"
851
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
852
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
853
+ />
854
+ `,
855
+ }]
856
+ }], propDecorators: { dataSet: [{
857
+ type: Input
858
+ }], dataOptions: [{
859
+ type: Input
860
+ }], filters: [{
861
+ type: Input
862
+ }], highlights: [{
863
+ type: Input
864
+ }], styleOptions: [{
865
+ type: Input
866
+ }], beforeRender: [{
867
+ type: Input
868
+ }], dataPointClick: [{
869
+ type: Output
870
+ }], dataPointContextMenu: [{
871
+ type: Output
872
+ }], dataPointsSelect: [{
873
+ type: Output
874
+ }] } });
875
+
876
+ /**
877
+ * Indicator Chart Component
878
+ */
879
+ class IndicatorChartComponent {
880
+ constructor() {
881
+ /** @internal */
882
+ this.chartType = 'indicator';
883
+ }
884
+ }
885
+ IndicatorChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IndicatorChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
886
+ IndicatorChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: IndicatorChartComponent, selector: "csdk-indicator-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, ngImport: i0, template: `
887
+ <csdk-chart
888
+ [chartType]="chartType"
889
+ [dataSet]="dataSet"
890
+ [dataOptions]="dataOptions"
891
+ [filters]="filters"
892
+ [highlights]="highlights"
893
+ />
894
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IndicatorChartComponent, decorators: [{
896
+ type: Component,
897
+ args: [{
898
+ selector: 'csdk-indicator-chart',
899
+ template: `
900
+ <csdk-chart
901
+ [chartType]="chartType"
902
+ [dataSet]="dataSet"
903
+ [dataOptions]="dataOptions"
904
+ [filters]="filters"
905
+ [highlights]="highlights"
906
+ />
907
+ `,
908
+ }]
909
+ }], propDecorators: { dataSet: [{
910
+ type: Input
911
+ }], dataOptions: [{
912
+ type: Input
913
+ }], filters: [{
914
+ type: Input
915
+ }], highlights: [{
916
+ type: Input
917
+ }], styleOptions: [{
918
+ type: Input
919
+ }] } });
920
+
921
+ /**
922
+ * Scatter Chart Component
923
+ */
924
+ class ScatterChartComponent {
925
+ constructor() {
926
+ /**
927
+ * {@inheritDoc @sisense/sdk-ui!ScatterChartProps.onDataPointClick}
928
+ *
929
+ * @category Callbacks
930
+ */
931
+ this.dataPointClick = new EventEmitter();
932
+ /**
933
+ * {@inheritDoc @sisense/sdk-ui!ScatterChartProps.onDataPointContextMenu}
934
+ *
935
+ * @category Callbacks
936
+ */
937
+ this.dataPointContextMenu = new EventEmitter();
938
+ /**
939
+ * {@inheritDoc @sisense/sdk-ui!ScatterChartProps.onDataPointsSelected}
940
+ *
941
+ * @category Callbacks
942
+ */
943
+ this.dataPointsSelect = new EventEmitter();
944
+ /** @internal */
945
+ this.chartType = 'scatter';
946
+ }
947
+ }
948
+ ScatterChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScatterChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
949
+ ScatterChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ScatterChartComponent, selector: "csdk-scatter-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
950
+ <csdk-chart
951
+ [chartType]="chartType"
952
+ [dataSet]="dataSet"
953
+ [dataOptions]="dataOptions"
954
+ [filters]="filters"
955
+ [highlights]="highlights"
956
+ [beforeRender]="beforeRender"
957
+ (dataPointClick)="dataPointClick.emit($event)"
958
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
959
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
960
+ />
961
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScatterChartComponent, decorators: [{
963
+ type: Component,
964
+ args: [{
965
+ selector: 'csdk-scatter-chart',
966
+ template: `
967
+ <csdk-chart
968
+ [chartType]="chartType"
969
+ [dataSet]="dataSet"
970
+ [dataOptions]="dataOptions"
971
+ [filters]="filters"
972
+ [highlights]="highlights"
973
+ [beforeRender]="beforeRender"
974
+ (dataPointClick)="dataPointClick.emit($event)"
975
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
976
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
977
+ />
978
+ `,
979
+ }]
980
+ }], propDecorators: { dataSet: [{
981
+ type: Input
982
+ }], dataOptions: [{
983
+ type: Input
984
+ }], filters: [{
985
+ type: Input
986
+ }], highlights: [{
987
+ type: Input
988
+ }], styleOptions: [{
989
+ type: Input
990
+ }], beforeRender: [{
991
+ type: Input
992
+ }], dataPointClick: [{
993
+ type: Output
994
+ }], dataPointContextMenu: [{
995
+ type: Output
996
+ }], dataPointsSelect: [{
997
+ type: Output
998
+ }] } });
999
+
1000
+ /**
1001
+ * Pie Chart Component
1002
+ */
1003
+ class PieChartComponent {
1004
+ constructor() {
1005
+ /**
1006
+ * {@inheritDoc @sisense/sdk-ui!PieChartProps.onDataPointClick}
1007
+ *
1008
+ * @category Callbacks
1009
+ */
1010
+ this.dataPointClick = new EventEmitter();
1011
+ /**
1012
+ * {@inheritDoc @sisense/sdk-ui!PieChartProps.onDataPointContextMenu}
1013
+ *
1014
+ * @category Callbacks
1015
+ */
1016
+ this.dataPointContextMenu = new EventEmitter();
1017
+ /**
1018
+ * {@inheritDoc @sisense/sdk-ui!PieChartProps.onDataPointsSelected}
1019
+ *
1020
+ * @category Callbacks
1021
+ */
1022
+ this.dataPointsSelect = new EventEmitter();
1023
+ /** @internal */
1024
+ this.chartType = 'pie';
1025
+ }
1026
+ }
1027
+ PieChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PieChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1028
+ PieChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PieChartComponent, selector: "csdk-pie-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
1029
+ <csdk-chart
1030
+ [chartType]="chartType"
1031
+ [dataSet]="dataSet"
1032
+ [dataOptions]="dataOptions"
1033
+ [filters]="filters"
1034
+ [highlights]="highlights"
1035
+ [beforeRender]="beforeRender"
1036
+ (dataPointClick)="dataPointClick.emit($event)"
1037
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1038
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1039
+ />
1040
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
1041
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PieChartComponent, decorators: [{
1042
+ type: Component,
1043
+ args: [{
1044
+ selector: 'csdk-pie-chart',
1045
+ template: `
1046
+ <csdk-chart
1047
+ [chartType]="chartType"
1048
+ [dataSet]="dataSet"
1049
+ [dataOptions]="dataOptions"
1050
+ [filters]="filters"
1051
+ [highlights]="highlights"
1052
+ [beforeRender]="beforeRender"
1053
+ (dataPointClick)="dataPointClick.emit($event)"
1054
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1055
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1056
+ />
1057
+ `,
1058
+ }]
1059
+ }], propDecorators: { dataSet: [{
1060
+ type: Input
1061
+ }], dataOptions: [{
1062
+ type: Input
1063
+ }], filters: [{
1064
+ type: Input
1065
+ }], highlights: [{
1066
+ type: Input
1067
+ }], styleOptions: [{
1068
+ type: Input
1069
+ }], beforeRender: [{
1070
+ type: Input
1071
+ }], dataPointClick: [{
1072
+ type: Output
1073
+ }], dataPointContextMenu: [{
1074
+ type: Output
1075
+ }], dataPointsSelect: [{
1076
+ type: Output
1077
+ }] } });
1078
+
1079
+ /**
1080
+ * Funnel Chart Component
1081
+ */
1082
+ class FunnelChartComponent {
1083
+ constructor() {
1084
+ /**
1085
+ * {@inheritDoc @sisense/sdk-ui!FunnelChartProps.onDataPointClick}
1086
+ *
1087
+ * @category Callbacks
1088
+ */
1089
+ this.dataPointClick = new EventEmitter();
1090
+ /**
1091
+ * {@inheritDoc @sisense/sdk-ui!FunnelChartProps.onDataPointContextMenu}
1092
+ *
1093
+ * @category Callbacks
1094
+ */
1095
+ this.dataPointContextMenu = new EventEmitter();
1096
+ /**
1097
+ * {@inheritDoc @sisense/sdk-ui!FunnelChartProps.onDataPointsSelected}
1098
+ *
1099
+ * @category Callbacks
1100
+ */
1101
+ this.dataPointsSelect = new EventEmitter();
1102
+ /** @internal */
1103
+ this.chartType = 'funnel';
1104
+ }
1105
+ }
1106
+ FunnelChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunnelChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1107
+ FunnelChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FunnelChartComponent, selector: "csdk-funnel-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
1108
+ <csdk-chart
1109
+ [chartType]="chartType"
1110
+ [dataSet]="dataSet"
1111
+ [dataOptions]="dataOptions"
1112
+ [filters]="filters"
1113
+ [highlights]="highlights"
1114
+ [beforeRender]="beforeRender"
1115
+ (dataPointClick)="dataPointClick.emit($event)"
1116
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1117
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1118
+ />
1119
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
1120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunnelChartComponent, decorators: [{
1121
+ type: Component,
1122
+ args: [{
1123
+ selector: 'csdk-funnel-chart',
1124
+ template: `
1125
+ <csdk-chart
1126
+ [chartType]="chartType"
1127
+ [dataSet]="dataSet"
1128
+ [dataOptions]="dataOptions"
1129
+ [filters]="filters"
1130
+ [highlights]="highlights"
1131
+ [beforeRender]="beforeRender"
1132
+ (dataPointClick)="dataPointClick.emit($event)"
1133
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1134
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1135
+ />
1136
+ `,
1137
+ }]
1138
+ }], propDecorators: { dataSet: [{
1139
+ type: Input
1140
+ }], dataOptions: [{
1141
+ type: Input
1142
+ }], filters: [{
1143
+ type: Input
1144
+ }], highlights: [{
1145
+ type: Input
1146
+ }], styleOptions: [{
1147
+ type: Input
1148
+ }], beforeRender: [{
1149
+ type: Input
1150
+ }], dataPointClick: [{
1151
+ type: Output
1152
+ }], dataPointContextMenu: [{
1153
+ type: Output
1154
+ }], dataPointsSelect: [{
1155
+ type: Output
1156
+ }] } });
1157
+
1158
+ /**
1159
+ * Polar Chart Component
1160
+ */
1161
+ class PolarChartComponent {
1162
+ constructor() {
1163
+ /**
1164
+ * {@inheritDoc @sisense/sdk-ui!PolarChartProps.onDataPointClick}
1165
+ *
1166
+ * @category Callbacks
1167
+ */
1168
+ this.dataPointClick = new EventEmitter();
1169
+ /**
1170
+ * {@inheritDoc @sisense/sdk-ui!PolarChartProps.onDataPointContextMenu}
1171
+ *
1172
+ * @category Callbacks
1173
+ */
1174
+ this.dataPointContextMenu = new EventEmitter();
1175
+ /**
1176
+ * {@inheritDoc @sisense/sdk-ui!PolarChartProps.onDataPointsSelected}
1177
+ *
1178
+ * @category Callbacks
1179
+ */
1180
+ this.dataPointsSelect = new EventEmitter();
1181
+ /** @internal */
1182
+ this.chartType = 'polar';
1183
+ }
1184
+ }
1185
+ PolarChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PolarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1186
+ PolarChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PolarChartComponent, selector: "csdk-polar-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
1187
+ <csdk-chart
1188
+ [chartType]="chartType"
1189
+ [dataSet]="dataSet"
1190
+ [dataOptions]="dataOptions"
1191
+ [filters]="filters"
1192
+ [highlights]="highlights"
1193
+ [beforeRender]="beforeRender"
1194
+ (dataPointClick)="dataPointClick.emit($event)"
1195
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1196
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1197
+ />
1198
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
1199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PolarChartComponent, decorators: [{
1200
+ type: Component,
1201
+ args: [{
1202
+ selector: 'csdk-polar-chart',
1203
+ template: `
1204
+ <csdk-chart
1205
+ [chartType]="chartType"
1206
+ [dataSet]="dataSet"
1207
+ [dataOptions]="dataOptions"
1208
+ [filters]="filters"
1209
+ [highlights]="highlights"
1210
+ [beforeRender]="beforeRender"
1211
+ (dataPointClick)="dataPointClick.emit($event)"
1212
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1213
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1214
+ />
1215
+ `,
1216
+ }]
1217
+ }], propDecorators: { dataSet: [{
1218
+ type: Input
1219
+ }], dataOptions: [{
1220
+ type: Input
1221
+ }], filters: [{
1222
+ type: Input
1223
+ }], highlights: [{
1224
+ type: Input
1225
+ }], styleOptions: [{
1226
+ type: Input
1227
+ }], beforeRender: [{
1228
+ type: Input
1229
+ }], dataPointClick: [{
1230
+ type: Output
1231
+ }], dataPointContextMenu: [{
1232
+ type: Output
1233
+ }], dataPointsSelect: [{
1234
+ type: Output
1235
+ }] } });
1236
+
1237
+ /**
1238
+ * Treemap Chart Component
1239
+ */
1240
+ class TreemapChartComponent {
1241
+ constructor() {
1242
+ /**
1243
+ * {@inheritDoc @sisense/sdk-ui!TreemapChartProps.onDataPointClick}
1244
+ *
1245
+ * @category Callbacks
1246
+ */
1247
+ this.dataPointClick = new EventEmitter();
1248
+ /**
1249
+ * {@inheritDoc @sisense/sdk-ui!TreemapChartProps.onDataPointContextMenu}
1250
+ *
1251
+ * @category Callbacks
1252
+ */
1253
+ this.dataPointContextMenu = new EventEmitter();
1254
+ /**
1255
+ * {@inheritDoc @sisense/sdk-ui!TreemapChartProps.onDataPointsSelected}
1256
+ *
1257
+ * @category Callbacks
1258
+ */
1259
+ this.dataPointsSelect = new EventEmitter();
1260
+ /** @internal */
1261
+ this.chartType = 'treemap';
1262
+ }
1263
+ }
1264
+ TreemapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreemapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1265
+ TreemapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TreemapChartComponent, selector: "csdk-treemap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
1266
+ <csdk-chart
1267
+ [chartType]="chartType"
1268
+ [dataSet]="dataSet"
1269
+ [dataOptions]="dataOptions"
1270
+ [filters]="filters"
1271
+ [highlights]="highlights"
1272
+ [beforeRender]="beforeRender"
1273
+ (dataPointClick)="dataPointClick.emit($event)"
1274
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1275
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1276
+ />
1277
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
1278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreemapChartComponent, decorators: [{
1279
+ type: Component,
1280
+ args: [{
1281
+ selector: 'csdk-treemap-chart',
1282
+ template: `
1283
+ <csdk-chart
1284
+ [chartType]="chartType"
1285
+ [dataSet]="dataSet"
1286
+ [dataOptions]="dataOptions"
1287
+ [filters]="filters"
1288
+ [highlights]="highlights"
1289
+ [beforeRender]="beforeRender"
1290
+ (dataPointClick)="dataPointClick.emit($event)"
1291
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
1292
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
1293
+ />
1294
+ `,
1295
+ }]
1296
+ }], propDecorators: { dataSet: [{
1297
+ type: Input
1298
+ }], dataOptions: [{
1299
+ type: Input
1300
+ }], filters: [{
1301
+ type: Input
1302
+ }], highlights: [{
1303
+ type: Input
1304
+ }], styleOptions: [{
1305
+ type: Input
1306
+ }], beforeRender: [{
1307
+ type: Input
1308
+ }], dataPointClick: [{
1309
+ type: Output
1310
+ }], dataPointContextMenu: [{
1311
+ type: Output
1312
+ }], dataPointsSelect: [{
1313
+ type: Output
1314
+ }] } });
1315
+
1316
+ /**
1317
+ * Table Widget Component
1318
+ *
1319
+ * @internal
1320
+ */
1321
+ class TableWidgetComponent {
1322
+ constructor(sisenseContextService, themeService) {
1323
+ this.sisenseContextService = sisenseContextService;
1324
+ this.themeService = themeService;
1325
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
1326
+ createSisenseContextConnector(this.sisenseContextService),
1327
+ createThemeContextConnector(this.themeService),
1328
+ ]);
1329
+ }
1330
+ ngAfterViewInit() {
1331
+ this.componentAdapter.render(this.preactRef.nativeElement);
1332
+ }
1333
+ ngOnChanges() {
1334
+ if (this.preactRef) {
1335
+ this.componentAdapter.render(this.preactRef.nativeElement);
1336
+ }
1337
+ }
1338
+ createPreactComponent() {
1339
+ const props = {
1340
+ dataSource: this.dataSource,
1341
+ dataOptions: this.dataOptions,
1342
+ filters: this.filters,
1343
+ styleOptions: this.styleOptions,
1344
+ widgetStyleOptions: this.widgetStyleOptions,
1345
+ title: this.title,
1346
+ description: this.description,
1347
+ };
1348
+ return createElement(TableWidget, props);
1349
+ }
1350
+ ngOnDestroy() {
1351
+ this.componentAdapter.destroy();
1352
+ }
1353
+ }
1354
+ TableWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
1355
+ TableWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TableWidgetComponent, selector: "csdk-table-widget", inputs: { dataSource: "dataSource", dataOptions: "dataOptions", filters: "filters", styleOptions: "styleOptions", widgetStyleOptions: "widgetStyleOptions", title: "title", description: "description" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #preact style=\"width: 100%; height: 100%\"></div>", isInline: true });
1356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableWidgetComponent, decorators: [{
1357
+ type: Component,
1358
+ args: [{
1359
+ selector: 'csdk-table-widget',
1360
+ template,
1361
+ }]
1362
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
1363
+ type: ViewChild,
1364
+ args: [rootId]
1365
+ }], dataSource: [{
1366
+ type: Input
1367
+ }], dataOptions: [{
1368
+ type: Input
1369
+ }], filters: [{
1370
+ type: Input
1371
+ }], styleOptions: [{
1372
+ type: Input
1373
+ }], widgetStyleOptions: [{
1374
+ type: Input
1375
+ }], title: [{
1376
+ type: Input
1377
+ }], description: [{
1378
+ type: Input
1379
+ }] } });
1380
+
1381
+ /**
1382
+ * Dashboard Widget Component
1383
+ */
1384
+ class DashboardWidgetComponent {
1385
+ constructor(sisenseContextService, themeService) {
1386
+ this.sisenseContextService = sisenseContextService;
1387
+ this.themeService = themeService;
1388
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
1389
+ createSisenseContextConnector(this.sisenseContextService),
1390
+ createThemeContextConnector(this.themeService),
1391
+ ]);
1392
+ }
1393
+ /** @internal */
1394
+ ngAfterViewInit() {
1395
+ this.componentAdapter.render(this.preactRef.nativeElement);
1396
+ }
1397
+ /** @internal */
1398
+ ngOnChanges() {
1399
+ if (this.preactRef) {
1400
+ this.componentAdapter.render(this.preactRef.nativeElement);
1401
+ }
1402
+ }
1403
+ /** @internal */
1404
+ createPreactComponent() {
1405
+ const props = {
1406
+ widgetOid: this.widgetOid,
1407
+ dashboardOid: this.dashboardOid,
1408
+ filters: this.filters,
1409
+ highlights: this.highlights,
1410
+ filtersMergeStrategy: this.filtersMergeStrategy,
1411
+ title: this.title,
1412
+ description: this.description,
1413
+ styleOptions: this.styleOptions,
1414
+ widgetStyleOptions: this.widgetStyleOptions,
1415
+ drilldownOptions: this.drilldownOptions,
1416
+ };
1417
+ return createElement(DashboardWidget, props);
1418
+ }
1419
+ /** @internal */
1420
+ ngOnDestroy() {
1421
+ this.componentAdapter.destroy();
1422
+ }
1423
+ }
1424
+ DashboardWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
1425
+ DashboardWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardWidgetComponent, selector: "csdk-dashboard-widget", inputs: { widgetOid: "widgetOid", dashboardOid: "dashboardOid", filters: "filters", highlights: "highlights", filtersMergeStrategy: "filtersMergeStrategy", title: "title", description: "description", styleOptions: "styleOptions", widgetStyleOptions: "widgetStyleOptions", drilldownOptions: "drilldownOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #preact style=\"width: 100%; height: 100%\"></div>", isInline: true });
1426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, decorators: [{
1427
+ type: Component,
1428
+ args: [{
1429
+ selector: 'csdk-dashboard-widget',
1430
+ template,
1431
+ }]
1432
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
1433
+ type: ViewChild,
1434
+ args: [rootId]
1435
+ }], widgetOid: [{
1436
+ type: Input
1437
+ }], dashboardOid: [{
1438
+ type: Input
1439
+ }], filters: [{
1440
+ type: Input
1441
+ }], highlights: [{
1442
+ type: Input
1443
+ }], filtersMergeStrategy: [{
1444
+ type: Input
1445
+ }], title: [{
1446
+ type: Input
1447
+ }], description: [{
1448
+ type: Input
1449
+ }], styleOptions: [{
1450
+ type: Input
1451
+ }], widgetStyleOptions: [{
1452
+ type: Input
1453
+ }], drilldownOptions: [{
1454
+ type: Input
1455
+ }] } });
1456
+
1457
+ /**
1458
+ * SDK UI Module, which is a container for components.
1459
+ *
1460
+ * @example
1461
+ * Example of importing `SdkUiModule` and injecting {@link SisenseContextConfig} into your application:
1462
+ *
1463
+ * ```ts
1464
+ * export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
1465
+ * url="<instance url>" // replace with the URL of your Sisense instance
1466
+ * token="<api token>" // replace with the API token of your user account
1467
+ * defaultDataSource: DM.DataSource,
1468
+ * };
1469
+ *
1470
+ * @NgModule({
1471
+ * imports: [
1472
+ * BrowserModule,
1473
+ * SdkUiModule,
1474
+ * ],
1475
+ * declarations: [AppComponent],
1476
+ * providers: [
1477
+ * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },
1478
+ * ],
1479
+ * bootstrap: [AppComponent],
1480
+ * })
1481
+ * ```
1482
+ */
1483
+ class SdkUiModule {
1484
+ }
1485
+ SdkUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1486
+ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, declarations: [BasicMemberFilterTileComponent,
1487
+ ChartComponent,
1488
+ TableComponent,
1489
+ ChartWidgetComponent,
1490
+ ColumnChartComponent,
1491
+ BarChartComponent,
1492
+ AreaChartComponent,
1493
+ LineChartComponent,
1494
+ IndicatorChartComponent,
1495
+ ScatterChartComponent,
1496
+ PieChartComponent,
1497
+ FunnelChartComponent,
1498
+ PolarChartComponent,
1499
+ TreemapChartComponent,
1500
+ TableWidgetComponent,
1501
+ DashboardWidgetComponent], imports: [CommonModule], exports: [BasicMemberFilterTileComponent,
1502
+ ChartComponent,
1503
+ TableComponent,
1504
+ ChartWidgetComponent,
1505
+ ColumnChartComponent,
1506
+ BarChartComponent,
1507
+ AreaChartComponent,
1508
+ LineChartComponent,
1509
+ IndicatorChartComponent,
1510
+ ScatterChartComponent,
1511
+ PieChartComponent,
1512
+ FunnelChartComponent,
1513
+ PolarChartComponent,
1514
+ TreemapChartComponent,
1515
+ TableWidgetComponent,
1516
+ DashboardWidgetComponent] });
1517
+ SdkUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, imports: [CommonModule] });
1518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, decorators: [{
1519
+ type: NgModule,
1520
+ args: [{
1521
+ declarations: [
1522
+ BasicMemberFilterTileComponent,
1523
+ ChartComponent,
1524
+ TableComponent,
1525
+ ChartWidgetComponent,
1526
+ ColumnChartComponent,
1527
+ BarChartComponent,
1528
+ AreaChartComponent,
1529
+ LineChartComponent,
1530
+ IndicatorChartComponent,
1531
+ ScatterChartComponent,
1532
+ PieChartComponent,
1533
+ FunnelChartComponent,
1534
+ PolarChartComponent,
1535
+ TreemapChartComponent,
1536
+ TableWidgetComponent,
1537
+ DashboardWidgetComponent,
1538
+ ],
1539
+ imports: [CommonModule],
1540
+ exports: [
1541
+ BasicMemberFilterTileComponent,
1542
+ ChartComponent,
1543
+ TableComponent,
1544
+ ChartWidgetComponent,
1545
+ ColumnChartComponent,
1546
+ BarChartComponent,
1547
+ AreaChartComponent,
1548
+ LineChartComponent,
1549
+ IndicatorChartComponent,
1550
+ ScatterChartComponent,
1551
+ PieChartComponent,
1552
+ FunnelChartComponent,
1553
+ PolarChartComponent,
1554
+ TreemapChartComponent,
1555
+ TableWidgetComponent,
1556
+ DashboardWidgetComponent,
1557
+ ],
1558
+ providers: [],
1559
+ }]
1560
+ }] });
1561
+
1562
+ class QueryService {
1563
+ constructor(sisenseContextService) {
1564
+ this.sisenseContextService = sisenseContextService;
1565
+ }
1566
+ async executeQuery(params) {
1567
+ const { dataSource, dimensions, measures, filters, highlights, count, offset, onBeforeQuery } = params;
1568
+ const app = await this.sisenseContextService.getApp();
1569
+ const data = await executeQuery({ dataSource, dimensions, measures, filters, highlights, count, offset }, app, { onBeforeQuery });
1570
+ return { data };
1571
+ }
1572
+ async executeQueryByWidgetId(params) {
1573
+ const app = await this.sisenseContextService.getApp();
1574
+ return executeQueryByWidgetId({
1575
+ ...params,
1576
+ app,
1577
+ });
1578
+ }
1579
+ }
1580
+ QueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, deps: [{ token: SisenseContextService }], target: i0.ɵɵFactoryTarget.Injectable });
1581
+ QueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, providedIn: 'root' });
1582
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: QueryService, decorators: [{
1583
+ type: Injectable,
1584
+ args: [{
1585
+ providedIn: 'root',
1586
+ }]
1587
+ }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
1588
+
1589
+ /*
1590
+ * Public API Surface of @sisense/sdk-ui-angular
1591
+ */
1592
+
1593
+ /**
1594
+ * Generated bundle index. Do not edit.
1595
+ */
1596
+
1597
+ export { AreaChartComponent, BarChartComponent, BasicMemberFilterTileComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, DashboardWidgetComponent, FunnelChartComponent, IndicatorChartComponent, LineChartComponent, PieChartComponent, PolarChartComponent, QueryService, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, SdkUiModule, SisenseContextService, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TreemapChartComponent };
1598
+ //# sourceMappingURL=sisense-sdk-ui-angular.mjs.map