@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
|
@@ -8,6 +8,7 @@ import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
|
8
8
|
import { TranslateService, TranslateModule } from '@schneideress/ess-base';
|
|
9
9
|
import { BrowserModule } from '@angular/platform-browser';
|
|
10
10
|
import { HttpClientModule } from '@angular/common/http';
|
|
11
|
+
import { PerfectScrollbarModule, PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
|
|
11
12
|
import { CommonModule } from '@angular/common';
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -383,6 +384,8 @@ var RAEvent = {
|
|
|
383
384
|
widgetLibraryDoneClick: "widgetLibraryDoneClick",
|
|
384
385
|
/**refresh favorite icon after srtting and resetting favorites */
|
|
385
386
|
favoriteIconRefresh: "favoriteIconRefresh",
|
|
387
|
+
/**to refresh menu content */
|
|
388
|
+
QuickLinkRefresh: "QuickLinkRefresh",
|
|
386
389
|
};
|
|
387
390
|
/** @enum {string} */
|
|
388
391
|
var RAEventKey = {
|
|
@@ -919,10 +922,17 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
919
922
|
* @return {?}
|
|
920
923
|
*/
|
|
921
924
|
function () {
|
|
925
|
+
var _this = this;
|
|
922
926
|
/** @type {?} */
|
|
923
927
|
var areaScrollHeight = 0;
|
|
924
928
|
/** @type {?} */
|
|
925
929
|
var areaHeight = 0;
|
|
930
|
+
/** @type {?} */
|
|
931
|
+
var curRowHeight = 0;
|
|
932
|
+
if (this.options.api) {
|
|
933
|
+
curRowHeight = this.options.api.getCurrentRowHeight();
|
|
934
|
+
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
935
|
+
}
|
|
926
936
|
this.widgetList.forEach((/**
|
|
927
937
|
* @param {?} t
|
|
928
938
|
* @return {?}
|
|
@@ -933,10 +943,14 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
933
943
|
if (currentHeight > areaScrollHeight) {
|
|
934
944
|
areaScrollHeight = currentHeight;
|
|
935
945
|
}
|
|
946
|
+
if (curRowHeight == 0 || curRowHeight == 2) {
|
|
947
|
+
if (_this.widgetList && _this.widgetList.length > 0)
|
|
948
|
+
t.widgetInfo.rowHeight = _this.widgetList[0].curRowHeight;
|
|
949
|
+
}
|
|
950
|
+
else {
|
|
951
|
+
t.widgetInfo.rowHeight = curRowHeight;
|
|
952
|
+
}
|
|
936
953
|
}));
|
|
937
|
-
if (this.options.api) {
|
|
938
|
-
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
939
|
-
}
|
|
940
954
|
if (areaHeight < 600) {
|
|
941
955
|
areaHeight = 600;
|
|
942
956
|
}
|
|
@@ -1099,6 +1113,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
1099
1113
|
widget.width = widgetItem.cols;
|
|
1100
1114
|
widget.position_x = widgetItem.x;
|
|
1101
1115
|
widget.position_y = widgetItem.y;
|
|
1116
|
+
widget.rowHeight = widgetItem.curRowHeight;
|
|
1102
1117
|
return widget;
|
|
1103
1118
|
};
|
|
1104
1119
|
/**
|
|
@@ -1125,7 +1140,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
1125
1140
|
RADashboardArea.decorators = [
|
|
1126
1141
|
{ type: Component, args: [{
|
|
1127
1142
|
selector: 'ra-dashboard-area',
|
|
1128
|
-
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",
|
|
1143
|
+
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",
|
|
1129
1144
|
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}"]
|
|
1130
1145
|
}] }
|
|
1131
1146
|
];
|
|
@@ -1234,8 +1249,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1234
1249
|
this.notifier = notifier;
|
|
1235
1250
|
this.isWidgetLoaded = false;
|
|
1236
1251
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
1237
|
-
this.lockStatus = "unlock";
|
|
1238
|
-
this.lockClass = "unlock";
|
|
1239
1252
|
this.widgetDeleted = new EventEmitter();
|
|
1240
1253
|
}
|
|
1241
1254
|
/**
|
|
@@ -1265,11 +1278,14 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1265
1278
|
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1266
1279
|
this.refreshWidget(this.data.widgetInfo);
|
|
1267
1280
|
}
|
|
1268
|
-
if (changes.
|
|
1281
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue) {
|
|
1269
1282
|
this.data.widgetInfo.isDimensionUpdate = true;
|
|
1270
1283
|
this.refreshWidget(this.data.widgetInfo);
|
|
1271
1284
|
this.data.widgetInfo.isDimensionUpdate = false;
|
|
1272
1285
|
}
|
|
1286
|
+
if (changes.height && changes.height.currentValue != changes.height.previousValue) {
|
|
1287
|
+
this.setWidgetheight();
|
|
1288
|
+
}
|
|
1273
1289
|
};
|
|
1274
1290
|
/**
|
|
1275
1291
|
* @return {?}
|
|
@@ -1375,6 +1391,15 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1375
1391
|
this.refreshWidget(this.data.widgetInfo);
|
|
1376
1392
|
// this.updateWidget(widgetInfo);
|
|
1377
1393
|
};
|
|
1394
|
+
/**
|
|
1395
|
+
* @return {?}
|
|
1396
|
+
*/
|
|
1397
|
+
RAWidgetContainer.prototype.setWidgetheight = /**
|
|
1398
|
+
* @return {?}
|
|
1399
|
+
*/
|
|
1400
|
+
function () {
|
|
1401
|
+
this.widgetHeight = this.data.widgetInfo.height * this.data.widgetInfo.rowHeight + 2;
|
|
1402
|
+
};
|
|
1378
1403
|
/** To load external custom element to the widget container*/
|
|
1379
1404
|
/**
|
|
1380
1405
|
* To load external custom element to the widget container
|
|
@@ -1413,6 +1438,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1413
1438
|
}));
|
|
1414
1439
|
_this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
|
|
1415
1440
|
}));
|
|
1441
|
+
this.setWidgetheight();
|
|
1416
1442
|
};
|
|
1417
1443
|
/** To refresh widget on input config changes */
|
|
1418
1444
|
/**
|
|
@@ -1437,30 +1463,13 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1437
1463
|
}));
|
|
1438
1464
|
if (widgetContainerContext.isWidgetLoaded) {
|
|
1439
1465
|
widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
|
|
1440
|
-
this.lockStatus = widgetContainerContext.widgetElement.loadLockStatus();
|
|
1441
|
-
if (this.lockStatus) {
|
|
1442
|
-
switch (this.lockStatus) {
|
|
1443
|
-
case "lock": {
|
|
1444
|
-
this.lockClass = "fa fa-lock locked";
|
|
1445
|
-
}
|
|
1446
|
-
case "unlock": {
|
|
1447
|
-
this.lockClass = "unlock";
|
|
1448
|
-
}
|
|
1449
|
-
case "partiallock": {
|
|
1450
|
-
this.lockClass = "fa fa-lock partiallocked";
|
|
1451
|
-
}
|
|
1452
|
-
default: {
|
|
1453
|
-
this.lockClass = "unlock";
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
1466
|
}
|
|
1458
1467
|
};
|
|
1459
1468
|
RAWidgetContainer.decorators = [
|
|
1460
1469
|
{ type: Component, args: [{
|
|
1461
1470
|
selector: 'ra-widget-container',
|
|
1462
|
-
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\"
|
|
1463
|
-
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}
|
|
1471
|
+
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",
|
|
1472
|
+
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}"]
|
|
1464
1473
|
}] }
|
|
1465
1474
|
];
|
|
1466
1475
|
/** @nocollapse */
|
|
@@ -1478,7 +1487,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1478
1487
|
data: [{ type: Input, args: ['data',] }],
|
|
1479
1488
|
raDashboardEventBus: [{ type: Input, args: ['event-bus',] }],
|
|
1480
1489
|
appConfig: [{ type: Input, args: ['app-config',] }],
|
|
1481
|
-
|
|
1490
|
+
width: [{ type: Input, args: ['widget-width',] }],
|
|
1491
|
+
height: [{ type: Input, args: ['widget-height',] }],
|
|
1482
1492
|
widgetDeleted: [{ type: Output }]
|
|
1483
1493
|
};
|
|
1484
1494
|
return RAWidgetContainer;
|
|
@@ -1505,9 +1515,7 @@ if (false) {
|
|
|
1505
1515
|
*/
|
|
1506
1516
|
RAWidgetContainer.prototype.isIEOrEdge;
|
|
1507
1517
|
/** @type {?} */
|
|
1508
|
-
RAWidgetContainer.prototype.
|
|
1509
|
-
/** @type {?} */
|
|
1510
|
-
RAWidgetContainer.prototype.lockClass;
|
|
1518
|
+
RAWidgetContainer.prototype.widgetHeight;
|
|
1511
1519
|
/** @type {?} */
|
|
1512
1520
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1513
1521
|
/** @type {?} */
|
|
@@ -1521,7 +1529,9 @@ if (false) {
|
|
|
1521
1529
|
/** @type {?} */
|
|
1522
1530
|
RAWidgetContainer.prototype.appConfig;
|
|
1523
1531
|
/** @type {?} */
|
|
1524
|
-
RAWidgetContainer.prototype.
|
|
1532
|
+
RAWidgetContainer.prototype.width;
|
|
1533
|
+
/** @type {?} */
|
|
1534
|
+
RAWidgetContainer.prototype.height;
|
|
1525
1535
|
/** @type {?} */
|
|
1526
1536
|
RAWidgetContainer.prototype.widgetDeleted;
|
|
1527
1537
|
/**
|
|
@@ -6608,6 +6618,11 @@ var GridsterModule = /** @class */ (function () {
|
|
|
6608
6618
|
* @fileoverview added by tsickle
|
|
6609
6619
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6610
6620
|
*/
|
|
6621
|
+
/** @type {?} */
|
|
6622
|
+
var DEFAULT_PERFECT_SCROLLBAR_CONFIG = {
|
|
6623
|
+
suppressScrollX: true
|
|
6624
|
+
};
|
|
6625
|
+
var ɵ0 = DEFAULT_PERFECT_SCROLLBAR_CONFIG;
|
|
6611
6626
|
var DashboardFrameworkModule = /** @class */ (function () {
|
|
6612
6627
|
function DashboardFrameworkModule() {
|
|
6613
6628
|
}
|
|
@@ -6623,13 +6638,17 @@ var DashboardFrameworkModule = /** @class */ (function () {
|
|
|
6623
6638
|
HttpClientModule,
|
|
6624
6639
|
NgxUiLoaderModule,
|
|
6625
6640
|
TranslateModule,
|
|
6626
|
-
NotifierModule.withConfig(customNotifierOptions)
|
|
6641
|
+
NotifierModule.withConfig(customNotifierOptions),
|
|
6642
|
+
PerfectScrollbarModule
|
|
6627
6643
|
],
|
|
6628
6644
|
exports: [
|
|
6629
6645
|
RADashboardArea,
|
|
6630
6646
|
TranslateModule
|
|
6631
6647
|
],
|
|
6632
|
-
providers: [
|
|
6648
|
+
providers: [{
|
|
6649
|
+
provide: PERFECT_SCROLLBAR_CONFIG,
|
|
6650
|
+
useValue: ɵ0
|
|
6651
|
+
},],
|
|
6633
6652
|
bootstrap: [RADashboardArea]
|
|
6634
6653
|
},] }
|
|
6635
6654
|
];
|