@schneideress/dashboardframework 17.0.3 → 17.0.5
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/esm2022/gridster/lib/gridster.component.mjs +3 -3
- package/esm2022/gridster/lib/gridster.module.mjs +4 -4
- package/esm2022/gridster/lib/gridsterItem.component.mjs +7 -4
- package/esm2022/gridster/lib/gridsterPreview.component.mjs +3 -3
- package/esm2022/gridster/lib/gridsterRenderer.service.mjs +1 -1
- package/esm2022/lib/ra-dashboard-area/ra.dashboard.area.mjs +165 -63
- package/esm2022/lib/ra-widget-container/lock-tooltip/lock.tooltip.component.mjs +3 -3
- package/esm2022/lib/ra-widget-container/ra.widget.container.component.mjs +294 -121
- package/esm2022/lib/ra.base.dashboard.filter.mjs +3 -3
- package/esm2022/lib/ra.base.dashboard.template.mjs +7 -5
- package/esm2022/lib/ra.dashbard.event.bus.mjs +3 -3
- package/esm2022/lib/ra.dashboard.module.mjs +4 -4
- package/esm2022/lib/ra.dashboard.responsive.service.mjs +15 -5
- package/esm2022/lib/ra.dashboard.service.mjs +11 -4
- package/esm2022/lib/ra.event.enum.mjs +7 -1
- package/esm2022/lib/ra.gridster.config.mjs +3 -3
- package/fesm2022/schneideress-dashboardframework.mjs +524 -221
- package/fesm2022/schneideress-dashboardframework.mjs.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +25 -3
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +11 -3
- package/lib/ra.base.dashboard.template.d.ts +4 -2
- package/lib/ra.dashboard.responsive.service.d.ts +1 -1
- package/lib/ra.dashboard.service.d.ts +1 -0
- package/lib/ra.event.enum.d.ts +7 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, ViewEncapsulation, Input, EventEmitter, ElementRef, Renderer2, ChangeDetectorRef, NgZone, Inject, Output, HostBinding, ViewChild, NgModule, Directive } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, ViewEncapsulation, Input, EventEmitter, ElementRef, Renderer2, ChangeDetectorRef, NgZone, Inject, Output, HostBinding, ViewContainerRef, ViewChild, NgModule, Directive } from '@angular/core';
|
|
3
3
|
import { of, Subject, debounceTime, takeUntil, switchMap, timer } from 'rxjs';
|
|
4
4
|
import * as i3 from '@schneideress/ra-common';
|
|
5
5
|
import { BaseService, RACommonModule } from '@schneideress/ra-common';
|
|
@@ -10,6 +10,7 @@ import { NotifierModule } from 'angular-notifier';
|
|
|
10
10
|
import * as i2 from '@angular/common';
|
|
11
11
|
import { NgForOf, NgStyle, NgIf } from '@angular/common';
|
|
12
12
|
import { RaWidgetlockStatus, WidgetViewState, RADownloadType, RADownloadOption } from '@schneideress/widgetframework';
|
|
13
|
+
import { loadRemoteModule } from '@angular-architects/module-federation';
|
|
13
14
|
import * as i6 from '@schneideress/common-controls';
|
|
14
15
|
import { RACommonControlsModule } from '@schneideress/common-controls';
|
|
15
16
|
import { BrowserModule } from '@angular/platform-browser';
|
|
@@ -20,6 +21,7 @@ class RaDashboardService extends BaseService {
|
|
|
20
21
|
constructor(injector) {
|
|
21
22
|
super(injector, '');
|
|
22
23
|
this.loadedScripts = [];
|
|
24
|
+
this.clientId = undefined;
|
|
23
25
|
}
|
|
24
26
|
/*
|
|
25
27
|
* To load external scripts in the dom
|
|
@@ -71,6 +73,12 @@ class RaDashboardService extends BaseService {
|
|
|
71
73
|
/**To Update widgetInfo in database */
|
|
72
74
|
updateWidget(widgetInfo, appConfig) {
|
|
73
75
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
76
|
+
let info = {};
|
|
77
|
+
info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
|
|
78
|
+
info.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
79
|
+
info.widgetTitle = widgetInfo.widgetTitle;
|
|
80
|
+
info.widgetType = widgetInfo.widgetType;
|
|
81
|
+
info.widgetId = widgetInfo.widgetId;
|
|
74
82
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
75
83
|
}
|
|
76
84
|
/** To Move or change position if current widget container*/
|
|
@@ -79,10 +87,10 @@ class RaDashboardService extends BaseService {
|
|
|
79
87
|
/** To Copy Current widget with same configuration*/
|
|
80
88
|
copyWidget(widgetInfo) {
|
|
81
89
|
}
|
|
82
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
83
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaDashboardService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
91
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaDashboardService, providedIn: 'root' }); }
|
|
84
92
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaDashboardService, decorators: [{
|
|
86
94
|
type: Injectable,
|
|
87
95
|
args: [{
|
|
88
96
|
providedIn: 'root'
|
|
@@ -142,6 +150,12 @@ var RAEvent;
|
|
|
142
150
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
143
151
|
/**show inapplicable filter message in global filter flyout */
|
|
144
152
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
153
|
+
/** Bulk Action Clicked */
|
|
154
|
+
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
155
|
+
/** Global Filter Clicked */
|
|
156
|
+
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
157
|
+
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
158
|
+
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
145
159
|
})(RAEvent || (RAEvent = {}));
|
|
146
160
|
var RAEventKey;
|
|
147
161
|
(function (RAEventKey) {
|
|
@@ -155,9 +169,9 @@ const GridsterConfigDefaultSettings = {
|
|
|
155
169
|
margin: 10,
|
|
156
170
|
outerMargin: true,
|
|
157
171
|
outerMarginTop: 10,
|
|
158
|
-
outerMarginRight:
|
|
172
|
+
outerMarginRight: 0,
|
|
159
173
|
outerMarginBottom: 30,
|
|
160
|
-
outerMarginLeft:
|
|
174
|
+
outerMarginLeft: 0,
|
|
161
175
|
useTransformPositioning: true,
|
|
162
176
|
mobileBreakpoint: 640,
|
|
163
177
|
minCols: 10,
|
|
@@ -262,7 +276,7 @@ class RADashboardResponsiveService {
|
|
|
262
276
|
check = true;
|
|
263
277
|
return check;
|
|
264
278
|
}
|
|
265
|
-
getGridsterConfig(isWidgetMgmnt) {
|
|
279
|
+
getGridsterConfig(isWidgetMgmnt, resize, canMove) {
|
|
266
280
|
let config = GridsterConfigDefaultSettings;
|
|
267
281
|
config.minCols = this.currentResInfo.maxCols;
|
|
268
282
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -284,6 +298,13 @@ class RADashboardResponsiveService {
|
|
|
284
298
|
config.swap = true;
|
|
285
299
|
config.draggable.enabled = true;
|
|
286
300
|
}
|
|
301
|
+
if (!resize) {
|
|
302
|
+
config.resizable.enabled = false;
|
|
303
|
+
config.swap = false;
|
|
304
|
+
}
|
|
305
|
+
if (!canMove) {
|
|
306
|
+
config.draggable.enabled = false;
|
|
307
|
+
}
|
|
287
308
|
return config;
|
|
288
309
|
}
|
|
289
310
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -291,6 +312,9 @@ class RADashboardResponsiveService {
|
|
|
291
312
|
if (widget.widgetSettings) {
|
|
292
313
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
293
314
|
}
|
|
315
|
+
if (widget.templateSettings) {
|
|
316
|
+
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
317
|
+
}
|
|
294
318
|
let gridsterItem = {
|
|
295
319
|
cols: this.getWidth(widget.width),
|
|
296
320
|
rows: this.getHeight(widget.height),
|
|
@@ -332,10 +356,10 @@ class RADashboardResponsiveService {
|
|
|
332
356
|
}
|
|
333
357
|
return height;
|
|
334
358
|
}
|
|
335
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
336
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardResponsiveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
360
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardResponsiveService, providedIn: "root" }); }
|
|
337
361
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardResponsiveService, decorators: [{
|
|
339
363
|
type: Injectable,
|
|
340
364
|
args: [{ providedIn: "root" }]
|
|
341
365
|
}], ctorParameters: () => [] });
|
|
@@ -987,10 +1011,10 @@ class GridsterPreviewComponent {
|
|
|
987
1011
|
this.renderer.setStyle(this.el, 'display', '');
|
|
988
1012
|
}
|
|
989
1013
|
}
|
|
990
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
991
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1014
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterPreviewComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1015
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: GridsterPreviewComponent, isStandalone: true, selector: "gridster-preview", inputs: { previewStyle$: "previewStyle$", gridRenderer: "gridRenderer" }, ngImport: i0, template: '', isInline: true, styles: ["gridster-preview{position:absolute;display:none;background:#00000026}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
992
1016
|
}
|
|
993
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterPreviewComponent, decorators: [{
|
|
994
1018
|
type: Component,
|
|
995
1019
|
args: [{ selector: 'gridster-preview', template: '', encapsulation: ViewEncapsulation.None, standalone: true, styles: ["gridster-preview{position:absolute;display:none;background:#00000026}\n"] }]
|
|
996
1020
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { previewStyle$: [{
|
|
@@ -1866,10 +1890,10 @@ class GridsterComponent {
|
|
|
1866
1890
|
}
|
|
1867
1891
|
return 0;
|
|
1868
1892
|
}
|
|
1869
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
1870
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
1893
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterComponent, deps: [{ token: ElementRef }, { token: Renderer2 }, { token: ChangeDetectorRef }, { token: NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1894
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: GridsterComponent, isStandalone: true, selector: "gridster", inputs: { options: "options" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n class=\"gridster-column\"\r\n *ngFor=\"let column of gridColumns; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridColumnStyle(i)\"\r\n></div>\r\n<div\r\n class=\"gridster-row\"\r\n *ngFor=\"let row of gridRows; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridRowStyle(i)\"\r\n></div>\r\n<ng-content></ng-content>\r\n<gridster-preview\r\n [gridRenderer]=\"gridRenderer\"\r\n [previewStyle$]=\"previewStyle$\"\r\n class=\"gridster-preview\"\r\n></gridster-preview>\r\n", styles: ["gridster{position:relative;box-sizing:border-box;background:gray;width:100%;height:100%;-webkit-user-select:none;user-select:none;display:block}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster.gridSize{height:initial;width:initial}gridster.gridSize.fit{height:100%;width:100%}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid white;border-right:1px solid white}gridster .gridster-row{border-top:1px solid white;border-bottom:1px solid white}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: GridsterPreviewComponent, selector: "gridster-preview", inputs: ["previewStyle$", "gridRenderer"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1871
1895
|
}
|
|
1872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
1896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterComponent, decorators: [{
|
|
1873
1897
|
type: Component,
|
|
1874
1898
|
args: [{ selector: 'gridster', encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgForOf, NgStyle, GridsterPreviewComponent], template: "<div\r\n class=\"gridster-column\"\r\n *ngFor=\"let column of gridColumns; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridColumnStyle(i)\"\r\n></div>\r\n<div\r\n class=\"gridster-row\"\r\n *ngFor=\"let row of gridRows; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridRowStyle(i)\"\r\n></div>\r\n<ng-content></ng-content>\r\n<gridster-preview\r\n [gridRenderer]=\"gridRenderer\"\r\n [previewStyle$]=\"previewStyle$\"\r\n class=\"gridster-preview\"\r\n></gridster-preview>\r\n", styles: ["gridster{position:relative;box-sizing:border-box;background:gray;width:100%;height:100%;-webkit-user-select:none;user-select:none;display:block}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster.gridSize{height:initial;width:initial}gridster.gridSize.fit{height:100%;width:100%}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid white;border-right:1px solid white}gridster .gridster-row{border-top:1px solid white;border-bottom:1px solid white}\n"] }]
|
|
1875
1899
|
}], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
|
|
@@ -3580,6 +3604,7 @@ class GridsterItemComponent {
|
|
|
3580
3604
|
}
|
|
3581
3605
|
ngOnDestroy() {
|
|
3582
3606
|
this.gridster.removeItem(this);
|
|
3607
|
+
this.gridster.movingItem = null;
|
|
3583
3608
|
this.drag.destroy();
|
|
3584
3609
|
this.resize.destroy();
|
|
3585
3610
|
this.gridster = this.drag = this.resize = null;
|
|
@@ -3604,6 +3629,7 @@ class GridsterItemComponent {
|
|
|
3604
3629
|
this.item.initCallback(this.item, this);
|
|
3605
3630
|
}
|
|
3606
3631
|
if (this.gridster.options.itemInitCallback) {
|
|
3632
|
+
this.item.curRowHeight = this.gridster.curRowHeight;
|
|
3607
3633
|
this.gridster.options.itemInitCallback(this.item, this);
|
|
3608
3634
|
}
|
|
3609
3635
|
this.itemInit.next({ item: this.item, itemComponent: this });
|
|
@@ -3622,6 +3648,7 @@ class GridsterItemComponent {
|
|
|
3622
3648
|
}
|
|
3623
3649
|
itemChanged() {
|
|
3624
3650
|
if (this.gridster.options.itemChangeCallback) {
|
|
3651
|
+
this.item.curRowHeight = this.gridster.curRowHeight;
|
|
3625
3652
|
this.gridster.options.itemChangeCallback(this.item, this);
|
|
3626
3653
|
}
|
|
3627
3654
|
this.itemChange.next({ item: this.item, itemComponent: this });
|
|
@@ -3708,10 +3735,10 @@ class GridsterItemComponent {
|
|
|
3708
3735
|
}
|
|
3709
3736
|
return 0;
|
|
3710
3737
|
}
|
|
3711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
3738
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterItemComponent, deps: [{ token: ElementRef }, { token: GridsterComponent }, { token: Renderer2 }, { token: NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3739
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: GridsterItemComponent, isStandalone: true, selector: "gridster-item", inputs: { item: "item" }, outputs: { itemInit: "itemInit", itemChange: "itemChange", itemResize: "itemResize" }, host: { properties: { "style.z-index": "this.zIndex" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.s && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-s\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.e && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-e\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.n && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-n\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.w && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-w\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.se && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-se\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.ne && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-ne\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.sw && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-sw\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.nw && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-nw\"\r\n></div>\r\n", styles: ["gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-resizing,gridster-item.gridster-item-moving{transition:0s;z-index:2;box-shadow:0 0 5px 5px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:ns-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:ew-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:ns-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:ew-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3713
3740
|
}
|
|
3714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterItemComponent, decorators: [{
|
|
3715
3742
|
type: Component,
|
|
3716
3743
|
args: [{ selector: 'gridster-item', encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgIf], template: "<ng-content></ng-content>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.s && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-s\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.e && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-e\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.n && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-n\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.w && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-w\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.se && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-se\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.ne && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-ne\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.sw && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-sw\"\r\n></div>\r\n<div\r\n (mousedown)=\"resize.dragStartDelay($event)\"\r\n (touchstart)=\"resize.dragStartDelay($event)\"\r\n *ngIf=\"resize.resizableHandles?.nw && resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-nw\"\r\n></div>\r\n", styles: ["gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-resizing,gridster-item.gridster-item-moving{transition:0s;z-index:2;box-shadow:0 0 5px 5px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:ns-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:ew-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:ns-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:ew-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc}\n"] }]
|
|
3717
3744
|
}], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
|
|
@@ -3767,10 +3794,10 @@ class LockTooltip {
|
|
|
3767
3794
|
this.domService.removeComponent(comp);
|
|
3768
3795
|
});
|
|
3769
3796
|
}
|
|
3770
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
3771
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
3797
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LockTooltip, deps: [{ token: i3.DomService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3798
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: LockTooltip, selector: "ra-lock-tooltip", ngImport: i0, template: "<div class=\"lock-popup-content light widget-config-item\"\r\n [ngStyle]=\"{'top': containerTop,'bottom':containerBottom,'position':'fixed','left':containerLeft,'z-index': '9999','width':'250px','min-height':'fit-content'}\">\r\n <div *ngIf=\"data && !template\">\r\n <label style=\"color: #D9F0FA;\">\r\n {{title}}:\r\n </label>\r\n <div style=\"color: white;\">\r\n <label class=\"bold\" style=\"margin-bottom: 0px;width: 100%;\" *ngFor=\"let item of data\">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr style=\"background-color: white;\">\r\n <div style=\"color: #D9F0FA;\">\r\n <label>{{footer}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!data && template\">\r\n <ng-container *ngTemplateOutlet=\"template\">\r\n </ng-container>\r\n </div>\r\n</div>", styles: [".lock-popup-content{margin-top:8px;position:absolute;right:0;top:79%;box-shadow:0 8px 16px 8px #0003;z-index:899;font-size:12px;min-width:220px!important;min-height:112px;background-color:#219bfd;opacity:.9;padding:15px;color:#fff}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
3772
3799
|
}
|
|
3773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
3800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LockTooltip, decorators: [{
|
|
3774
3801
|
type: Component,
|
|
3775
3802
|
args: [{ selector: 'ra-lock-tooltip', template: "<div class=\"lock-popup-content light widget-config-item\"\r\n [ngStyle]=\"{'top': containerTop,'bottom':containerBottom,'position':'fixed','left':containerLeft,'z-index': '9999','width':'250px','min-height':'fit-content'}\">\r\n <div *ngIf=\"data && !template\">\r\n <label style=\"color: #D9F0FA;\">\r\n {{title}}:\r\n </label>\r\n <div style=\"color: white;\">\r\n <label class=\"bold\" style=\"margin-bottom: 0px;width: 100%;\" *ngFor=\"let item of data\">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr style=\"background-color: white;\">\r\n <div style=\"color: #D9F0FA;\">\r\n <label>{{footer}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!data && template\">\r\n <ng-container *ngTemplateOutlet=\"template\">\r\n </ng-container>\r\n </div>\r\n</div>", styles: [".lock-popup-content{margin-top:8px;position:absolute;right:0;top:79%;box-shadow:0 8px 16px 8px #0003;z-index:899;font-size:12px;min-width:220px!important;min-height:112px;background-color:#219bfd;opacity:.9;padding:15px;color:#fff}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}\n"] }]
|
|
3776
3803
|
}], ctorParameters: () => [{ type: i3.DomService }] });
|
|
@@ -3821,8 +3848,11 @@ class RAWidgetContainer {
|
|
|
3821
3848
|
this.showExcell = true;
|
|
3822
3849
|
this.hideTitle = false;
|
|
3823
3850
|
this.inapplicableFilters = [];
|
|
3851
|
+
this.canLoadData = false;
|
|
3824
3852
|
this.widgetDeleted = new EventEmitter();
|
|
3825
3853
|
this.updateAppliedFilters = new EventEmitter();
|
|
3854
|
+
this.dataLoaded = new EventEmitter();
|
|
3855
|
+
this.widgetLoaded = new EventEmitter();
|
|
3826
3856
|
this.isWidgetStateApplicable = false;
|
|
3827
3857
|
this.widgetEmptyState = '';
|
|
3828
3858
|
this.lockVisible = false;
|
|
@@ -3840,7 +3870,7 @@ class RAWidgetContainer {
|
|
|
3840
3870
|
});
|
|
3841
3871
|
}
|
|
3842
3872
|
ngOnInit() {
|
|
3843
|
-
this.WidgetDisplayName = this.
|
|
3873
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
3844
3874
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
3845
3875
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
3846
3876
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -3856,19 +3886,32 @@ class RAWidgetContainer {
|
|
|
3856
3886
|
});
|
|
3857
3887
|
});
|
|
3858
3888
|
}
|
|
3859
|
-
if (this.widgetElement
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3889
|
+
if (this.widgetElement) {
|
|
3890
|
+
if (changes.bulkActionData && changes.bulkActionData.currentValue != changes.bulkActionData.previousValue) {
|
|
3891
|
+
if (typeof this.widgetElement.bulkActionClicked === "function") {
|
|
3892
|
+
this.widgetElement.bulkActionClicked(this.bulkActionData);
|
|
3893
|
+
}
|
|
3864
3894
|
}
|
|
3865
|
-
|
|
3866
|
-
|
|
3895
|
+
if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
3896
|
+
if (!this.dashboardInfo.curatedFilters) {
|
|
3897
|
+
let filterObj = this.getParsedConfig(this.globalFilter);
|
|
3898
|
+
if (filterObj.WidgetInstanceId) {
|
|
3899
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
3900
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
3901
|
+
}
|
|
3902
|
+
else {
|
|
3903
|
+
//this.refreshWidget(this.data.widgetInfo);
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
if (changes['width'] && changes['width'].currentValue != changes['width'].previousValue ||
|
|
3908
|
+
(changes['height'] && changes['height'].currentValue != changes['height'].previousValue)) {
|
|
3909
|
+
this.invokeWidgetResizedEvent();
|
|
3867
3910
|
}
|
|
3868
3911
|
}
|
|
3869
|
-
if (changes
|
|
3870
|
-
(
|
|
3871
|
-
|
|
3912
|
+
if (changes.canLoadData && changes.canLoadData.currentValue != changes.canLoadData.previousValue) {
|
|
3913
|
+
if (this.canLoadData)
|
|
3914
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
3872
3915
|
}
|
|
3873
3916
|
}
|
|
3874
3917
|
invokeWidgetResizedEvent() {
|
|
@@ -4027,107 +4070,228 @@ class RAWidgetContainer {
|
|
|
4027
4070
|
}
|
|
4028
4071
|
this.detailPageUrl = widgetInfo.detailPageUrl;
|
|
4029
4072
|
let me = this;
|
|
4030
|
-
this.
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
appModule = this.data.widgetInfo.
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
me.
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4073
|
+
this.isCustomElement = false;
|
|
4074
|
+
if (this.isCustomElement) {
|
|
4075
|
+
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, () => {
|
|
4076
|
+
this.setNotConfiguredState(widgetInfo);
|
|
4077
|
+
let appModule = this.data.widgetInfo.widgetName;
|
|
4078
|
+
if (this.data.widgetInfo.applicationModule && this.data.widgetInfo.applicationModule.length > 0) {
|
|
4079
|
+
appModule = this.data.widgetInfo.applicationModule;
|
|
4080
|
+
}
|
|
4081
|
+
this.translateService.loadTranslations(this.appConfig.appManagementBaseUrl, appModule, false).then(() => {
|
|
4082
|
+
me.widgetElement = document.createElement(widgetInfo.customTag);
|
|
4083
|
+
me.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
4084
|
+
let handler = function (event) {
|
|
4085
|
+
setTimeout(async () => {
|
|
4086
|
+
me.widgetElement.addEventListener('on-widget-respond', (e) => {
|
|
4087
|
+
var type = e.detail.type;
|
|
4088
|
+
switch (type) {
|
|
4089
|
+
case 'onDataLoad':
|
|
4090
|
+
if (e.detail.data)
|
|
4091
|
+
me.showPanel = true;
|
|
4092
|
+
else
|
|
4093
|
+
me.showPanel = false;
|
|
4094
|
+
if (!me.data.dataLoaded) {
|
|
4095
|
+
me.data.dataLoaded = true;
|
|
4096
|
+
me.dataLoaded.emit(me.widgetElement);
|
|
4097
|
+
}
|
|
4098
|
+
break;
|
|
4099
|
+
case 'onConfigEditClicked':
|
|
4100
|
+
me.editWidget();
|
|
4101
|
+
break;
|
|
4102
|
+
case 'onEnableDefaultState':
|
|
4103
|
+
me.setEmptyState(e.detail.data);
|
|
4104
|
+
break;
|
|
4105
|
+
case 'onSetTitleUnderline':
|
|
4106
|
+
if (e.detail.data == true)
|
|
4107
|
+
me.enableTitleLine = true;
|
|
4108
|
+
else
|
|
4109
|
+
me.enableTitleLine = me.enableTitleLineActual;
|
|
4110
|
+
break;
|
|
4111
|
+
case 'onWidgetTitleHidden':
|
|
4112
|
+
if (e.detail.data == true)
|
|
4113
|
+
me.hideTitle = true;
|
|
4114
|
+
else
|
|
4115
|
+
me.hideTitle = false;
|
|
4116
|
+
break;
|
|
4117
|
+
case 'onUpdateLockData':
|
|
4118
|
+
me.setLock(e.detail.data);
|
|
4119
|
+
break;
|
|
4120
|
+
case 'onGlobalFilterApplicableCheck':
|
|
4121
|
+
me.setInapplicableFilters(e.detail.data, widgetInfo.widgetInstanceId);
|
|
4122
|
+
break;
|
|
4123
|
+
default:
|
|
4124
|
+
break;
|
|
4125
|
+
}
|
|
4126
|
+
});
|
|
4127
|
+
if (typeof (me.widgetElement.titleLineEnabled) != 'undefined') {
|
|
4128
|
+
let titleLineEnabled = me.widgetElement.titleLineEnabled();
|
|
4129
|
+
if (titleLineEnabled) {
|
|
4130
|
+
me.enableTitleLine = titleLineEnabled;
|
|
4131
|
+
me.enableTitleLineActual = titleLineEnabled;
|
|
4132
|
+
}
|
|
4133
|
+
}
|
|
4134
|
+
me.editText = me.translateService.translate('Common.edit');
|
|
4135
|
+
if (me.translateService.translate('Common.edit').length > 6) {
|
|
4136
|
+
me.editText = (me.translateService.translate('Common.edit').substring(0, 6) + '...');
|
|
4137
|
+
me.editToolTipValue = me.translateService.translate('Common.edit');
|
|
4138
|
+
me.editToolTipWidth = "300px";
|
|
4139
|
+
}
|
|
4140
|
+
me.copyText = me.translateService.translate('Common.copy');
|
|
4141
|
+
if (me.translateService.translate('Common.copy').length > 6) {
|
|
4142
|
+
me.copyText = (me.translateService.translate('Common.copy').substring(0, 6) + '...');
|
|
4143
|
+
me.copyToolTipValue = me.translateService.translate('Common.copy');
|
|
4144
|
+
me.copyToolTipWidth = "300px";
|
|
4145
|
+
}
|
|
4146
|
+
me.moveText = me.translateService.translate('Common.move');
|
|
4147
|
+
if (me.translateService.translate('Common.move').length > 6) {
|
|
4148
|
+
me.moveText = (me.translateService.translate('Common.move').substring(0, 6) + '...');
|
|
4149
|
+
me.moveToolTipValue = me.translateService.translate('Common.move');
|
|
4150
|
+
me.moveToolTipWidth = "300px";
|
|
4151
|
+
}
|
|
4152
|
+
me.excelText = me.translateService.translate('Common.excel');
|
|
4153
|
+
if (me.translateService.translate('Common.excel').length > 6) {
|
|
4154
|
+
me.excelText = (me.translateService.translate('Common.excel').substring(0, 6) + '...');
|
|
4155
|
+
me.excelToolTipValue = me.translateService.translate('Common.excel');
|
|
4156
|
+
me.excelToolTipWidth = "300px";
|
|
4157
|
+
}
|
|
4158
|
+
me.deleteText = me.translateService.translate('Common.delete');
|
|
4159
|
+
if (me.translateService.translate('Common.delete').length > 6) {
|
|
4160
|
+
me.deleteText = (me.translateService.translate('Common.delete').substring(0, 6) + '...');
|
|
4161
|
+
me.deleteToolTipValue = me.translateService.translate('Common.delete');
|
|
4162
|
+
me.deleteToolTipWidth = "300px";
|
|
4076
4163
|
}
|
|
4164
|
+
me.isWidgetLoaded = true;
|
|
4165
|
+
widgetConfigFilter.appConfig = me.appConfig;
|
|
4166
|
+
widgetConfigFilter.widgetInfo = widgetInfo;
|
|
4167
|
+
widgetConfigFilter.configChanges = me.getConfigChanges(false);
|
|
4168
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
4169
|
+
widgetConfigFilter.globalFilter = me.globalFilter;
|
|
4170
|
+
widgetConfigFilter.dashboardInfo = me.dashboardInfo;
|
|
4171
|
+
//this.widgetElement.loadContent(widgetConfigFilter);
|
|
4172
|
+
me.widgetLoaded.emit();
|
|
4173
|
+
await me.setLock(widgetConfigFilter.config);
|
|
4174
|
+
await me.setDownloadIcon();
|
|
4077
4175
|
});
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4176
|
+
}.bind(this);
|
|
4177
|
+
this.widgetElementHandler = handler;
|
|
4178
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, handler);
|
|
4179
|
+
this.ctlWidget.nativeElement.appendChild(this.widgetElement);
|
|
4180
|
+
});
|
|
4181
|
+
});
|
|
4182
|
+
}
|
|
4183
|
+
else {
|
|
4184
|
+
widgetInfo.scriptUrl = '/assets/widgets/document/ra-document-widget/main.js';
|
|
4185
|
+
widgetInfo.component = 'RADocumentwidgetComponent';
|
|
4186
|
+
loadRemoteModule({
|
|
4187
|
+
type: 'module',
|
|
4188
|
+
remoteEntry: widgetInfo.scriptUrl,
|
|
4189
|
+
exposedModule: './' + widgetInfo.component
|
|
4190
|
+
}).then((m) => {
|
|
4191
|
+
var component = me.ctlWidgetModule.createComponent(m[widgetInfo.component]);
|
|
4192
|
+
let instance = component.instance;
|
|
4193
|
+
let widgetElement = component.location.nativeElement;
|
|
4194
|
+
this.setNotConfiguredState(widgetInfo);
|
|
4195
|
+
let appModule = this.data.widgetInfo.widgetName;
|
|
4196
|
+
if (this.data.widgetInfo.applicationModule && this.data.widgetInfo.applicationModule.length > 0) {
|
|
4197
|
+
appModule = this.data.widgetInfo.applicationModule;
|
|
4198
|
+
}
|
|
4199
|
+
this.translateService.loadTranslations(this.appConfig.appManagementBaseUrl, appModule, false).then(() => {
|
|
4200
|
+
me.widgetElement = widgetElement;
|
|
4201
|
+
me.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
4202
|
+
instance.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
4203
|
+
let handler = function (event) {
|
|
4204
|
+
setTimeout(async () => {
|
|
4205
|
+
instance.onWidgetRespond.subscribe((e) => {
|
|
4206
|
+
var type = e.type;
|
|
4207
|
+
switch (type) {
|
|
4208
|
+
case 'onDataLoad':
|
|
4209
|
+
if (e.data)
|
|
4210
|
+
me.showPanel = true;
|
|
4211
|
+
else
|
|
4212
|
+
me.showPanel = false;
|
|
4213
|
+
break;
|
|
4214
|
+
case 'onConfigEditClicked':
|
|
4215
|
+
me.editWidget();
|
|
4216
|
+
break;
|
|
4217
|
+
case 'onEnableDefaultState':
|
|
4218
|
+
me.setEmptyState(e.data);
|
|
4219
|
+
break;
|
|
4220
|
+
case 'onSetTitleUnderline':
|
|
4221
|
+
if (e.data == true)
|
|
4222
|
+
me.enableTitleLine = true;
|
|
4223
|
+
else
|
|
4224
|
+
me.enableTitleLine = me.enableTitleLineActual;
|
|
4225
|
+
break;
|
|
4226
|
+
case 'onWidgetTitleHidden':
|
|
4227
|
+
if (e.data == true)
|
|
4228
|
+
me.hideTitle = true;
|
|
4229
|
+
else
|
|
4230
|
+
me.hideTitle = false;
|
|
4231
|
+
break;
|
|
4232
|
+
case 'onUpdateLockData':
|
|
4233
|
+
me.setLock(e.data);
|
|
4234
|
+
break;
|
|
4235
|
+
case 'onGlobalFilterApplicableCheck':
|
|
4236
|
+
me.setInapplicableFilters(e.data, widgetInfo.widgetInstanceId);
|
|
4237
|
+
break;
|
|
4238
|
+
default:
|
|
4239
|
+
break;
|
|
4240
|
+
}
|
|
4241
|
+
});
|
|
4242
|
+
if (typeof (me.widgetElement.titleLineEnabled) != 'undefined') {
|
|
4243
|
+
let titleLineEnabled = me.widgetElement.titleLineEnabled();
|
|
4244
|
+
if (titleLineEnabled) {
|
|
4245
|
+
me.enableTitleLine = titleLineEnabled;
|
|
4246
|
+
me.enableTitleLineActual = titleLineEnabled;
|
|
4247
|
+
}
|
|
4083
4248
|
}
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
});
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
this.ctlWidget.nativeElement.appendChild(this.widgetElement);
|
|
4249
|
+
me.editText = me.translateService.translate('Common.edit');
|
|
4250
|
+
if (me.translateService.translate('Common.edit').length > 6) {
|
|
4251
|
+
me.editText = (me.translateService.translate('Common.edit').substring(0, 6) + '...');
|
|
4252
|
+
me.editToolTipValue = me.translateService.translate('Common.edit');
|
|
4253
|
+
me.editToolTipWidth = "300px";
|
|
4254
|
+
}
|
|
4255
|
+
me.copyText = me.translateService.translate('Common.copy');
|
|
4256
|
+
if (me.translateService.translate('Common.copy').length > 6) {
|
|
4257
|
+
me.copyText = (me.translateService.translate('Common.copy').substring(0, 6) + '...');
|
|
4258
|
+
me.copyToolTipValue = me.translateService.translate('Common.copy');
|
|
4259
|
+
me.copyToolTipWidth = "300px";
|
|
4260
|
+
}
|
|
4261
|
+
me.moveText = me.translateService.translate('Common.move');
|
|
4262
|
+
if (me.translateService.translate('Common.move').length > 6) {
|
|
4263
|
+
me.moveText = (me.translateService.translate('Common.move').substring(0, 6) + '...');
|
|
4264
|
+
me.moveToolTipValue = me.translateService.translate('Common.move');
|
|
4265
|
+
me.moveToolTipWidth = "300px";
|
|
4266
|
+
}
|
|
4267
|
+
me.excelText = me.translateService.translate('Common.excel');
|
|
4268
|
+
if (me.translateService.translate('Common.excel').length > 6) {
|
|
4269
|
+
me.excelText = (me.translateService.translate('Common.excel').substring(0, 6) + '...');
|
|
4270
|
+
me.excelToolTipValue = me.translateService.translate('Common.excel');
|
|
4271
|
+
me.excelToolTipWidth = "300px";
|
|
4272
|
+
}
|
|
4273
|
+
me.deleteText = me.translateService.translate('Common.delete');
|
|
4274
|
+
if (me.translateService.translate('Common.delete').length > 6) {
|
|
4275
|
+
me.deleteText = (me.translateService.translate('Common.delete').substring(0, 6) + '...');
|
|
4276
|
+
me.deleteToolTipValue = me.translateService.translate('Common.delete');
|
|
4277
|
+
me.deleteToolTipWidth = "300px";
|
|
4278
|
+
}
|
|
4279
|
+
me.isWidgetLoaded = true;
|
|
4280
|
+
widgetConfigFilter.appConfig = me.appConfig;
|
|
4281
|
+
widgetConfigFilter.widgetInfo = widgetInfo;
|
|
4282
|
+
widgetConfigFilter.configChanges = me.getConfigChanges(false);
|
|
4283
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
4284
|
+
widgetConfigFilter.globalFilter = me.globalFilter;
|
|
4285
|
+
instance.loadContent(widgetConfigFilter);
|
|
4286
|
+
await me.setLock(widgetConfigFilter.config);
|
|
4287
|
+
await me.setDownloadIcon();
|
|
4288
|
+
});
|
|
4289
|
+
}.bind(this);
|
|
4290
|
+
this.widgetElementHandler = handler;
|
|
4291
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, handler);
|
|
4292
|
+
});
|
|
4129
4293
|
});
|
|
4130
|
-
}
|
|
4294
|
+
}
|
|
4131
4295
|
}
|
|
4132
4296
|
/**To set Default State for the widget when it is not configured */
|
|
4133
4297
|
setNotConfiguredState(widgetInfo, forceEnable = false) {
|
|
@@ -4183,7 +4347,8 @@ class RAWidgetContainer {
|
|
|
4183
4347
|
globalFilter: this.globalFilter,
|
|
4184
4348
|
appConfig: this.appConfig,
|
|
4185
4349
|
widgetInfo: widgetInfo,
|
|
4186
|
-
configChanges: this.getConfigChanges(configChanged)
|
|
4350
|
+
configChanges: this.getConfigChanges(configChanged),
|
|
4351
|
+
dashboardInfo: this.dashboardInfo
|
|
4187
4352
|
};
|
|
4188
4353
|
if (widgetContainerContext.isWidgetLoaded) {
|
|
4189
4354
|
if (this.widgetElement && typeof (this.widgetElement.setConfigFilter) == 'function') {
|
|
@@ -4345,9 +4510,12 @@ class RAWidgetContainer {
|
|
|
4345
4510
|
let html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
4346
4511
|
let settings = '';
|
|
4347
4512
|
if (this.isWidgetMgmnt) {
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4513
|
+
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideEdit)
|
|
4514
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
4515
|
+
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideCopy)
|
|
4516
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
4517
|
+
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
4518
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
4351
4519
|
}
|
|
4352
4520
|
let customPageParams = false;
|
|
4353
4521
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -4356,14 +4524,14 @@ class RAWidgetContainer {
|
|
|
4356
4524
|
customPageParams = true;
|
|
4357
4525
|
}
|
|
4358
4526
|
}
|
|
4359
|
-
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
4527
|
+
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
4360
4528
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
4361
4529
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
4362
4530
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
4363
4531
|
settings += this.translateService.translate('Common.visitpage');
|
|
4364
4532
|
settings += '</span></a>';
|
|
4365
4533
|
}
|
|
4366
|
-
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
4534
|
+
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
4367
4535
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
4368
4536
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
4369
4537
|
html += settings;
|
|
@@ -4395,7 +4563,7 @@ class RAWidgetContainer {
|
|
|
4395
4563
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
4396
4564
|
html += this.getHr();
|
|
4397
4565
|
}
|
|
4398
|
-
if (this.isWidgetMgmnt) {
|
|
4566
|
+
if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
|
|
4399
4567
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
4400
4568
|
html += this.deleteText;
|
|
4401
4569
|
html += '</span></a>';
|
|
@@ -4474,15 +4642,34 @@ class RAWidgetContainer {
|
|
|
4474
4642
|
if (this.currentComponent)
|
|
4475
4643
|
this.popupInstance.removeMe(this.currentComponent);
|
|
4476
4644
|
}
|
|
4477
|
-
|
|
4478
|
-
|
|
4645
|
+
getwidgetTitleTranslation(item) {
|
|
4646
|
+
let rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
4647
|
+
let translatedString = '';
|
|
4648
|
+
if (this.dashboardService.clientId) {
|
|
4649
|
+
const translationModule = this.dashboardService.clientId + '_DBW';
|
|
4650
|
+
translatedString = this.translateService.translate(translationModule + '.' + rKey);
|
|
4651
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
4652
|
+
return item;
|
|
4653
|
+
}
|
|
4654
|
+
else {
|
|
4655
|
+
return translatedString;
|
|
4656
|
+
}
|
|
4657
|
+
}
|
|
4658
|
+
else
|
|
4659
|
+
return item;
|
|
4660
|
+
}
|
|
4661
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RAWidgetContainer, deps: [{ token: RaDashboardService }, { token: i2$1.NgxUiLoaderService }, { token: i3.RATranslateService }, { token: i0.NgZone }, { token: i4.NotifierService }, { token: i0.Renderer2 }, { token: i3.RAPermissionService }, { token: i3.DomService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4662
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: RAWidgetContainer, selector: "ra-widget-container", inputs: { widgetInstanceId: ["widget-instance-id", "widgetInstanceId"], globalFilter: ["global-filter", "globalFilter"], dashboardInfo: ["dashboard-info", "dashboardInfo"], data: "data", raDashboardEventBus: ["event-bus", "raDashboardEventBus"], appConfig: ["app-config", "appConfig"], width: ["widget-width", "width"], height: ["widget-height", "height"], gridCellHeight: ["grid-cell-height", "gridCellHeight"], bulkActionData: ["bulk-action-data", "bulkActionData"], canLoadData: "canLoadData", setResized: ["dom-resized", "setResized"] }, outputs: { widgetDeleted: "widgetDeleted", updateAppliedFilters: "updateAppliedFilters", dataLoaded: "dataLoaded", widgetLoaded: "widgetLoaded" }, viewQueries: [{ propertyName: "ctlWidget", first: true, predicate: ["ctlWidget"], descendants: true }, { propertyName: "ctlWidgetModule", first: true, predicate: ["ctlWidgetModule"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "widgetDropdown", first: true, predicate: ["widgetDropdown"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "wcWrapper", first: true, predicate: ["wcWrapper"], descendants: true }, { propertyName: "banPopupDiv", first: true, predicate: ["banPopupDiv"], descendants: true }, { propertyName: "lockPopupDiv", first: true, predicate: ["lockPopupDiv"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #wcWrapper class=\"wc-wrapper\" (mouseenter)=\"mouseHover(true)\" (mouseleave)=\"mouseHover(false)\"\r\n [ngStyle]=\"{'margin-left': noPadding?'0px':'15px','margin-right': noPadding?'0px':'15px'}\">\r\n <div class=\"wcheader widget-move\" *ngIf=\"!hideTitle\"\r\n [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\r\n <div class=\"col-md-12 wc-mover\" style=\"padding-left: 0px;height:inherit;padding-right: 0px;\">\r\n <div style=\"display:flex;margin-top:10px;\"\r\n [ngStyle]=\"{'margin-left': noPadding?'15px':'0px','margin-right': noPadding?'15px':'0px'}\">\r\n <div class=\"col-9 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div [hidden]=\"hideTitle\" style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\"\r\n (mouseover)=\"mouseOver($event)\" #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class=\"col-3\" style=\"cursor:default;padding-right: 0px;\"> \r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div #banPopupDiv (mouseover)=\"openPopup(inapplicableIconTitle,inapplicableFilters,inapplicableIconFooter,'innaplicable')\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!inapplicableFilters || inapplicableFilters.length == 0 || !globalFilter || globalFilter == '{}'\">\r\n <i class=\"fal fa-ban lock\"></i> \r\n </div>\r\n <div #lockPopupDiv (mouseover)=\"openPopup(lockIconTitle,lockDetails,lockIconFooter,'lock',lockTemplateInfo)\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!lockDetails && !lockTemplateInfo\">\r\n <i class=\"fal fa-lock lock\"></i> \r\n </div>\r\n <div class=\"widget-menu\" style=\"width:10px;\"\r\n [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" #widgetDropdown class=\"fal fa-ellipsis-v widget-menu-ellipse\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hideTitle\" class=\"wcheader widget-move\"\r\n style=\"height: 45px;width: 95%;cursor: move;z-index: 99;opacity: 0;\">\r\n </div>\r\n <div *ngIf=\"hideTitle\" class=\"widget-menu widget-menu-title-hidden\" [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" class=\"fal fa-ellipsis-v\" style=\"text-align: center;\"></i>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\" [ngStyle]=\"{'bottom': noPadding?'0px':'10px','top':hideTitle?'10px':'46px'}\">\r\n <div [hidden]=\"isWidgetStateApplicable\" class=\"m-fadeOut widget-overlay\" [ngClass]=\"{'m-fadeIn': showPanel}\">\r\n <div class=\"lds-roller\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n <div class=\"wc\" [hidden]=\"isWidgetStateApplicable\">\r\n <div [hidden]=\"!isCustomElement\" #ctlWidget></div>\r\n <div [hidden]=\"isCustomElement\">\r\n <ng-container #ctlWidgetModule></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isWidgetStateApplicable\" class=\"defaultConfig\">\r\n <ra-widget-state style=\"width: 100%;height: 100%;\" [isWidgetStateApplicable]=\"isWidgetStateApplicable\"\r\n [isGlobalFilterApplied]=\"isGlobalFilterApplied\" [widgetEmptyState]=\"widgetEmptyState\"\r\n (editWidgetClicked)=editWidget() [widthCol]=\"width\" [heightCol]=\"height\">\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i6.TooltipControl, selector: "ra-tooltip", inputs: ["data", "url", "value", "key", "dataField", "position", "width", "count", "moreItemText", "reset", "disable-tooltip", "set-top-padding"], outputs: ["dataLoaded"] }, { kind: "component", type: i6.WidgetStateControl, selector: "ra-widget-state", inputs: ["isWidgetStateApplicable", "isGlobalFilterApplied", "widgetEmptyState", "widgetEmptyDataText", "widthCol", "heightCol"], outputs: ["editWidgetClicked"] }] }); }
|
|
4479
4663
|
}
|
|
4480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
4664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RAWidgetContainer, decorators: [{
|
|
4481
4665
|
type: Component,
|
|
4482
|
-
args: [{ selector: 'ra-widget-container', template: "<div #wcWrapper class=\"wc-wrapper\" (mouseenter)=\"mouseHover(true)\" (mouseleave)=\"mouseHover(false)\"\r\n [ngStyle]=\"{'margin-left': noPadding?'0px':'15px','margin-right': noPadding?'0px':'15px'}\">\r\n <div class=\"wcheader widget-move\" *ngIf=\"!hideTitle\"\r\n [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\r\n <div class=\"col-md-12 wc-mover\" style=\"padding-left: 0px;height:inherit;padding-right: 0px;\">\r\n <div style=\"display:flex;margin-top:10px;\"\r\n [ngStyle]=\"{'margin-left': noPadding?'15px':'0px','margin-right': noPadding?'15px':'0px'}\">\r\n <div class=\"col-9 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div [hidden]=\"hideTitle\" style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\"\r\n (mouseover)=\"mouseOver($event)\" #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class=\"col-3\" style=\"cursor:default;padding-right: 0px;\"> \r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div #banPopupDiv (mouseover)=\"openPopup(inapplicableIconTitle,inapplicableFilters,inapplicableIconFooter,'innaplicable')\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!inapplicableFilters || inapplicableFilters.length == 0 || !globalFilter || globalFilter == '{}'\">\r\n <i class=\"fal fa-ban lock\"></i> \r\n </div>\r\n <div #lockPopupDiv (mouseover)=\"openPopup(lockIconTitle,lockDetails,lockIconFooter,'lock',lockTemplateInfo)\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!lockDetails && !lockTemplateInfo\">\r\n <i class=\"fal fa-lock lock\"></i> \r\n </div>\r\n <div class=\"widget-menu\" style=\"width:10px;\"\r\n [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" #widgetDropdown class=\"fal fa-ellipsis-v widget-menu-ellipse\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hideTitle\" class=\"wcheader widget-move\"\r\n style=\"height: 45px;width: 95%;cursor: move;z-index: 99;opacity: 0;\">\r\n </div>\r\n <div *ngIf=\"hideTitle\" class=\"widget-menu widget-menu-title-hidden\" [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" class=\"fal fa-ellipsis-v\" style=\"text-align: center;\"></i>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\" [ngStyle]=\"{'bottom': noPadding?'0px':'10px','top':hideTitle?'10px':'46px'}\">\r\n <div [hidden]=\"isWidgetStateApplicable\" class=\"m-fadeOut widget-overlay\" [ngClass]=\"{'m-fadeIn': showPanel}\">\r\n <div class=\"lds-roller\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n <div class=\"wc\" [hidden]=\"isWidgetStateApplicable\">\r\n <div #ctlWidget></div>\r\n </div>\r\n <div *ngIf=\"isWidgetStateApplicable\" class=\"defaultConfig\">\r\n <ra-widget-state style=\"width: 100%;height: 100%;\" [isWidgetStateApplicable]=\"isWidgetStateApplicable\"\r\n [isGlobalFilterApplied]=\"isGlobalFilterApplied\" [widgetEmptyState]=\"widgetEmptyState\"\r\n (editWidgetClicked)=editWidget() [widthCol]=\"width\" [heightCol]=\"height\">\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
4666
|
+
args: [{ selector: 'ra-widget-container', template: "<div #wcWrapper class=\"wc-wrapper\" (mouseenter)=\"mouseHover(true)\" (mouseleave)=\"mouseHover(false)\"\r\n [ngStyle]=\"{'margin-left': noPadding?'0px':'15px','margin-right': noPadding?'0px':'15px'}\">\r\n <div class=\"wcheader widget-move\" *ngIf=\"!hideTitle\"\r\n [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\r\n <div class=\"col-md-12 wc-mover\" style=\"padding-left: 0px;height:inherit;padding-right: 0px;\">\r\n <div style=\"display:flex;margin-top:10px;\"\r\n [ngStyle]=\"{'margin-left': noPadding?'15px':'0px','margin-right': noPadding?'15px':'0px'}\">\r\n <div class=\"col-9 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div [hidden]=\"hideTitle\" style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\"\r\n (mouseover)=\"mouseOver($event)\" #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class=\"col-3\" style=\"cursor:default;padding-right: 0px;\"> \r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div #banPopupDiv (mouseover)=\"openPopup(inapplicableIconTitle,inapplicableFilters,inapplicableIconFooter,'innaplicable')\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!inapplicableFilters || inapplicableFilters.length == 0 || !globalFilter || globalFilter == '{}'\">\r\n <i class=\"fal fa-ban lock\"></i> \r\n </div>\r\n <div #lockPopupDiv (mouseover)=\"openPopup(lockIconTitle,lockDetails,lockIconFooter,'lock',lockTemplateInfo)\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!lockDetails && !lockTemplateInfo\">\r\n <i class=\"fal fa-lock lock\"></i> \r\n </div>\r\n <div class=\"widget-menu\" style=\"width:10px;\"\r\n [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" #widgetDropdown class=\"fal fa-ellipsis-v widget-menu-ellipse\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hideTitle\" class=\"wcheader widget-move\"\r\n style=\"height: 45px;width: 95%;cursor: move;z-index: 99;opacity: 0;\">\r\n </div>\r\n <div *ngIf=\"hideTitle\" class=\"widget-menu widget-menu-title-hidden\" [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" class=\"fal fa-ellipsis-v\" style=\"text-align: center;\"></i>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\" [ngStyle]=\"{'bottom': noPadding?'0px':'10px','top':hideTitle?'10px':'46px'}\">\r\n <div [hidden]=\"isWidgetStateApplicable\" class=\"m-fadeOut widget-overlay\" [ngClass]=\"{'m-fadeIn': showPanel}\">\r\n <div class=\"lds-roller\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n <div class=\"wc\" [hidden]=\"isWidgetStateApplicable\">\r\n <div [hidden]=\"!isCustomElement\" #ctlWidget></div>\r\n <div [hidden]=\"isCustomElement\">\r\n <ng-container #ctlWidgetModule></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isWidgetStateApplicable\" class=\"defaultConfig\">\r\n <ra-widget-state style=\"width: 100%;height: 100%;\" [isWidgetStateApplicable]=\"isWidgetStateApplicable\"\r\n [isGlobalFilterApplied]=\"isGlobalFilterApplied\" [widgetEmptyState]=\"widgetEmptyState\"\r\n (editWidgetClicked)=editWidget() [widthCol]=\"width\" [heightCol]=\"height\">\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
4483
4667
|
}], ctorParameters: () => [{ type: RaDashboardService }, { type: i2$1.NgxUiLoaderService }, { type: i3.RATranslateService }, { type: i0.NgZone }, { type: i4.NotifierService }, { type: i0.Renderer2 }, { type: i3.RAPermissionService }, { type: i3.DomService }], propDecorators: { ctlWidget: [{
|
|
4484
4668
|
type: ViewChild,
|
|
4485
4669
|
args: ['ctlWidget', { static: false }]
|
|
4670
|
+
}], ctlWidgetModule: [{
|
|
4671
|
+
type: ViewChild,
|
|
4672
|
+
args: ['ctlWidgetModule', { read: ViewContainerRef, static: true }]
|
|
4486
4673
|
}], widgetDropdown: [{
|
|
4487
4674
|
type: ViewChild,
|
|
4488
4675
|
args: ['widgetDropdown', { static: false }]
|
|
@@ -4504,6 +4691,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
|
|
|
4504
4691
|
}], globalFilter: [{
|
|
4505
4692
|
type: Input,
|
|
4506
4693
|
args: ['global-filter']
|
|
4694
|
+
}], dashboardInfo: [{
|
|
4695
|
+
type: Input,
|
|
4696
|
+
args: ['dashboard-info']
|
|
4507
4697
|
}], data: [{
|
|
4508
4698
|
type: Input,
|
|
4509
4699
|
args: ['data']
|
|
@@ -4522,10 +4712,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
|
|
|
4522
4712
|
}], gridCellHeight: [{
|
|
4523
4713
|
type: Input,
|
|
4524
4714
|
args: ['grid-cell-height']
|
|
4715
|
+
}], bulkActionData: [{
|
|
4716
|
+
type: Input,
|
|
4717
|
+
args: ['bulk-action-data']
|
|
4718
|
+
}], canLoadData: [{
|
|
4719
|
+
type: Input
|
|
4525
4720
|
}], widgetDeleted: [{
|
|
4526
4721
|
type: Output
|
|
4527
4722
|
}], updateAppliedFilters: [{
|
|
4528
4723
|
type: Output
|
|
4724
|
+
}], dataLoaded: [{
|
|
4725
|
+
type: Output
|
|
4726
|
+
}], widgetLoaded: [{
|
|
4727
|
+
type: Output
|
|
4529
4728
|
}], setResized: [{
|
|
4530
4729
|
type: Input,
|
|
4531
4730
|
args: ['dom-resized']
|
|
@@ -4549,13 +4748,20 @@ class RADashboardArea {
|
|
|
4549
4748
|
this.domResized = false;
|
|
4550
4749
|
this.showEmptyDashboard = false;
|
|
4551
4750
|
this.isWidgetMgmnt = false;
|
|
4751
|
+
this.initialWidgetCount = 10;
|
|
4752
|
+
this.currentLoadedIndex = 0;
|
|
4753
|
+
this.loading = false;
|
|
4552
4754
|
this.widgetHeight = 2;
|
|
4553
4755
|
this.widgetWidth = 4;
|
|
4554
4756
|
this.hideDashboardBanner = new EventEmitter();
|
|
4555
4757
|
}
|
|
4556
4758
|
ngOnInit() {
|
|
4759
|
+
window.addEventListener('scroll', () => {
|
|
4760
|
+
this.loadNext();
|
|
4761
|
+
});
|
|
4557
4762
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
4558
4763
|
this.initiateGridsterConfig();
|
|
4764
|
+
this.setEmptyDashboardConfig();
|
|
4559
4765
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
4560
4766
|
this.responsiveService.resized.subscribe((isDesktop) => {
|
|
4561
4767
|
if (this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -4584,6 +4790,11 @@ class RADashboardArea {
|
|
|
4584
4790
|
}, 100);
|
|
4585
4791
|
}
|
|
4586
4792
|
});
|
|
4793
|
+
setTimeout(() => {
|
|
4794
|
+
this.bulkActionClick = this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe((data) => {
|
|
4795
|
+
this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
4796
|
+
});
|
|
4797
|
+
});
|
|
4587
4798
|
}
|
|
4588
4799
|
ngOnChanges(changes) {
|
|
4589
4800
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -4591,27 +4802,43 @@ class RADashboardArea {
|
|
|
4591
4802
|
this.isWidgetLoaded = true;
|
|
4592
4803
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
4593
4804
|
}
|
|
4805
|
+
this.initiateGridsterConfig();
|
|
4594
4806
|
if (changes['raDashboardEventBus'] && changes['raDashboardEventBus'].currentValue != changes['raDashboardEventBus'].previousValue) {
|
|
4595
4807
|
this.inititateEventBusSubscritions();
|
|
4596
4808
|
}
|
|
4597
4809
|
}
|
|
4810
|
+
setEmptyDashboardConfig() {
|
|
4811
|
+
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
4812
|
+
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
4813
|
+
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
4814
|
+
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
4815
|
+
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
4816
|
+
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
4817
|
+
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
4818
|
+
}
|
|
4819
|
+
}
|
|
4598
4820
|
/**To set GridsterConfig */
|
|
4599
4821
|
initiateGridsterConfig() {
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
};
|
|
4607
|
-
this.options.itemChangeCallback = (item) => {
|
|
4608
|
-
if (this.responsiveService.IsDesktopView) {
|
|
4609
|
-
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
4610
|
-
this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
4822
|
+
if (this.dashboardInfo) {
|
|
4823
|
+
/**To override default configuration values to the gridster control */
|
|
4824
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt, this.dashboardInfo.templateConfig.widget.canResize, this.dashboardInfo.templateConfig.widget.canMove);
|
|
4825
|
+
this.options.initCallback = (gridster) => {
|
|
4826
|
+
if (this.options.api) {
|
|
4827
|
+
this.gridcellHeight = this.options.api.getCurrentRowHeight();
|
|
4611
4828
|
}
|
|
4612
|
-
}
|
|
4613
|
-
this.
|
|
4614
|
-
|
|
4829
|
+
};
|
|
4830
|
+
this.options.itemChangeCallback = (item) => {
|
|
4831
|
+
if (this.responsiveService.IsDesktopView) {
|
|
4832
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
4833
|
+
this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
4834
|
+
}
|
|
4835
|
+
}
|
|
4836
|
+
this.setAreaHeight();
|
|
4837
|
+
};
|
|
4838
|
+
}
|
|
4839
|
+
}
|
|
4840
|
+
widgetLoaded(widget) {
|
|
4841
|
+
widget.canLoadData = true;
|
|
4615
4842
|
}
|
|
4616
4843
|
/** To initiate eventbus subsctiptions */
|
|
4617
4844
|
inititateEventBusSubscritions() {
|
|
@@ -4630,6 +4857,11 @@ class RADashboardArea {
|
|
|
4630
4857
|
this.addWidget(e);
|
|
4631
4858
|
});
|
|
4632
4859
|
});
|
|
4860
|
+
this.curatedFilterChange = this.raDashboardEventBus.subscribe(RAEvent.CuratedFilterChange).subscribe((e) => {
|
|
4861
|
+
this.ngZone.run(() => {
|
|
4862
|
+
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
4863
|
+
});
|
|
4864
|
+
});
|
|
4633
4865
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe((e) => {
|
|
4634
4866
|
this.ngZone.run(() => {
|
|
4635
4867
|
this.rearrangeWidgets();
|
|
@@ -4678,6 +4910,10 @@ class RADashboardArea {
|
|
|
4678
4910
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
4679
4911
|
if (this.rearrangeWidgetClick)
|
|
4680
4912
|
this.rearrangeWidgetClick.unsubscribe();
|
|
4913
|
+
if (this.curatedFilterChange)
|
|
4914
|
+
this.curatedFilterChange.unsubscribe();
|
|
4915
|
+
if (this.bulkActionClick)
|
|
4916
|
+
this.bulkActionClick.unsubscribe();
|
|
4681
4917
|
}
|
|
4682
4918
|
/**To update position/dimention of all widgets in the area */
|
|
4683
4919
|
updateWidgets() {
|
|
@@ -4713,6 +4949,13 @@ class RADashboardArea {
|
|
|
4713
4949
|
}
|
|
4714
4950
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
4715
4951
|
loadWidgets(userDashboarId, areaKey) {
|
|
4952
|
+
if (this.templateConfig && this.templateConfig.initialWidgetCount)
|
|
4953
|
+
this.initialWidgetCount = this.templateConfig.initialWidgetCount;
|
|
4954
|
+
window.scrollTo(0, 0);
|
|
4955
|
+
if (location.href.indexOf('/kiosk/') > -1)
|
|
4956
|
+
this.initialWidgetCount = 1000;
|
|
4957
|
+
this.currentLoadedIndex = 0;
|
|
4958
|
+
this.loading = false;
|
|
4716
4959
|
let widgetInfo = {
|
|
4717
4960
|
dashboardId: userDashboarId.toString(),
|
|
4718
4961
|
dashboardAreaKey: areaKey
|
|
@@ -4731,8 +4974,8 @@ class RADashboardArea {
|
|
|
4731
4974
|
});
|
|
4732
4975
|
this.checkPAMWidgets();
|
|
4733
4976
|
if (widgets && widgets.length > 0) {
|
|
4734
|
-
this.
|
|
4735
|
-
this.
|
|
4977
|
+
this.dashboardService.clientId = widgets[0].clientId;
|
|
4978
|
+
this.loadWidgetsDelta();
|
|
4736
4979
|
this.raDashboardEventBus.publish(RAEvent.HideDashboardBanner, false);
|
|
4737
4980
|
}
|
|
4738
4981
|
else {
|
|
@@ -4741,6 +4984,43 @@ class RADashboardArea {
|
|
|
4741
4984
|
}
|
|
4742
4985
|
});
|
|
4743
4986
|
}
|
|
4987
|
+
loadWidgetsDelta() {
|
|
4988
|
+
if (!this.loading) {
|
|
4989
|
+
this.loading = true;
|
|
4990
|
+
let widgets = this.mapObjectListToGridsterItemList(this.userWidgets.slice(this.currentLoadedIndex, (this.currentLoadedIndex + this.initialWidgetCount)));
|
|
4991
|
+
this.currentLoadedIndex += this.initialWidgetCount;
|
|
4992
|
+
this.widgetList.push(...widgets);
|
|
4993
|
+
this.setAreaHeight();
|
|
4994
|
+
setTimeout(() => {
|
|
4995
|
+
this.loading = false;
|
|
4996
|
+
});
|
|
4997
|
+
}
|
|
4998
|
+
}
|
|
4999
|
+
dataLoaded(widgetElement) {
|
|
5000
|
+
this.loadNext();
|
|
5001
|
+
}
|
|
5002
|
+
loadNext() {
|
|
5003
|
+
if (this.divBottom) {
|
|
5004
|
+
if (this.elementInViewport(this.divBottom.nativeElement)) {
|
|
5005
|
+
this.loadWidgetsDelta();
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
5008
|
+
}
|
|
5009
|
+
elementInViewport(el) {
|
|
5010
|
+
var top = el.offsetTop;
|
|
5011
|
+
var left = el.offsetLeft;
|
|
5012
|
+
var width = el.offsetWidth;
|
|
5013
|
+
var height = el.offsetHeight;
|
|
5014
|
+
while (el.offsetParent) {
|
|
5015
|
+
el = el.offsetParent;
|
|
5016
|
+
top += el.offsetTop;
|
|
5017
|
+
left += el.offsetLeft;
|
|
5018
|
+
}
|
|
5019
|
+
return (top >= window.scrollY &&
|
|
5020
|
+
left >= window.scrollX &&
|
|
5021
|
+
(top + height) <= (window.scrollY + window.innerHeight) &&
|
|
5022
|
+
(left + width) <= (window.scrollX + window.innerWidth));
|
|
5023
|
+
}
|
|
4744
5024
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
4745
5025
|
setAreaHeight() {
|
|
4746
5026
|
setTimeout(() => {
|
|
@@ -4782,22 +5062,22 @@ class RADashboardArea {
|
|
|
4782
5062
|
}
|
|
4783
5063
|
/** To remove a widget instance from dashboard and to save info in database */
|
|
4784
5064
|
deleteWidget(widgetInstanceId, isalertDisabled = false) {
|
|
5065
|
+
let widget = this.userWidgets.filter((item) => {
|
|
5066
|
+
return item.widgetInstanceId === widgetInstanceId;
|
|
5067
|
+
});
|
|
5068
|
+
if (widget.length > 0) {
|
|
5069
|
+
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
5070
|
+
}
|
|
5071
|
+
if (this.PAMWidgets.length > 0) {
|
|
5072
|
+
var indx = this.PAMWidgets.indexOf(widgetInstanceId);
|
|
5073
|
+
if (indx > -1)
|
|
5074
|
+
this.PAMWidgets.splice(indx, 1);
|
|
5075
|
+
this.checkPAMWidgets();
|
|
5076
|
+
}
|
|
4785
5077
|
let gridsterItem = this.widgetList.filter((item) => {
|
|
4786
5078
|
return item.widgetInfo.widgetInstanceId === widgetInstanceId;
|
|
4787
5079
|
});
|
|
4788
5080
|
if (gridsterItem.length > 0) {
|
|
4789
|
-
let widget = this.userWidgets.filter((item) => {
|
|
4790
|
-
return item.widgetInstanceId === widgetInstanceId;
|
|
4791
|
-
});
|
|
4792
|
-
if (widget.length > 0) {
|
|
4793
|
-
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
4794
|
-
}
|
|
4795
|
-
if (this.PAMWidgets.length > 0) {
|
|
4796
|
-
var indx = this.PAMWidgets.indexOf(widgetInstanceId);
|
|
4797
|
-
if (indx > -1)
|
|
4798
|
-
this.PAMWidgets.splice(indx, 1);
|
|
4799
|
-
this.checkPAMWidgets();
|
|
4800
|
-
}
|
|
4801
5081
|
this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
|
|
4802
5082
|
this.setAreaHeight();
|
|
4803
5083
|
if (!isalertDisabled) {
|
|
@@ -4811,11 +5091,15 @@ class RADashboardArea {
|
|
|
4811
5091
|
}
|
|
4812
5092
|
/**To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc*/
|
|
4813
5093
|
rearrangeWidgets() {
|
|
5094
|
+
this.currentLoadedIndex = 0;
|
|
5095
|
+
this.loading = false;
|
|
4814
5096
|
for (let i = 0; i < this.userWidgets.length; i++) {
|
|
4815
5097
|
this.userWidgets[i].position_x = 0;
|
|
4816
5098
|
this.userWidgets[i].position_y = 0;
|
|
4817
5099
|
}
|
|
4818
|
-
this.widgetList =
|
|
5100
|
+
this.widgetList = [];
|
|
5101
|
+
this.loadWidgetsDelta();
|
|
5102
|
+
this.raDashboardEventBus.publish(RAEvent.HideDashboardBanner, false);
|
|
4819
5103
|
if (this.widgetList.length > 0)
|
|
4820
5104
|
this.updateWidgetPosition(this.widgetList[0].widgetInfo.widgetInstanceId);
|
|
4821
5105
|
setTimeout(() => {
|
|
@@ -4847,29 +5131,32 @@ class RADashboardArea {
|
|
|
4847
5131
|
this.ngxService.start();
|
|
4848
5132
|
this.dashboardService.addWidget(data, this.appConfig).subscribe(widget => {
|
|
4849
5133
|
this.userWidgets.push(widget);
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
if (
|
|
4856
|
-
|
|
4857
|
-
|
|
5134
|
+
if (this.currentLoadedIndex >= (this.userWidgets.length - 1)) {
|
|
5135
|
+
this.currentLoadedIndex++;
|
|
5136
|
+
let gridsterItem = this.responsiveService.getGridsterItem(widget);
|
|
5137
|
+
this.widgetList.push(gridsterItem);
|
|
5138
|
+
this.setAreaHeight();
|
|
5139
|
+
if (this.options.api) {
|
|
5140
|
+
let curRowHeight = Number(this.options.api.getCurrentRowHeight());
|
|
5141
|
+
if (curRowHeight > 0) {
|
|
5142
|
+
widget.rowHeight = curRowHeight;
|
|
5143
|
+
this.gridcellHeight = curRowHeight;
|
|
5144
|
+
}
|
|
4858
5145
|
}
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
}
|
|
5146
|
+
var widgetInstanceId = 0;
|
|
5147
|
+
if (widget && widget.widgetInstanceId) {
|
|
5148
|
+
widgetInstanceId = widget.widgetInstanceId;
|
|
5149
|
+
/**To save added widget position in db */
|
|
5150
|
+
if (this.responsiveService.IsDesktopView) {
|
|
5151
|
+
setTimeout(() => {
|
|
5152
|
+
this.updateWidgetPosition(widgetInstanceId);
|
|
5153
|
+
});
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
if (widget.settings && widget.settings.isPAMWidget) {
|
|
5157
|
+
this.PAMWidgets.push(widget.widgetInstanceId);
|
|
5158
|
+
this.checkPAMWidgets();
|
|
4868
5159
|
}
|
|
4869
|
-
}
|
|
4870
|
-
if (widget.settings && widget.settings.isPAMWidget) {
|
|
4871
|
-
this.PAMWidgets.push(widget.widgetInstanceId);
|
|
4872
|
-
this.checkPAMWidgets();
|
|
4873
5160
|
}
|
|
4874
5161
|
this.raDashboardEventBus.publish(RAEvent.WidgetAdded, widget);
|
|
4875
5162
|
});
|
|
@@ -4899,12 +5186,15 @@ class RADashboardArea {
|
|
|
4899
5186
|
});
|
|
4900
5187
|
}
|
|
4901
5188
|
this.userWidgets.push(data);
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
this.
|
|
4907
|
-
|
|
5189
|
+
if (this.currentLoadedIndex >= (this.userWidgets.length - 1)) {
|
|
5190
|
+
this.currentLoadedIndex++;
|
|
5191
|
+
let gridsterItem = this.responsiveService.getGridsterItem(data);
|
|
5192
|
+
this.widgetList.push(gridsterItem);
|
|
5193
|
+
this.setAreaHeight();
|
|
5194
|
+
if (data.settings && data.settings.isPAMWidget) {
|
|
5195
|
+
this.PAMWidgets.push(data.widgetInstanceId);
|
|
5196
|
+
this.checkPAMWidgets();
|
|
5197
|
+
}
|
|
4908
5198
|
}
|
|
4909
5199
|
}
|
|
4910
5200
|
mapObjectListToGridsterItemList(widgetList) {
|
|
@@ -4931,8 +5221,11 @@ class RADashboardArea {
|
|
|
4931
5221
|
});
|
|
4932
5222
|
return widgetListArray;
|
|
4933
5223
|
}
|
|
4934
|
-
|
|
4935
|
-
this.
|
|
5224
|
+
buttonClick() {
|
|
5225
|
+
if (this.emptyDashboardButtonAction == "widgets")
|
|
5226
|
+
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
5227
|
+
else if (this.emptyDashboardButtonAction == "filter")
|
|
5228
|
+
this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
|
|
4936
5229
|
}
|
|
4937
5230
|
updateAppliedFilters(data) {
|
|
4938
5231
|
this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -4945,12 +5238,12 @@ class RADashboardArea {
|
|
|
4945
5238
|
this.raDashboardEventBus.publish(RAEvent.ShowInapplicableFilterMessage, false);
|
|
4946
5239
|
}
|
|
4947
5240
|
}
|
|
4948
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
4949
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
5241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardArea, deps: [{ token: RaDashboardService }, { token: i0.NgZone }, { token: i2$1.NgxUiLoaderService }, { token: i3.RATranslateService }, { token: i4.NotifierService }, { token: RADashboardResponsiveService }, { token: i3.RAPermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5242
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: RADashboardArea, selector: "ra-dashboard-area", inputs: { userDashboardId: ["user-dashboard-id", "userDashboardId"], areaKey: ["area-key", "areaKey"], globalFilter: ["global-filter", "globalFilter"], raDashboardEventBus: ["event-bus", "raDashboardEventBus"], widgetHeight: ["widget-height", "widgetHeight"], widgetWidth: ["widget-width", "widgetWidth"], appConfig: ["app-config", "appConfig"], dashboardInfo: ["dashboard-info", "dashboardInfo"], templateConfig: "templateConfig" }, outputs: { hideDashboardBanner: "hideDashboardBanner" }, viewQueries: [{ propertyName: "gridWrapper", first: true, predicate: ["gridWrapper"], descendants: true }, { propertyName: "divBottom", first: true, predicate: ["divBottom"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container (widgetLoaded)=\"widgetLoaded(item)\" [canLoadData]=\"item.canLoadData\" (dataLoaded)=\"dataLoaded($event)\"\r\n [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\"\r\n [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\"\r\n [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"\r\n [dom-resized]=\"domResized\" (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>\r\n<div #divBottom></div>", styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px #00000026!important}@media screen and (max-width: 685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width: 350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-sm,.btn-group-sm>.btn{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width: 600px){.empty-padding{padding:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { kind: "component", type: i4.NotifierContainerComponent, selector: "notifier-container" }, { kind: "component", type: RAWidgetContainer, selector: "ra-widget-container", inputs: ["widget-instance-id", "global-filter", "dashboard-info", "data", "event-bus", "app-config", "widget-width", "widget-height", "grid-cell-height", "bulk-action-data", "canLoadData", "dom-resized"], outputs: ["widgetDeleted", "updateAppliedFilters", "dataLoaded", "widgetLoaded"] }] }); }
|
|
4950
5243
|
}
|
|
4951
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
5244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardArea, decorators: [{
|
|
4952
5245
|
type: Component,
|
|
4953
|
-
args: [{ selector: 'ra-dashboard-area', template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"
|
|
5246
|
+
args: [{ selector: 'ra-dashboard-area', template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container (widgetLoaded)=\"widgetLoaded(item)\" [canLoadData]=\"item.canLoadData\" (dataLoaded)=\"dataLoaded($event)\"\r\n [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\"\r\n [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\"\r\n [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"\r\n [dom-resized]=\"domResized\" (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>\r\n<div #divBottom></div>", styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px #00000026!important}@media screen and (max-width: 685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width: 350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-sm,.btn-group-sm>.btn{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width: 600px){.empty-padding{padding:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}\n"] }]
|
|
4954
5247
|
}], ctorParameters: () => [{ type: RaDashboardService }, { type: i0.NgZone }, { type: i2$1.NgxUiLoaderService }, { type: i3.RATranslateService }, { type: i4.NotifierService }, { type: RADashboardResponsiveService }, { type: i3.RAPermissionService }], propDecorators: { userDashboardId: [{
|
|
4955
5248
|
type: Input,
|
|
4956
5249
|
args: ['user-dashboard-id']
|
|
@@ -4972,11 +5265,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
|
|
|
4972
5265
|
}], appConfig: [{
|
|
4973
5266
|
type: Input,
|
|
4974
5267
|
args: ['app-config']
|
|
5268
|
+
}], dashboardInfo: [{
|
|
5269
|
+
type: Input,
|
|
5270
|
+
args: ['dashboard-info']
|
|
5271
|
+
}], templateConfig: [{
|
|
5272
|
+
type: Input
|
|
4975
5273
|
}], hideDashboardBanner: [{
|
|
4976
5274
|
type: Output
|
|
4977
5275
|
}], gridWrapper: [{
|
|
4978
5276
|
type: ViewChild,
|
|
4979
5277
|
args: ['gridWrapper', { static: false }]
|
|
5278
|
+
}], divBottom: [{
|
|
5279
|
+
type: ViewChild,
|
|
5280
|
+
args: ['divBottom', { static: false }]
|
|
4980
5281
|
}] } });
|
|
4981
5282
|
|
|
4982
5283
|
const customNotifierOptions = {
|
|
@@ -5021,11 +5322,11 @@ const customNotifierOptions = {
|
|
|
5021
5322
|
};
|
|
5022
5323
|
|
|
5023
5324
|
class GridsterModule {
|
|
5024
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
5025
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.
|
|
5026
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.
|
|
5325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5326
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: GridsterModule, imports: [GridsterComponent, GridsterItemComponent], exports: [GridsterComponent, GridsterItemComponent] }); }
|
|
5327
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterModule }); }
|
|
5027
5328
|
}
|
|
5028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
5329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GridsterModule, decorators: [{
|
|
5029
5330
|
type: NgModule,
|
|
5030
5331
|
args: [{
|
|
5031
5332
|
imports: [GridsterComponent, GridsterItemComponent],
|
|
@@ -5034,15 +5335,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
|
|
|
5034
5335
|
}] });
|
|
5035
5336
|
|
|
5036
5337
|
class DashboardFrameworkModule {
|
|
5037
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
5038
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.
|
|
5338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DashboardFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5339
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: DashboardFrameworkModule, bootstrap: [RADashboardArea], declarations: [RADashboardArea,
|
|
5039
5340
|
RAWidgetContainer,
|
|
5040
5341
|
LockTooltip], imports: [BrowserModule,
|
|
5041
5342
|
GridsterModule,
|
|
5042
5343
|
HttpClientModule,
|
|
5043
5344
|
NgxUiLoaderModule, i4.NotifierModule, RACommonModule,
|
|
5044
5345
|
RACommonControlsModule], exports: [RADashboardArea] }); }
|
|
5045
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.
|
|
5346
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DashboardFrameworkModule, imports: [BrowserModule,
|
|
5046
5347
|
GridsterModule,
|
|
5047
5348
|
HttpClientModule,
|
|
5048
5349
|
NgxUiLoaderModule,
|
|
@@ -5050,7 +5351,7 @@ class DashboardFrameworkModule {
|
|
|
5050
5351
|
RACommonModule,
|
|
5051
5352
|
RACommonControlsModule] }); }
|
|
5052
5353
|
}
|
|
5053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
5354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DashboardFrameworkModule, decorators: [{
|
|
5054
5355
|
type: NgModule,
|
|
5055
5356
|
args: [{
|
|
5056
5357
|
declarations: [
|
|
@@ -5106,10 +5407,10 @@ class RADashboardEventBus {
|
|
|
5106
5407
|
return event.eventName == eventName && event.key == key && event.value == value;
|
|
5107
5408
|
}), map(event => event.data));
|
|
5108
5409
|
}
|
|
5109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
5110
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
5410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardEventBus, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5411
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardEventBus, providedIn: 'root' }); }
|
|
5111
5412
|
}
|
|
5112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
5413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RADashboardEventBus, decorators: [{
|
|
5113
5414
|
type: Injectable,
|
|
5114
5415
|
args: [{
|
|
5115
5416
|
providedIn: 'root'
|
|
@@ -5119,11 +5420,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
|
|
|
5119
5420
|
class RaBaseDashboardTemplate {
|
|
5120
5421
|
constructor(ngZone) {
|
|
5121
5422
|
this.ngZone = ngZone;
|
|
5122
|
-
this.initialize = (eventBus, userDashboardId, appConfig) => {
|
|
5423
|
+
this.initialize = (eventBus, userDashboardId, appConfig, dashboardInfo, templateConfig) => {
|
|
5123
5424
|
this.ngZone.run(() => {
|
|
5124
5425
|
this.userDashboardId = userDashboardId;
|
|
5125
5426
|
this.appConfig = appConfig;
|
|
5126
5427
|
this.raDashboardEventBus = eventBus;
|
|
5428
|
+
this.dashboardInfo = dashboardInfo;
|
|
5429
|
+
this.templateConfig = templateConfig;
|
|
5127
5430
|
});
|
|
5128
5431
|
this.init();
|
|
5129
5432
|
};
|
|
@@ -5132,10 +5435,10 @@ class RaBaseDashboardTemplate {
|
|
|
5132
5435
|
var myEvent = new CustomEvent("event-template-initiated");
|
|
5133
5436
|
document.body.dispatchEvent(myEvent);
|
|
5134
5437
|
}
|
|
5135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
5136
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.
|
|
5438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaBaseDashboardTemplate, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5439
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: RaBaseDashboardTemplate, inputs: { dashboardId: ["dashboard-id", "dashboardId"], globalFilter: ["global-filter", "globalFilter"], initialize: "initialize" }, ngImport: i0 }); }
|
|
5137
5440
|
}
|
|
5138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
5441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaBaseDashboardTemplate, decorators: [{
|
|
5139
5442
|
type: Directive
|
|
5140
5443
|
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { dashboardId: [{
|
|
5141
5444
|
type: Input,
|
|
@@ -5169,10 +5472,10 @@ class RaBaseDashboardFilter {
|
|
|
5169
5472
|
var myEvent = new CustomEvent("global-filter-initiated");
|
|
5170
5473
|
document.body.dispatchEvent(myEvent);
|
|
5171
5474
|
}
|
|
5172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
5173
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.
|
|
5475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaBaseDashboardFilter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5476
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: RaBaseDashboardFilter, inputs: { getAllFilterConfig: "getAllFilterConfig", setInapplicableFilterMsg: "setInapplicableFilterMsg", isValidEntry: "isValidEntry", clearAllData: "clearAllData", setAllFilterConfig: "setAllFilterConfig" }, ngImport: i0 }); }
|
|
5174
5477
|
}
|
|
5175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
5478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RaBaseDashboardFilter, decorators: [{
|
|
5176
5479
|
type: Directive
|
|
5177
5480
|
}], propDecorators: { getAllFilterConfig: [{
|
|
5178
5481
|
type: Input
|