@churchillliving/se-ui-toolkit 6.53.480 → 6.53.481

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('primeng/api'), require('@angular/core'), require('primeng/dynamicdialog'), require('file-saver'), require('jspdf'), require('@angular/common'), require('ngx-toastr'), require('@angular/common/http'), require('rxjs'), require('@angular/platform-browser'), require('@angular/router'), require('primeng/table'), require('primeng/multiselect'), require('@angular/forms'), require('@angular/platform-browser/animations'), require('primeng/tabview'), require('primeng/dropdown'), require('primeng/calendar'), require('primeng/button'), require('primeng/ripple'), require('primeng/checkbox'), require('primeng/inputtext'), require('primeng/tristatecheckbox'), require('primeng/inputtextarea'), require('primeng/tooltip'), require('primeng/panelmenu'), require('ngx-cookie-service'), require('@angular/cdk/portal'), require('primeng/menu'), require('primeng/galleria'), require('primeng/autocomplete'), require('primeng/accordion'), require('primeng/confirmdialog'), require('primeng/messages'), require('primeng/progressspinner'), require('primeng/inputnumber'), require('primeng/avatar'), require('primeng/card'), require('@angular/cdk/drag-drop'), require('primeng/inputswitch')) :
3
- typeof define === 'function' && define.amd ? define('@churchillliving/se-ui-toolkit', ['exports', 'primeng/api', '@angular/core', 'primeng/dynamicdialog', 'file-saver', 'jspdf', '@angular/common', 'ngx-toastr', '@angular/common/http', 'rxjs', '@angular/platform-browser', '@angular/router', 'primeng/table', 'primeng/multiselect', '@angular/forms', '@angular/platform-browser/animations', 'primeng/tabview', 'primeng/dropdown', 'primeng/calendar', 'primeng/button', 'primeng/ripple', 'primeng/checkbox', 'primeng/inputtext', 'primeng/tristatecheckbox', 'primeng/inputtextarea', 'primeng/tooltip', 'primeng/panelmenu', 'ngx-cookie-service', '@angular/cdk/portal', 'primeng/menu', 'primeng/galleria', 'primeng/autocomplete', 'primeng/accordion', 'primeng/confirmdialog', 'primeng/messages', 'primeng/progressspinner', 'primeng/inputnumber', 'primeng/avatar', 'primeng/card', '@angular/cdk/drag-drop', 'primeng/inputswitch'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.churchillliving = global.churchillliving || {}, global.churchillliving["se-ui-toolkit"] = {}), global.api, global.ng.core, global.i1, global.fileSaver, global.jsPDF, global.ng.common, global.ngxToastr, global.ng.common.http, global.rxjs, global.ng.platformBrowser, global.ng.router, global.table, global.multiselect, global.ng.forms, global.ng.platformBrowser.animations, global.tabview, global.dropdown, global.calendar, global.button, global.ripple, global.checkbox, global.inputtext, global.tristatecheckbox, global.inputtextarea, global.tooltip, global.panelmenu, global.ngxCookieService, global.ng.cdk.portal, global.menu, global.galleria, global.autocomplete, global.accordion, global.confirmdialog, global.messages, global.progressspinner, global.inputnumber, global.avatar, global.card, global.ng.cdk.dragDrop, global.inputswitch));
5
- })(this, (function (exports, api, i0, i1, fileSaver, jsPDF, i1$2, ngxToastr, i1$1, rxjs, platformBrowser, router, table, multiselect, forms, animations, tabview, dropdown, calendar, button, ripple, checkbox, inputtext, tristatecheckbox, inputtextarea, tooltip, panelmenu, ngxCookieService, portal, menu, galleria, autocomplete, accordion, confirmdialog, messages, progressspinner, inputnumber, avatar, card, dragDrop, inputswitch) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('primeng/api'), require('@angular/core'), require('primeng/dynamicdialog'), require('file-saver'), require('jspdf'), require('@angular/common'), require('ngx-toastr'), require('@angular/common/http'), require('rxjs'), require('@angular/router'), require('@angular/platform-browser'), require('primeng/table'), require('primeng/multiselect'), require('@angular/forms'), require('@angular/platform-browser/animations'), require('primeng/tabview'), require('primeng/dropdown'), require('primeng/calendar'), require('primeng/button'), require('primeng/ripple'), require('primeng/checkbox'), require('primeng/inputtext'), require('primeng/tristatecheckbox'), require('primeng/inputtextarea'), require('primeng/tooltip'), require('primeng/panelmenu'), require('ngx-cookie-service'), require('primeng/menu'), require('primeng/galleria'), require('primeng/autocomplete'), require('primeng/accordion'), require('primeng/confirmdialog'), require('primeng/messages'), require('primeng/progressspinner'), require('primeng/inputnumber'), require('primeng/avatar'), require('primeng/card'), require('@angular/cdk/drag-drop'), require('primeng/inputswitch')) :
3
+ typeof define === 'function' && define.amd ? define('@churchillliving/se-ui-toolkit', ['exports', 'primeng/api', '@angular/core', 'primeng/dynamicdialog', 'file-saver', 'jspdf', '@angular/common', 'ngx-toastr', '@angular/common/http', 'rxjs', '@angular/router', '@angular/platform-browser', 'primeng/table', 'primeng/multiselect', '@angular/forms', '@angular/platform-browser/animations', 'primeng/tabview', 'primeng/dropdown', 'primeng/calendar', 'primeng/button', 'primeng/ripple', 'primeng/checkbox', 'primeng/inputtext', 'primeng/tristatecheckbox', 'primeng/inputtextarea', 'primeng/tooltip', 'primeng/panelmenu', 'ngx-cookie-service', 'primeng/menu', 'primeng/galleria', 'primeng/autocomplete', 'primeng/accordion', 'primeng/confirmdialog', 'primeng/messages', 'primeng/progressspinner', 'primeng/inputnumber', 'primeng/avatar', 'primeng/card', '@angular/cdk/drag-drop', 'primeng/inputswitch'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.churchillliving = global.churchillliving || {}, global.churchillliving["se-ui-toolkit"] = {}), global.api, global.ng.core, global.i1, global.fileSaver, global.jsPDF, global.ng.common, global.ngxToastr, global.ng.common.http, global.rxjs, global.ng.router, global.ng.platformBrowser, global.table, global.multiselect, global.ng.forms, global.ng.platformBrowser.animations, global.tabview, global.dropdown, global.calendar, global.button, global.ripple, global.checkbox, global.inputtext, global.tristatecheckbox, global.inputtextarea, global.tooltip, global.panelmenu, global.ngxCookieService, global.menu, global.galleria, global.autocomplete, global.accordion, global.confirmdialog, global.messages, global.progressspinner, global.inputnumber, global.avatar, global.card, global.ng.cdk.dragDrop, global.inputswitch));
5
+ })(this, (function (exports, api, i0, i1, fileSaver, jsPDF, i1$2, ngxToastr, i1$1, rxjs, i6, platformBrowser, table, multiselect, forms, animations, tabview, dropdown, calendar, button, ripple, checkbox, inputtext, tristatecheckbox, inputtextarea, tooltip, panelmenu, ngxCookieService, menu, galleria, autocomplete, accordion, confirmdialog, messages, progressspinner, inputnumber, avatar, card, dragDrop, inputswitch) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -29,6 +29,7 @@
29
29
  var jsPDF__default = /*#__PURE__*/_interopDefaultLegacy(jsPDF);
30
30
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
31
31
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
32
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
32
33
 
33
34
  /******************************************************************************
34
35
  Copyright (c) Microsoft Corporation.
@@ -2237,12 +2238,13 @@
2237
2238
  });
2238
2239
  };
2239
2240
  var GridService = /** @class */ (function () {
2240
- function GridService(datepipe, hyperlinkService, dropdownService, alertService, requestService) {
2241
+ function GridService(datepipe, hyperlinkService, dropdownService, alertService, requestService, route) {
2241
2242
  this.datepipe = datepipe;
2242
2243
  this.hyperlinkService = hyperlinkService;
2243
2244
  this.dropdownService = dropdownService;
2244
2245
  this.alertService = alertService;
2245
2246
  this.requestService = requestService;
2247
+ this.route = route;
2246
2248
  this.softCachingFilters = {};
2247
2249
  this.applyFilterEvent = true;
2248
2250
  this.columnFocusedOut = false;
@@ -2898,6 +2900,22 @@
2898
2900
  columnInfo.type = columnInfo.type ? columnInfo.type : exports.EGridColumnType.DATE;
2899
2901
  return this.addColumn(columnInfo);
2900
2902
  };
2903
+ GridService.prototype.setconfigdata = function (config) {
2904
+ var _a;
2905
+ var configData = {};
2906
+ if ((config === null || config === void 0 ? void 0 : config.data) && ((_a = Object.keys(config === null || config === void 0 ? void 0 : config.data)) === null || _a === void 0 ? void 0 : _a.length) > 0) {
2907
+ configData = config;
2908
+ }
2909
+ else {
2910
+ this.route.queryParams.subscribe(function (param) {
2911
+ var _a;
2912
+ if (param && ((_a = Object.keys(param)) === null || _a === void 0 ? void 0 : _a.length) > 0) {
2913
+ configData['data'] = param;
2914
+ }
2915
+ });
2916
+ }
2917
+ return configData;
2918
+ };
2901
2919
  // add simple boolean grid column without
2902
2920
  GridService.prototype.addBooleanColumn = function (columnInfo, showFilter) {
2903
2921
  if (showFilter === void 0) { showFilter = true; }
@@ -3582,7 +3600,7 @@
3582
3600
  };
3583
3601
  return GridService;
3584
3602
  }());
3585
- /** @nocollapse */ GridService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function GridService_Factory() { return new GridService(i0__namespace.ɵɵinject(i1__namespace$1.DatePipe), i0__namespace.ɵɵinject(HyperlinkService), i0__namespace.ɵɵinject(DropdownService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(RequestService)); }, token: GridService, providedIn: "root" });
3603
+ /** @nocollapse */ GridService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function GridService_Factory() { return new GridService(i0__namespace.ɵɵinject(i1__namespace$1.DatePipe), i0__namespace.ɵɵinject(HyperlinkService), i0__namespace.ɵɵinject(DropdownService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(RequestService), i0__namespace.ɵɵinject(i6__namespace.ActivatedRoute)); }, token: GridService, providedIn: "root" });
3586
3604
  GridService.decorators = [
3587
3605
  { type: i0.Injectable, args: [{
3588
3606
  providedIn: 'root',
@@ -3594,7 +3612,8 @@
3594
3612
  { type: HyperlinkService },
3595
3613
  { type: DropdownService },
3596
3614
  { type: AlertService },
3597
- { type: RequestService }
3615
+ { type: RequestService },
3616
+ { type: i6.ActivatedRoute }
3598
3617
  ]; };
3599
3618
 
3600
3619
  exports.EPermissionType = void 0;
@@ -6343,7 +6362,7 @@
6343
6362
  { type: i1$2.DecimalPipe },
6344
6363
  { type: PageLoggerService },
6345
6364
  { type: i0.ChangeDetectorRef },
6346
- { type: router.Router },
6365
+ { type: i6.Router },
6347
6366
  { type: i1$2.DatePipe },
6348
6367
  { type: api.ConfirmationService },
6349
6368
  { type: i1.DynamicDialogConfig, decorators: [{ type: i0.Optional }] },
@@ -8080,7 +8099,7 @@
8080
8099
  { type: i1.DialogService },
8081
8100
  { type: i0.ComponentFactoryResolver },
8082
8101
  { type: i0.ChangeDetectorRef },
8083
- { type: router.Router },
8102
+ { type: i6.Router },
8084
8103
  { type: i0.ElementRef },
8085
8104
  { type: i1$2.DatePipe },
8086
8105
  { type: GridService },
@@ -8352,7 +8371,7 @@
8352
8371
  MenuBarComponent.ctorParameters = function () { return [
8353
8372
  { type: AuthenticationService },
8354
8373
  { type: ngxCookieService.CookieService },
8355
- { type: router.Router }
8374
+ { type: i6.Router }
8356
8375
  ]; };
8357
8376
  MenuBarComponent.propDecorators = {
8358
8377
  hiddenPanelMenu: [{ type: i0.Input }],
@@ -8367,11 +8386,6 @@
8367
8386
  LEFT: 'left-sidebar',
8368
8387
  RIGHT: 'right-sidebar',
8369
8388
  };
8370
- exports.ESidebarTarget = void 0;
8371
- (function (ESidebarTarget) {
8372
- ESidebarTarget["BLANK"] = "_blank";
8373
- ESidebarTarget["SELF"] = "_self";
8374
- })(exports.ESidebarTarget || (exports.ESidebarTarget = {}));
8375
8389
  exports.ESidebarAction = void 0;
8376
8390
  (function (ESidebarAction) {
8377
8391
  ESidebarAction["NAVIGATION"] = "navigation";
@@ -8426,33 +8440,6 @@
8426
8440
  sidebar = __spreadArray([], __read(sidebar));
8427
8441
  return sidebar;
8428
8442
  };
8429
- SideBarService.prototype.createWindowInstance = function (obj, windowInstance) {
8430
- if (windowInstance) {
8431
- // Create a PortalOutlet with the body of the new window document
8432
- var outlet = new portal.DomPortalOutlet(windowInstance.document.body, this.componentFactoryResolver, this.applicationRef, this.injector);
8433
- // Copy stylesheet link from parent window
8434
- this.styleSheetElement = this.getStyleSheetElement();
8435
- windowInstance.document.head.appendChild(this.styleSheetElement);
8436
- windowInstance.document.body.innerText = '';
8437
- this.attachComponentContainer(outlet, obj);
8438
- }
8439
- };
8440
- SideBarService.prototype.attachComponentContainer = function (outlet, obj) {
8441
- var containerPortal = new portal.ComponentPortal(obj.component, null);
8442
- var containerRef = outlet.attach(containerPortal);
8443
- containerRef.instance.config = obj.data;
8444
- };
8445
- SideBarService.prototype.getStyleSheetElement = function () {
8446
- var styleSheetElement = document.createElement('link');
8447
- document.querySelectorAll('link').forEach(function (htmlElement) {
8448
- if (htmlElement.rel === 'stylesheet') {
8449
- var absoluteUrl = new URL(htmlElement.href).href;
8450
- styleSheetElement.rel = 'stylesheet';
8451
- styleSheetElement.href = absoluteUrl;
8452
- }
8453
- });
8454
- return styleSheetElement;
8455
- };
8456
8443
  return SideBarService;
8457
8444
  }());
8458
8445
  /** @nocollapse */ SideBarService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SideBarService_Factory() { return new SideBarService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵinject(i0__namespace.ApplicationRef)); }, token: SideBarService, providedIn: "root" });
