@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
|
@@ -983,22 +983,14 @@
|
|
|
983
983
|
var _this = this;
|
|
984
984
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
985
985
|
this.initiateGridsterConfig();
|
|
986
|
+
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
986
987
|
this.responsiveService.resized.subscribe((/**
|
|
987
988
|
* @param {?} isDesktop
|
|
988
989
|
* @return {?}
|
|
989
990
|
*/
|
|
990
991
|
function (isDesktop) {
|
|
991
|
-
if (isDesktop) {
|
|
992
|
-
|
|
993
|
-
* @return {?}
|
|
994
|
-
*/
|
|
995
|
-
function () {
|
|
996
|
-
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
997
|
-
_this.domResized = !_this.domResized;
|
|
998
|
-
_this.setAreaHeight();
|
|
999
|
-
}), 100);
|
|
1000
|
-
}
|
|
1001
|
-
else {
|
|
992
|
+
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
993
|
+
_this.lastViewType = (isDesktop ? 'desktop' : 'mobile');
|
|
1002
994
|
_this.widgetList = [];
|
|
1003
995
|
setTimeout((/**
|
|
1004
996
|
* @return {?}
|
|
@@ -1021,6 +1013,16 @@
|
|
|
1021
1013
|
_this.domResized = !_this.domResized;
|
|
1022
1014
|
}));
|
|
1023
1015
|
}
|
|
1016
|
+
else {
|
|
1017
|
+
setTimeout((/**
|
|
1018
|
+
* @return {?}
|
|
1019
|
+
*/
|
|
1020
|
+
function () {
|
|
1021
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
1022
|
+
_this.domResized = !_this.domResized;
|
|
1023
|
+
_this.setAreaHeight();
|
|
1024
|
+
}), 100);
|
|
1025
|
+
}
|
|
1024
1026
|
}));
|
|
1025
1027
|
};
|
|
1026
1028
|
/**
|
|
@@ -1793,6 +1795,8 @@
|
|
|
1793
1795
|
/** @type {?} */
|
|
1794
1796
|
RADashboardArea.prototype.isWidgetMgmnt;
|
|
1795
1797
|
/** @type {?} */
|
|
1798
|
+
RADashboardArea.prototype.lastViewType;
|
|
1799
|
+
/** @type {?} */
|
|
1796
1800
|
RADashboardArea.prototype.userDashboardId;
|
|
1797
1801
|
/** @type {?} */
|
|
1798
1802
|
RADashboardArea.prototype.areaKey;
|
|
@@ -1994,16 +1998,18 @@
|
|
|
1994
1998
|
*/
|
|
1995
1999
|
function () {
|
|
1996
2000
|
if (this.widgetElement) {
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
this.
|
|
2005
|
-
|
|
2006
|
-
|
|
2001
|
+
if (typeof this.widgetElement.widgetResized === "function") {
|
|
2002
|
+
/** @type {?} */
|
|
2003
|
+
var size = {};
|
|
2004
|
+
size.height = this.height;
|
|
2005
|
+
size.width = this.width;
|
|
2006
|
+
size.cellHeight = this.gridCellHeight;
|
|
2007
|
+
this.widgetElement.widgetResized(size);
|
|
2008
|
+
if (this.height == 1 || this.width == 1)
|
|
2009
|
+
this.isKpiView = true;
|
|
2010
|
+
else
|
|
2011
|
+
this.isKpiView = false;
|
|
2012
|
+
}
|
|
2007
2013
|
}
|
|
2008
2014
|
};
|
|
2009
2015
|
/**
|
|
@@ -2083,6 +2089,9 @@
|
|
|
2083
2089
|
function () {
|
|
2084
2090
|
if (this.configChanged)
|
|
2085
2091
|
this.configChanged.unsubscribe();
|
|
2092
|
+
if (this.widgetElementHandler && this.data && this.data.widgetInfo && this.data.widgetInfo.widgetInstanceId) {
|
|
2093
|
+
document.body.removeEventListener('widgetinitiated' + this.data.widgetInfo.widgetInstanceId, this.widgetElementHandler);
|
|
2094
|
+
}
|
|
2086
2095
|
};
|
|
2087
2096
|
/** To Edit current widget configuration*/
|
|
2088
2097
|
/**
|
|
@@ -2291,120 +2300,122 @@
|
|
|
2291
2300
|
function () {
|
|
2292
2301
|
me.widgetElement = document.createElement(widgetInfo.customTag);
|
|
2293
2302
|
me.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
2294
|
-
|
|
2303
|
+
/** @type {?} */
|
|
2304
|
+
var handler = (/**
|
|
2305
|
+
* @param {?} event
|
|
2295
2306
|
* @return {?}
|
|
2296
2307
|
*/
|
|
2297
|
-
function () {
|
|
2308
|
+
function (event) {
|
|
2298
2309
|
var _this = this;
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
}
|
|
2350
|
-
}));
|
|
2351
|
-
if (typeof (me.widgetElement.titleLineEnabled) != 'undefined') {
|
|
2352
|
-
titleLineEnabled = me.widgetElement.titleLineEnabled();
|
|
2353
|
-
if (titleLineEnabled) {
|
|
2354
|
-
this.enableTitleLine = titleLineEnabled;
|
|
2355
|
-
this.enableTitleLineActual = titleLineEnabled;
|
|
2356
|
-
}
|
|
2357
|
-
}
|
|
2358
|
-
this.editText = this.translateService.translate('Common.edit');
|
|
2359
|
-
if (this.translateService.translate('Common.edit').length > 6) {
|
|
2360
|
-
this.editText = (this.translateService.translate('Common.edit').substring(0, 6) + '...');
|
|
2361
|
-
this.editToolTipValue = this.translateService.translate('Common.edit');
|
|
2362
|
-
this.editToolTipWidth = "300px";
|
|
2363
|
-
}
|
|
2364
|
-
this.copyText = this.translateService.translate('Common.copy');
|
|
2365
|
-
if (this.translateService.translate('Common.copy').length > 6) {
|
|
2366
|
-
this.copyText = (this.translateService.translate('Common.copy').substring(0, 6) + '...');
|
|
2367
|
-
this.copyToolTipValue = this.translateService.translate('Common.copy');
|
|
2368
|
-
this.copyToolTipWidth = "300px";
|
|
2310
|
+
setTimeout((/**
|
|
2311
|
+
* @return {?}
|
|
2312
|
+
*/
|
|
2313
|
+
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2314
|
+
var titleLineEnabled;
|
|
2315
|
+
var _this = this;
|
|
2316
|
+
return __generator(this, function (_a) {
|
|
2317
|
+
switch (_a.label) {
|
|
2318
|
+
case 0:
|
|
2319
|
+
console.log('widget inititated listener triggered');
|
|
2320
|
+
this.widgetElement.addEventListener('on-widget-respond', (/**
|
|
2321
|
+
* @param {?} e
|
|
2322
|
+
* @return {?}
|
|
2323
|
+
*/
|
|
2324
|
+
function (e) {
|
|
2325
|
+
/** @type {?} */
|
|
2326
|
+
var type = e.detail.type;
|
|
2327
|
+
switch (type) {
|
|
2328
|
+
case 'onDataLoad':
|
|
2329
|
+
if (e.detail.data)
|
|
2330
|
+
_this.showPanel = true;
|
|
2331
|
+
else
|
|
2332
|
+
_this.showPanel = false;
|
|
2333
|
+
break;
|
|
2334
|
+
case 'onConfigEditClicked':
|
|
2335
|
+
_this.editWidget();
|
|
2336
|
+
break;
|
|
2337
|
+
case 'onEnableDefaultState':
|
|
2338
|
+
_this.setEmptyState(e.detail.data);
|
|
2339
|
+
break;
|
|
2340
|
+
case 'onSetTitleUnderline':
|
|
2341
|
+
if (e.detail.data == true)
|
|
2342
|
+
_this.enableTitleLine = true;
|
|
2343
|
+
else
|
|
2344
|
+
_this.enableTitleLine = _this.enableTitleLineActual;
|
|
2345
|
+
break;
|
|
2346
|
+
case 'onWidgetTitleHidden':
|
|
2347
|
+
if (e.detail.data == true)
|
|
2348
|
+
_this.hideTitle = true;
|
|
2349
|
+
else
|
|
2350
|
+
_this.hideTitle = false;
|
|
2351
|
+
break;
|
|
2352
|
+
case 'onUpdateLockData':
|
|
2353
|
+
_this.setLock(e.detail.data);
|
|
2354
|
+
break;
|
|
2355
|
+
case 'onGlobalFilterApplicableCheck':
|
|
2356
|
+
_this.setInapplicableFilters(e.detail.data, widgetInfo.widgetInstanceId);
|
|
2357
|
+
break;
|
|
2358
|
+
default:
|
|
2359
|
+
break;
|
|
2369
2360
|
}
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
this.
|
|
2361
|
+
}));
|
|
2362
|
+
if (typeof (this.widgetElement.titleLineEnabled) != 'undefined') {
|
|
2363
|
+
titleLineEnabled = this.widgetElement.titleLineEnabled();
|
|
2364
|
+
if (titleLineEnabled) {
|
|
2365
|
+
this.enableTitleLine = titleLineEnabled;
|
|
2366
|
+
this.enableTitleLineActual = titleLineEnabled;
|
|
2375
2367
|
}
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2368
|
+
}
|
|
2369
|
+
this.editText = this.translateService.translate('Common.edit');
|
|
2370
|
+
if (this.translateService.translate('Common.edit').length > 6) {
|
|
2371
|
+
this.editText = (this.translateService.translate('Common.edit').substring(0, 6) + '...');
|
|
2372
|
+
this.editToolTipValue = this.translateService.translate('Common.edit');
|
|
2373
|
+
this.editToolTipWidth = "300px";
|
|
2374
|
+
}
|
|
2375
|
+
this.copyText = this.translateService.translate('Common.copy');
|
|
2376
|
+
if (this.translateService.translate('Common.copy').length > 6) {
|
|
2377
|
+
this.copyText = (this.translateService.translate('Common.copy').substring(0, 6) + '...');
|
|
2378
|
+
this.copyToolTipValue = this.translateService.translate('Common.copy');
|
|
2379
|
+
this.copyToolTipWidth = "300px";
|
|
2380
|
+
}
|
|
2381
|
+
this.moveText = this.translateService.translate('Common.move');
|
|
2382
|
+
if (this.translateService.translate('Common.move').length > 6) {
|
|
2383
|
+
this.moveText = (this.translateService.translate('Common.move').substring(0, 6) + '...');
|
|
2384
|
+
this.moveToolTipValue = this.translateService.translate('Common.move');
|
|
2385
|
+
this.moveToolTipWidth = "300px";
|
|
2386
|
+
}
|
|
2387
|
+
this.excelText = this.translateService.translate('Common.excel');
|
|
2388
|
+
if (this.translateService.translate('Common.excel').length > 6) {
|
|
2389
|
+
this.excelText = (this.translateService.translate('Common.excel').substring(0, 6) + '...');
|
|
2390
|
+
this.excelToolTipValue = this.translateService.translate('Common.excel');
|
|
2391
|
+
this.excelToolTipWidth = "300px";
|
|
2392
|
+
}
|
|
2393
|
+
this.deleteText = this.translateService.translate('Common.delete');
|
|
2394
|
+
if (this.translateService.translate('Common.delete').length > 6) {
|
|
2395
|
+
this.deleteText = (this.translateService.translate('Common.delete').substring(0, 6) + '...');
|
|
2396
|
+
this.deleteToolTipValue = this.translateService.translate('Common.delete');
|
|
2397
|
+
this.deleteToolTipWidth = "300px";
|
|
2398
|
+
}
|
|
2399
|
+
this.isWidgetLoaded = true;
|
|
2400
|
+
widgetConfigFilter.appConfig = this.appConfig;
|
|
2401
|
+
widgetConfigFilter.widgetInfo = widgetInfo;
|
|
2402
|
+
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
2403
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
2404
|
+
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
2405
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
2406
|
+
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
2407
|
+
case 1:
|
|
2408
|
+
_a.sent();
|
|
2409
|
+
return [4 /*yield*/, this.setDownloadIcon()];
|
|
2410
|
+
case 2:
|
|
2411
|
+
_a.sent();
|
|
2412
|
+
return [2 /*return*/];
|
|
2413
|
+
}
|
|
2414
|
+
});
|
|
2415
|
+
}); }));
|
|
2416
|
+
}).bind(_this);
|
|
2417
|
+
_this.widgetElementHandler = handler;
|
|
2418
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, handler);
|
|
2408
2419
|
_this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
|
|
2409
2420
|
}));
|
|
2410
2421
|
}));
|
|
@@ -3127,6 +3138,8 @@
|
|
|
3127
3138
|
RAWidgetContainer.prototype.WidgetDisplayName;
|
|
3128
3139
|
/** @type {?} */
|
|
3129
3140
|
RAWidgetContainer.prototype.enableTitleLineActual;
|
|
3141
|
+
/** @type {?} */
|
|
3142
|
+
RAWidgetContainer.prototype.widgetElementHandler;
|
|
3130
3143
|
/**
|
|
3131
3144
|
* @type {?}
|
|
3132
3145
|
* @private
|