@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
|
@@ -280,12 +280,6 @@
|
|
|
280
280
|
/**To Update widgetInfo in database */
|
|
281
281
|
RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
|
|
282
282
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
283
|
-
var info = {};
|
|
284
|
-
info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
|
|
285
|
-
info.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
286
|
-
info.widgetTitle = widgetInfo.widgetTitle;
|
|
287
|
-
info.widgetType = widgetInfo.widgetType;
|
|
288
|
-
info.widgetId = widgetInfo.widgetId;
|
|
289
283
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
290
284
|
};
|
|
291
285
|
/** To Move or change position if current widget container*/
|
|
@@ -401,12 +395,6 @@
|
|
|
401
395
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
402
396
|
/**show inapplicable filter message in global filter flyout */
|
|
403
397
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
404
|
-
/** Bulk Action Clicked */
|
|
405
|
-
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
406
|
-
/** Global Filter Clicked */
|
|
407
|
-
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
408
|
-
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
409
|
-
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
410
398
|
})(exports.RAEvent || (exports.RAEvent = {}));
|
|
411
399
|
|
|
412
400
|
(function (RAEventKey) {
|
|
@@ -420,9 +408,9 @@
|
|
|
420
408
|
margin: 10,
|
|
421
409
|
outerMargin: true,
|
|
422
410
|
outerMarginTop: 10,
|
|
423
|
-
outerMarginRight:
|
|
411
|
+
outerMarginRight: 10,
|
|
424
412
|
outerMarginBottom: 30,
|
|
425
|
-
outerMarginLeft:
|
|
413
|
+
outerMarginLeft: 10,
|
|
426
414
|
useTransformPositioning: true,
|
|
427
415
|
mobileBreakpoint: 640,
|
|
428
416
|
minCols: 10,
|
|
@@ -537,7 +525,7 @@
|
|
|
537
525
|
enumerable: true,
|
|
538
526
|
configurable: true
|
|
539
527
|
});
|
|
540
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt
|
|
528
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
541
529
|
var config = GridsterConfigDefaultSettings;
|
|
542
530
|
config.minCols = this.currentResInfo.maxCols;
|
|
543
531
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -559,13 +547,6 @@
|
|
|
559
547
|
config.swap = true;
|
|
560
548
|
config.draggable.enabled = true;
|
|
561
549
|
}
|
|
562
|
-
if (!resize) {
|
|
563
|
-
config.resizable.enabled = false;
|
|
564
|
-
config.swap = false;
|
|
565
|
-
}
|
|
566
|
-
if (!canMove) {
|
|
567
|
-
config.draggable.enabled = false;
|
|
568
|
-
}
|
|
569
550
|
return config;
|
|
570
551
|
};
|
|
571
552
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -573,9 +554,6 @@
|
|
|
573
554
|
if (widget.widgetSettings) {
|
|
574
555
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
575
556
|
}
|
|
576
|
-
if (widget.templateSettings) {
|
|
577
|
-
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
578
|
-
}
|
|
579
557
|
var gridsterItem = {
|
|
580
558
|
cols: this.getWidth(widget.width),
|
|
581
559
|
rows: this.getHeight(widget.height),
|
|
@@ -643,7 +621,6 @@
|
|
|
643
621
|
this.domResized = false;
|
|
644
622
|
this.showEmptyDashboard = false;
|
|
645
623
|
this.isWidgetMgmnt = false;
|
|
646
|
-
this.initialWidgetCount = 10;
|
|
647
624
|
this.widgetHeight = 2;
|
|
648
625
|
this.widgetWidth = 4;
|
|
649
626
|
this.hideDashboardBanner = new core.EventEmitter();
|
|
@@ -652,7 +629,6 @@
|
|
|
652
629
|
var _this = this;
|
|
653
630
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
654
631
|
this.initiateGridsterConfig();
|
|
655
|
-
this.setEmptyDashboardConfig();
|
|
656
632
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
657
633
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
658
634
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -681,11 +657,6 @@
|
|
|
681
657
|
}, 100);
|
|
682
658
|
}
|
|
683
659
|
});
|
|
684
|
-
setTimeout(function () {
|
|
685
|
-
_this.bulkActionClick = _this.raDashboardEventBus.subscribe(exports.RAEvent.BulkActionClick).subscribe(function (data) {
|
|
686
|
-
_this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
687
|
-
});
|
|
688
|
-
});
|
|
689
660
|
};
|
|
690
661
|
RADashboardArea.prototype.ngOnChanges = function (changes) {
|
|
691
662
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -693,41 +664,28 @@
|
|
|
693
664
|
this.isWidgetLoaded = true;
|
|
694
665
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
695
666
|
}
|
|
696
|
-
this.initiateGridsterConfig();
|
|
697
667
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
698
668
|
this.inititateEventBusSubscritions();
|
|
699
669
|
}
|
|
700
670
|
};
|
|
701
|
-
RADashboardArea.prototype.setEmptyDashboardConfig = function () {
|
|
702
|
-
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
703
|
-
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
704
|
-
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
705
|
-
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
706
|
-
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
707
|
-
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
708
|
-
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
709
|
-
}
|
|
710
|
-
};
|
|
711
671
|
/**To set GridsterConfig */
|
|
712
672
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
713
673
|
var _this = this;
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
if (
|
|
724
|
-
|
|
725
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
726
|
-
}
|
|
674
|
+
/**To override default configuration values to the gridster control */
|
|
675
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
|
|
676
|
+
this.options.initCallback = function (gridster) {
|
|
677
|
+
if (_this.options.api) {
|
|
678
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
this.options.itemChangeCallback = function (item) {
|
|
682
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
683
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
684
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
727
685
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
686
|
+
}
|
|
687
|
+
_this.setAreaHeight();
|
|
688
|
+
};
|
|
731
689
|
};
|
|
732
690
|
/** To initiate eventbus subsctiptions */
|
|
733
691
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -747,11 +705,6 @@
|
|
|
747
705
|
_this.addWidget(e);
|
|
748
706
|
});
|
|
749
707
|
});
|
|
750
|
-
this.curatedFilterChange = this.raDashboardEventBus.subscribe(exports.RAEvent.CuratedFilterChange).subscribe(function (e) {
|
|
751
|
-
_this.ngZone.run(function () {
|
|
752
|
-
_this.loadWidgets(_this.userDashboardId, _this.areaKey);
|
|
753
|
-
});
|
|
754
|
-
});
|
|
755
708
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(exports.RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
756
709
|
_this.ngZone.run(function () {
|
|
757
710
|
_this.rearrangeWidgets();
|
|
@@ -800,10 +753,6 @@
|
|
|
800
753
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
801
754
|
if (this.rearrangeWidgetClick)
|
|
802
755
|
this.rearrangeWidgetClick.unsubscribe();
|
|
803
|
-
if (this.curatedFilterChange)
|
|
804
|
-
this.curatedFilterChange.unsubscribe();
|
|
805
|
-
if (this.bulkActionClick)
|
|
806
|
-
this.bulkActionClick.unsubscribe();
|
|
807
756
|
};
|
|
808
757
|
/**To update position/dimention of all widgets in the area */
|
|
809
758
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -840,8 +789,6 @@
|
|
|
840
789
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
841
790
|
RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
|
|
842
791
|
var _this = this;
|
|
843
|
-
if (this.templateConfig && this.templateConfig.initialWidgetCount)
|
|
844
|
-
this.initialWidgetCount = this.templateConfig.initialWidgetCount;
|
|
845
792
|
var widgetInfo = {
|
|
846
793
|
dashboardId: userDashboarId.toString(),
|
|
847
794
|
dashboardAreaKey: areaKey
|
|
@@ -870,52 +817,6 @@
|
|
|
870
817
|
}
|
|
871
818
|
});
|
|
872
819
|
};
|
|
873
|
-
RADashboardArea.prototype.widgetLoaded = function (widget) {
|
|
874
|
-
var lst = this.widgetList.filter(function (item) {
|
|
875
|
-
return item.widgetLoaded == true;
|
|
876
|
-
});
|
|
877
|
-
widget.widgetLoaded = true;
|
|
878
|
-
if (lst.length == 0) {
|
|
879
|
-
this.startLoadWidgetData(this.widgetList);
|
|
880
|
-
}
|
|
881
|
-
if (widget.dataTriggered) {
|
|
882
|
-
this.loadWidgetData(widget);
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
RADashboardArea.prototype.startLoadWidgetData = function (lst) {
|
|
886
|
-
if (lst) {
|
|
887
|
-
if (lst.length < this.initialWidgetCount) {
|
|
888
|
-
for (var i = 0; i < lst.length; i++)
|
|
889
|
-
this.loadWidgetData(lst[i]);
|
|
890
|
-
}
|
|
891
|
-
else
|
|
892
|
-
for (var i = 0; i < this.initialWidgetCount; i++)
|
|
893
|
-
this.loadWidgetData(lst[i]);
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
RADashboardArea.prototype.loadWidgetData = function (widget) {
|
|
897
|
-
widget.dataTriggered = true;
|
|
898
|
-
if (widget.widgetLoaded) {
|
|
899
|
-
widget.canLoadData = true;
|
|
900
|
-
}
|
|
901
|
-
};
|
|
902
|
-
RADashboardArea.prototype.dataLoaded = function () {
|
|
903
|
-
var _this = this;
|
|
904
|
-
var _loop_1 = function (i) {
|
|
905
|
-
if (!this_1.widgetList[i].dataTriggered) {
|
|
906
|
-
setTimeout(function () {
|
|
907
|
-
_this.loadWidgetData(_this.widgetList[i]);
|
|
908
|
-
});
|
|
909
|
-
return "break";
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
var this_1 = this;
|
|
913
|
-
for (var i = 0; i < this.widgetList.length; i++) {
|
|
914
|
-
var state_1 = _loop_1(i);
|
|
915
|
-
if (state_1 === "break")
|
|
916
|
-
break;
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
820
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
920
821
|
RADashboardArea.prototype.setAreaHeight = function () {
|
|
921
822
|
var _this = this;
|
|
@@ -1112,11 +1013,8 @@
|
|
|
1112
1013
|
});
|
|
1113
1014
|
return widgetListArray;
|
|
1114
1015
|
};
|
|
1115
|
-
RADashboardArea.prototype.
|
|
1116
|
-
|
|
1117
|
-
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1118
|
-
else if (this.emptyDashboardButtonAction == "filter")
|
|
1119
|
-
this.raDashboardEventBus.publish(exports.RAEvent.GlobalFilterClick, null);
|
|
1016
|
+
RADashboardArea.prototype.addNewWidget = function () {
|
|
1017
|
+
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1120
1018
|
};
|
|
1121
1019
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
1122
1020
|
this.raDashboardEventBus.publish(exports.RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -1166,14 +1064,6 @@
|
|
|
1166
1064
|
core.Input('app-config'),
|
|
1167
1065
|
__metadata("design:type", Object)
|
|
1168
1066
|
], RADashboardArea.prototype, "appConfig", void 0);
|
|
1169
|
-
__decorate([
|
|
1170
|
-
core.Input('dashboard-info'),
|
|
1171
|
-
__metadata("design:type", Object)
|
|
1172
|
-
], RADashboardArea.prototype, "dashboardInfo", void 0);
|
|
1173
|
-
__decorate([
|
|
1174
|
-
core.Input(),
|
|
1175
|
-
__metadata("design:type", Object)
|
|
1176
|
-
], RADashboardArea.prototype, "templateConfig", void 0);
|
|
1177
1067
|
__decorate([
|
|
1178
1068
|
core.Output(),
|
|
1179
1069
|
__metadata("design:type", Object)
|
|
@@ -1185,8 +1075,8 @@
|
|
|
1185
1075
|
RADashboardArea = __decorate([
|
|
1186
1076
|
core.Component({
|
|
1187
1077
|
selector: 'ra-dashboard-area',
|
|
1188
|
-
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
|
|
1189
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
1078
|
+
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>",
|
|
1079
|
+
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}}"]
|
|
1190
1080
|
}),
|
|
1191
1081
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1192
1082
|
core.NgZone,
|
|
@@ -1289,11 +1179,8 @@
|
|
|
1289
1179
|
this.showExcell = true;
|
|
1290
1180
|
this.hideTitle = false;
|
|
1291
1181
|
this.inapplicableFilters = [];
|
|
1292
|
-
this.canLoadData = false;
|
|
1293
1182
|
this.widgetDeleted = new core.EventEmitter();
|
|
1294
1183
|
this.updateAppliedFilters = new core.EventEmitter();
|
|
1295
|
-
this.dataLoaded = new core.EventEmitter();
|
|
1296
|
-
this.widgetLoaded = new core.EventEmitter();
|
|
1297
1184
|
this.isWidgetStateApplicable = false;
|
|
1298
1185
|
this.widgetEmptyState = '';
|
|
1299
1186
|
this.lockVisible = false;
|
|
@@ -1318,7 +1205,7 @@
|
|
|
1318
1205
|
configurable: true
|
|
1319
1206
|
});
|
|
1320
1207
|
RAWidgetContainer.prototype.ngOnInit = function () {
|
|
1321
|
-
this.WidgetDisplayName = this.
|
|
1208
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1322
1209
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1323
1210
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1324
1211
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1339,32 +1226,19 @@
|
|
|
1339
1226
|
});
|
|
1340
1227
|
});
|
|
1341
1228
|
}
|
|
1342
|
-
if (this.widgetElement) {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
}
|
|
1348
|
-
if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1349
|
-
if (!this.dashboardInfo.curatedFilters) {
|
|
1350
|
-
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1351
|
-
if (filterObj.WidgetInstanceId) {
|
|
1352
|
-
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1353
|
-
this.refreshWidget(this.data.widgetInfo);
|
|
1354
|
-
}
|
|
1355
|
-
else {
|
|
1356
|
-
//this.refreshWidget(this.data.widgetInfo);
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1229
|
+
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1230
|
+
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1231
|
+
if (filterObj.WidgetInstanceId) {
|
|
1232
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1233
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1359
1234
|
}
|
|
1360
|
-
|
|
1361
|
-
(
|
|
1362
|
-
this.invokeWidgetResizedEvent();
|
|
1235
|
+
else {
|
|
1236
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1363
1237
|
}
|
|
1364
1238
|
}
|
|
1365
|
-
if (changes.
|
|
1366
|
-
|
|
1367
|
-
|
|
1239
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1240
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1241
|
+
this.invokeWidgetResizedEvent();
|
|
1368
1242
|
}
|
|
1369
1243
|
};
|
|
1370
1244
|
RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
|
|
@@ -1556,10 +1430,6 @@
|
|
|
1556
1430
|
_this.showPanel = true;
|
|
1557
1431
|
else
|
|
1558
1432
|
_this.showPanel = false;
|
|
1559
|
-
if (!_this.data.dataLoaded) {
|
|
1560
|
-
_this.data.dataLoaded = true;
|
|
1561
|
-
_this.dataLoaded.emit();
|
|
1562
|
-
}
|
|
1563
1433
|
break;
|
|
1564
1434
|
case 'onConfigEditClicked':
|
|
1565
1435
|
_this.editWidget();
|
|
@@ -1632,9 +1502,7 @@
|
|
|
1632
1502
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1633
1503
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1634
1504
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1635
|
-
|
|
1636
|
-
// this.widgetElement.loadContent(widgetConfigFilter);
|
|
1637
|
-
this.widgetLoaded.emit();
|
|
1505
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1638
1506
|
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
1639
1507
|
case 1:
|
|
1640
1508
|
_a.sent();
|
|
@@ -1904,12 +1772,9 @@
|
|
|
1904
1772
|
var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
1905
1773
|
var settings = '';
|
|
1906
1774
|
if (this.isWidgetMgmnt) {
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1911
|
-
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
1912
|
-
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1775
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1776
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1777
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1913
1778
|
}
|
|
1914
1779
|
var customPageParams = false;
|
|
1915
1780
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1918,14 +1783,14 @@
|
|
|
1918
1783
|
customPageParams = true;
|
|
1919
1784
|
}
|
|
1920
1785
|
}
|
|
1921
|
-
if (
|
|
1786
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1922
1787
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1923
1788
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1924
1789
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1925
1790
|
settings += this.translateService.translate('Common.visitpage');
|
|
1926
1791
|
settings += '</span></a>';
|
|
1927
1792
|
}
|
|
1928
|
-
if (
|
|
1793
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1929
1794
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1930
1795
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1931
1796
|
html += settings;
|
|
@@ -1957,7 +1822,7 @@
|
|
|
1957
1822
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1958
1823
|
html += this.getHr();
|
|
1959
1824
|
}
|
|
1960
|
-
if (this.isWidgetMgmnt
|
|
1825
|
+
if (this.isWidgetMgmnt) {
|
|
1961
1826
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1962
1827
|
html += this.deleteText;
|
|
1963
1828
|
html += '</span></a>';
|
|
@@ -2038,6 +1903,17 @@
|
|
|
2038
1903
|
if (this.currentComponent)
|
|
2039
1904
|
this.popupInstance.removeMe(this.currentComponent);
|
|
2040
1905
|
};
|
|
1906
|
+
RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
|
|
1907
|
+
var rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
1908
|
+
var translatedString = '';
|
|
1909
|
+
translatedString = this.translateService.translate('Common.' + rKey);
|
|
1910
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
1911
|
+
return item;
|
|
1912
|
+
}
|
|
1913
|
+
else {
|
|
1914
|
+
return translatedString;
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
2041
1917
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
2042
1918
|
{ type: RaDashboardService },
|
|
2043
1919
|
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
@@ -2080,10 +1956,6 @@
|
|
|
2080
1956
|
core.Input('global-filter'),
|
|
2081
1957
|
__metadata("design:type", Object)
|
|
2082
1958
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
2083
|
-
__decorate([
|
|
2084
|
-
core.Input('dashboard-info'),
|
|
2085
|
-
__metadata("design:type", Object)
|
|
2086
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
2087
1959
|
__decorate([
|
|
2088
1960
|
core.Input('data'),
|
|
2089
1961
|
__metadata("design:type", Object)
|
|
@@ -2108,14 +1980,6 @@
|
|
|
2108
1980
|
core.Input('grid-cell-height'),
|
|
2109
1981
|
__metadata("design:type", Number)
|
|
2110
1982
|
], RAWidgetContainer.prototype, "gridCellHeight", void 0);
|
|
2111
|
-
__decorate([
|
|
2112
|
-
core.Input('bulk-action-data'),
|
|
2113
|
-
__metadata("design:type", Object)
|
|
2114
|
-
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
2115
|
-
__decorate([
|
|
2116
|
-
core.Input(),
|
|
2117
|
-
__metadata("design:type", Boolean)
|
|
2118
|
-
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
2119
1983
|
__decorate([
|
|
2120
1984
|
core.Output(),
|
|
2121
1985
|
__metadata("design:type", Object)
|
|
@@ -2124,14 +1988,6 @@
|
|
|
2124
1988
|
core.Output(),
|
|
2125
1989
|
__metadata("design:type", Object)
|
|
2126
1990
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
2127
|
-
__decorate([
|
|
2128
|
-
core.Output(),
|
|
2129
|
-
__metadata("design:type", Object)
|
|
2130
|
-
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
2131
|
-
__decorate([
|
|
2132
|
-
core.Output(),
|
|
2133
|
-
__metadata("design:type", Object)
|
|
2134
|
-
], RAWidgetContainer.prototype, "widgetLoaded", void 0);
|
|
2135
1991
|
__decorate([
|
|
2136
1992
|
core.Input('dom-resized'),
|
|
2137
1993
|
__metadata("design:type", Boolean),
|
|
@@ -5130,13 +4986,11 @@
|
|
|
5130
4986
|
function RaBaseDashboardTemplate(ngZone) {
|
|
5131
4987
|
var _this = this;
|
|
5132
4988
|
this.ngZone = ngZone;
|
|
5133
|
-
this.initialize = function (eventBus, userDashboardId, appConfig
|
|
4989
|
+
this.initialize = function (eventBus, userDashboardId, appConfig) {
|
|
5134
4990
|
_this.ngZone.run(function () {
|
|
5135
4991
|
_this.userDashboardId = userDashboardId;
|
|
5136
4992
|
_this.appConfig = appConfig;
|
|
5137
4993
|
_this.raDashboardEventBus = eventBus;
|
|
5138
|
-
_this.dashboardInfo = dashboardInfo;
|
|
5139
|
-
_this.templateConfig = templateConfig;
|
|
5140
4994
|
});
|
|
5141
4995
|
_this.init();
|
|
5142
4996
|
};
|