tnx-shared 5.3.368 → 5.3.370
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/tnx-shared.umd.js +28 -5
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/esm2015/components/common-lib/common-lib.component.js +5 -6
- package/esm2015/services/notifier.service.js +21 -1
- package/fesm2015/tnx-shared.js +24 -4
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/notifier.service.d.ts +1 -0
- package/services/notifier.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -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,
|
|
39623
|
-
|
|
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\"
|
|
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.acceptVisible\" #okButton type=\"button\" pButton icon=\"pi pi-check\"\n 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.rejectVisible\" #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>",
|
|
39667
39690
|
providers: [ComponentContextService],
|
|
39668
39691
|
styles: [""]
|
|
39669
39692
|
},] }
|