@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
|
@@ -69,12 +69,6 @@ var RaDashboardService = /** @class */ (function (_super) {
|
|
|
69
69
|
/**To Update widgetInfo in database */
|
|
70
70
|
RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
|
|
71
71
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
72
|
-
var info = {};
|
|
73
|
-
info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
|
|
74
|
-
info.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
75
|
-
info.widgetTitle = widgetInfo.widgetTitle;
|
|
76
|
-
info.widgetType = widgetInfo.widgetType;
|
|
77
|
-
info.widgetId = widgetInfo.widgetId;
|
|
78
72
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
79
73
|
};
|
|
80
74
|
/** To Move or change position if current widget container*/
|
|
@@ -190,12 +184,6 @@ var RAEvent;
|
|
|
190
184
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
191
185
|
/**show inapplicable filter message in global filter flyout */
|
|
192
186
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
193
|
-
/** Bulk Action Clicked */
|
|
194
|
-
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
195
|
-
/** Global Filter Clicked */
|
|
196
|
-
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
197
|
-
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
198
|
-
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
199
187
|
})(RAEvent || (RAEvent = {}));
|
|
200
188
|
var RAEventKey;
|
|
201
189
|
(function (RAEventKey) {
|
|
@@ -209,9 +197,9 @@ var GridsterConfigDefaultSettings = {
|
|
|
209
197
|
margin: 10,
|
|
210
198
|
outerMargin: true,
|
|
211
199
|
outerMarginTop: 10,
|
|
212
|
-
outerMarginRight:
|
|
200
|
+
outerMarginRight: 10,
|
|
213
201
|
outerMarginBottom: 30,
|
|
214
|
-
outerMarginLeft:
|
|
202
|
+
outerMarginLeft: 10,
|
|
215
203
|
useTransformPositioning: true,
|
|
216
204
|
mobileBreakpoint: 640,
|
|
217
205
|
minCols: 10,
|
|
@@ -326,7 +314,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
326
314
|
enumerable: true,
|
|
327
315
|
configurable: true
|
|
328
316
|
});
|
|
329
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt
|
|
317
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
330
318
|
var config = GridsterConfigDefaultSettings;
|
|
331
319
|
config.minCols = this.currentResInfo.maxCols;
|
|
332
320
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -348,13 +336,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
348
336
|
config.swap = true;
|
|
349
337
|
config.draggable.enabled = true;
|
|
350
338
|
}
|
|
351
|
-
if (!resize) {
|
|
352
|
-
config.resizable.enabled = false;
|
|
353
|
-
config.swap = false;
|
|
354
|
-
}
|
|
355
|
-
if (!canMove) {
|
|
356
|
-
config.draggable.enabled = false;
|
|
357
|
-
}
|
|
358
339
|
return config;
|
|
359
340
|
};
|
|
360
341
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -362,9 +343,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
362
343
|
if (widget.widgetSettings) {
|
|
363
344
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
364
345
|
}
|
|
365
|
-
if (widget.templateSettings) {
|
|
366
|
-
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
367
|
-
}
|
|
368
346
|
var gridsterItem = {
|
|
369
347
|
cols: this.getWidth(widget.width),
|
|
370
348
|
rows: this.getHeight(widget.height),
|
|
@@ -432,7 +410,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
432
410
|
this.domResized = false;
|
|
433
411
|
this.showEmptyDashboard = false;
|
|
434
412
|
this.isWidgetMgmnt = false;
|
|
435
|
-
this.initialWidgetCount = 10;
|
|
436
413
|
this.widgetHeight = 2;
|
|
437
414
|
this.widgetWidth = 4;
|
|
438
415
|
this.hideDashboardBanner = new EventEmitter();
|
|
@@ -441,7 +418,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
441
418
|
var _this = this;
|
|
442
419
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
443
420
|
this.initiateGridsterConfig();
|
|
444
|
-
this.setEmptyDashboardConfig();
|
|
445
421
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
446
422
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
447
423
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -470,11 +446,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
470
446
|
}, 100);
|
|
471
447
|
}
|
|
472
448
|
});
|
|
473
|
-
setTimeout(function () {
|
|
474
|
-
_this.bulkActionClick = _this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
|
|
475
|
-
_this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
449
|
};
|
|
479
450
|
RADashboardArea.prototype.ngOnChanges = function (changes) {
|
|
480
451
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -482,41 +453,28 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
482
453
|
this.isWidgetLoaded = true;
|
|
483
454
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
484
455
|
}
|
|
485
|
-
this.initiateGridsterConfig();
|
|
486
456
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
487
457
|
this.inititateEventBusSubscritions();
|
|
488
458
|
}
|
|
489
459
|
};
|
|
490
|
-
RADashboardArea.prototype.setEmptyDashboardConfig = function () {
|
|
491
|
-
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
492
|
-
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
493
|
-
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
494
|
-
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
495
|
-
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
496
|
-
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
497
|
-
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
460
|
/**To set GridsterConfig */
|
|
501
461
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
502
462
|
var _this = this;
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
if (
|
|
513
|
-
|
|
514
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
515
|
-
}
|
|
463
|
+
/**To override default configuration values to the gridster control */
|
|
464
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
|
|
465
|
+
this.options.initCallback = function (gridster) {
|
|
466
|
+
if (_this.options.api) {
|
|
467
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
this.options.itemChangeCallback = function (item) {
|
|
471
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
472
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
473
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
516
474
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
475
|
+
}
|
|
476
|
+
_this.setAreaHeight();
|
|
477
|
+
};
|
|
520
478
|
};
|
|
521
479
|
/** To initiate eventbus subsctiptions */
|
|
522
480
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -536,11 +494,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
536
494
|
_this.addWidget(e);
|
|
537
495
|
});
|
|
538
496
|
});
|
|
539
|
-
this.curatedFilterChange = this.raDashboardEventBus.subscribe(RAEvent.CuratedFilterChange).subscribe(function (e) {
|
|
540
|
-
_this.ngZone.run(function () {
|
|
541
|
-
_this.loadWidgets(_this.userDashboardId, _this.areaKey);
|
|
542
|
-
});
|
|
543
|
-
});
|
|
544
497
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
545
498
|
_this.ngZone.run(function () {
|
|
546
499
|
_this.rearrangeWidgets();
|
|
@@ -589,10 +542,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
589
542
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
590
543
|
if (this.rearrangeWidgetClick)
|
|
591
544
|
this.rearrangeWidgetClick.unsubscribe();
|
|
592
|
-
if (this.curatedFilterChange)
|
|
593
|
-
this.curatedFilterChange.unsubscribe();
|
|
594
|
-
if (this.bulkActionClick)
|
|
595
|
-
this.bulkActionClick.unsubscribe();
|
|
596
545
|
};
|
|
597
546
|
/**To update position/dimention of all widgets in the area */
|
|
598
547
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -629,8 +578,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
629
578
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
630
579
|
RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
|
|
631
580
|
var _this = this;
|
|
632
|
-
if (this.templateConfig && this.templateConfig.initialWidgetCount)
|
|
633
|
-
this.initialWidgetCount = this.templateConfig.initialWidgetCount;
|
|
634
581
|
var widgetInfo = {
|
|
635
582
|
dashboardId: userDashboarId.toString(),
|
|
636
583
|
dashboardAreaKey: areaKey
|
|
@@ -659,52 +606,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
659
606
|
}
|
|
660
607
|
});
|
|
661
608
|
};
|
|
662
|
-
RADashboardArea.prototype.widgetLoaded = function (widget) {
|
|
663
|
-
var lst = this.widgetList.filter(function (item) {
|
|
664
|
-
return item.widgetLoaded == true;
|
|
665
|
-
});
|
|
666
|
-
widget.widgetLoaded = true;
|
|
667
|
-
if (lst.length == 0) {
|
|
668
|
-
this.startLoadWidgetData(this.widgetList);
|
|
669
|
-
}
|
|
670
|
-
if (widget.dataTriggered) {
|
|
671
|
-
this.loadWidgetData(widget);
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
RADashboardArea.prototype.startLoadWidgetData = function (lst) {
|
|
675
|
-
if (lst) {
|
|
676
|
-
if (lst.length < this.initialWidgetCount) {
|
|
677
|
-
for (var i = 0; i < lst.length; i++)
|
|
678
|
-
this.loadWidgetData(lst[i]);
|
|
679
|
-
}
|
|
680
|
-
else
|
|
681
|
-
for (var i = 0; i < this.initialWidgetCount; i++)
|
|
682
|
-
this.loadWidgetData(lst[i]);
|
|
683
|
-
}
|
|
684
|
-
};
|
|
685
|
-
RADashboardArea.prototype.loadWidgetData = function (widget) {
|
|
686
|
-
widget.dataTriggered = true;
|
|
687
|
-
if (widget.widgetLoaded) {
|
|
688
|
-
widget.canLoadData = true;
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
RADashboardArea.prototype.dataLoaded = function () {
|
|
692
|
-
var _this = this;
|
|
693
|
-
var _loop_1 = function (i) {
|
|
694
|
-
if (!this_1.widgetList[i].dataTriggered) {
|
|
695
|
-
setTimeout(function () {
|
|
696
|
-
_this.loadWidgetData(_this.widgetList[i]);
|
|
697
|
-
});
|
|
698
|
-
return "break";
|
|
699
|
-
}
|
|
700
|
-
};
|
|
701
|
-
var this_1 = this;
|
|
702
|
-
for (var i = 0; i < this.widgetList.length; i++) {
|
|
703
|
-
var state_1 = _loop_1(i);
|
|
704
|
-
if (state_1 === "break")
|
|
705
|
-
break;
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
609
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
709
610
|
RADashboardArea.prototype.setAreaHeight = function () {
|
|
710
611
|
var _this = this;
|
|
@@ -901,11 +802,8 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
901
802
|
});
|
|
902
803
|
return widgetListArray;
|
|
903
804
|
};
|
|
904
|
-
RADashboardArea.prototype.
|
|
905
|
-
|
|
906
|
-
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
907
|
-
else if (this.emptyDashboardButtonAction == "filter")
|
|
908
|
-
this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
|
|
805
|
+
RADashboardArea.prototype.addNewWidget = function () {
|
|
806
|
+
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
909
807
|
};
|
|
910
808
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
911
809
|
this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -955,14 +853,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
955
853
|
Input('app-config'),
|
|
956
854
|
__metadata("design:type", Object)
|
|
957
855
|
], RADashboardArea.prototype, "appConfig", void 0);
|
|
958
|
-
__decorate([
|
|
959
|
-
Input('dashboard-info'),
|
|
960
|
-
__metadata("design:type", Object)
|
|
961
|
-
], RADashboardArea.prototype, "dashboardInfo", void 0);
|
|
962
|
-
__decorate([
|
|
963
|
-
Input(),
|
|
964
|
-
__metadata("design:type", Object)
|
|
965
|
-
], RADashboardArea.prototype, "templateConfig", void 0);
|
|
966
856
|
__decorate([
|
|
967
857
|
Output(),
|
|
968
858
|
__metadata("design:type", Object)
|
|
@@ -974,8 +864,8 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
974
864
|
RADashboardArea = __decorate([
|
|
975
865
|
Component({
|
|
976
866
|
selector: 'ra-dashboard-area',
|
|
977
|
-
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
|
|
978
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
867
|
+
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>",
|
|
868
|
+
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}}"]
|
|
979
869
|
}),
|
|
980
870
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
981
871
|
NgZone,
|
|
@@ -1078,11 +968,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1078
968
|
this.showExcell = true;
|
|
1079
969
|
this.hideTitle = false;
|
|
1080
970
|
this.inapplicableFilters = [];
|
|
1081
|
-
this.canLoadData = false;
|
|
1082
971
|
this.widgetDeleted = new EventEmitter();
|
|
1083
972
|
this.updateAppliedFilters = new EventEmitter();
|
|
1084
|
-
this.dataLoaded = new EventEmitter();
|
|
1085
|
-
this.widgetLoaded = new EventEmitter();
|
|
1086
973
|
this.isWidgetStateApplicable = false;
|
|
1087
974
|
this.widgetEmptyState = '';
|
|
1088
975
|
this.lockVisible = false;
|
|
@@ -1107,7 +994,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1107
994
|
configurable: true
|
|
1108
995
|
});
|
|
1109
996
|
RAWidgetContainer.prototype.ngOnInit = function () {
|
|
1110
|
-
this.WidgetDisplayName = this.
|
|
997
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1111
998
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1112
999
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1113
1000
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1128,32 +1015,19 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1128
1015
|
});
|
|
1129
1016
|
});
|
|
1130
1017
|
}
|
|
1131
|
-
if (this.widgetElement) {
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
}
|
|
1137
|
-
if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1138
|
-
if (!this.dashboardInfo.curatedFilters) {
|
|
1139
|
-
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1140
|
-
if (filterObj.WidgetInstanceId) {
|
|
1141
|
-
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1142
|
-
this.refreshWidget(this.data.widgetInfo);
|
|
1143
|
-
}
|
|
1144
|
-
else {
|
|
1145
|
-
//this.refreshWidget(this.data.widgetInfo);
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1018
|
+
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1019
|
+
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1020
|
+
if (filterObj.WidgetInstanceId) {
|
|
1021
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1022
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1148
1023
|
}
|
|
1149
|
-
|
|
1150
|
-
(
|
|
1151
|
-
this.invokeWidgetResizedEvent();
|
|
1024
|
+
else {
|
|
1025
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1152
1026
|
}
|
|
1153
1027
|
}
|
|
1154
|
-
if (changes.
|
|
1155
|
-
|
|
1156
|
-
|
|
1028
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1029
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1030
|
+
this.invokeWidgetResizedEvent();
|
|
1157
1031
|
}
|
|
1158
1032
|
};
|
|
1159
1033
|
RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
|
|
@@ -1345,10 +1219,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1345
1219
|
_this.showPanel = true;
|
|
1346
1220
|
else
|
|
1347
1221
|
_this.showPanel = false;
|
|
1348
|
-
if (!_this.data.dataLoaded) {
|
|
1349
|
-
_this.data.dataLoaded = true;
|
|
1350
|
-
_this.dataLoaded.emit();
|
|
1351
|
-
}
|
|
1352
1222
|
break;
|
|
1353
1223
|
case 'onConfigEditClicked':
|
|
1354
1224
|
_this.editWidget();
|
|
@@ -1421,9 +1291,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1421
1291
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1422
1292
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1423
1293
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1424
|
-
|
|
1425
|
-
// this.widgetElement.loadContent(widgetConfigFilter);
|
|
1426
|
-
this.widgetLoaded.emit();
|
|
1294
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1427
1295
|
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
1428
1296
|
case 1:
|
|
1429
1297
|
_a.sent();
|
|
@@ -1693,12 +1561,9 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1693
1561
|
var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
1694
1562
|
var settings = '';
|
|
1695
1563
|
if (this.isWidgetMgmnt) {
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1700
|
-
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
1701
|
-
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1564
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1565
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1566
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1702
1567
|
}
|
|
1703
1568
|
var customPageParams = false;
|
|
1704
1569
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1707,14 +1572,14 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1707
1572
|
customPageParams = true;
|
|
1708
1573
|
}
|
|
1709
1574
|
}
|
|
1710
|
-
if (
|
|
1575
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1711
1576
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1712
1577
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1713
1578
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1714
1579
|
settings += this.translateService.translate('Common.visitpage');
|
|
1715
1580
|
settings += '</span></a>';
|
|
1716
1581
|
}
|
|
1717
|
-
if (
|
|
1582
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1718
1583
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1719
1584
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1720
1585
|
html += settings;
|
|
@@ -1746,7 +1611,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1746
1611
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1747
1612
|
html += this.getHr();
|
|
1748
1613
|
}
|
|
1749
|
-
if (this.isWidgetMgmnt
|
|
1614
|
+
if (this.isWidgetMgmnt) {
|
|
1750
1615
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1751
1616
|
html += this.deleteText;
|
|
1752
1617
|
html += '</span></a>';
|
|
@@ -1827,6 +1692,17 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1827
1692
|
if (this.currentComponent)
|
|
1828
1693
|
this.popupInstance.removeMe(this.currentComponent);
|
|
1829
1694
|
};
|
|
1695
|
+
RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
|
|
1696
|
+
var rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
1697
|
+
var translatedString = '';
|
|
1698
|
+
translatedString = this.translateService.translate('Common.' + rKey);
|
|
1699
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
1700
|
+
return item;
|
|
1701
|
+
}
|
|
1702
|
+
else {
|
|
1703
|
+
return translatedString;
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1830
1706
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
1831
1707
|
{ type: RaDashboardService },
|
|
1832
1708
|
{ type: NgxUiLoaderService },
|
|
@@ -1869,10 +1745,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1869
1745
|
Input('global-filter'),
|
|
1870
1746
|
__metadata("design:type", Object)
|
|
1871
1747
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
1872
|
-
__decorate([
|
|
1873
|
-
Input('dashboard-info'),
|
|
1874
|
-
__metadata("design:type", Object)
|
|
1875
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
1876
1748
|
__decorate([
|
|
1877
1749
|
Input('data'),
|
|
1878
1750
|
__metadata("design:type", Object)
|
|
@@ -1897,14 +1769,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1897
1769
|
Input('grid-cell-height'),
|
|
1898
1770
|
__metadata("design:type", Number)
|
|
1899
1771
|
], RAWidgetContainer.prototype, "gridCellHeight", void 0);
|
|
1900
|
-
__decorate([
|
|
1901
|
-
Input('bulk-action-data'),
|
|
1902
|
-
__metadata("design:type", Object)
|
|
1903
|
-
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
1904
|
-
__decorate([
|
|
1905
|
-
Input(),
|
|
1906
|
-
__metadata("design:type", Boolean)
|
|
1907
|
-
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
1908
1772
|
__decorate([
|
|
1909
1773
|
Output(),
|
|
1910
1774
|
__metadata("design:type", Object)
|
|
@@ -1913,14 +1777,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1913
1777
|
Output(),
|
|
1914
1778
|
__metadata("design:type", Object)
|
|
1915
1779
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
1916
|
-
__decorate([
|
|
1917
|
-
Output(),
|
|
1918
|
-
__metadata("design:type", Object)
|
|
1919
|
-
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
1920
|
-
__decorate([
|
|
1921
|
-
Output(),
|
|
1922
|
-
__metadata("design:type", Object)
|
|
1923
|
-
], RAWidgetContainer.prototype, "widgetLoaded", void 0);
|
|
1924
1780
|
__decorate([
|
|
1925
1781
|
Input('dom-resized'),
|
|
1926
1782
|
__metadata("design:type", Boolean),
|
|
@@ -4919,13 +4775,11 @@ var RaBaseDashboardTemplate = /** @class */ (function () {
|
|
|
4919
4775
|
function RaBaseDashboardTemplate(ngZone) {
|
|
4920
4776
|
var _this = this;
|
|
4921
4777
|
this.ngZone = ngZone;
|
|
4922
|
-
this.initialize = function (eventBus, userDashboardId, appConfig
|
|
4778
|
+
this.initialize = function (eventBus, userDashboardId, appConfig) {
|
|
4923
4779
|
_this.ngZone.run(function () {
|
|
4924
4780
|
_this.userDashboardId = userDashboardId;
|
|
4925
4781
|
_this.appConfig = appConfig;
|
|
4926
4782
|
_this.raDashboardEventBus = eventBus;
|
|
4927
|
-
_this.dashboardInfo = dashboardInfo;
|
|
4928
|
-
_this.templateConfig = templateConfig;
|
|
4929
4783
|
});
|
|
4930
4784
|
_this.init();
|
|
4931
4785
|
};
|