@schneideress/dashboardframework 0.0.233 → 0.0.235
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 +143 -130
- 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 -12
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +37 -25
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +16 -12
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +129 -120
- package/fesm2015/schneideress-dashboardframework.js +51 -35
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +143 -130
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +1 -0
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +1 -0
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -618,22 +618,14 @@ class RADashboardArea {
|
|
|
618
618
|
ngOnInit() {
|
|
619
619
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
620
620
|
this.initiateGridsterConfig();
|
|
621
|
+
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
621
622
|
this.responsiveService.resized.subscribe((/**
|
|
622
623
|
* @param {?} isDesktop
|
|
623
624
|
* @return {?}
|
|
624
625
|
*/
|
|
625
626
|
(isDesktop) => {
|
|
626
|
-
if (isDesktop) {
|
|
627
|
-
|
|
628
|
-
* @return {?}
|
|
629
|
-
*/
|
|
630
|
-
() => {
|
|
631
|
-
this.gridcellHeight = this.options.api.getCurrentRowHeight();
|
|
632
|
-
this.domResized = !this.domResized;
|
|
633
|
-
this.setAreaHeight();
|
|
634
|
-
}), 100);
|
|
635
|
-
}
|
|
636
|
-
else {
|
|
627
|
+
if (this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
628
|
+
this.lastViewType = (isDesktop ? 'desktop' : 'mobile');
|
|
637
629
|
this.widgetList = [];
|
|
638
630
|
setTimeout((/**
|
|
639
631
|
* @return {?}
|
|
@@ -656,6 +648,16 @@ class RADashboardArea {
|
|
|
656
648
|
this.domResized = !this.domResized;
|
|
657
649
|
}));
|
|
658
650
|
}
|
|
651
|
+
else {
|
|
652
|
+
setTimeout((/**
|
|
653
|
+
* @return {?}
|
|
654
|
+
*/
|
|
655
|
+
() => {
|
|
656
|
+
this.gridcellHeight = this.options.api.getCurrentRowHeight();
|
|
657
|
+
this.domResized = !this.domResized;
|
|
658
|
+
this.setAreaHeight();
|
|
659
|
+
}), 100);
|
|
660
|
+
}
|
|
659
661
|
}));
|
|
660
662
|
}
|
|
661
663
|
/**
|
|
@@ -1305,6 +1307,8 @@ if (false) {
|
|
|
1305
1307
|
/** @type {?} */
|
|
1306
1308
|
RADashboardArea.prototype.isWidgetMgmnt;
|
|
1307
1309
|
/** @type {?} */
|
|
1310
|
+
RADashboardArea.prototype.lastViewType;
|
|
1311
|
+
/** @type {?} */
|
|
1308
1312
|
RADashboardArea.prototype.userDashboardId;
|
|
1309
1313
|
/** @type {?} */
|
|
1310
1314
|
RADashboardArea.prototype.areaKey;
|
|
@@ -1495,16 +1499,18 @@ class RAWidgetContainer {
|
|
|
1495
1499
|
*/
|
|
1496
1500
|
invokeWidgetResizedEvent() {
|
|
1497
1501
|
if (this.widgetElement) {
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
this.
|
|
1506
|
-
|
|
1507
|
-
|
|
1502
|
+
if (typeof this.widgetElement.widgetResized === "function") {
|
|
1503
|
+
/** @type {?} */
|
|
1504
|
+
let size = {};
|
|
1505
|
+
size.height = this.height;
|
|
1506
|
+
size.width = this.width;
|
|
1507
|
+
size.cellHeight = this.gridCellHeight;
|
|
1508
|
+
this.widgetElement.widgetResized(size);
|
|
1509
|
+
if (this.height == 1 || this.width == 1)
|
|
1510
|
+
this.isKpiView = true;
|
|
1511
|
+
else
|
|
1512
|
+
this.isKpiView = false;
|
|
1513
|
+
}
|
|
1508
1514
|
}
|
|
1509
1515
|
}
|
|
1510
1516
|
/**
|
|
@@ -1572,6 +1578,9 @@ class RAWidgetContainer {
|
|
|
1572
1578
|
ngOnDestroy() {
|
|
1573
1579
|
if (this.configChanged)
|
|
1574
1580
|
this.configChanged.unsubscribe();
|
|
1581
|
+
if (this.widgetElementHandler && this.data && this.data.widgetInfo && this.data.widgetInfo.widgetInstanceId) {
|
|
1582
|
+
document.body.removeEventListener('widgetinitiated' + this.data.widgetInfo.widgetInstanceId, this.widgetElementHandler);
|
|
1583
|
+
}
|
|
1575
1584
|
}
|
|
1576
1585
|
/**
|
|
1577
1586
|
* To Edit current widget configuration
|
|
@@ -1736,15 +1745,18 @@ class RAWidgetContainer {
|
|
|
1736
1745
|
() => {
|
|
1737
1746
|
me.widgetElement = document.createElement(widgetInfo.customTag);
|
|
1738
1747
|
me.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
1739
|
-
|
|
1748
|
+
/** @type {?} */
|
|
1749
|
+
let handler = (/**
|
|
1750
|
+
* @param {?} event
|
|
1740
1751
|
* @return {?}
|
|
1741
1752
|
*/
|
|
1742
|
-
|
|
1753
|
+
function (event) {
|
|
1743
1754
|
setTimeout((/**
|
|
1744
1755
|
* @return {?}
|
|
1745
1756
|
*/
|
|
1746
1757
|
() => __awaiter(this, void 0, void 0, function* () {
|
|
1747
|
-
|
|
1758
|
+
console.log('widget inititated listener triggered');
|
|
1759
|
+
this.widgetElement.addEventListener('on-widget-respond', (/**
|
|
1748
1760
|
* @param {?} e
|
|
1749
1761
|
* @return {?}
|
|
1750
1762
|
*/
|
|
@@ -1754,15 +1766,15 @@ class RAWidgetContainer {
|
|
|
1754
1766
|
switch (type) {
|
|
1755
1767
|
case 'onDataLoad':
|
|
1756
1768
|
if (e.detail.data)
|
|
1757
|
-
|
|
1769
|
+
this.showPanel = true;
|
|
1758
1770
|
else
|
|
1759
|
-
|
|
1771
|
+
this.showPanel = false;
|
|
1760
1772
|
break;
|
|
1761
1773
|
case 'onConfigEditClicked':
|
|
1762
|
-
|
|
1774
|
+
this.editWidget();
|
|
1763
1775
|
break;
|
|
1764
1776
|
case 'onEnableDefaultState':
|
|
1765
|
-
|
|
1777
|
+
this.setEmptyState(e.detail.data);
|
|
1766
1778
|
break;
|
|
1767
1779
|
case 'onSetTitleUnderline':
|
|
1768
1780
|
if (e.detail.data == true)
|
|
@@ -1786,9 +1798,9 @@ class RAWidgetContainer {
|
|
|
1786
1798
|
break;
|
|
1787
1799
|
}
|
|
1788
1800
|
}));
|
|
1789
|
-
if (typeof (
|
|
1801
|
+
if (typeof (this.widgetElement.titleLineEnabled) != 'undefined') {
|
|
1790
1802
|
/** @type {?} */
|
|
1791
|
-
let titleLineEnabled =
|
|
1803
|
+
let titleLineEnabled = this.widgetElement.titleLineEnabled();
|
|
1792
1804
|
if (titleLineEnabled) {
|
|
1793
1805
|
this.enableTitleLine = titleLineEnabled;
|
|
1794
1806
|
this.enableTitleLineActual = titleLineEnabled;
|
|
@@ -1824,17 +1836,19 @@ class RAWidgetContainer {
|
|
|
1824
1836
|
this.deleteToolTipValue = this.translateService.translate('Common.delete');
|
|
1825
1837
|
this.deleteToolTipWidth = "300px";
|
|
1826
1838
|
}
|
|
1827
|
-
|
|
1839
|
+
this.isWidgetLoaded = true;
|
|
1828
1840
|
widgetConfigFilter.appConfig = this.appConfig;
|
|
1829
1841
|
widgetConfigFilter.widgetInfo = widgetInfo;
|
|
1830
1842
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1831
1843
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1832
1844
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1833
|
-
|
|
1834
|
-
yield
|
|
1835
|
-
yield
|
|
1845
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1846
|
+
yield this.setLock(widgetConfigFilter.config);
|
|
1847
|
+
yield this.setDownloadIcon();
|
|
1836
1848
|
})));
|
|
1837
|
-
}))
|
|
1849
|
+
}).bind(this);
|
|
1850
|
+
this.widgetElementHandler = handler;
|
|
1851
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, handler);
|
|
1838
1852
|
this.ctlWidget.nativeElement.appendChild(this.widgetElement);
|
|
1839
1853
|
}));
|
|
1840
1854
|
}));
|
|
@@ -2441,6 +2455,8 @@ if (false) {
|
|
|
2441
2455
|
RAWidgetContainer.prototype.WidgetDisplayName;
|
|
2442
2456
|
/** @type {?} */
|
|
2443
2457
|
RAWidgetContainer.prototype.enableTitleLineActual;
|
|
2458
|
+
/** @type {?} */
|
|
2459
|
+
RAWidgetContainer.prototype.widgetElementHandler;
|
|
2444
2460
|
/**
|
|
2445
2461
|
* @type {?}
|
|
2446
2462
|
* @private
|