tnx-shared 5.1.451 → 5.1.452

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.
@@ -902,6 +902,7 @@
902
902
  this.checkPermisionTrinhKy = false;
903
903
  this.useWorkflowButton = false;
904
904
  this.showEditLink = true;
905
+ this.mdWidthCommonSearch = 3;
905
906
  this.useCommonSearch = false;
906
907
  this.useCommonFullTextSearch = true;
907
908
  this.hiddenHeader = false;
@@ -48349,6 +48350,7 @@
48349
48350
  }
48350
48351
  CommonSearchFormComponent.prototype.ngOnInit = function () {
48351
48352
  var _this = this;
48353
+ this.mdWidth = this.parentSetting.mdWidthCommonSearch;
48352
48354
  this.setting.baseService = this.parentSetting.baseService;
48353
48355
  this.isCustomGenerateSearch = this.parentSetting.commonSchemas.length > 0;
48354
48356
  if (this.isCustomGenerateSearch) {
@@ -48369,17 +48371,6 @@
48369
48371
  this.isDisableOpenFull = this.setting.schema.length <= 4 && !this._commonService.isMobile();
48370
48372
  _super.prototype.ngOnInit.call(this);
48371
48373
  };
48372
- CommonSearchFormComponent.prototype.ngAfterViewInit = function () {
48373
- var _this = this;
48374
- var width = this.commonSearch['nativeElement'].offsetWidth;
48375
- if (width <= 768) {
48376
- this.mdWidth = 6;
48377
- }
48378
- else if (width <= 1366) {
48379
- this.mdWidth = 4;
48380
- }
48381
- this.setting.schema.forEach(function (element) { return element.mdWidth = _this.mdWidth; });
48382
- };
48383
48374
  CommonSearchFormComponent.prototype.genFormSchema = function (columns) {
48384
48375
  var _this = this;
48385
48376
  var result = [];
@@ -48459,14 +48450,15 @@
48459
48450
  showLabel: false,
48460
48451
  mdWidth: this.mdWidth
48461
48452
  });
48453
+ var index = Number(12 / this.mdWidth) - 1;
48462
48454
  if (this._commonService.isMobile()) {
48463
48455
  columns.splice(0, 0, searchBox);
48464
48456
  }
48465
- else if (columns.length < 3) {
48457
+ else if (columns.length < index) {
48466
48458
  columns.push(searchBox);
48467
48459
  }
48468
48460
  else {
48469
- columns.splice(3, 0, searchBox);
48461
+ columns.splice(index, 0, searchBox);
48470
48462
  }
48471
48463
  return columns;
48472
48464
  };
@@ -48569,7 +48561,6 @@
48569
48561
  { type: CommonService }
48570
48562
  ]; };
48571
48563
  CommonSearchFormComponent.propDecorators = {
48572
- commonSearch: [{ type: i0.ViewChild, args: ['commonSearch',] }],
48573
48564
  templateFilter: [{ type: i0.Input }],
48574
48565
  onClickSearch: [{ type: i0.Output }]
48575
48566
  };
@@ -49278,7 +49269,7 @@
49278
49269
  multi: true
49279
49270
  }
49280
49271
  ],
49281
- styles: [".tn-datetime-picker-range{display:flex}.tn-datetime-picker-range>span{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .tn-datetime-picker-range p-calendar{flex:0 0 calc(50% - 8px)}"]
49272
+ styles: [".tn-datetime-picker-range{display:flex;justify-content:space-between}.tn-datetime-picker-range>span{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .tn-datetime-picker-range p-calendar{flex:0 0 calc(50% - 8px)}"]
49282
49273
  },] }
49283
49274
  ];
49284
49275
  DatetimePickerRangeComponent.ctorParameters = function () { return []; };