tnx-shared 5.0.42 → 5.0.43

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.
@@ -3245,7 +3245,11 @@
3245
3245
  EnumWorkflowCoreCodeSettingKey["MAC_DINH"] = "workflowCoreTrinhKy";
3246
3246
  EnumWorkflowCoreCodeSettingKey["PHE_DUYET_2_BUOC"] = "workflowCoreTrinhKy2Buoc";
3247
3247
  EnumWorkflowCoreCodeSettingKey["PHE_DUYET_3_BUOC"] = "workflowCoreTrinhKy3Buoc";
3248
- })(exports.EnumWorkflowCoreCodeSettingKey || (exports.EnumWorkflowCoreCodeSettingKey = {}));
3248
+ })(exports.EnumWorkflowCoreCodeSettingKey || (exports.EnumWorkflowCoreCodeSettingKey = {}));
3249
+ (function (EnumCoreVersion) {
3250
+ EnumCoreVersion["V4"] = "V4";
3251
+ EnumCoreVersion["V5"] = "V5";
3252
+ })(exports.EnumCoreVersion || (exports.EnumCoreVersion = {}));
3249
3253
 
3250
3254
  var ModelSchema = /** @class */ (function () {
3251
3255
  function ModelSchema(init) {
@@ -3635,6 +3639,7 @@
3635
3639
  _this.fieldPlus = ''; // Danh sách những trường bổ sung cần lấy thêm ngoài id, ten; Ví dụ ,ma
3636
3640
  _this.fieldValueParent = 'value'; // Trường sử dụng để lấy dữ liệu làm khóa từ bảng cha của item drop down được chọn
3637
3641
  _this.fireCallBackInside = true;
3642
+ _this.coreVersion = exports.EnumCoreVersion.V5;
3638
3643
  _this.funcCompare = function (item, value) { return item[_this.valueField] == value; };
3639
3644
  for (var key in init) {
3640
3645
  _this[key] = init[key];
@@ -18802,27 +18807,49 @@
18802
18807
  AutoCompletePickerComponent.prototype.buildFilterKeyword = function () {
18803
18808
  var _this = this;
18804
18809
  if (this.fieldSearchText.length == 1) {
18805
- this.getFilterOnSearch = function (value) { return _this.newFilter(_this.control.displayField, exports.Operator.contain, value); };
18810
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
18811
+ this.getFilterOnSearch = function (value) { return _this.newFilterV4(_this.control.displayField, exports.Operator.contain, value.toString()); };
18812
+ }
18813
+ else {
18814
+ this.getFilterOnSearch = function (value) { return _this.newFilter(_this.control.displayField, exports.Operator.contain, value); };
18815
+ }
18806
18816
  }
18807
18817
  else {
18808
18818
  this.getFilterOnSearch = function (value) {
18809
- var e_1, _a;
18819
+ var e_1, _a, e_2, _b;
18810
18820
  var result = new Filter({
18811
18821
  logic: 'or',
18812
18822
  filters: []
18813
18823
  });
18814
- try {
18815
- for (var _b = __values(_this.fieldSearchText), _c = _b.next(); !_c.done; _c = _b.next()) {
18816
- var fieldSearch = _c.value;
18817
- result.filters.push(_this.newFilter(fieldSearch, exports.Operator.contain, value));
18824
+ if (_this.control.coreVersion == exports.EnumCoreVersion.V4) {
18825
+ try {
18826
+ for (var _c = __values(_this.fieldSearchText), _d = _c.next(); !_d.done; _d = _c.next()) {
18827
+ var fieldSearch = _d.value;
18828
+ result.filters.push(_this.newFilterV4(fieldSearch, exports.Operator.contain, value.toString()));
18829
+ }
18830
+ }
18831
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
18832
+ finally {
18833
+ try {
18834
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
18835
+ }
18836
+ finally { if (e_1) throw e_1.error; }
18818
18837
  }
18819
18838
  }
18820
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
18821
- finally {
18839
+ else {
18822
18840
  try {
18823
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
18841
+ for (var _e = __values(_this.fieldSearchText), _f = _e.next(); !_f.done; _f = _e.next()) {
18842
+ var fieldSearch = _f.value;
18843
+ result.filters.push(_this.newFilter(fieldSearch, exports.Operator.contain, value));
18844
+ }
18845
+ }
18846
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
18847
+ finally {
18848
+ try {
18849
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
18850
+ }
18851
+ finally { if (e_2) throw e_2.error; }
18824
18852
  }
18825
- finally { if (e_1) throw e_1.error; }
18826
18853
  }
18827
18854
  return result;
18828
18855
  };
@@ -18901,12 +18928,22 @@
18901
18928
  filters = [];
18902
18929
  if (this.control.multiple) {
18903
18930
  if (this.value && this.value.length > 0) {
18904
- filters.push(this.newFilter(this.control.valueField, exports.Operator.notIn, this.value));
18931
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
18932
+ filters.push(this.newFilterV4(this.control.valueField, exports.Operator.notIn, this.value.join(',')));
18933
+ }
18934
+ else {
18935
+ filters.push(this.newFilter(this.control.valueField, exports.Operator.notIn, this.value));
18936
+ }
18905
18937
  }
18906
18938
  }
18907
18939
  else {
18908
18940
  if (this.value) {
18909
- filters.push(this.newFilter(this.control.valueField, exports.Operator.notEqual, this.value));
18941
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
18942
+ filters.push(this.newFilterV4(this.control.valueField, exports.Operator.notEqual, this.value.toString()));
18943
+ }
18944
+ else {
18945
+ filters.push(this.newFilter(this.control.valueField, exports.Operator.notEqual, this.value));
18946
+ }
18910
18947
  }
18911
18948
  }
18912
18949
  return [4 /*yield*/, appendDefaultFilter(filters, this.control.defaultFilters)];
@@ -19106,9 +19143,17 @@
19106
19143
  if (!this.control.multiple) return [3 /*break*/, 5];
19107
19144
  dataSource = [];
19108
19145
  if (!(this.value && this.value.length > 0)) return [3 /*break*/, 4];
19109
- filters = [
19110
- this.newFilter(this.control.valueField, exports.Operator.in, this.value)
19111
- ];
19146
+ filters = [];
19147
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
19148
+ filters = [
19149
+ this.newFilterV4(this.control.valueField, exports.Operator.in, this.value.join(','))
19150
+ ];
19151
+ }
19152
+ else {
19153
+ filters = [
19154
+ this.newFilter(this.control.valueField, exports.Operator.in, this.value)
19155
+ ];
19156
+ }
19112
19157
  if (!this.control.modifyFilter) return [3 /*break*/, 2];
19113
19158
  return [4 /*yield*/, this.control.modifyFilter(filters)];
19114
19159
  case 1:
@@ -19132,9 +19177,17 @@
19132
19177
  case 5:
19133
19178
  dataSource = [];
19134
19179
  if (!this.value) return [3 /*break*/, 9];
19135
- filters = [
19136
- this.newFilter(this.control.valueField, exports.Operator.equal, this.value)
19137
- ];
19180
+ filters = [];
19181
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
19182
+ filters = [
19183
+ this.newFilterV4(this.control.valueField, exports.Operator.equal, this.value.toString())
19184
+ ];
19185
+ }
19186
+ else {
19187
+ filters = [
19188
+ this.newFilter(this.control.valueField, exports.Operator.equal, this.value)
19189
+ ];
19190
+ }
19138
19191
  if (!this.control.modifyFilter) return [3 /*break*/, 7];
19139
19192
  return [4 /*yield*/, this.control.modifyFilter(filters)];
19140
19193
  case 6:
@@ -19179,7 +19232,7 @@
19179
19232
  }
19180
19233
  };
19181
19234
  AutoCompletePickerComponent.prototype.reStructureDataSource = function (sources) {
19182
- var e_2, _a;
19235
+ var e_3, _a;
19183
19236
  if (sources != null && sources.length > 0) {
19184
19237
  var arr = [];
19185
19238
  try {
@@ -19189,12 +19242,12 @@
19189
19242
  arr.push(item);
19190
19243
  }
19191
19244
  }
19192
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
19245
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
19193
19246
  finally {
19194
19247
  try {
19195
19248
  if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
19196
19249
  }
19197
- finally { if (e_2) throw e_2.error; }
19250
+ finally { if (e_3) throw e_3.error; }
19198
19251
  }
19199
19252
  this.dataSource = arr;
19200
19253
  }
@@ -19224,7 +19277,12 @@
19224
19277
  if (!this.control.multiple) return [3 /*break*/, 6];
19225
19278
  if (!(obj != null && obj.length > 0)) return [3 /*break*/, 4];
19226
19279
  filters = [];
19227
- filters.push(this.newFilter(this.control.valueField, exports.Operator.in, obj));
19280
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
19281
+ filters.push(this.newFilterV4(this.control.valueField, exports.Operator.in, obj.join(',')));
19282
+ }
19283
+ else {
19284
+ filters.push(this.newFilter(this.control.valueField, exports.Operator.in, obj));
19285
+ }
19228
19286
  if (!this.control.modifyFilter) return [3 /*break*/, 2];
19229
19287
  return [4 /*yield*/, this.control.modifyFilter(filters)];
19230
19288
  case 1:
@@ -19249,9 +19307,17 @@
19249
19307
  case 5: return [3 /*break*/, 10];
19250
19308
  case 6:
19251
19309
  if (!(obj != null)) return [3 /*break*/, 9];
19252
- filters = [
19253
- this.newFilter(this.control.valueField, exports.Operator.equal, obj)
19254
- ];
19310
+ filters = [];
19311
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
19312
+ filters = [
19313
+ this.newFilterV4(this.control.valueField, exports.Operator.equal, obj.toString())
19314
+ ];
19315
+ }
19316
+ else {
19317
+ filters = [
19318
+ this.newFilter(this.control.valueField, exports.Operator.equal, obj)
19319
+ ];
19320
+ }
19255
19321
  if (!this.control.modifyFilter) return [3 /*break*/, 8];
