@sisense/sdk-ui-angular 1.34.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/components/chatbot.component.d.ts +0 -5
- package/dist/ai/lib/components/get-nlg-insights.component.d.ts +0 -5
- package/dist/ai/lib/sdk-ai.module.d.ts +0 -1
- package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/ai/lib/services/ai.service.d.ts +12 -7
- package/dist/esm2020/ai/lib/components/chatbot.component.mjs +1 -6
- package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +1 -6
- package/dist/esm2020/ai/lib/sdk-ai.module.mjs +1 -2
- package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/ai/lib/services/ai.service.mjs +3 -7
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/column-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/table.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/treemap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +4 -3
- package/dist/esm2020/lib/components/filters/filter-tile.component.mjs +147 -0
- package/dist/esm2020/lib/components/filters/index.mjs +2 -1
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +2 -5
- package/dist/esm2020/lib/components/widgets/index.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/widget.component.mjs +168 -0
- 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 +12 -8
- package/dist/esm2020/lib/services/dashboard.service.mjs +86 -2
- package/dist/esm2020/lib/services/query.service.mjs +5 -4
- package/dist/esm2020/lib/types/chart-event-props.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 +2 -1
- package/dist/esm2020/lib/utilities/dashboard-helpers.mjs +2 -14
- package/dist/esm2020/public-api.mjs +1 -1
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +2 -17
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +456 -146
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +2 -17
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +482 -144
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/components/charts/area-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/area-range-chart.component.d.ts +0 -2
- package/dist/lib/components/charts/areamap-chart.component.d.ts +4 -6
- package/dist/lib/components/charts/bar-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/boxplot-chart.component.d.ts +6 -7
- package/dist/lib/components/charts/chart.component.d.ts +3 -4
- package/dist/lib/components/charts/column-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/funnel-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/indicator-chart.component.d.ts +2 -3
- package/dist/lib/components/charts/line-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/pie-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/polar-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/scatter-chart.component.d.ts +6 -7
- package/dist/lib/components/charts/scattermap-chart.component.d.ts +4 -6
- package/dist/lib/components/charts/sunburst-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/table.component.d.ts +0 -1
- package/dist/lib/components/charts/treemap-chart.component.d.ts +0 -1
- package/dist/lib/components/dashboard/dashboard.component.d.ts +6 -1
- package/dist/lib/components/filters/filter-tile.component.d.ts +125 -0
- package/dist/lib/components/filters/index.d.ts +1 -0
- package/dist/lib/components/filters/member-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/widgets/chart-widget.component.d.ts +4 -5
- package/dist/lib/components/widgets/drilldown-widget.component.d.ts +1 -8
- package/dist/lib/components/widgets/index.d.ts +1 -1
- package/dist/lib/components/widgets/widget-by-id.component.d.ts +0 -1
- package/dist/lib/components/widgets/widget.component.d.ts +209 -0
- 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 -19
- package/dist/lib/services/dashboard.service.d.ts +79 -1
- package/dist/lib/services/query.service.d.ts +2 -8
- package/dist/lib/types/chart-event-props.d.ts +9 -10
- 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 +1 -0
- package/dist/lib/utilities/dashboard-helpers.d.ts +0 -10
- package/dist/package.json +4 -4
- package/dist/public-api.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
- package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +0 -117
- package/dist/lib/components/widgets/dashboard-widget.component.d.ts +0 -120
|
@@ -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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
|
|
2
|
-
export type { AppConfig, AreamapChartDataOptions, AreamapChartType, AreamapStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, AreaSubtype, AxisLabel, BeforeRenderHandler, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, BoxplotChartType, BoxplotDataPoint, BoxplotStyleOptions, BoxplotSubtype, BoxWhiskerType, CartesianChartDataOptions, CartesianChartType, CartesianWidgetType, CategoricalChartDataOptions, CategoricalChartType, CategoricalWidgetType, ChartDataOptions, ChartStyleOptions, ChartType, ChartWidgetStyleOptions, Color, ColorPaletteTheme, CommonWidgetProps, ConditionalDataColorOptions, Convolution,
|
|
2
|
+
export type { AppConfig, AreamapChartDataOptions, AreamapChartType, AreamapStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, AreaSubtype, AxisLabel, BeforeRenderHandler, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, BoxplotChartType, BoxplotDataPoint, BoxplotStyleOptions, BoxplotSubtype, BoxWhiskerType, CartesianChartDataOptions, CartesianChartType, CartesianWidgetType, CategoricalChartDataOptions, CategoricalChartType, CategoricalWidgetType, ChartDataOptions, ChartStyleOptions, ChartType, ChartWidgetStyleOptions, Color, ColorPaletteTheme, CommonWidgetProps, ConditionalDataColorOptions, Convolution, DashboardLayoutOptions, DashboardModel, DataColorCondition, DataColorOptions, DataLimits, DataPoint, DateConfig, DateLevel, DayOfWeek, DecimalScale, DrilldownOptions, DrilldownSelection, FilterVariant, FunnelStyleOptions, GaugeIndicatorStyleOptions, GetDashboardModelOptions, GetDashboardModelsOptions, Hierarchy, HierarchyModel, HighchartsOptions, IndicatorBeforeRenderHandler, IndicatorChartDataOptions, IndicatorChartType, IndicatorComponents, IndicatorRenderOptions, IndicatorStyleOptions, Labels, Legend, LineStyleOptions, LineSubtype, LineWidth, Markers, Member, MenuItemSection, MenuPosition, MonthOfYear, MultiColumnValueToColorMap, Navigator, NumberFormatConfig, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, PieStyleOptions, PieSubtype, PivotRowsSort, PivotTableDataOptions, PivotTableStyleOptions, PivotTableWidgetStyleOptions, PolarStyleOptions, PolarSubtype, RangeChartDataOptions, RangeChartType, RangeDataColorOptions, ScatterChartDataOptions, ScatterChartType, ScatterDataPoint, ScattermapChartDataOptions, ScattermapChartType, ScattermapLocationLevel, ScattermapMarkers, ScattermapStyleOptions, ScatterMarkerSize, ScatterStyleOptions, SeriesChartType, SeriesLabels, SortDirection, StackableStyleOptions, StackableSubtype, StyledColumn, StyledMeasureColumn, SunburstStyleOptions, TableDataOptions, TableStyleOptions, TableType, TabularWidgetType, TextWidgetProps, ThemeOid, ThemeSettings, TranslationConfig, TreemapStyleOptions, UniformDataColorOptions, ValueToColorMap, WidgetByIdStyleOptions, WidgetDataOptions, WidgetId, WidgetModel, WidgetsOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetStyleOptions, WidgetType, X2Title, } from '@sisense/sdk-ui-preact';
|
|
@@ -15,24 +15,25 @@ import * as i13 from "./components/charts/polar-chart.component";
|
|
|
15
15
|
import * as i14 from "./components/charts/treemap-chart.component";
|
|
16
16
|
import * as i15 from "./components/charts/sunburst-chart.component";
|
|
17
17
|
import * as i16 from "./components/widgets/table-widget.component";
|
|
18
|
-
import * as i17 from "./components/widgets/
|
|
19
|
-
import * as i18 from "./components/
|
|
20
|
-
import * as i19 from "./components/
|
|
21
|
-
import * as i20 from "./components/
|
|
22
|
-
import * as i21 from "./components/filters/date-
|
|
23
|
-
import * as i22 from "./components/filters/
|
|
24
|
-
import * as i23 from "./components/
|
|
25
|
-
import * as i24 from "./components/
|
|
26
|
-
import * as i25 from "./components/
|
|
27
|
-
import * as i26 from "./components/charts/
|
|
28
|
-
import * as i27 from "./components/charts/
|
|
29
|
-
import * as i28 from "./components/charts/
|
|
30
|
-
import * as i29 from "./components/
|
|
31
|
-
import * as i30 from "./components/dashboard/dashboard
|
|
32
|
-
import * as i31 from "./components/
|
|
33
|
-
import * as i32 from "./components/
|
|
34
|
-
import * as i33 from "
|
|
35
|
-
import * as i34 from "
|
|
18
|
+
import * as i17 from "./components/widgets/widget-by-id.component";
|
|
19
|
+
import * as i18 from "./components/filters/member-filter-tile.component";
|
|
20
|
+
import * as i19 from "./components/widgets/drilldown-widget.component";
|
|
21
|
+
import * as i20 from "./components/filters/date-range-filter-tile.component";
|
|
22
|
+
import * as i21 from "./components/filters/relative-date-filter-tile.component";
|
|
23
|
+
import * as i22 from "./components/filters/criteria-filter-tile.component";
|
|
24
|
+
import * as i23 from "./components/drilldown-breadcrumbs.component";
|
|
25
|
+
import * as i24 from "./components/context-menu.component";
|
|
26
|
+
import * as i25 from "./components/charts/boxplot-chart.component";
|
|
27
|
+
import * as i26 from "./components/charts/scattermap-chart.component";
|
|
28
|
+
import * as i27 from "./components/charts/areamap-chart.component";
|
|
29
|
+
import * as i28 from "./components/charts/pivot-table.component";
|
|
30
|
+
import * as i29 from "./components/dashboard/dashboard-by-id.component";
|
|
31
|
+
import * as i30 from "./components/dashboard/dashboard.component";
|
|
32
|
+
import * as i31 from "./components/widgets/pivot-table-widget.component";
|
|
33
|
+
import * as i32 from "./components/filters/filter-tile.component";
|
|
34
|
+
import * as i33 from "./components/widgets/widget.component";
|
|
35
|
+
import * as i34 from "@angular/common";
|
|
36
|
+
import * as i35 from "./decorators/decorators.module";
|
|
36
37
|
/**
|
|
37
38
|
* SDK UI Module, which is a container for components.
|
|
38
39
|
*
|
|
@@ -62,6 +63,6 @@ import * as i34 from "./decorators/decorators.module";
|
|
|
62
63
|
*/
|
|
63
64
|
export declare class SdkUiModule {
|
|
64
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdkUiModule, never>;
|
|
65
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkUiModule, [typeof i1.ChartComponent, typeof i2.TableComponent, typeof i3.ChartWidgetComponent, typeof i4.ColumnChartComponent, typeof i5.BarChartComponent, typeof i6.AreaChartComponent, typeof i7.AreaRangeChartComponent, typeof i8.LineChartComponent, typeof i9.IndicatorChartComponent, typeof i10.ScatterChartComponent, typeof i11.PieChartComponent, typeof i12.FunnelChartComponent, typeof i13.PolarChartComponent, typeof i14.TreemapChartComponent, typeof i15.SunburstChartComponent, typeof i16.TableWidgetComponent, typeof i17.
|
|
66
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkUiModule, [typeof i1.ChartComponent, typeof i2.TableComponent, typeof i3.ChartWidgetComponent, typeof i4.ColumnChartComponent, typeof i5.BarChartComponent, typeof i6.AreaChartComponent, typeof i7.AreaRangeChartComponent, typeof i8.LineChartComponent, typeof i9.IndicatorChartComponent, typeof i10.ScatterChartComponent, typeof i11.PieChartComponent, typeof i12.FunnelChartComponent, typeof i13.PolarChartComponent, typeof i14.TreemapChartComponent, typeof i15.SunburstChartComponent, typeof i16.TableWidgetComponent, typeof i17.WidgetByIdComponent, typeof i18.MemberFilterTileComponent, typeof i19.DrilldownWidgetComponent, typeof i20.DateRangeFilterTileComponent, typeof i21.RelativeDateFilterTileComponent, typeof i22.CriteriaFilterTileComponent, typeof i23.DrilldownBreadcrumbsComponent, typeof i24.ContextMenuComponent, typeof i25.BoxplotChartComponent, typeof i26.ScattermapChartComponent, typeof i27.AreamapChartComponent, typeof i28.PivotTableComponent, typeof i29.DashboardByIdComponent, typeof i30.DashboardComponent, typeof i31.PivotTableWidgetComponent, typeof i32.FilterTileComponent, typeof i33.WidgetComponent], [typeof i34.CommonModule, typeof i35.DecoratorsModule], [typeof i1.ChartComponent, typeof i2.TableComponent, typeof i3.ChartWidgetComponent, typeof i4.ColumnChartComponent, typeof i5.BarChartComponent, typeof i6.AreaChartComponent, typeof i7.AreaRangeChartComponent, typeof i8.LineChartComponent, typeof i9.IndicatorChartComponent, typeof i10.ScatterChartComponent, typeof i11.PieChartComponent, typeof i12.FunnelChartComponent, typeof i13.PolarChartComponent, typeof i14.TreemapChartComponent, typeof i15.SunburstChartComponent, typeof i16.TableWidgetComponent, typeof i17.WidgetByIdComponent, typeof i18.MemberFilterTileComponent, typeof i19.DrilldownWidgetComponent, typeof i20.DateRangeFilterTileComponent, typeof i21.RelativeDateFilterTileComponent, typeof i22.CriteriaFilterTileComponent, typeof i23.DrilldownBreadcrumbsComponent, typeof i24.ContextMenuComponent, typeof i25.BoxplotChartComponent, typeof i26.ScattermapChartComponent, typeof i27.AreamapChartComponent, typeof i28.PivotTableComponent, typeof i29.DashboardByIdComponent, typeof i30.DashboardComponent, typeof i31.PivotTableWidgetComponent, typeof i32.FilterTileComponent, typeof i33.WidgetComponent]>;
|
|
66
67
|
static ɵinj: i0.ɵɵInjectorDeclaration<SdkUiModule>;
|
|
67
68
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
+
import { type ComposableDashboardProps as ComposableDashboardPropsPreact, type GetDashboardModelOptions, type GetDashboardModelsOptions, UseComposedDashboardOptions, WidgetsPanelLayout } from '@sisense/sdk-ui-preact';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { type DashboardProps } from '../components/dashboard/dashboard.component';
|
|
5
|
+
import { type WidgetProps } from '../components/widgets/widget.component';
|
|
2
6
|
import { SisenseContextService } from './sisense-context.service';
|
|
3
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
export interface ComposableDashboardProps extends Omit<ComposableDashboardPropsPreact, 'widgets'> {
|
|
9
|
+
widgets: WidgetProps[];
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* Service for working with Sisense Fusion dashboards.
|
|
6
13
|
*
|
|
@@ -27,6 +34,77 @@ export declare class DashboardService {
|
|
|
27
34
|
* @returns Dashboard models array
|
|
28
35
|
*/
|
|
29
36
|
getDashboardModels(options?: GetDashboardModelsOptions): Promise<import("@sisense/sdk-ui-preact").DashboardModel[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Сomposes dashboard or separate dashboard elements into a coordinated dashboard
|
|
39
|
+
* with cross filtering, and change detection.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* An example of using the `createComposedDashboard` to construct a composed dashboard and render it:
|
|
43
|
+
* ```html
|
|
44
|
+
<!--Component HTML template in example.component.html-->
|
|
45
|
+
<div *ngIf="dashboard$ | async as dashboard">
|
|
46
|
+
<csdk-filter-tile
|
|
47
|
+
*ngFor="let filter of getDashboardFilters(dashboard); trackBy: trackByIndex"
|
|
48
|
+
[filter]="filter"
|
|
49
|
+
/>
|
|
50
|
+
<csdk-widget
|
|
51
|
+
*ngFor="let widget of dashboard.widgets; trackBy: trackByIndex"
|
|
52
|
+
[id]="widget.id"
|
|
53
|
+
[widgetType]="widget.widgetType"
|
|
54
|
+
[chartType]="widget.chartType"
|
|
55
|
+
[pluginType]="widget.pluginType"
|
|
56
|
+
[dataSource]="widget.dataSource"
|
|
57
|
+
[dataOptions]="widget.dataOptions"
|
|
58
|
+
[filters]="widget.filters"
|
|
59
|
+
[highlights]="widget.highlights"
|
|
60
|
+
[styleOptions]="widget.styleOptions"
|
|
61
|
+
[drilldownOptions]="widget.drilldownOptions"
|
|
62
|
+
[title]="widget.title"
|
|
63
|
+
[description]="widget.description"
|
|
64
|
+
[beforeMenuOpen]="widget.beforeMenuOpen"
|
|
65
|
+
(dataPointClick)="widget.dataPointClick?.($event)"
|
|
66
|
+
(dataPointContextMenu)="widget.dataPointContextMenu?.($event)"
|
|
67
|
+
(dataPointsSelect)="widget.dataPointsSelect?.($event)"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* ```ts
|
|
73
|
+
// Component behavior in example.component.ts
|
|
74
|
+
import { Component } from '@angular/core';
|
|
75
|
+
import { BehaviorSubject } from 'rxjs';
|
|
76
|
+
import { DashboardService, type DashboardProps } from '@sisense/sdk-ui-angular';
|
|
77
|
+
|
|
78
|
+
@Component({
|
|
79
|
+
selector: 'example',
|
|
80
|
+
templateUrl: './example.component.html',
|
|
81
|
+
styleUrls: ['./example.component.scss'],
|
|
82
|
+
})
|
|
83
|
+
export class ExampleComponent {
|
|
84
|
+
dashboard$: BehaviorSubject<DashboardProps> | undefined;
|
|
85
|
+
|
|
86
|
+
constructor(private dashboardService: DashboardService) {}
|
|
87
|
+
|
|
88
|
+
ngOnInit() {
|
|
89
|
+
const initialDashboard: DashboardProps = { ... };
|
|
90
|
+
const composedDashboard = this.dashboardService.createComposedDashboard(initialDashboard);
|
|
91
|
+
this.dashboard$ = composedDashboard.dashboard$;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
trackByIndex = (index: number) => index;
|
|
95
|
+
|
|
96
|
+
getDashboardFilters = ({ filters }: DashboardProps) => Array.isArray(filters) ? filters : [];
|
|
97
|
+
}
|
|
98
|
+
* ```
|
|
99
|
+
* @param initialDashboard - Initial dashboard
|
|
100
|
+
* @param options - Configuration options
|
|
101
|
+
* @returns Reactive composed dashboard object and API methods for interacting with it
|
|
102
|
+
*/
|
|
103
|
+
createComposedDashboard<D extends ComposableDashboardProps | DashboardProps>(initialDashboard: D, options?: UseComposedDashboardOptions): {
|
|
104
|
+
dashboard$: BehaviorSubject<D>;
|
|
105
|
+
setFilters: (filters: Filter[] | FilterRelations) => Promise<void>;
|
|
106
|
+
setWidgetsLayout: (newLayout: WidgetsPanelLayout) => Promise<void>;
|
|
107
|
+
};
|
|
30
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardService, never>;
|
|
31
109
|
static ɵprov: i0.ɵɵInjectableDeclaration<DashboardService>;
|
|
32
110
|
}
|
|
@@ -4,12 +4,6 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
interface ExecuteQueryHandlers {
|
|
5
5
|
/** Sync or async callback that allows to modify the JAQL payload before it is sent to the server. */
|
|
6
6
|
beforeQuery?: ExecuteQueryParamsPreact['onBeforeQuery'];
|
|
7
|
-
/**
|
|
8
|
-
* Sync or async callback that allows to modify the JAQL payload before it is sent to the server.
|
|
9
|
-
*
|
|
10
|
-
* @deprecated Use `beforeQuery` instead.
|
|
11
|
-
*/
|
|
12
|
-
onBeforeQuery?: ExecuteQueryParamsPreact['onBeforeQuery'];
|
|
13
7
|
}
|
|
14
8
|
/**
|
|
15
9
|
* Parameters for data query execution.
|
|
@@ -24,12 +18,12 @@ export interface ExecuteQueryByWidgetIdParams extends Omit<ExecuteQueryByWidgetI
|
|
|
24
18
|
/**
|
|
25
19
|
* Parameters for pivot data query execution.
|
|
26
20
|
*/
|
|
27
|
-
export interface ExecutePivotQueryParams extends Omit<ExecutePivotQueryParamsPreact, 'enabled' | 'onBeforeQuery'>,
|
|
21
|
+
export interface ExecutePivotQueryParams extends Omit<ExecutePivotQueryParamsPreact, 'enabled' | 'onBeforeQuery'>, ExecuteQueryHandlers {
|
|
28
22
|
}
|
|
29
23
|
/**
|
|
30
24
|
* Parameters for CSV data query execution.
|
|
31
25
|
*/
|
|
32
|
-
export interface ExecuteCsvQueryParams extends Omit<ExecuteCsvQueryParamsPreact, 'enabled' | 'onBeforeQuery'>,
|
|
26
|
+
export interface ExecuteCsvQueryParams extends Omit<ExecuteCsvQueryParamsPreact, 'enabled' | 'onBeforeQuery'>, ExecuteQueryHandlers {
|
|
33
27
|
}
|
|
34
28
|
/**
|
|
35
29
|
* Service for executing data queries.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Data } from '@sisense/sdk-data';
|
|
2
2
|
import type { BeforeRenderHandler, IndicatorBeforeRenderHandler } from '@sisense/sdk-ui-preact';
|
|
3
|
-
import type { AreamapDataPointEventHandler, BoxplotDataPointEventHandler, DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler, ScattermapDataPointEventHandler } from './data-point';
|
|
3
|
+
import type { AreamapDataPointEventHandler, BoxplotDataPointEventHandler, ChartDataPointClickEventHandler, ChartDataPointContextMenuEventHandler, ChartDataPointsEventHandler, DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler, ScattermapDataPointEventHandler } from './data-point';
|
|
4
4
|
export interface HighchartsBasedChartEventProps {
|
|
5
5
|
/**
|
|
6
6
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.onBeforeRender}
|
|
@@ -14,7 +14,6 @@ export interface BaseChartEventProps {
|
|
|
14
14
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.onDataReady}
|
|
15
15
|
*
|
|
16
16
|
* @category Callbacks
|
|
17
|
-
* @internal
|
|
18
17
|
*/
|
|
19
18
|
dataReady?: (data: Data) => Data;
|
|
20
19
|
}
|
|
@@ -40,7 +39,7 @@ export interface RegularChartEventProps extends BaseChartEventProps, HighchartsB
|
|
|
40
39
|
*
|
|
41
40
|
* @category Callbacks
|
|
42
41
|
*/
|
|
43
|
-
|
|
42
|
+
dataPointsSelect?: DataPointsEventHandler;
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Event props for Scatter chart which uses ScatterDataPoint type
|
|
@@ -64,13 +63,13 @@ export interface ScatterChartEventProps extends BaseChartEventProps, HighchartsB
|
|
|
64
63
|
*
|
|
65
64
|
* @category Callbacks
|
|
66
65
|
*/
|
|
67
|
-
|
|
66
|
+
dataPointsSelect?: ScatterDataPointsEventHandler;
|
|
68
67
|
}
|
|
69
68
|
/**
|
|
70
69
|
* Event props for Areamap chart which uses AreamapDataPoint type
|
|
71
70
|
* to describe data points for events.
|
|
72
71
|
*/
|
|
73
|
-
export interface AreamapChartEventProps {
|
|
72
|
+
export interface AreamapChartEventProps extends BaseChartEventProps {
|
|
74
73
|
/**
|
|
75
74
|
* {@inheritDoc @sisense/sdk-ui!AreamapChartProps.onDataPointClick}
|
|
76
75
|
*
|
|
@@ -82,7 +81,7 @@ export interface AreamapChartEventProps {
|
|
|
82
81
|
* Event props for Scattermap chart which uses ScattermapDataPoint type
|
|
83
82
|
* to describe data points for events.
|
|
84
83
|
*/
|
|
85
|
-
export interface ScattermapChartEventProps {
|
|
84
|
+
export interface ScattermapChartEventProps extends BaseChartEventProps {
|
|
86
85
|
/**
|
|
87
86
|
* {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.onDataPointClick}
|
|
88
87
|
*
|
|
@@ -112,7 +111,7 @@ export interface BoxplotChartEventProps extends BaseChartEventProps, HighchartsB
|
|
|
112
111
|
*
|
|
113
112
|
* @category Callbacks
|
|
114
113
|
*/
|
|
115
|
-
|
|
114
|
+
dataPointsSelect?: DataPointsEventHandler;
|
|
116
115
|
}
|
|
117
116
|
export interface IndicatorChartEventProps extends BaseChartEventProps {
|
|
118
117
|
/**
|
|
@@ -128,19 +127,19 @@ export interface ChartEventProps extends BaseChartEventProps {
|
|
|
128
127
|
*
|
|
129
128
|
* @category Callbacks
|
|
130
129
|
*/
|
|
131
|
-
dataPointClick?:
|
|
130
|
+
dataPointClick?: ChartDataPointClickEventHandler;
|
|
132
131
|
/**
|
|
133
132
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointContextMenu}
|
|
134
133
|
*
|
|
135
134
|
* @category Callbacks
|
|
136
135
|
*/
|
|
137
|
-
dataPointContextMenu?:
|
|
136
|
+
dataPointContextMenu?: ChartDataPointContextMenuEventHandler;
|
|
138
137
|
/**
|
|
139
138
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointsSelected}
|
|
140
139
|
*
|
|
141
140
|
* @category Callbacks
|
|
142
141
|
*/
|
|
143
|
-
|
|
142
|
+
dataPointsSelect?: ChartDataPointsEventHandler;
|
|
144
143
|
/**
|
|
145
144
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.onBeforeRender}
|
|
146
145
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AreamapDataPoint, BoxplotDataPoint,
|
|
1
|
+
import { AreamapDataPoint, BoxplotDataPoint, DataPoint, ScatterDataPoint, ScattermapDataPoint } from '@sisense/sdk-ui-preact';
|
|
2
2
|
export type DataPointEvent = {
|
|
3
3
|
/** Data point that was clicked */
|
|
4
4
|
point: DataPoint;
|
|
@@ -29,12 +29,8 @@ export type BoxplotDataPointEvent = {
|
|
|
29
29
|
/** Native PointerEvent */
|
|
30
30
|
nativeEvent: PointerEvent;
|
|
31
31
|
};
|
|
32
|
-
export type
|
|
33
|
-
|
|
34
|
-
point: ChartDataPoint;
|
|
35
|
-
/** Native PointerEvent */
|
|
36
|
-
nativeEvent: MouseEvent | PointerEvent;
|
|
37
|
-
};
|
|
32
|
+
export type ChartDataPointClickEvent = DataPointEvent | ScatterDataPointEvent | BoxplotDataPointEvent | AreamapDataPointEvent | ScattermapDataPointEvent;
|
|
33
|
+
export type ChartDataPointContextMenuEvent = DataPointEvent | ScatterDataPointEvent | BoxplotDataPointEvent;
|
|
38
34
|
export type DataPointsEvent = {
|
|
39
35
|
/** Data points that were selected */
|
|
40
36
|
points: DataPoint[];
|
|
@@ -47,12 +43,13 @@ export type ScatterDataPointsEvent = {
|
|
|
47
43
|
/** Native MouseEvent */
|
|
48
44
|
nativeEvent: MouseEvent;
|
|
49
45
|
};
|
|
50
|
-
export type
|
|
51
|
-
/** Data
|
|
52
|
-
points:
|
|
46
|
+
export type BoxplotDataPointsEvent = {
|
|
47
|
+
/** Data point that were selected */
|
|
48
|
+
points: BoxplotDataPoint[];
|
|
53
49
|
/** Native MouseEvent */
|
|
54
|
-
nativeEvent: MouseEvent
|
|
50
|
+
nativeEvent: MouseEvent;
|
|
55
51
|
};
|
|
52
|
+
export type ChartDataPointsEvent = DataPointsEvent | ScatterDataPointsEvent;
|
|
56
53
|
/**
|
|
57
54
|
* A handler function that allows you to customize what happens when certain events occur to
|
|
58
55
|
* a data point.
|
|
@@ -72,7 +69,17 @@ export type ScattermapDataPointEventHandler = (event: ScattermapDataPointEvent)
|
|
|
72
69
|
* Click handler for when a data point on Boxplot is clicked.
|
|
73
70
|
*/
|
|
74
71
|
export type BoxplotDataPointEventHandler = (event: BoxplotDataPointEvent) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Click handler for when a data point on Chart is clicked.
|
|
74
|
+
*/
|
|
75
|
+
export type ChartDataPointClickEventHandler = (event: ChartDataPointClickEvent) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Context menu handler for when a data point on the Chart is right-clicked.
|
|
78
|
+
*/
|
|
79
|
+
export type ChartDataPointContextMenuEventHandler = (event: ChartDataPointContextMenuEvent) => void;
|
|
75
80
|
/** Click handler for when multiple scatter data points are selected. */
|
|
76
81
|
export type ScatterDataPointsEventHandler = (event: ScatterDataPointsEvent) => void;
|
|
77
82
|
/** Click handler for when multiple data points are selected. */
|
|
78
83
|
export type DataPointsEventHandler = (event: DataPointsEvent) => void;
|
|
84
|
+
/** Click handler for when multiple data points on Chart are selected. */
|
|
85
|
+
export type ChartDataPointsEventHandler = (event: ChartDataPointsEvent) => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Filter } from '@sisense/sdk-data';
|
|
2
|
+
export type FilterChangeEvent = {
|
|
3
|
+
/** Filter that was changed */
|
|
4
|
+
filter: Filter | null;
|
|
5
|
+
};
|
|
6
|
+
export type FilterEditEvent = {
|
|
7
|
+
/** Index of the filter level that triggers the edit event (in the case of a cascading filter) */
|
|
8
|
+
levelIndex?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Filter change event handler.
|
|
12
|
+
*/
|
|
13
|
+
export type FilterChangeEventHandler = (event: FilterChangeEvent) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Filter edit event handler.
|
|
16
|
+
*/
|
|
17
|
+
export type FilterEditEventHandler = (event: FilterEditEvent) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Filter delete event handler.
|
|
20
|
+
*/
|
|
21
|
+
export type FilterDeleteEventHandler = () => void;
|
|
22
|
+
export interface BaseFilterTileEventProps {
|
|
23
|
+
/**
|
|
24
|
+
* {@inheritDoc FilterChangeEventHandler}
|
|
25
|
+
*/
|
|
26
|
+
filterChange?: FilterChangeEventHandler;
|
|
27
|
+
/**
|
|
28
|
+
* {@inheritDoc FilterEditEventHandler}
|
|
29
|
+
*/
|
|
30
|
+
filterEdit?: FilterEditEventHandler;
|
|
31
|
+
/**
|
|
32
|
+
* {@inheritDoc FilterDeleteEventHandler}
|
|
33
|
+
*/
|
|
34
|
+
filterDelete?: FilterDeleteEventHandler;
|
|
35
|
+
}
|
|
@@ -62,16 +62,6 @@ export declare const addFilters: (dashboard: DashboardProps, newFilters: Filter[
|
|
|
62
62
|
* @returns A new dashboard instance with the specified filter replaced.
|
|
63
63
|
*/
|
|
64
64
|
export declare const replaceFilter: (dashboard: DashboardProps, filterToReplace: Filter, newFilter: Filter) => DashboardProps;
|
|
65
|
-
/**
|
|
66
|
-
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.modifyFilter}
|
|
67
|
-
*
|
|
68
|
-
* @deprecated Use {@link replaceFilter} instead
|
|
69
|
-
* @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
|
|
70
|
-
* @param filterToModify - The existing filter to be modified.
|
|
71
|
-
* @param newFilter - The new filter to replace the existing one.
|
|
72
|
-
* @returns A new dashboard instance with the specified filter modified.
|
|
73
|
-
*/
|
|
74
|
-
export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: Filter, newFilter: Filter) => DashboardProps;
|
|
75
65
|
/**
|
|
76
66
|
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilter}
|
|
77
67
|
*
|