tnx-shared 5.3.201 → 5.3.203
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 +97 -73
- 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/classes/form-schema.d.ts +2 -2
- package/classes/form-schema.d.ts.map +1 -1
- package/components/crud/crud-form/crud-form.component.d.ts +1 -1
- package/components/crud/crud-form/crud-form.component.d.ts.map +1 -1
- package/components/file-explorer/file-manager/file-manager.component.d.ts.map +1 -1
- package/components/tn-dialog/tn-dialog.component.d.ts +1 -0
- package/components/tn-dialog/tn-dialog.component.d.ts.map +1 -1
- package/esm2015/classes/form-schema.js +2 -1
- package/esm2015/components/crud/crud-form/crud-form.component.js +43 -38
- package/esm2015/components/file-explorer/file-manager/file-manager.component.js +3 -1
- package/esm2015/components/tn-dialog/tn-dialog.component.js +4 -2
- package/esm2015/components/user-picker/user-picker.component.js +2 -2
- package/esm2015/models/notification-param.js +1 -1
- package/esm2015/services/announcements.service.js +3 -2
- package/fesm2015/tnx-shared.js +51 -40
- package/fesm2015/tnx-shared.js.map +1 -1
- package/models/notification-param.d.ts +1 -0
- package/models/notification-param.d.ts.map +1 -1
- package/package.json +2 -2
- package/services/announcements.service.d.ts +1 -1
- package/services/announcements.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -1911,6 +1911,7 @@
|
|
|
1911
1911
|
_this.displayField = 'fullNameNew';
|
|
1912
1912
|
_this.fieldPlus = '';
|
|
1913
1913
|
_this.returnType = 'value';
|
|
1914
|
+
_this.getDisplayName = false;
|
|
1914
1915
|
_this.fieldSearchText = [];
|
|
1915
1916
|
_this.operatorFieldSearchText = exports.Operator.contain;
|
|
1916
1917
|
_this.usePicker = true;
|
|
@@ -14957,80 +14958,97 @@
|
|
|
14957
14958
|
// });
|
|
14958
14959
|
};
|
|
14959
14960
|
CrudFormComponent.prototype.initControlDefaultValue = function (parentModel, control, parentPath) {
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
try {
|
|
14978
|
-
for (var _k = (e_13 = void 0, __values(control.rowTemplate)), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
14979
|
-
var subControl = _l.value;
|
|
14980
|
-
this.initControlDefaultValue(item, subControl, _parentPath + '[' + i + ']');
|
|
14961
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
14962
|
+
var _parentPath, addMore, i, _e, _f, item, _g, _h, subControl, _j, _k, subControl, _l;
|
|
14963
|
+
var e_12, _m, e_13, _o, e_14, _p;
|
|
14964
|
+
return __generator(this, function (_q) {
|
|
14965
|
+
switch (_q.label) {
|
|
14966
|
+
case 0:
|
|
14967
|
+
this.initPrivateData(parentModel, control.field);
|
|
14968
|
+
_parentPath = control.field;
|
|
14969
|
+
if (parentPath != null)
|
|
14970
|
+
_parentPath = parentPath + '.' + _parentPath;
|
|
14971
|
+
if (!(control instanceof TableSchema)) return [3 /*break*/, 1];
|
|
14972
|
+
if (!parentModel[control.field] || !(parentModel[control.field] instanceof Array)) {
|
|
14973
|
+
parentModel[control.field] = [];
|
|
14974
|
+
}
|
|
14975
|
+
addMore = control.initRowCount - parentModel[control.field].length;
|
|
14976
|
+
if (addMore > 0 && !parentModel._status[control.field].ready) {
|
|
14977
|
+
parentModel._status[control.field].ready = true;
|
|
14981
14978
|
}
|
|
14982
|
-
|
|
14983
|
-
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
14984
|
-
finally {
|
|
14979
|
+
i = 0;
|
|
14985
14980
|
try {
|
|
14986
|
-
|
|
14981
|
+
for (_e = __values(parentModel[control.field]), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
14982
|
+
item = _f.value;
|
|
14983
|
+
try {
|
|
14984
|
+
for (_g = (e_13 = void 0, __values(control.rowTemplate)), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
14985
|
+
subControl = _h.value;
|
|
14986
|
+
this.initControlDefaultValue(item, subControl, _parentPath + '[' + i + ']');
|
|
14987
|
+
}
|
|
14988
|
+
}
|
|
14989
|
+
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
14990
|
+
finally {
|
|
14991
|
+
try {
|
|
14992
|
+
if (_h && !_h.done && (_o = _g.return)) _o.call(_g);
|
|
14993
|
+
}
|
|
14994
|
+
finally { if (e_13) throw e_13.error; }
|
|
14995
|
+
}
|
|
14996
|
+
i++;
|
|
14997
|
+
}
|
|
14987
14998
|
}
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
|
|
15009
|
-
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
15013
|
-
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
|
|
14999
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
15000
|
+
finally {
|
|
15001
|
+
try {
|
|
15002
|
+
if (_f && !_f.done && (_m = _e.return)) _m.call(_e);
|
|
15003
|
+
}
|
|
15004
|
+
finally { if (e_12) throw e_12.error; }
|
|
15005
|
+
}
|
|
15006
|
+
return [3 /*break*/, 5];
|
|
15007
|
+
case 1:
|
|
15008
|
+
if (!(control instanceof ContainerSchema)) return [3 /*break*/, 2];
|
|
15009
|
+
if (parentModel[control.field] == null || !isLiteralObject(parentModel[control.field])) {
|
|
15010
|
+
parentModel[control.field] = {};
|
|
15011
|
+
}
|
|
15012
|
+
try {
|
|
15013
|
+
for (_j = __values(control.controls), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
15014
|
+
subControl = _k.value;
|
|
15015
|
+
this.initControlDefaultValue(parentModel[control.field], subControl, _parentPath);
|
|
15016
|
+
}
|
|
15017
|
+
}
|
|
15018
|
+
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
15019
|
+
finally {
|
|
15020
|
+
try {
|
|
15021
|
+
if (_k && !_k.done && (_p = _j.return)) _p.call(_j);
|
|
15022
|
+
}
|
|
15023
|
+
finally { if (e_14) throw e_14.error; }
|
|
15024
|
+
}
|
|
15025
|
+
return [3 /*break*/, 5];
|
|
15026
|
+
case 2:
|
|
15027
|
+
if (!control.funcSetDefaultValue) return [3 /*break*/, 4];
|
|
15028
|
+
_l = control;
|
|
15029
|
+
return [4 /*yield*/, control.funcSetDefaultValue()];
|
|
15030
|
+
case 3:
|
|
15031
|
+
_l.defaultValue = _q.sent();
|
|
15032
|
+
_q.label = 4;
|
|
15033
|
+
case 4:
|
|
15034
|
+
if (!parentModel.hasOwnProperty(control.field) && control.field != null) {
|
|
15035
|
+
if (control.defaultValue !== null && control.defaultValue !== undefined) {
|
|
15036
|
+
parentModel[control.field] = control.defaultValue;
|
|
15037
|
+
}
|
|
15038
|
+
else if (control instanceof DropdownControlSchema) {
|
|
15039
|
+
if (control.autoDisplayFirst
|
|
15040
|
+
&& control._component
|
|
15041
|
+
&& control._component._hasLoadedDatasource
|
|
15042
|
+
&& control._component.dataSourceInternal.length > 0) {
|
|
15043
|
+
parentModel[control.field] = control._component.dataSourceInternal[0].value[control.valueField];
|
|
15044
|
+
}
|
|
15045
|
+
}
|
|
15046
|
+
}
|
|
15047
|
+
_q.label = 5;
|
|
15048
|
+
case 5: return [2 /*return*/];
|
|
15031
15049
|
}
|
|
15032
|
-
}
|
|
15033
|
-
}
|
|
15050
|
+
});
|
|
15051
|
+
});
|
|
15034
15052
|
};
|
|
15035
15053
|
CrudFormComponent.prototype.initPrivateData = function (parentModel, field) {
|
|
15036
15054
|
if (!parentModel._source)
|
|
@@ -33539,9 +33557,11 @@
|
|
|
33539
33557
|
this._hasLoadedSource = false;
|
|
33540
33558
|
this.entityKeyChange.emit(this._entityKey);
|
|
33541
33559
|
if (this.control.multiEntityKey) {
|
|
33560
|
+
this.plusUrl = 'ByEntityKeys';
|
|
33542
33561
|
this.getFilesInEntityKey();
|
|
33543
33562
|
}
|
|
33544
33563
|
else {
|
|
33564
|
+
this.plusUrl = 'ByFolderId';
|
|
33545
33565
|
this.rootFolderId = null;
|
|
33546
33566
|
this.checkAndLoadRootFolderContent();
|
|
33547
33567
|
}
|
|
@@ -39485,11 +39505,12 @@
|
|
|
39485
39505
|
}
|
|
39486
39506
|
this.openThongBao(notificationParams);
|
|
39487
39507
|
};
|
|
39488
|
-
AnnouncementsService.prototype.redirectToNotificationPage = function (orgIds, userIds, title, link, templateTextCode, objTemplate, isSendEmail, isChangeUser) {
|
|
39508
|
+
AnnouncementsService.prototype.redirectToNotificationPage = function (orgIds, userIds, title, link, templateTextCode, objTemplate, isSendEmail, isChangeUser, emails) {
|
|
39489
39509
|
if (orgIds === void 0) { orgIds = []; }
|
|
39490
39510
|
if (userIds === void 0) { userIds = []; }
|
|
39491
39511
|
if (isSendEmail === void 0) { isSendEmail = true; }
|
|
39492
39512
|
if (isChangeUser === void 0) { isChangeUser = true; }
|
|
39513
|
+
if (emails === void 0) { emails = []; }
|
|
39493
39514
|
return __awaiter(this, void 0, void 0, function () {
|
|
39494
39515
|
var notificationParams;
|
|
39495
39516
|
return __generator(this, function (_a) {
|
|
@@ -39507,6 +39528,7 @@
|
|
|
39507
39528
|
}
|
|
39508
39529
|
notificationParams.orgIds = orgIds.join(',');
|
|
39509
39530
|
notificationParams.userIds = userIds.join(',');
|
|
39531
|
+
notificationParams.emails = emails.join(',');
|
|
39510
39532
|
notificationParams.title = title;
|
|
39511
39533
|
notificationParams.link = link ? encodeURIComponent(link) : '';
|
|
39512
39534
|
notificationParams.templateTextCode = templateTextCode;
|
|
@@ -51234,6 +51256,7 @@
|
|
|
51234
51256
|
this.showFooter = true;
|
|
51235
51257
|
this.hiddenSave = true;
|
|
51236
51258
|
this.maximizable = true;
|
|
51259
|
+
this.showHeader = true;
|
|
51237
51260
|
this.onSave = new i0.EventEmitter();
|
|
51238
51261
|
this.onCancel = new i0.EventEmitter();
|
|
51239
51262
|
this.onShow = new i0.EventEmitter();
|
|
@@ -51322,7 +51345,7 @@
|
|
|
51322
51345
|
TnDialogComponent.decorators = [
|
|
51323
51346
|
{ type: i0.Component, args: [{
|
|
51324
51347
|
selector: 'tn-dialog',
|
|
51325
|
-
template: "<p-dialog #dialog [closeOnEscape]=\"closeOnEscape\" [appendTo]=\"'body'\" [focusOnShow]=\"false\" [focusTrap]=\"false\"\n [header]=\"header | translate\" [(visible)]=\"visible\" [modal]=\"modal\" [responsive]=\"true\" [maximizable]=\"maximizable\"\n [autoZIndex]=\"true\" [styleClass]=\"styleClass\" [maskStyleClass]=\"maskClass\"\n [style]=\"{'width': popupSize.width + 'px', 'min-width': popupSize.width + 'px', 'height': popupSize.height + 'px', 'min-height': popupSize.height + 'px'}\"\n (onShow)=\"handleShowDialog($event)\" (onHide)=\"handleHideDialog($event)\">\n <tn-custom-scrollbar #scrollbar [useDefaultScrollBar]=\"useDefaultScrollBar\" [class]=\"scrollBarStyleClass\"\n [config]=\"scrollConfig\" [style]=\"scrollStyle\" class=\"tn-dialog-scrollbar\">\n <ng-content></ng-content>\n </tn-custom-scrollbar>\n <p-footer *ngIf=\"showFooter\">\n <p-footer *ngIf=\"formBase && formBase.buttonTemplate\" style=\"display: flex;float: right\">\n <ng-container *ngTemplateOutlet=\"formBase.buttonTemplate\">\n </ng-container>\n </p-footer>\n <ng-container *ngIf=\"!formBase || !formBase.buttonTemplate\">\n <p-footer *ngIf=\"footer\">\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </p-footer>\n <p-footer *ngIf=\"buttonTemplateInput\">\n <ng-container *ngTemplateOutlet=\"buttonTemplateInput\"></ng-container>\n </p-footer>\n <p-footer *ngIf=\"!footer && !buttonTemplateInput\">\n <button pButton preventTab type=\"button\" icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\n [label]=\"'FORM.CANCEL' | translate\" (click)=\"handleHideDialog($event)\"></button>\n </p-footer>\n </ng-container>\n </p-footer>\n</p-dialog>",
|
|
51348
|
+
template: "<p-dialog #dialog [closeOnEscape]=\"closeOnEscape\" [appendTo]=\"'body'\" [focusOnShow]=\"false\" [focusTrap]=\"false\"\n [header]=\"header | translate\" [(visible)]=\"visible\" [modal]=\"modal\" [responsive]=\"true\" [maximizable]=\"maximizable\"\n [autoZIndex]=\"true\" [styleClass]=\"styleClass\" [maskStyleClass]=\"maskClass\" [showHeader]=\"showHeader\"\n [style]=\"{'width': popupSize.width + 'px', 'min-width': popupSize.width + 'px', 'height': popupSize.height + 'px', 'min-height': popupSize.height + 'px'}\"\n (onShow)=\"handleShowDialog($event)\" (onHide)=\"handleHideDialog($event)\">\n <tn-custom-scrollbar #scrollbar [useDefaultScrollBar]=\"useDefaultScrollBar\" [class]=\"scrollBarStyleClass\"\n [config]=\"scrollConfig\" [style]=\"scrollStyle\" class=\"tn-dialog-scrollbar\">\n <ng-content></ng-content>\n </tn-custom-scrollbar>\n <p-footer *ngIf=\"showFooter\">\n <p-footer *ngIf=\"formBase && formBase.buttonTemplate\" style=\"display: flex;float: right\">\n <ng-container *ngTemplateOutlet=\"formBase.buttonTemplate\">\n </ng-container>\n </p-footer>\n <ng-container *ngIf=\"!formBase || !formBase.buttonTemplate\">\n <p-footer *ngIf=\"footer\">\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </p-footer>\n <p-footer *ngIf=\"buttonTemplateInput\">\n <ng-container *ngTemplateOutlet=\"buttonTemplateInput\"></ng-container>\n </p-footer>\n <p-footer *ngIf=\"!footer && !buttonTemplateInput\">\n <button pButton preventTab type=\"button\" icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\n [label]=\"'FORM.CANCEL' | translate\" (click)=\"handleHideDialog($event)\"></button>\n </p-footer>\n </ng-container>\n </p-footer>\n</p-dialog>",
|
|
51326
51349
|
styles: [""]
|
|
51327
51350
|
},] }
|
|
51328
51351
|
];
|
|
@@ -51351,6 +51374,7 @@
|
|
|
51351
51374
|
minY: [{ type: i0.Input }],
|
|
51352
51375
|
hiddenSave: [{ type: i0.Input }],
|
|
51353
51376
|
maximizable: [{ type: i0.Input }],
|
|
51377
|
+
showHeader: [{ type: i0.Input }],
|
|
51354
51378
|
onSave: [{ type: i0.Output }],
|
|
51355
51379
|
onCancel: [{ type: i0.Output }],
|
|
51356
51380
|
onShow: [{ type: i0.Output }],
|
|
@@ -52369,7 +52393,7 @@
|
|
|
52369
52393
|
var _this = this;
|
|
52370
52394
|
this.control._component = this;
|
|
52371
52395
|
var commonFieldPlus = 'maChucVu,lstTenDonVi';
|
|
52372
|
-
this.controlPicker = new EntityPickerControlSchema(Object.assign(Object.assign({}, this.control), { field: 'arrIdNguoiDung', label: 'Người dùng', title: 'Chọn người dùng', baseService: this._userV5Service, required: true, displayField: this.control.getDisplayName ? 'displayName' :
|
|
52396
|
+
this.controlPicker = new EntityPickerControlSchema(Object.assign(Object.assign({}, this.control), { field: 'arrIdNguoiDung', label: 'Người dùng', title: 'Chọn người dùng', baseService: this._userV5Service, required: true, displayField: this.control.getDisplayName ? 'displayName' : this.control.displayField, fieldPlus: this.control.fieldPlus ? this.control.fieldPlus + "," + commonFieldPlus : commonFieldPlus, valueField: this.control.valueField, defaultFilters: this.control.defaultFilters, multiple: this.control.multiple, funcGetLabel: function (item) {
|
|
52373
52397
|
var _a;
|
|
52374
52398
|
if (_this.control.funcGetLabel)
|
|
52375
52399
|
return _this.control.funcGetLabel(item);
|