19256
19322
  return [4 /*yield*/, this.control.modifyFilter(filters)];
19257
19323
  case 7:
@@ -30524,12 +30590,22 @@
30524
30590
  gridInfo.fields = this.advanceData.fields;
30525
30591
  if (this.control.multiple) {
30526
30592
  if (this._value && this._value.length > 0) {
30527
- gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.notIn, this._value));
30593
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30594
+ gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.notIn, this._value.join(',')));
30595
+ }
30596
+ else {
30597
+ gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.notIn, this._value));
30598
+ }
30528
30599
  }
30529
30600
  }
30530
30601
  else {
30531
30602
  if (this._value) {
30532
- gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.notEqual, this._value));
30603
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30604
+ gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.notEqual, this._value.join(',')));
30605
+ }
30606
+ else {
30607
+ gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.notEqual, this._value));
30608
+ }
30533
30609
  }
30534
30610
  }
30535
30611
  return [4 /*yield*/, appendDefaultFilter(gridInfo.filters, this.control.defaultFilters)];
@@ -30712,7 +30788,12 @@
30712
30788
  gridInfo.fields = this.advanceData.fields;
30713
30789
  if (this.control.multiple) {
30714
30790
  if (this._value != null && this._value.length > 0) {
30715
- gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.in, this._value));
30791
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30792
+ gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.in, this._value.join(',')));
30793
+ }
30794
+ else {
30795
+ gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.in, this._value));
30796
+ }
30716
30797
  }
30717
30798
  else {
30718
30799
  return [2 /*return*/, false];
@@ -30720,7 +30801,12 @@
30720
30801
  }
30721
30802
  else {
30722
30803
  if (this._value != null) {
30723
- gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.in, this._value));
30804
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30805
+ gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.in, this._value.join(',')));
30806
+ }
30807
+ else {
30808
+ gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.in, this._value));
30809
+ }
30724
30810
  }
30725
30811
  else {
30726
30812
  return [2 /*return*/, false];