tnx-shared 5.3.369 → 5.3.371

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.
@@ -3475,6 +3475,30 @@
3475
3475
  });
3476
3476
  });
3477
3477
  };
3478
+ NotifierService.prototype.showConfirmObject = function (data, accept, rejectFunc) {
3479
+ var _this = this;
3480
+ if (accept === void 0) { accept = null; }
3481
+ if (rejectFunc === void 0) { rejectFunc = null; }
3482
+ var popupObject = Object.assign({
3483
+ // message: string,
3484
+ header: 'Xác nhận', icon: 'pi pi-exclamation-triangle', acceptVisible: true, rejectLabel: this._translateService.instant('CONFIRM.REJECT_LABEL'), rejectIcon: 'pi pi-times', acceptLabel: this._translateService.instant('CONFIRM.ACCEPT_LABEL'), acceptIcon: 'pi pi-check', acceptButtonStyleClass: 'p-button-rounded p-button-text', rejectButtonStyleClass: '"p-button-rounded p-button-text p-button-secondary'
3485
+ }, data);
3486
+ return new Promise(function (resolve, reject) {
3487
+ _this._confirmService.confirm(Object.assign(Object.assign({}, popupObject), { accept: function () {
3488
+ if (popupObject.acceptVisible) {
3489
+ if (accept)
3490
+ accept();
3491
+ resolve(false);
3492
+ }
3493
+ }, reject: function () {
3494
+ if (popupObject.rejectVisible) {
3495
+ if (rejectFunc)
3496
+ rejectFunc();
3497
+ resolve(false);
3498
+ }
3499
+ } }));
3500
+ });
3501
+ };
3478
3502
  NotifierService.prototype.showConfirmMany = function (message, time, delay, header, icon, acceptVisible, rejectLabel, delayTimeout) {
3479
3503
  var _this = this;
3480
3504
  if (time === void 0) { time = 2; }
@@ -39608,7 +39632,6 @@
39608
39632
 
39609
39633
  var CommonLibComponent = /** @class */ (function () {
39610
39634
  function CommonLibComponent(_componentContextService, _router, _activatedRoute, _applicationContext, _storageService, _moduleConfigService) {
39611
- var _this = this;
39612
39635
  this._componentContextService = _componentContextService;
39613
39636
  this._router = _router;
39614
39637
  this._activatedRoute = _activatedRoute;
@@ -39619,9 +39642,9 @@
39619
39642
  this.appCode = '';
39620
39643
  this.environment = this._moduleConfigService.getConfig().environment;
39621
39644
  this.appCode = this._moduleConfigService.getConfig().appCode;
39622
- this._componentContextService.subscribe(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, function (data) {
39623
- _this.showRejectConfirm = data;
39624
- });
39645
+ // this._componentContextService.subscribe(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, data => {
39646
+ // this.showRejectConfirm = data;
39647
+ // });
39625
39648
  this._applicationContext.addRootContext(this._componentContextService, _activatedRoute);
39626
39649
  this._componentContextService.data.personalize = this._storageService.getObjectAny('personalize');
39627
39650
  if (!this._componentContextService.data.personalize) {
@@ -39663,7 +39686,7 @@
39663
39686
  CommonLibComponent.decorators = [
39664
39687
  { type: i0.Component, args: [{
39665
39688
  selector: 'common-lib',
39666
- template: "<div #commonapp></div>\n<p-toast [position]=\"'top-right'\" [autoZIndex]=\"true\"></p-toast>\n<p-confirmDialog #cd [closable]=\"false\">\n <p-footer>\n <button #okButton type=\"button\" pButton icon=\"pi pi-check\" class=\"p-button-rounded p-button-text\"\n [label]=\"cd.acceptButtonLabel\" (keydown.shift.tab)=\"focusTrap($event, false)\"\n (click)=\"cd.accept()\"></button>\n <!-- <button *ngIf=\"showRejectConfirm\" #cancelButton type=\"button\" pButton\n class=\"p-button-rounded p-button-text p-button-secondary\" icon=\"pi pi-times\" [label]=\"cd.rejectButtonLabel\"\n (keydown.tab)=\"focusTrap($event, true)\" (click)=\"cd.reject()\"></button> -->\n </p-footer>\n</p-confirmDialog>",
39689
+ template: "<div #commonapp></div>\n<p-toast [position]=\"'top-right'\" [autoZIndex]=\"true\"></p-toast>\n<p-confirmDialog #cd [closable]=\"false\">\n <p-footer>\n <button *ngIf=\"cd.confirmationOptions && cd.confirmationOptions.acceptVisible\" #okButton type=\"button\" pButton\n icon=\"pi pi-check\" class=\"p-button-rounded p-button-text\" [label]=\"cd.acceptButtonLabel\"\n (keydown.shift.tab)=\"focusTrap($event, false)\" (click)=\"cd.accept()\"></button>\n <button *ngIf=\"cd.confirmationOptions && cd.confirmationOptions.rejectVisible\" #cancelButton type=\"button\"\n pButton class=\"p-button-rounded p-button-text p-button-secondary\" icon=\"pi pi-times\"\n [label]=\"cd.rejectButtonLabel\" (keydown.tab)=\"focusTrap($event, true)\" (click)=\"cd.reject()\"></button>\n </p-footer>\n</p-confirmDialog>",
39667
39690
  providers: [ComponentContextService],
39668
39691
  styles: [""]
39669
39692
  },] }