@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
|
@@ -942,7 +942,17 @@
|
|
|
942
942
|
* @return {?}
|
|
943
943
|
*/
|
|
944
944
|
function () {
|
|
945
|
+
var _this = this;
|
|
945
946
|
this.initiateGridsterConfig();
|
|
947
|
+
this.widgetRearrangeSubject.subscribe((/**
|
|
948
|
+
* @param {?} event
|
|
949
|
+
* @return {?}
|
|
950
|
+
*/
|
|
951
|
+
function (event) {
|
|
952
|
+
console.log('in subscribe subject & value is');
|
|
953
|
+
console.log(event);
|
|
954
|
+
_this.rearrangeWidgets();
|
|
955
|
+
}));
|
|
946
956
|
};
|
|
947
957
|
/**
|
|
948
958
|
* @param {?} changes
|
|
@@ -1123,6 +1133,8 @@
|
|
|
1123
1133
|
this.widgetDeleteEvent.unsubscribe();
|
|
1124
1134
|
if (this.widgetLibraryDoneClick)
|
|
1125
1135
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
1136
|
+
if (this.widgetRearrangeSubject)
|
|
1137
|
+
this.widgetRearrangeSubject.unsubscribe();
|
|
1126
1138
|
};
|
|
1127
1139
|
/**To update position/dimention of all widgets in the area */
|
|
1128
1140
|
/**
|
|
@@ -1247,7 +1259,6 @@
|
|
|
1247
1259
|
*/
|
|
1248
1260
|
function (widgetInstanceId, isalertDisabled) {
|
|
1249
1261
|
if (isalertDisabled === void 0) { isalertDisabled = false; }
|
|
1250
|
-
console.log("goCorona");
|
|
1251
1262
|
/** @type {?} */
|
|
1252
1263
|
var widget = this.widgetList.filter((/**
|
|
1253
1264
|
* @param {?} item
|
|
@@ -1262,12 +1273,24 @@
|
|
|
1262
1273
|
if (!isalertDisabled) {
|
|
1263
1274
|
this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + widget[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
|
|
1264
1275
|
}
|
|
1265
|
-
this.options.compactType = 'compactLeft&Up';
|
|
1266
|
-
this.options.api.optionsChanged();
|
|
1267
|
-
this.options.compactType = 'none';
|
|
1268
|
-
this.options.api.optionsChanged();
|
|
1269
1276
|
}
|
|
1270
1277
|
};
|
|
1278
|
+
/**To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc*/
|
|
1279
|
+
/**
|
|
1280
|
+
* To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc
|
|
1281
|
+
* @return {?}
|
|
1282
|
+
*/
|
|
1283
|
+
RADashboardArea.prototype.rearrangeWidgets = /**
|
|
1284
|
+
* To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc
|
|
1285
|
+
* @return {?}
|
|
1286
|
+
*/
|
|
1287
|
+
function () {
|
|
1288
|
+
console.log('in rearrange widgets methd');
|
|
1289
|
+
this.options.compactType = 'compactUp&Left';
|
|
1290
|
+
this.options.api.optionsChanged();
|
|
1291
|
+
this.options.compactType = 'none';
|
|
1292
|
+
this.options.api.optionsChanged();
|
|
1293
|
+
};
|
|
1271
1294
|
/**To add widget instance to the database with the next available position and to make changes in
|
|
1272
1295
|
* dashboard area.
|
|
1273
1296
|
*/
|
|
@@ -1457,6 +1480,7 @@
|
|
|
1457
1480
|
widgetHeight: [{ type: core.Input, args: ['widget-height',] }],
|
|
1458
1481
|
widgetWidth: [{ type: core.Input, args: ['widget-width',] }],
|
|
1459
1482
|
appConfig: [{ type: core.Input, args: ['app-config',] }],
|
|
1483
|
+
widgetRearrangeSubject: [{ type: core.Input }],
|
|
1460
1484
|
gridWrapper: [{ type: core.ViewChild, args: ['gridWrapper', { static: false },] }],
|
|
1461
1485
|
onResize: [{ type: core.HostListener, args: ['window:resize', ['$event'],] }]
|
|
1462
1486
|
};
|
|
@@ -1513,6 +1537,8 @@
|
|
|
1513
1537
|
/** @type {?} */
|
|
1514
1538
|
RADashboardArea.prototype.appConfig;
|
|
1515
1539
|
/** @type {?} */
|
|
1540
|
+
RADashboardArea.prototype.widgetRearrangeSubject;
|
|
1541
|
+
/** @type {?} */
|
|
1516
1542
|
RADashboardArea.prototype.gridWrapper;
|
|
1517
1543
|
/**
|
|
1518
1544
|
* @type {?}
|
|
@@ -1692,12 +1718,13 @@
|
|
|
1692
1718
|
*/
|
|
1693
1719
|
function (isHover) {
|
|
1694
1720
|
if (isHover === void 0) { isHover = true; }
|
|
1695
|
-
console.log('in mousehover value');
|
|
1696
|
-
console.log(isHover);
|
|
1697
1721
|
if (this.widgetElement) {
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1722
|
+
if (typeof this.widgetElement.hoverStatus === "function") {
|
|
1723
|
+
this.widgetElement.hoverStatus(isHover);
|
|
1724
|
+
}
|
|
1725
|
+
else {
|
|
1726
|
+
console.warn('widget framework outdated, please update to version 0.0.96');
|
|
1727
|
+
}
|
|
1701
1728
|
}
|
|
1702
1729
|
if (!isHover) {
|
|
1703
1730
|
this.hideDropDown();
|
|
@@ -1902,8 +1929,6 @@
|
|
|
1902
1929
|
* @return {?}
|
|
1903
1930
|
*/
|
|
1904
1931
|
function (e) {
|
|
1905
|
-
console.log('in widget default state');
|
|
1906
|
-
console.log(e);
|
|
1907
1932
|
widgetContainer.setEmptyState(e.detail);
|
|
1908
1933
|
}));
|
|
1909
1934
|
titleLineEnabled = widgetContainer.widgetElement.titleLineEnabled();
|
|
@@ -1981,16 +2006,11 @@
|
|
|
1981
2006
|
*/
|
|
1982
2007
|
function (widgetInfo, forceEnable) {
|
|
1983
2008
|
if (forceEnable === void 0) { forceEnable = false; }
|
|
1984
|
-
console.log('in set no configured');
|
|
1985
|
-
console.log(widgetInfo);
|
|
1986
|
-
console.log(forceEnable);
|
|
1987
2009
|
if ((widgetInfo.showDefaultState && (widgetInfo.widgetConfigInfo.config == "" || Object.keys(JSON.parse(widgetInfo.widgetConfigInfo.config)).length == 0)) || (forceEnable)) {
|
|
1988
|
-
console.log('ininf');
|
|
1989
2010
|
this.isWidgetStateApplicable = true;
|
|
1990
2011
|
this.widgetEmptyState = widgetframework.WidgetViewState.emptyConfig.toString();
|
|
1991
2012
|
}
|
|
1992
2013
|
else {
|
|
1993
|
-
console.log('in else');
|
|
1994
2014
|
this.widgetEmptyState = '';
|
|
1995
2015
|
this.isWidgetStateApplicable = false;
|
|
1996
2016
|
}
|
|
@@ -2007,24 +2027,19 @@
|
|
|
2007
2027
|
* @return {?}
|
|
2008
2028
|
*/
|
|
2009
2029
|
function (widgetState) {
|
|
2010
|
-
console.log('in wc contanjiner widget state');
|
|
2011
|
-
console.log(widgetState);
|
|
2012
2030
|
this.widgetEmptyState = widgetState;
|
|
2013
2031
|
if (widgetState != widgetframework.WidgetViewState.normal) {
|
|
2014
2032
|
this.isWidgetStateApplicable = true;
|
|
2015
2033
|
this.isDownloadIconVisible = false;
|
|
2016
2034
|
}
|
|
2017
2035
|
else {
|
|
2018
|
-
console.log('in else case');
|
|
2019
2036
|
this.isWidgetStateApplicable = false;
|
|
2020
2037
|
}
|
|
2021
2038
|
switch (widgetState) {
|
|
2022
2039
|
case widgetframework.WidgetViewState.emptyConfig:
|
|
2023
|
-
console.log('in case emptyconfig');
|
|
2024
2040
|
this.setNotConfiguredState(this.data.widgetInfo, true);
|
|
2025
2041
|
break;
|
|
2026
2042
|
case widgetframework.WidgetViewState.emptyData:
|
|
2027
|
-
console.log('in case empty');
|
|
2028
2043
|
break;
|
|
2029
2044
|
case widgetframework.WidgetViewState.error:
|
|
2030
2045
|
break;
|
|
@@ -7605,6 +7620,7 @@
|
|
|
7605
7620
|
function RaBaseDashboardTemplate(ngZone) {
|
|
7606
7621
|
var _this = this;
|
|
7607
7622
|
this.ngZone = ngZone;
|
|
7623
|
+
this.widgetRearrangeSubject = new rxjs.Subject();
|
|
7608
7624
|
this.initialize = (/**
|
|
7609
7625
|
* @param {?} eventBus
|
|
7610
7626
|
* @param {?} userDashboardId
|
|
@@ -7622,6 +7638,17 @@
|
|
|
7622
7638
|
}));
|
|
7623
7639
|
_this.init();
|
|
7624
7640
|
});
|
|
7641
|
+
this.rearrangeWidgets = (/**
|
|
7642
|
+
* @return {?}
|
|
7643
|
+
*/
|
|
7644
|
+
function () {
|
|
7645
|
+
_this.ngZone.run((/**
|
|
7646
|
+
* @return {?}
|
|
7647
|
+
*/
|
|
7648
|
+
function () {
|
|
7649
|
+
_this.widgetRearrangeSubject.next(true);
|
|
7650
|
+
}));
|
|
7651
|
+
});
|
|
7625
7652
|
}
|
|
7626
7653
|
/**
|
|
7627
7654
|
* @return {?}
|
|
@@ -7637,7 +7664,8 @@
|
|
|
7637
7664
|
RaBaseDashboardTemplate.propDecorators = {
|
|
7638
7665
|
dashboardId: [{ type: core.Input, args: ['dashboard-id',] }],
|
|
7639
7666
|
globalFilter: [{ type: core.Input, args: ['global-filter',] }],
|
|
7640
|
-
initialize: [{ type: core.Input }]
|
|
7667
|
+
initialize: [{ type: core.Input }],
|
|
7668
|
+
rearrangeWidgets: [{ type: core.Input }]
|
|
7641
7669
|
};
|
|
7642
7670
|
return RaBaseDashboardTemplate;
|
|
7643
7671
|
}());
|
|
@@ -7649,11 +7677,15 @@
|
|
|
7649
7677
|
/** @type {?} */
|
|
7650
7678
|
RaBaseDashboardTemplate.prototype.appConfig;
|
|
7651
7679
|
/** @type {?} */
|
|
7680
|
+
RaBaseDashboardTemplate.prototype.widgetRearrangeSubject;
|
|
7681
|
+
/** @type {?} */
|
|
7652
7682
|
RaBaseDashboardTemplate.prototype.dashboardId;
|
|
7653
7683
|
/** @type {?} */
|
|
7654
7684
|
RaBaseDashboardTemplate.prototype.globalFilter;
|
|
7655
7685
|
/** @type {?} */
|
|
7656
7686
|
RaBaseDashboardTemplate.prototype.initialize;
|
|
7687
|
+
/** @type {?} */
|
|
7688
|
+
RaBaseDashboardTemplate.prototype.rearrangeWidgets;
|
|
7657
7689
|
/**
|
|
7658
7690
|
* @type {?}
|
|
7659
7691
|
* @private
|