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