@schneideress/dashboardframework 0.0.269 → 0.0.271
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 +54 -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 +20 -100
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +31 -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 +2 -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 +20 -107
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +31 -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 +2 -7
- package/esm5/lib/ra.event.enum.js +1 -7
- package/esm5/lib/ra.gridster.config.js +3 -3
- package/fesm2015/schneideress-dashboardframework.js +54 -190
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +54 -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.dashboard.service.d.ts +1 -0
- package/lib/ra.event.enum.d.ts +1 -7
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -228,6 +228,7 @@
|
|
|
228
228
|
function RaDashboardService(injector) {
|
|
229
229
|
var _this = _super.call(this, injector, '') || this;
|
|
230
230
|
_this.loadedScripts = [];
|
|
231
|
+
_this.clientId = undefined;
|
|
231
232
|
return _this;
|
|
232
233
|
}
|
|
233
234
|
/*
|
|
@@ -280,12 +281,6 @@
|
|
|
280
281
|
/**To Update widgetInfo in database */
|
|
281
282
|
RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
|
|
282
283
|
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
284
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
290
285
|
};
|
|
291
286
|
/** To Move or change position if current widget container*/
|
|
@@ -401,12 +396,6 @@
|
|
|
401
396
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
402
397
|
/**show inapplicable filter message in global filter flyout */
|
|
403
398
|
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
399
|
})(exports.RAEvent || (exports.RAEvent = {}));
|
|
411
400
|
|
|
412
401
|
(function (RAEventKey) {
|
|
@@ -420,9 +409,9 @@
|
|
|
420
409
|
margin: 10,
|
|
421
410
|
outerMargin: true,
|
|
422
411
|
outerMarginTop: 10,
|
|
423
|
-
outerMarginRight:
|
|
412
|
+
outerMarginRight: 10,
|
|
424
413
|
outerMarginBottom: 30,
|
|
425
|
-
outerMarginLeft:
|
|
414
|
+
outerMarginLeft: 10,
|
|
426
415
|
useTransformPositioning: true,
|
|
427
416
|
mobileBreakpoint: 640,
|
|
428
417
|
minCols: 10,
|
|
@@ -537,7 +526,7 @@
|
|
|
537
526
|
enumerable: true,
|
|
538
527
|
configurable: true
|
|
539
528
|
});
|
|
540
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt
|
|
529
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
541
530
|
var config = GridsterConfigDefaultSettings;
|
|
542
531
|
config.minCols = this.currentResInfo.maxCols;
|
|
543
532
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -559,13 +548,6 @@
|
|
|
559
548
|
config.swap = true;
|
|
560
549
|
config.draggable.enabled = true;
|
|
561
550
|
}
|
|
562
|
-
if (!resize) {
|
|
563
|
-
config.resizable.enabled = false;
|
|
564
|
-
config.swap = false;
|
|
565
|
-
}
|
|
566
|
-
if (!canMove) {
|
|
567
|
-
config.draggable.enabled = false;
|
|
568
|
-
}
|
|
569
551
|
return config;
|
|
570
552
|
};
|
|
571
553
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -573,9 +555,6 @@
|
|
|
573
555
|
if (widget.widgetSettings) {
|
|
574
556
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
575
557
|
}
|
|
576
|
-
if (widget.templateSettings) {
|
|
577
|
-
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
578
|
-
}
|
|
579
558
|
var gridsterItem = {
|
|
580
559
|
cols: this.getWidth(widget.width),
|
|
581
560
|
rows: this.getHeight(widget.height),
|
|
@@ -643,7 +622,6 @@
|
|
|
643
622
|
this.domResized = false;
|
|
644
623
|
this.showEmptyDashboard = false;
|
|
645
624
|
this.isWidgetMgmnt = false;
|
|
646
|
-
this.initialWidgetCount = 10;
|
|
647
625
|
this.widgetHeight = 2;
|
|
648
626
|
this.widgetWidth = 4;
|
|
649
627
|
this.hideDashboardBanner = new core.EventEmitter();
|
|
@@ -652,7 +630,6 @@
|
|
|
652
630
|
var _this = this;
|
|
653
631
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
654
632
|
this.initiateGridsterConfig();
|
|
655
|
-
this.setEmptyDashboardConfig();
|
|
656
633
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
657
634
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
658
635
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -681,11 +658,6 @@
|
|
|
681
658
|
}, 100);
|
|
682
659
|
}
|
|
683
660
|
});
|
|
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
661
|
};
|
|
690
662
|
RADashboardArea.prototype.ngOnChanges = function (changes) {
|
|
691
663
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -693,41 +665,28 @@
|
|
|
693
665
|
this.isWidgetLoaded = true;
|
|
694
666
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
695
667
|
}
|
|
696
|
-
this.initiateGridsterConfig();
|
|
697
668
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
698
669
|
this.inititateEventBusSubscritions();
|
|
699
670
|
}
|
|
700
671
|
};
|
|
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
672
|
/**To set GridsterConfig */
|
|
712
673
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
713
674
|
var _this = this;
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
if (
|
|
724
|
-
|
|
725
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
726
|
-
}
|
|
675
|
+
/**To override default configuration values to the gridster control */
|
|
676
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
|
|
677
|
+
this.options.initCallback = function (gridster) {
|
|
678
|
+
if (_this.options.api) {
|
|
679
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
this.options.itemChangeCallback = function (item) {
|
|
683
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
684
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
685
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
727
686
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
687
|
+
}
|
|
688
|
+
_this.setAreaHeight();
|
|
689
|
+
};
|
|
731
690
|
};
|
|
732
691
|
/** To initiate eventbus subsctiptions */
|
|
733
692
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -747,11 +706,6 @@
|
|
|
747
706
|
_this.addWidget(e);
|
|
748
707
|
});
|
|
749
708
|
});
|
|
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
709
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(exports.RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
756
710
|
_this.ngZone.run(function () {
|
|
757
711
|
_this.rearrangeWidgets();
|
|
@@ -800,10 +754,6 @@
|
|
|
800
754
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
801
755
|
if (this.rearrangeWidgetClick)
|
|
802
756
|
this.rearrangeWidgetClick.unsubscribe();
|
|
803
|
-
if (this.curatedFilterChange)
|
|
804
|
-
this.curatedFilterChange.unsubscribe();
|
|
805
|
-
if (this.bulkActionClick)
|
|
806
|
-
this.bulkActionClick.unsubscribe();
|
|
807
757
|
};
|
|
808
758
|
/**To update position/dimention of all widgets in the area */
|
|
809
759
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -840,8 +790,6 @@
|
|
|
840
790
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
841
791
|
RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
|
|
842
792
|
var _this = this;
|
|
843
|
-
if (this.templateConfig && this.templateConfig.initialWidgetCount)
|
|
844
|
-
this.initialWidgetCount = this.templateConfig.initialWidgetCount;
|
|
845
793
|
var widgetInfo = {
|
|
846
794
|
dashboardId: userDashboarId.toString(),
|
|
847
795
|
dashboardAreaKey: areaKey
|
|
@@ -849,6 +797,7 @@
|
|
|
849
797
|
this.widgetList = [];
|
|
850
798
|
this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe(function (widgets) {
|
|
851
799
|
_this.userWidgets = widgets;
|
|
800
|
+
_this.dashboardService.clientId = widgets[0].clientId;
|
|
852
801
|
_this.PAMWidgets = [];
|
|
853
802
|
widgets.forEach(function (element) {
|
|
854
803
|
var settings = undefined;
|
|
@@ -870,52 +819,6 @@
|
|
|
870
819
|
}
|
|
871
820
|
});
|
|
872
821
|
};
|
|
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
822
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
920
823
|
RADashboardArea.prototype.setAreaHeight = function () {
|
|
921
824
|
var _this = this;
|
|
@@ -1112,11 +1015,8 @@
|
|
|
1112
1015
|
});
|
|
1113
1016
|
return widgetListArray;
|
|
1114
1017
|
};
|
|
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);
|
|
1018
|
+
RADashboardArea.prototype.addNewWidget = function () {
|
|
1019
|
+
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1120
1020
|
};
|
|
1121
1021
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
1122
1022
|
this.raDashboardEventBus.publish(exports.RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -1166,14 +1066,6 @@
|
|
|
1166
1066
|
core.Input('app-config'),
|
|
1167
1067
|
__metadata("design:type", Object)
|
|
1168
1068
|
], 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
1069
|
__decorate([
|
|
1178
1070
|
core.Output(),
|
|
1179
1071
|
__metadata("design:type", Object)
|
|
@@ -1185,8 +1077,8 @@
|
|
|
1185
1077
|
RADashboardArea = __decorate([
|
|
1186
1078
|
core.Component({
|
|
1187
1079
|
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:#
|
|
1080
|
+
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>",
|
|
1081
|
+
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
1082
|
}),
|
|
1191
1083
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1192
1084
|
core.NgZone,
|
|
@@ -1289,11 +1181,8 @@
|
|
|
1289
1181
|
this.showExcell = true;
|
|
1290
1182
|
this.hideTitle = false;
|
|
1291
1183
|
this.inapplicableFilters = [];
|
|
1292
|
-
this.canLoadData = false;
|
|
1293
1184
|
this.widgetDeleted = new core.EventEmitter();
|
|
1294
1185
|
this.updateAppliedFilters = new core.EventEmitter();
|
|
1295
|
-
this.dataLoaded = new core.EventEmitter();
|
|
1296
|
-
this.widgetLoaded = new core.EventEmitter();
|
|
1297
1186
|
this.isWidgetStateApplicable = false;
|
|
1298
1187
|
this.widgetEmptyState = '';
|
|
1299
1188
|
this.lockVisible = false;
|
|
@@ -1318,7 +1207,7 @@
|
|
|
1318
1207
|
configurable: true
|
|
1319
1208
|
});
|
|
1320
1209
|
RAWidgetContainer.prototype.ngOnInit = function () {
|
|
1321
|
-
this.WidgetDisplayName = this.
|
|
1210
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1322
1211
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1323
1212
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1324
1213
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1339,32 +1228,19 @@
|
|
|
1339
1228
|
});
|
|
1340
1229
|
});
|
|
1341
1230
|
}
|
|
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
|
-
}
|
|
1231
|
+
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1232
|
+
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1233
|
+
if (filterObj.WidgetInstanceId) {
|
|
1234
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1235
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1359
1236
|
}
|
|
1360
|
-
|
|
1361
|
-
(
|
|
1362
|
-
this.invokeWidgetResizedEvent();
|
|
1237
|
+
else {
|
|
1238
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1363
1239
|
}
|
|
1364
1240
|
}
|
|
1365
|
-
if (changes.
|
|
1366
|
-
|
|
1367
|
-
|
|
1241
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1242
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1243
|
+
this.invokeWidgetResizedEvent();
|
|
1368
1244
|
}
|
|
1369
1245
|
};
|
|
1370
1246
|
RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
|
|
@@ -1556,10 +1432,6 @@
|
|
|
1556
1432
|
_this.showPanel = true;
|
|
1557
1433
|
else
|
|
1558
1434
|
_this.showPanel = false;
|
|
1559
|
-
if (!_this.data.dataLoaded) {
|
|
1560
|
-
_this.data.dataLoaded = true;
|
|
1561
|
-
_this.dataLoaded.emit();
|
|
1562
|
-
}
|
|
1563
1435
|
break;
|
|
1564
1436
|
case 'onConfigEditClicked':
|
|
1565
1437
|
_this.editWidget();
|
|
@@ -1632,9 +1504,7 @@
|
|
|
1632
1504
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1633
1505
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1634
1506
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1635
|
-
|
|
1636
|
-
// this.widgetElement.loadContent(widgetConfigFilter);
|
|
1637
|
-
this.widgetLoaded.emit();
|
|
1507
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1638
1508
|
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
1639
1509
|
case 1:
|
|
1640
1510
|
_a.sent();
|
|
@@ -1904,12 +1774,9 @@
|
|
|
1904
1774
|
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
1775
|
var settings = '';
|
|
1906
1776
|
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);
|
|
1777
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1778
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1779
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1913
1780
|
}
|
|
1914
1781
|
var customPageParams = false;
|
|
1915
1782
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1918,14 +1785,14 @@
|
|
|
1918
1785
|
customPageParams = true;
|
|
1919
1786
|
}
|
|
1920
1787
|
}
|
|
1921
|
-
if (
|
|
1788
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1922
1789
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1923
1790
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1924
1791
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1925
1792
|
settings += this.translateService.translate('Common.visitpage');
|
|
1926
1793
|
settings += '</span></a>';
|
|
1927
1794
|
}
|
|
1928
|
-
if (
|
|
1795
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1929
1796
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1930
1797
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1931
1798
|
html += settings;
|
|
@@ -1957,7 +1824,7 @@
|
|
|
1957
1824
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1958
1825
|
html += this.getHr();
|
|
1959
1826
|
}
|
|
1960
|
-
if (this.isWidgetMgmnt
|
|
1827
|
+
if (this.isWidgetMgmnt) {
|
|
1961
1828
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1962
1829
|
html += this.deleteText;
|
|
1963
1830
|
html += '</span></a>';
|
|
@@ -2038,6 +1905,18 @@
|
|
|
2038
1905
|
if (this.currentComponent)
|
|
2039
1906
|
this.popupInstance.removeMe(this.currentComponent);
|
|
2040
1907
|
};
|
|
1908
|
+
RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
|
|
1909
|
+
var rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
1910
|
+
var translatedString = '';
|
|
1911
|
+
var translationModule = this.dashboardService.clientId + '_DBW';
|
|
1912
|
+
translatedString = this.translateService.translate(translationModule + '.' + rKey);
|
|
1913
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
1914
|
+
return item;
|
|
1915
|
+
}
|
|
1916
|
+
else {
|
|
1917
|
+
return translatedString;
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
2041
1920
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
2042
1921
|
{ type: RaDashboardService },
|
|
2043
1922
|
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
@@ -2080,10 +1959,6 @@
|
|
|
2080
1959
|
core.Input('global-filter'),
|
|
2081
1960
|
__metadata("design:type", Object)
|
|
2082
1961
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
2083
|
-
__decorate([
|
|
2084
|
-
core.Input('dashboard-info'),
|
|
2085
|
-
__metadata("design:type", Object)
|
|
2086
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
2087
1962
|
__decorate([
|
|
2088
1963
|
core.Input('data'),
|
|
2089
1964
|
__metadata("design:type", Object)
|
|
@@ -2108,14 +1983,6 @@
|
|
|
2108
1983
|
core.Input('grid-cell-height'),
|
|
2109
1984
|
__metadata("design:type", Number)
|
|
2110
1985
|
], 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
1986
|
__decorate([
|
|
2120
1987
|
core.Output(),
|
|
2121
1988
|
__metadata("design:type", Object)
|
|
@@ -2124,14 +1991,6 @@
|
|
|
2124
1991
|
core.Output(),
|
|
2125
1992
|
__metadata("design:type", Object)
|
|
2126
1993
|
], 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
1994
|
__decorate([
|
|
2136
1995
|
core.Input('dom-resized'),
|
|
2137
1996
|
__metadata("design:type", Boolean),
|
|
@@ -5130,13 +4989,11 @@
|
|
|
5130
4989
|
function RaBaseDashboardTemplate(ngZone) {
|
|
5131
4990
|
var _this = this;
|
|
5132
4991
|
this.ngZone = ngZone;
|
|
5133
|
-
this.initialize = function (eventBus, userDashboardId, appConfig
|
|
4992
|
+
this.initialize = function (eventBus, userDashboardId, appConfig) {
|
|
5134
4993
|
_this.ngZone.run(function () {
|
|
5135
4994
|
_this.userDashboardId = userDashboardId;
|
|
5136
4995
|
_this.appConfig = appConfig;
|
|
5137
4996
|
_this.raDashboardEventBus = eventBus;
|
|
5138
|
-
_this.dashboardInfo = dashboardInfo;
|
|
5139
|
-
_this.templateConfig = templateConfig;
|
|
5140
4997
|
});
|
|
5141
4998
|
_this.init();
|
|
5142
4999
|
};
|