tnx-shared 5.3.346 → 5.3.347
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 +41 -15
- 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 +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/components/entity-picker/entity-picker.component.d.ts +2 -1
- package/components/entity-picker/entity-picker.component.d.ts.map +1 -1
- package/esm2015/classes/form-schema.js +1 -1
- package/esm2015/components/common-search-form/common-search-form.component.js +2 -2
- package/esm2015/components/entity-picker/entity-picker.component.js +27 -14
- package/fesm2015/tnx-shared.js +27 -14
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -33291,7 +33291,7 @@
|
|
|
33291
33291
|
case exports.DataType.decimal:
|
|
33292
33292
|
case exports.DataType.currency:
|
|
33293
33293
|
addColumn_1.maskType = column.dataType;
|
|
33294
|
-
addColumn_1.max = 99999999999;
|
|
33294
|
+
addColumn_1.max = column.max || 99999999999;
|
|
33295
33295
|
addColumn_1.onChanged = function (evt) {
|
|
33296
33296
|
addColumn_1.autoSearch && _this.handleSearch();
|
|
33297
33297
|
};
|
|
@@ -48184,22 +48184,48 @@
|
|
|
48184
48184
|
this._commonService.addDistinct(arrDisplayField, arrField);
|
|
48185
48185
|
return arrField.toString();
|
|
48186
48186
|
};
|
|
48187
|
+
EntityPickerComponent.prototype.onBeforeUnPick = function (data) {
|
|
48188
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48189
|
+
return __generator(this, function (_a) {
|
|
48190
|
+
switch (_a.label) {
|
|
48191
|
+
case 0:
|
|
48192
|
+
if (!this.control.onDeleting) return [3 /*break*/, 2];
|
|
48193
|
+
return [4 /*yield*/, this.control.onDeleting(data)];
|
|
48194
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
48195
|
+
case 2: return [2 /*return*/, true];
|
|
48196
|
+
}
|
|
48197
|
+
});
|
|
48198
|
+
});
|
|
48199
|
+
};
|
|
48187
48200
|
EntityPickerComponent.prototype.handleUnPickEntity = function (data) {
|
|
48188
|
-
|
|
48189
|
-
|
|
48190
|
-
|
|
48191
|
-
|
|
48192
|
-
|
|
48193
|
-
|
|
48194
|
-
|
|
48195
|
-
|
|
48196
|
-
|
|
48197
|
-
|
|
48198
|
-
|
|
48199
|
-
|
|
48201
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48202
|
+
var isAllowUnPick;
|
|
48203
|
+
var _this = this;
|
|
48204
|
+
return __generator(this, function (_a) {
|
|
48205
|
+
switch (_a.label) {
|
|
48206
|
+
case 0: return [4 /*yield*/, this.onBeforeUnPick(data)];
|
|
48207
|
+
case 1:
|
|
48208
|
+
isAllowUnPick = _a.sent();
|
|
48209
|
+
if (!isAllowUnPick)
|
|
48210
|
+
return [2 /*return*/];
|
|
48211
|
+
if (this.control.multiple) {
|
|
48212
|
+
this.selectedValue = this.selectedValue.filter(function (x) { return x[_this.control.valueField] != data[_this.control.valueField]; });
|
|
48213
|
+
}
|
|
48214
|
+
else {
|
|
48215
|
+
this.selectedValue = null;
|
|
48216
|
+
}
|
|
48217
|
+
this.onChange(this.selectedValue);
|
|
48218
|
+
// data emit phải giống với hàm handleUnSelectEntity
|
|
48219
|
+
this.onUnSelect.emit({
|
|
48220
|
+
items: [data],
|
|
48221
|
+
value: this.selectedValue
|
|
48222
|
+
});
|
|
48223
|
+
this.fireChangeEvent();
|
|
48224
|
+
this._triggerProcessData();
|
|
48225
|
+
return [2 /*return*/];
|
|
48226
|
+
}
|
|
48227
|
+
});
|
|
48200
48228
|
});
|
|
48201
|
-
this.fireChangeEvent();
|
|
48202
|
-
this._triggerProcessData();
|
|
48203
48229
|
};
|
|
48204
48230
|
EntityPickerComponent.prototype.handleUnMultiPickEntity = function () {
|
|
48205
48231
|
var _this = this;
|