@sisense/sdk-ui-angular 1.5.0 → 1.6.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 (105) hide show
  1. package/dist/esm2020/lib/component-wrapper-helpers/context-connectors.mjs +13 -1
  2. package/dist/esm2020/lib/components/charts/area-chart.component.mjs +137 -0
  3. package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +100 -0
  4. package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +136 -0
  5. package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +129 -0
  6. package/dist/esm2020/lib/components/charts/chart.component.mjs +171 -0
  7. package/dist/esm2020/lib/components/charts/column-chart.component.mjs +137 -0
  8. package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +135 -0
  9. package/dist/esm2020/lib/components/charts/index.mjs +18 -0
  10. package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +107 -0
  11. package/dist/esm2020/lib/components/charts/line-chart.component.mjs +135 -0
  12. package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +137 -0
  13. package/dist/esm2020/lib/components/charts/pivot-table.component.mjs +116 -0
  14. package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +136 -0
  15. package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +140 -0
  16. package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +108 -0
  17. package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +137 -0
  18. package/dist/esm2020/lib/components/charts/table.component.mjs +94 -0
  19. package/dist/esm2020/lib/components/{treemap-chart.component.mjs → charts/treemap-chart.component.mjs} +52 -1
  20. package/dist/esm2020/lib/components/context-menu.component.mjs +3 -1
  21. package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +3 -1
  22. package/dist/esm2020/lib/components/filters/basic-member-filter-tile.component.mjs +62 -0
  23. package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +141 -0
  24. package/dist/esm2020/lib/components/filters/index.mjs +4 -0
  25. package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +131 -0
  26. package/dist/esm2020/lib/components/index.mjs +4 -25
  27. package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +167 -0
  28. package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +115 -0
  29. package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +174 -0
  30. package/dist/esm2020/lib/components/widgets/index.mjs +5 -0
  31. package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +104 -0
  32. package/dist/esm2020/lib/sdk-ui.module.mjs +3 -1
  33. package/dist/esm2020/lib/services/dashboard.service.mjs +6 -1
  34. package/dist/esm2020/lib/services/query.service.mjs +7 -2
  35. package/dist/esm2020/lib/services/sisense-context.service.mjs +7 -1
  36. package/dist/esm2020/lib/services/theme.service.mjs +7 -1
  37. package/dist/esm2020/public-api.mjs +9 -1
  38. package/dist/esm2020/version.mjs +2 -2
  39. package/dist/fesm2015/sisense-sdk-ui-angular.mjs +1721 -708
  40. package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
  41. package/dist/fesm2020/sisense-sdk-ui-angular.mjs +1722 -709
  42. package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
  43. package/dist/lib/component-wrapper-helpers/context-connectors.d.ts +12 -0
  44. package/dist/lib/components/{area-chart.component.d.ts → charts/area-chart.component.d.ts} +53 -2
  45. package/dist/lib/components/{areamap-chart.component.d.ts → charts/areamap-chart.component.d.ts} +40 -1
  46. package/dist/lib/components/{bar-chart.component.d.ts → charts/bar-chart.component.d.ts} +52 -2
  47. package/dist/lib/components/{boxplot-chart.component.d.ts → charts/boxplot-chart.component.d.ts} +45 -2
  48. package/dist/lib/components/{chart.component.d.ts → charts/chart.component.d.ts} +6 -4
  49. package/dist/lib/components/{column-chart.component.d.ts → charts/column-chart.component.d.ts} +53 -2
  50. package/dist/lib/components/{funnel-chart.component.d.ts → charts/funnel-chart.component.d.ts} +52 -2
  51. package/dist/lib/components/charts/index.d.ts +17 -0
  52. package/dist/lib/components/{indicator-chart.component.d.ts → charts/indicator-chart.component.d.ts} +57 -1
  53. package/dist/lib/components/{line-chart.component.d.ts → charts/line-chart.component.d.ts} +52 -2
  54. package/dist/lib/components/{pie-chart.component.d.ts → charts/pie-chart.component.d.ts} +53 -2
  55. package/dist/lib/components/{pivot-table.component.d.ts → charts/pivot-table.component.d.ts} +53 -2
  56. package/dist/lib/components/{polar-chart.component.d.ts → charts/polar-chart.component.d.ts} +53 -2
  57. package/dist/lib/components/{scatter-chart.component.d.ts → charts/scatter-chart.component.d.ts} +50 -2
  58. package/dist/lib/components/{scattermap-chart.component.d.ts → charts/scattermap-chart.component.d.ts} +49 -2
  59. package/dist/lib/components/{sunburst-chart.component.d.ts → charts/sunburst-chart.component.d.ts} +53 -2
  60. package/dist/lib/components/{table.component.d.ts → charts/table.component.d.ts} +32 -2
  61. package/dist/lib/components/{treemap-chart.component.d.ts → charts/treemap-chart.component.d.ts} +53 -2
  62. package/dist/lib/components/context-menu.component.d.ts +2 -0
  63. package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +2 -0
  64. package/dist/lib/components/{date-range-filter-tile.component.d.ts → filters/date-range-filter-tile.component.d.ts} +43 -3
  65. package/dist/lib/components/filters/index.d.ts +3 -0
  66. package/dist/lib/components/{member-filter-tile.component.d.ts → filters/member-filter-tile.component.d.ts} +39 -3
  67. package/dist/lib/components/index.d.ts +3 -24
  68. package/dist/lib/components/{chart-widget.component.d.ts → widgets/chart-widget.component.d.ts} +58 -3
  69. package/dist/lib/components/{dashboard-widget.component.d.ts → widgets/dashboard-widget.component.d.ts} +26 -2
  70. package/dist/lib/components/{drilldown-widget.component.d.ts → widgets/drilldown-widget.component.d.ts} +5 -2
  71. package/dist/lib/components/widgets/index.d.ts +4 -0
  72. package/dist/lib/components/{table-widget.component.d.ts → widgets/table-widget.component.d.ts} +37 -2
  73. package/dist/lib/sdk-ui.module.d.ts +26 -24
  74. package/dist/lib/services/dashboard.service.d.ts +5 -0
  75. package/dist/lib/services/query.service.d.ts +6 -1
  76. package/dist/lib/services/sisense-context.service.d.ts +6 -0
  77. package/dist/lib/services/theme.service.d.ts +6 -0
  78. package/dist/package.json +1 -1
  79. package/dist/public-api.d.ts +8 -0
  80. package/dist/version.d.ts +1 -1
  81. package/package.json +4 -4
  82. package/dist/esm2020/lib/components/area-chart.component.mjs +0 -86
  83. package/dist/esm2020/lib/components/areamap-chart.component.mjs +0 -61
  84. package/dist/esm2020/lib/components/bar-chart.component.mjs +0 -86
  85. package/dist/esm2020/lib/components/basic-member-filter-tile.component.mjs +0 -62
  86. package/dist/esm2020/lib/components/boxplot-chart.component.mjs +0 -86
  87. package/dist/esm2020/lib/components/chart-widget.component.mjs +0 -112
  88. package/dist/esm2020/lib/components/chart.component.mjs +0 -169
  89. package/dist/esm2020/lib/components/column-chart.component.mjs +0 -86
  90. package/dist/esm2020/lib/components/dashboard-widget.component.mjs +0 -91
  91. package/dist/esm2020/lib/components/date-range-filter-tile.component.mjs +0 -101
  92. package/dist/esm2020/lib/components/drilldown-widget.component.mjs +0 -171
  93. package/dist/esm2020/lib/components/funnel-chart.component.mjs +0 -85
  94. package/dist/esm2020/lib/components/indicator-chart.component.mjs +0 -51
  95. package/dist/esm2020/lib/components/line-chart.component.mjs +0 -85
  96. package/dist/esm2020/lib/components/member-filter-tile.component.mjs +0 -95
  97. package/dist/esm2020/lib/components/pie-chart.component.mjs +0 -86
  98. package/dist/esm2020/lib/components/pivot-table.component.mjs +0 -65
  99. package/dist/esm2020/lib/components/polar-chart.component.mjs +0 -85
  100. package/dist/esm2020/lib/components/scatter-chart.component.mjs +0 -92
  101. package/dist/esm2020/lib/components/scattermap-chart.component.mjs +0 -61
  102. package/dist/esm2020/lib/components/sunburst-chart.component.mjs +0 -86
  103. package/dist/esm2020/lib/components/table-widget.component.mjs +0 -69
  104. package/dist/esm2020/lib/components/table.component.mjs +0 -64
  105. /package/dist/lib/components/{basic-member-filter-tile.component.d.ts → filters/basic-member-filter-tile.component.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, ViewChild, Input, Output, InjectionToken, Injectable, Inject, NgModule, Optional } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
- import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getDefaultThemeSettings, getThemeSettingsByOid, Chart, Table, ChartWidget, TableWidget, DashboardWidget, MemberFilterTile, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, DateRangeFilterTile, DrilldownBreadcrumbs, ContextMenu, PivotTable } from '@sisense/sdk-ui-preact';
4
+ import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getDefaultThemeSettings, getThemeSettingsByOid, MemberFilterTile, DateRangeFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
5
5
  export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
6
6
  import { map, BehaviorSubject } from 'rxjs';
7
7
  import { __decorate } from 'tslib';
@@ -80,6 +80,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
80
80
  type: Output
81
81
  }] } });
82
82
 
83
+ /**
84
+ * Creates theme context connector
85
+ *
86
+ * @param themeService - The theme service
87
+ * @internal
88
+ */
83
89
  const createThemeContextConnector = (themeService) => {
84
90
  return {
85
91
  prepareContext() {
@@ -91,6 +97,12 @@ const createThemeContextConnector = (themeService) => {
91
97
  renderContextProvider: createContextProviderRenderer(CustomThemeProvider),
92
98
  };
93
99
  };
100
+ /**
101
+ * Creates Sisense context connector
102
+ *
103
+ * @param sisenseContextService - The Sisense context service
104
+ * @internal
105
+ */
94
106
  const createSisenseContextConnector = (sisenseContextService) => {
95
107
  return {
96
108
  async prepareContext() {
@@ -135,8 +147,14 @@ const createSisenseContextConnector = (sisenseContextService) => {
135
147
  * bootstrap: [AppComponent],
136
148
  * })
137
149
  * ```
150
+ * @group Contexts
138
151
  */
139
152
  const SISENSE_CONTEXT_CONFIG_TOKEN = new InjectionToken('Props for connecting to Sisense instance');
153
+ /**
154
+ * Service for working with Sisense Fusion context.
155
+ *
156
+ * @group Contexts
157
+ */
140
158
  class SisenseContextService {
141
159
  constructor(sisenseContextConfig) {
142
160
  this.appPromise = createClientApplication(sisenseContextConfig);
@@ -167,6 +185,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
167
185
  args: [SISENSE_CONTEXT_CONFIG_TOKEN]
168
186
  }] }]; } });
169
187
 
188
+ /**
189
+ * Service for executing data queries.
190
+ *
191
+ * @group Queries
192
+ */
170
193
  let QueryService = class QueryService {
171
194
  constructor(sisenseContextService) {
172
195
  this.sisenseContextService = sisenseContextService;
@@ -179,7 +202,7 @@ let QueryService = class QueryService {
179
202
  * [External Charts Guide](/guides/sdk/guides/charts/guide-external-charts.html#query)
180
203
  *
181
204
  * @param params - Query parameters
182
- * return Query result
205
+ * @return Query result
183
206
  */
184
207
  async executeQuery(params) {
185
208
  const { dataSource, dimensions, measures, filters, highlights, count, offset, onBeforeQuery } = params;
@@ -223,6 +246,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
223
246
  }]
224
247
  }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
225
248
 
249
+ /**
250
+ * Service for working with Sisense Fusion dashboards.
251
+ *
252
+ * @group Fusion Assets
253
+ */
226
254
  let DashboardService = class DashboardService {
227
255
  constructor(sisenseContextService) {
228
256
  this.sisenseContextService = sisenseContextService;
@@ -277,7 +305,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
277
305
  }]
278
306
  }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
279
307
 
280
- var packageVersion = '1.5.0';
308
+ var packageVersion = '1.6.0';
281
309
 
282
310
  function Trackable(target, propertyKey, descriptor) {
283
311
  const originalMethod = descriptor.value;
@@ -350,8 +378,14 @@ async function track(action, methodName) {
350
378
  * bootstrap: [AppComponent],
351
379
  * })
352
380
  * ```
381
+ * @group Contexts
353
382
  */
354
383
  const THEME_CONFIG_TOKEN = new InjectionToken('theme configuration');
384
+ /**
385
+ * Service for working with Sisense Fusion themes.
386
+ *
387
+ * @group Contexts
388
+ */
355
389
  let ThemeService = class ThemeService {
356
390
  constructor(sisenseContextService, themeConfig) {
357
391
  this.sisenseContextService = sisenseContextService;
@@ -406,6 +440,264 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
406
440
  args: [THEME_CONFIG_TOKEN]
407
441
  }] }]; } });
408
442
 