@@ -8469,11 +8456,12 @@
8469
8456
  ]; };
8470
8457
 
8471
8458
  var SidebarComponent = /** @class */ (function () {
8472
- function SidebarComponent(instance, authService, dialogService, router, pageLoggerService, hyperlinkService, sidebarService) {
8459
+ function SidebarComponent(instance, authService, dialogService, router, route, pageLoggerService, hyperlinkService, sidebarService) {
8473
8460
  this.instance = instance;
8474
8461
  this.authService = authService;
8475
8462
  this.dialogService = dialogService;
8476
8463
  this.router = router;
8464
+ this.route = route;
8477
8465
  this.pageLoggerService = pageLoggerService;
8478
8466
  this.hyperlinkService = hyperlinkService;
8479
8467
  this.sidebarService = sidebarService;
@@ -8497,27 +8485,7 @@
8497
8485
  enumerable: false,
8498
8486
  configurable: true
8499
8487
  });
8500
- SidebarComponent.prototype.ngOnInit = function () {
8501
- var _a, _b;
8502
- if ((_a = this.router.url.toString()) === null || _a === void 0 ? void 0 : _a.includes('component=')) {
8503
- var componentName = (_b = this.router.url) === null || _b === void 0 ? void 0 : _b.split('component=')[1];
8504
- if (componentName) {
8505
- this.loadComponentName = componentName;
8506
- }
8507
- }
8508
- if (this.loadComponentName) {
8509
- this.openDynamicComponetonLoad();
8510
- }
8511
- };
8512
- SidebarComponent.prototype.openDynamicComponetonLoad = function () {
8513
- var _this = this;
8514
- var _a;
8515
- (_a = this.sidebarItemsList) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
8516
- if (item.action === exports.ESidebarAction.OPENDIALOG && exports.ESidebarTarget.BLANK && item.component.name === _this.loadComponentName) {
8517
- _this.navigateComponentToNewTab(item, false);
8518
- }
8519
- });
8520
- };
8488
+ SidebarComponent.prototype.ngOnInit = function () { };
8521
8489
  SidebarComponent.prototype.initializeSideBar = function () {
8522
8490
  var _this = this;
8523
8491
  this.roles = this.authService.getUserRoles();
@@ -8538,12 +8506,7 @@
8538
8506
  _this.navigateToSection(x, item);
8539
8507
  }
