@schneideress/dashboardframework 0.0.10 → 0.0.11
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 +70 -28
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/custom.notifier.options.js +46 -0
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +15 -5
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +18 -7
- package/esm2015/lib/ra.dashboard.module.js +5 -2
- package/esm2015/lib/ra.dashboard.service.js +1 -8
- package/esm2015/schneideress-dashboardframework.js +2 -1
- package/esm5/lib/custom.notifier.options.js +46 -0
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +14 -5
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +17 -7
- package/esm5/lib/ra.dashboard.module.js +5 -2
- package/esm5/lib/ra.dashboard.service.js +1 -14
- package/esm5/schneideress-dashboardframework.js +2 -1
- package/fesm2015/schneideress-dashboardframework.js +69 -19
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +67 -25
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/custom.notifier.options.d.ts +2 -0
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +3 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +3 -1
- package/lib/ra.dashboard.service.d.ts +0 -2
- package/package.json +1 -1
- package/schneideress-dashboardframework.d.ts +1 -0
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ess-util'), require('rxjs/operators'), require('ngx-ui-loader'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ess-util', 'rxjs/operators', 'ngx-ui-loader', '@angular/platform-browser', '@angular/common/http', '@angular/common'], factory) :
|
|
4
|
-
(global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global.essUtil, global.rxjs.operators, global.ngxUiLoader, global.ng.platformBrowser, global.ng.common.http, global.ng.common));
|
|
5
|
-
}(this, function (exports, core, rxjs, essUtil, operators, ngxUiLoader, platformBrowser, http, common) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ess-util'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ess-util', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@angular/platform-browser', '@angular/common/http', '@angular/common'], factory) :
|
|
4
|
+
(global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global.essUtil, global.rxjs.operators, global.ngxUiLoader, global.angularNotifier, global.ng.platformBrowser, global.ng.common.http, global.ng.common));
|
|
5
|
+
}(this, function (exports, core, rxjs, essUtil, operators, ngxUiLoader, angularNotifier, platformBrowser, http, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -239,19 +239,6 @@
|
|
|
239
239
|
*/
|
|
240
240
|
function (widgetInfo) {
|
|
241
241
|
};
|
|
242
|
-
/** To Collapse current widget*/
|
|
243
|
-
/**
|
|
244
|
-
* To Collapse current widget
|
|
245
|
-
* @param {?} widgetInfo
|
|
246
|
-
* @return {?}
|
|
247
|
-
*/
|
|
248
|
-
RaDashboardService.prototype.collapse = /**
|
|
249
|
-
* To Collapse current widget
|
|
250
|
-
* @param {?} widgetInfo
|
|
251
|
-
* @return {?}
|
|
252
|
-
*/
|
|
253
|
-
function (widgetInfo) {
|
|
254
|
-
};
|
|
255
242
|
RaDashboardService.decorators = [
|
|
256
243
|
{ type: core.Injectable, args: [{
|
|
257
244
|
providedIn: 'root'
|
|
@@ -513,10 +500,11 @@
|
|
|
513
500
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
514
501
|
*/
|
|
515
502
|
var RADashboardArea = /** @class */ (function () {
|
|
516
|
-
function RADashboardArea(dashboardService, ngZone, ngxService) {
|
|
503
|
+
function RADashboardArea(dashboardService, ngZone, ngxService, notifier) {
|
|
517
504
|
this.dashboardService = dashboardService;
|
|
518
505
|
this.ngZone = ngZone;
|
|
519
506
|
this.ngxService = ngxService;
|
|
507
|
+
this.notifier = notifier;
|
|
520
508
|
this.widgetList = Array();
|
|
521
509
|
this.gridheight = 300;
|
|
522
510
|
this.widgetHeight = 20;
|
|
@@ -701,6 +689,7 @@
|
|
|
701
689
|
if (widget.length > 0) {
|
|
702
690
|
this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
|
|
703
691
|
this.setAreaHeight();
|
|
692
|
+
this.notifier.notify('success', "Widget (" + widget[0].widgetInfo.widgetTitle + ") deleted successfully!");
|
|
704
693
|
}
|
|
705
694
|
};
|
|
706
695
|
/**To add widget instance to the database with the next available position and to make changes in
|
|
@@ -744,7 +733,7 @@
|
|
|
744
733
|
gridsterItem = _this.mapObjectsToGridsterItem(widget);
|
|
745
734
|
_this.widgetList.push(gridsterItem);
|
|
746
735
|
_this.setAreaHeight();
|
|
747
|
-
|
|
736
|
+
//this.ngxService.stop();
|
|
748
737
|
}));
|
|
749
738
|
};
|
|
750
739
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -832,7 +821,7 @@
|
|
|
832
821
|
RADashboardArea.decorators = [
|
|
833
822
|
{ type: core.Component, args: [{
|
|
834
823
|
selector: 'ra-dashboard-area',
|
|
835
|
-
template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\">\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n</div>\r\n\r\n",
|
|
824
|
+
template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\">\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
|
|
836
825
|
styles: ["gridster{width:inherit;resize:height;display:flex;min-height:600px}gridster-item{border:1px solid #ccc;background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
|
|
837
826
|
}] }
|
|
838
827
|
];
|
|
@@ -840,7 +829,8 @@
|
|
|
840
829
|
RADashboardArea.ctorParameters = function () { return [
|
|
841
830
|
{ type: RaDashboardService },
|
|
842
831
|
{ type: core.NgZone },
|
|
843
|
-
{ type: ngxUiLoader.NgxUiLoaderService }
|
|
832
|
+
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
833
|
+
{ type: angularNotifier.NotifierService }
|
|
844
834
|
]; };
|
|
845
835
|
RADashboardArea.propDecorators = {
|
|
846
836
|
userDashboardId: [{ type: core.Input, args: ['user-dashboard-id',] }],
|
|
@@ -859,9 +849,10 @@
|
|
|
859
849
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
860
850
|
*/
|
|
861
851
|
var RAWidgetContainer = /** @class */ (function () {
|
|
862
|
-
function RAWidgetContainer(dashboardService, ngxService) {
|
|
852
|
+
function RAWidgetContainer(dashboardService, ngxService, notifier) {
|
|
863
853
|
this.dashboardService = dashboardService;
|
|
864
854
|
this.ngxService = ngxService;
|
|
855
|
+
this.notifier = notifier;
|
|
865
856
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
866
857
|
this.widgetDeleted = new core.EventEmitter();
|
|
867
858
|
}
|
|
@@ -944,9 +935,12 @@
|
|
|
944
935
|
*/
|
|
945
936
|
function (status) {
|
|
946
937
|
widgetContainerContext.ngxService.stop();
|
|
947
|
-
{
|
|
938
|
+
if (status) {
|
|
948
939
|
widgetContainerContext.widgetDeleted.emit(_this.data.widgetInfo.widgetInstanceId);
|
|
949
940
|
}
|
|
941
|
+
else {
|
|
942
|
+
widgetContainerContext.notifier.notify('error', "Failed to remove widget (" + _this.data.widgetInfo.widgetTitle + ")!");
|
|
943
|
+
}
|
|
950
944
|
}));
|
|
951
945
|
};
|
|
952
946
|
/** To Move or change position if current widget container*/
|
|
@@ -959,7 +953,6 @@
|
|
|
959
953
|
* @return {?}
|
|
960
954
|
*/
|
|
961
955
|
function () {
|
|
962
|
-
console.log('in move widget');
|
|
963
956
|
this.raDashboardEventBus.publish(RAEvent.MoveWidget, this.data.widgetInfo);
|
|
964
957
|
// this.dashboardService.moveWidget(widgetInfo);
|
|
965
958
|
};
|
|
@@ -1066,14 +1059,15 @@
|
|
|
1066
1059
|
RAWidgetContainer.decorators = [
|
|
1067
1060
|
{ type: core.Component, args: [{
|
|
1068
1061
|
selector: 'ra-widget-container',
|
|
1069
|
-
template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.title?data.widgetInfo.title:\"Title\"}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content\">\r\n <a (click)=\"editWidget()\">Edit</a>\r\n <a (click)=\"copyWidget()\">Copy</a>\r\n <a (click)=\"moveWidget()\">Move</a> \r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">Delete</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>\r\n",
|
|
1070
|
-
styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{display:none;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content,.wc-wrapper:hover .dropdown{display:block}.dropdown:hover .dropbtn{color:#2b7797}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}"]
|
|
1062
|
+
template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.title?data.widgetInfo.title:\"Title\"}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content\">\r\n <a (click)=\"editWidget()\">Edit</a>\r\n <a (click)=\"copyWidget()\">Copy</a>\r\n <a (click)=\"moveWidget()\">Move</a> \r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">Delete</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>\r\n",
|
|
1063
|
+
styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{display:none;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content,.wc-wrapper:hover .dropdown{display:block}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}"]
|
|
1071
1064
|
}] }
|
|
1072
1065
|
];
|
|
1073
1066
|
/** @nocollapse */
|
|
1074
1067
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
1075
1068
|
{ type: RaDashboardService },
|
|
1076
|
-
{ type: ngxUiLoader.NgxUiLoaderService }
|
|
1069
|
+
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
1070
|
+
{ type: angularNotifier.NotifierService }
|
|
1077
1071
|
]; };
|
|
1078
1072
|
RAWidgetContainer.propDecorators = {
|
|
1079
1073
|
ctlWidget: [{ type: core.ViewChild, args: ['ctlWidget', { static: false },] }],
|
|
@@ -1087,6 +1081,52 @@
|
|
|
1087
1081
|
return RAWidgetContainer;
|
|
1088
1082
|
}());
|
|
1089
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* @fileoverview added by tsickle
|
|
1086
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1087
|
+
*/
|
|
1088
|
+
/** @type {?} */
|
|
1089
|
+
var customNotifierOptions = {
|
|
1090
|
+
position: {
|
|
1091
|
+
horizontal: {
|
|
1092
|
+
position: 'right',
|
|
1093
|
+
distance: 12
|
|
1094
|
+
},
|
|
1095
|
+
vertical: {
|
|
1096
|
+
position: 'top',
|
|
1097
|
+
distance: 12,
|
|
1098
|
+
gap: 10
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
theme: 'material',
|
|
1102
|
+
behaviour: {
|
|
1103
|
+
autoHide: 5000,
|
|
1104
|
+
onClick: 'hide',
|
|
1105
|
+
onMouseover: 'pauseAutoHide',
|
|
1106
|
+
showDismissButton: true,
|
|
1107
|
+
stacking: 4
|
|
1108
|
+
},
|
|
1109
|
+
animations: {
|
|
1110
|
+
enabled: true,
|
|
1111
|
+
show: {
|
|
1112
|
+
preset: 'slide',
|
|
1113
|
+
speed: 300,
|
|
1114
|
+
easing: 'ease'
|
|
1115
|
+
},
|
|
1116
|
+
hide: {
|
|
1117
|
+
preset: 'fade',
|
|
1118
|
+
speed: 300,
|
|
1119
|
+
easing: 'ease',
|
|
1120
|
+
offset: 50
|
|
1121
|
+
},
|
|
1122
|
+
shift: {
|
|
1123
|
+
speed: 300,
|
|
1124
|
+
easing: 'ease'
|
|
1125
|
+
},
|
|
1126
|
+
overlap: 150
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
|
|
1090
1130
|
/**
|
|
1091
1131
|
* @fileoverview added by tsickle
|
|
1092
1132
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -5602,7 +5642,8 @@
|
|
|
5602
5642
|
platformBrowser.BrowserModule,
|
|
5603
5643
|
GridsterModule,
|
|
5604
5644
|
http.HttpClientModule,
|
|
5605
|
-
ngxUiLoader.NgxUiLoaderModule
|
|
5645
|
+
ngxUiLoader.NgxUiLoaderModule,
|
|
5646
|
+
angularNotifier.NotifierModule.withConfig(customNotifierOptions)
|
|
5606
5647
|
],
|
|
5607
5648
|
exports: [
|
|
5608
5649
|
RADashboardArea
|
|
@@ -5688,6 +5729,7 @@
|
|
|
5688
5729
|
exports.ɵb = GridsterComponent;
|
|
5689
5730
|
exports.ɵc = GridsterItemComponent;
|
|
5690
5731
|
exports.ɵd = GridsterPreviewComponent;
|
|
5732
|
+
exports.ɵe = customNotifierOptions;
|
|
5691
5733
|
|
|
5692
5734
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5693
5735
|
|