@schneideress/dashboardframework 0.0.268 → 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 -192
- 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 -101
- 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 -102
- 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 -191
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +51 -192
- 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,47 +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
|
-
};
|
|
882
|
-
RADashboardArea.prototype.startLoadWidgetData = function (lst) {
|
|
883
|
-
if (lst) {
|
|
884
|
-
if (lst.length < this.initialWidgetCount) {
|
|
885
|
-
for (var i = 0; i < lst.length; i++)
|
|
886
|
-
this.loadWidgetData(lst[i]);
|
|
887
|
-
}
|
|
888
|
-
else
|
|
889
|
-
for (var i = 0; i < this.initialWidgetCount; i++)
|
|
890
|
-
this.loadWidgetData(lst[i]);
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
RADashboardArea.prototype.loadWidgetData = function (widget) {
|
|
894
|
-
var _this = this;
|
|
895
|
-
widget.dataTriggered = true;
|
|
896
|
-
if (widget.widgetLoaded) {
|
|
897
|
-
setTimeout(function () {
|
|
898
|
-
widget.canLoadData = true;
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
else
|
|
902
|
-
setTimeout(function () {
|
|
903
|
-
_this.loadWidgetData(widget);
|
|
904
|
-
}, 1000);
|
|
905
|
-
};
|
|
906
|
-
RADashboardArea.prototype.dataLoaded = function () {
|
|
907
|
-
for (var i = 0; i < this.widgetList.length; i++) {
|
|
908
|
-
if (!this.widgetList[i].dataTriggered) {
|
|
909
|
-
this.loadWidgetData(this.widgetList[i]);
|
|
910
|
-
break;
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
820
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
915
821
|
RADashboardArea.prototype.setAreaHeight = function () {
|
|
916
822
|
var _this = this;
|
|
@@ -1107,11 +1013,8 @@
|
|
|
1107
1013
|
});
|
|
1108
1014
|
return widgetListArray;
|
|
1109
1015
|
};
|
|
1110
|
-
RADashboardArea.prototype.
|
|
1111
|
-
|
|
1112
|
-
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1113
|
-
else if (this.emptyDashboardButtonAction == "filter")
|
|
1114
|
-
this.raDashboardEventBus.publish(exports.RAEvent.GlobalFilterClick, null);
|
|
1016
|
+
RADashboardArea.prototype.addNewWidget = function () {
|
|
1017
|
+
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1115
1018
|
};
|
|
1116
1019
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
1117
1020
|
this.raDashboardEventBus.publish(exports.RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -1161,14 +1064,6 @@
|
|
|
1161
1064
|
core.Input('app-config'),
|
|
1162
1065
|
__metadata("design:type", Object)
|
|
1163
1066
|
], RADashboardArea.prototype, "appConfig", void 0);
|
|
1164
|
-
__decorate([
|
|
1165
|
-
core.Input('dashboard-info'),
|
|
1166
|
-
__metadata("design:type", Object)
|
|
1167
|
-
], RADashboardArea.prototype, "dashboardInfo", void 0);
|
|
1168
|
-
__decorate([
|
|
1169
|
-
core.Input(),
|
|
1170
|
-
__metadata("design:type", Object)
|
|
1171
|
-
], RADashboardArea.prototype, "templateConfig", void 0);
|
|
1172
1067
|
__decorate([
|
|
1173
1068
|
core.Output(),
|
|
1174
1069
|
__metadata("design:type", Object)
|
|
@@ -1180,8 +1075,8 @@
|
|
|
1180
1075
|
RADashboardArea = __decorate([
|
|
1181
1076
|
core.Component({
|
|
1182
1077
|
selector: 'ra-dashboard-area',
|
|
1183
|
-
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
|
|
1184
|
-
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}}"]
|
|
1185
1080
|
}),
|
|
1186
1081
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1187
1082
|
core.NgZone,
|
|
@@ -1284,11 +1179,8 @@
|
|
|
1284
1179
|
this.showExcell = true;
|
|
1285
1180
|
this.hideTitle = false;
|
|
1286
1181
|
this.inapplicableFilters = [];
|
|
1287
|
-
this.canLoadData = false;
|
|
1288
1182
|
this.widgetDeleted = new core.EventEmitter();
|
|
1289
1183
|
this.updateAppliedFilters = new core.EventEmitter();
|
|
1290
|
-
this.dataLoaded = new core.EventEmitter();
|
|
1291
|
-
this.widgetLoaded = new core.EventEmitter();
|
|
1292
1184
|
this.isWidgetStateApplicable = false;
|
|
1293
1185
|
this.widgetEmptyState = '';
|
|
1294
1186
|
this.lockVisible = false;
|
|
@@ -1313,7 +1205,7 @@
|
|
|
1313
1205
|
configurable: true
|
|
1314
1206
|
});
|
|
1315
1207
|
RAWidgetContainer.prototype.ngOnInit = function () {
|
|
1316
|
-
this.WidgetDisplayName = this.
|
|
1208
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1317
1209
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1318
1210
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1319
1211
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1334,32 +1226,19 @@
|
|
|
1334
1226
|
});
|
|
1335
1227
|
});
|
|
1336
1228
|
}
|
|
1337
|
-
if (this.widgetElement) {
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
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);
|
|
1342
1234
|
}
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1346
|
-
if (filterObj.WidgetInstanceId) {
|
|
1347
|
-
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1348
|
-
this.refreshWidget(this.data.widgetInfo);
|
|
1349
|
-
}
|
|
1350
|
-
else {
|
|
1351
|
-
//this.refreshWidget(this.data.widgetInfo);
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1356
|
-
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1357
|
-
this.invokeWidgetResizedEvent();
|
|
1235
|
+
else {
|
|
1236
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1358
1237
|
}
|
|
1359
1238
|
}
|
|
1360
|
-
if (changes.
|
|
1361
|
-
|
|
1362
|
-
|
|
1239
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1240
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1241
|
+
this.invokeWidgetResizedEvent();
|
|
1363
1242
|
}
|
|
1364
1243
|
};
|
|
1365
1244
|
RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
|
|
@@ -1551,10 +1430,6 @@
|
|
|
1551
1430
|
_this.showPanel = true;
|
|
1552
1431
|
else
|
|
1553
1432
|
_this.showPanel = false;
|
|
1554
|
-
if (!_this.data.dataLoaded) {
|
|
1555
|
-
_this.data.dataLoaded = true;
|
|
1556
|
-
_this.dataLoaded.emit();
|
|
1557
|
-
}
|
|
1558
1433
|
break;
|
|
1559
1434
|
case 'onConfigEditClicked':
|
|
1560
1435
|
_this.editWidget();
|
|
@@ -1627,9 +1502,7 @@
|
|
|
1627
1502
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1628
1503
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1629
1504
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1630
|
-
|
|
1631
|
-
// this.widgetElement.loadContent(widgetConfigFilter);
|
|
1632
|
-
this.widgetLoaded.emit();
|
|
1505
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1633
1506
|
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
1634
1507
|
case 1:
|
|
1635
1508
|
_a.sent();
|
|
@@ -1899,12 +1772,9 @@
|
|
|
1899
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;">';
|
|
1900
1773
|
var settings = '';
|
|
1901
1774
|
if (this.isWidgetMgmnt) {
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1906
|
-
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
1907
|
-
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);
|
|
1908
1778
|
}
|
|
1909
1779
|
var customPageParams = false;
|
|
1910
1780
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1913,14 +1783,14 @@
|
|
|
1913
1783
|
customPageParams = true;
|
|
1914
1784
|
}
|
|
1915
1785
|
}
|
|
1916
|
-
if (
|
|
1786
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1917
1787
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1918
1788
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1919
1789
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1920
1790
|
settings += this.translateService.translate('Common.visitpage');
|
|
1921
1791
|
settings += '</span></a>';
|
|
1922
1792
|
}
|
|
1923
|
-
if (
|
|
1793
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1924
1794
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1925
1795
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1926
1796
|
html += settings;
|
|
@@ -1952,7 +1822,7 @@
|
|
|
1952
1822
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1953
1823
|
html += this.getHr();
|
|
1954
1824
|
}
|
|
1955
|
-
if (this.isWidgetMgmnt
|
|
1825
|
+
if (this.isWidgetMgmnt) {
|
|
1956
1826
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1957
1827
|
html += this.deleteText;
|
|
1958
1828
|
html += '</span></a>';
|
|
@@ -2033,6 +1903,17 @@
|
|
|
2033
1903
|
if (this.currentComponent)
|
|
2034
1904
|
this.popupInstance.removeMe(this.currentComponent);
|
|
2035
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
|
+
};
|
|
2036
1917
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
2037
1918
|
{ type: RaDashboardService },
|
|
2038
1919
|
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
@@ -2075,10 +1956,6 @@
|
|
|
2075
1956
|
core.Input('global-filter'),
|
|
2076
1957
|
__metadata("design:type", Object)
|
|
2077
1958
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
2078
|
-
__decorate([
|
|
2079
|
-
core.Input('dashboard-info'),
|
|
2080
|
-
__metadata("design:type", Object)
|
|
2081
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
2082
1959
|
__decorate([
|
|
2083
1960
|
core.Input('data'),
|
|
2084
1961
|
__metadata("design:type", Object)
|
|
@@ -2103,14 +1980,6 @@
|
|
|
2103
1980
|
core.Input('grid-cell-height'),
|
|
2104
1981
|
__metadata("design:type", Number)
|
|
2105
1982
|
], RAWidgetContainer.prototype, "gridCellHeight", void 0);
|
|
2106
|
-
__decorate([
|
|
2107
|
-
core.Input('bulk-action-data'),
|
|
2108
|
-
__metadata("design:type", Object)
|
|
2109
|
-
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
2110
|
-
__decorate([
|
|
2111
|
-
core.Input(),
|
|
2112
|
-
__metadata("design:type", Boolean)
|
|
2113
|
-
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
2114
1983
|
__decorate([
|
|
2115
1984
|
core.Output(),
|
|
2116
1985
|
__metadata("design:type", Object)
|
|
@@ -2119,14 +1988,6 @@
|
|
|
2119
1988
|
core.Output(),
|
|
2120
1989
|
__metadata("design:type", Object)
|
|
2121
1990
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
2122
|
-
__decorate([
|
|
2123
|
-
core.Output(),
|
|
2124
|
-
__metadata("design:type", Object)
|
|
2125
|
-
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
2126
|
-
__decorate([
|
|
2127
|
-
core.Output(),
|
|
2128
|
-
__metadata("design:type", Object)
|
|
2129
|
-
], RAWidgetContainer.prototype, "widgetLoaded", void 0);
|
|
2130
1991
|
__decorate([
|
|
2131
1992
|
core.Input('dom-resized'),
|
|
2132
1993
|
__metadata("design:type", Boolean),
|
|
@@ -5125,13 +4986,11 @@
|
|
|
5125
4986
|
function RaBaseDashboardTemplate(ngZone) {
|
|
5126
4987
|
var _this = this;
|
|
5127
4988
|
this.ngZone = ngZone;
|
|
5128
|
-
this.initialize = function (eventBus, userDashboardId, appConfig
|
|
4989
|
+
this.initialize = function (eventBus, userDashboardId, appConfig) {
|
|
5129
4990
|
_this.ngZone.run(function () {
|
|
5130
4991
|
_this.userDashboardId = userDashboardId;
|
|
5131
4992
|
_this.appConfig = appConfig;
|
|
5132
4993
|
_this.raDashboardEventBus = eventBus;
|
|
5133
|
-
_this.dashboardInfo = dashboardInfo;
|
|
5134
|
-
_this.templateConfig = templateConfig;
|
|
5135
4994
|
});
|
|
5136
4995
|
_this.init();
|
|
5137
4996
|
};
|