@schneideress/dashboardframework 0.0.269 → 0.0.270
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/bundles/schneideress-dashboardframework.umd.js +51 -197
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +2 -2
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/gridster/lib/gridsterItem.component.js +1 -1
- package/esm2015/gridster/lib/gridsterRenderer.service.js +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +19 -100
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +30 -64
- package/esm2015/lib/ra.base.dashboard.template.js +2 -4
- package/esm2015/lib/ra.dashboard.responsive.service.js +2 -12
- package/esm2015/lib/ra.dashboard.service.js +1 -7
- package/esm2015/lib/ra.event.enum.js +1 -7
- package/esm2015/lib/ra.gridster.config.js +3 -3
- package/esm5/gridster/lib/gridsterItem.component.js +1 -1
- package/esm5/gridster/lib/gridsterRenderer.service.js +1 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +19 -107
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +30 -64
- package/esm5/lib/ra.base.dashboard.template.js +2 -4
- package/esm5/lib/ra.dashboard.responsive.service.js +2 -12
- package/esm5/lib/ra.dashboard.service.js +1 -7
- package/esm5/lib/ra.event.enum.js +1 -7
- package/esm5/lib/ra.gridster.config.js +3 -3
- package/fesm2015/schneideress-dashboardframework.js +51 -190
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +51 -197
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +2 -20
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +2 -6
- package/lib/ra.base.dashboard.template.d.ts +2 -4
- package/lib/ra.dashboard.responsive.service.d.ts +1 -1
- package/lib/ra.event.enum.d.ts +1 -7
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -67,12 +67,6 @@ let RaDashboardService = class RaDashboardService extends BaseService {
|
|
|
67
67
|
/**To Update widgetInfo in database */
|
|
68
68
|
updateWidget(widgetInfo, appConfig) {
|
|
69
69
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
70
|
-
let info = {};
|
|
71
|
-
info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
|
|
72
|
-
info.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
73
|
-
info.widgetTitle = widgetInfo.widgetTitle;
|
|
74
|
-
info.widgetType = widgetInfo.widgetType;
|
|
75
|
-
info.widgetId = widgetInfo.widgetId;
|
|
76
70
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
77
71
|
}
|
|
78
72
|
/** To Move or change position if current widget container*/
|
|
@@ -186,12 +180,6 @@ var RAEvent;
|
|
|
186
180
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
187
181
|
/**show inapplicable filter message in global filter flyout */
|
|
188
182
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
189
|
-
/** Bulk Action Clicked */
|
|
190
|
-
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
191
|
-
/** Global Filter Clicked */
|
|
192
|
-
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
193
|
-
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
194
|
-
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
195
183
|
})(RAEvent || (RAEvent = {}));
|
|
196
184
|
var RAEventKey;
|
|
197
185
|
(function (RAEventKey) {
|
|
@@ -205,9 +193,9 @@ const GridsterConfigDefaultSettings = {
|
|
|
205
193
|
margin: 10,
|
|
206
194
|
outerMargin: true,
|
|
207
195
|
outerMarginTop: 10,
|
|
208
|
-
outerMarginRight:
|
|
196
|
+
outerMarginRight: 10,
|
|
209
197
|
outerMarginBottom: 30,
|
|
210
|
-
outerMarginLeft:
|
|
198
|
+
outerMarginLeft: 10,
|
|
211
199
|
useTransformPositioning: true,
|
|
212
200
|
mobileBreakpoint: 640,
|
|
213
201
|
minCols: 10,
|
|
@@ -312,7 +300,7 @@ let RADashboardResponsiveService = class RADashboardResponsiveService {
|
|
|
312
300
|
check = true;
|
|
313
301
|
return check;
|
|
314
302
|
}
|
|
315
|
-
getGridsterConfig(isWidgetMgmnt
|
|
303
|
+
getGridsterConfig(isWidgetMgmnt) {
|
|
316
304
|
let config = GridsterConfigDefaultSettings;
|
|
317
305
|
config.minCols = this.currentResInfo.maxCols;
|
|
318
306
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -334,13 +322,6 @@ let RADashboardResponsiveService = class RADashboardResponsiveService {
|
|
|
334
322
|
config.swap = true;
|
|
335
323
|
config.draggable.enabled = true;
|
|
336
324
|
}
|
|
337
|
-
if (!resize) {
|
|
338
|
-
config.resizable.enabled = false;
|
|
339
|
-
config.swap = false;
|
|
340
|
-
}
|
|
341
|
-
if (!canMove) {
|
|
342
|
-
config.draggable.enabled = false;
|
|
343
|
-
}
|
|
344
325
|
return config;
|
|
345
326
|
}
|
|
346
327
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -348,9 +329,6 @@ let RADashboardResponsiveService = class RADashboardResponsiveService {
|
|
|
348
329
|
if (widget.widgetSettings) {
|
|
349
330
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
350
331
|
}
|
|
351
|
-
if (widget.templateSettings) {
|
|
352
|
-
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
353
|
-
}
|
|
354
332
|
let gridsterItem = {
|
|
355
333
|
cols: this.getWidth(widget.width),
|
|
356
334
|
rows: this.getHeight(widget.height),
|
|
@@ -417,7 +395,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
417
395
|
this.domResized = false;
|
|
418
396
|
this.showEmptyDashboard = false;
|
|
419
397
|
this.isWidgetMgmnt = false;
|
|
420
|
-
this.initialWidgetCount = 10;
|
|
421
398
|
this.widgetHeight = 2;
|
|
422
399
|
this.widgetWidth = 4;
|
|
423
400
|
this.hideDashboardBanner = new EventEmitter();
|
|
@@ -425,7 +402,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
425
402
|
ngOnInit() {
|
|
426
403
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
427
404
|
this.initiateGridsterConfig();
|
|
428
|
-
this.setEmptyDashboardConfig();
|
|
429
405
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
430
406
|
this.responsiveService.resized.subscribe((isDesktop) => {
|
|
431
407
|
if (this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -454,11 +430,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
454
430
|
}, 100);
|
|
455
431
|
}
|
|
456
432
|
});
|
|
457
|
-
setTimeout(() => {
|
|
458
|
-
this.bulkActionClick = this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe((data) => {
|
|
459
|
-
this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
433
|
}
|
|
463
434
|
ngOnChanges(changes) {
|
|
464
435
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -466,40 +437,27 @@ let RADashboardArea = class RADashboardArea {
|
|
|
466
437
|
this.isWidgetLoaded = true;
|
|
467
438
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
468
439
|
}
|
|
469
|
-
this.initiateGridsterConfig();
|
|
470
440
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
471
441
|
this.inititateEventBusSubscritions();
|
|
472
442
|
}
|
|
473
443
|
}
|
|
474
|
-
setEmptyDashboardConfig() {
|
|
475
|
-
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
476
|
-
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
477
|
-
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
478
|
-
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
479
|
-
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
480
|
-
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
481
|
-
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
444
|
/**To set GridsterConfig */
|
|
485
445
|
initiateGridsterConfig() {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
this.options.
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
this.
|
|
495
|
-
if (
|
|
496
|
-
|
|
497
|
-
this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
498
|
-
}
|
|
446
|
+
/**To override default configuration values to the gridster control */
|
|
447
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
|
|
448
|
+
this.options.initCallback = (gridster) => {
|
|
449
|
+
if (this.options.api) {
|
|
450
|
+
this.gridcellHeight = this.options.api.getCurrentRowHeight();
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
this.options.itemChangeCallback = (item) => {
|
|
454
|
+
if (this.responsiveService.IsDesktopView) {
|
|
455
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
456
|
+
this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
499
457
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
458
|
+
}
|
|
459
|
+
this.setAreaHeight();
|
|
460
|
+
};
|
|
503
461
|
}
|
|
504
462
|
/** To initiate eventbus subsctiptions */
|
|
505
463
|
inititateEventBusSubscritions() {
|
|
@@ -518,11 +476,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
518
476
|
this.addWidget(e);
|
|
519
477
|
});
|
|
520
478
|
});
|
|
521
|
-
this.curatedFilterChange = this.raDashboardEventBus.subscribe(RAEvent.CuratedFilterChange).subscribe((e) => {
|
|
522
|
-
this.ngZone.run(() => {
|
|
523
|
-
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
524
|
-
});
|
|
525
|
-
});
|
|
526
479
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe((e) => {
|
|
527
480
|
this.ngZone.run(() => {
|
|
528
481
|
this.rearrangeWidgets();
|
|
@@ -571,10 +524,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
571
524
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
572
525
|
if (this.rearrangeWidgetClick)
|
|
573
526
|
this.rearrangeWidgetClick.unsubscribe();
|
|
574
|
-
if (this.curatedFilterChange)
|
|
575
|
-
this.curatedFilterChange.unsubscribe();
|
|
576
|
-
if (this.bulkActionClick)
|
|
577
|
-
this.bulkActionClick.unsubscribe();
|
|
578
527
|
}
|
|
579
528
|
/**To update position/dimention of all widgets in the area */
|
|
580
529
|
updateWidgets() {
|
|
@@ -610,8 +559,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
610
559
|
}
|
|
611
560
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
612
561
|
loadWidgets(userDashboarId, areaKey) {
|
|
613
|
-
if (this.templateConfig && this.templateConfig.initialWidgetCount)
|
|
614
|
-
this.initialWidgetCount = this.templateConfig.initialWidgetCount;
|
|
615
562
|
let widgetInfo = {
|
|
616
563
|
dashboardId: userDashboarId.toString(),
|
|
617
564
|
dashboardAreaKey: areaKey
|
|
@@ -640,45 +587,6 @@ let RADashboardArea = class RADashboardArea {
|
|
|
640
587
|
}
|
|
641
588
|
});
|
|
642
589
|
}
|
|
643
|
-
widgetLoaded(widget) {
|
|
644
|
-
let lst = this.widgetList.filter((item) => {
|
|
645
|
-
return item.widgetLoaded == true;
|
|
646
|
-
});
|
|
647
|
-
widget.widgetLoaded = true;
|
|
648
|
-
if (lst.length == 0) {
|
|
649
|
-
this.startLoadWidgetData(this.widgetList);
|
|
650
|
-
}
|
|
651
|
-
if (widget.dataTriggered) {
|
|
652
|
-
this.loadWidgetData(widget);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
startLoadWidgetData(lst) {
|
|
656
|
-
if (lst) {
|
|
657
|
-
if (lst.length < this.initialWidgetCount) {
|
|
658
|
-
for (let i = 0; i < lst.length; i++)
|
|
659
|
-
this.loadWidgetData(lst[i]);
|
|
660
|
-
}
|
|
661
|
-
else
|
|
662
|
-
for (let i = 0; i < this.initialWidgetCount; i++)
|
|
663
|
-
this.loadWidgetData(lst[i]);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
loadWidgetData(widget) {
|
|
667
|
-
widget.dataTriggered = true;
|
|
668
|
-
if (widget.widgetLoaded) {
|
|
669
|
-
widget.canLoadData = true;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
dataLoaded() {
|
|
673
|
-
for (let i = 0; i < this.widgetList.length; i++) {
|
|
674
|
-
if (!this.widgetList[i].dataTriggered) {
|
|
675
|
-
setTimeout(() => {
|
|
676
|
-
this.loadWidgetData(this.widgetList[i]);
|
|
677
|
-
});
|
|
678
|
-
break;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
590
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
683
591
|
setAreaHeight() {
|
|
684
592
|
setTimeout(() => {
|
|
@@ -869,11 +777,8 @@ let RADashboardArea = class RADashboardArea {
|
|
|
869
777
|
});
|
|
870
778
|
return widgetListArray;
|
|
871
779
|
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
875
|
-
else if (this.emptyDashboardButtonAction == "filter")
|
|
876
|
-
this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
|
|
780
|
+
addNewWidget() {
|
|
781
|
+
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
877
782
|
}
|
|
878
783
|
updateAppliedFilters(data) {
|
|
879
784
|
this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -924,14 +829,6 @@ __decorate([
|
|
|
924
829
|
Input('app-config'),
|
|
925
830
|
__metadata("design:type", Object)
|
|
926
831
|
], RADashboardArea.prototype, "appConfig", void 0);
|
|
927
|
-
__decorate([
|
|
928
|
-
Input('dashboard-info'),
|
|
929
|
-
__metadata("design:type", Object)
|
|
930
|
-
], RADashboardArea.prototype, "dashboardInfo", void 0);
|
|
931
|
-
__decorate([
|
|
932
|
-
Input(),
|
|
933
|
-
__metadata("design:type", Object)
|
|
934
|
-
], RADashboardArea.prototype, "templateConfig", void 0);
|
|
935
832
|
__decorate([
|
|
936
833
|
Output(),
|
|
937
834
|
__metadata("design:type", Object)
|
|
@@ -943,8 +840,8 @@ __decorate([
|
|
|
943
840
|
RADashboardArea = __decorate([
|
|
944
841
|
Component({
|
|
945
842
|
selector: 'ra-dashboard-area',
|
|
946
|
-
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [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
|
|
947
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
843
|
+
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [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 [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"\r\n (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=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
844
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;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;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}@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:40px 20px 20px;background-color:#ededed;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:-webkit-max-content;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{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:10px;background-color:#ededed;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
|
|
948
845
|
}),
|
|
949
846
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
950
847
|
NgZone,
|
|
@@ -1042,11 +939,8 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1042
939
|
this.showExcell = true;
|
|
1043
940
|
this.hideTitle = false;
|
|
1044
941
|
this.inapplicableFilters = [];
|
|
1045
|
-
this.canLoadData = false;
|
|
1046
942
|
this.widgetDeleted = new EventEmitter();
|
|
1047
943
|
this.updateAppliedFilters = new EventEmitter();
|
|
1048
|
-
this.dataLoaded = new EventEmitter();
|
|
1049
|
-
this.widgetLoaded = new EventEmitter();
|
|
1050
944
|
this.isWidgetStateApplicable = false;
|
|
1051
945
|
this.widgetEmptyState = '';
|
|
1052
946
|
this.lockVisible = false;
|
|
@@ -1067,7 +961,7 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1067
961
|
this.invokeWidgetResizedEvent();
|
|
1068
962
|
}
|
|
1069
963
|
ngOnInit() {
|
|
1070
|
-
this.WidgetDisplayName = this.
|
|
964
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1071
965
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1072
966
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1073
967
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1083,32 +977,19 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1083
977
|
});
|
|
1084
978
|
});
|
|
1085
979
|
}
|
|
1086
|
-
if (this.widgetElement) {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
980
|
+
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
981
|
+
let filterObj = this.getParsedConfig(this.globalFilter);
|
|
982
|
+
if (filterObj.WidgetInstanceId) {
|
|
983
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
984
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1091
985
|
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
let filterObj = this.getParsedConfig(this.globalFilter);
|
|
1095
|
-
if (filterObj.WidgetInstanceId) {
|
|
1096
|
-
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1097
|
-
this.refreshWidget(this.data.widgetInfo);
|
|
1098
|
-
}
|
|
1099
|
-
else {
|
|
1100
|
-
//this.refreshWidget(this.data.widgetInfo);
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1105
|
-
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1106
|
-
this.invokeWidgetResizedEvent();
|
|
986
|
+
else {
|
|
987
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1107
988
|
}
|
|
1108
989
|
}
|
|
1109
|
-
if (changes.
|
|
1110
|
-
|
|
1111
|
-
|
|
990
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
991
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
992
|
+
this.invokeWidgetResizedEvent();
|
|
1112
993
|
}
|
|
1113
994
|
}
|
|
1114
995
|
invokeWidgetResizedEvent() {
|
|
@@ -1287,10 +1168,6 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1287
1168
|
this.showPanel = true;
|
|
1288
1169
|
else
|
|
1289
1170
|
this.showPanel = false;
|
|
1290
|
-
if (!this.data.dataLoaded) {
|
|
1291
|
-
this.data.dataLoaded = true;
|
|
1292
|
-
this.dataLoaded.emit();
|
|
1293
|
-
}
|
|
1294
1171
|
break;
|
|
1295
1172
|
case 'onConfigEditClicked':
|
|
1296
1173
|
this.editWidget();
|
|
@@ -1363,9 +1240,7 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1363
1240
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1364
1241
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1365
1242
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1366
|
-
|
|
1367
|
-
// this.widgetElement.loadContent(widgetConfigFilter);
|
|
1368
|
-
this.widgetLoaded.emit();
|
|
1243
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1369
1244
|
yield this.setLock(widgetConfigFilter.config);
|
|
1370
1245
|
yield this.setDownloadIcon();
|
|
1371
1246
|
}));
|
|
@@ -1599,12 +1474,9 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1599
1474
|
let html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
1600
1475
|
let settings = '';
|
|
1601
1476
|
if (this.isWidgetMgmnt) {
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1606
|
-
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
1607
|
-
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1477
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1478
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1479
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1608
1480
|
}
|
|
1609
1481
|
let customPageParams = false;
|
|
1610
1482
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1613,14 +1485,14 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1613
1485
|
customPageParams = true;
|
|
1614
1486
|
}
|
|
1615
1487
|
}
|
|
1616
|
-
if (
|
|
1488
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1617
1489
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1618
1490
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1619
1491
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1620
1492
|
settings += this.translateService.translate('Common.visitpage');
|
|
1621
1493
|
settings += '</span></a>';
|
|
1622
1494
|
}
|
|
1623
|
-
if (
|
|
1495
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1624
1496
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1625
1497
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1626
1498
|
html += settings;
|
|
@@ -1652,7 +1524,7 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1652
1524
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1653
1525
|
html += this.getHr();
|
|
1654
1526
|
}
|
|
1655
|
-
if (this.isWidgetMgmnt
|
|
1527
|
+
if (this.isWidgetMgmnt) {
|
|
1656
1528
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1657
1529
|
html += this.deleteText;
|
|
1658
1530
|
html += '</span></a>';
|
|
@@ -1731,6 +1603,17 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1731
1603
|
if (this.currentComponent)
|
|
1732
1604
|
this.popupInstance.removeMe(this.currentComponent);
|
|
1733
1605
|
}
|
|
1606
|
+
getwidgetTitleTranslation(item) {
|
|
1607
|
+
let rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
1608
|
+
let translatedString = '';
|
|
1609
|
+
translatedString = this.translateService.translate('Common.' + rKey);
|
|
1610
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
1611
|
+
return item;
|
|
1612
|
+
}
|
|
1613
|
+
else {
|
|
1614
|
+
return translatedString;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1734
1617
|
};
|
|
1735
1618
|
RAWidgetContainer.ctorParameters = () => [
|
|
1736
1619
|
{ type: RaDashboardService },
|
|
@@ -1774,10 +1657,6 @@ __decorate([
|
|
|
1774
1657
|
Input('global-filter'),
|
|
1775
1658
|
__metadata("design:type", Object)
|
|
1776
1659
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
1777
|
-
__decorate([
|
|
1778
|
-
Input('dashboard-info'),
|
|
1779
|
-
__metadata("design:type", Object)
|
|
1780
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
1781
1660
|
__decorate([
|
|
1782
1661
|
Input('data'),
|
|
1783
1662
|
__metadata("design:type", Object)
|
|
@@ -1802,14 +1681,6 @@ __decorate([
|
|
|
1802
1681
|
Input('grid-cell-height'),
|
|
1803
1682
|
__metadata("design:type", Number)
|
|
1804
1683
|
], RAWidgetContainer.prototype, "gridCellHeight", void 0);
|
|
1805
|
-
__decorate([
|
|
1806
|
-
Input('bulk-action-data'),
|
|
1807
|
-
__metadata("design:type", Object)
|
|
1808
|
-
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
1809
|
-
__decorate([
|
|
1810
|
-
Input(),
|
|
1811
|
-
__metadata("design:type", Boolean)
|
|
1812
|
-
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
1813
1684
|
__decorate([
|
|
1814
1685
|
Output(),
|
|
1815
1686
|
__metadata("design:type", Object)
|
|
@@ -1818,14 +1689,6 @@ __decorate([
|
|
|
1818
1689
|
Output(),
|
|
1819
1690
|
__metadata("design:type", Object)
|
|
1820
1691
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
1821
|
-
__decorate([
|
|
1822
|
-
Output(),
|
|
1823
|
-
__metadata("design:type", Object)
|
|
1824
|
-
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
1825
|
-
__decorate([
|
|
1826
|
-
Output(),
|
|
1827
|
-
__metadata("design:type", Object)
|
|
1828
|
-
], RAWidgetContainer.prototype, "widgetLoaded", void 0);
|
|
1829
1692
|
__decorate([
|
|
1830
1693
|
Input('dom-resized'),
|
|
1831
1694
|
__metadata("design:type", Boolean),
|
|
@@ -4781,13 +4644,11 @@ DashboardFrameworkModule = __decorate([
|
|
|
4781
4644
|
class RaBaseDashboardTemplate {
|
|
4782
4645
|
constructor(ngZone) {
|
|
4783
4646
|
this.ngZone = ngZone;
|
|
4784
|
-
this.initialize = (eventBus, userDashboardId, appConfig
|
|
4647
|
+
this.initialize = (eventBus, userDashboardId, appConfig) => {
|
|
4785
4648
|
this.ngZone.run(() => {
|
|
4786
4649
|
this.userDashboardId = userDashboardId;
|
|
4787
4650
|
this.appConfig = appConfig;
|
|
4788
4651
|
this.raDashboardEventBus = eventBus;
|
|
4789
|
-
this.dashboardInfo = dashboardInfo;
|
|
4790
|
-
this.templateConfig = templateConfig;
|
|
4791
4652
|
});
|
|
4792
4653
|
this.init();
|
|
4793
4654
|
};
|