@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injectable, Inject, NgModule, Optional, EventEmitter, Component, ViewChild, Input, Output } from '@angular/core';
|
|
3
|
-
import { DataObserver, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, createClientApplication, getDashboardModel, getDashboardModels, getHierarchyModels, executeQuery, executeQueryByWidgetId, executePivotQuery,
|
|
3
|
+
import { DataObserver, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, createClientApplication, getDashboardModel, getDashboardModels, HookAdapter, useComposedDashboardInternal, createHookApiFacade, getHierarchyModels, executeQuery, executeQueryByWidgetId, executePivotQuery, useExecuteCsvQueryInternal, getWidgetModel, getDefaultThemeSettings, getThemeSettingsByOid, ComponentAdapter, Chart, PivotTable, Table, ContextMenu, createWrapperElement, Dashboard, DashboardById, DrilldownBreadcrumbs, CriteriaFilterTile, DateRangeFilterTile, FilterTile, MemberFilterTile, RelativeDateFilterTile, ChartWidget, DrilldownWidget, createWrapperElementHandler, createComponentRenderer, PivotTableWidget, TableWidget, Widget, WidgetById, dashboardModelTranslator as dashboardModelTranslator$1, dashboardHelpers as dashboardHelpers$1, widgetModelTranslator as widgetModelTranslator$1 } from '@sisense/sdk-ui-preact';
|
|
4
4
|
export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
|
|
5
|
-
import { __awaiter, __decorate } from 'tslib';
|
|
5
|
+
import { __rest, __awaiter, __decorate } from 'tslib';
|
|
6
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import merge from 'ts-deepmerge';
|
|
8
8
|
import { trackProductEvent } from '@sisense/sdk-tracking';
|
|
@@ -170,7 +170,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
170
170
|
}] }];
|
|
171
171
|
} });
|
|
172
172
|
|
|
173
|
-
var packageVersion = '
|
|
173
|
+
var packageVersion = '2.0.0';
|
|
174
|
+
|
|
175
|
+
function translateToPreactWidgetProps(widgetProps) {
|
|
176
|
+
const { beforeRender, dataReady, beforeMenuOpen, dataPointClick, dataPointContextMenu, dataPointsSelect } = widgetProps, commonWidgetProps = __rest(widgetProps, ["beforeRender", "dataReady", "beforeMenuOpen", "dataPointClick", "dataPointContextMenu", "dataPointsSelect"]);
|
|
177
|
+
return Object.assign(Object.assign({}, commonWidgetProps), { onBeforeRender: beforeRender, onDataReady: dataReady, onBeforeMenuOpen: beforeMenuOpen, onDataPointClick: dataPointClick
|
|
178
|
+
? (...[point, nativeEvent]) => dataPointClick({ point, nativeEvent })
|
|
179
|
+
: undefined, onDataPointContextMenu: dataPointContextMenu
|
|
180
|
+
? (...[point, nativeEvent]) => dataPointContextMenu({ point, nativeEvent })
|
|
181
|
+
: undefined, onDataPointsSelected: dataPointsSelect
|
|
182
|
+
? (...[points, nativeEvent]) => dataPointsSelect({ points, nativeEvent })
|
|
183
|
+
: undefined });
|
|
184
|
+
}
|
|
185
|
+
function translateFromPreactWidgetProps(widgetProps) {
|
|
186
|
+
const { onBeforeRender, onDataReady, onBeforeMenuOpen, onDataPointClick, onDataPointContextMenu, onDataPointsSelected } = widgetProps, commonWidgetProps = __rest(widgetProps, ["onBeforeRender", "onDataReady", "onBeforeMenuOpen", "onDataPointClick", "onDataPointContextMenu", "onDataPointsSelected"]);
|
|
187
|
+
return Object.assign(Object.assign({}, commonWidgetProps), { beforeRender: onBeforeRender, dataReady: onDataReady, beforeMenuOpen: onBeforeMenuOpen, dataPointClick: onDataPointClick
|
|
188
|
+
? ({ point, nativeEvent }) => onDataPointClick(point, nativeEvent)
|
|
189
|
+
: undefined, dataPointContextMenu: onDataPointContextMenu
|
|
190
|
+
? ({ point, nativeEvent }) => onDataPointContextMenu(point, nativeEvent)
|
|
191
|
+
: undefined, dataPointsSelect: onDataPointsSelected
|
|
192
|
+
? ({ points, nativeEvent }) => onDataPointsSelected(points, nativeEvent)
|
|
193
|
+
: undefined });
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function translateToPreactDashboardProps(dashboardProps) {
|
|
197
|
+
return Object.assign(Object.assign({}, dashboardProps), { widgets: dashboardProps.widgets.map(translateToPreactWidgetProps) });
|
|
198
|
+
}
|
|
199
|
+
function translateFromPreactDashboardProps(dashboardProps) {
|
|
200
|
+
return Object.assign(Object.assign({}, dashboardProps), { widgets: dashboardProps.widgets.map(translateFromPreactWidgetProps) });
|
|
201
|
+
}
|
|
174
202
|
|
|
175
203
|
/**
|
|
176
204
|
* Service for working with Sisense Fusion dashboards.
|
|
@@ -209,6 +237,87 @@ let DashboardService = class DashboardService {
|
|
|
209
237
|
return getDashboardModels(app.httpClient, options);
|
|
210
238
|
});
|
|
211
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Сomposes dashboard or separate dashboard elements into a coordinated dashboard
|
|
242
|
+
* with cross filtering, and change detection.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* An example of using the `createComposedDashboard` to construct a composed dashboard and render it:
|
|
246
|
+
* ```html
|
|
247
|
+
<!--Component HTML template in example.component.html-->
|
|
248
|
+
<div *ngIf="dashboard$ | async as dashboard">
|
|
249
|
+
<csdk-filter-tile
|
|
250
|
+
*ngFor="let filter of getDashboardFilters(dashboard); trackBy: trackByIndex"
|
|
251
|
+
[filter]="filter"
|
|
252
|
+
/>
|
|
253
|
+
<csdk-widget
|
|
254
|
+
*ngFor="let widget of dashboard.widgets; trackBy: trackByIndex"
|
|
255
|
+
[id]="widget.id"
|
|
256
|
+
[widgetType]="widget.widgetType"
|
|
257
|
+
[chartType]="widget.chartType"
|
|
258
|
+
[pluginType]="widget.pluginType"
|
|
259
|
+
[dataSource]="widget.dataSource"
|
|
260
|
+
[dataOptions]="widget.dataOptions"
|
|
261
|
+
[filters]="widget.filters"
|
|
262
|
+
[highlights]="widget.highlights"
|
|
263
|
+
[styleOptions]="widget.styleOptions"
|
|
264
|
+
[drilldownOptions]="widget.drilldownOptions"
|
|
265
|
+
[title]="widget.title"
|
|
266
|
+
[description]="widget.description"
|
|
267
|
+
[beforeMenuOpen]="widget.beforeMenuOpen"
|
|
268
|
+
(dataPointClick)="widget.dataPointClick?.($event)"
|
|
269
|
+
(dataPointContextMenu)="widget.dataPointContextMenu?.($event)"
|
|
270
|
+
(dataPointsSelect)="widget.dataPointsSelect?.($event)"
|
|
271
|
+
/>
|
|
272
|
+
</div>
|
|
273
|
+
* ```
|
|
274
|
+
*
|
|
275
|
+
* ```ts
|
|
276
|
+
// Component behavior in example.component.ts
|
|
277
|
+
import { Component } from '@angular/core';
|
|
278
|
+
import { BehaviorSubject } from 'rxjs';
|
|
279
|
+
import { DashboardService, type DashboardProps } from '@sisense/sdk-ui-angular';
|
|
280
|
+
|
|
281
|
+
@Component({
|
|
282
|
+
selector: 'example',
|
|
283
|
+
templateUrl: './example.component.html',
|
|
284
|
+
styleUrls: ['./example.component.scss'],
|
|
285
|
+
})
|
|
286
|
+
export class ExampleComponent {
|
|
287
|
+
dashboard$: BehaviorSubject<DashboardProps> | undefined;
|
|
288
|
+
|
|
289
|
+
constructor(private dashboardService: DashboardService) {}
|
|
290
|
+
|
|
291
|
+
ngOnInit() {
|
|
292
|
+
const initialDashboard: DashboardProps = { ... };
|
|
293
|
+
const composedDashboard = this.dashboardService.createComposedDashboard(initialDashboard);
|
|
294
|
+
this.dashboard$ = composedDashboard.dashboard$;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
trackByIndex = (index: number) => index;
|
|
298
|
+
|
|
299
|
+
getDashboardFilters = ({ filters }: DashboardProps) => Array.isArray(filters) ? filters : [];
|
|
300
|
+
}
|
|
301
|
+
* ```
|
|
302
|
+
* @param initialDashboard - Initial dashboard
|
|
303
|
+
* @param options - Configuration options
|
|
304
|
+
* @returns Reactive composed dashboard object and API methods for interacting with it
|
|
305
|
+
*/
|
|
306
|
+
createComposedDashboard(initialDashboard, options = {}) {
|
|
307
|
+
const hookAdapter = new HookAdapter((useComposedDashboardInternal), [createSisenseContextConnector(this.sisenseContextService)]);
|
|
308
|
+
const dashboard$ = new BehaviorSubject(initialDashboard);
|
|
309
|
+
hookAdapter.subscribe(({ dashboard }) => {
|
|
310
|
+
dashboard$.next(translateFromPreactDashboardProps(dashboard));
|
|
311
|
+
});
|
|
312
|
+
hookAdapter.run(translateToPreactDashboardProps(initialDashboard), options);
|
|
313
|
+
const setFilters = createHookApiFacade(hookAdapter, 'setFilters', true);
|
|
314
|
+
const setWidgetsLayout = createHookApiFacade(hookAdapter, 'setWidgetsLayout', true);
|
|
315
|
+
return {
|
|
316
|
+
dashboard$,
|
|
317
|
+
setFilters,
|
|
318
|
+
setWidgetsLayout,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
212
321
|
};
|
|
213
322
|
DashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardService, deps: [{ token: SisenseContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
214
323
|
DashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardService, providedIn: 'root' });
|
|
@@ -330,7 +439,7 @@ let QueryService = class QueryService {
|
|
|
330
439
|
*/
|
|
331
440
|
executeQuery(params) {
|
|
332
441
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
-
const { dataSource, dimensions, measures, filters, highlights, count, offset,
|
|
442
|
+
const { dataSource, dimensions, measures, filters, highlights, count, offset, ungroup, beforeQuery, } = params;
|
|
334
443
|
const app = yield this.sisenseContextService.getApp();
|
|
335
444
|
const { filters: filterList, relations: filterRelations } = getFilterListAndRelationsJaql(filters);
|
|
336
445
|
const data = yield executeQuery({
|
|
@@ -342,7 +451,8 @@ let QueryService = class QueryService {
|
|
|
342
451
|
highlights,
|
|
343
452
|
count,
|
|
344
453
|
offset,
|
|
345
|
-
|
|
454
|
+
ungroup,
|
|
455
|
+
}, app, { onBeforeQuery: beforeQuery });
|
|
346
456
|
return { data };
|
|
347
457
|
});
|
|
348
458
|
}
|
|
@@ -353,10 +463,9 @@ let QueryService = class QueryService {
|
|
|
353
463
|
* @returns Query result
|
|
354
464
|
*/
|
|
355
465
|
executeQueryByWidgetId(params) {
|
|
356
|
-
var _a;
|
|
357
466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
467
|
const app = yield this.sisenseContextService.getApp();
|
|
359
|
-
return executeQueryByWidgetId(Object.assign(Object.assign({}, params), { app, onBeforeQuery:
|
|
468
|
+
return executeQueryByWidgetId(Object.assign(Object.assign({}, params), { app, onBeforeQuery: params.beforeQuery }));
|
|
360
469
|
});
|
|
361
470
|
}
|
|
362
471
|
/**
|
|
@@ -998,7 +1107,6 @@ export class AnalyticsComponent {
|
|
|
998
1107
|
* ```
|
|
999
1108
|
* <img src="media://angular-area-range-chart-example.png" width="800px" />
|
|
1000
1109
|
* @group Charts
|
|
1001
|
-
* @beta
|
|
1002
1110
|
*/
|
|
1003
1111
|
class AreaRangeChartComponent {
|
|
1004
1112
|
constructor() {
|
|
@@ -3129,7 +3237,7 @@ class DashboardComponent {
|
|
|
3129
3237
|
}
|
|
3130
3238
|
}
|
|
3131
3239
|
getPreactComponentProps() {
|
|
3132
|
-
return {
|
|
3240
|
+
return translateToPreactDashboardProps({
|
|
3133
3241
|
title: this.title,
|
|
3134
3242
|
layoutOptions: this.layoutOptions,
|
|
3135
3243
|
config: this.config,
|
|
@@ -3138,7 +3246,7 @@ class DashboardComponent {
|
|
|
3138
3246
|
defaultDataSource: this.defaultDataSource,
|
|
3139
3247
|
widgetsOptions: this.widgetsOptions,
|
|
3140
3248
|
styleOptions: this.styleOptions,
|
|
3141
|
-
};
|
|
3249
|
+
});
|
|
3142
3250
|
}
|
|
3143
3251
|
/**
|
|
3144
3252
|
* @internal
|
|
@@ -3630,6 +3738,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3630
3738
|
type: Output
|
|
3631
3739
|
}] } });
|
|
3632
3740
|
|
|
3741
|
+
/**
|
|
3742
|
+
* An extended version of Angular's `EventEmitter` that tracks
|
|
3743
|
+
* whether any listeners (subscribers) are attached.
|
|
3744
|
+
*
|
|
3745
|
+
* Useful when you need to know if an `@Output()` is being observed
|
|
3746
|
+
* in the template (i.e., bound with `(event)="..."`).
|
|
3747
|
+
*
|
|
3748
|
+
* @template T - The type of values emitted by the EventEmitter.
|
|
3749
|
+
*/
|
|
3750
|
+
class EventEmitterWithHasListeners extends EventEmitter {
|
|
3751
|
+
constructor() {
|
|
3752
|
+
super(...arguments);
|
|
3753
|
+
/**
|
|
3754
|
+
* Indicates whether the EventEmitter has at least one active subscriber.
|
|
3755
|
+
*/
|
|
3756
|
+
this.hasListeners = false;
|
|
3757
|
+
}
|
|
3758
|
+
/**
|
|
3759
|
+
* Overrides the default `subscribe()` method to set `hasListeners` to true
|
|
3760
|
+
* when a new subscriber is added.
|
|
3761
|
+
*
|
|
3762
|
+
* @param args - The arguments passed to the `subscribe()` method.
|
|
3763
|
+
* @returns A subscription object used to unsubscribe from the event.
|
|
3764
|
+
*/
|
|
3765
|
+
subscribe(...args) {
|
|
3766
|
+
this.hasListeners = true;
|
|
3767
|
+
return super.subscribe(...args);
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
/**
|
|
3772
|
+
* UI component that renders a filter tile based on filter type
|
|
3773
|
+
*
|
|
3774
|
+
* @example
|
|
3775
|
+
* Here’s how to render a filter model as a filter tile.
|
|
3776
|
+
*
|
|
3777
|
+
* ```html
|
|
3778
|
+
<!--Component HTML template in example.component.html-->
|
|
3779
|
+
<csdk-filter-tile
|
|
3780
|
+
[filter]="filterTileProps.filter"
|
|
3781
|
+
(filterChange)="filterTileProps.filterChange($event)"
|
|
3782
|
+
/>
|
|
3783
|
+
* ```
|
|
3784
|
+
*
|
|
3785
|
+
* ```ts
|
|
3786
|
+
// Component behavior in example.component.ts
|
|
3787
|
+
import { Component } from '@angular/core';
|
|
3788
|
+
import { type FilterTileProps } from '@sisense/sdk-ui-angular';
|
|
3789
|
+
import { filterFactory } from '@sisense/sdk-data';
|
|
3790
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
3791
|
+
|
|
3792
|
+
@Component({
|
|
3793
|
+
selector: 'example',
|
|
3794
|
+
templateUrl: './example.component.html',
|
|
3795
|
+
styleUrls: ['./example.component.scss'],
|
|
3796
|
+
})
|
|
3797
|
+
export class ExampleComponent {
|
|
3798
|
+
filterTileProps: FilterTileProps = {
|
|
3799
|
+
filter: filterFactory.members(DM.ER.Date.Years, ['2013-01-01T00:00:00']),
|
|
3800
|
+
filterChange({ filter }) {
|
|
3801
|
+
if (filter) {
|
|
3802
|
+
this.filter = filter;
|
|
3803
|
+
}
|
|
3804
|
+
},
|
|
3805
|
+
};
|
|
3806
|
+
}
|
|
3807
|
+
* ```
|
|
3808
|
+
* <img src="media://angular-member-filter-tile-example.png" width="225px" />
|
|
3809
|
+
* @group Filter Tiles
|
|
3810
|
+
* @shortDescription Facade component rendering a filter tile based on filter type
|
|
3811
|
+
*/
|
|
3812
|
+
class FilterTileComponent {
|
|
3813
|
+
/**
|
|
3814
|
+
* Constructor for the `FilterTileComponent`.
|
|
3815
|
+
*
|
|
3816
|
+
* @param sisenseContextService - Sisense context service
|
|
3817
|
+
* @param themeService - Theme service
|
|
3818
|
+
*/
|
|
3819
|
+
constructor(
|
|
3820
|
+
/**
|
|
3821
|
+
* Sisense context service
|
|
3822
|
+
*
|
|
3823
|
+
* @category Constructor
|
|
3824
|
+
*/
|
|
3825
|
+
sisenseContextService,
|
|
3826
|
+
/**
|
|
3827
|
+
* Theme service
|
|
3828
|
+
*
|
|
3829
|
+
* @category Constructor
|
|
3830
|
+
*/
|
|
3831
|
+
themeService) {
|
|
3832
|
+
this.sisenseContextService = sisenseContextService;
|
|
3833
|
+
this.themeService = themeService;
|
|
3834
|
+
/**
|
|
3835
|
+
* {@inheritDoc FilterTileProps.filterChange}
|
|
3836
|
+
*/
|
|
3837
|
+
this.filterChange = new EventEmitter();
|
|
3838
|
+
/**
|
|
3839
|
+
* {@inheritDoc FilterTileProps.filterEdit}
|
|
3840
|
+
*/
|
|
3841
|
+
this.filterEdit = new EventEmitterWithHasListeners();
|
|
3842
|
+
/**
|
|
3843
|
+
* {@inheritDoc FilterTileProps.filterDelete}
|
|
3844
|
+
*/
|
|
3845
|
+
this.filterDelete = new EventEmitterWithHasListeners();
|
|
3846
|
+
this.componentAdapter = new ComponentAdapter(FilterTile, [
|
|
3847
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3848
|
+
createThemeContextConnector(this.themeService),
|
|
3849
|
+
]);
|
|
3850
|
+
}
|
|
3851
|
+
/**
|
|
3852
|
+
* @internal
|
|
3853
|
+
*/
|
|
3854
|
+
ngAfterViewInit() {
|
|
3855
|
+
this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());
|
|
3856
|
+
}
|
|
3857
|
+
/**
|
|
3858
|
+
* @internal
|
|
3859
|
+
*/
|
|
3860
|
+
ngOnChanges() {
|
|
3861
|
+
if (this.preactRef) {
|
|
3862
|
+
this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3865
|
+
getPreactComponentProps() {
|
|
3866
|
+
const hasFilterEditListeners = this.filterEdit
|
|
3867
|
+
.hasListeners;
|
|
3868
|
+
const hasFilterDeleteListeners = this.filterDelete
|
|
3869
|
+
.hasListeners;
|
|
3870
|
+
return Object.assign(Object.assign({ filter: this.filter, defaultDataSource: this.defaultDataSource, onChange: (...[filter]) => this.filterChange.emit({ filter }) }, (hasFilterEditListeners && {
|
|
3871
|
+
onEdit: (...[levelIndex]) => this.filterEdit.emit({ levelIndex }),
|
|
3872
|
+
})), (hasFilterDeleteListeners && { onDelete: () => this.filterDelete.emit() }));
|
|
3873
|
+
}
|
|
3874
|
+
/**
|
|
3875
|
+
* @internal
|
|
3876
|
+
*/
|
|
3877
|
+
ngOnDestroy() {
|
|
3878
|
+
this.componentAdapter.destroy();
|
|
3879
|
+
}
|
|
3880
|
+
}
|
|
3881
|
+
FilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3882
|
+
FilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FilterTileComponent, selector: "csdk-filter-tile", inputs: { filter: "filter", defaultDataSource: "defaultDataSource" }, outputs: { filterChange: "filterChange", filterEdit: "filterEdit", filterDelete: "filterDelete" }, 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 });
|
|
3883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FilterTileComponent, decorators: [{
|
|
3884
|
+
type: Component,
|
|
3885
|
+
args: [{
|
|
3886
|
+
selector: 'csdk-filter-tile',
|
|
3887
|
+
template,
|
|
3888
|
+
}]
|
|
3889
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3890
|
+
type: ViewChild,
|
|
3891
|
+
args: [rootId]
|
|
3892
|
+
}], filter: [{
|
|
3893
|
+
type: Input
|
|
3894
|
+
}], defaultDataSource: [{
|
|
3895
|
+
type: Input
|
|
3896
|
+
}], filterChange: [{
|
|
3897
|
+
type: Output
|
|
3898
|
+
}], filterEdit: [{
|
|
3899
|
+
type: Output
|
|
3900
|
+
}], filterDelete: [{
|
|
3901
|
+
type: Output
|
|
3902
|
+
}] } });
|
|
3903
|
+
|
|
3633
3904
|
/**
|
|
3634
3905
|
* Member Filter Tile Component
|
|
3635
3906
|
*
|
|
@@ -3664,7 +3935,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3664
3935
|
* };
|
|
3665
3936
|
* }
|
|
3666
3937
|
* ```
|
|
3667
|
-
* <img src="media://angular-member-filter-tile-example.png" width="
|
|
3938
|
+
* <img src="media://angular-member-filter-tile-example.png" width="225px" />
|
|
3668
3939
|
* @group Filter Tiles
|
|
3669
3940
|
*/
|
|
3670
3941
|
class MemberFilterTileComponent {
|
|
@@ -3930,7 +4201,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3930
4201
|
*
|
|
3931
4202
|
* }
|
|
3932
4203
|
* ```
|
|
3933
|
-
* <img src="media://angular-chart-widget-example.png" width="
|
|
4204
|
+
* <img src="media://angular-chart-widget-example.png" width="500px" />
|
|
3934
4205
|
* @group Dashboards
|
|
3935
4206
|
*/
|
|
3936
4207
|
class ChartWidgetComponent {
|
|
@@ -4038,116 +4309,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4038
4309
|
type: Output
|
|
4039
4310
|
}] } });
|
|
4040
4311
|
|
|
4041
|
-
/**
|
|
4042
|
-
* The Dashboard Widget component, which is a thin wrapper on {@link ChartWidgetComponent},
|
|
4043
|
-
* is used to render a widget created in a Sisense Fusion instance.
|
|
4044
|
-
*
|
|
4045
|
-
* To learn more about using Sisense Fusion Widgets in Compose SDK, see
|
|
4046
|
-
* [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
|
|
4047
|
-
*
|
|
4048
|
-
* @example
|
|
4049
|
-
* ```html
|
|
4050
|
-
* <csdk-dashboard-widget
|
|
4051
|
-
* [widgetOid]="widgetOid"
|
|
4052
|
-
* [dashboardOid]="dashboardOid"
|
|
4053
|
-
* [includeDashboardFilters]="true"
|
|
4054
|
-
* />
|
|
4055
|
-
* ```
|
|
4056
|
-
* ```ts
|
|
4057
|
-
* import { Component } from '@angular/core';
|
|
4058
|
-
* import { ChartType } from '@sisense/sdk-ui-angular';
|
|
4059
|
-
* import { filterFactory, measureFactory } from '@sisense/sdk-data';
|
|
4060
|
-
* import * as DM from '../../assets/sample-healthcare-model';
|
|
4061
|
-
*
|
|
4062
|
-
* @Component({
|
|
4063
|
-
* selector: 'app-widgets',
|
|
4064
|
-
* templateUrl: './widgets.component.html',
|
|
4065
|
-
* styleUrls: ['./widgets.component.scss'],
|
|
4066
|
-
* })
|
|
4067
|
-
* export class WidgetsComponent {
|
|
4068
|
-
* widgetOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
|
|
4069
|
-
* dashboardOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
|
|
4070
|
-
* }
|
|
4071
|
-
* ```
|
|
4072
|
-
* @group Fusion Assets
|
|
4073
|
-
* @deprecated Use the `widget-by-id` component instead.
|
|
4074
|
-
* @fusionEmbed
|
|
4075
|
-
*/
|
|
4076
|
-
class DashboardWidgetComponent {
|
|
4077
|
-
constructor(sisenseContextService, themeService) {
|
|
4078
|
-
this.sisenseContextService = sisenseContextService;
|
|
4079
|
-
this.themeService = themeService;
|
|
4080
|
-
this.componentAdapter = new ComponentAdapter(DashboardWidget, [
|
|
4081
|
-
createSisenseContextConnector(this.sisenseContextService),
|
|
4082
|
-
createThemeContextConnector(this.themeService),
|
|
4083
|
-
]);
|
|
4084
|
-
}
|
|
4085
|
-
/** @internal */
|
|
4086
|
-
ngAfterViewInit() {
|
|
4087
|
-
this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());
|
|
4088
|
-
}
|
|
4089
|
-
/** @internal */
|
|
4090
|
-
ngOnChanges() {
|
|
4091
|
-
if (this.preactRef) {
|
|
4092
|
-
this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());
|
|
4093
|
-
}
|
|
4094
|
-
}
|
|
4095
|
-
/** @internal */
|
|
4096
|
-
getPreactComponentProps() {
|
|
4097
|
-
return {
|
|
4098
|
-
widgetOid: this.widgetOid,
|
|
4099
|
-
dashboardOid: this.dashboardOid,
|
|
4100
|
-
filters: this.filters,
|
|
4101
|
-
highlights: this.highlights,
|
|
4102
|
-
filtersMergeStrategy: this.filtersMergeStrategy,
|
|
4103
|
-
includeDashboardFilters: this.includeDashboardFilters,
|
|
4104
|
-
title: this.title,
|
|
4105
|
-
description: this.description,
|
|
4106
|
-
styleOptions: this.styleOptions,
|
|
4107
|
-
highlightSelectionDisabled: this.highlightSelectionDisabled,
|
|
4108
|
-
drilldownOptions: this.drilldownOptions,
|
|
4109
|
-
};
|
|
4110
|
-
}
|
|
4111
|
-
/** @internal */
|
|
4112
|
-
ngOnDestroy() {
|
|
4113
|
-
this.componentAdapter.destroy();
|
|
4114
|
-
}
|
|
4115
|
-
}
|
|
4116
|
-
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 });
|
|
4117
|
-
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 });
|
|
4118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, decorators: [{
|
|
4119
|
-
type: Component,
|
|
4120
|
-
args: [{
|
|
4121
|
-
selector: 'csdk-dashboard-widget',
|
|
4122
|
-
template,
|
|
4123
|
-
}]
|
|
4124
|
-
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
4125
|
-
type: ViewChild,
|
|
4126
|
-
args: [rootId]
|
|
4127
|
-
}], widgetOid: [{
|
|
4128
|
-
type: Input
|
|
4129
|
-
}], dashboardOid: [{
|
|
4130
|
-
type: Input
|
|
4131
|
-
}], filters: [{
|
|
4132
|
-
type: Input
|
|
4133
|
-
}], highlights: [{
|
|
4134
|
-
type: Input
|
|
4135
|
-
}], filtersMergeStrategy: [{
|
|
4136
|
-
type: Input
|
|
4137
|
-
}], includeDashboardFilters: [{
|
|
4138
|
-
type: Input
|
|
4139
|
-
}], title: [{
|
|
4140
|
-
type: Input
|
|
4141
|
-
}], description: [{
|
|
4142
|
-
type: Input
|
|
4143
|
-
}], styleOptions: [{
|
|
4144
|
-
type: Input
|
|
4145
|
-
}], highlightSelectionDisabled: [{
|
|
4146
|
-
type: Input
|
|
4147
|
-
}], drilldownOptions: [{
|
|
4148
|
-
type: Input
|
|
4149
|
-
}] } });
|
|
4150
|
-
|
|
4151
4312
|
/**
|
|
4152
4313
|
* An Angular component designed to add drilldown functionality to any type of chart.
|
|
4153
4314
|
*
|
|
@@ -4266,7 +4427,6 @@ class DrilldownWidgetComponent {
|
|
|
4266
4427
|
getPreactComponentProps() {
|
|
4267
4428
|
var _a, _b;
|
|
4268
4429
|
return {
|
|
4269
|
-
drilldownDimensions: this.drilldownDimensions,
|
|
4270
4430
|
drilldownPaths: this.drilldownPaths,
|
|
4271
4431
|
initialDimension: this.initialDimension,
|
|
4272
4432
|
config: Object.assign(Object.assign(Object.assign({}, this.config), (((_a = this.config) === null || _a === void 0 ? void 0 : _a.breadcrumbsComponent) && {
|
|
@@ -4291,7 +4451,7 @@ class DrilldownWidgetComponent {
|
|
|
4291
4451
|
}
|
|
4292
4452
|
}
|
|
4293
4453
|
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 });
|
|
4294
|
-
DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: {
|
|
4454
|
+
DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: { drilldownPaths: "drilldownPaths", 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 });
|
|
4295
4455
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, decorators: [{
|
|
4296
4456
|
type: Component,
|
|
4297
4457
|
args: [{
|
|
@@ -4304,8 +4464,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4304
4464
|
}], preactContentRef: [{
|
|
4305
4465
|
type: ViewChild,
|
|
4306
4466
|
args: [rootContentId]
|
|
4307
|
-
}], drilldownDimensions: [{
|
|
4308
|
-
type: Input
|
|
4309
4467
|
}], drilldownPaths: [{
|
|
4310
4468
|
type: Input
|
|
4311
4469
|
}], initialDimension: [{
|
|
@@ -4532,6 +4690,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4532
4690
|
type: Input
|
|
4533
4691
|
}] } });
|
|
4534
4692
|
|
|
4693
|
+
/**
|
|
4694
|
+
* Facade component that renders a widget within a dashboard based on the widget type.
|
|
4695
|
+
*
|
|
4696
|
+
* @example
|
|
4697
|
+
* ```html
|
|
4698
|
+
<!--Component HTML template in example.component.html-->
|
|
4699
|
+
<csdk-widget
|
|
4700
|
+
[id]="widgetProps.id"
|
|
4701
|
+
[title]="widgetProps.title"
|
|
4702
|
+
[widgetType]="widgetProps.widgetType"
|
|
4703
|
+
[chartType]="widgetProps.chartType"
|
|
4704
|
+
[dataSource]="widgetProps.dataSource"
|
|
4705
|
+
[dataOptions]="widgetProps.dataOptions"
|
|
4706
|
+
/>
|
|
4707
|
+
* ```
|
|
4708
|
+
*
|
|
4709
|
+
* ```ts
|
|
4710
|
+
// Component behavior in example.component.ts
|
|
4711
|
+
import { Component } from '@angular/core';
|
|
4712
|
+
import { type WidgetProps } from '@sisense/sdk-ui-angular';
|
|
4713
|
+
|
|
4714
|
+
@Component({
|
|
4715
|
+
selector: 'example',
|
|
4716
|
+
templateUrl: './example.component.html',
|
|
4717
|
+
styleUrls: ['./example.component.scss'],
|
|
4718
|
+
})
|
|
4719
|
+
export class ExampleComponent {
|
|
4720
|
+
widgetProps: WidgetProps = {
|
|
4721
|
+
id: 'widget-id',
|
|
4722
|
+
widgetType: 'chart',
|
|
4723
|
+
chartType: 'column',
|
|
4724
|
+
title: 'Widget Title',
|
|
4725
|
+
dataSource: DM.DataSource,
|
|
4726
|
+
dataOptions: {
|
|
4727
|
+
category: [DM.Divisions.Divison_name],
|
|
4728
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
4729
|
+
breakBy: [],
|
|
4730
|
+
},
|
|
4731
|
+
};
|
|
4732
|
+
}
|
|
4733
|
+
* ```
|
|
4734
|
+
* <img src="media://angular-chart-widget-example.png" width="500px" />
|
|
4735
|
+
* @group Dashboards
|
|
4736
|
+
*/
|
|
4737
|
+
class WidgetComponent {
|
|
4738
|
+
constructor(sisenseContextService, themeService) {
|
|
4739
|
+
this.sisenseContextService = sisenseContextService;
|
|
4740
|
+
this.themeService = themeService;
|
|
4741
|
+
/**
|
|
4742
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointClick}
|
|
4743
|
+
*
|
|
4744
|
+
* @category Callbacks
|
|
4745
|
+
*/
|
|
4746
|
+
this.dataPointClick = new EventEmitter();
|
|
4747
|
+
/**
|
|
4748
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointContextMenu}
|
|
4749
|
+
*
|
|
4750
|
+
* @category Callbacks
|
|
4751
|
+
*/
|
|
4752
|
+
this.dataPointContextMenu = new EventEmitter();
|
|
4753
|
+
/**
|
|
4754
|
+
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.onDataPointsSelected}
|
|
4755
|
+
*
|
|
4756
|
+
* @category Callbacks
|
|
4757
|
+
*/
|
|
4758
|
+
this.dataPointsSelect = new EventEmitter();
|
|
4759
|
+
this.componentAdapter = new ComponentAdapter(Widget, [
|
|
4760
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
4761
|
+
createThemeContextConnector(this.themeService),
|
|
4762
|
+
]);
|
|
4763
|
+
}
|
|
4764
|
+
/** @internal */
|
|
4765
|
+
ngAfterViewInit() {
|
|
4766
|
+
this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());
|
|
4767
|
+
}
|
|
4768
|
+
/** @internal */
|
|
4769
|
+
ngOnChanges() {
|
|
4770
|
+
if (this.preactRef) {
|
|
4771
|
+
this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4774
|
+
getPreactComponentProps() {
|
|
4775
|
+
var _a, _b, _c;
|
|
4776
|
+
return translateToPreactWidgetProps({
|
|
4777
|
+
id: this.id,
|
|
4778
|
+
widgetType: this.widgetType,
|
|
4779
|
+
chartType: this.chartType,
|
|
4780
|
+
pluginType: this.pluginType,
|
|
4781
|
+
dataSource: this.dataSource,
|
|
4782
|
+
dataOptions: this.dataOptions,
|
|
4783
|
+
filters: this.filters,
|
|
4784
|
+
highlights: this.highlights,
|
|
4785
|
+
styleOptions: this.styleOptions,
|
|
4786
|
+
drilldownOptions: this.drilldownOptions,
|
|
4787
|
+
title: this.title,
|
|
4788
|
+
description: this.description,
|
|
4789
|
+
highlightSelectionDisabled: this.highlightSelectionDisabled,
|
|
4790
|
+
beforeRender: (_a = this.beforeRender) === null || _a === void 0 ? void 0 : _a.bind(this),
|
|
4791
|
+
dataReady: (_b = this.dataReady) === null || _b === void 0 ? void 0 : _b.bind(this),
|
|
4792
|
+
beforeMenuOpen: (_c = this.beforeMenuOpen) === null || _c === void 0 ? void 0 : _c.bind(this),
|
|
4793
|
+
dataPointClick: this.dataPointClick.emit.bind(this.dataPointClick),
|
|
4794
|
+
dataPointContextMenu: this.dataPointContextMenu.emit.bind(this.dataPointContextMenu),
|
|
4795
|
+
dataPointsSelect: this.dataPointsSelect.emit.bind(this.dataPointsSelect),
|
|
4796
|
+
});
|
|
4797
|
+
}
|
|
4798
|
+
/** @internal */
|
|
4799
|
+
ngOnDestroy() {
|
|
4800
|
+
this.componentAdapter.destroy();
|
|
4801
|
+
}
|
|
4802
|
+
}
|
|
4803
|
+
WidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4804
|
+
WidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WidgetComponent, selector: "csdk-widget", inputs: { 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" }, 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 });
|
|
4805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WidgetComponent, decorators: [{
|
|
4806
|
+
type: Component,
|
|
4807
|
+
args: [{
|
|
4808
|
+
selector: 'csdk-widget',
|
|
4809
|
+
template,
|
|
4810
|
+
}]
|
|
4811
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
4812
|
+
type: ViewChild,
|
|
4813
|
+
args: [rootId]
|
|
4814
|
+
}], id: [{
|
|
4815
|
+
type: Input
|
|
4816
|
+
}], widgetType: [{
|
|
4817
|
+
type: Input
|
|
4818
|
+
}], chartType: [{
|
|
4819
|
+
type: Input
|
|
4820
|
+
}], pluginType: [{
|
|
4821
|
+
type: Input
|
|
4822
|
+
}], dataSource: [{
|
|
4823
|
+
type: Input
|
|
4824
|
+
}], dataOptions: [{
|
|
4825
|
+
type: Input
|
|
4826
|
+
}], filters: [{
|
|
4827
|
+
type: Input
|
|
4828
|
+
}], highlights: [{
|
|
4829
|
+
type: Input
|
|
4830
|
+
}], styleOptions: [{
|
|
4831
|
+
type: Input
|
|
4832
|
+
}], drilldownOptions: [{
|
|
4833
|
+
type: Input
|
|
4834
|
+
}], title: [{
|
|
4835
|
+
type: Input
|
|
4836
|
+
}], description: [{
|
|
4837
|
+
type: Input
|
|
4838
|
+
}], highlightSelectionDisabled: [{
|
|
4839
|
+
type: Input
|
|
4840
|
+
}], beforeRender: [{
|
|
4841
|
+
type: Input
|
|
4842
|
+
}], dataReady: [{
|
|
4843
|
+
type: Input
|
|
4844
|
+
}], beforeMenuOpen: [{
|
|
4845
|
+
type: Input
|
|
4846
|
+
}], dataPointClick: [{
|
|
4847
|
+
type: Output
|
|
4848
|
+
}], dataPointContextMenu: [{
|
|
4849
|
+
type: Output
|
|
4850
|
+
}], dataPointsSelect: [{
|
|
4851
|
+
type: Output
|
|
4852
|
+
}] } });
|
|
4853
|
+
|
|
4535
4854
|
/**
|
|
4536
4855
|
* The `WidgetById` component, which is a thin wrapper on {@link ChartWidgetComponent},
|
|
4537
4856
|
* is used to render a widget created in a Sisense Fusion instance.
|
|
@@ -4688,7 +5007,6 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
4688
5007
|
TreemapChartComponent,
|
|
4689
5008
|
SunburstChartComponent,
|
|
4690
5009
|
TableWidgetComponent,
|
|
4691
|
-
DashboardWidgetComponent,
|
|
4692
5010
|
WidgetByIdComponent,
|
|
4693
5011
|
MemberFilterTileComponent,
|
|
4694
5012
|
DrilldownWidgetComponent,
|
|
@@ -4703,7 +5021,9 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
4703
5021
|
PivotTableComponent,
|
|
4704
5022
|
DashboardByIdComponent,
|
|
4705
5023
|
DashboardComponent,
|
|
4706
|
-
PivotTableWidgetComponent
|
|
5024
|
+
PivotTableWidgetComponent,
|
|
5025
|
+
FilterTileComponent,
|
|
5026
|
+
WidgetComponent], imports: [CommonModule, DecoratorsModule], exports: [ChartComponent,
|
|
4707
5027
|
TableComponent,
|
|
4708
5028
|
ChartWidgetComponent,
|
|
4709
5029
|
ColumnChartComponent,
|
|
@@ -4719,7 +5039,6 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
4719
5039
|
TreemapChartComponent,
|
|
4720
5040
|
SunburstChartComponent,
|
|
4721
5041
|
TableWidgetComponent,
|
|
4722
|
-
DashboardWidgetComponent,
|
|
4723
5042
|
WidgetByIdComponent,
|
|
4724
5043
|
MemberFilterTileComponent,
|
|
4725
5044
|
DrilldownWidgetComponent,
|
|
@@ -4734,7 +5053,9 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
4734
5053
|
PivotTableComponent,
|
|
4735
5054
|
DashboardByIdComponent,
|
|
4736
5055
|
DashboardComponent,
|
|
4737
|
-
PivotTableWidgetComponent
|
|
5056
|
+
PivotTableWidgetComponent,
|
|
5057
|
+
FilterTileComponent,
|
|
5058
|
+
WidgetComponent] });
|
|
4738
5059
|
SdkUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, imports: [CommonModule, DecoratorsModule] });
|
|
4739
5060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, decorators: [{
|
|
4740
5061
|
type: NgModule,
|
|
@@ -4756,7 +5077,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4756
5077
|
TreemapChartComponent,
|
|
4757
5078
|
SunburstChartComponent,
|
|
4758
5079
|
TableWidgetComponent,
|
|
4759
|
-
DashboardWidgetComponent,
|
|
4760
5080
|
WidgetByIdComponent,
|
|
4761
5081
|
MemberFilterTileComponent,
|
|
4762
5082
|
DrilldownWidgetComponent,
|
|
@@ -4772,6 +5092,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4772
5092
|
DashboardByIdComponent,
|
|
4773
5093
|
DashboardComponent,
|
|
4774
5094
|
PivotTableWidgetComponent,
|
|
5095
|
+
FilterTileComponent,
|
|
5096
|
+
WidgetComponent,
|
|
4775
5097
|
],
|
|
4776
5098
|
imports: [CommonModule, DecoratorsModule],
|
|
4777
5099
|
exports: [
|
|
@@ -4791,7 +5113,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4791
5113
|
TreemapChartComponent,
|
|
4792
5114
|
SunburstChartComponent,
|
|
4793
5115
|
TableWidgetComponent,
|
|
4794
|
-
DashboardWidgetComponent,
|
|
4795
5116
|
WidgetByIdComponent,
|
|
4796
5117
|
MemberFilterTileComponent,
|
|
4797
5118
|
DrilldownWidgetComponent,
|
|
@@ -4807,6 +5128,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4807
5128
|
DashboardByIdComponent,
|
|
4808
5129
|
DashboardComponent,
|
|
4809
5130
|
PivotTableWidgetComponent,
|
|
5131
|
+
FilterTileComponent,
|
|
5132
|
+
WidgetComponent,
|
|
4810
5133
|
],
|
|
4811
5134
|
providers: [],
|
|
4812
5135
|
}]
|
|
@@ -4938,18 +5261,6 @@ const addFilters = (dashboard, newFilters) => {
|
|
|
4938
5261
|
const replaceFilter = (dashboard, filterToReplace, newFilter) => {
|
|
4939
5262
|
return dashboardHelpers$1.replaceFilter(dashboard, filterToReplace, newFilter);
|
|
4940
5263
|
};
|
|
4941
|
-
/**
|
|
4942
|
-
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.modifyFilter}
|
|
4943
|
-
*
|
|
4944
|
-
* @deprecated Use {@link replaceFilter} instead
|
|
4945
|
-
* @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
|
|
4946
|
-
* @param filterToModify - The existing filter to be modified.
|
|
4947
|
-
* @param newFilter - The new filter to replace the existing one.
|
|
4948
|
-
* @returns A new dashboard instance with the specified filter modified.
|
|
4949
|
-
*/
|
|
4950
|
-
const modifyFilter = (dashboard, filterToModify, newFilter) => {
|
|
4951
|
-
return dashboardHelpers$1.modifyFilter(dashboard, filterToModify, newFilter);
|
|
4952
|
-
};
|
|
4953
5264
|
/**
|
|
4954
5265
|
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilter}
|
|
4955
5266
|
*
|
|
@@ -4989,7 +5300,6 @@ var dashboardHelpers = /*#__PURE__*/Object.freeze({
|
|
|
4989
5300
|
__proto__: null,
|
|
4990
5301
|
addFilter: addFilter,
|
|
4991
5302
|
addFilters: addFilters,
|
|
4992
|
-
modifyFilter: modifyFilter,
|
|
4993
5303
|
removeFilter: removeFilter,
|
|
4994
5304
|
removeFilters: removeFilters,
|
|
4995
5305
|
replaceFilter: replaceFilter,
|
|
@@ -5319,5 +5629,5 @@ var widgetModelTranslator = /*#__PURE__*/Object.freeze({
|
|
|
5319
5629
|
* Generated bundle index. Do not edit.
|
|
5320
5630
|
*/
|
|
5321
5631
|
|
|
5322
|
-
export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, CriteriaFilterTileComponent, DashboardByIdComponent, DashboardComponent, DashboardService,
|
|
5632
|
+
export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, CriteriaFilterTileComponent, DashboardByIdComponent, DashboardComponent, DashboardService, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FilterTileComponent, FunnelChartComponent, HierarchyService, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PivotTableWidgetComponent, PluginsService, PolarChartComponent, QueryService, RelativeDateFilterTileComponent, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TrackableService, TreemapChartComponent, WidgetByIdComponent, WidgetComponent, WidgetService, createPluginsContextConnector, createSisenseContextConnector, createThemeContextConnector, dashboardHelpers, dashboardModelTranslator, widgetModelTranslator };
|
|
5323
5633
|
//# sourceMappingURL=sisense-sdk-ui-angular.mjs.map
|