@schneideress/dashboardframework 0.0.145 → 0.0.146
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 -23
- 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 +27 -6
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +7 -18
- package/esm2015/lib/ra.base.dashboard.template.js +20 -2
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +33 -6
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +7 -18
- package/esm5/lib/ra.base.dashboard.template.js +20 -2
- package/fesm2015/schneideress-dashboardframework.js +49 -23
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +55 -23
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +4 -0
- package/lib/ra.base.dashboard.template.d.ts +3 -0
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -618,6 +618,15 @@ class RADashboardArea {
|
|
|
618
618
|
*/
|
|
619
619
|
ngOnInit() {
|
|
620
620
|
this.initiateGridsterConfig();
|
|
621
|
+
this.widgetRearrangeSubject.subscribe((/**
|
|
622
|
+
* @param {?} event
|
|
623
|
+
* @return {?}
|
|
624
|
+
*/
|
|
625
|
+
event => {
|
|
626
|
+
console.log('in subscribe subject & value is');
|
|
627
|
+
console.log(event);
|
|
628
|
+
this.rearrangeWidgets();
|
|
629
|
+
}));
|
|
621
630
|
}
|
|
622
631
|
/**
|
|
623
632
|
* @param {?} changes
|
|
@@ -756,6 +765,8 @@ class RADashboardArea {
|
|
|
756
765
|
this.widgetDeleteEvent.unsubscribe();
|
|
757
766
|
if (this.widgetLibraryDoneClick)
|
|
758
767
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
768
|
+
if (this.widgetRearrangeSubject)
|
|
769
|
+
this.widgetRearrangeSubject.unsubscribe();
|
|
759
770
|
}
|
|
760
771
|
/**
|
|
761
772
|
* To update position/dimention of all widgets in the area
|
|
@@ -853,7 +864,6 @@ class RADashboardArea {
|
|
|
853
864
|
* @return {?}
|
|
854
865
|
*/
|
|
855
866
|
deleteWidget(widgetInstanceId, isalertDisabled = false) {
|
|
856
|
-
console.log("goCorona");
|
|
857
867
|
/** @type {?} */
|
|
858
868
|
let widget = this.widgetList.filter((/**
|
|
859
869
|
* @param {?} item
|
|
@@ -868,12 +878,19 @@ class RADashboardArea {
|
|
|
868
878
|
if (!isalertDisabled) {
|
|
869
879
|
this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + widget[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
|
|
870
880
|
}
|
|
871
|
-
this.options.compactType = 'compactLeft&Up';
|
|
872
|
-
this.options.api.optionsChanged();
|
|
873
|
-
this.options.compactType = 'none';
|
|
874
|
-
this.options.api.optionsChanged();
|
|
875
881
|
}
|
|
876
882
|
}
|
|
883
|
+
/**
|
|
884
|
+
* To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc
|
|
885
|
+
* @return {?}
|
|
886
|
+
*/
|
|
887
|
+
rearrangeWidgets() {
|
|
888
|
+
console.log('in rearrange widgets methd');
|
|
889
|
+
this.options.compactType = 'compactUp&Left';
|
|
890
|
+
this.options.api.optionsChanged();
|
|
891
|
+
this.options.compactType = 'none';
|
|
892
|
+
this.options.api.optionsChanged();
|
|
893
|
+
}
|
|
877
894
|
/**
|
|
878
895
|
* To add widget instance to the database with the next available position and to make changes in
|
|
879
896
|
* dashboard area.
|
|
@@ -1028,6 +1045,7 @@ RADashboardArea.propDecorators = {
|
|
|
1028
1045
|
widgetHeight: [{ type: Input, args: ['widget-height',] }],
|
|
1029
1046
|
widgetWidth: [{ type: Input, args: ['widget-width',] }],
|
|
1030
1047
|
appConfig: [{ type: Input, args: ['app-config',] }],
|
|
1048
|
+
widgetRearrangeSubject: [{ type: Input }],
|
|
1031
1049
|
gridWrapper: [{ type: ViewChild, args: ['gridWrapper', { static: false },] }],
|
|
1032
1050
|
onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }]
|
|
1033
1051
|
};
|
|
@@ -1082,6 +1100,8 @@ if (false) {
|
|
|
1082
1100
|
/** @type {?} */
|
|
1083
1101
|
RADashboardArea.prototype.appConfig;
|
|
1084
1102
|
/** @type {?} */
|
|
1103
|
+
RADashboardArea.prototype.widgetRearrangeSubject;
|
|
1104
|
+
/** @type {?} */
|
|
1085
1105
|
RADashboardArea.prototype.gridWrapper;
|
|
1086
1106
|
/**
|
|
1087
1107
|
* @type {?}
|
|
@@ -1247,12 +1267,13 @@ class RAWidgetContainer {
|
|
|
1247
1267
|
* @return {?}
|
|
1248
1268
|
*/
|
|
1249
1269
|
mouseHover(isHover = true) {
|
|
1250
|
-
console.log('in mousehover value');
|
|
1251
|
-
console.log(isHover);
|
|
1252
1270
|
if (this.widgetElement) {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1271
|
+
if (typeof this.widgetElement.hoverStatus === "function") {
|
|
1272
|
+
this.widgetElement.hoverStatus(isHover);
|
|
1273
|
+
}
|
|
1274
|
+
else {
|
|
1275
|
+
console.warn('widget framework outdated, please update to version 0.0.96');
|
|
1276
|
+
}
|
|
1256
1277
|
}
|
|
1257
1278
|
if (!isHover) {
|
|
1258
1279
|
this.hideDropDown();
|
|
@@ -1406,8 +1427,6 @@ class RAWidgetContainer {
|
|
|
1406
1427
|
* @return {?}
|
|
1407
1428
|
*/
|
|
1408
1429
|
(e) => {
|
|
1409
|
-
console.log('in widget default state');
|
|
1410
|
-
console.log(e);
|
|
1411
1430
|
widgetContainer.setEmptyState(e.detail);
|
|
1412
1431
|
}));
|
|
1413
1432
|
/** @type {?} */
|
|
@@ -1467,16 +1486,11 @@ class RAWidgetContainer {
|
|
|
1467
1486
|
* @return {?}
|
|
1468
1487
|
*/
|
|
1469
1488
|
setNotConfiguredState(widgetInfo, forceEnable = false) {
|
|
1470
|
-
console.log('in set no configured');
|
|
1471
|
-
console.log(widgetInfo);
|
|
1472
|
-
console.log(forceEnable);
|
|
1473
1489
|
if ((widgetInfo.showDefaultState && (widgetInfo.widgetConfigInfo.config == "" || Object.keys(JSON.parse(widgetInfo.widgetConfigInfo.config)).length == 0)) || (forceEnable)) {
|
|
1474
|
-
console.log('ininf');
|
|
1475
1490
|
this.isWidgetStateApplicable = true;
|
|
1476
1491
|
this.widgetEmptyState = WidgetViewState.emptyConfig.toString();
|
|
1477
1492
|
}
|
|
1478
1493
|
else {
|
|
1479
|
-
console.log('in else');
|
|
1480
1494
|
this.widgetEmptyState = '';
|
|
1481
1495
|
this.isWidgetStateApplicable = false;
|
|
1482
1496
|
}
|
|
@@ -1487,24 +1501,19 @@ class RAWidgetContainer {
|
|
|
1487
1501
|
* @return {?}
|
|
1488
1502
|
*/
|
|
1489
1503
|
setEmptyState(widgetState) {
|
|
1490
|
-
console.log('in wc contanjiner widget state');
|
|
1491
|
-
console.log(widgetState);
|
|
1492
1504
|
this.widgetEmptyState = widgetState;
|
|
1493
1505
|
if (widgetState != WidgetViewState.normal) {
|
|
1494
1506
|
this.isWidgetStateApplicable = true;
|
|
1495
1507
|
this.isDownloadIconVisible = false;
|
|
1496
1508
|
}
|
|
1497
1509
|
else {
|
|
1498
|
-
console.log('in else case');
|
|
1499
1510
|
this.isWidgetStateApplicable = false;
|
|
1500
1511
|
}
|
|
1501
1512
|
switch (widgetState) {
|
|
1502
1513
|
case WidgetViewState.emptyConfig:
|
|
1503
|
-
console.log('in case emptyconfig');
|
|
1504
1514
|
this.setNotConfiguredState(this.data.widgetInfo, true);
|
|
1505
1515
|
break;
|
|
1506
1516
|
case WidgetViewState.emptyData:
|
|
1507
|
-
console.log('in case empty');
|
|
1508
1517
|
break;
|
|
1509
1518
|
case WidgetViewState.error:
|
|
1510
1519
|
break;
|
|
@@ -6428,6 +6437,7 @@ class RaBaseDashboardTemplate {
|
|
|
6428
6437
|
*/
|
|
6429
6438
|
constructor(ngZone) {
|
|
6430
6439
|
this.ngZone = ngZone;
|
|
6440
|
+
this.widgetRearrangeSubject = new Subject();
|
|
6431
6441
|
this.initialize = (/**
|
|
6432
6442
|
* @param {?} eventBus
|
|
6433
6443
|
* @param {?} userDashboardId
|
|
@@ -6445,6 +6455,17 @@ class RaBaseDashboardTemplate {
|
|
|
6445
6455
|
}));
|
|
6446
6456
|
this.init();
|
|
6447
6457
|
});
|
|
6458
|
+
this.rearrangeWidgets = (/**
|
|
6459
|
+
* @return {?}
|
|
6460
|
+
*/
|
|
6461
|
+
() => {
|
|
6462
|
+
this.ngZone.run((/**
|
|
6463
|
+
* @return {?}
|
|
6464
|
+
*/
|
|
6465
|
+
() => {
|
|
6466
|
+
this.widgetRearrangeSubject.next(true);
|
|
6467
|
+
}));
|
|
6468
|
+
});
|
|
6448
6469
|
}
|
|
6449
6470
|
/**
|
|
6450
6471
|
* @return {?}
|
|
@@ -6458,7 +6479,8 @@ class RaBaseDashboardTemplate {
|
|
|
6458
6479
|
RaBaseDashboardTemplate.propDecorators = {
|
|
6459
6480
|
dashboardId: [{ type: Input, args: ['dashboard-id',] }],
|
|
6460
6481
|
globalFilter: [{ type: Input, args: ['global-filter',] }],
|
|
6461
|
-
initialize: [{ type: Input }]
|
|
6482
|
+
initialize: [{ type: Input }],
|
|
6483
|
+
rearrangeWidgets: [{ type: Input }]
|
|
6462
6484
|
};
|
|
6463
6485
|
if (false) {
|
|
6464
6486
|
/** @type {?} */
|
|
@@ -6468,11 +6490,15 @@ if (false) {
|
|
|
6468
6490
|
/** @type {?} */
|
|
6469
6491
|
RaBaseDashboardTemplate.prototype.appConfig;
|
|
6470
6492
|
/** @type {?} */
|
|
6493
|
+
RaBaseDashboardTemplate.prototype.widgetRearrangeSubject;
|
|
6494
|
+
/** @type {?} */
|
|
6471
6495
|
RaBaseDashboardTemplate.prototype.dashboardId;
|
|
6472
6496
|
/** @type {?} */
|
|
6473
6497
|
RaBaseDashboardTemplate.prototype.globalFilter;
|
|
6474
6498
|
/** @type {?} */
|
|
6475
6499
|
RaBaseDashboardTemplate.prototype.initialize;
|
|
6500
|
+
/** @type {?} */
|
|
6501
|
+
RaBaseDashboardTemplate.prototype.rearrangeWidgets;
|
|
6476
6502
|
/**
|
|
6477
6503
|
* @type {?}
|
|
6478
6504
|
* @private
|