8540
8508
  else if (x.action && x.action === exports.ESidebarAction.OPENDIALOG) {
8541
- if (x.target && x.target === exports.ESidebarTarget.BLANK) {
8542
- _this.navigateComponentToNewTab(x);
8543
- }
8544
- else {
8545
- _this.openDialog(x, item);
8546
- }
8509
+ _this.openDialog(x, item);
8547
8510
  }
8548
8511
  else if (x.action && x.action === exports.ESidebarAction.IFRAME) {
8549
8512
  _this.loadIFrame(x, item);
@@ -8561,34 +8524,6 @@
8561
8524
  disabled: x.disabled,
8562
8525
  }); });
8563
8526
  };
8564
- //ref link: https://medium.com/@saranya.thangaraj/open-angular-component-in-a-new-tab-without-bootstrapping-the-whole-app-again-e329af460e92
8565
- SidebarComponent.prototype.navigateComponentToNewTab = function (menu, onNewTab) {
8566
- var _this = this;
8567
- if (onNewTab === void 0) { onNewTab = true; }
8568
- var _a, _b;
8569
- var windowRef = window;
8570
- var winRef;
8571
- if (onNewTab) {
8572
- winRef = window.open();
8573
- if (winRef.location.href === 'about:blank') {
8574
- if (this.router.url && ((_b = (_a = this.router.url) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.includes('?'))) {
8575
- winRef.location.href = this.router.url + '&&component=' + menu.component.name;
8576
- }
8577
- else {
8578
- winRef.location.href = this.router.url + "?component=" + menu.component.name;
8579
- }
8580
- }
8581
- }
8582
- // Wait for window instance to be created
8583
- if (onNewTab) {
8584
- setTimeout(function () {
8585
- _this.sidebarService.createWindowInstance(menu, winRef);
8586
- }, 900);
8587
- }
8588
- else {
8589
- this.sidebarService.createWindowInstance(menu, windowRef);
8590
- }
8591
- };
8592
8527
  SidebarComponent.prototype.setMenuTitle = function (x) {
8593
8528
  return x.tooltip ? x.tooltip : !x.label ? x.section : '';
8594
8529
  };
@@ -8739,7 +8674,15 @@
8739
8674
  }
8740
8675
  });
8741
8676
  if (route) {
8742
- window.open(route.path, "_blank");
8677
+ var params_1 = {};
8678
+ this.route.queryParams.subscribe(function (param) {
8679
+ var _a;
8680
+ if (param && ((_a = Object.keys(param)) === null || _a === void 0 ? void 0 : _a.length) > 0) {
8681
+ params_1 = param;
8682
+ }
8683
+ });
8684
+ var url = this.router.serializeUrl(this.router.createUrlTree([route.path], { queryParams: params_1 }));
8685
+ window.open(url, '_blank');
8743
8686
  }
8744
8687
  };
8745
8688
  SidebarComponent.prototype.openComponentInDialog = function (menu, item) {
@@ -8834,7 +8777,8 @@
8834
8777
  { type: i0.Renderer2 },
8835
8778
  { type: AuthenticationService },
8836
8779
  { type: i1.DialogService },
8837
- { type: router.Router },
8780
+ { type: i6.Router },
8781
+ { type: i6.ActivatedRoute },
8838
8782
  { type: PageLoggerService },
8839
8783
  { type: HyperlinkService },
8840
8784
  { type: SideBarService }