@sisense/sdk-ui-angular 1.33.0 → 2.0.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.
- package/dist/ai/lib/component-wrapper-helpers/context-connectors.d.ts +2 -2
- package/dist/ai/lib/components/chatbot.component.d.ts +2 -8
- package/dist/ai/lib/components/get-nlg-insights.component.d.ts +2 -8
- package/dist/ai/lib/sdk-ai.module.d.ts +0 -2
- package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/ai/lib/services/ai.service.d.ts +12 -8
- package/dist/ai/public-api.d.ts +2 -2
- package/dist/esm2020/ai/lib/component-wrapper-helpers/context-connectors.mjs +15 -9
- package/dist/esm2020/ai/lib/components/chatbot.component.mjs +9 -16
- package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +9 -16
- package/dist/esm2020/ai/lib/sdk-ai.module.mjs +2 -4
- package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/ai/lib/services/ai.service.mjs +4 -9
- package/dist/esm2020/ai/public-api.mjs +3 -3
- package/dist/esm2020/lib/component-wrapper-helpers/context-connectors.mjs +60 -36
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -3
- package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/chart.component.mjs +8 -10
- package/dist/esm2020/lib/components/charts/column-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/index.mjs +13 -13
- package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/pivot-table.component.mjs +8 -9
- package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/table.component.mjs +8 -10
- package/dist/esm2020/lib/components/charts/treemap-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/context-menu.component.mjs +9 -9
- package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +8 -9
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +10 -10
- package/dist/esm2020/lib/components/dashboard/index.mjs +2 -2
- package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/criteria-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/filters/filter-tile.component.mjs +147 -0
- package/dist/esm2020/lib/components/filters/index.mjs +4 -3
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +9 -10
- package/dist/esm2020/lib/components/filters/relative-date-filter-tile.component.mjs +8 -9
- package/dist/esm2020/lib/components/index.mjs +4 -4
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +9 -11
- package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +19 -23
- package/dist/esm2020/lib/components/widgets/index.mjs +5 -5
- package/dist/esm2020/lib/components/widgets/pivot-table-widget.component.mjs +8 -9
- package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +8 -9
- package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +8 -9
- package/dist/esm2020/lib/components/widgets/widget.component.mjs +168 -0
- package/dist/esm2020/lib/decorators/decorators.module.mjs +1 -1
- package/dist/esm2020/lib/decorators/index.mjs +2 -2
- package/dist/esm2020/lib/decorators/trackable.decorator.mjs +2 -2
- package/dist/esm2020/lib/helpers/dashboard-props-preact-translator.mjs +14 -0
- package/dist/esm2020/lib/helpers/event-emitter-with-has-listeners.mjs +31 -0
- package/dist/esm2020/lib/helpers/index.mjs +2 -0
- package/dist/esm2020/lib/helpers/widget-props-preact-translator.mjs +37 -0
- package/dist/esm2020/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/lib/sdk-ui.module.mjs +13 -10
- package/dist/esm2020/lib/services/dashboard.service.mjs +86 -2
- package/dist/esm2020/lib/services/hierarchy.service.mjs +1 -1
- package/dist/esm2020/lib/services/index.mjs +4 -4
- package/dist/esm2020/lib/services/plugins.service.mjs +1 -1
- package/dist/esm2020/lib/services/query.service.mjs +35 -6
- package/dist/esm2020/lib/services/sisense-context.service.mjs +1 -1
- package/dist/esm2020/lib/services/theme.service.mjs +2 -2
- package/dist/esm2020/lib/services/widget.service.mjs +1 -1
- package/dist/esm2020/lib/types/chart-event-props.mjs +1 -1
- package/dist/esm2020/lib/types/dashboard-config.mjs +1 -1
- package/dist/esm2020/lib/types/data-point.mjs +1 -1
- package/dist/esm2020/lib/types/filter-event-props.mjs +2 -0
- package/dist/esm2020/lib/types/index.mjs +4 -3
- package/dist/esm2020/lib/utilities/dashboard-helpers.mjs +2 -15
- package/dist/esm2020/lib/utilities/dashboard-model-translator.mjs +1 -1
- package/dist/esm2020/lib/utilities/widget-model-translator.mjs +1 -1
- package/dist/esm2020/public-api.mjs +4 -4
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +32 -49
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +2545 -2221
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +32 -47
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +2571 -2216
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/component-wrapper-helpers/context-connectors.d.ts +5 -5
- package/dist/lib/components/charts/area-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/area-range-chart.component.d.ts +1 -4
- package/dist/lib/components/charts/areamap-chart.component.d.ts +5 -8
- package/dist/lib/components/charts/bar-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/boxplot-chart.component.d.ts +7 -9
- package/dist/lib/components/charts/chart.component.d.ts +4 -6
- package/dist/lib/components/charts/column-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/funnel-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/index.d.ts +12 -12
- package/dist/lib/components/charts/indicator-chart.component.d.ts +3 -5
- package/dist/lib/components/charts/line-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/pie-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/pivot-table.component.d.ts +1 -1
- package/dist/lib/components/charts/polar-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/scatter-chart.component.d.ts +7 -9
- package/dist/lib/components/charts/scattermap-chart.component.d.ts +5 -7
- package/dist/lib/components/charts/sunburst-chart.component.d.ts +1 -3
- package/dist/lib/components/charts/table.component.d.ts +1 -3
- package/dist/lib/components/charts/treemap-chart.component.d.ts +1 -3
- package/dist/lib/components/context-menu.component.d.ts +1 -1
- package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +2 -2
- package/dist/lib/components/dashboard/dashboard.component.d.ts +7 -2
- package/dist/lib/components/dashboard/index.d.ts +1 -1
- package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +1 -1
- package/dist/lib/components/filters/criteria-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/filters/date-range-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/filters/filter-tile.component.d.ts +125 -0
- package/dist/lib/components/filters/index.d.ts +3 -2
- package/dist/lib/components/filters/member-filter-tile.component.d.ts +2 -2
- package/dist/lib/components/filters/relative-date-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/index.d.ts +3 -3
- package/dist/lib/components/widgets/chart-widget.component.d.ts +5 -7
- package/dist/lib/components/widgets/drilldown-widget.component.d.ts +3 -13
- package/dist/lib/components/widgets/index.d.ts +4 -4
- package/dist/lib/components/widgets/pivot-table-widget.component.d.ts +1 -1
- package/dist/lib/components/widgets/table-widget.component.d.ts +1 -1
- package/dist/lib/components/widgets/widget-by-id.component.d.ts +1 -2
- package/dist/lib/components/widgets/widget.component.d.ts +209 -0
- package/dist/lib/decorators/index.d.ts +1 -1
- package/dist/lib/helpers/dashboard-props-preact-translator.d.ts +4 -0
- package/dist/lib/helpers/event-emitter-with-has-listeners.d.ts +24 -0
- package/dist/lib/helpers/index.d.ts +1 -0
- package/dist/lib/helpers/widget-props-preact-translator.d.ts +4 -0
- package/dist/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/lib/sdk-ui.module.d.ts +20 -20
- package/dist/lib/services/dashboard.service.d.ts +79 -1
- package/dist/lib/services/hierarchy.service.d.ts +1 -1
- package/dist/lib/services/index.d.ts +3 -3
- package/dist/lib/services/plugins.service.d.ts +1 -1
- package/dist/lib/services/query.service.d.ts +17 -8
- package/dist/lib/services/sisense-context.service.d.ts +1 -1
- package/dist/lib/services/theme.service.d.ts +1 -1
- package/dist/lib/types/chart-event-props.d.ts +9 -10
- package/dist/lib/types/dashboard-config.d.ts +1 -1
- package/dist/lib/types/data-point.d.ts +18 -11
- package/dist/lib/types/filter-event-props.d.ts +35 -0
- package/dist/lib/types/index.d.ts +3 -2
- package/dist/lib/utilities/dashboard-helpers.d.ts +1 -12
- package/dist/lib/utilities/widget-model-translator.d.ts +2 -2
- package/dist/package.json +4 -4
- package/dist/public-api.d.ts +4 -4
- package/dist/version.d.ts +1 -1
- package/package.json +10 -10
- package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +0 -118
- package/dist/lib/components/widgets/dashboard-widget.component.d.ts +0 -120
|
@@ -3,15 +3,20 @@ import { type DashboardProps as DashboardPropsPreact } from '@sisense/sdk-ui-pre
|
|
|
3
3
|
import { SisenseContextService } from '../../services/sisense-context.service';
|
|
4
4
|
import { ThemeService } from '../../services/theme.service';
|
|
5
5
|
import type { DashboardConfig } from '../../types';
|
|
6
|
+
import { WidgetProps } from '../widgets/widget.component';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* Props of the {@link DashboardComponent}.
|
|
9
10
|
*/
|
|
10
|
-
export interface DashboardProps extends DashboardPropsPreact {
|
|
11
|
+
export interface DashboardProps extends Omit<DashboardPropsPreact, 'widgets'> {
|
|
11
12
|
/**
|
|
12
13
|
* {@inheritDoc @sisense/sdk-ui!DashboardProps.config}
|
|
13
14
|
*/
|
|
14
15
|
config?: DashboardConfig;
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardProps.widgets}
|
|
18
|
+
*/
|
|
19
|
+
widgets: WidgetProps[];
|
|
15
20
|
}
|
|
16
21
|
/**
|
|
17
22
|
* An Angular component used for easily rendering a dashboard created in Sisense Fusion.
|
|
@@ -137,7 +142,7 @@ export declare class DashboardComponent implements AfterViewInit, OnChanges, OnD
|
|
|
137
142
|
* @internal
|
|
138
143
|
*/
|
|
139
144
|
ngOnChanges(): void;
|
|
140
|
-
private
|
|
145
|
+
private getPreactComponentProps;
|
|
141
146
|
/**
|
|
142
147
|
* @internal
|
|
143
148
|
*/
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { type FilterTileProps as FilterTilePropsPreact } from '@sisense/sdk-ui-preact';
|
|
3
|
+
import { SisenseContextService } from '../../services/sisense-context.service';
|
|
4
|
+
import { ThemeService } from '../../services/theme.service';
|
|
5
|
+
import type { BaseFilterTileEventProps, FilterChangeEvent, FilterEditEvent } from '../../types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Props of the {@link FilterTileComponent}.
|
|
9
|
+
*/
|
|
10
|
+
export interface FilterTileProps extends Omit<FilterTilePropsPreact, 'onChange' | 'onEdit' | 'onDelete'>, BaseFilterTileEventProps {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* UI component that renders a filter tile based on filter type
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* Here’s how to render a filter model as a filter tile.
|
|
17
|
+
*
|
|
18
|
+
* ```html
|
|
19
|
+
<!--Component HTML template in example.component.html-->
|
|
20
|
+
<csdk-filter-tile
|
|
21
|
+
[filter]="filterTileProps.filter"
|
|
22
|
+
(filterChange)="filterTileProps.filterChange($event)"
|
|
23
|
+
/>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
// Component behavior in example.component.ts
|
|
28
|
+
import { Component } from '@angular/core';
|
|
29
|
+
import { type FilterTileProps } from '@sisense/sdk-ui-angular';
|
|
30
|
+
import { filterFactory } from '@sisense/sdk-data';
|
|
31
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
32
|
+
|
|
33
|
+
@Component({
|
|
34
|
+
selector: 'example',
|
|
35
|
+
templateUrl: './example.component.html',
|
|
36
|
+
styleUrls: ['./example.component.scss'],
|
|
37
|
+
})
|
|
38
|
+
export class ExampleComponent {
|
|
39
|
+
filterTileProps: FilterTileProps = {
|
|
40
|
+
filter: filterFactory.members(DM.ER.Date.Years, ['2013-01-01T00:00:00']),
|
|
41
|
+
filterChange({ filter }) {
|
|
42
|
+
if (filter) {
|
|
43
|
+
this.filter = filter;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
* ```
|
|
49
|
+
* <img src="media://angular-member-filter-tile-example.png" width="225px" />
|
|
50
|
+
* @group Filter Tiles
|
|
51
|
+
* @shortDescription Facade component rendering a filter tile based on filter type
|
|
52
|
+
*/
|
|
53
|
+
export declare class FilterTileComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
54
|
+
/**
|
|
55
|
+
* Sisense context service
|
|
56
|
+
*
|
|
57
|
+
* @category Constructor
|
|
58
|
+
*/
|
|
59
|
+
sisenseContextService: SisenseContextService;
|
|
60
|
+
/**
|
|
61
|
+
* Theme service
|
|
62
|
+
*
|
|
63
|
+
* @category Constructor
|
|
64
|
+
*/
|
|
65
|
+
themeService: ThemeService;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
preactRef: ElementRef<HTMLDivElement>;
|
|
70
|
+
/**
|
|
71
|
+
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.filter}
|
|
72
|
+
*/
|
|
73
|
+
filter: FilterTileProps['filter'];
|
|
74
|
+
/**
|
|
75
|
+
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.defaultDataSource}
|
|
76
|
+
*/
|
|
77
|
+
defaultDataSource: FilterTileProps['defaultDataSource'];
|
|
78
|
+
/**
|
|
79
|
+
* {@inheritDoc FilterTileProps.filterChange}
|
|
80
|
+
*/
|
|
81
|
+
filterChange: EventEmitter<FilterChangeEvent>;
|
|
82
|
+
/**
|
|
83
|
+
* {@inheritDoc FilterTileProps.filterEdit}
|
|
84
|
+
*/
|
|
85
|
+
filterEdit: EventEmitter<FilterEditEvent>;
|
|
86
|
+
/**
|
|
87
|
+
* {@inheritDoc FilterTileProps.filterDelete}
|
|
88
|
+
*/
|
|
89
|
+
filterDelete: EventEmitter<void>;
|
|
90
|
+
private componentAdapter;
|
|
91
|
+
/**
|
|
92
|
+
* Constructor for the `FilterTileComponent`.
|
|
93
|
+
*
|
|
94
|
+
* @param sisenseContextService - Sisense context service
|
|
95
|
+
* @param themeService - Theme service
|
|
96
|
+
*/
|
|
97
|
+
constructor(
|
|
98
|
+
/**
|
|
99
|
+
* Sisense context service
|
|
100
|
+
*
|
|
101
|
+
* @category Constructor
|
|
102
|
+
*/
|
|
103
|
+
sisenseContextService: SisenseContextService,
|
|
104
|
+
/**
|
|
105
|
+
* Theme service
|
|
106
|
+
*
|
|
107
|
+
* @category Constructor
|
|
108
|
+
*/
|
|
109
|
+
themeService: ThemeService);
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
ngAfterViewInit(): void;
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
ngOnChanges(): void;
|
|
118
|
+
private getPreactComponentProps;
|
|
119
|
+
/**
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
ngOnDestroy(): void;
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterTileComponent, never>;
|
|
124
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterTileComponent, "csdk-filter-tile", never, { "filter": "filter"; "defaultDataSource": "defaultDataSource"; }, { "filterChange": "filterChange"; "filterEdit": "filterEdit"; "filterDelete": "filterDelete"; }, never, never, false, never>;
|
|
125
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './criteria-filter-tile.component';
|
|
2
2
|
export * from './date-range-filter-tile.component';
|
|
3
|
+
export * from './filter-tile.component';
|
|
4
|
+
export * from './member-filter-tile.component';
|
|
3
5
|
export * from './relative-date-filter-tile.component';
|
|
4
|
-
export * from './criteria-filter-tile.component';
|
|
@@ -44,7 +44,7 @@ export interface MemberFilterTileProps extends Omit<MemberFilterTilePropsPreact,
|
|
|
44
44
|
* };
|
|
45
45
|
* }
|
|
46
46
|
* ```
|
|
47
|
-
* <img src="media://angular-member-filter-tile-example.png" width="
|
|
47
|
+
* <img src="media://angular-member-filter-tile-example.png" width="225px" />
|
|
48
48
|
* @group Filter Tiles
|
|
49
49
|
*/
|
|
50
50
|
export declare class MemberFilterTileComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
@@ -112,7 +112,7 @@ export declare class MemberFilterTileComponent implements AfterViewInit, OnChang
|
|
|
112
112
|
* @internal
|
|
113
113
|
*/
|
|
114
114
|
ngOnChanges(): void;
|
|
115
|
-
private
|
|
115
|
+
private getPreactComponentProps;
|
|
116
116
|
/**
|
|
117
117
|
* @internal
|
|
118
118
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './filters';
|
|
2
1
|
export * from './charts';
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './context-menu.component';
|
|
4
3
|
export * from './dashboard';
|
|
5
4
|
export * from './drilldown-breadcrumbs.component';
|
|
6
|
-
export * from './
|
|
5
|
+
export * from './filters';
|
|
6
|
+
export * from './widgets';
|
|
@@ -3,7 +3,7 @@ import { type ChartWidgetProps as ChartWidgetPropsPreact } from '@sisense/sdk-ui
|
|
|
3
3
|
import { SisenseContextService } from '../../services/sisense-context.service';
|
|
4
4
|
import { ThemeService } from '../../services/theme.service';
|
|
5
5
|
import { ChartEventProps, WithoutPreactChartEventProps } from '../../types/chart-event-props';
|
|
6
|
-
import {
|
|
6
|
+
import { ChartDataPointClickEvent, ChartDataPointContextMenuEvent, ChartDataPointsEvent } from '../../types/data-point';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* Props of the {@link ChartWidgetComponent}.
|
|
@@ -64,8 +64,7 @@ export interface ChartWidgetProps extends WithoutPreactChartEventProps<ChartWidg
|
|
|
64
64
|
*
|
|
65
65
|
* }
|
|
66
66
|
* ```
|
|
67
|
-
* <img src="media://angular-chart-widget-example.png" width="
|
|
68
|
-
*
|
|
67
|
+
* <img src="media://angular-chart-widget-example.png" width="500px" />
|
|
69
68
|
* @group Dashboards
|
|
70
69
|
*/
|
|
71
70
|
export declare class ChartWidgetComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
@@ -144,7 +143,6 @@ export declare class ChartWidgetComponent implements AfterViewInit, OnChanges, O
|
|
|
144
143
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataReady}
|
|
145
144
|
*
|
|
146
145
|
* @category Callbacks
|
|
147
|
-
* @internal
|
|
148
146
|
*/
|
|
149
147
|
dataReady: ChartWidgetProps['dataReady'];
|
|
150
148
|
/**
|
|
@@ -152,13 +150,13 @@ export declare class ChartWidgetComponent implements AfterViewInit, OnChanges, O
|
|
|
152
150
|
*
|
|
153
151
|
* @category Callbacks
|
|
154
152
|
*/
|
|
155
|
-
dataPointClick: EventEmitter<
|
|
153
|
+
dataPointClick: EventEmitter<ChartDataPointClickEvent>;
|
|
156
154
|
/**
|
|
157
155
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
|
|
158
156
|
*
|
|
159
157
|
* @category Callbacks
|
|
160
158
|
*/
|
|
161
|
-
dataPointContextMenu: EventEmitter<
|
|
159
|
+
dataPointContextMenu: EventEmitter<ChartDataPointContextMenuEvent>;
|
|
162
160
|
/**
|
|
163
161
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointsSelected}
|
|
164
162
|
*
|
|
@@ -171,7 +169,7 @@ export declare class ChartWidgetComponent implements AfterViewInit, OnChanges, O
|
|
|
171
169
|
ngAfterViewInit(): void;
|
|
172
170
|
/** @internal */
|
|
173
171
|
ngOnChanges(): void;
|
|
174
|
-
private
|
|
172
|
+
private getPreactComponentProps;
|
|
175
173
|
/** @internal */
|
|
176
174
|
ngOnDestroy(): void;
|
|
177
175
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartWidgetComponent, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentRenderer, type ContextMenuProps, type CustomDrilldownResult as CustomDrilldownResultBase, DrilldownBreadcrumbsProps, type DrilldownWidgetProps } from '@sisense/sdk-ui-preact';
|
|
3
3
|
import { SisenseContextService } from '../../services/sisense-context.service';
|
|
4
4
|
import { ThemeService } from '../../services/theme.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -74,7 +74,6 @@ export type CustomDrilldownResult = CustomDrilldownResultBase & {
|
|
|
74
74
|
* </csdk-drilldown-widget>
|
|
75
75
|
* ```
|
|
76
76
|
* <img src="media://angular-drilldown-widget-example.png" width="800px" />
|
|
77
|
-
*
|
|
78
77
|
* @group Drilldown
|
|
79
78
|
*/
|
|
80
79
|
export declare class DrilldownWidgetComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
@@ -98,19 +97,10 @@ export declare class DrilldownWidgetComponent implements AfterViewInit, OnChange
|
|
|
98
97
|
* @internal
|
|
99
98
|
*/
|
|
100
99
|
preactContentRef: ElementRef<HTMLDivElement>;
|
|
101
|
-
/**
|
|
102
|
-
* {@inheritDoc @sisense/sdk-ui!DrilldownWidgetProps.drilldownDimensions}
|
|
103
|
-
*
|
|
104
|
-
* @category Widget
|
|
105
|
-
* @deprecated Use {@link drilldownPaths} instead
|
|
106
|
-
*
|
|
107
|
-
*/
|
|
108
|
-
drilldownDimensions: DrilldownWidgetProps['drilldownDimensions'];
|
|
109
100
|
/**
|
|
110
101
|
* {@inheritDoc @sisense/sdk-ui!DrilldownWidgetProps.drilldownPaths}
|
|
111
102
|
*
|
|
112
103
|
* @category Widget
|
|
113
|
-
*
|
|
114
104
|
*/
|
|
115
105
|
drilldownPaths: DrilldownWidgetProps['drilldownPaths'];
|
|
116
106
|
/**
|
|
@@ -162,11 +152,11 @@ export declare class DrilldownWidgetComponent implements AfterViewInit, OnChange
|
|
|
162
152
|
* @internal
|
|
163
153
|
*/
|
|
164
154
|
ngOnChanges(): void;
|
|
165
|
-
private
|
|
155
|
+
private getPreactComponentProps;
|
|
166
156
|
/**
|
|
167
157
|
* @internal
|
|
168
158
|
*/
|
|
169
159
|
ngOnDestroy(): void;
|
|
170
160
|
static ɵfac: i0.ɵɵFactoryDeclaration<DrilldownWidgetComponent, never>;
|
|
171
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DrilldownWidgetComponent, "csdk-drilldown-widget", never, { "
|
|
161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DrilldownWidgetComponent, "csdk-drilldown-widget", never, { "drilldownPaths": "drilldownPaths"; "initialDimension": "initialDimension"; "config": "config"; }, { "drilldownResultChange": "drilldownResultChange"; }, never, ["*"], false, never>;
|
|
172
162
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './table-widget.component';
|
|
2
|
-
export * from './dashboard-widget.component';
|
|
3
|
-
export * from './widget-by-id.component';
|
|
4
|
-
export * from './drilldown-widget.component';
|
|
5
1
|
export * from './chart-widget.component';
|
|
2
|
+
export * from './drilldown-widget.component';
|
|
6
3
|
export * from './pivot-table-widget.component';
|
|
4
|
+
export * from './table-widget.component';
|
|
5
|
+
export * from './widget.component';
|
|
6
|
+
export * from './widget-by-id.component';
|
|
@@ -119,7 +119,7 @@ export declare class PivotTableWidgetComponent implements AfterViewInit, OnChang
|
|
|
119
119
|
ngAfterViewInit(): void;
|
|
120
120
|
/** @internal */
|
|
121
121
|
ngOnChanges(): void;
|
|
122
|
-
private
|
|
122
|
+
private getPreactComponentProps;
|
|
123
123
|
/** @internal */
|
|
124
124
|
ngOnDestroy(): void;
|
|
125
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<PivotTableWidgetComponent, never>;
|
|
@@ -95,7 +95,7 @@ export declare class TableWidgetComponent implements AfterViewInit, OnChanges, O
|
|
|
95
95
|
constructor(sisenseContextService: SisenseContextService, themeService: ThemeService);
|
|
96
96
|
ngAfterViewInit(): void;
|
|
97
97
|
ngOnChanges(): void;
|
|
98
|
-
private
|
|
98
|
+
private getPreactComponentProps;
|
|
99
99
|
ngOnDestroy(): void;
|
|
100
100
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableWidgetComponent, never>;
|
|
101
101
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableWidgetComponent, "csdk-table-widget", never, { "dataSource": "dataSource"; "dataOptions": "dataOptions"; "filters": "filters"; "styleOptions": "styleOptions"; "title": "title"; "description": "description"; }, {}, never, never, false, never>;
|
|
@@ -111,7 +111,6 @@ export declare class WidgetByIdComponent implements AfterViewInit, OnChanges, On
|
|
|
111
111
|
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.onDataReady}
|
|
112
112
|
*
|
|
113
113
|
* @category Callbacks
|
|
114
|
-
* @internal
|
|
115
114
|
*/
|
|
116
115
|
dataReady: WidgetByIdProps['dataReady'];
|
|
117
116
|
private componentAdapter;
|
|
@@ -121,7 +120,7 @@ export declare class WidgetByIdComponent implements AfterViewInit, OnChanges, On
|
|
|
121
120
|
/** @internal */
|
|
122
121
|
ngOnChanges(): void;
|
|
123
122
|
/** @internal */
|
|
124
|
-
private
|
|
123
|
+
private getPreactComponentProps;
|
|
125
124
|
/** @internal */
|
|
126
125
|
ngOnDestroy(): void;
|
|
127
126
|
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetByIdComponent, never>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { type BeforeMenuOpenHandler, PluginWidgetProps, type SoftUnion, TextWidgetProps } from '@sisense/sdk-ui-preact';
|
|
3
|
+
import { SisenseContextService } from '../../services/sisense-context.service';
|
|
4
|
+
import { ThemeService } from '../../services/theme.service';
|
|
5
|
+
import { ChartDataPointClickEvent, ChartDataPointContextMenuEvent, ChartDataPointsEvent } from '../../types/data-point';
|
|
6
|
+
import { ChartWidgetProps } from './chart-widget.component';
|
|
7
|
+
import { PivotTableWidgetProps } from './pivot-table-widget.component';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritDoc @sisense/sdk-ui!WithCommonWidgetProps}
|
|
11
|
+
*/
|
|
12
|
+
export type WithCommonWidgetProps<BaseWidget, Type> = BaseWidget & {
|
|
13
|
+
/**
|
|
14
|
+
* Unique identifier of the widget within the container component (dashboard)
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
readonly id: string;
|
|
18
|
+
/**
|
|
19
|
+
* Widget type
|
|
20
|
+
*/
|
|
21
|
+
widgetType: Type;
|
|
22
|
+
/**
|
|
23
|
+
* Optional handler function to process menu options before opening the context menu.
|
|
24
|
+
*
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
beforeMenuOpen?: BeforeMenuOpenHandler;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Props of the {@link WidgetComponent}.
|
|
31
|
+
*/
|
|
32
|
+
export type WidgetProps = SoftUnion<WithCommonWidgetProps<ChartWidgetProps, 'chart'> | WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'> | WithCommonWidgetProps<TextWidgetProps, 'text'> | WithCommonWidgetProps<PluginWidgetProps, 'plugin'>>;
|
|
33
|
+
/**
|
|
34
|
+
* Facade component that renders a widget within a dashboard based on the widget type.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```html
|
|
38
|
+
<!--Component HTML template in example.component.html-->
|
|
39
|
+
<csdk-widget
|
|
40
|
+
[id]="widgetProps.id"
|
|
41
|
+
[title]="widgetProps.title"
|
|
42
|
+
[widgetType]="widgetProps.widgetType"
|
|
43
|
+
[chartType]="widgetProps.chartType"
|
|
44
|
+
[dataSource]="widgetProps.dataSource"
|
|
45
|
+
[dataOptions]="widgetProps.dataOptions"
|
|
46
|
+
/>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ```ts
|
|
50
|
+
// Component behavior in example.component.ts
|
|
51
|
+
import { Component } from '@angular/core';
|
|
52
|
+
import { type WidgetProps } from '@sisense/sdk-ui-angular';
|
|
53
|
+
|
|
54
|
+
@Component({
|
|
55
|
+
selector: 'example',
|
|
56
|
+
templateUrl: './example.component.html',
|
|
57
|
+
styleUrls: ['./example.component.scss'],
|
|
58
|
+
})
|
|
59
|
+
export class ExampleComponent {
|
|
60
|
+
widgetProps: WidgetProps = {
|
|
61
|
+
id: 'widget-id',
|
|
62
|
+
widgetType: 'chart',
|
|
63
|
+
chartType: 'column',
|
|
64
|
+
title: 'Widget Title',
|
|
65
|
+
dataSource: DM.DataSource,
|
|
66
|
+
dataOptions: {
|
|
67
|
+
category: [DM.Divisions.Divison_name],
|
|
68
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
69
|
+
breakBy: [],
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
* ```
|
|
74
|
+
* <img src="media://angular-chart-widget-example.png" width="500px" />
|
|
75
|
+
* @group Dashboards
|
|
76
|
+
*/
|
|
77
|
+
export declare class WidgetComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
78
|
+
private sisenseContextService;
|
|
79
|
+
private themeService;
|
|
80
|
+
/** @internal */
|
|
81
|
+
preactRef: ElementRef<HTMLDivElement>;
|
|
82
|
+
/**
|
|
83
|
+
* Unique identifier of the widget
|
|
84
|
+
*
|
|
85
|
+
* @category Widget
|
|
86
|
+
*/
|
|
87
|
+
id: WidgetProps['id'];
|
|
88
|
+
/**
|
|
89
|
+
* Widget type
|
|
90
|
+
*
|
|
91
|
+
* @category Widget
|
|
92
|
+
*/
|
|
93
|
+
widgetType: WidgetProps['widgetType'];
|
|
94
|
+
/**
|
|
95
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.chartType}
|
|
96
|
+
*
|
|
97
|
+
* @category Chart
|
|
98
|
+
*/
|
|
99
|
+
chartType: WidgetProps['chartType'];
|
|
100
|
+
/**
|
|
101
|
+
* {@inheritDoc @sisense/sdk-ui!PluginWidgetProps.pluginType}
|
|
102
|
+
*
|
|
103
|
+
* @category Widget
|
|
104
|
+
*/
|
|
105
|
+
pluginType: WidgetProps['pluginType'];
|
|
106
|
+
/**
|
|
107
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.dataSource}
|
|
108
|
+
*
|
|
109
|
+
* @category Data
|
|
110
|
+
*/
|
|
111
|
+
dataSource: WidgetProps['dataSource'];
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.dataOptions}
|
|
114
|
+
*
|
|
115
|
+
* @category Chart
|
|
116
|
+
*/
|
|
117
|
+
dataOptions: WidgetProps['dataOptions'];
|
|
118
|
+
/**
|
|
119
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.filters}
|
|
120
|
+
*
|
|
121
|
+
* @category Data
|
|
122
|
+
*/
|
|
123
|
+
filters: WidgetProps['filters'];
|
|
124
|
+
/**
|
|
125
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.highlights}
|
|
126
|
+
*
|
|
127
|
+
* @category Data
|
|
128
|
+
*/
|
|
129
|
+
highlights: WidgetProps['highlights'];
|
|
130
|
+
/**
|
|
131
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.styleOptions}
|
|
132
|
+
*
|
|
133
|
+
* @category Widget
|
|
134
|
+
*/
|
|
135
|
+
styleOptions: WidgetProps['styleOptions'];
|
|
136
|
+
/**
|
|
137
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.drilldownOptions}
|
|
138
|
+
*
|
|
139
|
+
* @category Widget
|
|
140
|
+
*/
|
|
141
|
+
drilldownOptions: WidgetProps['drilldownOptions'];
|
|
142
|
+
/**
|
|
143
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.title}
|
|
144
|
+
*
|
|
145
|
+
* @category Widget
|
|
146
|
+
*/
|
|
147
|
+
title: WidgetProps['title'];
|
|
148
|
+
/**
|
|
149
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.description}
|
|
150
|
+
*
|
|
151
|
+
* @category Widget
|
|
152
|
+
*/
|
|
153
|
+
description: WidgetProps['description'];
|
|
154
|
+
/**
|
|
155
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.highlightSelectionDisabled}
|
|
156
|
+
*
|
|
157
|
+
* @category Widget
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
160
|
+
highlightSelectionDisabled: WidgetProps['highlightSelectionDisabled'];
|
|
161
|
+
/**
|
|
162
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onBeforeRender}
|
|
163
|
+
*
|
|
164
|
+
* @category Callbacks
|
|
165
|
+
*/
|
|
166
|
+
beforeRender: WidgetProps['beforeRender'];
|
|
167
|
+
/**
|
|
168
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataReady}
|
|
169
|
+
*
|
|
170
|
+
* @category Callbacks
|
|
171
|
+
*/
|
|
172
|
+
dataReady: WidgetProps['dataReady'];
|
|
173
|
+
/**
|
|
174
|
+
* Optional handler function to process menu options before opening the context menu.
|
|
175
|
+
*
|
|
176
|
+
* @category Callbacks
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
beforeMenuOpen: WidgetProps['beforeMenuOpen'];
|
|
180
|
+
/**
|
|
181
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointClick}
|
|
182
|
+
*
|
|
183
|
+
* @category Callbacks
|
|
184
|
+
*/
|
|
185
|
+
dataPointClick: EventEmitter<ChartDataPointClickEvent>;
|
|
186
|
+
/**
|
|
187
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
|
|
188
|
+
*
|
|
189
|
+
* @category Callbacks
|
|
190
|
+
*/
|
|
191
|
+
dataPointContextMenu: EventEmitter<ChartDataPointContextMenuEvent>;
|
|
192
|
+
/**
|
|
193
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointsSelected}
|
|
194
|
+
*
|
|
195
|
+
* @category Callbacks
|
|
196
|
+
*/
|
|
197
|
+
dataPointsSelect: EventEmitter<ChartDataPointsEvent>;
|
|
198
|
+
private componentAdapter;
|
|
199
|
+
constructor(sisenseContextService: SisenseContextService, themeService: ThemeService);
|
|
200
|
+
/** @internal */
|
|
201
|
+
ngAfterViewInit(): void;
|
|
202
|
+
/** @internal */
|
|
203
|
+
ngOnChanges(): void;
|
|
204
|
+
private getPreactComponentProps;
|
|
205
|
+
/** @internal */
|
|
206
|
+
ngOnDestroy(): void;
|
|
207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetComponent, never>;
|
|
208
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetComponent, "csdk-widget", never, { "id": "id"; "widgetType": "widgetType"; "chartType": "chartType"; "pluginType": "pluginType"; "dataSource": "dataSource"; "dataOptions": "dataOptions"; "filters": "filters"; "highlights": "highlights"; "styleOptions": "styleOptions"; "drilldownOptions": "drilldownOptions"; "title": "title"; "description": "description"; "highlightSelectionDisabled": "highlightSelectionDisabled"; "beforeRender": "beforeRender"; "dataReady": "dataReady"; "beforeMenuOpen": "beforeMenuOpen"; }, { "dataPointClick": "dataPointClick"; "dataPointContextMenu": "dataPointContextMenu"; "dataPointsSelect": "dataPointsSelect"; }, never, never, false, never>;
|
|
209
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DashboardProps as DashboardPropsPreact } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { DashboardProps } from '../components/dashboard';
|
|
3
|
+
export declare function translateToPreactDashboardProps(dashboardProps: DashboardProps): DashboardPropsPreact;
|
|
4
|
+
export declare function translateFromPreactDashboardProps(dashboardProps: DashboardPropsPreact): DashboardProps;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* An extended version of Angular's `EventEmitter` that tracks
|
|
4
|
+
* whether any listeners (subscribers) are attached.
|
|
5
|
+
*
|
|
6
|
+
* Useful when you need to know if an `@Output()` is being observed
|
|
7
|
+
* in the template (i.e., bound with `(event)="..."`).
|
|
8
|
+
*
|
|
9
|
+
* @template T - The type of values emitted by the EventEmitter.
|
|
10
|
+
*/
|
|
11
|
+
export declare class EventEmitterWithHasListeners<T> extends EventEmitter<T> {
|
|
12
|
+
/**
|
|
13
|
+
* Indicates whether the EventEmitter has at least one active subscriber.
|
|
14
|
+
*/
|
|
15
|
+
hasListeners: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Overrides the default `subscribe()` method to set `hasListeners` to true
|
|
18
|
+
* when a new subscriber is added.
|
|
19
|
+
*
|
|
20
|
+
* @param args - The arguments passed to the `subscribe()` method.
|
|
21
|
+
* @returns A subscription object used to unsubscribe from the event.
|
|
22
|
+
*/
|
|
23
|
+
subscribe(...args: Parameters<EventEmitter<T>['subscribe']>): ReturnType<EventEmitter<T>['subscribe']>;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event-emitter-with-has-listeners';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { WidgetProps as WidgetPropsPreact } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { WidgetProps } from '../components/widgets';
|
|
3
|
+
export declare function translateToPreactWidgetProps(widgetProps: WidgetProps): WidgetPropsPreact;
|
|
4
|
+
export declare function translateFromPreactWidgetProps(widgetProps: WidgetPropsPreact): WidgetProps;
|