@schneideress/dashboardframework 0.0.33 → 0.0.34
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 +55 -37
- 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/ra-dashboard-area/ra.dashboard.area.js +16 -5
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +20 -28
- package/esm2015/lib/ra.dashboard.module.js +14 -3
- package/esm2015/lib/ra.event.enum.js +3 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +17 -5
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +23 -28
- package/esm5/lib/ra.dashboard.module.js +14 -3
- package/esm5/lib/ra.event.enum.js +3 -1
- package/fesm2015/schneideress-dashboardframework.js +48 -33
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +52 -33
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +4 -3
- package/lib/ra.event.enum.d.ts +3 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -7,6 +7,7 @@ import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
|
7
7
|
import { TranslateService, TranslateModule } from '@schneideress/ess-base';
|
|
8
8
|
import { BrowserModule } from '@angular/platform-browser';
|
|
9
9
|
import { HttpClientModule } from '@angular/common/http';
|
|
10
|
+
import { PerfectScrollbarModule, PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
|
|
10
11
|
import { CommonModule } from '@angular/common';
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -268,6 +269,8 @@ const RAEvent = {
|
|
|
268
269
|
widgetLibraryDoneClick: "widgetLibraryDoneClick",
|
|
269
270
|
/**refresh favorite icon after srtting and resetting favorites */
|
|
270
271
|
favoriteIconRefresh: "favoriteIconRefresh",
|
|
272
|
+
/**to refresh menu content */
|
|
273
|
+
QuickLinkRefresh: "QuickLinkRefresh",
|
|
271
274
|
};
|
|
272
275
|
/** @enum {string} */
|
|
273
276
|
const RAEventKey = {
|
|
@@ -763,6 +766,12 @@ class RADashboardArea {
|
|
|
763
766
|
let areaScrollHeight = 0;
|
|
764
767
|
/** @type {?} */
|
|
765
768
|
let areaHeight = 0;
|
|
769
|
+
/** @type {?} */
|
|
770
|
+
let curRowHeight = 0;
|
|
771
|
+
if (this.options.api) {
|
|
772
|
+
curRowHeight = this.options.api.getCurrentRowHeight();
|
|
773
|
+
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
774
|
+
}
|
|
766
775
|
this.widgetList.forEach((/**
|
|
767
776
|
* @param {?} t
|
|
768
777
|
* @return {?}
|
|
@@ -773,10 +782,14 @@ class RADashboardArea {
|
|
|
773
782
|
if (currentHeight > areaScrollHeight) {
|
|
774
783
|
areaScrollHeight = currentHeight;
|
|
775
784
|
}
|
|
785
|
+
if (curRowHeight == 0 || curRowHeight == 2) {
|
|
786
|
+
if (this.widgetList && this.widgetList.length > 0)
|
|
787
|
+
t.widgetInfo.rowHeight = this.widgetList[0].curRowHeight;
|
|
788
|
+
}
|
|
789
|
+
else {
|
|
790
|
+
t.widgetInfo.rowHeight = curRowHeight;
|
|
791
|
+
}
|
|
776
792
|
}));
|
|
777
|
-
if (this.options.api) {
|
|
778
|
-
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
779
|
-
}
|
|
780
793
|
if (areaHeight < 600) {
|
|
781
794
|
areaHeight = 600;
|
|
782
795
|
}
|
|
@@ -900,6 +913,7 @@ class RADashboardArea {
|
|
|
900
913
|
widget.width = widgetItem.cols;
|
|
901
914
|
widget.position_x = widgetItem.x;
|
|
902
915
|
widget.position_y = widgetItem.y;
|
|
916
|
+
widget.rowHeight = widgetItem.curRowHeight;
|
|
903
917
|
return widget;
|
|
904
918
|
}
|
|
905
919
|
/**
|
|
@@ -922,7 +936,7 @@ class RADashboardArea {
|
|
|
922
936
|
RADashboardArea.decorators = [
|
|
923
937
|
{ type: Component, args: [{
|
|
924
938
|
selector: 'ra-dashboard-area',
|
|
925
|
-
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-width]=\"item.cols\" [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",
|
|
939
|
+
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-width]=\"item.cols\" [widget-height]=\"item.rows\" [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",
|
|
926
940
|
styles: ["gridster{width:inherit;resize:height;display:flex}gridster-item{background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
|
|
927
941
|
}] }
|
|
928
942
|
];
|
|
@@ -1036,8 +1050,6 @@ class RAWidgetContainer {
|
|
|
1036
1050
|
this.notifier = notifier;
|
|
1037
1051
|
this.isWidgetLoaded = false;
|
|
1038
1052
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
1039
|
-
this.lockStatus = "unlock";
|
|
1040
|
-
this.lockClass = "unlock";
|
|
1041
1053
|
this.widgetDeleted = new EventEmitter();
|
|
1042
1054
|
}
|
|
1043
1055
|
/**
|
|
@@ -1062,11 +1074,14 @@ class RAWidgetContainer {
|
|
|
1062
1074
|
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1063
1075
|
this.refreshWidget(this.data.widgetInfo);
|
|
1064
1076
|
}
|
|
1065
|
-
if (changes.
|
|
1077
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue) {
|
|
1066
1078
|
this.data.widgetInfo.isDimensionUpdate = true;
|
|
1067
1079
|
this.refreshWidget(this.data.widgetInfo);
|
|
1068
1080
|
this.data.widgetInfo.isDimensionUpdate = false;
|
|
1069
1081
|
}
|
|
1082
|
+
if (changes.height && changes.height.currentValue != changes.height.previousValue) {
|
|
1083
|
+
this.setWidgetheight();
|
|
1084
|
+
}
|
|
1070
1085
|
}
|
|
1071
1086
|
/**
|
|
1072
1087
|
* @return {?}
|
|
@@ -1140,6 +1155,12 @@ class RAWidgetContainer {
|
|
|
1140
1155
|
this.refreshWidget(this.data.widgetInfo);
|
|
1141
1156
|
// this.updateWidget(widgetInfo);
|
|
1142
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* @return {?}
|
|
1160
|
+
*/
|
|
1161
|
+
setWidgetheight() {
|
|
1162
|
+
this.widgetHeight = this.data.widgetInfo.height * this.data.widgetInfo.rowHeight + 2;
|
|
1163
|
+
}
|
|
1143
1164
|
/**
|
|
1144
1165
|
* To load external custom element to the widget container
|
|
1145
1166
|
* @param {?} widgetInfo
|
|
@@ -1171,6 +1192,7 @@ class RAWidgetContainer {
|
|
|
1171
1192
|
}));
|
|
1172
1193
|
this.ctlWidget.nativeElement.appendChild(this.widgetElement);
|
|
1173
1194
|
}));
|
|
1195
|
+
this.setWidgetheight();
|
|
1174
1196
|
}
|
|
1175
1197
|
/**
|
|
1176
1198
|
* To refresh widget on input config changes
|
|
@@ -1189,31 +1211,14 @@ class RAWidgetContainer {
|
|
|
1189
1211
|
}));
|
|
1190
1212
|
if (widgetContainerContext.isWidgetLoaded) {
|
|
1191
1213
|
widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
|
|
1192
|
-
this.lockStatus = widgetContainerContext.widgetElement.loadLockStatus();
|
|
1193
|
-
if (this.lockStatus) {
|
|
1194
|
-
switch (this.lockStatus) {
|
|
1195
|
-
case "lock": {
|
|
1196
|
-
this.lockClass = "fa fa-lock locked";
|
|
1197
|
-
}
|
|
1198
|
-
case "unlock": {
|
|
1199
|
-
this.lockClass = "unlock";
|
|
1200
|
-
}
|
|
1201
|
-
case "partiallock": {
|
|
1202
|
-
this.lockClass = "fa fa-lock partiallocked";
|
|
1203
|
-
}
|
|
1204
|
-
default: {
|
|
1205
|
-
this.lockClass = "unlock";
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
1214
|
}
|
|
1210
1215
|
}
|
|
1211
1216
|
}
|
|
1212
1217
|
RAWidgetContainer.decorators = [
|
|
1213
1218
|
{ type: Component, args: [{
|
|
1214
1219
|
selector: 'ra-widget-container',
|
|
1215
|
-
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.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\"
|
|
1216
|
-
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{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;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{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}
|
|
1220
|
+
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.widgetTitle}}\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 widget-config-item\">\r\n <a (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'Edit'|translate}}</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>{{'Copy'|translate}}</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>{{'Move'|translate}}</span>\r\n </a>\r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;\"></i>\r\n <span>{{'Delete'|translate}}</span>\r\n </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\" [style.height.px]=\"widgetHeight\">\r\n <perfect-scrollbar>\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </perfect-scrollbar>\r\n </div>\r\n</div>\r\n",
|
|
1221
|
+
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{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;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{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]
|
|
1217
1222
|
}] }
|
|
1218
1223
|
];
|
|
1219
1224
|
/** @nocollapse */
|
|
@@ -1231,7 +1236,8 @@ RAWidgetContainer.propDecorators = {
|
|
|
1231
1236
|
data: [{ type: Input, args: ['data',] }],
|
|
1232
1237
|
raDashboardEventBus: [{ type: Input, args: ['event-bus',] }],
|
|
1233
1238
|
appConfig: [{ type: Input, args: ['app-config',] }],
|
|
1234
|
-
|
|
1239
|
+
width: [{ type: Input, args: ['widget-width',] }],
|
|
1240
|
+
height: [{ type: Input, args: ['widget-height',] }],
|
|
1235
1241
|
widgetDeleted: [{ type: Output }]
|
|
1236
1242
|
};
|
|
1237
1243
|
if (false) {
|
|
@@ -1256,9 +1262,7 @@ if (false) {
|
|
|
1256
1262
|
*/
|
|
1257
1263
|
RAWidgetContainer.prototype.isIEOrEdge;
|
|
1258
1264
|
/** @type {?} */
|
|
1259
|
-
RAWidgetContainer.prototype.
|
|
1260
|
-
/** @type {?} */
|
|
1261
|
-
RAWidgetContainer.prototype.lockClass;
|
|
1265
|
+
RAWidgetContainer.prototype.widgetHeight;
|
|
1262
1266
|
/** @type {?} */
|
|
1263
1267
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1264
1268
|
/** @type {?} */
|
|
@@ -1272,7 +1276,9 @@ if (false) {
|
|
|
1272
1276
|
/** @type {?} */
|
|
1273
1277
|
RAWidgetContainer.prototype.appConfig;
|
|
1274
1278
|
/** @type {?} */
|
|
1275
|
-
RAWidgetContainer.prototype.
|
|
1279
|
+
RAWidgetContainer.prototype.width;
|
|
1280
|
+
/** @type {?} */
|
|
1281
|
+
RAWidgetContainer.prototype.height;
|
|
1276
1282
|
/** @type {?} */
|
|
1277
1283
|
RAWidgetContainer.prototype.widgetDeleted;
|
|
1278
1284
|
/**
|
|
@@ -5789,6 +5795,11 @@ GridsterModule.decorators = [
|
|
|
5789
5795
|
* @fileoverview added by tsickle
|
|
5790
5796
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5791
5797
|
*/
|
|
5798
|
+
/** @type {?} */
|
|
5799
|
+
const DEFAULT_PERFECT_SCROLLBAR_CONFIG = {
|
|
5800
|
+
suppressScrollX: true
|
|
5801
|
+
};
|
|
5802
|
+
const ɵ0 = DEFAULT_PERFECT_SCROLLBAR_CONFIG;
|
|
5792
5803
|
class DashboardFrameworkModule {
|
|
5793
5804
|
}
|
|
5794
5805
|
DashboardFrameworkModule.decorators = [
|
|
@@ -5803,13 +5814,17 @@ DashboardFrameworkModule.decorators = [
|
|
|
5803
5814
|
HttpClientModule,
|
|
5804
5815
|
NgxUiLoaderModule,
|
|
5805
5816
|
TranslateModule,
|
|
5806
|
-
NotifierModule.withConfig(customNotifierOptions)
|
|
5817
|
+
NotifierModule.withConfig(customNotifierOptions),
|
|
5818
|
+
PerfectScrollbarModule
|
|
5807
5819
|
],
|
|
5808
5820
|
exports: [
|
|
5809
5821
|
RADashboardArea,
|
|
5810
5822
|
TranslateModule
|
|
5811
5823
|
],
|
|
5812
|
-
providers: [
|
|
5824
|
+
providers: [{
|
|
5825
|
+
provide: PERFECT_SCROLLBAR_CONFIG,
|
|
5826
|
+
useValue: ɵ0
|
|
5827
|
+
},],
|
|
5813
5828
|
bootstrap: [RADashboardArea]
|
|
5814
5829
|
},] }
|
|
5815
5830
|
];
|