@schneideress/dashboardframework 0.0.274 → 0.0.276
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 +139 -443
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +15 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/gridster/lib/gridsterItem.component.js +1 -1
- package/esm2015/gridster/lib/gridsterRenderer.service.js +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +75 -171
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +36 -66
- package/esm2015/lib/ra.base.dashboard.template.js +2 -4
- package/esm2015/lib/ra.dashboard.responsive.service.js +2 -12
- package/esm2015/lib/ra.dashboard.service.js +2 -7
- package/esm2015/lib/ra.event.enum.js +1 -7
- package/esm2015/lib/ra.gridster.config.js +3 -3
- package/esm5/gridster/lib/gridsterItem.component.js +1 -1
- package/esm5/gridster/lib/gridsterRenderer.service.js +1 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +75 -173
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +36 -66
- package/esm5/lib/ra.base.dashboard.template.js +2 -4
- package/esm5/lib/ra.dashboard.responsive.service.js +2 -12
- package/esm5/lib/ra.dashboard.service.js +2 -7
- package/esm5/lib/ra.event.enum.js +1 -7
- package/esm5/lib/ra.gridster.config.js +3 -3
- package/fesm2015/schneideress-dashboardframework.js +114 -263
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +115 -266
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +5 -25
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +2 -6
- package/lib/ra.base.dashboard.template.d.ts +2 -4
- package/lib/ra.dashboard.responsive.service.d.ts +1 -1
- package/lib/ra.dashboard.service.d.ts +1 -0
- package/lib/ra.event.enum.d.ts +1 -7
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __extends, __decorate, __metadata,
|
|
1
|
+
import { __extends, __decorate, __metadata, __awaiter, __generator, __assign, __param } from 'tslib';
|
|
2
2
|
import { Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Injectable, EventEmitter, NgZone, Input, Output, ViewChild, ElementRef, Component, Renderer2, ChangeDetectorRef, ViewEncapsulation, Host, NgModule } from '@angular/core';
|
|
3
3
|
import { of, Subject } from 'rxjs';
|
|
4
4
|
import { BaseService, RATranslateService, RAPermissionService, DomService, RACommonModule } from '@schneideress/ra-common';
|
|
5
5
|
import { filter, map } from 'rxjs/operators';
|
|
6
6
|
import { NgxUiLoaderService, NgxUiLoaderModule } from 'ngx-ui-loader';
|
|
7
7
|
import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
8
|
+
import { Router } from '@angular/router';
|
|
8
9
|
import { RaWidgetlockStatus, WidgetViewState, RADownloadType, RADownloadOption } from '@schneideress/widgetframework';
|
|
9
10
|
import { BrowserModule } from '@angular/platform-browser';
|
|
10
11
|
import { HttpClientModule } from '@angular/common/http';
|
|
@@ -17,6 +18,7 @@ var RaDashboardService = /** @class */ (function (_super) {
|
|
|
17
18
|
function RaDashboardService(injector) {
|
|
18
19
|
var _this = _super.call(this, injector, '') || this;
|
|
19
20
|
_this.loadedScripts = [];
|
|
21
|
+
_this.clientId = undefined;
|
|
20
22
|
return _this;
|
|
21
23
|
}
|
|
22
24
|
/*
|
|
@@ -69,12 +71,6 @@ var RaDashboardService = /** @class */ (function (_super) {
|
|
|
69
71
|
/**To Update widgetInfo in database */
|
|
70
72
|
RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
|
|
71
73
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
72
|
-
var info = {};
|
|
73
|
-
info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
|
|
74
|
-
info.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
75
|
-
info.widgetTitle = widgetInfo.widgetTitle;
|
|
76
|
-
info.widgetType = widgetInfo.widgetType;
|
|
77
|
-
info.widgetId = widgetInfo.widgetId;
|
|
78
74
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
79
75
|
};
|
|
80
76
|
/** To Move or change position if current widget container*/
|
|
@@ -190,12 +186,6 @@ var RAEvent;
|
|
|
190
186
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
191
187
|
/**show inapplicable filter message in global filter flyout */
|
|
192
188
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
193
|
-
/** Bulk Action Clicked */
|
|
194
|
-
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
195
|
-
/** Global Filter Clicked */
|
|
196
|
-
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
197
|
-
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
198
|
-
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
199
189
|
})(RAEvent || (RAEvent = {}));
|
|
200
190
|
var RAEventKey;
|
|
201
191
|
(function (RAEventKey) {
|
|
@@ -209,9 +199,9 @@ var GridsterConfigDefaultSettings = {
|
|
|
209
199
|
margin: 10,
|
|
210
200
|
outerMargin: true,
|
|
211
201
|
outerMarginTop: 10,
|
|
212
|
-
outerMarginRight:
|
|
202
|
+
outerMarginRight: 10,
|
|
213
203
|
outerMarginBottom: 30,
|
|
214
|
-
outerMarginLeft:
|
|
204
|
+
outerMarginLeft: 10,
|
|
215
205
|
useTransformPositioning: true,
|
|
216
206
|
mobileBreakpoint: 640,
|
|
217
207
|
minCols: 10,
|
|
@@ -326,7 +316,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
326
316
|
enumerable: true,
|
|
327
317
|
configurable: true
|
|
328
318
|
});
|
|
329
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt
|
|
319
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
330
320
|
var config = GridsterConfigDefaultSettings;
|
|
331
321
|
config.minCols = this.currentResInfo.maxCols;
|
|
332
322
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -348,13 +338,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
348
338
|
config.swap = true;
|
|
349
339
|
config.draggable.enabled = true;
|
|
350
340
|
}
|
|
351
|
-
if (!resize) {
|
|
352
|
-
config.resizable.enabled = false;
|
|
353
|
-
config.swap = false;
|
|
354
|
-
}
|
|
355
|
-
if (!canMove) {
|
|
356
|
-
config.draggable.enabled = false;
|
|
357
|
-
}
|
|
358
341
|
return config;
|
|
359
342
|
};
|
|
360
343
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -362,9 +345,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
362
345
|
if (widget.widgetSettings) {
|
|
363
346
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
364
347
|
}
|
|
365
|
-
if (widget.templateSettings) {
|
|
366
|
-
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
367
|
-
}
|
|
368
348
|
var gridsterItem = {
|
|
369
349
|
cols: this.getWidth(widget.width),
|
|
370
350
|
rows: this.getHeight(widget.height),
|
|
@@ -415,7 +395,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
415
395
|
}());
|
|
416
396
|
|
|
417
397
|
var RADashboardArea = /** @class */ (function () {
|
|
418
|
-
function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
|
|
398
|
+
function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService, router) {
|
|
419
399
|
this.dashboardService = dashboardService;
|
|
420
400
|
this.ngZone = ngZone;
|
|
421
401
|
this.ngxService = ngxService;
|
|
@@ -423,6 +403,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
423
403
|
this.notifier = notifier;
|
|
424
404
|
this.responsiveService = responsiveService;
|
|
425
405
|
this.permissionService = permissionService;
|
|
406
|
+
this.router = router;
|
|
426
407
|
this.widgetList = Array();
|
|
427
408
|
this.gridheight = 300;
|
|
428
409
|
this.gridcellHeight = 0;
|
|
@@ -432,21 +413,14 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
432
413
|
this.domResized = false;
|
|
433
414
|
this.showEmptyDashboard = false;
|
|
434
415
|
this.isWidgetMgmnt = false;
|
|
435
|
-
this.initialWidgetCount = 10;
|
|
436
|
-
this.currentLoadedIndex = 0;
|
|
437
|
-
this.loading = false;
|
|
438
416
|
this.widgetHeight = 2;
|
|
439
417
|
this.widgetWidth = 4;
|
|
440
418
|
this.hideDashboardBanner = new EventEmitter();
|
|
441
419
|
}
|
|
442
420
|
RADashboardArea.prototype.ngOnInit = function () {
|
|
443
421
|
var _this = this;
|
|
444
|
-
window.addEventListener('scroll', function () {
|
|
445
|
-
_this.loadNext();
|
|
446
|
-
});
|
|
447
422
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
448
423
|
this.initiateGridsterConfig();
|
|
449
|
-
this.setEmptyDashboardConfig();
|
|
450
424
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
451
425
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
452
426
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -475,11 +449,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
475
449
|
}, 100);
|
|
476
450
|
}
|
|
477
451
|
});
|
|
478
|
-
setTimeout(function () {
|
|
479
|
-
_this.bulkActionClick = _this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
|
|
480
|
-
_this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
481
|
-
});
|
|
482
|
-
});
|
|
483
452
|
};
|
|
484
453
|
RADashboardArea.prototype.ngOnChanges = function (changes) {
|
|
485
454
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -487,44 +456,28 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
487
456
|
this.isWidgetLoaded = true;
|
|
488
457
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
489
458
|
}
|
|
490
|
-
this.initiateGridsterConfig();
|
|
491
459
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
492
460
|
this.inititateEventBusSubscritions();
|
|
493
461
|
}
|
|
494
462
|
};
|
|
495
|
-
RADashboardArea.prototype.setEmptyDashboardConfig = function () {
|
|
496
|
-
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
497
|
-
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
498
|
-
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
499
|
-
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
500
|
-
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
501
|
-
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
502
|
-
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
463
|
/**To set GridsterConfig */
|
|
506
464
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
507
465
|
var _this = this;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
520
|
-
}
|
|
466
|
+
/**To override default configuration values to the gridster control */
|
|
467
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
|
|
468
|
+
this.options.initCallback = function (gridster) {
|
|
469
|
+
if (_this.options.api) {
|
|
470
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
this.options.itemChangeCallback = function (item) {
|
|
474
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
475
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
476
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
521
477
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
RADashboardArea.prototype.widgetLoaded = function (widget) {
|
|
527
|
-
widget.canLoadData = true;
|
|
478
|
+
}
|
|
479
|
+
_this.setAreaHeight();
|
|
480
|
+
};
|
|
528
481
|
};
|
|
529
482
|
/** To initiate eventbus subsctiptions */
|
|
530
483
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -544,11 +497,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
544
497
|
_this.addWidget(e);
|
|
545
498
|
});
|
|
546
499
|
});
|
|
547
|
-
this.curatedFilterChange = this.raDashboardEventBus.subscribe(RAEvent.CuratedFilterChange).subscribe(function (e) {
|
|
548
|
-
_this.ngZone.run(function () {
|
|
549
|
-
_this.loadWidgets(_this.userDashboardId, _this.areaKey);
|
|
550
|
-
});
|
|
551
|
-
});
|
|
552
500
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
553
501
|
_this.ngZone.run(function () {
|
|
554
502
|
_this.rearrangeWidgets();
|
|
@@ -597,10 +545,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
597
545
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
598
546
|
if (this.rearrangeWidgetClick)
|
|
599
547
|
this.rearrangeWidgetClick.unsubscribe();
|
|
600
|
-
if (this.curatedFilterChange)
|
|
601
|
-
this.curatedFilterChange.unsubscribe();
|
|
602
|
-
if (this.bulkActionClick)
|
|
603
|
-
this.bulkActionClick.unsubscribe();
|
|
604
548
|
};
|
|
605
549
|
/**To update position/dimention of all widgets in the area */
|
|
606
550
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -637,16 +581,14 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
637
581
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
638
582
|
RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
|
|
639
583
|
var _this = this;
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
this.initialWidgetCount = 1000;
|
|
645
|
-
this.currentLoadedIndex = 0;
|
|
646
|
-
this.loading = false;
|
|
584
|
+
var currentUrl = this.router.url;
|
|
585
|
+
var IsTypeIndicator = false;
|
|
586
|
+
if (currentUrl.includes('indicatorDashboard'))
|
|
587
|
+
IsTypeIndicator = true;
|
|
647
588
|
var widgetInfo = {
|
|
648
589
|
dashboardId: userDashboarId.toString(),
|
|
649
|
-
dashboardAreaKey: areaKey
|
|
590
|
+
dashboardAreaKey: areaKey,
|
|
591
|
+
IsTypeIndicator: IsTypeIndicator
|
|
650
592
|
};
|
|
651
593
|
this.widgetList = [];
|
|
652
594
|
this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe(function (widgets) {
|
|
@@ -662,8 +604,9 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
662
604
|
});
|
|
663
605
|
_this.checkPAMWidgets();
|
|
664
606
|
if (widgets && widgets.length > 0) {
|
|
665
|
-
_this.
|
|
666
|
-
_this.
|
|
607
|
+
_this.dashboardService.clientId = widgets[0].clientId;
|
|
608
|
+
_this.widgetList = _this.mapObjectListToGridsterItemList(widgets);
|
|
609
|
+
_this.setAreaHeight();
|
|
667
610
|
_this.raDashboardEventBus.publish(RAEvent.HideDashboardBanner, false);
|
|
668
611
|
}
|
|
669
612
|
else {
|
|
@@ -672,45 +615,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
672
615
|
}
|
|
673
616
|
});
|
|
674
617
|
};
|
|
675
|
-
RADashboardArea.prototype.loadWidgetsDelta = function () {
|
|
676
|
-
var _this = this;
|
|
677
|
-
var _a;
|
|
678
|
-
if (!this.loading) {
|
|
679
|
-
this.loading = true;
|
|
680
|
-
var widgets = this.mapObjectListToGridsterItemList(this.userWidgets.slice(this.currentLoadedIndex, (this.currentLoadedIndex + this.initialWidgetCount)));
|
|
681
|
-
this.currentLoadedIndex += this.initialWidgetCount;
|
|
682
|
-
(_a = this.widgetList).push.apply(_a, __spread(widgets));
|
|
683
|
-
this.setAreaHeight();
|
|
684
|
-
setTimeout(function () {
|
|
685
|
-
_this.loading = false;
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
};
|
|
689
|
-
RADashboardArea.prototype.dataLoaded = function (widgetElement) {
|
|
690
|
-
this.loadNext();
|
|
691
|
-
};
|
|
692
|
-
RADashboardArea.prototype.loadNext = function () {
|
|
693
|
-
if (this.divBottom) {
|
|
694
|
-
if (this.elementInViewport(this.divBottom.nativeElement)) {
|
|
695
|
-
this.loadWidgetsDelta();
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
RADashboardArea.prototype.elementInViewport = function (el) {
|
|
700
|
-
var top = el.offsetTop;
|
|
701
|
-
var left = el.offsetLeft;
|
|
702
|
-
var width = el.offsetWidth;
|
|
703
|
-
var height = el.offsetHeight;
|
|
704
|
-
while (el.offsetParent) {
|
|
705
|
-
el = el.offsetParent;
|
|
706
|
-
top += el.offsetTop;
|
|
707
|
-
left += el.offsetLeft;
|
|
708
|
-
}
|
|
709
|
-
return (top >= window.scrollY &&
|
|
710
|
-
left >= window.scrollX &&
|
|
711
|
-
(top + height) <= (window.scrollY + window.innerHeight) &&
|
|
712
|
-
(left + width) <= (window.scrollX + window.innerWidth));
|
|
713
|
-
};
|
|
714
618
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
715
619
|
RADashboardArea.prototype.setAreaHeight = function () {
|
|
716
620
|
var _this = this;
|
|
@@ -754,22 +658,22 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
754
658
|
/** To remove a widget instance from dashboard and to save info in database */
|
|
755
659
|
RADashboardArea.prototype.deleteWidget = function (widgetInstanceId, isalertDisabled) {
|
|
756
660
|
if (isalertDisabled === void 0) { isalertDisabled = false; }
|
|
757
|
-
var widget = this.userWidgets.filter(function (item) {
|
|
758
|
-
return item.widgetInstanceId === widgetInstanceId;
|
|
759
|
-
});
|
|
760
|
-
if (widget.length > 0) {
|
|
761
|
-
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
762
|
-
}
|
|
763
|
-
if (this.PAMWidgets.length > 0) {
|
|
764
|
-
var indx = this.PAMWidgets.indexOf(widgetInstanceId);
|
|
765
|
-
if (indx > -1)
|
|
766
|
-
this.PAMWidgets.splice(indx, 1);
|
|
767
|
-
this.checkPAMWidgets();
|
|
768
|
-
}
|
|
769
661
|
var gridsterItem = this.widgetList.filter(function (item) {
|
|
770
662
|
return item.widgetInfo.widgetInstanceId === widgetInstanceId;
|
|
771
663
|
});
|
|
772
664
|
if (gridsterItem.length > 0) {
|
|
665
|
+
var widget = this.userWidgets.filter(function (item) {
|
|
666
|
+
return item.widgetInstanceId === widgetInstanceId;
|
|
667
|
+
});
|
|
668
|
+
if (widget.length > 0) {
|
|
669
|
+
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
670
|
+
}
|
|
671
|
+
if (this.PAMWidgets.length > 0) {
|
|
672
|
+
var indx = this.PAMWidgets.indexOf(widgetInstanceId);
|
|
673
|
+
if (indx > -1)
|
|
674
|
+
this.PAMWidgets.splice(indx, 1);
|
|
675
|
+
this.checkPAMWidgets();
|
|
676
|
+
}
|
|
773
677
|
this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
|
|
774
678
|
this.setAreaHeight();
|
|
775
679
|
if (!isalertDisabled) {
|
|
@@ -784,15 +688,11 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
784
688
|
/**To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc*/
|
|
785
689
|
RADashboardArea.prototype.rearrangeWidgets = function () {
|
|
786
690
|
var _this = this;
|
|
787
|
-
this.currentLoadedIndex = 0;
|
|
788
|
-
this.loading = false;
|
|
789
691
|
for (var i = 0; i < this.userWidgets.length; i++) {
|
|
790
692
|
this.userWidgets[i].position_x = 0;
|
|
791
693
|
this.userWidgets[i].position_y = 0;
|
|
792
694
|
}
|
|
793
|
-
this.widgetList =
|
|
794
|
-
this.loadWidgetsDelta();
|
|
795
|
-
this.raDashboardEventBus.publish(RAEvent.HideDashboardBanner, false);
|
|
695
|
+
this.widgetList = this.mapObjectListToGridsterItemList(this.userWidgets);
|
|
796
696
|
if (this.widgetList.length > 0)
|
|
797
697
|
this.updateWidgetPosition(this.widgetList[0].widgetInfo.widgetInstanceId);
|
|
798
698
|
setTimeout(function () {
|
|
@@ -825,33 +725,30 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
825
725
|
this.ngxService.start();
|
|
826
726
|
this.dashboardService.addWidget(data, this.appConfig).subscribe(function (widget) {
|
|
827
727
|
_this.userWidgets.push(widget);
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
_this.
|
|
833
|
-
if (
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
widget.rowHeight = curRowHeight;
|
|
837
|
-
_this.gridcellHeight = curRowHeight;
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
var widgetInstanceId = 0;
|
|
841
|
-
if (widget && widget.widgetInstanceId) {
|
|
842
|
-
widgetInstanceId = widget.widgetInstanceId;
|
|
843
|
-
/**To save added widget position in db */
|
|
844
|
-
if (_this.responsiveService.IsDesktopView) {
|
|
845
|
-
setTimeout(function () {
|
|
846
|
-
_this.updateWidgetPosition(widgetInstanceId);
|
|
847
|
-
});
|
|
848
|
-
}
|
|
728
|
+
var gridsterItem = _this.responsiveService.getGridsterItem(widget);
|
|
729
|
+
_this.widgetList.push(gridsterItem);
|
|
730
|
+
_this.setAreaHeight();
|
|
731
|
+
if (_this.options.api) {
|
|
732
|
+
var curRowHeight = Number(_this.options.api.getCurrentRowHeight());
|
|
733
|
+
if (curRowHeight > 0) {
|
|
734
|
+
widget.rowHeight = curRowHeight;
|
|
735
|
+
_this.gridcellHeight = curRowHeight;
|
|
849
736
|
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
737
|
+
}
|
|
738
|
+
var widgetInstanceId = 0;
|
|
739
|
+
if (widget && widget.widgetInstanceId) {
|
|
740
|
+
widgetInstanceId = widget.widgetInstanceId;
|
|
741
|
+
/**To save added widget position in db */
|
|
742
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
743
|
+
setTimeout(function () {
|
|
744
|
+
_this.updateWidgetPosition(widgetInstanceId);
|
|
745
|
+
});
|
|
853
746
|
}
|
|
854
747
|
}
|
|
748
|
+
if (widget.settings && widget.settings.isPAMWidget) {
|
|
749
|
+
_this.PAMWidgets.push(widget.widgetInstanceId);
|
|
750
|
+
_this.checkPAMWidgets();
|
|
751
|
+
}
|
|
855
752
|
_this.raDashboardEventBus.publish(RAEvent.WidgetAdded, widget);
|
|
856
753
|
});
|
|
857
754
|
};
|
|
@@ -880,15 +777,12 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
880
777
|
});
|
|
881
778
|
}
|
|
882
779
|
this.userWidgets.push(data);
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
this.
|
|
888
|
-
|
|
889
|
-
this.PAMWidgets.push(data.widgetInstanceId);
|
|
890
|
-
this.checkPAMWidgets();
|
|
891
|
-
}
|
|
780
|
+
var gridsterItem = this.responsiveService.getGridsterItem(data);
|
|
781
|
+
this.widgetList.push(gridsterItem);
|
|
782
|
+
this.setAreaHeight();
|
|
783
|
+
if (data.settings && data.settings.isPAMWidget) {
|
|
784
|
+
this.PAMWidgets.push(data.widgetInstanceId);
|
|
785
|
+
this.checkPAMWidgets();
|
|
892
786
|
}
|
|
893
787
|
};
|
|
894
788
|
RADashboardArea.prototype.mapObjectListToGridsterItemList = function (widgetList) {
|
|
@@ -917,11 +811,8 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
917
811
|
});
|
|
918
812
|
return widgetListArray;
|
|
919
813
|
};
|
|
920
|
-
RADashboardArea.prototype.
|
|
921
|
-
|
|
922
|
-
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
923
|
-
else if (this.emptyDashboardButtonAction == "filter")
|
|
924
|
-
this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
|
|
814
|
+
RADashboardArea.prototype.addNewWidget = function () {
|
|
815
|
+
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
925
816
|
};
|
|
926
817
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
927
818
|
this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -941,7 +832,8 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
941
832
|
{ type: RATranslateService },
|
|
942
833
|
{ type: NotifierService },
|
|
943
834
|
{ type: RADashboardResponsiveService },
|
|
944
|
-
{ type: RAPermissionService }
|
|
835
|
+
{ type: RAPermissionService },
|
|
836
|
+
{ type: Router }
|
|
945
837
|
]; };
|
|
946
838
|
__decorate([
|
|
947
839
|
Input('user-dashboard-id'),
|
|
@@ -971,14 +863,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
971
863
|
Input('app-config'),
|
|
972
864
|
__metadata("design:type", Object)
|
|
973
865
|
], RADashboardArea.prototype, "appConfig", void 0);
|
|
974
|
-
__decorate([
|
|
975
|
-
Input('dashboard-info'),
|
|
976
|
-
__metadata("design:type", Object)
|
|
977
|
-
], RADashboardArea.prototype, "dashboardInfo", void 0);
|
|
978
|
-
__decorate([
|
|
979
|
-
Input(),
|
|
980
|
-
__metadata("design:type", Object)
|
|
981
|
-
], RADashboardArea.prototype, "templateConfig", void 0);
|
|
982
866
|
__decorate([
|
|
983
867
|
Output(),
|
|
984
868
|
__metadata("design:type", Object)
|
|
@@ -987,15 +871,11 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
987
871
|
ViewChild('gridWrapper', { static: false }),
|
|
988
872
|
__metadata("design:type", ElementRef)
|
|
989
873
|
], RADashboardArea.prototype, "gridWrapper", void 0);
|
|
990
|
-
__decorate([
|
|
991
|
-
ViewChild('divBottom', { static: false }),
|
|
992
|
-
__metadata("design:type", ElementRef)
|
|
993
|
-
], RADashboardArea.prototype, "divBottom", void 0);
|
|
994
874
|
RADashboardArea = __decorate([
|
|
995
875
|
Component({
|
|
996
876
|
selector: 'ra-dashboard-area',
|
|
997
|
-
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"
|
|
998
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
877
|
+
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"\r\n (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
878
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:40px 20px 20px;background-color:#ededed;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:10px;background-color:#ededed;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
|
|
999
879
|
}),
|
|
1000
880
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1001
881
|
NgZone,
|
|
@@ -1003,7 +883,8 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
1003
883
|
RATranslateService,
|
|
1004
884
|
NotifierService,
|
|
1005
885
|
RADashboardResponsiveService,
|
|
1006
|
-
RAPermissionService
|
|
886
|
+
RAPermissionService,
|
|
887
|
+
Router])
|
|
1007
888
|
], RADashboardArea);
|
|
1008
889
|
return RADashboardArea;
|
|
1009
890
|
}());
|
|
@@ -1098,11 +979,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1098
979
|
this.showExcell = true;
|
|
1099
980
|
this.hideTitle = false;
|
|
1100
981
|
this.inapplicableFilters = [];
|
|
1101
|
-
this.canLoadData = false;
|
|
1102
982
|
this.widgetDeleted = new EventEmitter();
|
|
1103
983
|
this.updateAppliedFilters = new EventEmitter();
|
|
1104
|
-
this.dataLoaded = new EventEmitter();
|
|
1105
|
-
this.widgetLoaded = new EventEmitter();
|
|
1106
984
|
this.isWidgetStateApplicable = false;
|
|
1107
985
|
this.widgetEmptyState = '';
|
|
1108
986
|
this.lockVisible = false;
|
|
@@ -1127,7 +1005,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1127
1005
|
configurable: true
|
|
1128
1006
|
});
|
|
1129
1007
|
RAWidgetContainer.prototype.ngOnInit = function () {
|
|
1130
|
-
this.WidgetDisplayName = this.
|
|
1008
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1131
1009
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1132
1010
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1133
1011
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1148,32 +1026,19 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1148
1026
|
});
|
|
1149
1027
|
});
|
|
1150
1028
|
}
|
|
1151
|
-
if (this.widgetElement) {
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1029
|
+
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1030
|
+
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1031
|
+
if (filterObj.WidgetInstanceId) {
|
|
1032
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1033
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1156
1034
|
}
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1160
|
-
if (filterObj.WidgetInstanceId) {
|
|
1161
|
-
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1162
|
-
this.refreshWidget(this.data.widgetInfo);
|
|
1163
|
-
}
|
|
1164
|
-
else {
|
|
1165
|
-
//this.refreshWidget(this.data.widgetInfo);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1170
|
-
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1171
|
-
this.invokeWidgetResizedEvent();
|
|
1035
|
+
else {
|
|
1036
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1172
1037
|
}
|
|
1173
1038
|
}
|
|
1174
|
-
if (changes.
|
|
1175
|
-
|
|
1176
|
-
|
|
1039
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1040
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1041
|
+
this.invokeWidgetResizedEvent();
|
|
1177
1042
|
}
|
|
1178
1043
|
};
|
|
1179
1044
|
RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
|
|
@@ -1365,10 +1230,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1365
1230
|
_this.showPanel = true;
|
|
1366
1231
|
else
|
|
1367
1232
|
_this.showPanel = false;
|
|
1368
|
-
if (!_this.data.dataLoaded) {
|
|
1369
|
-
_this.data.dataLoaded = true;
|
|
1370
|
-
_this.dataLoaded.emit(_this.widgetElement);
|
|
1371
|
-
}
|
|
1372
1233
|
break;
|
|
1373
1234
|
case 'onConfigEditClicked':
|
|
1374
1235
|
_this.editWidget();
|
|
@@ -1441,9 +1302,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1441
1302
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1442
1303
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1443
1304
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1444
|
-
|
|
1445
|
-
//this.widgetElement.loadContent(widgetConfigFilter);
|
|
1446
|
-
this.widgetLoaded.emit();
|
|
1305
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1447
1306
|
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
1448
1307
|
case 1:
|
|
1449
1308
|
_a.sent();
|
|
@@ -1526,8 +1385,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1526
1385
|
globalFilter: this.globalFilter,
|
|
1527
1386
|
appConfig: this.appConfig,
|
|
1528
1387
|
widgetInfo: widgetInfo,
|
|
1529
|
-
configChanges: this.getConfigChanges(configChanged)
|
|
1530
|
-
dashboardInfo: this.dashboardInfo
|
|
1388
|
+
configChanges: this.getConfigChanges(configChanged)
|
|
1531
1389
|
};
|
|
1532
1390
|
if (!widgetContainerContext.isWidgetLoaded) return [3 /*break*/, 3];
|
|
1533
1391
|
if (this.widgetElement && typeof (this.widgetElement.setConfigFilter) == 'function') {
|
|
@@ -1714,12 +1572,9 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1714
1572
|
var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
1715
1573
|
var settings = '';
|
|
1716
1574
|
if (this.isWidgetMgmnt) {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1721
|
-
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
1722
|
-
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1575
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1576
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1577
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1723
1578
|
}
|
|
1724
1579
|
var customPageParams = false;
|
|
1725
1580
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1728,14 +1583,14 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1728
1583
|
customPageParams = true;
|
|
1729
1584
|
}
|
|
1730
1585
|
}
|
|
1731
|
-
if (
|
|
1586
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1732
1587
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1733
1588
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1734
1589
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1735
1590
|
settings += this.translateService.translate('Common.visitpage');
|
|
1736
1591
|
settings += '</span></a>';
|
|
1737
1592
|
}
|
|
1738
|
-
if (
|
|
1593
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1739
1594
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1740
1595
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1741
1596
|
html += settings;
|
|
@@ -1767,7 +1622,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1767
1622
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1768
1623
|
html += this.getHr();
|
|
1769
1624
|
}
|
|
1770
|
-
if (this.isWidgetMgmnt
|
|
1625
|
+
if (this.isWidgetMgmnt) {
|
|
1771
1626
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1772
1627
|
html += this.deleteText;
|
|
1773
1628
|
html += '</span></a>';
|
|
@@ -1848,6 +1703,22 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1848
1703
|
if (this.currentComponent)
|
|
1849
1704
|
this.popupInstance.removeMe(this.currentComponent);
|
|
1850
1705
|
};
|
|
1706
|
+
RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
|
|
1707
|
+
var rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
1708
|
+
var translatedString = '';
|
|
1709
|
+
if (this.dashboardService.clientId) {
|
|
1710
|
+
var translationModule = this.dashboardService.clientId + '_DBW';
|
|
1711
|
+
translatedString = this.translateService.translate(translationModule + '.' + rKey);
|
|
1712
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
1713
|
+
return item;
|
|
1714
|
+
}
|
|
1715
|
+
else {
|
|
1716
|
+
return translatedString;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
else
|
|
1720
|
+
return item;
|
|
1721
|
+
};
|
|
1851
1722
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
1852
1723
|
{ type: RaDashboardService },
|
|
1853
1724
|
{ type: NgxUiLoaderService },
|
|
@@ -1890,10 +1761,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1890
1761
|
Input('global-filter'),
|
|
1891
1762
|
__metadata("design:type", Object)
|
|
1892
1763
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
1893
|
-
__decorate([
|
|
1894
|
-
Input('dashboard-info'),
|
|
1895
|
-
__metadata("design:type", Object)
|
|
1896
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
1897
1764
|
__decorate([
|
|
1898
1765
|
Input('data'),
|
|
1899
1766
|
__metadata("design:type", Object)
|
|
@@ -1918,14 +1785,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1918
1785
|
Input('grid-cell-height'),
|
|
1919
1786
|
__metadata("design:type", Number)
|
|
1920
1787
|
], RAWidgetContainer.prototype, "gridCellHeight", void 0);
|
|
1921
|
-
__decorate([
|
|
1922
|
-
Input('bulk-action-data'),
|
|
1923
|
-
__metadata("design:type", Object)
|
|
1924
|
-
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
1925
|
-
__decorate([
|
|
1926
|
-
Input(),
|
|
1927
|
-
__metadata("design:type", Boolean)
|
|
1928
|
-
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
1929
1788
|
__decorate([
|
|
1930
1789
|
Output(),
|
|
1931
1790
|
__metadata("design:type", Object)
|
|
@@ -1934,14 +1793,6 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1934
1793
|
Output(),
|
|
1935
1794
|
__metadata("design:type", Object)
|
|
1936
1795
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
1937
|
-
__decorate([
|
|
1938
|
-
Output(),
|
|
1939
|
-
__metadata("design:type", Object)
|
|
1940
|
-
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
1941
|
-
__decorate([
|
|
1942
|
-
Output(),
|
|
1943
|
-
__metadata("design:type", Object)
|
|
1944
|
-
], RAWidgetContainer.prototype, "widgetLoaded", void 0);
|
|
1945
1796
|
__decorate([
|
|
1946
1797
|
Input('dom-resized'),
|
|
1947
1798
|
__metadata("design:type", Boolean),
|
|
@@ -4940,13 +4791,11 @@ var RaBaseDashboardTemplate = /** @class */ (function () {
|
|
|
4940
4791
|
function RaBaseDashboardTemplate(ngZone) {
|
|
4941
4792
|
var _this = this;
|
|
4942
4793
|
this.ngZone = ngZone;
|
|
4943
|
-
this.initialize = function (eventBus, userDashboardId, appConfig
|
|
4794
|
+
this.initialize = function (eventBus, userDashboardId, appConfig) {
|
|
4944
4795
|
_this.ngZone.run(function () {
|
|
4945
4796
|
_this.userDashboardId = userDashboardId;
|
|
4946
4797
|
_this.appConfig = appConfig;
|
|
4947
4798
|
_this.raDashboardEventBus = eventBus;
|
|
4948
|
-
_this.dashboardInfo = dashboardInfo;
|
|
4949
|
-
_this.templateConfig = templateConfig;
|
|
4950
4799
|
});
|
|
4951
4800
|
_this.init();
|
|
4952
4801
|
};
|