tnx-shared 5.3.184 → 5.3.186

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.
@@ -1365,7 +1365,6 @@
1365
1365
  _this.isHtmlLabel = false;
1366
1366
  _this.isHorizontallyLabel = false;
1367
1367
  _this.order = 0;
1368
- _this.isLazyLoad = false;
1369
1368
  for (var key in init) {
1370
1369
  _this[key] = init[key];
1371
1370
  }
@@ -1455,6 +1454,7 @@
1455
1454
  _this.enableCaching = false;
1456
1455
  _this.hasOperatorCanBo = false;
1457
1456
  _this.addToGridInfo = false;
1457
+ _this.isLazyLoad = false;
1458
1458
  for (var key in init) {
1459
1459
  _this[key] = init[key];
1460
1460
  }
@@ -2049,6 +2049,7 @@
2049
2049
  _this.searchMultiple = true;
2050
2050
  _this.disableDisplayFieldServerSearch = false;
2051
2051
  _this.loadOnInit = false;
2052
+ _this.isLazyLoad = false;
2052
2053
  _this.allowLoadDataWhenParentNull = false;
2053
2054
  _this.disabledParentItem = true;
2054
2055
  for (var key in init) {
@@ -31654,6 +31655,7 @@
31654
31655
  _this.isOpenFull = false;
31655
31656
  _this.isCustomGenerateSearch = false;
31656
31657
  _this.isDisableOpenFull = false;
31658
+ _this._index = 1;
31657
31659
  return _this;
31658
31660
  }
31659
31661
  CommonSearchFormComponent.prototype.ngOnInit = function () {
@@ -31674,7 +31676,9 @@
31674
31676
  var lstTextSearchControl = columnFilters.filter(function (p) { return p.fullTextSearch; });
31675
31677
  this.lstTextControl = lstTextSearchControl.map(function (p) { return p.field; });
31676
31678
  this.searchBoxTooltip += "" + (lstTextSearchControl.map(function (x) { return x.label; })).join(', ');
31679
+ this._index = 2;
31677
31680
  }
31681
+ var totalControlPerRow = 12 / this.mdWidth;
31678
31682
  if (this.isCustomGenerateSearch) {
31679
31683
  this.parentSetting.commonSchemas.forEach(function (column) {
31680
31684
  column.showLabel = false;
@@ -31694,8 +31698,14 @@
31694
31698
  if (column.addToGridInfo) {
31695
31699
  _this.lstControlAddToGridInfo.push(column.field);
31696
31700
  }
31701
+ column.isLazyLoad = !_this.parentSetting.disableLazyLoadCommonSearch && _this._index > totalControlPerRow
31702
+ && column instanceof DropdownControlSchema && !!column.baseService && !(column.baseService instanceof MasterDataService);
31703
+ if (column.isLazyLoad) {
31704
+ _this.lstControlLazyLoad.push(column.field);
31705
+ }
31706
+ _this._index++;
31697
31707
  });
31698
- this.setting.schema = this.genFormSchema(this.parentSetting.commonSchemas);
31708
+ this.setting.schema = this.addSearchBox(this.parentSetting.commonSchemas.sort(function (prev, next) { return prev.order - next.order; }));
31699
31709
  }
31700
31710
  else {
31701
31711
  this.setting.schema = this.genFormSchema(columnFilters);
@@ -31710,14 +31720,8 @@
31710
31720
  var _this = this;
31711
31721
  var result = [];
31712
31722
  var totalControlPerRow = 12 / this.mdWidth;
31713
- var i = 1;
31714
31723
  columns.forEach(function (column) {
31715
31724
  var _a;
31716
- var isLazyLoad = !_this.parentSetting.disableLazyLoadCommonSearch && i > totalControlPerRow
31717
- && column instanceof DropdownControlSchema && !!column.baseService && column.baseService instanceof BaseService;
31718
- if (isLazyLoad) {
31719
- _this.lstControlLazyLoad.push(column.field);
31720
- }
31721
31725
  if (!column.isInTable || !column.includeSelect) {
31722
31726
  _this.lstControlNotIn.push(column.field);
31723
31727
  }
@@ -31735,7 +31739,12 @@
31735
31739
  });
31736
31740
  }
31737
31741
  if (column.baseService || (dataSource && dataSource.length > 0)) {
31738
- result.push(new DropdownControlSchema(Object.assign(Object.assign({}, column), { placeholder: (_a = column.placeholder) !== null && _a !== void 0 ? _a : "Ch\u1ECDn " + column.label, multiple: !column.single, dataSource: dataSource, mdWidth: _this.mdWidth, showLabel: false, isLazyLoad: isLazyLoad, showClear: true, onChanged: function (evt) {
31742
+ var isLazyLoad = !_this.parentSetting.disableLazyLoadCommonSearch && _this._index > totalControlPerRow
31743
+ && !!column.baseService && !(column.baseService instanceof MasterDataService);
31744
+ if (isLazyLoad) {
31745
+ _this.lstControlLazyLoad.push(column.field);
31746
+ }
31747
+ result.push(new DropdownControlSchema(Object.assign(Object.assign({}, column), { placeholder: (_a = column.placeholder) !== null && _a !== void 0 ? _a : "Ch\u1ECDn " + column.label, multiple: !column.single, dataSource: dataSource, mdWidth: _this.mdWidth, isLazyLoad: isLazyLoad, showLabel: false, showClear: true, onChanged: function (evt) {
31739
31748
  var _a;
31740
31749
  if (column.dataType == exports.DataType.boolean) {
31741
31750
  evt.parentModel[column.field] = column.single ? (_a = evt.value.id) !== null && _a !== void 0 ? _a : evt.value : evt.value.map(function (p) { return p.id; });
@@ -31752,6 +31761,7 @@
31752
31761
  }
31753
31762
  _this.handleSearch();
31754
31763
  } })));
31764
+ _this._index++;
31755
31765
  }
31756
31766
  }
31757
31767
  else {
@@ -31767,6 +31777,7 @@
31767
31777
  addColumn.showTime = column.dataType == exports.DataType.datetime;
31768
31778
  result.push(new DateTimeRangeControlSchema(addColumn));
31769
31779
  _this.lstDatetimeControl.push(column.field);
31780
+ _this._index++;
31770
31781
  break;
31771
31782
  case exports.DataType.int:
31772
31783
  case exports.DataType.intWithoutMask:
@@ -31779,12 +31790,12 @@
31779
31790
  };
31780
31791
  result.push(new NumberRangeControlSchema(addColumn));
31781
31792
  _this.lstNumberRangeControl.push(addColumn.field);
31793
+ _this._index++;
31782
31794
  break;
31783
31795
  default:
31784
31796
  break;
31785
31797
  }
31786
31798
  }
31787
- i++;
31788
31799
  });
31789
31800
  return this.addSearchBox(result.sort(function (prev, next) { return prev.order - next.order; }));
31790
31801
  };