443
+ /**
444
+ * Member Filter Tile Component
445
+ *
446
+ * @example
447
+ * ```html
448
+ * <csdk-member-filter-tile
449
+ * title="Years Filter"
450
+ * [attribute]="DM.ER.Date.Years"
451
+ * [filter]="memberFilterTileProps.yearFilter"
452
+ * (filterChange)="memberFilterTileProps.setYearFilter($event)"
453
+ * />
454
+ * ```
455
+ * ```ts
456
+ * import { Component } from '@angular/core';
457
+ * import { Member } from '@sisense/sdk-ui-angular';
458
+ * import { Filter, filterFactory } from '@sisense/sdk-data';
459
+ * import * as DM from '../../assets/sample-healthcare-model';
460
+ *
461
+ * @Component({
462
+ * selector: 'app-filters',
463
+ * templateUrl: './filters.component.html',
464
+ * styleUrls: ['./filters.component.scss'],
465
+ * })
466
+ * export class FiltersComponent {
467
+ * DM = DM;
468
+ * memberFilterTileProps = {
469
+ * yearFilter: filterFactory.members(DM.ER.Date.Years, ['2013-01-01T00:00:00']),
470
+ * setYearFilter({ filter }: { filter: Filter | null }) {
471
+ * if (filter) {
472
+ * this.yearFilter = filter;
473
+ * }
474
+ * },
475
+ * };
476
+ * }
477
+ * ```
478
+ * <img src="media://angular-member-filter-tile-example.png" width="800px" />
479
+ *
480
+ * @group Filter Tiles
481
+ */
482
+ class MemberFilterTileComponent {
483
+ /**
484
+ * Constructor for the `MemberFilterTileComponent`.
485
+ *
486
+ * @param sisenseContextService - Sisense context service
487
+ * @param themeService - Theme service
488
+ */
489
+ constructor(
490
+ /**
491
+ * Sisense context service
492
+ *
493
+ * @category Constructor
494
+ */
495
+ sisenseContextService,
496
+ /**
497
+ * Theme service
498
+ *
499
+ * @category Constructor
500
+ */
501
+ themeService) {
502
+ this.sisenseContextService = sisenseContextService;
503
+ this.themeService = themeService;
504
+ /**
505
+ * {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.onChange}
506
+ */
507
+ this.filterChange = new EventEmitter();
508
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
509
+ createSisenseContextConnector(this.sisenseContextService),
510
+ createThemeContextConnector(this.themeService),
511
+ ]);
512
+ }
513
+ /**
514
+ * @internal
515
+ */
516
+ ngAfterViewInit() {
517
+ this.componentAdapter.render(this.preactRef.nativeElement);
518
+ }
519
+ /**
520
+ * @internal
521
+ */
522
+ ngOnChanges() {
523
+ if (this.preactRef) {
524
+ this.componentAdapter.render(this.preactRef.nativeElement);
525
+ }
526
+ }
527
+ createPreactComponent() {
528
+ const props = {
529
+ title: this.title,
530
+ dataSource: this.dataSource,
531
+ attribute: this.attribute,
532
+ filter: this.filter,
533
+ onChange: (...[filter]) => this.filterChange.emit({ filter }),
534
+ };
535
+ return createElement(MemberFilterTile, props);
536
+ }
537
+ /**
538
+ * @internal
539
+ */
540
+ ngOnDestroy() {
541
+ this.componentAdapter.destroy();
542
+ }
543
+ }
544
+ MemberFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MemberFilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
545
+ MemberFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MemberFilterTileComponent, selector: "csdk-member-filter-tile", inputs: { title: "title", dataSource: "dataSource", attribute: "attribute", filter: "filter" }, outputs: { filterChange: "filterChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MemberFilterTileComponent, decorators: [{
547
+ type: Component,
548
+ args: [{
549
+ selector: 'csdk-member-filter-tile',
550
+ template,
551
+ }]
552
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
553
+ type: ViewChild,
554
+ args: [rootId]
555
+ }], title: [{
556
+ type: Input
557
+ }], dataSource: [{
558
+ type: Input
559
+ }], attribute: [{
560
+ type: Input
561
+ }], filter: [{
562
+ type: Input
563
+ }], filterChange: [{
564
+ type: Output
565
+ }] } });
566
+
567
+ /**
568
+ * Date Range Filter Tile Component
569
+ *
570
+ * @example
571
+ * ```html
572
+ * <csdk-date-range-filter-tile
573
+ * title="dateRangeFilterTileProps.title"
574
+ * [attribute]="dateRangeFilterTileProps.attribute"
575
+ * [filter]="dateRangeFilterTileProps.filter"
576
+ * (filterChange)="dateRangeFilterTileProps.setFilter($event)"
577
+ * />
578
+ * ```
579
+ * ```ts
580
+ * import { Component } from '@angular/core';
581
+ * import { Member } from '@sisense/sdk-ui-angular';
582
+ * import { Filter, filterFactory } from '@sisense/sdk-data';
583
+ * import * as DM from '../../assets/sample-healthcare-model';
584
+ *
585
+ * @Component({
586
+ * selector: 'app-filters',
587
+ * templateUrl: './filters.component.html',
588
+ * styleUrls: ['./filters.component.scss'],
589
+ * })
590
+ * export class FiltersComponent {
591
+ * DM = DM;
592
+
593
+ * dateRangeFilterTileProps = {
594
+ * title: 'Range Filter',
595
+ * attribute: DM.ER.Date.Years,
596
+ * filter: filterFactory.dateRange(DM.ER.Date.Years),
597
+ * setFilter({ filter }: { filter: Filter | null }) {
598
+ * console.log(filter);
599
+ * if (filter) {
600
+ * this.filter = filter;
601
+ * }
602
+ * },
603
+ * };
604
+ * }
605
+ * ```
606
+ * <img src="media://angular-date-range-filter-tile-example.png" width="800px" />
607
+ *
608
+ * @group Filter Tiles
609
+ */
610
+ class DateRangeFilterTileComponent {
611
+ /**
612
+ * Constructor for the `DateRangeFilterTileComponent`.
613
+ *
614
+ * @param sisenseContextService - Sisense context service
615
+ * @param themeService - Theme service
616
+ */
617
+ constructor(
618
+ /**
619
+ * Sisense context service
620
+ *
621
+ * @category Constructor
622
+ */
623
+ sisenseContextService,
624
+ /**
625
+ * Theme service
626
+ *
627
+ * @category Constructor
628
+ */
629
+ themeService) {
630
+ this.sisenseContextService = sisenseContextService;
631
+ this.themeService = themeService;
632
+ /**
633
+ * {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onChange}
634
+ */
635
+ this.filterChange = new EventEmitter();
636
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
637
+ createSisenseContextConnector(this.sisenseContextService),
638
+ createThemeContextConnector(this.themeService),
639
+ ]);
640
+ }
641
+ /**
642
+ * @internal
643
+ */
644
+ ngAfterViewInit() {
645
+ this.componentAdapter.render(this.preactRef.nativeElement);
646
+ }
647
+ /**
648
+ * @internal
649
+ */
650
+ ngOnChanges() {
651
+ if (this.preactRef) {
652
+ this.componentAdapter.render(this.preactRef.nativeElement);
653
+ }
654
+ }
655
+ createPreactComponent() {
656
+ const props = {
657
+ title: this.title,
658
+ attribute: this.attribute,
659
+ dataSource: this.dataSource,
660
+ filter: this.filter,
661
+ earliestDate: this.earliestDate,
662
+ lastDate: this.lastDate,
663
+ onChange: (...[filter]) => this.filterChange.emit({ filter }),
664
+ };
665
+ return createElement(DateRangeFilterTile, props);
666
+ }
667
+ /**
668
+ * @internal
669
+ */
670
+ ngOnDestroy() {
671
+ this.componentAdapter.destroy();
672
+ }
673
+ }
674
+ DateRangeFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRangeFilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
675
+ DateRangeFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateRangeFilterTileComponent, selector: "csdk-date-range-filter-tile", inputs: { title: "title", attribute: "attribute", dataSource: "dataSource", filter: "filter", earliestDate: "earliestDate", lastDate: "lastDate" }, outputs: { filterChange: "filterChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRangeFilterTileComponent, decorators: [{
677
+ type: Component,
678
+ args: [{
679
+ selector: 'csdk-date-range-filter-tile',
680
+ template,
681
+ }]
682
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
683
+ type: ViewChild,
684
+ args: [rootId]
685
+ }], title: [{
686
+ type: Input
687
+ }], attribute: [{
688
+ type: Input
689
+ }], dataSource: [{
690
+ type: Input
691
+ }], filter: [{
692
+ type: Input
693
+ }], earliestDate: [{
694
+ type: Input
695
+ }], lastDate: [{
696
+ type: Input
697
+ }], filterChange: [{
698
+ type: Output
699
+ }] } });
700
+
409
701
  /**
410
702
  * An Angular component used for easily switching chart types or rendering multiple series of different chart types.
411
703
  *
@@ -452,7 +744,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
452
744
  * />
453
745
  * ```
454
746
  *
455
- * <img src="media://angular-chart-data-source-example-1.png" width="800px" />
747
+ * <img src="media://angular-chart-example.png" width="800px" />
748
+ *
749
+ * @group Charts
456
750
  */
457
751
  class ChartComponent {
458
752
  /**
@@ -570,6 +864,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
570
864
 
571
865
  /**
572
866
  * Table with aggregation and pagination.
867
+ *
868
+ * @example
869
+ * ```html
870
+ * <csdk-table [dataSet]="table.dataSet" [dataOptions]="table.dataOptions" [filters]="filters" />
871
+ * ```
872
+ * ```ts
873
+ import { Component } from '@angular/core';
874
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
875
+ import * as DM from '../../assets/sample-healthcare-model';
876
+
877
+ @Component({
878
+ selector: 'app-analytics',
879
+ templateUrl: './analytics.component.html',
880
+ styleUrls: ['./analytics.component.scss'],
881
+ })
882
+ export class AnalyticsComponent {
883
+ DM = DM;
884
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
885
+ table = {
886
+ dataSet: DM.DataSource,
887
+ dataOptions: {
888
+ columns: [DM.Admissions.Patient_ID, measureFactory.sum(DM.Admissions.Cost_of_admission)],
889
+ },
890
+ };
891
+
892
+ }
893
+ * ```
894
+ * <img src="media://angular-table-chart-example.png" width="800px" />
895
+ *
896
+ * @group Data Grids
573
897
  */
574
898
  class TableComponent {
575
899
  constructor(sisenseContextService, themeService) {
@@ -626,114 +950,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
626
950
  }] } });
627
951
 
628
952
  /**
629
- * The Chart Widget component extending {@link ChartComponent} to support widget style options.
630
- */
631
- class ChartWidgetComponent {
632
- constructor(sisenseContextService, themeService) {
633
- this.sisenseContextService = sisenseContextService;
634
- this.themeService = themeService;
635
- /**
636
- * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointClick}
637
- *
638
- * @category Callbacks
639
- */
640
- this.dataPointClick = new EventEmitter();
641
- /**
642
- * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointContextMenu}
643
- *
644
- * @category Callbacks
645
- */
646
- this.dataPointContextMenu = new EventEmitter();
647
- /**
648
- * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointsSelected}
649
- *
650
- * @category Callbacks
651
- */
652
- this.dataPointsSelect = new EventEmitter();
653
- this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
654
- createSisenseContextConnector(this.sisenseContextService),
655
- createThemeContextConnector(this.themeService),
656
- ]);
657
- }
658
- /** @internal */
659
- ngAfterViewInit() {
660
- this.componentAdapter.render(this.preactRef.nativeElement);
661
- }
662
- /** @internal */
663
- ngOnChanges() {
664
- if (this.preactRef) {
665
- this.componentAdapter.render(this.preactRef.nativeElement);
666
- }
667
- }
668
- createPreactComponent() {
669
- const props = {
670
- chartType: this.chartType,
671
- dataSource: this.dataSource,
672
- dataOptions: this.dataOptions,
673
- filters: this.filters,
674
- highlights: this.highlights,
675
- styleOptions: this.styleOptions,
676
- drilldownOptions: this.drilldownOptions,
677
- title: this.title,
678
- description: this.description,
679
- highlightSelectionDisabled: this.highlightSelectionDisabled,
680
- onBeforeRender: this.beforeRender?.bind(this),
681
- onDataPointClick: (...[point, nativeEvent]) => this.dataPointClick.emit({ point, nativeEvent }),
682
- onDataPointContextMenu: (...[point, nativeEvent]) => this.dataPointContextMenu.emit({ point, nativeEvent }),
683
- onDataPointsSelected: (...[points, nativeEvent]) => this.dataPointsSelect.emit({ points, nativeEvent }),
684
- };
685
- return createElement(ChartWidget, props);
686
- }
687
- /** @internal */
688
- ngOnDestroy() {
689
- this.componentAdapter.destroy();
690
- }
691
- }
692
- 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 });
693
- 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", drilldownOptions: "drilldownOptions", title: "title", description: "description", highlightSelectionDisabled: "highlightSelectionDisabled", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, decorators: [{
695
- type: Component,
696
- args: [{
697
- selector: 'csdk-chart-widget',
698
- template,
699
- }]
700
- }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
701
- type: ViewChild,
702
- args: [rootId]
703
- }], chartType: [{
704
- type: Input
705
- }], dataSource: [{
706
- type: Input
707
- }], dataOptions: [{
708
- type: Input
709
- }], filters: [{
710
- type: Input
711
- }], highlights: [{
712
- type: Input
713
- }], styleOptions: [{
714
- type: Input
715
- }], drilldownOptions: [{
716
- type: Input
717
- }], title: [{
718
- type: Input
719
- }], description: [{
720
- type: Input
721
- }], highlightSelectionDisabled: [{
722
- type: Input
723
- }], beforeRender: [{
724
- type: Input
725
- }], dataPointClick: [{
726
- type: Output
727
- }], dataPointContextMenu: [{
728
- type: Output
729
- }], dataPointsSelect: [{
730
- type: Output
731
- }] } });
732
-
733
- /**
734
- * A component representing categorical data with vertical rectangular bars
735
- * whose heights are proportional to the values that they represent.
736
- * See [Column Chart](https://docs.sisense.com/main/SisenseLinux/column-chart.htm) for more information.
953
+ * A component representing categorical data with vertical rectangular bars
954
+ * whose heights are proportional to the values that they represent.
955
+ * See [Column Chart](https://docs.sisense.com/main/SisenseLinux/column-chart.htm) for more information.
956
+ *
957
+ * @example
958
+ * ```html
959
+ * <csdk-column-chart
960
+ * [dataSet]="chart.dataSet"
961
+ * [dataOptions]="chart.dataOptions"
962
+ * [highlights]="filters"
963
+ * [beforeRender]="onBeforeRender"
964
+ * (dataPointClick)="logArguments($event)"
965
+ * (dataPointContextMenu)="logArguments($event)"
966
+ * (dataPointsSelect)="logArguments($event)"
967
+ * />
968
+ * ```
969
+ * ```ts
970
+ import { Component } from '@angular/core';
971
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
972
+ import * as DM from '../../assets/sample-healthcare-model';
973
+ import type { ChartType } from '@sisense/sdk-ui-angular';
974
+
975
+ @Component({
976
+ selector: 'app-analytics',
977
+ templateUrl: './analytics.component.html',
978
+ styleUrls: ['./analytics.component.scss'],
979
+ })
980
+ export class AnalyticsComponent {
981
+ DM = DM;
982
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
983
+ chart = {
984
+ chartType: 'column' as ChartType,
985
+ dataSet: DM.DataSource,
986
+ dataOptions: {
987
+ category: [DM.Divisions.Divison_name],
988
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
989
+ breakBy: [],
990
+ },
991
+ };
992
+
993
+ onBeforeRender(options: any) {
994
+ console.log('beforeRender');
995
+ console.log(options);
996
+ return options;
997
+ }
998
+
999
+ logArguments(...args: any[]) {
1000
+ console.log(args);
1001
+ }
1002
+ }
1003
+ * ```
1004
+ * <img src="media://angular-column-chart-example.png" width="800px" />
1005
+ *
1006
+ * @group Charts
737
1007
  */
