@schneideress/dashboardframework 0.0.234 → 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 +128 -119
- 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-widget-container/ra.widget.container.component.js +37 -25
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +129 -120
- package/fesm2015/schneideress-dashboardframework.js +36 -24
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +128 -119
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- 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
|
@@ -1787,16 +1787,18 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1787
1787
|
*/
|
|
1788
1788
|
function () {
|
|
1789
1789
|
if (this.widgetElement) {
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
this.
|
|
1798
|
-
|
|
1799
|
-
|
|
1790
|
+
if (typeof this.widgetElement.widgetResized === "function") {
|
|
1791
|
+
/** @type {?} */
|
|
1792
|
+
var size = {};
|
|
1793
|
+
size.height = this.height;
|
|
1794
|
+
size.width = this.width;
|
|
1795
|
+
size.cellHeight = this.gridCellHeight;
|
|
1796
|
+
this.widgetElement.widgetResized(size);
|
|
1797
|
+
if (this.height == 1 || this.width == 1)
|
|
1798
|
+
this.isKpiView = true;
|
|
1799
|
+
else
|
|
1800
|
+
this.isKpiView = false;
|
|
1801
|
+
}
|
|
1800
1802
|
}
|
|
1801
1803
|
};
|
|
1802
1804
|
/**
|
|
@@ -1876,6 +1878,9 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1876
1878
|
function () {
|
|
1877
1879
|
if (this.configChanged)
|
|
1878
1880
|
this.configChanged.unsubscribe();
|
|
1881
|
+
if (this.widgetElementHandler && this.data && this.data.widgetInfo && this.data.widgetInfo.widgetInstanceId) {
|
|
1882
|
+
document.body.removeEventListener('widgetinitiated' + this.data.widgetInfo.widgetInstanceId, this.widgetElementHandler);
|
|
1883
|
+
}
|
|
1879
1884
|
};
|
|
1880
1885
|
/** To Edit current widget configuration*/
|
|
1881
1886
|
/**
|
|
@@ -2084,120 +2089,122 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
2084
2089
|
function () {
|
|
2085
2090
|
me.widgetElement = document.createElement(widgetInfo.customTag);
|
|
2086
2091
|
me.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
2087
|
-
|
|
2092
|
+
/** @type {?} */
|
|
2093
|
+
var handler = (/**
|
|
2094
|
+
* @param {?} event
|
|
2088
2095
|
* @return {?}
|
|
2089
2096
|
*/
|
|
2090
|
-
function () {
|
|
2097
|
+
function (event) {
|
|
2091
2098
|
var _this = this;
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
}
|
|
2143
|
-
}));
|
|
2144
|
-
if (typeof (me.widgetElement.titleLineEnabled) != 'undefined') {
|
|
2145
|
-
titleLineEnabled = me.widgetElement.titleLineEnabled();
|
|
2146
|
-
if (titleLineEnabled) {
|
|
2147
|
-
this.enableTitleLine = titleLineEnabled;
|
|
2148
|
-
this.enableTitleLineActual = titleLineEnabled;
|
|
2149
|
-
}
|
|
2099
|
+
setTimeout((/**
|
|
2100
|
+
* @return {?}
|
|
2101
|
+
*/
|
|
2102
|
+
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2103
|
+
var titleLineEnabled;
|
|
2104
|
+
var _this = this;
|
|
2105
|
+
return __generator(this, function (_a) {
|
|
2106
|
+
switch (_a.label) {
|
|
2107
|
+
case 0:
|
|
2108
|
+
console.log('widget inititated listener triggered');
|
|
2109
|
+
this.widgetElement.addEventListener('on-widget-respond', (/**
|
|
2110
|
+
* @param {?} e
|
|
2111
|
+
* @return {?}
|
|
2112
|
+
*/
|
|
2113
|
+
function (e) {
|
|
2114
|
+
/** @type {?} */
|
|
2115
|
+
var type = e.detail.type;
|
|
2116
|
+
switch (type) {
|
|
2117
|
+
case 'onDataLoad':
|
|
2118
|
+
if (e.detail.data)
|
|
2119
|
+
_this.showPanel = true;
|
|
2120
|
+
else
|
|
2121
|
+
_this.showPanel = false;
|
|
2122
|
+
break;
|
|
2123
|
+
case 'onConfigEditClicked':
|
|
2124
|
+
_this.editWidget();
|
|
2125
|
+
break;
|
|
2126
|
+
case 'onEnableDefaultState':
|
|
2127
|
+
_this.setEmptyState(e.detail.data);
|
|
2128
|
+
break;
|
|
2129
|
+
case 'onSetTitleUnderline':
|
|
2130
|
+
if (e.detail.data == true)
|
|
2131
|
+
_this.enableTitleLine = true;
|
|
2132
|
+
else
|
|
2133
|
+
_this.enableTitleLine = _this.enableTitleLineActual;
|
|
2134
|
+
break;
|
|
2135
|
+
case 'onWidgetTitleHidden':
|
|
2136
|
+
if (e.detail.data == true)
|
|
2137
|
+
_this.hideTitle = true;
|
|
2138
|
+
else
|
|
2139
|
+
_this.hideTitle = false;
|
|
2140
|
+
break;
|
|
2141
|
+
case 'onUpdateLockData':
|
|
2142
|
+
_this.setLock(e.detail.data);
|
|
2143
|
+
break;
|
|
2144
|
+
case 'onGlobalFilterApplicableCheck':
|
|
2145
|
+
_this.setInapplicableFilters(e.detail.data, widgetInfo.widgetInstanceId);
|
|
2146
|
+
break;
|
|
2147
|
+
default:
|
|
2148
|
+
break;
|
|
2150
2149
|
}
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
this.
|
|
2150
|
+
}));
|
|
2151
|
+
if (typeof (this.widgetElement.titleLineEnabled) != 'undefined') {
|
|
2152
|
+
titleLineEnabled = this.widgetElement.titleLineEnabled();
|
|
2153
|
+
if (titleLineEnabled) {
|
|
2154
|
+
this.enableTitleLine = titleLineEnabled;
|
|
2155
|
+
this.enableTitleLineActual = titleLineEnabled;
|
|
2156
2156
|
}
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2157
|
+
}
|
|
2158
|
+
this.editText = this.translateService.translate('Common.edit');
|
|
2159
|
+
if (this.translateService.translate('Common.edit').length > 6) {
|
|
2160
|
+
this.editText = (this.translateService.translate('Common.edit').substring(0, 6) + '...');
|
|
2161
|
+
this.editToolTipValue = this.translateService.translate('Common.edit');
|
|
2162
|
+
this.editToolTipWidth = "300px";
|
|
2163
|
+
}
|
|
2164
|
+
this.copyText = this.translateService.translate('Common.copy');
|
|
2165
|
+
if (this.translateService.translate('Common.copy').length > 6) {
|
|
2166
|
+
this.copyText = (this.translateService.translate('Common.copy').substring(0, 6) + '...');
|
|
2167
|
+
this.copyToolTipValue = this.translateService.translate('Common.copy');
|
|
2168
|
+
this.copyToolTipWidth = "300px";
|
|
2169
|
+
}
|
|
2170
|
+
this.moveText = this.translateService.translate('Common.move');
|
|
2171
|
+
if (this.translateService.translate('Common.move').length > 6) {
|
|
2172
|
+
this.moveText = (this.translateService.translate('Common.move').substring(0, 6) + '...');
|
|
2173
|
+
this.moveToolTipValue = this.translateService.translate('Common.move');
|
|
2174
|
+
this.moveToolTipWidth = "300px";
|
|
2175
|
+
}
|
|
2176
|
+
this.excelText = this.translateService.translate('Common.excel');
|
|
2177
|
+
if (this.translateService.translate('Common.excel').length > 6) {
|
|
2178
|
+
this.excelText = (this.translateService.translate('Common.excel').substring(0, 6) + '...');
|
|
2179
|
+
this.excelToolTipValue = this.translateService.translate('Common.excel');
|
|
2180
|
+
this.excelToolTipWidth = "300px";
|
|
2181
|
+
}
|
|
2182
|
+
this.deleteText = this.translateService.translate('Common.delete');
|
|
2183
|
+
if (this.translateService.translate('Common.delete').length > 6) {
|
|
2184
|
+
this.deleteText = (this.translateService.translate('Common.delete').substring(0, 6) + '...');
|
|
2185
|
+
this.deleteToolTipValue = this.translateService.translate('Common.delete');
|
|
2186
|
+
this.deleteToolTipWidth = "300px";
|
|
2187
|
+
}
|
|
2188
|
+
this.isWidgetLoaded = true;
|
|
2189
|
+
widgetConfigFilter.appConfig = this.appConfig;
|
|
2190
|
+
widgetConfigFilter.widgetInfo = widgetInfo;
|
|
2191
|
+
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
2192
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
2193
|
+
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
2194
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
2195
|
+
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
2196
|
+
case 1:
|
|
2197
|
+
_a.sent();
|
|
2198
|
+
return [4 /*yield*/, this.setDownloadIcon()];
|
|
2199
|
+
case 2:
|
|
2200
|
+
_a.sent();
|
|
2201
|
+
return [2 /*return*/];
|
|
2202
|
+
}
|
|
2203
|
+
});
|
|
2204
|
+
}); }));
|
|
2205
|
+
}).bind(_this);
|
|
2206
|
+
_this.widgetElementHandler = handler;
|
|
2207
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, handler);
|
|
2201
2208
|
_this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
|
|
2202
2209
|
}));
|
|
2203
2210
|
}));
|
|
@@ -2920,6 +2927,8 @@ if (false) {
|
|
|
2920
2927
|
RAWidgetContainer.prototype.WidgetDisplayName;
|
|
2921
2928
|
/** @type {?} */
|
|
2922
2929
|
RAWidgetContainer.prototype.enableTitleLineActual;
|
|
2930
|
+
/** @type {?} */
|
|
2931
|
+
RAWidgetContainer.prototype.widgetElementHandler;
|
|
2923
2932
|
/**
|
|
2924
2933
|
* @type {?}
|
|
2925
2934
|
* @private
|