tnx-shared 5.0.46 → 5.0.47

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.
@@ -30612,11 +30612,34 @@
30612
30612
  };
30613
30613
  EntityPickerDataComponent.prototype.modifyGridInfo = function (gridInfo) {
30614
30614
  return __awaiter(this, void 0, void 0, function () {
30615
- var allow;
30616
- return __generator(this, function (_a) {
30617
- switch (_a.label) {
30615
+ var _a, _b, filter, allow;
30616
+ var e_1, _c;
30617
+ return __generator(this, function (_d) {
30618
+ switch (_d.label) {
30618
30619
  case 0:
30619
30620
  gridInfo.fields = this.advanceData.fields;
30621
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30622
+ if (gridInfo.filters.length > 0) {
30623
+ try {
30624
+ for (_a = __values(gridInfo.filters), _b = _a.next(); !_b.done; _b = _a.next()) {
30625
+ filter = _b.value;
30626
+ if (filter.operator == exports.Operator.in) {
30627
+ filter.value = JSON.parse(filter.value).join(',');
30628
+ }
30629
+ else {
30630
+ filter.value = JSON.parse(filter.value).toString();
30631
+ }
30632
+ }
30633
+ }
30634
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
30635
+ finally {
30636
+ try {
30637
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
30638
+ }
30639
+ finally { if (e_1) throw e_1.error; }
30640
+ }
30641
+ }
30642
+ }
30620
30643
  if (this.control.multiple) {
30621
30644
  if (this._value && this._value.length > 0) {
30622
30645
  if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
@@ -30630,7 +30653,7 @@
30630
30653
  else {
30631
30654
  if (this._value) {
30632
30655
  if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30633
- gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.notEqual, this._value.join(',')));
30656
+ gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.notEqual, this._value.toString()));
30634
30657
  }
30635
30658
  else {
30636
30659
  gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.notEqual, this._value));
@@ -30639,14 +30662,14 @@
30639
30662
  }
30640
30663
  return [4 /*yield*/, appendDefaultFilter(gridInfo.filters, this.control.defaultFilters)];
30641
30664
  case 1:
30642
- _a.sent();
30665
+ _d.sent();
30643
30666
  if (!this.control.modifyFilter) return [3 /*break*/, 3];
30644
30667
  return [4 /*yield*/, this.control.modifyFilter(gridInfo.filters, this)];
30645
30668
  case 2:
30646
- allow = _a.sent();
30669
+ allow = _d.sent();
30647
30670
  if (allow === false)
30648
30671
  return [2 /*return*/, false];
30649
- _a.label = 3;
30672
+ _d.label = 3;
30650
30673
  case 3:
30651
30674
  if (this.setting.columnSetting.sortField) {
30652
30675
  gridInfo.sorts.push({
@@ -30811,10 +30834,34 @@
30811
30834
  };
30812
30835
  EntityPickerSelectedComponent.prototype.modifyGridInfo = function (gridInfo) {
30813
30836
  return __awaiter(this, void 0, void 0, function () {
30814
- return __generator(this, function (_a) {
30815
- switch (_a.label) {
30837
+ var _a, _b, filter;
30838
+ var e_1, _c;
30839
+ return __generator(this, function (_d) {
30840
+ switch (_d.label) {
30816
30841
  case 0:
30817
30842
  gridInfo.fields = this.advanceData.fields;
30843
+ if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30844
+ if (gridInfo.filters.length > 0) {
30845
+ try {
30846
+ for (_a = __values(gridInfo.filters), _b = _a.next(); !_b.done; _b = _a.next()) {
30847
+ filter = _b.value;
30848
+ if (filter.operator == exports.Operator.in) {
30849
+ filter.value = JSON.parse(filter.value).join(',');
30850
+ }
30851
+ else {
30852
+ filter.value = JSON.parse(filter.value).toString();
30853
+ }
30854
+ }
30855
+ }
30856
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
30857
+ finally {
30858
+ try {
30859
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
30860
+ }
30861
+ finally { if (e_1) throw e_1.error; }
30862
+ }
30863
+ }
30864
+ }
30818
30865
  if (this.control.multiple) {
30819
30866
  if (this._value != null && this._value.length > 0) {
30820
30867
  if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
@@ -30831,7 +30878,7 @@
30831
30878
  else {
30832
30879
  if (this._value != null) {
30833
30880
  if (this.control.coreVersion == exports.EnumCoreVersion.V4) {
30834
- gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.in, this._value.join(',')));
30881
+ gridInfo.filters.push(this.newFilterV4(this.control.valueField, exports.Operator.in, this._value.toString()));
30835
30882
  }
30836
30883
  else {
30837
30884
  gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.in, this._value));
@@ -30843,7 +30890,7 @@
30843
30890
  }
30844
30891
  return [4 /*yield*/, appendDefaultFilter(gridInfo.filters, this.control.defaultFilters)];
30845
30892
  case 1:
30846
- _a.sent();
30893
+ _d.sent();
30847
30894
  return [2 /*return*/];
30848
30895
  }
30849
30896
  });