tnx-shared 5.1.456 → 5.1.458

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.
@@ -14179,7 +14179,7 @@
14179
14179
  var e_5, _e;
14180
14180
  if (isLiteralObject(model)) {
14181
14181
  if (model._dropdownvalue != null && model._dropdownvalue !== '') {
14182
- return model[model._dropdownvalue] || model['value'];
14182
+ return model[model._dropdownvalue] == null ? model['value'] : model[model._dropdownvalue];
14183
14183
  }
14184
14184
  var data = {};
14185
14185
  for (var key in model) {
@@ -32009,6 +32009,7 @@
32009
32009
  this.showQuickNote = true;
32010
32010
  this.allowAnonymous = false;
32011
32011
  this.autoRenderMenu = true;
32012
+ this.onUserLoaded = new i0.EventEmitter();
32012
32013
  this._unsubscribeAll = new rxjs.Subject();
32013
32014
  // rootVersionDeploy = '1.3';
32014
32015
  this.currentRoute = '';
@@ -32250,6 +32251,7 @@
32250
32251
  root.data.allowAnonymous = this.allowAnonymous;
32251
32252
  // get current User
32252
32253
  this._userService.populateCurrentUser();
32254
+ this.onUserLoaded.emit();
32253
32255
  this._componentContextService.subscribe(ComCtxConstants.ROOT.NEED_CLEAR_PERMISSION_CACHE, function () { return __awaiter(_this, void 0, void 0, function () {
32254
32256
  var res;
32255
32257
  return __generator(this, function (_a) {
@@ -32850,6 +32852,7 @@
32850
32852
  showQuickNote: [{ type: i0.Input }],
32851
32853
  allowAnonymous: [{ type: i0.Input }],
32852
32854
  autoRenderMenu: [{ type: i0.Input }],
32855
+ onUserLoaded: [{ type: i0.Output }],
32853
32856
  handleShowPopupPermissionUtils: [{ type: i0.HostListener, args: ['document:keypress', ['$event'],] }]
32854
32857
  };
32855
32858
 
@@ -35946,7 +35949,7 @@
35946
35949
  accept: this.accept,
35947
35950
  mode: this.mode,
35948
35951
  sharedFolderType: this.sharedFolderType,
35949
- fileDataService: this.fileDataService,
35952
+ fileDataService: this.fileDataService
35950
35953
  });
35951
35954
  }
35952
35955
  return FileUploadSetting;
@@ -48524,6 +48527,7 @@
48524
48527
  _this.isOpenFull = false;
48525
48528
  _this.isCustomGenerateSearch = false;
48526
48529
  _this.isDisableOpenFull = false;
48530
+ _this.searchBoxTooltip = 'Tìm kiếm theo các trường: ';
48527
48531
  return _this;
48528
48532
  }
48529
48533
  CommonSearchFormComponent.prototype.ngOnInit = function () {
@@ -48542,8 +48546,18 @@
48542
48546
  this.setting.schema = this.addSearchBox(this.parentSetting.commonSchemas);
48543
48547
  }
48544
48548
  else {
48545
- var columnFilters = this.parentSetting.cols.filter(function (p) { return p.allowFilter && !p.field.startsWith('str'); });
48546
- this.lstTextControl = columnFilters.filter(function (p) { return p.fullTextSearch; }).map(function (p) { return p.field; });
48549
+ var columnFilters = this.parentSetting.cols.filter(function (p) { return p.allowFilter && !p.field.startsWith('str'); }).sort(function (a, b) {
48550
+ if (a.order < b.order) {
48551
+ return -1;
48552
+ }
48553
+ if (a.order > b.order) {
48554
+ return 1;
48555
+ }
48556
+ return 0;
48557
+ });
48558
+ var lstTextSearchControl = columnFilters.filter(function (p) { return p.fullTextSearch; });
48559
+ this.lstTextControl = lstTextSearchControl.map(function (p) { return p.field; });
48560
+ this.searchBoxTooltip += "" + (lstTextSearchControl.map(function (x) { return x.label; })).join(', ');
48547
48561
  this.setting.schema = this.genFormSchema(columnFilters);
48548
48562
  }
48549
48563
  this.isDisableOpenFull = this.setting.schema.length <= 4 && !this._commonService.isMobile();
@@ -48740,7 +48754,7 @@
48740
48754
  CommonSearchFormComponent.decorators = [
48741
48755
  { type: i0.Component, args: [{
48742
48756
  selector: 'common-search-form',
48743
- template: "<div #commonSearchTemplate class=\"p-grid box-common-search\" [ngClass]=\"{'open-full': isOpenFull} \">\n <div class=\"container-control no-label p-md-12 cs-pb-1\">\n <span class=\"label\"></span>\n <div>\n <crud-form #crudForm [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\" [(data)]=\"model.data\"\n (onFormReady)=\"_handleFormReady($event)\">\n <ng-template #keyword>\n <div class=\"search-box\">\n <input type=\"text\" pInputText class=\"link-or-action\" [placeholder]=\"'T\u1EEB kh\u00F3a'\"\n [(ngModel)]=\"keywords\" />\n <div class=\"cs-flex-evenly buttons\">\n <span [pTooltip]=\"'X\u00F3a b\u1ED9 l\u1ECDc'\" tooltipPosition=\"top\" (click)=\"clearFilter()\">\n <i class=\"pi pi-filter-slash\"></i>\n </span>\n <span [pTooltip]=\"'T\u00ECm ki\u1EBFm'\" tooltipPosition=\"top\" (click)=\"handleSearch()\">\n <i class=\"pi pi-search\"></i>\n </span>\n <span *ngIf=\"!isDisableOpenFull\" [pTooltip]=\"isOpenFull ? 'Thu g\u1ECDn' : 'M\u1EDF r\u1ED9ng'\"\n tooltipPosition=\"top\" (click)=\"toggleMenuSearch()\">\n <i [ngClass]=\"isOpenFull ? 'pi pi-caret-up' : 'pi pi-caret-down'\"></i>\n </span>\n </div>\n </div>\n </ng-template>\n </crud-form>\n </div>\n </div>\n</div>",
48757
+ template: "<div #commonSearchTemplate class=\"p-grid box-common-search\" [ngClass]=\"{'open-full': isOpenFull} \">\n <div class=\"container-control no-label p-md-12 cs-pb-1\">\n <span class=\"label\"></span>\n <div>\n <crud-form #crudForm [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\" [(data)]=\"model.data\"\n (onFormReady)=\"_handleFormReady($event)\">\n <ng-template #keyword>\n <div class=\"search-box\">\n <input type=\"text\" pInputText class=\"link-or-action\" [placeholder]=\"'T\u1EEB kh\u00F3a'\"\n tooltipStyleClass=\"wrap max-width-300\" tooltipPosition=\"top\" [pTooltip]=\"searchBoxTooltip\"\n [(ngModel)]=\"keywords\" (keyup.esc)=\"handleSearch()\" />\n <div class=\"cs-flex-evenly buttons\">\n <span [pTooltip]=\"'X\u00F3a b\u1ED9 l\u1ECDc'\" tooltipPosition=\"top\" (click)=\"clearFilter()\">\n <i class=\"pi pi-filter-slash\"></i>\n </span>\n <span [pTooltip]=\"'T\u00ECm ki\u1EBFm'\" tooltipPosition=\"top\" (click)=\"handleSearch()\">\n <i class=\"pi pi-search\"></i>\n </span>\n <span *ngIf=\"!isDisableOpenFull\" [pTooltip]=\"isOpenFull ? 'Thu g\u1ECDn' : 'M\u1EDF r\u1ED9ng'\"\n tooltipPosition=\"top\" (click)=\"toggleMenuSearch()\">\n <i [ngClass]=\"isOpenFull ? 'pi pi-caret-up' : 'pi pi-caret-down'\"></i>\n </span>\n </div>\n </div>\n </ng-template>\n </crud-form>\n </div>\n </div>\n</div>",
48744
48758
  providers: [ComponentContextService],
48745
48759
  styles: [".cs-pb-1{padding-bottom:.25rem!important}.bg-input{position:relative}.bg-input button{position:absolute;top:0;right:0}.pointer-none{pointer-events:none}.cs-flex-evenly{display:flex;align-items:center;justify-content:space-evenly}.box-common-search{position:relative;height:60px;overflow:hidden;transition:all .5s ease-in-out}.box-common-search.open-full{height:auto}.search-box{background:#fff;border:1px solid #d2d2d2;border-radius:5px;display:flex;justify-content:space-between}.search-box:hover{border-color:#397ac3;box-shadow:0 0 0 .2rem #a6d5fa}.search-box input{max-width:270px;box-shadow:none;border:0}.search-box span{cursor:pointer;padding:.5rem}"]
48746
48760
  },] }
@@ -56181,6 +56195,8 @@
56181
56195
  function TnAccordionTabComponent(_commonService) {
56182
56196
  this._commonService = _commonService;
56183
56197
  this.data = [];
56198
+ this.onOpenedTab = new i0.EventEmitter();
56199
+ this.onClosedTab = new i0.EventEmitter();
56184
56200
  this.template = {};
56185
56201
  this.activeIndex = [];
56186
56202
  }
@@ -56204,6 +56220,7 @@
56204
56220
  item.expanded = true;
56205
56221
  item.active = true;
56206
56222
  this.activeIndex.push(item.index);
56223
+ this.onOpenedTab.emit(item);
56207
56224
  };
56208
56225
  TnAccordionTabComponent.prototype.onCloseTab = function (evt) {
56209
56226
  var item = this.data.find(function (x) { return x.index == evt.index; });
@@ -56211,6 +56228,7 @@
56211
56228
  item.expanded = false;
56212
56229
  item.active = false;
56213
56230
  this.activeIndex = this.activeIndex.filter(function (q) { return q != evt.index; });
56231
+ this.onClosedTab.emit(item);
56214
56232
  };
56215
56233
  TnAccordionTabComponent.prototype.activeTab = function (item) {
56216
56234
  this.data.forEach(function (item) {
@@ -56248,7 +56266,9 @@
56248
56266
  children: [{ type: i0.ContentChildren, args: [i0.TemplateRef,] }],
56249
56267
  contentBeforeLink: [{ type: i0.ContentChild, args: ['contentBeforeLink',] }],
56250
56268
  contentBeforeTabList: [{ type: i0.ContentChild, args: ['contentBeforeTabList',] }],
56251
- data: [{ type: i0.Input }]
56269
+ data: [{ type: i0.Input }],
56270
+ onOpenedTab: [{ type: i0.Output }],
56271
+ onClosedTab: [{ type: i0.Output }]
56252
56272
  };
56253
56273
 
56254
56274
  var PipeLine = /** @class */ (function () {