738
1008
  class ColumnChartComponent {
739
1009
  constructor() {
@@ -817,6 +1087,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
817
1087
  * A component representing categorical data with horizontal rectangular bars,
818
1088
  * whose lengths are proportional to the values that they represent.
819
1089
  * See [Bar Chart](https://docs.sisense.com/main/SisenseLinux/bar-chart.htm) for more information.
1090
+ *
1091
+ * @example
1092
+ * ```html
1093
+ * <csdk-bar-chart
1094
+ * [dataSet]="chart.dataSet"
1095
+ * [dataOptions]="chart.dataOptions"
1096
+ * [highlights]="filters"
1097
+ * [beforeRender]="onBeforeRender"
1098
+ * (dataPointClick)="logArguments($event)"
1099
+ * (dataPointContextMenu)="logArguments($event)"
1100
+ * (dataPointsSelect)="logArguments($event)"
1101
+ * /> * ```
1102
+ * ```ts
1103
+ import { Component } from '@angular/core';
1104
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
1105
+ import * as DM from '../../assets/sample-healthcare-model';
1106
+ import type { ChartType } from '@sisense/sdk-ui-angular';
1107
+
1108
+ @Component({
1109
+ selector: 'app-analytics',
1110
+ templateUrl: './analytics.component.html',
1111
+ styleUrls: ['./analytics.component.scss'],
1112
+ })
1113
+ export class AnalyticsComponent {
1114
+ DM = DM;
1115
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1116
+ chart = {
1117
+ chartType: 'column' as ChartType,
1118
+ dataSet: DM.DataSource,
1119
+ dataOptions: {
1120
+ category: [DM.Divisions.Divison_name],
1121
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1122
+ breakBy: [],
1123
+ },
1124
+ };
1125
+
1126
+ onBeforeRender(options: any) {
1127
+ console.log('beforeRender');
1128
+ console.log(options);
1129
+ return options;
1130
+ }
1131
+
1132
+ logArguments(...args: any[]) {
1133
+ console.log(args);
1134
+ }
1135
+ }
1136
+ * ```
1137
+ * <img src="media://angular-bar-chart-example.png" width="800px" />
1138
+ *
1139
+ * @group Charts
820
1140
  */
821
1141
  class BarChartComponent {
822
1142
  constructor() {
@@ -900,6 +1220,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
900
1220
  * A component similar to a {@link LineChartComponent},
901
1221
  * but with filled in areas under each line and an option to display them as stacked.
902
1222
  * More info on [Sisense Documentation page](https://docs.sisense.com/main/SisenseLinux/area-chart.htm).
1223
+ *
1224
+ * @example
1225
+ * ```html
1226
+ * <csdk-area-chart
1227
+ * [dataSet]="chart.dataSet"
1228
+ * [dataOptions]="chart.dataOptions"
1229
+ * [highlights]="filters"
1230
+ * [beforeRender]="onBeforeRender"
1231
+ * (dataPointClick)="logArguments($event)"
1232
+ * (dataPointContextMenu)="logArguments($event)"
1233
+ * (dataPointsSelect)="logArguments($event)"
1234
+ * />
1235
+ * ```
1236
+ * ```ts
1237
+ import { Component } from '@angular/core';
1238
+ import { measureFactory, filterFactory, Filter } from '@sisense/sdk-data';
1239
+ import * as DM from '../../assets/sample-healthcare-model';
1240
+ import type { ChartType } from '@sisense/sdk-ui-angular';
1241
+
1242
+ @Component({
1243
+ selector: 'app-analytics',
1244
+ templateUrl: './analytics.component.html',
1245
+ styleUrls: ['./analytics.component.scss'],
1246
+ })
1247
+ export class AnalyticsComponent {
1248
+ DM = DM;
1249
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1250
+ chart = {
1251
+ chartType: 'column' as ChartType,
1252
+ dataSet: DM.DataSource,
1253
+ dataOptions: {
1254
+ category: [DM.Divisions.Divison_name],
1255
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1256
+ breakBy: [],
1257
+ },
1258
+ };
1259
+
1260
+ onBeforeRender(options: any) {
1261
+ console.log('beforeRender');
1262
+ console.log(options);
1263
+ return options;
1264
+ }
1265
+
1266
+ logArguments(...args: any[]) {
1267
+ console.log(args);
1268
+ }
1269
+ }
1270
+ * ```
1271
+ * <img src="media://angular-area-chart-example.png" width="800px" />
1272
+ *
1273
+ * @group Charts
903
1274
  */
904
1275
  class AreaChartComponent {
905
1276
  constructor() {
@@ -982,6 +1353,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
982
1353
  /**
983
1354
  * A component displaying data as a series of points connected by a line. Used to show trends or changes over time.
984
1355
  * See [Line Chart](https://docs.sisense.com/main/SisenseLinux/line-chart.htm) for more information.
1356
+ *
1357
+ * @example
1358
+ * ```html
1359
+ * <csdk-line-chart
1360
+ * [dataSet]="chart.dataSet"
1361
+ * [dataOptions]="chart.dataOptions"
1362
+ * [highlights]="filters"
1363
+ * [beforeRender]="onBeforeRender"
1364
+ * (dataPointClick)="logArguments($event)"
1365
+ * (dataPointContextMenu)="logArguments($event)"
1366
+ * (dataPointsSelect)="logArguments($event)"
1367
+ * />
1368
+ * ```
1369
+ * ```ts
1370
+ import { Component } from '@angular/core';
1371
+ import { measureFactory, filterFactory, Filter } from '@sisense/sdk-data';
1372
+ import * as DM from '../../assets/sample-healthcare-model';
1373
+ import type { ChartType } from '@sisense/sdk-ui-angular';
1374
+ @Component({
1375
+ selector: 'app-analytics',
1376
+ templateUrl: './analytics.component.html',
1377
+ styleUrls: ['./analytics.component.scss'],
1378
+ })
1379
+ export class AnalyticsComponent {
1380
+ DM = DM;
1381
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1382
+ chart = {
1383
+ chartType: 'column' as ChartType,
1384
+ dataSet: DM.DataSource,
1385
+ dataOptions: {
1386
+ category: [DM.Divisions.Divison_name],
1387
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1388
+ breakBy: [],
1389
+ },
1390
+ };
1391
+
1392
+ onBeforeRender(options: any) {
1393
+ console.log('beforeRender');
1394
+ console.log(options);
1395
+ return options;
1396
+ }
1397
+
1398
+ logArguments(...args: any[]) {
1399
+ console.log(args);
1400
+ }
1401
+ }
1402
+ * ```
1403
+ * <img src="media://angular-line-chart-example.png" width="800px" />
1404
+ *
1405
+ * @group Charts
985
1406
  */
986
1407
  class LineChartComponent {
987
1408
  constructor() {
@@ -1064,6 +1485,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1064
1485
  /**
1065
1486
  * A component that provides various options for displaying one or two numeric values as a number, gauge or ticker.
1066
1487
  * See [Indicator](https://docs.sisense.com/main/SisenseLinux/indicator.htm) for more information.
1488
+ *
1489
+ * @example
1490
+ * ```html
1491
+ * <csdk-indicator-chart
1492
+ * [dataSet]="indicator.dataSet"
1493
+ * [dataOptions]="indicator.dataOptions"
1494
+ * [filters]="filters"
1495
+ * [styleOptions]="indicator.styleOptions"
1496
+ * />
1497
+ * ```
1498
+ * ```ts
1499
+ import { Component } from '@angular/core';
1500
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
1501
+ import * as DM from '../../assets/sample-healthcare-model';
1502
+ import type { IndicatorStyleOptions } from '@sisense/sdk-ui-angular';
1503
+
1504
+ @Component({
1505
+ selector: 'app-analytics',
1506
+ templateUrl: './analytics.component.html',
1507
+ styleUrls: ['./analytics.component.scss'],
1508
+ })
1509
+ export class AnalyticsComponent {
1510
+ DM = DM;
1511
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1512
+ indicator = {
1513
+ dataSet: DM.DataSource,
1514
+ dataOptions: {
1515
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1516
+ secondary: [measureFactory.sum(DM.Admissions.Diagnosis_ID)],
1517
+ },
1518
+ styleOptions: {
1519
+ indicatorComponents: {
1520
+ title: {
1521
+ shouldBeShown: true,
1522
+ text: 'Total Cost_of_admission',
1523
+ },
1524
+ secondaryTitle: {
1525
+ text: 'Total Diagnosis_ID',
1526
+ },
1527
+ ticks: {
1528
+ shouldBeShown: true,
1529
+ },
1530
+ labels: {
1531
+ shouldBeShown: true,
1532
+ },
1533
+ },
1534
+ subtype: 'indicator/gauge',
1535
+ skin: 2,
1536
+ } as IndicatorStyleOptions,
1537
+ };
1538
+
1539
+ }
1540
+ * ```
1541
+ * <img src="media://angular-indicator-chart-example.png" width="800px" />
1542
+ *
1543
+ * @group Charts
1067
1544
  */
1068
1545
  class IndicatorChartComponent {
1069
1546
  constructor() {
@@ -1119,6 +1596,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1119
1596
  * If omitted, all scatter points are equal in size. If used, the circle sizes are relative to their values.
1120
1597
  *
1121
1598
  * See [Scatter Chart](https://docs.sisense.com/main/SisenseLinux/scatter-chart.htm) for more information.
1599
+ *
1600
+ * @example
1601
+ * ```html
1602
+ * <csdk-scatter-chart
1603
+ * [dataSet]="scatter.dataSet"
1604
+ * [dataOptions]="scatter.dataOptions"
1605
+ * [highlights]="filters"
1606
+ * [beforeRender]="onBeforeRender"
1607
+ * (dataPointClick)="logArguments($event)"
1608
+ * (dataPointContextMenu)="logArguments($event)"
1609
+ * (dataPointsSelect)="logArguments($event)"
1610
+ * />
1611
+ * ```
1612
+ * ```ts
1613
+ import { Component } from '@angular/core';
1614
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
1615
+ import * as DM from '../../assets/sample-healthcare-model';
1616
+
1617
+ @Component({
1618
+ selector: 'app-analytics',
1619
+ templateUrl: './analytics.component.html',
1620
+ styleUrls: ['./analytics.component.scss'],
1621
+ })
1622
+ export class AnalyticsComponent {
1623
+ DM = DM;
1624
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1625
+ scatter = {
1626
+ dataSet: DM.DataSource,
1627
+ dataOptions: {
1628
+ x: DM.Admissions.Room_ID,
1629
+ y: measureFactory.sum(DM.Admissions.Cost_of_admission),
1630
+ },
1631
+ };
1632
+
1633
+ onBeforeRender(options: any) {
1634
+ console.log('beforeRender');
1635
+ console.log(options);
1636
+ return options;
1637
+ }
1638
+
1639
+ logArguments(...args: any[]) {
1640
+ console.log(args);
1641
+ }
1642
+ }
1643
+ * ```
1644
+ * <img src="media://angular-scatter-chart-example.png" width="800px" />
1645
+ *
1646
+ * @group Charts
1122
1647
  */
1123
1648
  class ScatterChartComponent {
1124
1649
  constructor() {
@@ -1202,6 +1727,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1202
1727
  * A component representing data in a circular graph with the data shown as slices of a whole,
1203
1728
  * with each slice representing a proportion of the total.
1204
1729
  * See [Pie Chart](https://docs.sisense.com/main/SisenseLinux/pie-chart.htm) for more information.
1730
+ *
1731
+ * @example
1732
+ * ```html
1733
+ * <csdk-pie-chart
1734
+ * [dataSet]="chart.dataSet"
1735
+ * [dataOptions]="chart.dataOptions"
1736
+ * [highlights]="filters"
1737
+ * [beforeRender]="onBeforeRender"
1738
+ * (dataPointClick)="logArguments($event)"
1739
+ * (dataPointContextMenu)="logArguments($event)"
1740
+ * (dataPointsSelect)="logArguments($event)"
1741
+ * />
1742
+ * ```
1743
+ * ```ts
1744
+ import { Component } from '@angular/core';
1745
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
1746
+ import * as DM from '../../assets/sample-healthcare-model';
1747
+ import type { ChartType } from '@sisense/sdk-ui-angular';
1748
+
1749
+ @Component({
1750
+ selector: 'app-analytics',
1751
+ templateUrl: './analytics.component.html',
1752
+ styleUrls: ['./analytics.component.scss'],
1753
+ })
1754
+ export class AnalyticsComponent {
1755
+ DM = DM;
1756
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1757
+ chart = {
1758
+ chartType: 'column' as ChartType,
1759
+ dataSet: DM.DataSource,
1760
+ dataOptions: {
1761
+ category: [DM.Divisions.Divison_name],
1762
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1763
+ breakBy: [],
1764
+ },
1765
+ };
1766
+
1767
+ onBeforeRender(options: any) {
1768
+ console.log('beforeRender');
1769
+ console.log(options);
1770
+ return options;
1771
+ }
1772
+
1773
+ logArguments(...args: any[]) {
1774
+ console.log(args);
1775
+ }
1776
+ }
1777
+ * ```
1778
+ * <img src="media://angular-pie-chart-example.png" width="800px" />
1779
+ *
1780
+ * @group Charts
1205
1781
  */
1206
1782
  class PieChartComponent {
1207
1783
  constructor() {
@@ -1284,6 +1860,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1284
1860
  /**
1285
1861
  * A component representing data progressively decreasing in size or quantity through a funnel shape.
1286
1862
  * See [Funnel Chart](https://docs.sisense.com/main/SisenseLinux/funnel-chart.htm) for more information.
1863
+ *
1864
+ * @example
1865
+ * ```html
1866
+ * <csdk-funnel-chart
1867
+ * [dataSet]="chart.dataSet"
1868
+ * [dataOptions]="chart.dataOptions"
1869
+ * [highlights]="filters"
1870
+ * [beforeRender]="onBeforeRender"
1871
+ * (dataPointClick)="logArguments($event)"
1872
+ * (dataPointContextMenu)="logArguments($event)"
1873
+ * (dataPointsSelect)="logArguments($event)"
1874
+ * />
1875
+ * ```
1876
+ * ```ts
1877
+ import { Component } from '@angular/core';
1878
+ import { measureFactory, filterFactory, Filter } from '@sisense/sdk-data';
1879
+ import * as DM from '../../assets/sample-healthcare-model';
1880
+ import type { ChartType } from '@sisense/sdk-ui-angular';
1881
+ @Component({
1882
+ selector: 'app-analytics',
1883
+ templateUrl: './analytics.component.html',
1884
+ styleUrls: ['./analytics.component.scss'],
1885
+ })
1886
+ export class AnalyticsComponent {
1887
+ DM = DM;
1888
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
1889
+ chart = {
1890
+ chartType: 'column' as ChartType,
1891
+ dataSet: DM.DataSource,
1892
+ dataOptions: {
1893
+ category: [DM.Divisions.Divison_name],
1894
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1895
+ breakBy: [],
1896
+ },
1897
+ };
1898
+
1899
+ onBeforeRender(options: any) {
1900
+ console.log('beforeRender');
1901
+ console.log(options);
1902
+ return options;
1903
+ }
1904
+
1905
+ logArguments(...args: any[]) {
1906
+ console.log(args);
1907
+ }
1908
+ }
1909
+ * ```
1910
+ * <img src="media://angular-funnel-chart-example.png" width="800px" />
1911
+ *
1912
+ * @group Charts
1287
1913
  */
1288
1914
  class FunnelChartComponent {
1289
1915
  constructor() {
@@ -1366,6 +1992,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1366
1992
  /**
1367
1993
  * A component comparing multiple categories/variables with a spacial perspective in a radial chart.
1368
1994
  * See [Polar Chart](https://docs.sisense.com/main/SisenseLinux/polar-chart.htm) for more information.
1995
+ *
1996
+ * @example
1997
+ * ```html
1998
+ * <csdk-polar-chart
1999
+ * [dataSet]="chart.dataSet"
2000
+ * [dataOptions]="chart.dataOptions"
2001
+ * [highlights]="filters"
2002
+ * [beforeRender]="onBeforeRender"
2003
+ * (dataPointClick)="logArguments($event)"
2004
+ * (dataPointContextMenu)="logArguments($event)"
2005
+ * (dataPointsSelect)="logArguments($event)"
2006
+ * />
2007
+ * ```
2008
+ * ```ts
2009
+ import { Component } from '@angular/core';
2010
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
2011
+ import * as DM from '../../assets/sample-healthcare-model';
2012
+ import type { ChartType } from '@sisense/sdk-ui-angular';
2013
+
2014
+ @Component({
2015
+ selector: 'app-analytics',
2016
+ templateUrl: './analytics.component.html',
2017
+ styleUrls: ['./analytics.component.scss'],
2018
+ })
2019
+ export class AnalyticsComponent {
2020
+ DM = DM;
2021
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
2022
+ chart = {
2023
+ chartType: 'column' as ChartType,
2024
+ dataSet: DM.DataSource,
2025
+ dataOptions: {
2026
+ category: [DM.Divisions.Divison_name],
2027
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
2028
+ breakBy: [],
2029
+ },
2030
+ };
2031
+
2032
+ onBeforeRender(options: any) {
2033
+ console.log('beforeRender');
2034
+ console.log(options);
2035
+ return options;
2036
+ }
2037
+
2038
+ logArguments(...args: any[]) {
2039
+ console.log(args);
2040
+ }
2041
+ }
2042
+ * ```
2043
+ * <img src="media://angular-polar-chart-example.png" width="800px" />
2044
+ *
2045
+ * @group Charts
1369
2046
  */
1370
2047
  class PolarChartComponent {
1371
2048
  constructor() {
@@ -1449,6 +2126,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1449
2126
  * A component displaying hierarchical data in the form of nested rectangles.
1450
2127
  * This type of chart can be used instead of a column chart for comparing a large number of categories and sub-categories.
1451
2128
  * See [Treemap Chart](https://docs.sisense.com/main/SisenseLinux/treemap.htm) for more information.
2129
+ *
2130
+ * @example
2131
+ * ```html
2132
+ * <csdk-treemap-chart
2133
+ * [dataSet]="chart.dataSet"
2134
+ * [dataOptions]="chart.dataOptions"
2135
+ * [highlights]="filters"
2136
+ * [beforeRender]="onBeforeRender"
2137
+ * (dataPointClick)="logArguments($event)"
2138
+ * (dataPointContextMenu)="logArguments($event)"
2139
+ * (dataPointsSelect)="logArguments($event)"
2140
+ * />
2141
+ * ```
2142
+ * ```ts
2143
+ import { Component } from '@angular/core';
2144
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
2145
+ import type { ChartType } from '@sisense/sdk-ui-angular';
2146
+ import * as DM from '../../assets/sample-healthcare-model';
2147
+
2148
+ @Component({
2149
+ selector: 'app-analytics',
2150
+ templateUrl: './analytics.component.html',
2151
+ styleUrls: ['./analytics.component.scss'],
2152
+ })
2153
+ export class AnalyticsComponent {
2154
+ DM = DM;
2155
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
2156
+ chart = {
2157
+ chartType: 'column' as ChartType,
2158
+ dataSet: DM.DataSource,
2159
+ dataOptions: {
2160
+ category: [DM.Divisions.Divison_name],
2161
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
2162
+ breakBy: [],
2163
+ },
2164
+ };
2165
+
2166
+ onBeforeRender(options: any) {
2167
+ console.log('beforeRender');
2168
+ console.log(options);
2169
+ return options;
2170
+ }
2171
+
2172
+ logArguments(...args: any[]) {
2173
+ console.log(args);
2174
+ }
2175
+ }
2176
+ * ```
2177
+ * <img src="media://angular-treemap-chart-example.png" width="800px" />
2178
+ *
2179
+ * @group Charts
1452
2180
  */
1453
2181
  class TreemapChartComponent {
1454
2182
  constructor() {
@@ -1532,6 +2260,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1532
2260
  * A component displaying hierarchical data in the form of nested slices.
1533
2261
  * This type of chart can be used instead of a pie chart for comparing a large number of categories and sub-categories.
1534
2262
  * See [Sunburst Chart](https://docs.sisense.com/main/SisenseLinux/sunburst-widget.htm) for more information.
2263
+ *
2264
+ * @example
2265
+ * ```html
2266
+ * <csdk-sunburst-chart
2267
+ * [dataSet]="chart.dataSet"
2268
+ * [dataOptions]="chart.dataOptions"
2269
+ * [highlights]="filters"
2270
+ * [beforeRender]="onBeforeRender"
2271
+ * (dataPointClick)="logArguments($event)"
2272
+ * (dataPointContextMenu)="logArguments($event)"
2273
+ * (dataPointsSelect)="logArguments($event)"
2274
+ * />
2275
+ * ```
2276
+ * ```ts
2277
+ import { Component } from '@angular/core';
2278
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
2279
+ import * as DM from '../../assets/sample-healthcare-model';
2280
+ import type { ChartType } from '@sisense/sdk-ui-angular';
2281
+
2282
+ @Component({
2283
+ selector: 'app-analytics',
2284
+ templateUrl: './analytics.component.html',
2285
+ styleUrls: ['./analytics.component.scss'],
2286
+ })
2287
+ export class AnalyticsComponent {
2288
+ DM = DM;
2289
+ filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
2290
+ chart = {
2291
+ chartType: 'column' as ChartType,
2292
+ dataSet: DM.DataSource,
2293
+ dataOptions: {
2294
+ category: [DM.Divisions.Divison_name],
2295
+ value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
2296
+ breakBy: [],
2297
+ },
2298
+ };
2299
+
2300
+ onBeforeRender(options: any) {
2301
+ console.log('beforeRender');
2302
+ console.log(options);
2303
+ return options;
2304
+ }
2305
+
2306
+ logArguments(...args: any[]) {
2307
+ console.log(args);
2308
+ }
2309
+ }
2310
+ * ```
2311
+ * <img src="media://angular-sunburst-chart-example.png" width="800px" />
2312
+ *
2313
+ * @group Charts
1535
2314
  */
1536
2315
  class SunburstChartComponent {
1537
2316
  constructor() {
@@ -1612,342 +2391,403 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1612
2391
  }] } });
1613
2392
 
1614
2393
  /**
1615
- * The Table Widget component extending {@link TableComponent} component to support widget style options.
2394
+ * An Angular component representing data in a way that visually describes the distribution, variability,
2395
+ * and center of a data set along an axis.
2396
+ * See [Boxplot Chart](https://docs.sisense.com/main/SisenseLinux/box-and-whisker-plot.htm) for more information.
1616
2397
  *
1617
- * @internal
2398
+ * @example
2399
+ * ```html
2400
+ * <csdk-boxplot-chart
2401
+ * [dataSet]="boxplotChart.dataSet"
2402
+ * [dataOptions]="boxplotChart.dataOptions"
2403
+ * [highlights]="boxplotChart.highlights"
2404
+ * [beforeRender]="onBeforeRender"
2405
+ * (dataPointClick)="logArguments($event)"
2406
+ * (dataPointContextMenu)="logArguments($event)"
2407
+ * (dataPointsSelect)="logArguments($event)"
2408
+ * /> * ```
2409
+ * ```ts
2410
+ import { Component } from '@angular/core';
2411
+ import { filterFactory } from '@sisense/sdk-data';
2412
+ import type { BoxplotChartDataOptions } from '@sisense/sdk-ui-angular';
2413
+ import * as DM from '../../assets/sample-healthcare-model';
2414
+
2415
+ @Component({
2416
+ selector: 'app-analytics',
2417
+ templateUrl: './analytics.component.html',
2418
+ styleUrls: ['./analytics.component.scss'],
2419
+ })
2420
+ export class AnalyticsComponent {
2421
+ boxplotChart = {
2422
+ dataSet: DM.DataSource,
2423
+ dataOptions: {
2424
+ category: [DM.Divisions.Divison_name],
2425
+ value: [DM.Admissions.TimeofStay],
2426
+ boxType: 'iqr',
2427
+ outliersEnabled: true,
2428
+ } as BoxplotChartDataOptions,
2429
+ highlights: [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])],
2430
+ };
2431
+
2432
+ logArguments(...args: any[]) {
2433
+ console.log(args);
2434
+ }
2435
+ }
2436
+ * ```
2437
+ * <img src="media://angular-boxplot-chart-example.png" width="800px" />
2438
+ *
2439
+ * @group Charts
1618
2440
  */
1619
- class TableWidgetComponent {
1620
- constructor(sisenseContextService, themeService) {
1621
- this.sisenseContextService = sisenseContextService;
1622
- this.themeService = themeService;
1623
- this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
1624
- createSisenseContextConnector(this.sisenseContextService),
1625
- createThemeContextConnector(this.themeService),
1626
- ]);
1627
- }
1628
- ngAfterViewInit() {
1629
- this.componentAdapter.render(this.preactRef.nativeElement);
1630
- }
1631
- ngOnChanges() {
1632
- if (this.preactRef) {
1633
- this.componentAdapter.render(this.preactRef.nativeElement);
1634
- }
1635
- }
1636
- createPreactComponent() {
1637
- const props = {
1638
- dataSource: this.dataSource,
1639
- dataOptions: this.dataOptions,
1640
- filters: this.filters,
1641
- styleOptions: this.styleOptions,
1642
- title: this.title,
1643
- description: this.description,
1644
- };
1645
- return createElement(TableWidget, props);
1646
- }
1647
- ngOnDestroy() {
1648
- this.componentAdapter.destroy();
2441
+ class BoxplotChartComponent {
2442
+ constructor() {
2443
+ /**
2444
+ * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointClick}
2445
+ *
2446
+ * @category Callbacks
2447
+ */
2448
+ this.dataPointClick = new EventEmitter();
2449
+ /**
2450
+ * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointContextMenu}
2451
+ *
2452
+ * @category Callbacks
2453
+ */
2454
+ this.dataPointContextMenu = new EventEmitter();
2455
+ /**
2456
+ * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointsSelected}
2457
+ *
2458
+ * @category Callbacks
2459
+ */
2460
+ this.dataPointsSelect = new EventEmitter();
2461
+ /** @internal */
2462
+ this.chartType = 'boxplot';
1649
2463
  }
1650
2464
  }
1651
- 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 });
1652
- 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", title: "title", description: "description" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
1653
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableWidgetComponent, decorators: [{
2465
+ BoxplotChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2466
+ BoxplotChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BoxplotChartComponent, selector: "csdk-boxplot-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
2467
+ <csdk-chart
2468
+ [chartType]="chartType"
2469
+ [dataSet]="dataSet"
2470
+ [dataOptions]="dataOptions"
2471
+ [filters]="filters"
2472
+ [highlights]="highlights"
2473
+ [styleOptions]="styleOptions"
2474
+ [beforeRender]="beforeRender"
2475
+ (dataPointClick)="dataPointClick.emit($event)"
2476
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
2477
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
2478
+ />
2479
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
2480
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, decorators: [{
1654
2481
  type: Component,
1655
2482
  args: [{
1656
- selector: 'csdk-table-widget',
1657
- template,
2483
+ selector: 'csdk-boxplot-chart',
2484
+ template: `
2485
+ <csdk-chart
2486
+ [chartType]="chartType"
2487
+ [dataSet]="dataSet"
2488
+ [dataOptions]="dataOptions"
2489
+ [filters]="filters"
2490
+ [highlights]="highlights"
2491
+ [styleOptions]="styleOptions"
2492
+ [beforeRender]="beforeRender"
2493
+ (dataPointClick)="dataPointClick.emit($event)"
2494
+ (dataPointContextMenu)="dataPointContextMenu.emit($event)"
2495
+ (dataPointsSelect)="dataPointsSelect.emit($event)"
2496
+ />
2497
+ `,
1658
2498
  }]
1659
- }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
1660
- type: ViewChild,
1661
- args: [rootId]
1662
- }], dataSource: [{
2499
+ }], propDecorators: { dataSet: [{
1663
2500
  type: Input
1664
2501
  }], dataOptions: [{
1665
2502
  type: Input
1666
2503
  }], filters: [{
1667
2504
  type: Input
1668
- }], styleOptions: [{
2505
+ }], highlights: [{
1669
2506
  type: Input
1670
- }], title: [{
2507
+ }], styleOptions: [{
1671
2508
  type: Input
1672
- }], description: [{
2509
+ }], beforeRender: [{
1673
2510
  type: Input
2511
+ }], dataPointClick: [{
2512
+ type: Output
2513
+ }], dataPointContextMenu: [{
2514
+ type: Output
2515
+ }], dataPointsSelect: [{
2516
+ type: Output
1674
2517
  }] } });
1675
2518
 
1676
2519
  /**
1677
- * The Dashboard Widget component, which is a thin wrapper on {@link ChartWidgetComponent},
1678
- * is used to render a widget created in a Sisense Fusion instance.
1679
- *
1680
- * To learn more about using Sisense Fusion Widgets in Compose SDK, see
1681
- * [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
2520
+ * An Angular component that allows to visualize geographical data as data points on a map.
2521
+ * See [Scattermap Chart](https://docs.sisense.com/main/SisenseLinux/scatter-map.htm) for more information.
1682
2522
  *
2523
+ * @example
2524
+ * ```html
2525
+ * <csdk-scattermap-chart
2526
+ * [dataSet]="scattermapChart.dataSet"
2527
+ * [dataOptions]="scattermapChart.dataOptions"
2528
+ * [styleOptions]="scattermapChart.styleOptions"
2529
+ * (dataPointClick)="logArguments($event)"
2530
+ * />
2531
+ * ```
2532
+ * ```ts
2533
+ import { Component } from '@angular/core';
2534
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
2535
+ import type { ScattermapStyleOptions,ScattermapChartDataOptions } from '@sisense/sdk-ui-angular';
2536
+ import * as DM from '../../assets/sample-ecommerce';
2537
+
2538
+ @Component({
2539
+ selector: 'app-analytics',
2540
+ templateUrl: './analytics.component.html',
2541
+ styleUrls: ['./analytics.component.scss'],
2542
+ })
2543
+ export class AnalyticsComponent {
2544
+ scattermapChart = {
2545
+ dataSet: DM.DataSource,
2546
+ dataOptions: {
2547
+ geo: [DM.Country.Country],
2548
+ size: measureFactory.sum(DM.Commerce.Cost, 'Size by Cost'),
2549
+ colorBy: {
2550
+ column: measureFactory.sum(DM.Commerce.Revenue, 'Color by Revenue'),
2551
+ color: 'green',
2552
+ },
2553
+ details: DM.Category.Category,
2554
+ } as ScattermapChartDataOptions,
2555
+ styleOptions: {
2556
+ markers: {
2557
+ fill: 'hollow-bold',
2558
+ },
2559
+ } as ScattermapStyleOptions,
2560
+ };
2561
+
2562
+ logArguments(...args: any[]) {
2563
+ console.log(args);
2564
+ }
2565
+ }
2566
+ * ```
2567
+ * <img src="media://angular-scattermap-chart-example.png" width="800px" />
2568
+ * @group Charts
1683
2569
  */
1684
- class DashboardWidgetComponent {
1685
- constructor(sisenseContextService, themeService) {
1686
- this.sisenseContextService = sisenseContextService;
1687
- this.themeService = themeService;
1688
- this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
1689
- createSisenseContextConnector(this.sisenseContextService),
1690
- createThemeContextConnector(this.themeService),
1691
- ]);
1692
- }
1693
- /** @internal */
1694
- ngAfterViewInit() {
1695
- this.componentAdapter.render(this.preactRef.nativeElement);
1696
- }
1697
- /** @internal */
1698
- ngOnChanges() {
1699
- if (this.preactRef) {
1700
- this.componentAdapter.render(this.preactRef.nativeElement);
1701
- }
1702
- }
1703
- /** @internal */
1704
- createPreactComponent() {
1705
- const props = {
1706
- widgetOid: this.widgetOid,
1707
- dashboardOid: this.dashboardOid,
1708
- filters: this.filters,
1709
- highlights: this.highlights,
1710
- filtersMergeStrategy: this.filtersMergeStrategy,
1711
- includeDashboardFilters: this.includeDashboardFilters,
1712
- title: this.title,
1713
- description: this.description,
1714
- styleOptions: this.styleOptions,
1715
- highlightSelectionDisabled: this.highlightSelectionDisabled,
1716
- drilldownOptions: this.drilldownOptions,
1717
- };
1718
- return createElement(DashboardWidget, props);
1719
- }
1720
- /** @internal */
1721
- ngOnDestroy() {
1722
- this.componentAdapter.destroy();
2570
+ class ScattermapChartComponent {
2571
+ constructor() {
2572
+ /**
2573
+ * {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.onDataPointClick}
2574
+ *
2575
+ * @category Callbacks
2576
+ */
2577
+ this.dataPointClick = new EventEmitter();
2578
+ /** @internal */
2579
+ this.chartType = 'scattermap';
1723
2580
  }
1724
2581
  }
1725
- 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 });
1726
- 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", includeDashboardFilters: "includeDashboardFilters", title: "title", description: "description", styleOptions: "styleOptions", highlightSelectionDisabled: "highlightSelectionDisabled", drilldownOptions: "drilldownOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
1727
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, decorators: [{
2582
+ ScattermapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2583
+ ScattermapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ScattermapChartComponent, selector: "csdk-scattermap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
2584
+ <csdk-chart
2585
+ [chartType]="chartType"
2586
+ [dataSet]="dataSet"
2587
+ [dataOptions]="dataOptions"
2588
+ [filters]="filters"
2589
+ [highlights]="highlights"
2590
+ [styleOptions]="styleOptions"
2591
+ (dataPointClick)="dataPointClick.emit($event)"
2592
+ />
2593
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
2594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, decorators: [{
1728
2595
  type: Component,
1729
2596
  args: [{
1730
- selector: 'csdk-dashboard-widget',
1731
- template,
2597
+ selector: 'csdk-scattermap-chart',
2598
+ template: `
2599
+ <csdk-chart
2600
+ [chartType]="chartType"
2601
+ [dataSet]="dataSet"
2602
+ [dataOptions]="dataOptions"
2603
+ [filters]="filters"
2604
+ [highlights]="highlights"
2605
+ [styleOptions]="styleOptions"
2606
+ (dataPointClick)="dataPointClick.emit($event)"
2607
+ />
2608
+ `,
1732
2609
  }]
1733
- }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
1734
- type: ViewChild,
1735
- args: [rootId]
1736
- }], widgetOid: [{
2610
+ }], propDecorators: { dataSet: [{
1737
2611
  type: Input
1738
- }], dashboardOid: [{
2612
+ }], dataOptions: [{
1739
2613
  type: Input
1740
2614
  }], filters: [{
1741
2615
  type: Input
1742
2616
  }], highlights: [{
1743
2617
  type: Input
1744
- }], filtersMergeStrategy: [{
1745
- type: Input
1746
- }], includeDashboardFilters: [{
1747
- type: Input
1748
- }], title: [{
1749
- type: Input
1750
- }], description: [{
1751
- type: Input
1752
2618
  }], styleOptions: [{
1753
2619
  type: Input
1754
- }], highlightSelectionDisabled: [{
1755
- type: Input
1756
- }], drilldownOptions: [{
1757
- type: Input
2620
+ }], dataPointClick: [{
2621
+ type: Output
1758
2622
  }] } });
1759
2623
 
1760
2624
  /**
1761
- * Member Filter Tile Component
2625
+ * An Angular component that allows to visualize geographical data as polygons on a map.
2626
+ * See [Areamap Chart](https://docs.sisense.com/main/SisenseLinux/area-map.htm) for more information.
2627
+ *
2628
+ * @example
2629
+ * ```html
2630
+ * <csdk-areamap-chart
2631
+ * [dataSet]="areamapChart.dataSet"
2632
+ * [dataOptions]="areamapChart.dataOptions"
2633
+ * [styleOptions]="areamapChart.styleOptions"
2634
+ * (dataPointClick)="logArguments($event)"
2635
+ * /> * ```
2636
+ * ```ts
2637
+ import { Component } from '@angular/core';
2638
+ import { measureFactory } from '@sisense/sdk-data';
2639
+ import * as DM from '../../assets/sample-ecommerce';
2640
+
2641
+ @Component({
2642
+ selector: 'app-analytics',
2643
+ templateUrl: './analytics.component.html',
2644
+ styleUrls: ['./analytics.component.scss'],
2645
+ })
2646
+ export class AnalyticsComponent {
2647
+ areamapChart = {
2648
+ dataSet: DM.DataSource,
2649
+ dataOptions: {
2650
+ geo: [DM.Country.Country],
2651
+ color: [measureFactory.sum(DM.Commerce.Revenue, 'Color by Revenue')],
2652
+ } as AreamapChartDataOptions,
2653
+ styleOptions: {
2654
+ mapType: 'world',
2655
+ } as AreamapStyleOptions,
2656
+ };
2657
+
2658
+ logArguments(...args: any[]) {
2659
+ console.log(args);
2660
+ }
2661
+ }
2662
+ * ```
2663
+ * <img src="media://angular-areamap-chart-example.png" width="800px" />
2664
+ *
2665
+ * @group Charts
1762
2666
  */
1763
- class MemberFilterTileComponent {
1764
- /**
1765
- * Constructor for the `MemberFilterTileComponent`.
1766
- *
1767
- * @param sisenseContextService - Sisense context service
1768
- * @param themeService - Theme service
1769
- */
1770
- constructor(
1771
- /**
1772
- * Sisense context service
1773
- *
1774
- * @category Constructor
1775
- */
1776
- sisenseContextService,
1777
- /**
1778
- * Theme service
1779
- *
1780
- * @category Constructor
1781
- */
1782
- themeService) {
1783
- this.sisenseContextService = sisenseContextService;
1784
- this.themeService = themeService;
2667
+ class AreamapChartComponent {
2668
+ constructor() {
1785
2669
  /**
1786
- * {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.onChange}
2670
+ * {@inheritDoc @sisense/sdk-ui!AreamapChartProps.onDataPointClick}
2671
+ *
2672
+ * @category Callbacks
1787
2673
  */
1788
- this.filterChange = new EventEmitter();
1789
- this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
1790
- createSisenseContextConnector(this.sisenseContextService),
1791
- createThemeContextConnector(this.themeService),
1792
- ]);
1793
- }
1794
- /**
1795
- * @internal
1796
- */
1797
- ngAfterViewInit() {
1798
- this.componentAdapter.render(this.preactRef.nativeElement);
1799
- }
1800
- /**
1801
- * @internal
1802
- */
1803
- ngOnChanges() {
1804
- if (this.preactRef) {
1805
- this.componentAdapter.render(this.preactRef.nativeElement);
1806
- }
1807
- }
1808
- createPreactComponent() {
1809
- const props = {
1810
- title: this.title,
1811
- dataSource: this.dataSource,
1812
- attribute: this.attribute,
1813
- filter: this.filter,
1814
- onChange: (...[filter]) => this.filterChange.emit({ filter }),
1815
- };
1816
- return createElement(MemberFilterTile, props);
1817
- }
1818
- /**
1819
- * @internal
1820
- */
1821
- ngOnDestroy() {
1822
- this.componentAdapter.destroy();
2674
+ this.dataPointClick = new EventEmitter();
2675
+ /** @internal */
2676
+ this.chartType = 'areamap';
1823
2677
  }
1824
2678
  }
1825
- MemberFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MemberFilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
1826
- MemberFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MemberFilterTileComponent, selector: "csdk-member-filter-tile", inputs: { title: "title", dataSource: "dataSource", attribute: "attribute", filter: "filter" }, outputs: { filterChange: "filterChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
1827
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MemberFilterTileComponent, decorators: [{
2679
+ AreamapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2680
+ AreamapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AreamapChartComponent, selector: "csdk-areamap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
2681
+ <csdk-chart
2682
+ [chartType]="chartType"
2683
+ [dataSet]="dataSet"
2684
+ [dataOptions]="dataOptions"
2685
+ [filters]="filters"
2686
+ [highlights]="highlights"
2687
+ [styleOptions]="styleOptions"
2688
+ (dataPointClick)="dataPointClick.emit($event)"
2689
+ />
2690
+ `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
2691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, decorators: [{
1828
2692
  type: Component,
1829
2693
  args: [{
1830
- selector: 'csdk-member-filter-tile',
1831
- template,
2694
+ selector: 'csdk-areamap-chart',
2695
+ template: `
2696
+ <csdk-chart
2697
+ [chartType]="chartType"
2698
+ [dataSet]="dataSet"
2699
+ [dataOptions]="dataOptions"
2700
+ [filters]="filters"
2701
+ [highlights]="highlights"
2702
+ [styleOptions]="styleOptions"
2703
+ (dataPointClick)="dataPointClick.emit($event)"
2704
+ />
2705
+ `,
1832
2706
  }]
1833
- }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
1834
- type: ViewChild,
1835
- args: [rootId]
1836
- }], title: [{
2707
+ }], propDecorators: { dataSet: [{
1837
2708
  type: Input
1838
- }], dataSource: [{
2709
+ }], dataOptions: [{
1839
2710
  type: Input
1840
- }], attribute: [{
2711
+ }], filters: [{
1841
2712
  type: Input
1842
- }], filter: [{
2713
+ }], highlights: [{
1843
2714
  type: Input
1844
- }], filterChange: [{
2715
+ }], styleOptions: [{
2716
+ type: Input
2717
+ }], dataPointClick: [{
1845
2718
  type: Output
1846
2719
  }] } });
1847
2720
 
1848
2721
  /**
1849
- * An Angular component designed to add drilldown functionality to any type of chart.
1850
- *
1851
- * It acts as a wrapper around a given chart component, enhancing it with drilldown capabilities
1852
- *
1853
- * The widget offers several features including:
1854
- * - A context menu for initiating drilldown actions (can be provided as a custom component)
1855
- * - Breadcrumbs that not only allow for drilldown selection slicing but also
1856
- * provide an option to clear the selection (can be provided as a custom component)
1857
- * - Filters specifically created for drilldown operation
1858
- * - An option to navigate to the next drilldown dimension
1859
- *
1860
- * When an `initialDimension` is specified, the `drilldownDimension` will automatically inherit its value,
1861
- * even before any points on the chart are selected.
1862
- * This allows for complete control over the chart's dimensions to be handed over to the DrilldownWidget
2722
+ * Pivot Table with and pagination.
1863
2723
  *
1864
2724
  * @example
1865
- * An example of using the `csdk-drilldown-widget` component to plot a `csdk-column-chart`
1866
- * over the Sample Healthcare data source hosted in a Sisense instance:
1867
- * ```ts
1868
- * // Component behavior in .component.ts
1869
- * chart = {
1870
- * dataOptions: {
1871
- * category: [DM.Divisions.Divison_name],
1872
- * value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
1873
- * breakBy: [],
1874
- * },
1875
- * dataPointContextMenu: ({ point, nativeEvent }: { point: any; nativeEvent: MouseEvent }) => {
1876
- * this.drilldownResult?.onDataPointsSelected?.([point], nativeEvent);
1877
- * this.drilldownResult?.onContextMenu({
1878
- * left: nativeEvent.clientX,
1879
- * top: nativeEvent.clientY,
1880
- * });
1881
- * }
1882
- * }
1883
- *
1884
- * drilldownResult?: CustomDrilldownResult;
1885
- *
1886
- * drilldown = {
1887
- * drilldownDimensions: [DM.Patients.Gender, DM.Admissions.Surgical_Procedure],
1888
- * initialDimension: DM.Divisions.Divison_name,
1889
- * drilldownChange: (drilldownResult: CustomDrilldownResult) => {
1890
- * this.drilldownResult = drilldownResult;
1891
- * this.chart.dataOptions = {
1892
- * ...this.chart.dataOptions,
1893
- * category: [drilldownResult.drilldownDimension]
1894
- * }
1895
- * }
1896
- * };
1897
- * ```
1898
2725
  * ```html
1899
- * <!--Component HTML template in .component.html-->
1900
- * <csdk-drilldown-widget
1901
- * [drilldownDimensions]="drilldown.drilldownDimensions"
1902
- * [initialDimension]="drilldown.initialDimension"
1903
- * (drilldownResultChange)="drilldown.drilldownChange($event)"
1904
- * >
1905
- * <csdk-column-chart
1906
- * [dataSet]="DM.DataSource"
1907
- * [dataOptions]="chart.dataOptions"
1908
- * [filters]="drilldownResult?.drilldownFilters || []"
1909
- * (dataPointContextMenu)="chart.dataPointContextMenu($event)"
1910
- * />
1911
- * </csdk-drilldown-widget>
2726
+ * <csdk-pivot-table
2727
+ * [dataSet]="pivotTable.dataSet"
2728
+ * [dataOptions]="pivotTable.dataOptions"
2729
+ * [filters]="pivotTable.filters"
2730
+ * [styleOptions]="pivotTable.styleOptions"
2731
+ * />
2732
+ * ```
2733
+ * ```ts
2734
+ import { Component } from '@angular/core';
2735
+ import { measureFactory, filterFactory } from '@sisense/sdk-data';
2736
+ import * as DM from '../../assets/sample-ecommerce';
2737
+ import type { PivotTableDataOptions } from '@sisense/sdk-ui-angular';
2738
+
2739
+ @Component({
2740
+ selector: 'app-analytics',
2741
+ templateUrl: './analytics.component.html',
2742
+ styleUrls: ['./analytics.component.scss'],
2743
+ })
2744
+ export class AnalyticsComponent {
2745
+
2746
+ pivotTableDataOptions: PivotTableDataOptions = {
2747
+ rows: [
2748
+ { column: DM.Category.Category, includeSubTotals: true },
2749
+ { column: DM.Commerce.AgeRange, includeSubTotals: true },
2750
+ DM.Commerce.Condition,
2751
+ ],
2752
+ columns: [{ column: DM.Commerce.Gender, includeSubTotals: true }],
2753
+ values: [
2754
+ measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
2755
+ {
2756
+ column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
2757
+ totalsCalculation: 'sum',
2758
+ dataBars: true,
2759
+ },
2760
+ ],
2761
+ grandTotals: { title: 'Grand Total', rows: true, columns: true },
2762
+ };
2763
+
2764
+ pivotTable = {
2765
+ dataSet: DM.DataSource,
2766
+ dataOptions: this.pivotTableDataOptions,
2767
+ filters: [filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])],
2768
+ styleOptions: { width: 1400, height: 600, rowsPerPage: 50 },
2769
+ };
2770
+
2771
+ }
1912
2772
  * ```
2773
+ * <img src="media://angular-pivot-table-example.png" width="800px" />
2774
+ * @group Data Grids
2775
+ * @alpha
1913
2776
  */
1914
- class DrilldownWidgetComponent {
1915
- /**
1916
- * Constructor for the `DrilldownWidgetComponent`.
1917
- *
1918
- * @param sisenseContextService - Sisense context service
1919
- * @param themeService - Theme service
1920
- */
1921
- constructor(
1922
- /**
1923
- * Sisense context service
1924
- *
1925
- * @category Constructor
1926
- */
1927
- sisenseContextService,
1928
- /**
1929
- * Theme service
1930
- *
1931
- * @category Constructor
1932
- */
1933
- themeService) {
2777
+ class PivotTableComponent {
2778
+ constructor(sisenseContextService, themeService) {
1934
2779
  this.sisenseContextService = sisenseContextService;
1935
2780
  this.themeService = themeService;
1936
- this.drilldownResultChange = new EventEmitter();
1937
2781
  this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
1938
2782
  createSisenseContextConnector(this.sisenseContextService),
1939
2783
  createThemeContextConnector(this.themeService),
1940
2784
  ]);
1941
2785
  }
1942
- /**
1943
- * @internal
1944
- */
2786
+ /** @internal */
1945
2787
  ngAfterViewInit() {
1946
2788
  this.componentAdapter.render(this.preactRef.nativeElement);
1947
2789
  }
1948
- /**
1949
- * @internal
1950
- */
2790
+ /** @internal */
1951
2791
  ngOnChanges() {
1952
2792
  if (this.preactRef) {
1953
2793
  this.componentAdapter.render(this.preactRef.nativeElement);
@@ -1955,103 +2795,91 @@ class DrilldownWidgetComponent {
1955
2795
  }
1956
2796
  createPreactComponent() {
1957
2797
  const props = {
1958
- drilldownDimensions: this.drilldownDimensions,
1959
- initialDimension: this.initialDimension,
1960
- config: {
1961
- ...this.config,
1962
- ...(this.config?.breadcrumbsComponent && {
1963
- breadcrumbsComponent: createWrapperElementHandler(this.config.breadcrumbsComponent),
1964
- }),
1965
- ...(this.config?.contextMenuComponent && {
1966
- contextMenuComponent: (contextMenuProps) => createWrapperElement(this.config.contextMenuComponent(contextMenuProps)),
1967
- }),
1968
- },
2798
+ dataSet: this.dataSet,
2799
+ dataOptions: this.dataOptions,
2800
+ filters: this.filters,
2801
+ styleOptions: this.styleOptions,
1969
2802
  };
1970
- return createElement(DrilldownWidget, props, (customDrilldownResult) => {
1971
- const { breadcrumbsComponent } = customDrilldownResult;
1972
- this.drilldownResultChange.emit({
1973
- ...customDrilldownResult,
1974
- ...(breadcrumbsComponent && {
1975
- breadcrumbsComponent: { render: createComponentRenderer(breadcrumbsComponent) },
1976
- }),
1977
- });
1978
- return createWrapperElement(this.preactContentRef.nativeElement);
1979
- });
2803
+ return createElement(PivotTable, props);
1980
2804
  }
1981
- /**
1982
- * @internal
1983
- */
2805
+ /** @internal */
1984
2806
  ngOnDestroy() {
1985
2807
  this.componentAdapter.destroy();
1986
2808
  }
1987
2809
  }
1988
- DrilldownWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
1989
- DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: { drilldownDimensions: "drilldownDimensions", initialDimension: "initialDimension", config: "config" }, outputs: { drilldownResultChange: "drilldownResultChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
1990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, decorators: [{
2810
+ PivotTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
2811
+ PivotTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PivotTableComponent, selector: "csdk-pivot-table", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", styleOptions: "styleOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
2812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableComponent, decorators: [{
1991
2813
  type: Component,
1992
2814
  args: [{
1993
- selector: 'csdk-drilldown-widget',
1994
- template: templateWithContent,
2815
+ selector: 'csdk-pivot-table',
2816
+ template,
1995
2817
  }]
1996
2818
  }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
1997
2819
  type: ViewChild,
1998
2820
  args: [rootId]
1999
- }], preactContentRef: [{
2000
- type: ViewChild,
2001
- args: [rootContentId]
2002
- }], drilldownDimensions: [{
2821
+ }], dataSet: [{
2003
2822
  type: Input
2004
- }], initialDimension: [{
2823
+ }], dataOptions: [{
2005
2824
  type: Input
2006
- }], config: [{
2825
+ }], filters: [{
2826
+ type: Input
2827
+ }], styleOptions: [{
2007
2828
  type: Input
2008
- }], drilldownResultChange: [{
2009
- type: Output
2010
2829
  }] } });
2011
2830
 
2012
2831
  /**
2013
- * Date Range Filter Tile Component
2832
+ * The Table Widget component extending {@link TableComponent} component to support widget style options.
2833
+ *
2834
+ * @example
2835
+ * ```html
2836
+ * <csdk-table-widget
2837
+ * [dataSource]="table.dataSet"
2838
+ * [dataOptions]="table.dataOptions"
2839
+ * [filters]="filters"
2840
+ * [title]="table.title"
2841
+ * [description]="table.description"
2842
+ * />
2843
+ * ```
2844
+ * ```ts
2845
+ * import { Component } from '@angular/core';
2846
+ * import { ChartType } from '@sisense/sdk-ui-angular';
2847
+ * import { filterFactory, measureFactory } from '@sisense/sdk-data';
2848
+ * import * as DM from '../../assets/sample-healthcare-model';
2849
+ *
2850
+ * @Component({
2851
+ * selector: 'app-widgets',
2852
+ * templateUrl: './widgets.component.html',
2853
+ * styleUrls: ['./widgets.component.scss'],
2854
+ * })
2855
+ * export class WidgetsComponent {
2856
+ * filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
2857
+ *
2858
+ * table = {
2859
+ * dataSet: DM.DataSource,
2860
+ * dataOptions: {
2861
+ * columns: [DM.Admissions.Patient_ID, measureFactory.sum(DM.Admissions.Cost_of_admission)],
2862
+ * }
2863
+ * title: 'Widget Title',
2864
+ * description: 'Widget Description',
2865
+ * };
2866
+ * }
2867
+ * ```
2868
+ * <img src="media://angular-table-widget-example.png" width="800px" />
2869
+ * @internal
2014
2870
  */
2015
- class DateRangeFilterTileComponent {
2016
- /**
2017
- * Constructor for the `DateRangeFilterTileComponent`.
2018
- *
2019
- * @param sisenseContextService - Sisense context service
2020
- * @param themeService - Theme service
2021
- */
2022
- constructor(
2023
- /**
2024
- * Sisense context service
2025
- *
2026
- * @category Constructor
2027
- */
2028
- sisenseContextService,
2029
- /**
2030
- * Theme service
2031
- *
2032
- * @category Constructor
2033
- */
2034
- themeService) {
2871
+ class TableWidgetComponent {
2872
+ constructor(sisenseContextService, themeService) {
2035
2873
  this.sisenseContextService = sisenseContextService;
2036
2874
  this.themeService = themeService;
2037
- /**
2038
- * {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onChange}
2039
- */
2040
- this.filterChange = new EventEmitter();
2041
2875
  this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
2042
2876
  createSisenseContextConnector(this.sisenseContextService),
2043
2877
  createThemeContextConnector(this.themeService),
2044
2878
  ]);
2045
2879
  }
2046
- /**
2047
- * @internal
2048
- */
2049
2880
  ngAfterViewInit() {
2050
2881
  this.componentAdapter.render(this.preactRef.nativeElement);
2051
2882
  }
2052
- /**
2053
- * @internal
2054
- */
2055
2883
  ngOnChanges() {
2056
2884
  if (this.preactRef) {
2057
2885
  this.componentAdapter.render(this.preactRef.nativeElement);
@@ -2059,149 +2887,224 @@ class DateRangeFilterTileComponent {
2059
2887
  }
2060
2888
  createPreactComponent() {
2061
2889
  const props = {
2062
- title: this.title,
2063
- attribute: this.attribute,
2064
2890
  dataSource: this.dataSource,
2065
- filter: this.filter,
2066
- earliestDate: this.earliestDate,
2067
- lastDate: this.lastDate,
2068
- onChange: (...[filter]) => this.filterChange.emit({ filter }),
2891
+ dataOptions: this.dataOptions,
2892
+ filters: this.filters,
2893
+ styleOptions: this.styleOptions,
2894
+ title: this.title,
2895
+ description: this.description,
2069
2896
  };
2070
- return createElement(DateRangeFilterTile, props);
2897
+ return createElement(TableWidget, props);
2071
2898
  }
2072
- /**
2073
- * @internal
2074
- */
2075
2899
  ngOnDestroy() {
2076
2900
  this.componentAdapter.destroy();
2077
2901
  }
2078
2902
  }
2079
- DateRangeFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRangeFilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
2080
- DateRangeFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateRangeFilterTileComponent, selector: "csdk-date-range-filter-tile", inputs: { title: "title", attribute: "attribute", dataSource: "dataSource", filter: "filter", earliestDate: "earliestDate", lastDate: "lastDate" }, outputs: { filterChange: "filterChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
2081
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRangeFilterTileComponent, decorators: [{
2903
+ 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 });
2904
+ 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", title: "title", description: "description" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
2905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableWidgetComponent, decorators: [{
2082
2906
  type: Component,
2083
2907
  args: [{
2084
- selector: 'csdk-date-range-filter-tile',
2908
+ selector: 'csdk-table-widget',
2085
2909
  template,
2086
2910
  }]
2087
2911
  }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
2088
2912
  type: ViewChild,
2089
2913
  args: [rootId]
2090
- }], title: [{
2914
+ }], dataSource: [{
2091
2915
  type: Input
2092
- }], attribute: [{
2916
+ }], dataOptions: [{
2093
2917
  type: Input
2094
- }], dataSource: [{
2918
+ }], filters: [{
2095
2919
  type: Input
2096
- }], filter: [{
2920
+ }], styleOptions: [{
2097
2921
  type: Input
2098
- }], earliestDate: [{
2922
+ }], title: [{
2099
2923
  type: Input
2100
- }], lastDate: [{
2924
+ }], description: [{
2101
2925
  type: Input
2102
- }], filterChange: [{
2103
- type: Output
2104
2926
  }] } });
2105
2927
 
2106
2928
  /**
2107
- * Drilldown Breadcrumbs Component
2929
+ * The Dashboard Widget component, which is a thin wrapper on {@link ChartWidgetComponent},
2930
+ * is used to render a widget created in a Sisense Fusion instance.
2931
+ *
2932
+ * To learn more about using Sisense Fusion Widgets in Compose SDK, see
2933
+ * [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
2934
+ *
2935
+ * @example
2936
+ * ```html
2937
+ * <csdk-dashboard-widget
2938
+ * [widgetOid]="widgetOid"
2939
+ * [dashboardOid]="dashboardOid"
2940
+ * [includeDashboardFilters]="true"
2941
+ * />
2942
+ * ```
2943
+ * ```ts
2944
+ * import { Component } from '@angular/core';
2945
+ * import { ChartType } from '@sisense/sdk-ui-angular';
2946
+ * import { filterFactory, measureFactory } from '@sisense/sdk-data';
2947
+ * import * as DM from '../../assets/sample-healthcare-model';
2948
+ *
2949
+ * @Component({
2950
+ * selector: 'app-widgets',
2951
+ * templateUrl: './widgets.component.html',
2952
+ * styleUrls: ['./widgets.component.scss'],
2953
+ * })
2954
+ * export class WidgetsComponent {
2955
+ * widgetOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
2956
+ * dashboardOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
2957
+ * ```
2958
+ * @group Fusion Assets
2108
2959
  */
2109
- class DrilldownBreadcrumbsComponent {
2110
- /**
2111
- * Constructor for the `DrilldownBreadcrumbsComponent`.
2112
- *
2113
- * @param sisenseContextService - Sisense context service
2114
- * @param themeService - Theme service
2115
- */
2116
- constructor(
2117
- /**
2118
- * Sisense context service
2119
- *
2120
- * @category Constructor
2121
- */
2122
- sisenseContextService,
2123
- /**
2124
- * Theme service
2125
- *
2126
- * @category Constructor
2127
- */
2128
- themeService) {
2960
+ class DashboardWidgetComponent {
2961
+ constructor(sisenseContextService, themeService) {
2129
2962
  this.sisenseContextService = sisenseContextService;
2130
2963
  this.themeService = themeService;
2131
- /**
2132
- * {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
2133
- *
2134
- * @category Widget
2135
- */
2136
- this.drilldownSelectionsClear = new EventEmitter();
2137
- /**
2138
- * {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.sliceDrilldownSelections}
2139
- *
2140
- * @category Widget
2141
- */
2142
- this.drilldownSelectionsSlice = new EventEmitter();
2143
2964
  this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
2144
2965
  createSisenseContextConnector(this.sisenseContextService),
2145
2966
  createThemeContextConnector(this.themeService),
2146
2967
  ]);
2147
2968
  }
2148
- /**
2149
- * @internal
2150
- */
2969
+ /** @internal */
2151
2970
  ngAfterViewInit() {
2152
2971
  this.componentAdapter.render(this.preactRef.nativeElement);
2153
2972
  }
2154
- /**
2155
- * @internal
2156
- */
2973
+ /** @internal */
2157
2974
  ngOnChanges() {
2158
2975
  if (this.preactRef) {
2159
2976
  this.componentAdapter.render(this.preactRef.nativeElement);
2160
2977
  }
2161
2978
  }
2979
+ /** @internal */
2162
2980
  createPreactComponent() {
2163
2981
  const props = {
2164
- filtersDisplayValues: this.filtersDisplayValues,
2165
- currentDimension: this.currentDimension,
2166
- clearDrilldownSelections: () => this.drilldownSelectionsClear.emit(),
2167
- sliceDrilldownSelections: (i) => this.drilldownSelectionsSlice.emit(i),
2982
+ widgetOid: this.widgetOid,
2983
+ dashboardOid: this.dashboardOid,
2984
+ filters: this.filters,
2985
+ highlights: this.highlights,
2986
+ filtersMergeStrategy: this.filtersMergeStrategy,
2987
+ includeDashboardFilters: this.includeDashboardFilters,
2988
+ title: this.title,
2989
+ description: this.description,
2990
+ styleOptions: this.styleOptions,
2991
+ highlightSelectionDisabled: this.highlightSelectionDisabled,
2992
+ drilldownOptions: this.drilldownOptions,
2168
2993
  };
2169
- return createElement(DrilldownBreadcrumbs, props);
2994
+ return createElement(DashboardWidget, props);
2170
2995
  }
2171
- /**
2172
- * @internal
2173
- */
2996
+ /** @internal */
2174
2997
  ngOnDestroy() {
2175
2998
  this.componentAdapter.destroy();
2176
2999
  }
2177
3000
  }
2178
- DrilldownBreadcrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownBreadcrumbsComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
2179
- DrilldownBreadcrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownBreadcrumbsComponent, selector: "csdk-drilldown-breadcrumbs", inputs: { filtersDisplayValues: "filtersDisplayValues", currentDimension: "currentDimension" }, outputs: { drilldownSelectionsClear: "drilldownSelectionsClear", drilldownSelectionsSlice: "drilldownSelectionsSlice" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
2180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownBreadcrumbsComponent, decorators: [{
3001
+ 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 });
3002
+ 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", includeDashboardFilters: "includeDashboardFilters", title: "title", description: "description", styleOptions: "styleOptions", highlightSelectionDisabled: "highlightSelectionDisabled", drilldownOptions: "drilldownOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
3003
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, decorators: [{
2181
3004
  type: Component,
2182
3005
  args: [{
2183
- selector: 'csdk-drilldown-breadcrumbs',
3006
+ selector: 'csdk-dashboard-widget',
2184
3007
  template,
2185
3008
  }]
2186
3009
  }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
2187
3010
  type: ViewChild,
2188
3011
  args: [rootId]
2189
- }], filtersDisplayValues: [{
3012
+ }], widgetOid: [{
2190
3013
  type: Input
2191
- }], currentDimension: [{
3014
+ }], dashboardOid: [{
3015
+ type: Input
3016
+ }], filters: [{
3017
+ type: Input
3018
+ }], highlights: [{
3019
+ type: Input
3020
+ }], filtersMergeStrategy: [{
3021
+ type: Input
3022
+ }], includeDashboardFilters: [{
3023
+ type: Input
3024
+ }], title: [{
3025
+ type: Input
3026
+ }], description: [{
3027
+ type: Input
3028
+ }], styleOptions: [{
3029
+ type: Input
3030
+ }], highlightSelectionDisabled: [{
3031
+ type: Input
3032
+ }], drilldownOptions: [{
2192
3033
  type: Input
2193
- }], drilldownSelectionsClear: [{
2194
- type: Output
2195
- }], drilldownSelectionsSlice: [{
2196
- type: Output
2197
3034
  }] } });
2198
3035
 
2199
3036
  /**
2200
- * Context Menu Component
3037
+ * An Angular component designed to add drilldown functionality to any type of chart.
3038
+ *
3039
+ * It acts as a wrapper around a given chart component, enhancing it with drilldown capabilities
3040
+ *
3041
+ * The widget offers several features including:
3042
+ * - A context menu for initiating drilldown actions (can be provided as a custom component)
3043
+ * - Breadcrumbs that not only allow for drilldown selection slicing but also
3044
+ * provide an option to clear the selection (can be provided as a custom component)
3045
+ * - Filters specifically created for drilldown operation
3046
+ * - An option to navigate to the next drilldown dimension
3047
+ *
3048
+ * When an `initialDimension` is specified, the `drilldownDimension` will automatically inherit its value,
3049
+ * even before any points on the chart are selected.
3050
+ * This allows for complete control over the chart's dimensions to be handed over to the DrilldownWidget
3051
+ *
3052
+ * @example
3053
+ * An example of using the `csdk-drilldown-widget` component to plot a `csdk-column-chart`
3054
+ * over the Sample Healthcare data source hosted in a Sisense instance:
3055
+ * ```ts
3056
+ * // Component behavior in .component.ts
3057
+ * chart = {
3058
+ * dataOptions: {
3059
+ * category: [DM.Divisions.Divison_name],
3060
+ * value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
3061
+ * breakBy: [],
3062
+ * },
3063
+ * dataPointContextMenu: ({ point, nativeEvent }: { point: any; nativeEvent: MouseEvent }) => {
3064
+ * this.drilldownResult?.onDataPointsSelected?.([point], nativeEvent);
3065
+ * this.drilldownResult?.onContextMenu({
3066
+ * left: nativeEvent.clientX,
3067
+ * top: nativeEvent.clientY,
3068
+ * });
3069
+ * }
3070
+ * }
3071
+ *
3072
+ * drilldownResult?: CustomDrilldownResult;
3073
+ *
3074
+ * drilldown = {
3075
+ * drilldownDimensions: [DM.Patients.Gender, DM.Admissions.Surgical_Procedure],
3076
+ * initialDimension: DM.Divisions.Divison_name,
3077
+ * drilldownChange: (drilldownResult: CustomDrilldownResult) => {
3078
+ * this.drilldownResult = drilldownResult;
3079
+ * this.chart.dataOptions = {
3080
+ * ...this.chart.dataOptions,
3081
+ * category: [drilldownResult.drilldownDimension]
3082
+ * }
3083
+ * }
3084
+ * };
3085
+ * ```
3086
+ * ```html
3087
+ * <!--Component HTML template in .component.html-->
3088
+ * <csdk-drilldown-widget
3089
+ * [drilldownDimensions]="drilldown.drilldownDimensions"
3090
+ * [initialDimension]="drilldown.initialDimension"
3091
+ * (drilldownResultChange)="drilldown.drilldownChange($event)"
3092
+ * >
3093
+ * <csdk-column-chart
3094
+ * [dataSet]="DM.DataSource"
3095
+ * [dataOptions]="chart.dataOptions"
3096
+ * [filters]="drilldownResult?.drilldownFilters || []"
3097
+ * (dataPointContextMenu)="chart.dataPointContextMenu($event)"
3098
+ * />
3099
+ * </csdk-drilldown-widget>
3100
+ * ```
3101
+ * <img src="media://angular-drilldown-widget-example.png" width="800px" />
3102
+ *
3103
+ * @group Drilldown
2201
3104
  */
2202
- class ContextMenuComponent {
3105
+ class DrilldownWidgetComponent {
2203
3106
  /**
2204
- * Constructor for the `ContextMenuComponent`.
3107
+ * Constructor for the `DrilldownWidgetComponent`.
2205
3108
  *
2206
3109
  * @param sisenseContextService - Sisense context service
2207
3110
  * @param themeService - Theme service
@@ -2221,10 +3124,7 @@ class ContextMenuComponent {
2221
3124
  themeService) {
2222
3125
  this.sisenseContextService = sisenseContextService;
2223
3126
  this.themeService = themeService;
2224
- /**
2225
- * {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
2226
- */
2227
- this.contextMenuClose = new EventEmitter();
3127
+ this.drilldownResultChange = new EventEmitter();
2228
3128
  this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
2229
3129
  createSisenseContextConnector(this.sisenseContextService),
2230
3130
  createThemeContextConnector(this.themeService),
@@ -2246,11 +3146,28 @@ class ContextMenuComponent {
2246
3146
  }
2247
3147
  createPreactComponent() {
2248
3148
  const props = {
2249
- position: this.position,
2250
- itemSections: this.itemSections,
2251
- closeContextMenu: () => this.contextMenuClose.emit(),
3149
+ drilldownDimensions: this.drilldownDimensions,
3150
+ initialDimension: this.initialDimension,
3151
+ config: {
3152
+ ...this.config,
3153
+ ...(this.config?.breadcrumbsComponent && {
3154
+ breadcrumbsComponent: createWrapperElementHandler(this.config.breadcrumbsComponent),
3155
+ }),
3156
+ ...(this.config?.contextMenuComponent && {
3157
+ contextMenuComponent: (contextMenuProps) => createWrapperElement(this.config.contextMenuComponent(contextMenuProps)),
3158
+ }),
3159
+ },
2252
3160
  };
2253
- return createElement(ContextMenu, props, createWrapperElement(this.preactContentRef.nativeElement));
3161
+ return createElement(DrilldownWidget, props, (customDrilldownResult) => {
3162
+ const { breadcrumbsComponent } = customDrilldownResult;
3163
+ this.drilldownResultChange.emit({
3164
+ ...customDrilldownResult,
3165
+ ...(breadcrumbsComponent && {
3166
+ breadcrumbsComponent: { render: createComponentRenderer(breadcrumbsComponent) },
3167
+ }),
3168
+ });
3169
+ return createWrapperElement(this.preactContentRef.nativeElement);
3170
+ });
2254
3171
  }
2255
3172
  /**
2256
3173
  * @internal
@@ -2259,12 +3176,12 @@ class ContextMenuComponent {
2259
3176
  this.componentAdapter.destroy();
2260
3177
  }
2261
3178
  }
2262
- ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
2263
- ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuComponent, selector: "csdk-context-menu", inputs: { position: "position", itemSections: "itemSections" }, outputs: { contextMenuClose: "contextMenuClose" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
2264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, decorators: [{
3179
+ DrilldownWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
3180
+ DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: { drilldownDimensions: "drilldownDimensions", initialDimension: "initialDimension", config: "config" }, outputs: { drilldownResultChange: "drilldownResultChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
3181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, decorators: [{
2265
3182
  type: Component,
2266
3183
  args: [{
2267
- selector: 'csdk-context-menu',
3184
+ selector: 'csdk-drilldown-widget',
2268
3185
  template: templateWithContent,
2269
3186
  }]
2270
3187
  }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
@@ -2273,78 +3190,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2273
3190
  }], preactContentRef: [{
2274
3191
  type: ViewChild,
2275
3192
  args: [rootContentId]
2276
- }], position: [{
3193
+ }], drilldownDimensions: [{
2277
3194
  type: Input
2278
- }], itemSections: [{
3195
+ }], initialDimension: [{
2279
3196
  type: Input
2280
- }], contextMenuClose: [{
3197
+ }], config: [{
3198
+ type: Input
3199
+ }], drilldownResultChange: [{
2281
3200
  type: Output
2282
3201
  }] } });
2283
3202
 
2284
3203
  /**
2285
- * An Angular component representing data in a way that visually describes the distribution, variability,
2286
- * and center of a data set along an axis.
2287
- * See [Boxplot Chart](https://docs.sisense.com/main/SisenseLinux/box-and-whisker-plot.htm) for more information.
3204
+ * The Chart Widget component extending {@link ChartComponent} to support widget style options.
3205
+ *
3206
+ * @example
3207
+ * ```html
3208
+ * <csdk-chart-widget
3209
+ * [chartType]="chartWidget.chartType"
3210
+ * [dataSource]="chartWidget.dataSource"
3211
+ * [dataOptions]="chartWidget.dataOptions"
3212
+ * [highlights]="filters"
3213
+ * [title]="chartWidget.title"
3214
+ * [description]="chartWidget.description"
3215
+ * [beforeRender]="onBeforeRender"
3216
+ * (dataPointClick)="logArguments($event)"
3217
+ * (dataPointContextMenu)="logArguments($event)"
3218
+ * (dataPointsSelect)="logArguments($event)"
3219
+ * />
3220
+ * ```
3221
+ * ```ts
3222
+ * import { Component } from '@angular/core';
3223
+ * import { ChartType } from '@sisense/sdk-ui-angular';
3224
+ * import { filterFactory } from '@sisense/sdk-data';
3225
+ * import * as DM from '../../assets/sample-healthcare-model';
3226
+ *
3227
+ * @Component({
3228
+ * selector: 'app-widgets',
3229
+ * templateUrl: './widgets.component.html',
3230
+ * styleUrls: ['./widgets.component.scss'],
3231
+ * })
3232
+ * export class WidgetsComponent {
3233
+ * filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
3234
+ * chartWidget = {
3235
+ * chartType: 'column' as ChartType,
3236
+ * dataSource: DM.DataSource,
3237
+ * dataOptions: {
3238
+ * category: [DM.Divisions.Divison_name],
3239
+ * value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
3240
+ * breakBy: [],
3241
+ * },
3242
+ * title: 'Chart Title',
3243
+ * description: 'Chart Description',
3244
+ * };
3245
+ * logArguments(...args: any[]) {
3246
+ * console.log(args);
3247
+ * }
3248
+ *
3249
+ * onBeforeRender(options: any) {
3250
+ * console.log('beforeRender');
3251
+ * console.log(options);
3252
+ * return options;
3253
+ * }
3254
+ *
3255
+ * }
3256
+ * ```
3257
+ * <img src="media://angular-chart-widget-example.png" width="800px" />
3258
+ *
3259
+ * @group Chart Utilities
2288
3260
  */
2289
- class BoxplotChartComponent {
2290
- constructor() {
3261
+ class ChartWidgetComponent {
3262
+ constructor(sisenseContextService, themeService) {
3263
+ this.sisenseContextService = sisenseContextService;
3264
+ this.themeService = themeService;
2291
3265
  /**
2292
- * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointClick}
3266
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointClick}
2293
3267
  *
2294
3268
  * @category Callbacks
2295
3269
  */
2296
3270
  this.dataPointClick = new EventEmitter();
2297
3271
  /**
2298
- * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointContextMenu}
3272
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointContextMenu}
2299
3273
  *
2300
3274
  * @category Callbacks
2301
3275
  */
2302
3276
  this.dataPointContextMenu = new EventEmitter();
2303
3277
  /**
2304
- * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointsSelected}
3278
+ * {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointsSelected}
2305
3279
  *
2306
3280
  * @category Callbacks
2307
3281
  */
2308
3282
  this.dataPointsSelect = new EventEmitter();
2309
- /** @internal */
2310
- this.chartType = 'boxplot';
3283
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
3284
+ createSisenseContextConnector(this.sisenseContextService),
3285
+ createThemeContextConnector(this.themeService),
3286
+ ]);
3287
+ }
3288
+ /** @internal */
3289
+ ngAfterViewInit() {
3290
+ this.componentAdapter.render(this.preactRef.nativeElement);
3291
+ }
3292
+ /** @internal */
3293
+ ngOnChanges() {
3294
+ if (this.preactRef) {
3295
+ this.componentAdapter.render(this.preactRef.nativeElement);
3296
+ }
3297
+ }
3298
+ createPreactComponent() {
3299
+ const props = {
3300
+ chartType: this.chartType,
3301
+ dataSource: this.dataSource,
3302
+ dataOptions: this.dataOptions,
3303
+ filters: this.filters,
3304
+ highlights: this.highlights,
3305
+ styleOptions: this.styleOptions,
3306
+ drilldownOptions: this.drilldownOptions,
3307
+ title: this.title,
3308
+ description: this.description,
3309
+ highlightSelectionDisabled: this.highlightSelectionDisabled,
3310
+ onBeforeRender: this.beforeRender?.bind(this),
3311
+ onDataPointClick: (...[point, nativeEvent]) => this.dataPointClick.emit({ point, nativeEvent }),
3312
+ onDataPointContextMenu: (...[point, nativeEvent]) => this.dataPointContextMenu.emit({ point, nativeEvent }),
3313
+ onDataPointsSelected: (...[points, nativeEvent]) => this.dataPointsSelect.emit({ points, nativeEvent }),
3314
+ };
3315
+ return createElement(ChartWidget, props);
3316
+ }
3317
+ /** @internal */
3318
+ ngOnDestroy() {
3319
+ this.componentAdapter.destroy();
2311
3320
  }
2312
3321
  }
2313
- BoxplotChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2314
- BoxplotChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BoxplotChartComponent, selector: "csdk-boxplot-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
2315
- <csdk-chart
2316
- [chartType]="chartType"
2317
- [dataSet]="dataSet"
2318
- [dataOptions]="dataOptions"
2319
- [filters]="filters"
2320
- [highlights]="highlights"
2321
- [styleOptions]="styleOptions"
2322
- [beforeRender]="beforeRender"
2323
- (dataPointClick)="dataPointClick.emit($event)"
2324
- (dataPointContextMenu)="dataPointContextMenu.emit($event)"
2325
- (dataPointsSelect)="dataPointsSelect.emit($event)"
2326
- />
2327
- `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
2328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, decorators: [{
3322
+ 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 });
3323
+ 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", drilldownOptions: "drilldownOptions", title: "title", description: "description", highlightSelectionDisabled: "highlightSelectionDisabled", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
3324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, decorators: [{
2329
3325
  type: Component,
2330
3326
  args: [{
2331
- selector: 'csdk-boxplot-chart',
2332
- template: `
2333
- <csdk-chart
2334
- [chartType]="chartType"
2335
- [dataSet]="dataSet"
2336
- [dataOptions]="dataOptions"
2337
- [filters]="filters"
2338
- [highlights]="highlights"
2339
- [styleOptions]="styleOptions"
2340
- [beforeRender]="beforeRender"
2341
- (dataPointClick)="dataPointClick.emit($event)"
2342
- (dataPointContextMenu)="dataPointContextMenu.emit($event)"
2343
- (dataPointsSelect)="dataPointsSelect.emit($event)"
2344
- />
2345
- `,
3327
+ selector: 'csdk-chart-widget',
3328
+ template,
2346
3329
  }]
2347
- }], propDecorators: { dataSet: [{
3330
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
3331
+ type: ViewChild,
3332
+ args: [rootId]
3333
+ }], chartType: [{
3334
+ type: Input
3335
+ }], dataSource: [{
2348
3336
  type: Input
2349
3337
  }], dataOptions: [{
2350
3338
  type: Input
@@ -2354,6 +3342,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2354
3342
  type: Input
2355
3343
  }], styleOptions: [{
2356
3344
  type: Input
3345
+ }], drilldownOptions: [{
3346
+ type: Input
3347
+ }], title: [{
3348
+ type: Input
3349
+ }], description: [{
3350
+ type: Input
3351
+ }], highlightSelectionDisabled: [{
3352
+ type: Input
2357
3353
  }], beforeRender: [{
2358
3354
  type: Input
2359
3355
  }], dataPointClick: [{
@@ -2365,140 +3361,145 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2365
3361
  }] } });
2366
3362
 
2367
3363
  /**
2368
- * An Angular component that allows to visualize geographical data as data points on a map.
2369
- * See [Scattermap Chart](https://docs.sisense.com/main/SisenseLinux/scatter-map.htm) for more information.
3364
+ * Drilldown Breadcrumbs Component
3365
+ *
3366
+ * @group Drilldown
2370
3367
  */
2371
- class ScattermapChartComponent {
2372
- constructor() {
3368
+ class DrilldownBreadcrumbsComponent {
3369
+ /**
3370
+ * Constructor for the `DrilldownBreadcrumbsComponent`.
3371
+ *
3372
+ * @param sisenseContextService - Sisense context service
3373
+ * @param themeService - Theme service
3374
+ */
3375
+ constructor(
3376
+ /**
3377
+ * Sisense context service
3378
+ *
3379
+ * @category Constructor
3380
+ */
3381
+ sisenseContextService,
3382
+ /**
3383
+ * Theme service
3384
+ *
3385
+ * @category Constructor
3386
+ */
3387
+ themeService) {
3388
+ this.sisenseContextService = sisenseContextService;
3389
+ this.themeService = themeService;
2373
3390
  /**
2374
- * {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.onDataPointClick}
3391
+ * {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
2375
3392
  *
2376
- * @category Callbacks
3393
+ * @category Widget
2377
3394
  */
2378
- this.dataPointClick = new EventEmitter();
2379
- /** @internal */
2380
- this.chartType = 'scattermap';
2381
- }
2382
- }
2383
- ScattermapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2384
- ScattermapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ScattermapChartComponent, selector: "csdk-scattermap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
2385
- <csdk-chart
2386
- [chartType]="chartType"
2387
- [dataSet]="dataSet"
2388
- [dataOptions]="dataOptions"
2389
- [filters]="filters"
2390
- [highlights]="highlights"
2391
- [styleOptions]="styleOptions"
2392
- (dataPointClick)="dataPointClick.emit($event)"
2393
- />
2394
- `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
2395
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, decorators: [{
2396
- type: Component,
2397
- args: [{
2398
- selector: 'csdk-scattermap-chart',
2399
- template: `
2400
- <csdk-chart
2401
- [chartType]="chartType"
2402
- [dataSet]="dataSet"
2403
- [dataOptions]="dataOptions"
2404
- [filters]="filters"
2405
- [highlights]="highlights"
2406
- [styleOptions]="styleOptions"
2407
- (dataPointClick)="dataPointClick.emit($event)"
2408
- />
2409
- `,
2410
- }]
2411
- }], propDecorators: { dataSet: [{
2412
- type: Input
2413
- }], dataOptions: [{
2414
- type: Input
2415
- }], filters: [{
2416
- type: Input
2417
- }], highlights: [{
2418
- type: Input
2419
- }], styleOptions: [{
2420
- type: Input
2421
- }], dataPointClick: [{
2422
- type: Output
2423
- }] } });
2424
-
2425
- /**
2426
- * An Angular component that allows to visualize geographical data as polygons on a map.
2427
- * See [Areamap Chart](https://docs.sisense.com/main/SisenseLinux/area-map.htm) for more information.
2428
- */
2429
- class AreamapChartComponent {
2430
- constructor() {
3395
+ this.drilldownSelectionsClear = new EventEmitter();
2431
3396
  /**
2432
- * {@inheritDoc @sisense/sdk-ui!AreamapChartProps.onDataPointClick}
3397
+ * {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.sliceDrilldownSelections}
2433
3398
  *
2434
- * @category Callbacks
3399
+ * @category Widget
2435
3400
  */
2436
- this.dataPointClick = new EventEmitter();
2437
- /** @internal */
2438
- this.chartType = 'areamap';
3401
+ this.drilldownSelectionsSlice = new EventEmitter();
3402
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
3403
+ createSisenseContextConnector(this.sisenseContextService),
3404
+ createThemeContextConnector(this.themeService),
3405
+ ]);
3406
+ }
3407
+ /**
3408
+ * @internal
3409
+ */
3410
+ ngAfterViewInit() {
3411
+ this.componentAdapter.render(this.preactRef.nativeElement);
3412
+ }
3413
+ /**
3414
+ * @internal
3415
+ */
3416
+ ngOnChanges() {
3417
+ if (this.preactRef) {
3418
+ this.componentAdapter.render(this.preactRef.nativeElement);
3419
+ }
3420
+ }
3421
+ createPreactComponent() {
3422
+ const props = {
3423
+ filtersDisplayValues: this.filtersDisplayValues,
3424
+ currentDimension: this.currentDimension,
3425
+ clearDrilldownSelections: () => this.drilldownSelectionsClear.emit(),
3426
+ sliceDrilldownSelections: (i) => this.drilldownSelectionsSlice.emit(i),
3427
+ };
3428
+ return createElement(DrilldownBreadcrumbs, props);
3429
+ }
3430
+ /**
3431
+ * @internal
3432
+ */
3433
+ ngOnDestroy() {
3434
+ this.componentAdapter.destroy();
2439
3435
  }
2440
3436
  }
2441
- AreamapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2442
- AreamapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AreamapChartComponent, selector: "csdk-areamap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
2443
- <csdk-chart
2444
- [chartType]="chartType"
2445
- [dataSet]="dataSet"
2446
- [dataOptions]="dataOptions"
2447
- [filters]="filters"
2448
- [highlights]="highlights"
2449
- [styleOptions]="styleOptions"
2450
- (dataPointClick)="dataPointClick.emit($event)"
2451
- />
2452
- `, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
2453
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, decorators: [{
3437
+ DrilldownBreadcrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownBreadcrumbsComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
3438
+ DrilldownBreadcrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownBreadcrumbsComponent, selector: "csdk-drilldown-breadcrumbs", inputs: { filtersDisplayValues: "filtersDisplayValues", currentDimension: "currentDimension" }, outputs: { drilldownSelectionsClear: "drilldownSelectionsClear", drilldownSelectionsSlice: "drilldownSelectionsSlice" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
3439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownBreadcrumbsComponent, decorators: [{
2454
3440
  type: Component,
2455
3441
  args: [{
2456
- selector: 'csdk-areamap-chart',
2457
- template: `
2458
- <csdk-chart
2459
- [chartType]="chartType"
2460
- [dataSet]="dataSet"
2461
- [dataOptions]="dataOptions"
2462
- [filters]="filters"
2463
- [highlights]="highlights"
2464
- [styleOptions]="styleOptions"
2465
- (dataPointClick)="dataPointClick.emit($event)"
2466
- />
2467
- `,
3442
+ selector: 'csdk-drilldown-breadcrumbs',
3443
+ template,
2468
3444
  }]
2469
- }], propDecorators: { dataSet: [{
2470
- type: Input
2471
- }], dataOptions: [{
2472
- type: Input
2473
- }], filters: [{
2474
- type: Input
2475
- }], highlights: [{
3445
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
3446
+ type: ViewChild,
3447
+ args: [rootId]
3448
+ }], filtersDisplayValues: [{
2476
3449
  type: Input
2477
- }], styleOptions: [{
3450
+ }], currentDimension: [{
2478
3451
  type: Input
2479
- }], dataPointClick: [{
3452
+ }], drilldownSelectionsClear: [{
3453
+ type: Output
3454
+ }], drilldownSelectionsSlice: [{
2480
3455
  type: Output
2481
3456
  }] } });
2482
3457
 
2483
3458
  /**
2484
- * Pivot Table with and pagination.
3459
+ * Context Menu Component
2485
3460
  *
2486
- * @alpha
3461
+ * @group Drilldown
2487
3462
  */
2488
- class PivotTableComponent {
2489
- constructor(sisenseContextService, themeService) {
3463
+ class ContextMenuComponent {
3464
+ /**
3465
+ * Constructor for the `ContextMenuComponent`.
3466
+ *
3467
+ * @param sisenseContextService - Sisense context service
3468
+ * @param themeService - Theme service
3469
+ */
3470
+ constructor(
3471
+ /**
3472
+ * Sisense context service
3473
+ *
3474
+ * @category Constructor
3475
+ */
3476
+ sisenseContextService,
3477
+ /**
3478
+ * Theme service
3479
+ *
3480
+ * @category Constructor
3481
+ */
3482
+ themeService) {
2490
3483
  this.sisenseContextService = sisenseContextService;
2491
3484
  this.themeService = themeService;
3485
+ /**
3486
+ * {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
3487
+ */
3488
+ this.contextMenuClose = new EventEmitter();
2492
3489
  this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
2493
3490
  createSisenseContextConnector(this.sisenseContextService),
2494
3491
  createThemeContextConnector(this.themeService),
2495
3492
  ]);
2496
3493
  }
2497
- /** @internal */
3494
+ /**
3495
+ * @internal
3496
+ */
2498
3497
  ngAfterViewInit() {
2499
3498
  this.componentAdapter.render(this.preactRef.nativeElement);
2500
3499
  }
2501
- /** @internal */
3500
+ /**
3501
+ * @internal
3502
+ */
2502
3503
  ngOnChanges() {
2503
3504
  if (this.preactRef) {
2504
3505
  this.componentAdapter.render(this.preactRef.nativeElement);
@@ -2506,37 +3507,39 @@ class PivotTableComponent {
2506
3507
  }
2507
3508
  createPreactComponent() {
2508
3509
  const props = {
2509
- dataSet: this.dataSet,
2510
- dataOptions: this.dataOptions,
2511
- filters: this.filters,
2512
- styleOptions: this.styleOptions,
3510
+ position: this.position,
3511
+ itemSections: this.itemSections,
3512
+ closeContextMenu: () => this.contextMenuClose.emit(),
2513
3513
  };
2514
- return createElement(PivotTable, props);
3514
+ return createElement(ContextMenu, props, createWrapperElement(this.preactContentRef.nativeElement));
2515
3515
  }
2516
- /** @internal */
3516
+ /**
3517
+ * @internal
3518
+ */
2517
3519
  ngOnDestroy() {
2518
3520
  this.componentAdapter.destroy();
2519
3521
  }
2520
3522
  }
2521
- PivotTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
2522
- PivotTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PivotTableComponent, selector: "csdk-pivot-table", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", styleOptions: "styleOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
2523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableComponent, decorators: [{
3523
+ ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
3524
+ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuComponent, selector: "csdk-context-menu", inputs: { position: "position", itemSections: "itemSections" }, outputs: { contextMenuClose: "contextMenuClose" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
3525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, decorators: [{
2524
3526
  type: Component,
2525
3527
  args: [{
2526
- selector: 'csdk-pivot-table',
2527
- template,
3528
+ selector: 'csdk-context-menu',
3529
+ template: templateWithContent,
2528
3530
  }]
2529
3531
  }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
2530
3532
  type: ViewChild,
2531
3533
  args: [rootId]
2532
- }], dataSet: [{
2533
- type: Input
2534
- }], dataOptions: [{
2535
- type: Input
2536
- }], filters: [{
3534
+ }], preactContentRef: [{
3535
+ type: ViewChild,
3536
+ args: [rootContentId]
3537
+ }], position: [{
2537
3538
  type: Input
2538
- }], styleOptions: [{
3539
+ }], itemSections: [{
2539
3540
  type: Input
3541
+ }], contextMenuClose: [{
3542
+ type: Output
2540
3543
  }] } });
2541
3544
 
2542
3545
  /**
@@ -2564,6 +3567,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2564
3567
  * bootstrap: [AppComponent],
2565
3568
  * })
2566
3569
  * ```
3570
+ *
3571
+ * @group Contexts
2567
3572
  */
2568
3573
  class SdkUiModule {
2569
3574
  }
@@ -2692,6 +3697,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2692
3697
  */
2693
3698
  /**
2694
3699
  * @packageDocumentation
3700
+ * @groupDescription Charts
3701
+ * Angular components for charts
3702
+ * @groupDescription Fusion Assets
3703
+ * Fusion Dashboards, Widgets, Queries, and Formulas
3704
+ * @groupDescription Interfaces
3705
+ * TypeScript interfaces for components and services listed above
3706
+ * @groupDescription Type Aliases
3707
+ * TypeScript type aliases for components and services listed above
2695
3708
  * @beta
2696
3709
  */
2697
3710