tnx-shared 5.2.20 → 5.2.21

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.
Files changed (71) hide show
  1. package/app-context/component-context.service.d.ts.map +1 -1
  2. package/classes/base/component-base.d.ts +1 -1
  3. package/classes/public-function.d.ts +3 -2
  4. package/classes/public-function.d.ts.map +1 -1
  5. package/components/chat/chat-box/chat-box.component.d.ts +1 -1
  6. package/components/dropdown/services/dropdown.service.d.ts.map +1 -1
  7. package/components/file-explorer/services/file-explorer-new.service.d.ts.map +1 -1
  8. package/components/file-explorer/services/file-explorer.service.d.ts.map +1 -1
  9. package/components/file-explorer/services/file-version.service.d.ts.map +1 -1
  10. package/components/file-explorer/services/folder.service.d.ts.map +1 -1
  11. package/components/file-explorer/services/ky-so-sim-signPDF.service.d.ts.map +1 -1
  12. package/components/file-explorer/services/my-drive.service.d.ts.map +1 -1
  13. package/components/tn-app-help/services/path-name.service.d.ts.map +1 -1
  14. package/congviec/congviec/services/congviec-dinhkem.service.d.ts.map +1 -1
  15. package/esm2020/app-context/component-context.service.mjs +4 -5
  16. package/esm2020/classes/base/component-base.mjs +2 -2
  17. package/esm2020/components/common-app-component/common-app-component.mjs +2 -2
  18. package/esm2020/components/crud/crud-form/crud-form.component.mjs +1 -1
  19. package/esm2020/components/dropdown/services/dropdown.service.mjs +5 -5
  20. package/esm2020/components/file-explorer/file-ky-so-sim/file-ky-so-sim.component.mjs +1 -1
  21. package/esm2020/components/file-explorer/file-manager/file-manager.component.mjs +2 -2
  22. package/esm2020/components/file-explorer/file-viewer/file-viewer.component.mjs +3 -3
  23. package/esm2020/components/file-explorer/services/file-explorer-new.service.mjs +39 -40
  24. package/esm2020/components/file-explorer/services/file-explorer.service.mjs +48 -51
  25. package/esm2020/components/file-explorer/services/file-version.service.mjs +5 -4
  26. package/esm2020/components/file-explorer/services/folder.service.mjs +3 -3
  27. package/esm2020/components/file-explorer/services/ky-so-sim-signPDF.service.mjs +3 -2
  28. package/esm2020/components/file-explorer/services/my-drive.service.mjs +34 -34
  29. package/esm2020/components/mask/mask.component.mjs +1 -1
  30. package/esm2020/components/number-picker-range/number-picker-range.component.mjs +1 -1
  31. package/esm2020/components/tn-app-help/services/path-name.service.mjs +4 -3
  32. package/esm2020/components/tn-tinymce/tn-tinymce.component.mjs +2 -2
  33. package/esm2020/components/user-picker/user-picker-box/user-picker-box.component.mjs +1 -1
  34. package/esm2020/components/workflow/workflow-history-new/workflow-history-new.component.mjs +1 -1
  35. package/esm2020/congviec/cauhinh-workflow/cauhinh-workflow.component.mjs +1 -1
  36. package/esm2020/congviec/congviec/services/congviec-dinhkem.service.mjs +5 -4
  37. package/esm2020/services/article.service.mjs +10 -13
  38. package/esm2020/services/base.service.mjs +36 -41
  39. package/esm2020/services/custom-router.service.mjs +4 -5
  40. package/esm2020/services/entity-picker.service.mjs +4 -3
  41. package/esm2020/services/file-object-v4.service.mjs +5 -7
  42. package/esm2020/services/high-performance.service.mjs +4 -3
  43. package/esm2020/services/master-data.service.mjs +23 -30
  44. package/esm2020/services/organization.service.mjs +18 -23
  45. package/esm2020/services/template-v4.service.mjs +3 -2
  46. package/esm2020/services/template.service.mjs +19 -27
  47. package/esm2020/services/templateinstance.service.mjs +22 -31
  48. package/esm2020/services/tn-client.service.mjs +3 -3
  49. package/esm2020/services/unique-number.service.mjs +4 -3
  50. package/esm2020/services/user-v5.service.mjs +31 -39
  51. package/esm2020/services/user.service.mjs +32 -40
  52. package/fesm2015/tnx-shared.mjs +334 -409
  53. package/fesm2015/tnx-shared.mjs.map +1 -1
  54. package/fesm2020/tnx-shared.mjs +334 -409
  55. package/fesm2020/tnx-shared.mjs.map +1 -1
  56. package/package.json +2 -2
  57. package/services/article.service.d.ts.map +1 -1
  58. package/services/base.service.d.ts.map +1 -1
  59. package/services/common.service.d.ts +2 -2
  60. package/services/custom-router.service.d.ts.map +1 -1
  61. package/services/entity-picker.service.d.ts.map +1 -1
  62. package/services/file-object-v4.service.d.ts.map +1 -1
  63. package/services/high-performance.service.d.ts.map +1 -1
  64. package/services/master-data.service.d.ts.map +1 -1
  65. package/services/organization.service.d.ts.map +1 -1
  66. package/services/template-v4.service.d.ts.map +1 -1
  67. package/services/template.service.d.ts.map +1 -1
  68. package/services/templateinstance.service.d.ts.map +1 -1
  69. package/services/unique-number.service.d.ts.map +1 -1
  70. package/services/user-v5.service.d.ts.map +1 -1
  71. package/services/user.service.d.ts.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, InjectionToken, Optional, Inject, Directive, Input, ChangeDetectorRef, ViewChild, EventEmitter, Component, Output, forwardRef, TemplateRef, ContentChild, ContentChildren, HostListener, ChangeDetectionStrategy, ViewEncapsulation, Pipe, LOCALE_ID, QueryList, isDevMode, NgModuleFactory, Compiler, NgModule } from '@angular/core';
3
- import { Subject, ReplaySubject, forkJoin, from, combineLatest } from 'rxjs';
3
+ import { Subject, ReplaySubject, firstValueFrom, forkJoin, from, combineLatest } from 'rxjs';
4
4
  import { takeUntil, catchError, shareReplay, retry, map, debounceTime, distinctUntilChanged, mergeMap, distinct, filter } from 'rxjs/operators';
5
5
  import * as i5 from '@angular/common';
6
6
  import { DatePipe, DecimalPipe, registerLocaleData, CommonModule } from '@angular/common';
@@ -2401,12 +2401,12 @@ class ComponentContextService {
2401
2401
  }
2402
2402
  completeEvent(name) {
2403
2403
  const subject = this.addSubject(name);
2404
- subject.next();
2404
+ subject.next(1);
2405
2405
  subject.complete();
2406
2406
  }
2407
2407
  completeReplayEvent(name) {
2408
2408
  const subject = this.addReplaySubject(name);
2409
- subject.next();
2409
+ subject.next(1);
2410
2410
  subject.complete();
2411
2411
  }
2412
2412
  completeSubject(name) {
@@ -2539,7 +2539,6 @@ class ComponentContextService {
2539
2539
  return this.setDataInternal(this.data, keyPath, value);
2540
2540
  }
2541
2541
  setDataInternal(obj, keyPath, data) {
2542
- const root = this.root || this;
2543
2542
  this._commonService.setValueByPath(obj, keyPath, data);
2544
2543
  }
2545
2544
  destroyContext() {
@@ -2549,7 +2548,7 @@ class ComponentContextService {
2549
2548
  for (const key in this.replaySubjects) {
2550
2549
  this.completeReplaySubject(key);
2551
2550
  }
2552
- this._unSubscribeAll.next();
2551
+ this._unSubscribeAll.next(1);
2553
2552
  this._unSubscribeAll.complete();
2554
2553
  this.data = {};
2555
2554
  this.root.fireEvent(ComCtxConstants.ROOT.DESTROY_COMPONENT, this);
@@ -4789,9 +4788,8 @@ class MasterDataService {
4789
4788
  });
4790
4789
  }
4791
4790
  getDMChungDropdown(code) {
4792
- return this._httpClient.get(`${this.singleCategoryEndpoint}/GetByFilterCodeAndNameByGroupCode/${code}`)
4793
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4794
- .toPromise();
4791
+ return firstValueFrom(this._httpClient.get(`${this.singleCategoryEndpoint}/GetByFilterCodeAndNameByGroupCode/${code}`)
4792
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4795
4793
  }
4796
4794
  getItems(groupCode) {
4797
4795
  return new Promise(async (resolve, reject) => {
@@ -4839,18 +4837,16 @@ class MasterDataService {
4839
4837
  }
4840
4838
  dogetAddress(id, level = 1) {
4841
4839
  const serviceUri = `${this.apiEndpoint}/CityCategory/GetByParentId/${id}?level=${level}`;
4842
- return this._httpClient.get(serviceUri)
4843
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4844
- .toPromise();
4840
+ return firstValueFrom(this._httpClient.get(serviceUri)
4841
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4845
4842
  }
4846
4843
  getItemDetailUnit(id) {
4847
4844
  return new Promise(async (resolve, reject) => {
4848
4845
  let itemData = new MasterDataItem();
4849
4846
  if (!this.storage.getItem(`${this.administrativeUnitItem}${id}`)) {
4850
4847
  const serviceUri = `${this.apiEndpoint}/CityCategory/GetByCode/${id}`;
4851
- const result = await this._httpClient.get(serviceUri)
4852
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4853
- .toPromise();
4848
+ const result = await firstValueFrom(this._httpClient.get(serviceUri)
4849
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4854
4850
  this.storage.setItem(`${this.administrativeUnitItem}${id}`, JSON.stringify(result.data));
4855
4851
  itemData = result.data;
4856
4852
  }
@@ -4866,9 +4862,9 @@ class MasterDataService {
4866
4862
  resolve({ data: {}, success: true });
4867
4863
  });
4868
4864
  // const serviceUri = `${this.apiEndpoint}/ConfigurationService/GetValueByCode?code=${code}`;
4869
- // return this._httpClient.get<ResponseResult>(serviceUri)
4865
+ // return firstValueFrom(this._httpClient.get<ResponseResult>(serviceUri)
4870
4866
  // .pipe(catchError((err: HttpErrorResponse) => this._commonService.handleError(err, this._injector)))
4871
- // .toPromise();
4867
+ // );
4872
4868
  }
4873
4869
  async doGetAll(groupCode) {
4874
4870
  const group = await this.getGroupByCode(groupCode);
@@ -4889,23 +4885,21 @@ class MasterDataService {
4889
4885
  return this.getData(`${this.singleCategoryEndpoint}/getData`, gridInfo);
4890
4886
  }
4891
4887
  getData(uri, gridInfo) {
4892
- return this._httpClient.post(uri, gridInfo).toPromise();
4888
+ return firstValueFrom(this._httpClient.post(uri, gridInfo));
4893
4889
  }
4894
4890
  async getGroupByCode(groupCode) {
4895
4891
  const uri = `${this.groupCategoryEndpoint}/getByCode/${groupCode}`;
4896
- return this._httpClient.get(uri).toPromise();
4892
+ return firstValueFrom(this._httpClient.get(uri));
4897
4893
  }
4898
4894
  addWorkDays(date, days, isDay = 1) {
4899
4895
  const serviceUri = `${this.apiEndpoint}/HolidayCategory/GetDate?date=${date}&days=${days}&isDay=${isDay}`;
4900
- return this._httpClient.get(serviceUri)
4901
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4902
- .toPromise();
4896
+ return firstValueFrom(this._httpClient.get(serviceUri)
4897
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4903
4898
  }
4904
4899
  getDateByDuration(date, type, duration) {
4905
4900
  const serviceUri = `${this.apiEndpoint}/HolidayCategory/getDateByDuration?date=${date}&type=${type}&duration=${duration}`;
4906
- return this._httpClient.get(serviceUri)
4907
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4908
- .toPromise();
4901
+ return firstValueFrom(this._httpClient.get(serviceUri)
4902
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4909
4903
  }
4910
4904
  getItemByCode(dataSource, code) {
4911
4905
  return dataSource.find(x => x.code === code);
@@ -4971,21 +4965,18 @@ class MasterDataService {
4971
4965
  }
4972
4966
  getValueByCode(code) {
4973
4967
  const url = `${this.singleCategoryEndpoint}/getValueByCode?code=${code}`;
4974
- return this._httpClient.get(url)
4975
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4976
- .toPromise();
4968
+ return firstValueFrom(this._httpClient.get(url)
4969
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4977
4970
  }
4978
4971
  getGroupItemByCode(code) {
4979
4972
  const url = `${this.apiEndpoint}/GroupCategory/${code}`;
4980
- return this._httpClient.get(url).pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4981
- .toPromise();
4973
+ return firstValueFrom(this._httpClient.get(url).pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4982
4974
  }
4983
4975
  parseMathExpression(expression, decimalPlaces, forVietnamese = true) {
4984
4976
  expression = encodeURIComponent(expression);
4985
4977
  const url = `${this.apiEndpoint}/MathExpression/ParseMath?expression=${expression}&decimalPlaces=${decimalPlaces}&forVietnamese=${forVietnamese}`;
4986
- return this._httpClient.get(url)
4987
- .pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
4988
- .toPromise();
4978
+ return firstValueFrom(this._httpClient.get(url)
4979
+ .pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
4989
4980
  }
4990
4981
  getByGridRequest(groupCode, gridInfo, plusUrl = '') {
4991
4982
  return new Promise(async (resolve, reject) => {
@@ -4996,9 +4987,9 @@ class MasterDataService {
4996
4987
  if (plusUrl != null && plusUrl != '') {
4997
4988
  apiUrl += '/' + plusUrl;
4998
4989
  }
4999
- data = await this._httpClient
4990
+ data = await firstValueFrom(this._httpClient
5000
4991
  .post(apiUrl, gridInfo)
5001
- .pipe(catchError(err => this.handleError(err, this._injector))).toPromise();
4992
+ .pipe(catchError(err => this.handleError(err, this._injector))));
5002
4993
  this.storage.setItem(`${this.categoryPrefix}${groupCode}`, JSON.stringify(data.data));
5003
4994
  }
5004
4995
  else {
@@ -6031,8 +6022,8 @@ class BaseService {
6031
6022
  apiUrl += `&`;
6032
6023
  }
6033
6024
  apiUrl += `_keySignalr=${topic}`;
6034
- this._http.get(apiUrl)
6035
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise()
6025
+ firstValueFrom(this._http.get(apiUrl)
6026
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))))
6036
6027
  .then(res => {
6037
6028
  })
6038
6029
  .catch(err => {
@@ -6062,8 +6053,8 @@ class BaseService {
6062
6053
  apiUrl += `&`;
6063
6054
  }
6064
6055
  apiUrl += `_keySignalr=${topic}`;
6065
- this._http.post(apiUrl, data)
6066
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise()
6056
+ firstValueFrom(this._http.post(apiUrl, data)
6057
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))))
6067
6058
  .then(res => {
6068
6059
  })
6069
6060
  .catch(err => {
@@ -6438,94 +6429,88 @@ class BaseService {
6438
6429
  }
6439
6430
  post(item, plusUrl = '') {
6440
6431
  const uri = plusUrl ? `${this.serviceUri}/${plusUrl}` : this.serviceUri;
6441
- return this._http
6432
+ return firstValueFrom(this._http
6442
6433
  .post(uri, item)
6443
- .pipe(catchError(err => this.handleError(err, this._injector))).toPromise();
6434
+ .pipe(catchError(err => this.handleError(err, this._injector))));
6444
6435
  }
6445
6436
  put(id, item, plusUrl = '') {
6446
6437
  const url = plusUrl ? `${this.serviceUri}/${plusUrl}/${id}` : `${this.serviceUri}/${id}`;
6447
- return this._http.put(url, item).toPromise();
6438
+ return firstValueFrom(this._http.put(url, item));
6448
6439
  }
6449
6440
  delete(id) {
6450
6441
  const url = `${this.serviceUri}/${id}`;
6451
- return this._http.delete(url).toPromise();
6442
+ return firstValueFrom(this._http.delete(url));
6452
6443
  }
6453
6444
  deleteById(id) {
6454
6445
  const url = `${this.serviceUri}/${id}`;
6455
- return this._http.delete(url).pipe(catchError((err) => this.handleError(err, this._injector))).toPromise();
6446
+ return firstValueFrom(this._http.delete(url).pipe(catchError((err) => this.handleError(err, this._injector))));
6456
6447
  }
6457
6448
  deleteMany(lstId) {
6458
6449
  const url = `${this.serviceUri}/DeleteManyAsync/${lstId}`;
6459
- return this._http.delete(url).toPromise();
6450
+ return firstValueFrom(this._http.delete(url));
6460
6451
  }
6461
6452
  defaultGet(apiUrl, options) {
6462
- return this._http.get(apiUrl, options)
6463
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
6453
+ return firstValueFrom(this._http.get(apiUrl, options)
6454
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
6464
6455
  }
6465
6456
  getIgnoreClientCache(apiUrl) {
6466
6457
  const options = {
6467
6458
  headers: new HttpHeaders({ 'Cache-Control': 'no-cache' }),
6468
6459
  };
6469
- return this._http.get(apiUrl, options)
6470
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
6460
+ return firstValueFrom(this._http.get(apiUrl, options)
6461
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
6471
6462
  }
6472
6463
  defaultPost(apiUrl, data, options) {
6473
- return this._http.post(apiUrl, data, options)
6474
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
6464
+ return firstValueFrom(this._http.post(apiUrl, data, options)
6465
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
6475
6466
  }
6476
6467
  defaultPut(apiUrl, data) {
6477
- return this._http.put(apiUrl, data)
6478
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
6468
+ return firstValueFrom(this._http.put(apiUrl, data)
6469
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
6479
6470
  }
6480
6471
  defaultDelete(apiUrl) {
6481
- return this._http.delete(apiUrl)
6482
- .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
6472
+ return firstValueFrom(this._http.delete(apiUrl)
6473
+ .pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
6483
6474
  }
6484
6475
  getEntityMetadata() {
6485
6476
  const apiUrl = `${this.serviceUri}/GetEntityMetadata`;
6486
- return this._http.get(apiUrl)
6487
- .pipe(catchError((err) => this.handleError(err, this._injector)))
6488
- .toPromise();
6477
+ return firstValueFrom(this._http.get(apiUrl)
6478
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
6489
6479
  }
6490
6480
  saveEntityMetadata(data) {
6491
6481
  const apiUrl = `${this.serviceUri}/SaveEntityMetadata`;
6492
- return this._http.post(apiUrl, data)
6493
- .pipe(catchError((err) => this.handleError(err, this._injector)))
6494
- .toPromise();
6482
+ return firstValueFrom(this._http.post(apiUrl, data)
6483
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
6495
6484
  }
6496
6485
  changeMetadataStatus(id, metadataType) {
6497
6486
  const apiUrl = `${this.serviceUri}/changeMetadataStatus?id=${id}&metadataStatusType=${metadataType}`;
6498
- return this._http.post(apiUrl, {}).pipe(catchError((err) => this.handleError(err, this._injector)))
6499
- .toPromise();
6487
+ return firstValueFrom(this._http.post(apiUrl, {}).pipe(catchError((err) => this.handleError(err, this._injector))));
6500
6488
  }
6501
6489
  saveAndChangeMetadataStatus(id, metadataType, data) {
6502
6490
  const apiUrl = `${this.serviceUri}/saveAndChangeMetadataStatus?id=${id}&metadataStatusType=${metadataType}`;
6503
- return this._http.post(apiUrl, data).pipe(catchError((err) => this.handleError(err, this._injector)))
6504
- .toPromise();
6491
+ return firstValueFrom(this._http.post(apiUrl, data).pipe(catchError((err) => this.handleError(err, this._injector))));
6505
6492
  }
6506
6493
  getEntityPermission() {
6507
6494
  const apiUrl = `${this.serviceUri}/GetEntityPermission`;
6508
- return this._http.get(apiUrl)
6509
- .pipe(catchError((err) => this.handleError(err, this._injector)))
6510
- .toPromise();
6495
+ return firstValueFrom(this._http.get(apiUrl)
6496
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
6511
6497
  }
6512
6498
  saveEntityPermission(data) {
6513
6499
  const apiUrl = `${this.serviceUri}/SaveEntityPermission`;
6514
- return this._http.post(apiUrl, data)
6515
- .pipe(catchError((err) => this.handleError(err, this._injector)))
6516
- .toPromise();
6500
+ return firstValueFrom(this._http.post(apiUrl, data)
6501
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
6517
6502
  }
6518
6503
  updateEntityPermission(id, item) {
6519
6504
  const url = `${this.serviceUri}/UpdatEntityPermission/${id}`;
6520
- return this._http.put(url, item).toPromise();
6505
+ return firstValueFrom(this._http.put(url, item));
6521
6506
  }
6522
6507
  deleteEntityPermission(id) {
6523
6508
  const url = `${this.serviceUri}/DeleteEntityPermission/${id}`;
6524
- return this._http.delete(url).toPromise();
6509
+ return firstValueFrom(this._http.delete(url));
6525
6510
  }
6526
6511
  getWfHistoryByEntityItem(id) {
6527
6512
  const url = `${this.serviceUri}/GetWfHistoryByEntityItem/${id}`;
6528
- return this._http.get(url).toPromise();
6513
+ return firstValueFrom(this._http.get(url));
6529
6514
  }
6530
6515
  getDicStatusNhomTrangThai(statuses) {
6531
6516
  const url = `${this.serviceUri}/GetDicStatusNhomTrangThai`;
@@ -6554,7 +6539,7 @@ class BaseService {
6554
6539
  }
6555
6540
  putWithPlusUrl(id, item, plusUrl) {
6556
6541
  const url = `${this.serviceUri}/${id}/${plusUrl}`;
6557
- return this._http.put(url, item).toPromise();
6542
+ return firstValueFrom(this._http.put(url, item));
6558
6543
  }
6559
6544
  async getByField(field, arrValue, getFields = '', sortField = null, sortDir = null) {
6560
6545
  arrValue = (arrValue || []).filter((val, ind, arr) => (val === 0 || val) && arr.indexOf(val) === ind);
@@ -6861,88 +6846,85 @@ class FileExplorerService {
6861
6846
  }
6862
6847
  getMyFiles() {
6863
6848
  const svUrl = `${this._serviceUri}/FileObject/GetMyFiles`;
6864
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
6849
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
6865
6850
  }
6866
6851
  getServiceFolderId(model) {
6867
6852
  const svUrl = `${this._serviceUri}/Folder/GetServiceFolder?service=${model.service}&entity=${model.entity}&entityInstanceId=${model.entityInstanceId}`;
6868
- return this._http.get(svUrl)
6869
- .pipe(catchError((err) => this.handleError(err)))
6870
- .toPromise();
6853
+ return firstValueFrom(this._http.get(svUrl)
6854
+ .pipe(catchError((err) => this.handleError(err))));
6871
6855
  }
6872
6856
  deleteServiceFolder(model) {
6873
6857
  const svUrl = `${this._serviceUri}/Folder/DeleteServiceFolder?service=${model.service}&entity=${model.entity}&entityInstanceId=${model.entityInstanceId}`;
6874
- return this._http.delete(svUrl)
6875
- .pipe(catchError((err) => this.handleError(err)))
6876
- .toPromise();
6858
+ return firstValueFrom(this._http.delete(svUrl)
6859
+ .pipe(catchError((err) => this.handleError(err))));
6877
6860
  }
6878
6861
  getByFolderId(folderId) {
6879
6862
  if (folderId == '00000000-0000-0000-0000-000000000000') {
6880
6863
  return Promise.reject({ status: 400 });
6881
6864
  }
6882
6865
  const svUrl = `${this._serviceUri}/File?folderId=${folderId}`;
6883
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
6866
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
6884
6867
  }
6885
6868
  getMyDrive(folderId) {
6886
6869
  if (folderId == '00000000-0000-0000-0000-000000000000') {
6887
6870
  return Promise.reject({ status: 400 });
6888
6871
  }
6889
6872
  const svUrl = `${this._serviceUri}/FileObject/GetMyDrive?folderId=${folderId}`;
6890
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
6873
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
6891
6874
  }
6892
6875
  getMyShare(userId) {
6893
6876
  if (userId < 0) {
6894
6877
  return Promise.reject({ status: 400 });
6895
6878
  }
6896
6879
  const svUrl = `${this._serviceUri}/Folder/GetMyShare?userId=${userId}`;
6897
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
6880
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
6898
6881
  }
6899
6882
  getMyShareToOther(ownerId) {
6900
6883
  if (ownerId < 0) {
6901
6884
  return Promise.reject({ status: 400 });
6902
6885
  }
6903
6886
  const svUrl = `${this._serviceUri}/Folder/GetMyShareToOther?ownerId=${ownerId}`;
6904
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
6887
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
6905
6888
  }
6906
6889
  getFolderTree(folderId) {
6907
6890
  if (folderId == '00000000-0000-0000-0000-000000000000') {
6908
6891
  return Promise.reject({ status: 400 });
6909
6892
  }
6910
6893
  const apiUrl = `${this._serviceUri}/FileObject/GetTree?folderId=${folderId}`;
6911
- return this._http.get(apiUrl)
6912
- .pipe(catchError((err) => this.handleError(err)))
6913
- .toPromise();
6894
+ return firstValueFrom(this._http.get(apiUrl)
6895
+ .pipe(catchError((err) => this.handleError(err))));
6914
6896
  }
6915
6897
  copyFile(copyFileDto) {
6916
6898
  const svUrl = `${this._serviceUri}/FileObject/CopyFile`;
6917
- return this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))).toPromise();
6899
+ return firstValueFrom(this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))));
6918
6900
  }
6919
6901
  convertDocumentToPdfAndSave(copyFileDto) {
6920
6902
  const svUrl = `${this._serviceUri}/FileObject/ConvertDocumentToPdfAndSave`;
6921
- return this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))).toPromise();
6903
+ return firstValueFrom(this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))));
6922
6904
  }
6923
6905
  createNewFolder(folder) {
6924
6906
  const svUrl = `${this._serviceUri}/Folder`;
6925
- return this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))).toPromise();
6907
+ return firstValueFrom(this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))));
6926
6908
  }
6927
6909
  deleteFolder(folderId) {
6928
6910
  const svUrl = `${this._serviceUri}/Folder/${folderId}`;
6929
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
6911
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
6930
6912
  }
6931
6913
  deleteMultipleFolder(folderIds) {
6932
6914
  const svUrl = `${this._serviceUri}/Folder/deleteMultipleFolder`;
6933
- return this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err))).toPromise();
6915
+ return firstValueFrom(this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err))));
6934
6916
  }
6935
6917
  renameFolder(folderId, newFolderName) {
6936
6918
  const svUrl = `${this._serviceUri}/Folder/${folderId}/RenameFolder/${newFolderName}`;
6937
- return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))).toPromise();
6919
+ return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
6938
6920
  }
6939
6921
  shareFolder(shareFolder) {
6940
6922
  const svUrl = `${this._serviceUri}/Folder/ShareFolder`;
6941
- return this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))).toPromise();
6923
+ return firstValueFrom(this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))));
6942
6924
  }
6943
6925
  deleteShareFolder(folderId, objectId) {
6944
6926
  const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteShareFolder/${objectId}`;
6945
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
6927
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
6946
6928
  }
6947
6929
  getUploadUrl() {
6948
6930
  return `${this._serviceUri}/FileObject`;
@@ -6955,7 +6937,7 @@ class FileExplorerService {
6955
6937
  }
6956
6938
  getBinaryFileByFileId(fileId) {
6957
6939
  return new Promise((resolve, reject) => {
6958
- this._http.get(this.getFileDownloadUrl(fileId)).toPromise().then(rs => {
6940
+ firstValueFrom(this._http.get(this.getFileDownloadUrl(fileId))).then(rs => {
6959
6941
  console.log(rs);
6960
6942
  resolve(null);
6961
6943
  }).catch(err => reject(err));
@@ -6966,7 +6948,7 @@ class FileExplorerService {
6966
6948
  }
6967
6949
  getFile(fileId) {
6968
6950
  const svUrl = `${this._serviceUri}/FileObject/${fileId}`;
6969
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
6951
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
6970
6952
  }
6971
6953
  async getBase64FromFileId(fileId, isFileVersion = false) {
6972
6954
  const link = await this.generateLinkDownload({
@@ -7008,7 +6990,7 @@ class FileExplorerService {
7008
6990
  if (model.isFileVersion && !model.fileVersionId) {
7009
6991
  model.fileVersionId = model.fileId;
7010
6992
  }
7011
- return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))).toPromise();
6993
+ return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
7012
6994
  }
7013
6995
  downloadFile(fileId, isFileVersion = false, fileName) {
7014
6996
  const model = new GenerateLinkDownloadDTO();
@@ -7028,8 +7010,7 @@ class FileExplorerService {
7028
7010
  * Save file tải từ server với tên được truyền vào, cho phép lưu cả audio, video.
7029
7011
  */
7030
7012
  saveWithFileName(url, fileName) {
7031
- this._http.get(url, { responseType: 'blob' })
7032
- .toPromise()
7013
+ firstValueFrom(this._http.get(url, { responseType: 'blob' }))
7033
7014
  .then(rs => {
7034
7015
  FileSaver.saveAs(rs, fileName);
7035
7016
  })
@@ -7039,7 +7020,7 @@ class FileExplorerService {
7039
7020
  }
7040
7021
  generateLinkDownloadMultiple(model) {
7041
7022
  const svUrl = `${this._serviceUri}/DownloadLink/GenerateDownloadMultipleLink`;
7042
- return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))).toPromise();
7023
+ return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
7043
7024
  }
7044
7025
  downloadFolder(folderId) {
7045
7026
  const model = new GenerateLinkDownloadDTO();
@@ -7050,52 +7031,52 @@ class FileExplorerService {
7050
7031
  });
7051
7032
  }
7052
7033
  getBinaryFile(linkDownload) {
7053
- return this._http.get(linkDownload).toPromise();
7034
+ return firstValueFrom(this._http.get(linkDownload));
7054
7035
  }
7055
7036
  setMoveFileItem(moveFile) {
7056
7037
  const svUrl = `${this._serviceUri}/FileObject/MoveFile`;
7057
- return this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))).toPromise();
7038
+ return firstValueFrom(this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))));
7058
7039
  }
7059
7040
  deleteFile(fileId) {
7060
7041
  const svUrl = `${this._serviceUri}/FileObject/File/${fileId}`;
7061
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
7042
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
7062
7043
  }
7063
7044
  deleteMultipleFile(fileIds) {
7064
7045
  const svUrl = `${this._serviceUri}/FileObject/deleteMultipleFile`;
7065
- return this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err))).toPromise();
7046
+ return firstValueFrom(this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err))));
7066
7047
  }
7067
7048
  renameFile(fileId, newFileName) {
7068
7049
  const svUrl = `${this._serviceUri}/FileObject/${fileId}/RenameFile/${newFileName}`;
7069
- return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))).toPromise();
7050
+ return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
7070
7051
  }
7071
7052
  shareFile(shareFile) {
7072
7053
  const svUrl = `${this._serviceUri}/FileObject/ShareFile`;
7073
- return this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))).toPromise();
7054
+ return firstValueFrom(this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))));
7074
7055
  }
7075
7056
  deleteShareFile(fileId, objectId) {
7076
7057
  const svUrl = `${this._serviceUri}/FileObject/${fileId}/DeleteShareFile/${objectId}`;
7077
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
7058
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
7078
7059
  }
7079
7060
  getSharedFiles(folderId) {
7080
7061
  let svUrl = `${this._serviceUri}/FileObject/GetMySharedFiles`;
7081
7062
  if (folderId) {
7082
7063
  svUrl = `${svUrl}?folderId=${folderId}`;
7083
7064
  }
7084
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
7065
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
7085
7066
  }
7086
7067
  getUserSharingByFile(fileId) {
7087
7068
  let svUrl = `${this._serviceUri}/FileObject/GetUserSharingByFile`;
7088
7069
  if (fileId) {
7089
7070
  svUrl = `${svUrl}?fileId=${fileId}`;
7090
7071
  }
7091
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
7072
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
7092
7073
  }
7093
7074
  getFolderId(userId) {
7094
7075
  let svUrl = `${this._serviceUri}/Folder/GetFolderId`;
7095
7076
  if (userId) {
7096
7077
  svUrl = `${svUrl}?userId=${userId}`;
7097
7078
  }
7098
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
7079
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
7099
7080
  }
7100
7081
  needConvertBeforeSign(fileName) {
7101
7082
  if (fileName.lastIndexOf('.') === -1) {
@@ -7147,12 +7128,12 @@ class FileExplorerService {
7147
7128
  convertToPdf(fileName, fileId, isFileVersion) {
7148
7129
  return new Promise((resolve, reject) => {
7149
7130
  const convertService = `${this._serviceUri}/Convert/ConvertDocumentToPdf`;
7150
- this._http.post(convertService, {
7131
+ firstValueFrom(this._http.post(convertService, {
7151
7132
  fileName,
7152
7133
  fileId,
7153
7134
  isFileVersion,
7154
7135
  outputType: 0
7155
- }, { responseType: 'blob' }).toPromise().then((rs) => {
7136
+ }, { responseType: 'blob' })).then((rs) => {
7156
7137
  const reader = new FileReader();
7157
7138
  reader.addEventListener('load', () => {
7158
7139
  resolve(reader.result);
@@ -7194,16 +7175,16 @@ class FileExplorerService {
7194
7175
  return regex.test(ext);
7195
7176
  }
7196
7177
  saveSignedFile(data) {
7197
- return this._http.post(`${this._serviceUri}/KySoFile/SaveSignedFile`, data).toPromise();
7178
+ return firstValueFrom(this._http.post(`${this._serviceUri}/KySoFile/SaveSignedFile`, data));
7198
7179
  }
7199
7180
  kySimSaveSignedFile(data) {
7200
- return this._http.post(`${this._serviceUri}/KySoFile/KySimSaveSignedFile`, data).toPromise();
7181
+ return firstValueFrom(this._http.post(`${this._serviceUri}/KySoFile/KySimSaveSignedFile`, data));
7201
7182
  }
7202
7183
  getSignatureInfoByFileId(fileId) {
7203
- return this._http.get(`${this._serviceUri}/KySoFile/GetListSignatureByFileId?fileId=${fileId}`).toPromise();
7184
+ return firstValueFrom(this._http.get(`${this._serviceUri}/KySoFile/GetListSignatureByFileId?fileId=${fileId}`));
7204
7185
  }
7205
7186
  getSignatureInfoByFileVersionId(fileVersionId) {
7206
- return this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`).toPromise();
7187
+ return firstValueFrom(this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`));
7207
7188
  }
7208
7189
  getUploadFileVersionApiUrl() {
7209
7190
  return `${this._serviceUri}/FileVersion/SaveVersionOnEdit`;
@@ -7217,8 +7198,8 @@ class FileExplorerService {
7217
7198
  getImageFileBase64(fileId, extension = 'jpg', width = 0, height = 0) {
7218
7199
  return new Promise((resolve, reject) => {
7219
7200
  const url = `${this._serviceUri}/FileObject/getImageFileBase64?fileId=${fileId}&extension=${extension}&width=${width}&height=${height}`;
7220
- this._http.get(url, { responseType: 'blob' })
7221
- .toPromise().then(rs => {
7201
+ firstValueFrom(this._http.get(url, { responseType: 'blob' }))
7202
+ .then(rs => {
7222
7203
  const reader = new FileReader();
7223
7204
  reader.addEventListener('load', () => {
7224
7205
  resolve(reader.result);
@@ -7239,19 +7220,19 @@ class FileExplorerService {
7239
7220
  */
7240
7221
  getSingleServiceFile(serviceRequestModel) {
7241
7222
  const svUrl = `${this._serviceUri}/FileObject/GetSingleServiceFile`;
7242
- return this._http.post(svUrl, serviceRequestModel).pipe(catchError((err) => this.handleError(err))).toPromise();
7223
+ return firstValueFrom(this._http.post(svUrl, serviceRequestModel).pipe(catchError((err) => this.handleError(err))));
7243
7224
  }
7244
7225
  getServiceFileExplorer(serviceCode, entity, entityKey) {
7245
7226
  const svUrl = `${this._serviceUri}/FileObject/GetServiceFileExplorer?serviceCode=${serviceCode}&entity=${entity}&entityKey=${entityKey}`;
7246
- return this._http.get(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
7227
+ return firstValueFrom(this._http.get(svUrl).pipe(catchError((err) => this.handleError(err))));
7247
7228
  }
7248
7229
  createServiceFile(serviceFileObjectDTO) {
7249
7230
  const svUrl = `${this._serviceUri}/FileObject/CreateServiceFile`;
7250
- return this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))).toPromise();
7231
+ return firstValueFrom(this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))));
7251
7232
  }
7252
7233
  createServiceFileAnonymous(serviceFileObjectDTO) {
7253
7234
  const svUrl = `${this._serviceUri}/FileObject/CreateServiceFileAnonymous`;
7254
- return this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))).toPromise();
7235
+ return firstValueFrom(this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))));
7255
7236
  }
7256
7237
  }
7257
7238
  FileExplorerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileExplorerService, deps: [{ token: i1$1.HttpClient }, { token: AuthenService }, { token: CommonService }, { token: EnvironmentService }, { token: NotifierService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -7283,8 +7264,7 @@ class FileV4Service {
7283
7264
  }
7284
7265
  generateLinkDownloadMultiple(model) {
7285
7266
  const svUrl = `${this._serviceUri}/Download/GenerateDownloadMultipleLink`;
7286
- return this._http.post(svUrl, model)
7287
- .toPromise();
7267
+ return firstValueFrom(this._http.post(svUrl, model));
7288
7268
  }
7289
7269
  getAnonymousDownloadUrl(hash) {
7290
7270
  return `${this._serviceUri}/Download/${hash}`;
@@ -7308,12 +7288,10 @@ class FileV4Service {
7308
7288
  if (model.isFileVersion && !model.fileVersionId) {
7309
7289
  model.fileVersionId = model.fileId;
7310
7290
  }
7311
- return this._http.post(svUrl, model)
7312
- .toPromise();
7291
+ return firstValueFrom(this._http.post(svUrl, model));
7313
7292
  }
7314
7293
  saveWithFileName(url, fileName) {
7315
- this._http.get(url, { responseType: 'blob' })
7316
- .toPromise()
7294
+ firstValueFrom(this._http.get(url, { responseType: 'blob' }))
7317
7295
  .then(rs => {
7318
7296
  FileSaver.saveAs(rs, fileName);
7319
7297
  })
@@ -7351,7 +7329,7 @@ class TemplateV4Service extends BaseService {
7351
7329
  }
7352
7330
  fillWordByTemplateCode(templateCode, data, fileName = 'TemplateWord.docx') {
7353
7331
  const url = `${this.serviceUri}/fillWordByTemplateCodeMultiData/${templateCode}`;
7354
- return this._http.post(url, data, { responseType: 'blob' }).toPromise();
7332
+ return firstValueFrom(this._http.post(url, data, { responseType: 'blob' }));
7355
7333
  }
7356
7334
  fillTemplateByCodeAndGetPdf(templateCode, data, onLoadingDataPdf = null, onEndLoadingDataPdf = null) {
7357
7335
  const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=true`;
@@ -7594,9 +7572,8 @@ class TemplateInstanceService {
7594
7572
  exportCxExcelByCode(model) {
7595
7573
  const url = `${this.serviceUri}/ExportCxExcelByCode`;
7596
7574
  this.setFileInfo(model);
7597
- return this._httpClient
7598
- .post(url, model, { responseType: 'blob' })
7599
- .toPromise()
7575
+ return firstValueFrom(this._httpClient
7576
+ .post(url, model, { responseType: 'blob' }))
7600
7577
  .then(res => {
7601
7578
  FileSaver.saveAs(res, this.getFullFileName(model.fileName || model.code));
7602
7579
  }).catch(async (err) => {
@@ -7615,9 +7592,8 @@ class TemplateInstanceService {
7615
7592
  exportManyCxExcelByCode(model) {
7616
7593
  const url = `${this.serviceUri}/ExportManyCxExcelByCode`;
7617
7594
  this.setManyFileInfo(model);
7618
- return this._httpClient
7619
- .post(url, model)
7620
- .toPromise()
7595
+ return firstValueFrom(this._httpClient
7596
+ .post(url, model))
7621
7597
  .then(res => {
7622
7598
  if (res.success) {
7623
7599
  this._fileService.downloadFolder(res.data.folderId);
@@ -7649,9 +7625,8 @@ class TemplateInstanceService {
7649
7625
  */
7650
7626
  exportCxExcel(model) {
7651
7627
  const url = `${this.serviceUri}/ExportCxExcel`;
7652
- return this._httpClient
7653
- .post(url, model, { responseType: 'blob' })
7654
- .toPromise()
7628
+ return firstValueFrom(this._httpClient
7629
+ .post(url, model, { responseType: 'blob' }))
7655
7630
  .then(res => {
7656
7631
  FileSaver.saveAs(res, this.getFullFileName(model.fileName || 'Export'));
7657
7632
  }).catch(async (err) => {
@@ -7673,8 +7648,7 @@ class TemplateInstanceService {
7673
7648
  */
7674
7649
  async ExportCxExcelByCodeWithSignalR(model) {
7675
7650
  const url = `${this.serviceUri}/ExportCxExcelByCodeWithSignalR`;
7676
- return this._httpClient.post(url, model)
7677
- .toPromise();
7651
+ return firstValueFrom(this._httpClient.post(url, model));
7678
7652
  }
7679
7653
  /**
7680
7654
  * Promise xuất file excel không dùng signalR.
@@ -7682,9 +7656,8 @@ class TemplateInstanceService {
7682
7656
  */
7683
7657
  async exportCxExcelByCodePromise(model) {
7684
7658
  const url = `${this.serviceUri}/ExportCxExcelByCode`;
7685
- return this._httpClient
7686
- .post(url, model, { responseType: 'blob' })
7687
- .toPromise();
7659
+ return firstValueFrom(this._httpClient
7660
+ .post(url, model, { responseType: 'blob' }));
7688
7661
  }
7689
7662
  /**
7690
7663
  * Promise xuất file excel không dùng signalR và không dùng template.
@@ -7692,9 +7665,8 @@ class TemplateInstanceService {
7692
7665
  */
7693
7666
  async exportCxExcelPromise(model) {
7694
7667
  const url = `${this.serviceUri}/ExportCxExcel`;
7695
- return this._httpClient
7696
- .post(url, model, { responseType: 'blob' })
7697
- .toPromise();
7668
+ return firstValueFrom(this._httpClient
7669
+ .post(url, model, { responseType: 'blob' }));
7698
7670
  }
7699
7671
  /**
7700
7672
  * Word
@@ -7703,9 +7675,8 @@ class TemplateInstanceService {
7703
7675
  */
7704
7676
  fillTemplateByCodeAndGetPdf(templateCode, data) {
7705
7677
  const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=true`;
7706
- return this._httpClient
7707
- .post(url, data)
7708
- .toPromise().then(res => {
7678
+ return firstValueFrom(this._httpClient
7679
+ .post(url, data)).then(res => {
7709
7680
  if (res.data) {
7710
7681
  this._printService.printBase64Pdf(res.data);
7711
7682
  }
@@ -7718,9 +7689,8 @@ class TemplateInstanceService {
7718
7689
  */
7719
7690
  fillTemplateByCode(templateCode, data, name = 'Export') {
7720
7691
  const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=false`;
7721
- return this._httpClient
7722
- .post(url, data, { responseType: 'blob' })
7723
- .toPromise()
7692
+ return firstValueFrom(this._httpClient
7693
+ .post(url, data, { responseType: 'blob' }))
7724
7694
  .then(res => {
7725
7695
  FileSaver.saveAs(res, this.getFullFileName(name || 'Export', TemplateConstant.WORD_EXTENSION));
7726
7696
  }).catch(async (err) => {
@@ -7730,13 +7700,12 @@ class TemplateInstanceService {
7730
7700
  }
7731
7701
  laTexToBase64Image(laTex, font = 54) {
7732
7702
  const api = `${this.serviceUri}/LatexToBase64`;
7733
- return this._httpClient.post(api, { laTex, font }).toPromise();
7703
+ return firstValueFrom(this._httpClient.post(api, { laTex, font }));
7734
7704
  }
7735
7705
  async _export(model) {
7736
7706
  const url = `${this.serviceUri}/export`;
7737
- return this._httpClient
7738
- .post(url, model)
7739
- .toPromise();
7707
+ return firstValueFrom(this._httpClient
7708
+ .post(url, model));
7740
7709
  }
7741
7710
  /**
7742
7711
  * Export a tree of folders, files using background job.
@@ -7759,9 +7728,8 @@ class TemplateInstanceService {
7759
7728
  }
7760
7729
  async _exportNormal(model) {
7761
7730
  const url = `${this.serviceUri}/exportNormal`;
7762
- return this._httpClient
7763
- .post(url, model)
7764
- .toPromise();
7731
+ return firstValueFrom(this._httpClient
7732
+ .post(url, model));
7765
7733
  }
7766
7734
  /**
7767
7735
  * Export a tree of folders, files directly.
@@ -7846,7 +7814,7 @@ class ComponentBase {
7846
7814
  */
7847
7815
  ngOnDestroy() {
7848
7816
  // Unsubscribe from all subscriptions
7849
- this._unsubscribeAll.next();
7817
+ this._unsubscribeAll.next(1);
7850
7818
  this._unsubscribeAll.complete();
7851
7819
  if (this.model.componentSubs) {
7852
7820
  for (const sub of this.model.componentSubs) {
@@ -9284,8 +9252,8 @@ class UserService extends BaseService {
9284
9252
  }
9285
9253
  getForAutoComplete(key) {
9286
9254
  const apiUrl = `${this.serviceUri}/GetForAutoComplete?key=${key}`;
9287
- return this._http.get(apiUrl)
9288
- .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))).toPromise();
9255
+ return firstValueFrom(this._http.get(apiUrl)
9256
+ .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
9289
9257
  }
9290
9258
  populateCurrentUser() {
9291
9259
  const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
@@ -9393,7 +9361,7 @@ class UserService extends BaseService {
9393
9361
  }
9394
9362
  getStaffInfo(userId) {
9395
9363
  const url = `${this.serviceUri}/${userId}`;
9396
- return this._http.get(url)
9364
+ return firstValueFrom(this._http.get(url)
9397
9365
  .pipe(catchError((err) => this.handleError(err, this._injector)), map(rs => {
9398
9366
  const op = {
9399
9367
  fullName: rs.data ? rs.data.fullName : '',
@@ -9412,8 +9380,7 @@ class UserService extends BaseService {
9412
9380
  }
9413
9381
  }
9414
9382
  return op;
9415
- }))
9416
- .toPromise();
9383
+ })));
9417
9384
  }
9418
9385
  getId() {
9419
9386
  const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
@@ -9437,10 +9404,9 @@ class UserService extends BaseService {
9437
9404
  }
9438
9405
  registerOnline(formData) {
9439
9406
  const apiUrl = `${this.serviceUri}/registerOnline`;
9440
- return this._http
9407
+ return firstValueFrom(this._http
9441
9408
  .post(apiUrl, formData)
9442
- .pipe(catchError(err => this.handleError(err, this._injector)))
9443
- .toPromise();
9409
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9444
9410
  }
9445
9411
  getBasicUserInfo(userId) {
9446
9412
  const storageItem = localStorage.getItem(this.USER_INFO_KEY + '_' + userId);
@@ -9459,11 +9425,11 @@ class UserService extends BaseService {
9459
9425
  if (userId > 0) {
9460
9426
  const svUrl = `${this.serviceUri}/GetBasicUserInfo?id=${userId}`;
9461
9427
  try {
9462
- const result = await this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
9428
+ const result = await firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
9463
9429
  // save response to local storage here
9464
9430
  localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.id, JSON.stringify(repsonse.data));
9465
9431
  return repsonse.data;
9466
- }, catchError((err) => this.handleError(err, this._injector)))).toPromise();
9432
+ }, catchError((err) => this.handleError(err, this._injector)))));
9467
9433
  resolve(result);
9468
9434
  }
9469
9435
  catch {
@@ -9490,7 +9456,7 @@ class UserService extends BaseService {
9490
9456
  else {
9491
9457
  return new Promise((resolve, reject) => {
9492
9458
  const svUrl = `${this.serviceUri}/GetBasicUsersInfo?userIds=${userIds}`;
9493
- this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data)).toPromise().then(success => {
9459
+ firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
9494
9460
  resolve(success);
9495
9461
  }).catch(err => {
9496
9462
  resolve([]);
@@ -9518,11 +9484,11 @@ class UserService extends BaseService {
9518
9484
  else {
9519
9485
  if (userName != '') {
9520
9486
  const svUrl = `${this.serviceUri}/GetBasicUserInfoByUserName?userName=${userName}`;
9521
- this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
9487
+ firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
9522
9488
  // save response to local storage here
9523
9489
  localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.userName, JSON.stringify(repsonse.data));
9524
9490
  return repsonse.data;
9525
- }, catchError((err) => this.handleError(err, this._injector)))).toPromise().then(rss => {
9491
+ }, catchError((err) => this.handleError(err, this._injector))))).then(rss => {
9526
9492
  resolve(rss);
9527
9493
  }).catch(errr => {
9528
9494
  resolve({});
@@ -9547,13 +9513,13 @@ class UserService extends BaseService {
9547
9513
  }
9548
9514
  else {
9549
9515
  const svUrl = `${this.serviceUri}/GetBasicUsersInfoByUserNames?userNames=${userNames}`;
9550
- return await this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => {
9516
+ return await firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => {
9551
9517
  localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.map(x => {
9552
9518
  if (x.userName)
9553
9519
  return x.userName;
9554
9520
  }), JSON.stringify(repsonse.data));
9555
9521
  return repsonse.data;
9556
- })).toPromise().catch(err => []);
9522
+ }))).catch(err => []);
9557
9523
  }
9558
9524
  }
9559
9525
  convertListUserIdToString(userIds) {
@@ -9574,23 +9540,20 @@ class UserService extends BaseService {
9574
9540
  return dataSource;
9575
9541
  }
9576
9542
  restorePassword(item) {
9577
- return this._http.put(`${this.serviceUri}/restorePassword`, item)
9578
- .pipe(catchError(err => this.handleError(err, this._injector)))
9579
- .toPromise();
9543
+ return firstValueFrom(this._http.put(`${this.serviceUri}/restorePassword`, item)
9544
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9580
9545
  }
9581
9546
  changePassword(userId, item) {
9582
9547
  const apiUrl = `${this.serviceUri}/ChangePassword`;
9583
- return this._http
9548
+ return firstValueFrom(this._http
9584
9549
  .post(apiUrl, item)
9585
- .pipe(catchError(err => this.handleError(err, this._injector)))
9586
- .toPromise();
9550
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9587
9551
  }
9588
9552
  resetPassword(item) {
9589
9553
  const apiUrl = `${this.serviceUri}/resetPassword`;
9590
- return this._http
9554
+ return firstValueFrom(this._http
9591
9555
  .put(apiUrl, item)
9592
- .pipe(catchError(err => this.handleError(err, this._injector)))
9593
- .toPromise();
9556
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9594
9557
  }
9595
9558
  GetsByManagerIdArrayId(id) {
9596
9559
  const apiUrl = `${this.serviceUri}/GetLowerStaffsByUserId?userId=${id}`;
@@ -9598,17 +9561,15 @@ class UserService extends BaseService {
9598
9561
  }
9599
9562
  markAsAdmin(userId, isAdmin) {
9600
9563
  const url = `${this.serviceUri}/markAsAdmin/${userId}/${isAdmin}`;
9601
- return this._http
9564
+ return firstValueFrom(this._http
9602
9565
  .put(url, isAdmin)
9603
- .pipe(catchError(err => this.handleError(err, this._injector)))
9604
- .toPromise();
9566
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9605
9567
  }
9606
9568
  markAsRepresent(userId, isRepresent) {
9607
9569
  const url = `${this.serviceUri}/markAsRepresent/${userId}/${isRepresent}`;
9608
- return this._http
9570
+ return firstValueFrom(this._http
9609
9571
  .put(url, isRepresent)
9610
- .pipe(catchError(err => this.handleError(err, this._injector)))
9611
- .toPromise();
9572
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9612
9573
  }
9613
9574
  getsByOrganizationListId(pageOption, funGetName = '', optionParameter = '', defaultParameter = '') {
9614
9575
  let queryString = `?key=${pageOption.query}`;
@@ -9664,17 +9625,15 @@ class UserService extends BaseService {
9664
9625
  }
9665
9626
  lockUser(item) {
9666
9627
  const apiUrl = `${this.serviceUri}/lockUserAccount`;
9667
- return this._http
9628
+ return firstValueFrom(this._http
9668
9629
  .post(apiUrl, item)
9669
- .pipe(catchError(err => this.handleError(err, this._injector)))
9670
- .toPromise();
9630
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9671
9631
  }
9672
9632
  unlockUser(item) {
9673
9633
  const apiUrl = `${this.serviceUri}/unlockUserAccount`;
9674
- return this._http
9634
+ return firstValueFrom(this._http
9675
9635
  .post(apiUrl, item)
9676
- .pipe(catchError(err => this.handleError(err, this._injector)))
9677
- .toPromise();
9636
+ .pipe(catchError(err => this.handleError(err, this._injector))));
9678
9637
  }
9679
9638
  isSuperUser() {
9680
9639
  return this._applicationContext.getRootContext().data.currentUser
@@ -9689,8 +9648,8 @@ class UserService extends BaseService {
9689
9648
  }
9690
9649
  getUsersByGroupCode(groupCode) {
9691
9650
  const apiUrl = `${this.serviceUri}/GetUsersByGroupCode?groupCode=${groupCode}`;
9692
- return this._http.get(apiUrl)
9693
- .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))).toPromise();
9651
+ return firstValueFrom(this._http.get(apiUrl)
9652
+ .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
9694
9653
  }
9695
9654
  getServiceEndpoint() {
9696
9655
  return `${this.serviceUri}`;
@@ -9736,7 +9695,7 @@ class UserService extends BaseService {
9736
9695
  sorts: [],
9737
9696
  filters: filters
9738
9697
  });
9739
- this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data)).toPromise().then(success => {
9698
+ firstValueFrom(this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
9740
9699
  resolve(success);
9741
9700
  }).catch(err => {
9742
9701
  resolve([]);
@@ -9802,11 +9761,11 @@ class OrganizationService extends BaseService {
9802
9761
  else {
9803
9762
  if (organizationId > 0) {
9804
9763
  const svUrl = `${this.serviceUri}/GetOrganizationInfo?id=${organizationId}`;
9805
- const result = await this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
9764
+ const result = await firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
9806
9765
  // save response to local storage here
9807
9766
  localStorage.setItem(this.ORGANIZATION_INFO_KEY + '_' + repsonse.data.id, JSON.stringify(repsonse.data));
9808
9767
  return repsonse.data;
9809
- }, catchError((err) => this.handleError(err, this._injector)))).toPromise();
9768
+ }, catchError((err) => this.handleError(err, this._injector)))));
9810
9769
  resolve(result);
9811
9770
  }
9812
9771
  }
@@ -9826,29 +9785,27 @@ class OrganizationService extends BaseService {
9826
9785
  if (parentId) {
9827
9786
  svUrl += `&parentId=${parentId}`;
9828
9787
  }
9829
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
9788
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
9830
9789
  }
9831
9790
  getById(id) {
9832
9791
  const svUrl = `${this.serviceUri}/${id}`;
9833
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))).toPromise();
9792
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
9834
9793
  }
9835
9794
  getOrganizationTree(organizationCode) {
9836
9795
  let apiUrl = `${this.serviceUri}/GetTree`;
9837
9796
  if (organizationCode) {
9838
9797
  apiUrl = `${apiUrl}?organizationCode=${organizationCode}`;
9839
9798
  }
9840
- return this._http.get(apiUrl)
9841
- .pipe(catchError((err) => this.handleError(err, this._injector)))
9842
- .toPromise();
9799
+ return firstValueFrom(this._http.get(apiUrl)
9800
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
9843
9801
  }
9844
9802
  getMyTree(organizationCode) {
9845
9803
  let apiUrl = `${this.serviceUri}/GetMyTree`;
9846
9804
  if (organizationCode) {
9847
9805
  apiUrl = `${apiUrl}?organizationCode=${organizationCode}`;
9848
9806
  }
9849
- return this._http.get(apiUrl)
9850
- .pipe(catchError((err) => this.handleError(err, this._injector)))
9851
- .toPromise();
9807
+ return firstValueFrom(this._http.get(apiUrl)
9808
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
9852
9809
  }
9853
9810
  getOrganizationTreeTable(isIgnoreClientCache = false) {
9854
9811
  const apiUrl = `${this.serviceUri}/GetTreeTable`;
@@ -9862,27 +9819,23 @@ class OrganizationService extends BaseService {
9862
9819
  if (organizationCode) {
9863
9820
  apiUrl = `${apiUrl}?parentCode=${organizationCode}`;
9864
9821
  }
9865
- return this._http.get(apiUrl)
9866
- .pipe(catchError((err) => this.handleError(err, this._injector)))
9867
- .toPromise();
9822
+ return firstValueFrom(this._http.get(apiUrl)
9823
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
9868
9824
  }
9869
9825
  getManagerByOrgCode(organizationCode) {
9870
9826
  const apiUrl = `${this.serviceUri}/GetManagerByOrgCode/${organizationCode}`;
9871
- return this._http.get(apiUrl)
9872
- .pipe(catchError((err) => this.handleError(err, this._injector)))
9873
- .toPromise();
9827
+ return firstValueFrom(this._http.get(apiUrl)
9828
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
9874
9829
  }
9875
9830
  getManagerByOrgId(organizationId) {
9876
9831
  const apiUrl = `${this.serviceUri}/GetManagerByOrgId/${organizationId}`;
9877
- return this._http.get(apiUrl)
9878
- .pipe(catchError((err) => this.handleError(err, this._injector)))
9879
- .toPromise();
9832
+ return firstValueFrom(this._http.get(apiUrl)
9833
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
9880
9834
  }
9881
9835
  getOrganizationByParentId(parentId) {
9882
9836
  const apiUrl = `${this.serviceUri}/GetByParentId?parentId=${parentId}`;
9883
- return this._http.get(apiUrl)
9884
- .pipe(catchError((err) => this.handleError(err, this._injector)))
9885
- .toPromise();
9837
+ return firstValueFrom(this._http.get(apiUrl)
9838
+ .pipe(catchError((err) => this.handleError(err, this._injector))));
9886
9839
  }
9887
9840
  }
9888
9841
  OrganizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: OrganizationService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -11052,8 +11005,8 @@ class EntityPickerService extends BaseService {
11052
11005
  return this.defaultGet(apiUrl);
11053
11006
  }
11054
11007
  getPaged(gridInfo, endpoint) {
11055
- return this._http.post(endpoint, gridInfo)
11056
- .pipe(catchError(err => this.handleError(err, this._injector))).toPromise();
11008
+ return firstValueFrom(this._http.post(endpoint, gridInfo)
11009
+ .pipe(catchError(err => this.handleError(err, this._injector))));
11057
11010
  }
11058
11011
  getTeacherFullPickerTemplate(control) {
11059
11012
  // TODO: Upgrade later
@@ -11994,7 +11947,7 @@ class CustomRouterService {
11994
11947
  getLatestFragment() {
11995
11948
  return new Promise((resolve) => {
11996
11949
  if (this._unsubscribeAll) {
11997
- this._unsubscribeAll.next();
11950
+ this._unsubscribeAll.next(1);
11998
11951
  this._unsubscribeAll.complete();
11999
11952
  }
12000
11953
  this._activatedRoute.fragment
@@ -12007,7 +11960,7 @@ class CustomRouterService {
12007
11960
  });
12008
11961
  }
12009
11962
  destroy() {
12010
- this._unsubscribeAll.next();
11963
+ this._unsubscribeAll.next(1);
12011
11964
  this._unsubscribeAll.complete();
12012
11965
  }
12013
11966
  getFragmentObject() {
@@ -12172,9 +12125,8 @@ class CustomRouterService {
12172
12125
  }
12173
12126
  tryParse(v) {
12174
12127
  let n = null;
12175
- if (v === null || v === undefined) {
12128
+ if (v === null || v === undefined)
12176
12129
  return null;
12177
- }
12178
12130
  if (v.indexOf('-') > 0) {
12179
12131
  if (v.indexOf('T') > 0) {
12180
12132
  n = new Date(v);
@@ -15313,7 +15265,7 @@ NumberPickerRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
15313
15265
  useExisting: forwardRef(() => NumberPickerRangeComponent),
15314
15266
  multi: true
15315
15267
  }
15316
- ], ngImport: i0, template: "<div class=\"tn-number-picker-range\">\r\n <input type=\"text\" [placeholder]=\"'T\u1EEB'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[0]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 0)\" />\r\n <span>-</span>\r\n <input type=\"text\" [placeholder]=\"'\u0110\u1EBFn'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[1]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 1)\" />\r\n</div>", styles: [".tn-number-picker-range{display:flex}.tn-number-picker-range>span{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .tn-number-picker-range .p-inputtext{flex:0 0 calc(50% - 8px);width:calc(50% - 8px)}\n"], dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime"] }] });
15268
+ ], ngImport: i0, template: "<div class=\"tn-number-picker-range\">\r\n <input type=\"text\" [placeholder]=\"'T\u1EEB'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[0]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 0)\" />\r\n <span>-</span>\r\n <input type=\"text\" [placeholder]=\"'\u0110\u1EBFn'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[1]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 1)\" />\r\n</div>", styles: [".tn-number-picker-range{display:flex}.tn-number-picker-range>span{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .tn-number-picker-range .p-inputtext{flex:0 0 calc(50% - 8px);width:calc(50% - 8px)}\n"], dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] });
15317
15269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NumberPickerRangeComponent, decorators: [{
15318
15270
  type: Component,
15319
15271
  args: [{ selector: 'tn-number-picker-range', providers: [
@@ -15453,7 +15405,7 @@ MaskComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
15453
15405
  multi: true
15454
15406
  },
15455
15407
  DecimalPipe
15456
- ], ngImport: i0, template: "<ng-container *ngIf=\"viewMode\">\r\n <div class=\"tn-mask-viewMode\">\r\n <span *ngIf=\"prefix\">{{prefix}}</span>\r\n <span>{{model}}</span> \r\n <span *ngIf=\"suffix\">({{suffix}})</span>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"!viewMode\">\r\n <div class=\"p-inputgroup\">\r\n <span *ngIf=\"prefix\" class=\"p-inputgroup-addon\">{{prefix}}</span>\r\n <input type=\"text\" pInputText [placeholder]=\"_placeholder\" [attr.disabled]=\"disabled ? true : null\"\r\n [mask]=\"getMaskByType(maskType)\" [thousandSeparator]=\"getThousandSeperator()\" [class]=\"inputStyleClass\"\r\n [(ngModel)]=\"model\" (focus)=\"handleFocus()\" (blur)=\"handleBlur()\" (change)=\"handleChangedValue()\" />\r\n <span *ngIf=\"suffix\" class=\"p-inputgroup-addon\">({{suffix}})</span>\r\n </div>\r\n</ng-container>", styles: [".tn-mask-viewMode>span{margin-right:3px}.tn-mask-viewMode>span:last-child{margin-right:0}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime"] }] });
15408
+ ], ngImport: i0, template: "<ng-container *ngIf=\"viewMode\">\r\n <div class=\"tn-mask-viewMode\">\r\n <span *ngIf=\"prefix\">{{prefix}}</span>\r\n <span>{{model}}</span> \r\n <span *ngIf=\"suffix\">({{suffix}})</span>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"!viewMode\">\r\n <div class=\"p-inputgroup\">\r\n <span *ngIf=\"prefix\" class=\"p-inputgroup-addon\">{{prefix}}</span>\r\n <input type=\"text\" pInputText [placeholder]=\"_placeholder\" [attr.disabled]=\"disabled ? true : null\"\r\n [mask]=\"getMaskByType(maskType)\" [thousandSeparator]=\"getThousandSeperator()\" [class]=\"inputStyleClass\"\r\n [(ngModel)]=\"model\" (focus)=\"handleFocus()\" (blur)=\"handleBlur()\" (change)=\"handleChangedValue()\" />\r\n <span *ngIf=\"suffix\" class=\"p-inputgroup-addon\">({{suffix}})</span>\r\n </div>\r\n</ng-container>", styles: [".tn-mask-viewMode>span{margin-right:3px}.tn-mask-viewMode>span:last-child{margin-right:0}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] });
15457
15409
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MaskComponent, decorators: [{
15458
15410
  type: Component,
15459
15411
  args: [{ selector: 'tn-mask', providers: [
@@ -19388,7 +19340,7 @@ class DropdownService {
19388
19340
  this._httpClient = _httpClient;
19389
19341
  }
19390
19342
  getDataSource(serviceUri) {
19391
- return this._httpClient.get(serviceUri).toPromise();
19343
+ return firstValueFrom(this._httpClient.get(serviceUri));
19392
19344
  }
19393
19345
  getPostDataSource(serviceUri, filters, options) {
19394
19346
  return this.getDataDropdownByFilter(serviceUri, filters, options);
@@ -19397,9 +19349,8 @@ class DropdownService {
19397
19349
  let apiUrl = serviceUri;
19398
19350
  if (plusUrl != null && plusUrl != '')
19399
19351
  apiUrl += "/" + plusUrl;
19400
- return this._httpClient
19401
- .post(apiUrl, gridInfo)
19402
- .toPromise();
19352
+ return firstValueFrom(this._httpClient
19353
+ .post(apiUrl, gridInfo));
19403
19354
  }
19404
19355
  setDefaultValue(options) {
19405
19356
  if (options.fieldPlus.length > 0 && !options.fieldPlus.startsWith(','))
@@ -20891,7 +20842,7 @@ class TemplateService {
20891
20842
  }
20892
20843
  laTexToBase64Image(laTex, font = 54) {
20893
20844
  const api = `${this.serviceUri}/LatexToBase64`;
20894
- return this._httpClient.post(api, { laTex, font }).toPromise();
20845
+ return firstValueFrom(this._httpClient.post(api, { laTex, font }));
20895
20846
  }
20896
20847
  /**
20897
20848
  * Description: Xuất file sử dụng thư viện CX, xuất xong tự động mở popup để lưu file.
@@ -20899,9 +20850,8 @@ class TemplateService {
20899
20850
  exportCxExcelByCode(model) {
20900
20851
  const url = `${this.serviceUri}/ExportCxExcelByCode`;
20901
20852
  this.setFileInfo(model);
20902
- return this._httpClient
20903
- .post(url, model, { responseType: 'blob' })
20904
- .toPromise()
20853
+ return firstValueFrom(this._httpClient
20854
+ .post(url, model, { responseType: 'blob' }))
20905
20855
  .then(res => {
20906
20856
  FileSaver.saveAs(res, this.getFullFileName(model.fileName || model.code));
20907
20857
  }).catch(async (err) => {
@@ -20912,9 +20862,8 @@ class TemplateService {
20912
20862
  exportManyCxExcelByCode(model) {
20913
20863
  const url = `${this.serviceUri}/ExportManyCxExcelByCode`;
20914
20864
  this.setManyFileInfo(model);
20915
- return this._httpClient
20916
- .post(url, model)
20917
- .toPromise()
20865
+ return firstValueFrom(this._httpClient
20866
+ .post(url, model))
20918
20867
  .then(res => {
20919
20868
  if (res.success) {
20920
20869
  this._fileService.downloadFolder(res.data.folderId);
@@ -20940,8 +20889,7 @@ class TemplateService {
20940
20889
  */
20941
20890
  async ExportCxExcelByCodeWithSignalR(model) {
20942
20891
  const url = `${this.serviceUri}/ExportCxExcelByCodeWithSignalR`;
20943
- return this._httpClient.post(url, model)
20944
- .toPromise();
20892
+ return firstValueFrom(this._httpClient.post(url, model));
20945
20893
  }
20946
20894
  /**
20947
20895
  * Description: Export sử dung ClosedXml.Report (Cx) với HighPerformanceService, sử dụng cho file dữ liệu lớn.
@@ -20954,20 +20902,17 @@ class TemplateService {
20954
20902
  */
20955
20903
  async ExportCxExcelByCodeWithHPS(model) {
20956
20904
  const url = `${this.serviceUri}/ExportWithHighPerformanceService`;
20957
- return this._httpClient.post(url, model)
20958
- .toPromise();
20905
+ return firstValueFrom(this._httpClient.post(url, model));
20959
20906
  }
20960
20907
  async exportCxExcelByCodePromise(model) {
20961
20908
  const url = `${this.serviceUri}/ExportCxExcelByCode`;
20962
- return this._httpClient
20963
- .post(url, model, { responseType: 'blob' })
20964
- .toPromise();
20909
+ return firstValueFrom(this._httpClient
20910
+ .post(url, model, { responseType: 'blob' }));
20965
20911
  }
20966
20912
  fillTemplateByCodeAndGetPdf(templateCode, data, onLoadingDataPdf = null, onEndLoadingDataPdf = null) {
20967
20913
  const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=true`;
20968
- return this._httpClient
20969
- .post(url, data)
20970
- .toPromise().then(res => {
20914
+ return firstValueFrom(this._httpClient
20915
+ .post(url, data)).then(res => {
20971
20916
  if (res.data) {
20972
20917
  this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
20973
20918
  }
@@ -20975,9 +20920,8 @@ class TemplateService {
20975
20920
  }
20976
20921
  fillWordByTemplateCodeMultiData(templateCode, data, onLoadingDataPdf = null, onEndLoadingDataPdf = null) {
20977
20922
  const url = `${this.serviceUri}/fillWordByTemplateCodeMultiData/${templateCode}?isPrint=true`;
20978
- return this._httpClient
20979
- .post(url, data)
20980
- .toPromise().then(res => {
20923
+ return firstValueFrom(this._httpClient
20924
+ .post(url, data)).then(res => {
20981
20925
  if (res.data) {
20982
20926
  this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
20983
20927
  }
@@ -21002,9 +20946,8 @@ class TemplateService {
21002
20946
  */
21003
20947
  exportCxExcel(model) {
21004
20948
  const url = `${this.serviceUri}/ExportCxExcel`;
21005
- return this._httpClient
21006
- .post(url, model, { responseType: 'blob' })
21007
- .toPromise()
20949
+ return firstValueFrom(this._httpClient
20950
+ .post(url, model, { responseType: 'blob' }))
21008
20951
  .then(res => {
21009
20952
  FileSaver.saveAs(res, this.getFullFileName(model.fileName || 'Export'));
21010
20953
  }).catch(async (err) => {
@@ -21014,9 +20957,8 @@ class TemplateService {
21014
20957
  }
21015
20958
  async exportCxExcelPromise(model) {
21016
20959
  const url = `${this.serviceUri}/ExportCxExcel`;
21017
- return this._httpClient
21018
- .post(url, model, { responseType: 'blob' })
21019
- .toPromise();
20960
+ return firstValueFrom(this._httpClient
20961
+ .post(url, model, { responseType: 'blob' }));
21020
20962
  }
21021
20963
  }
21022
20964
  TemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: TemplateService, deps: [{ token: EnvironmentService }, { token: i1$1.HttpClient }, { token: PrintService }, { token: FileExplorerService }, { token: NotifierService }, { token: CrudService }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -21435,7 +21377,7 @@ class TnTinymceComponent extends ComponentBase {
21435
21377
  return content;
21436
21378
  }
21437
21379
  handleBlur() {
21438
- this.onBlur.next();
21380
+ this.onBlur.next(1);
21439
21381
  }
21440
21382
  onKeyDown(e, topic) {
21441
21383
  this.keydown.next({ event: e, topic });
@@ -21875,8 +21817,8 @@ class UserV5Service extends BaseService {
21875
21817
  }
21876
21818
  getForAutoComplete(key) {
21877
21819
  const apiUrl = `${this.serviceUri}/GetForAutoComplete?key=${key}`;
21878
- return this._http.get(apiUrl)
21879
- .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))).toPromise();
21820
+ return firstValueFrom(this._http.get(apiUrl)
21821
+ .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
21880
21822
  }
21881
21823
  populateCurrentUser() {
21882
21824
  const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
@@ -21954,7 +21896,7 @@ class UserV5Service extends BaseService {
21954
21896
  }
21955
21897
  getStaffInfo(userId) {
21956
21898
  const url = `${this.serviceUri}/${userId}`;
21957
- return this._http.get(url)
21899
+ return firstValueFrom(this._http.get(url)
21958
21900
  .pipe(catchError((err) => this.handleError(err, this._injector)), map(rs => {
21959
21901
  const op = {
21960
21902
  fullName: rs.data ? rs.data.fullName : '',
@@ -21973,8 +21915,7 @@ class UserV5Service extends BaseService {
21973
21915
  }
21974
21916
  }
21975
21917
  return op;
21976
- }))
21977
- .toPromise();
21918
+ })));
21978
21919
  }
21979
21920
  getId() {
21980
21921
  const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
@@ -22001,10 +21942,9 @@ class UserV5Service extends BaseService {
22001
21942
  }
22002
21943
  registerOnline(formData) {
22003
21944
  const apiUrl = `${this.serviceUri}/registerOnline`;
22004
- return this._http
21945
+ return firstValueFrom(this._http
22005
21946
  .post(apiUrl, formData)
22006
- .pipe(catchError(err => this.handleError(err, this._injector)))
22007
- .toPromise();
21947
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22008
21948
  }
22009
21949
  getBasicUserInfo(userId) {
22010
21950
  const storageItem = localStorage.getItem(this.USER_INFO_KEY + '_' + userId);
@@ -22023,11 +21963,11 @@ class UserV5Service extends BaseService {
22023
21963
  if (userId > 0) {
22024
21964
  const svUrl = `${this.serviceUri}/GetBasicUserInfo?id=${userId}`;
22025
21965
  try {
22026
- const result = await this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
21966
+ const result = await firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
22027
21967
  // save response to local storage here
22028
21968
  localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.id, JSON.stringify(repsonse.data));
22029
21969
  return repsonse.data;
22030
- }, catchError((err) => this.handleError(err, this._injector)))).toPromise();
21970
+ }, catchError((err) => this.handleError(err, this._injector)))));
22031
21971
  resolve(result);
22032
21972
  }
22033
21973
  catch {
@@ -22054,7 +21994,7 @@ class UserV5Service extends BaseService {
22054
21994
  else {
22055
21995
  return new Promise((resolve, reject) => {
22056
21996
  const svUrl = `${this.serviceUri}/GetBasicUsersInfo?userIds=${userIds}`;
22057
- this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data)).toPromise().then(success => {
21997
+ firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
22058
21998
  resolve(success);
22059
21999
  }).catch(err => {
22060
22000
  resolve([]);
@@ -22076,11 +22016,11 @@ class UserV5Service extends BaseService {
22076
22016
  else {
22077
22017
  if (userName != '') {
22078
22018
  const svUrl = `${this.serviceUri}/GetBasicUserInfoByUserName?userName=${userName}`;
22079
- this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
22019
+ firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
22080
22020
  // save response to local storage here
22081
22021
  localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.userName, JSON.stringify(repsonse.data));
22082
22022
  return repsonse.data;
22083
- }, catchError((err) => this.handleError(err, this._injector)))).toPromise().then(rss => {
22023
+ }, catchError((err) => this.handleError(err, this._injector))))).then(rss => {
22084
22024
  resolve(rss);
22085
22025
  }).catch(errr => {
22086
22026
  resolve({});
@@ -22100,7 +22040,7 @@ class UserV5Service extends BaseService {
22100
22040
  else {
22101
22041
  return new Promise((resolve, reject) => {
22102
22042
  const svUrl = `${this.serviceUri}/GetBasicUsersInfoByUserName?userNames=${userNames}`;
22103
- this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data)).toPromise().then(success => {
22043
+ firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
22104
22044
  resolve(success);
22105
22045
  }).catch(err => {
22106
22046
  resolve([]);
@@ -22126,23 +22066,20 @@ class UserV5Service extends BaseService {
22126
22066
  return dataSource;
22127
22067
  }
22128
22068
  restorePassword(item) {
22129
- return this._http.put(`${this.serviceUri}/restorePassword`, item)
22130
- .pipe(catchError(err => this.handleError(err, this._injector)))
22131
- .toPromise();
22069
+ return firstValueFrom(this._http.put(`${this.serviceUri}/restorePassword`, item)
22070
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22132
22071
  }
22133
22072
  changePassword(userId, item) {
22134
22073
  const apiUrl = `${this.serviceUri}/ChangePassword`;
22135
- return this._http
22074
+ return firstValueFrom(this._http
22136
22075
  .post(apiUrl, item)
22137
- .pipe(catchError(err => this.handleError(err, this._injector)))
22138
- .toPromise();
22076
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22139
22077
  }
22140
22078
  resetPassword(item) {
22141
22079
  const apiUrl = `${this.serviceUri}/resetPassword`;
22142
- return this._http
22080
+ return firstValueFrom(this._http
22143
22081
  .put(apiUrl, item)
22144
- .pipe(catchError(err => this.handleError(err, this._injector)))
22145
- .toPromise();
22082
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22146
22083
  }
22147
22084
  resetPasswordAll() {
22148
22085
  return this.defaultPost(`${this.serviceUri}/ResetPasswordAll`, {});
@@ -22158,17 +22095,15 @@ class UserV5Service extends BaseService {
22158
22095
  }
22159
22096
  markAsAdmin(userId, isAdmin) {
22160
22097
  const url = `${this.serviceUri}/markAsAdmin/${userId}/${isAdmin}`;
22161
- return this._http
22098
+ return firstValueFrom(this._http
22162
22099
  .put(url, isAdmin)
22163
- .pipe(catchError(err => this.handleError(err, this._injector)))
22164
- .toPromise();
22100
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22165
22101
  }
22166
22102
  markAsRepresent(userId, isRepresent) {
22167
22103
  const url = `${this.serviceUri}/markAsRepresent/${userId}/${isRepresent}`;
22168
- return this._http
22104
+ return firstValueFrom(this._http
22169
22105
  .put(url, isRepresent)
22170
- .pipe(catchError(err => this.handleError(err, this._injector)))
22171
- .toPromise();
22106
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22172
22107
  }
22173
22108
  getsByOrganizationListId(pageOption, funGetName = '', optionParameter = '', defaultParameter = '') {
22174
22109
  let queryString = `?key=${pageOption.query}`;
@@ -22224,17 +22159,15 @@ class UserV5Service extends BaseService {
22224
22159
  }
22225
22160
  lockUser(item) {
22226
22161
  const apiUrl = `${this.serviceUri}/lockUserAccount`;
22227
- return this._http
22162
+ return firstValueFrom(this._http
22228
22163
  .post(apiUrl, item)
22229
- .pipe(catchError(err => this.handleError(err, this._injector)))
22230
- .toPromise();
22164
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22231
22165
  }
22232
22166
  unlockUser(item) {
22233
22167
  const apiUrl = `${this.serviceUri}/unlockUserAccount`;
22234
- return this._http
22168
+ return firstValueFrom(this._http
22235
22169
  .post(apiUrl, item)
22236
- .pipe(catchError(err => this.handleError(err, this._injector)))
22237
- .toPromise();
22170
+ .pipe(catchError(err => this.handleError(err, this._injector))));
22238
22171
  }
22239
22172
  isSuperUser() {
22240
22173
  return this._applicationContext.getRootContext().data.currentUser
@@ -22249,8 +22182,8 @@ class UserV5Service extends BaseService {
22249
22182
  }
22250
22183
  getUsersByGroupCode(groupCode) {
22251
22184
  const apiUrl = `${this.serviceUri}/GetUsersByGroupCode?groupCode=${groupCode}`;
22252
- return this._http.get(apiUrl)
22253
- .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))).toPromise();
22185
+ return firstValueFrom(this._http.get(apiUrl)
22186
+ .pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
22254
22187
  }
22255
22188
  getServiceEndpoint() {
22256
22189
  return `${this.serviceUri}`;
@@ -22296,7 +22229,7 @@ class UserV5Service extends BaseService {
22296
22229
  sorts: [],
22297
22230
  filters: filters
22298
22231
  });
22299
- this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data)).toPromise().then(success => {
22232
+ firstValueFrom(this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
22300
22233
  resolve(success);
22301
22234
  }).catch(err => {
22302
22235
  resolve([]);
@@ -22477,7 +22410,7 @@ class UserPickerBoxComponent extends ComponentBase {
22477
22410
  }
22478
22411
  }
22479
22412
  UserPickerBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UserPickerBoxComponent, deps: [{ token: UserV5Service }, { token: i0.Injector }, { token: OrganizationService }], target: i0.ɵɵFactoryTarget.Component });
22480
- UserPickerBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: UserPickerBoxComponent, selector: "user-picker-box", inputs: { multiple: "multiple", disabled: "disabled", enableCaching: "enableCaching", controlSetting: "controlSetting", parentSetting: "parentSetting", advanceData: "advanceData", control: "control", width: "width", height: "height", selectedValue: "selectedValue", readOnlyValues: "readOnlyValues" }, outputs: { onRowSelect: "onRowSelect", onChanged: "onChanged", onSelect: "onSelect", onUnSelect: "onUnSelect", onDone: "onDone" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "entityPickerBox", first: true, predicate: ["entityPickerBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"0\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\r\n (onChanged)=\"handleChangedEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\r\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleDone($event)\"\r\n (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n </as-split-area>\r\n </as-split>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>", styles: [".action-btn{border:1px solid #0a89bf;color:#0a89bf;background-color:#fff;font-size:16px;width:40px;cursor:pointer;text-align:center;margin:4px 2px}.content-all{display:flex;flex-direction:column}.content-top{padding:5px 0;overflow:hidden;flex-grow:1}.content-bottom{border-top:1px solid #ddd;padding:5px 0;overflow:hidden;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{text-align:center;position:absolute;background:#fff;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{height:100%;border-right:1px solid #aaa}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{padding-bottom:0;padding-top:0;height:100%}@media (max-width: 640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{position:static;top:auto;left:auto;transform:none;padding-bottom:5px}.tn-l-left-sidebar-wrapper{height:calc(100vh - 300px);border-right:unset;border-bottom:1px solid #aaa}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{padding:0;border:none}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{position:sticky;top:0;z-index:4;padding:.5em;margin-bottom:0;background-color:#fff}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width: 640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration"], outputs: ["dragStart", "dragEnd", "gutterClick", "gutterDblClick", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "component", type: i6$1.Tree, selector: "p-tree", inputs: ["layout", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loadingIcon", "emptyMessage", "filterBy", "filterMode", "indentation", "trackBy", "selection", "value", "selectionMode", "style", "styleClass", "contextMenu", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "loading", "ariaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterPlaceholder", "filterLocale", "scrollHeight", "virtualScroll", "virtualNodeHeight", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDrop", "onFilter"] }, { kind: "component", type: EntityPickerBoxComponent, selector: "entity-picker-box", inputs: ["parentSetting", "advanceData", "control", "width", "height", "readOnlyValues", "selectedValue"], outputs: ["onContentLeftInit", "onContentRightInit", "onRowSelect", "onChanged", "onSelect", "onUnSelect", "onDone"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
22413
+ UserPickerBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: UserPickerBoxComponent, selector: "user-picker-box", inputs: { multiple: "multiple", disabled: "disabled", enableCaching: "enableCaching", controlSetting: "controlSetting", parentSetting: "parentSetting", advanceData: "advanceData", control: "control", width: "width", height: "height", selectedValue: "selectedValue", readOnlyValues: "readOnlyValues" }, outputs: { onRowSelect: "onRowSelect", onChanged: "onChanged", onSelect: "onSelect", onUnSelect: "onUnSelect", onDone: "onDone" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "entityPickerBox", first: true, predicate: ["entityPickerBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"0\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\r\n (onChanged)=\"handleChangedEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\r\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleDone($event)\"\r\n (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n </as-split-area>\r\n </as-split>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>", styles: [".action-btn{border:1px solid #0a89bf;color:#0a89bf;background-color:#fff;font-size:16px;width:40px;cursor:pointer;text-align:center;margin:4px 2px}.content-all{display:flex;flex-direction:column}.content-top{padding:5px 0;overflow:hidden;flex-grow:1}.content-bottom{border-top:1px solid #ddd;padding:5px 0;overflow:hidden;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{text-align:center;position:absolute;background:#fff;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{height:100%;border-right:1px solid #aaa}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{padding-bottom:0;padding-top:0;height:100%}@media (max-width: 640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{position:static;top:auto;left:auto;transform:none;padding-bottom:5px}.tn-l-left-sidebar-wrapper{height:calc(100vh - 300px);border-right:unset;border-bottom:1px solid #aaa}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{padding:0;border:none}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{position:sticky;top:0;z-index:4;padding:.5em;margin-bottom:0;background-color:#fff}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width: 640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "component", type: i6$1.Tree, selector: "p-tree", inputs: ["layout", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loadingIcon", "emptyMessage", "filterBy", "filterMode", "indentation", "trackBy", "selection", "value", "selectionMode", "style", "styleClass", "contextMenu", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "loading", "ariaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterPlaceholder", "filterLocale", "scrollHeight", "virtualScroll", "virtualNodeHeight", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDrop", "onFilter"] }, { kind: "component", type: EntityPickerBoxComponent, selector: "entity-picker-box", inputs: ["parentSetting", "advanceData", "control", "width", "height", "readOnlyValues", "selectedValue"], outputs: ["onContentLeftInit", "onContentRightInit", "onRowSelect", "onChanged", "onSelect", "onUnSelect", "onDone"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
22481
22414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UserPickerBoxComponent, decorators: [{
22482
22415
  type: Component,
22483
22416
  args: [{ selector: 'user-picker-box', providers: [ComponentContextService], template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"0\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\r\n (onChanged)=\"handleChangedEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\r\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleDone($event)\"\r\n (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n </as-split-area>\r\n </as-split>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>", styles: [".action-btn{border:1px solid #0a89bf;color:#0a89bf;background-color:#fff;font-size:16px;width:40px;cursor:pointer;text-align:center;margin:4px 2px}.content-all{display:flex;flex-direction:column}.content-top{padding:5px 0;overflow:hidden;flex-grow:1}.content-bottom{border-top:1px solid #ddd;padding:5px 0;overflow:hidden;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{text-align:center;position:absolute;background:#fff;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{height:100%;border-right:1px solid #aaa}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{padding-bottom:0;padding-top:0;height:100%}@media (max-width: 640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{position:static;top:auto;left:auto;transform:none;padding-bottom:5px}.tn-l-left-sidebar-wrapper{height:calc(100vh - 300px);border-right:unset;border-bottom:1px solid #aaa}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{padding:0;border:none}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{position:sticky;top:0;z-index:4;padding:.5em;margin-bottom:0;background-color:#fff}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width: 640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}\n"] }]
@@ -25169,7 +25102,7 @@ class CrudFormComponent extends ComponentBase {
25169
25102
  }
25170
25103
  }
25171
25104
  CrudFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CrudFormComponent, deps: [{ token: i0.Injector }, { token: CommonService }, { token: CrudService }, { token: i1.TranslateService }, { token: i1$3.DeviceDetectorService }, { token: EnvironmentService }, { token: ComponentService }, { token: i2$2.DomSanitizer }, { token: EntityPickerService }], target: i0.ɵɵFactoryTarget.Component });
25172
- CrudFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: CrudFormComponent, selector: "crud-form", inputs: { setting: "setting", context: "context", filesUploaded: "filesUploaded", isViewMode: "isViewMode", disableKeypressControl: "disableKeypressControl", disableCaching: "disableCaching", styleClass: "styleClass", formId: "formId", formClass: "formClass", autoFocus: "autoFocus", trapFocus: "trapFocus", data: "data", formState: "formState" }, outputs: { onFormReady: "onFormReady", onControlReady: "onControlReady", onAllControlReady: "onAllControlReady", onModelChanged: "onModelChanged", dataChange: "dataChange", onChange: "onChange", onAfterTrinhKy: "onAfterTrinhKy" }, providers: [ComponentContextService], queries: [{ propertyName: "children", predicate: TemplateRef }], viewQueries: [{ propertyName: "formElement", first: true, predicate: ["formElement"], descendants: true }, { propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"_styleClass\">\r\n <form #formElement autocomplete=\"off\" autocorrect=\"off\" spellcheck=\"false\"\r\n [class]=\"'p-grid form-group crud-form' + (formClass ? ' ' + formClass : '')\"\r\n (keydown.shift.tab)=\"preventBlur($event)\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\">\r\n <ng-container *ngFor=\"let control of setting.schema\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<ng-template #customControl let-data=\"data\" let-control=\"control\" let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\"\r\n let-rowIndex=\"index\" let-path=\"path\" let-parentPath=\"parentPath\" let-tablePath=\"tablePath\" let-groupKey=\"groupKey\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\" id=\"{{path}}-holder\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} crud-form-control type-{{control.dataType}}\"\r\n [class.error]=\"data._errors[control.field].length > 0\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel\">\r\n <label *ngIf=\"control.label\" [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}\r\n <span *ngIf=\"control.required\" class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container [ngSwitch]=\"control.controlType\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <ng-container [ngTemplateOutlet]=\"labelControl\"\r\n [ngTemplateOutletContext]=\"{control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <label *ngIf=\"!control.ishtml\" [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | translate\"></label>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div class=\"p-inputgroup\" *ngIf=\"control.suffFix\">\r\n <input [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText\r\n [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n <span class=\"p-inputgroup-addon\">({{control.suffFix}})</span>\r\n </div>\r\n <input *ngIf=\"!control.suffFix\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText [type]=\"control.dataFormat\"\r\n [(ngModel)]=\"data[control.field]\" [max]=\"control.max\" [min]=\"control.min\"\r\n [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'reference-text'\">\r\n <reference-textbox [control]=\"control\" [value]=\"data[control.field]\"></reference-textbox>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'template'\">\r\n <ng-container [ngTemplateOutlet]=\"control.template\"\r\n [ngTemplateOutletContext]=\"{$implicit: _rootNode, control: control, data: data, tablePath: tablePath, parentPath: parentPath, rowIndex: rowIndex, funcUpdateModel: updateModelFromExternal}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <tn-mask [prefix]=\"control.prefix\" [decimalPlaces]=\"control.decimalPlaces\" [suffix]=\"control.suffix\"\r\n [placeholder]=\"control.placeholder\" [disabled]=\"checkDisabled(data, control)\"\r\n [maskType]=\"control.maskType\" [min]=\"control.min\" [max]=\"control.max\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\"\r\n [disabled]=\"checkDisabled(data, control)\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\"\r\n (search)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (blur)=\"handleFieldValueChange(control, $event, 'blur', data, parentPath)\">\r\n </tn-number-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <input currencyMask [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText type=\"tel\"\r\n [(ngModel)]=\"data[control.field]\"\r\n [options]=\"{prefix: '', thousands: '.', decimal: ',',precision:control.dataFormat === 'money'?0:0 }\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'phoneOrfax'\">\r\n <input [placeholder]=\"control.dataFormat==='phone'?'(999) 999-9999':'999-999-9999'\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" type=\"tel\" pInputText\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></textarea>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'editor'\">\r\n <tn-tinymce *ngIf=\"!checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [required]=\"control.validators && control.validators.required\" [mode]=\"control.mode\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [height]=\"control.height ? control.height : 250\" [languageCode]=\"control.languageCode\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n <div *ngIf=\"checkDisabled(data, control)\" class=\"html-box\"\r\n [innerHTML]=\"data[control.field] ? (data[control.field] | safeHtml) : ''\">\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <datetime-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </datetime-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <app-autocomplete-datasource [control]=\"control\" [(ngModel)]=\"data[control.field]\"\r\n [suggestions]=\"data._source[control.field] || control.dataSource\"\r\n (onValueChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </app-autocomplete-datasource>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetimerange'\">\r\n <tn-datetime-picker-range [(ngModel)]=\"data[control.field]\" [disabled]=\"control.disabled\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-datetime-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <dropdown [control]=\"control\" [dataSource]=\"getControlDataSource(control, data)\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleChangeDropdown(control, $event, 'change', data, parentPath)\"\r\n (onHideSmartEvent)=\"handleChangeDropdown(control, $event, 'hide', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormFileManagerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"control.entityKey ? control.entityKey : data[control.entityKeyField]\"\r\n [readonly]=\"control.disabled\" [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [inTaiLieu]=\"control.inTaiLieu\" [inTaiLieuChung]=\"control.inTaiLieuChung\"\r\n [copyToFolderId]=\"control.copyToFolderId\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n [(value)]=\"data[control.field]\" (onSelected)=\"control.onSelected($event)\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </file-manager> -->\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [readonly]=\"control.readonly\" [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormServiceFileUploadComponent']; context: {\r\n $implicit: data, control: control, parentContext: context, parentPath: parentPath, \r\n checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </service-file-upload> -->\r\n </span>\r\n <ng-container *ngSwitchCase=\"'user-picker'\">\r\n <user-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [readOnlyValues]=\"data[control.field + '_readOnly']\" [(ngModel)]=\"data[control.field]\"\r\n [multiple]=\"control.multiple\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </user-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <p-inputSwitch [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-inputSwitch>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div [class]=\"control.class\" role=\"checkbox-alone\">\r\n <p-checkbox [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [label]=\"!control.hiddenLabel ? control.label : null\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" binary=\"true\">\r\n </p-checkbox>\r\n <!-- <tn-checkbox [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></tn-checkbox> -->\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button type=\"button\" pButton [class]=\"control.btClass\" [icon]=\"control.icon\"\r\n [label]=\"control.label | translate\" [ngStyle]=\"control.btStyle\"\r\n (click)=\"handleButtonClick(control, $event, parentPath)\"></button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: subControl, data: data[control.field], parentPath: path, rowIndex: rowIndex, path: path + '.' + subControl.field, showLabel: subControl.showLabel, mdWidth: subControl.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkboxlist'\">\r\n <check-box-list [control]=\"control\" [dataSource]=\"data._source[control.field] || control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </check-box-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'radiobuttonlist'\">\r\n <radio-button-list [control]=\"control\" [dataSource]=\"control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\">\r\n </radio-button-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorPicker'\">\r\n <tn-color-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-color-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.field]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.field]\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorControl'\">\r\n <span class=\"show-color-control\" [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormAddressComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\"\r\n [disabled]=\"checkDisabled(data, control)\" [(data)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </address-picker> -->\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete-picker'\">\r\n <autocomplete-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </autocomplete-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'entity-picker'\">\r\n <entity-picker [control]=\"control\" [children]=\"children\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </entity-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc'\">\r\n <cocautochuc-picker [control]=\"control\" [parentOrgId]=\"control.parentOrgId\"\r\n [disabled]=\"checkDisabled(data, control)\" [parentOrgCode]=\"control.parentOrgCode\"\r\n [filter]=\"control.filter\" [multiple]=\"control.multiple\" [required]=\"control.required\"\r\n [isUsingId]=\"control.isUsingId\" [disabledParentItem]=\"control.disabledParentItem\"\r\n [rootParentId]=\"control.rootParentId\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </cocautochuc-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc-picker'\">\r\n <cocautochuc-picker-list [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </cocautochuc-picker-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'vanban'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormVanBanPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\" [readOnly]=\"control.readOnly\"\r\n [loaiVanBan]=\"control.loaiVanBan\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </vanban-picker> -->\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'congviec'\">\r\n <div>\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormCongViecPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <congviec-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </congviec-picker> -->\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <div>\r\n <tn-mask [suffix]=\"'%'\" [placeholder]=\"control.placeholder\" [maskType]=\"'int'\" [min]=\"0\" [max]=\"100\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n <p-slider [step]=\"1\" [min]=\"0\" [max]=\"100\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onSlideEnd)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-slider>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'common-picker'\">\r\n <common-picker [control]=\"control\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\"\r\n [groupKey]=\"groupKey\" [valueInGroup]=\"model[control.field]\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event,'change', data, parentPath);\">\r\n </common-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table class=\"new-table scr-table table-control\" [value]=\"data[control.field]\"\r\n [columns]=\"control.headerTemplate\" [responsive]=\"true\" [scrollable]=\"false\"\r\n [rowTrackBy]=\"trackByFuncId\"\r\n (onRowReorder)=\"handleRowOrdered(control, $event, 'rowReorder', data, parentPath)\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-rowData let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 5%\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\" tooltipPosition=\"top\"\r\n style=\"text-align: center;\" [style.width]=\"subControl.width\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"control.enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"control.showFunction\" [style.width]=\"control.widthFunctionColumn\"\r\n class=\"table-function column-function\">\r\n <div class=\"cell-header-function\"><span>Ch\u1EE9c n\u0103ng</span></div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr [pReorderableRow]=\"ri\">\r\n <td class=\"stt\" style=\"text-align: center; vertical-align: inherit\">\r\n <span>\r\n {{ri + 1}}\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [class.control-inside]=\"true\" [class]=\"subControl.class\"\r\n [ngStyle]=\"{'text-align': getTextAlign(subControl.textAlign), 'vertical-align': 'inherit'}\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-template [ngIf]=\"getControlType(subControl) != 'column'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]=\"getControlType(subControl) == 'column'\">\r\n <span>{{_modelData[control.field][ri][subControl.field]}}</span>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"control.enableReorderRow\" class=\"no-padding center v-center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\"\r\n pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"control.showFunction\" style=\"text-align: center\"\r\n class=\"column-function text-center\">\r\n <div *ngIf=\"!control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <button *ngIf=\"control.showSave\" [disabled]=\"rowData._disableSave\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-save\" [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-pencil\" [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton\r\n class=\"p-button-text p-button-danger p-button-rounded\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n (click)=\"deleteRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.rowButtons\" type=\"button\" pButton\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData, control)\"></button>\r\n </div>\r\n <div *ngIf=\"control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <ng-container\r\n *ngTemplateOutlet=\"control.rowButtonTemplate; context: {rowData: _modelData[control.field][ri], rowIndex: ri, path: path, control: control}\">\r\n </ng-container>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"control.summaryTemplate\" pTemplate=\"summary\" let-rowData>\r\n <ng-container *ngTemplateOutlet=\"control.summaryTemplate; context: {rowData: rowData}\">\r\n </ng-container>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"control.showFooter\" class=\"--table-schema-footer\">\r\n <button *ngIf=\"control.showAdd\" type=\"button\" pButton style=\"width:auto\" label=\"Th\u00EAm m\u1EDBi\"\r\n icon=\"pi pi-plus\" class=\"p-button-text\" (click)=\"addNewRow(control, path)\"></button>\r\n <span *ngIf=\"control.showDialog\" style=\"font-weight: normal;\">\r\n <p-checkbox label=\"M\u1EDF dialog\" [binary]=\"true\" [(ngModel)]=\"control.showEdit\">\r\n </p-checkbox>\r\n </span>\r\n <button *ngIf=\"control.enableAddMulti\" type=\"button\" pButton\r\n style=\"width:auto; margin-left:10px;\" label=\"Th\u00EAm nhi\u1EC1u\" icon=\"pi pi-clone\"\r\n class=\"p-button-text\" (click)=\"addMultiRow(control, 5, path)\"></button>\r\n <button *ngFor=\"let bt of control.footerButtons\" type=\"button\" pButton [class]=\"bt.class\"\r\n [icon]=\"bt.icon\" [label]=\"bt.label | translate\" style=\"width:auto; margin-left:10px;\"\r\n (click)=\"messageRow( -1, control, path)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.field)\" [ngTemplateOutletContext]=\"{\r\n crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange\r\n }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"validation; context: {control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #validation let-control=\"control\" let-data=\"data\">\r\n <ng-container *ngIf=\"data._errors[control.field].length > 0\">\r\n <div class=\"error-container\">\r\n <ng-container *ngFor=\"let error of data._errors[control.field]\">\r\n <div class=\"error-item\" *ngIf=\"error\">\r\n <ng-container [ngTemplateOutlet]=\"errorMessage\" [ngTemplateOutletContext]=\"{content: error}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #errorMessage let-content=\"content\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-ban\"></i>\r\n <span> {{content}}</span>\r\n </div>\r\n</ng-template>\r\n<ng-template #labelControl let-control=\"control\">\r\n <ng-container>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\" [attr.label-index]=\"control.indexLabel\"\r\n [pTooltip]=\"control.title\" tooltipPosition=\"top\" tooltipStyleClass=\"wrap\" [escape]=\"false\"\r\n [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<tn-dialog *ngIf=\"tableFormShow\" #dialog [styleClass]=\"'address-form'\" [header]=\"tableFormTitle | translate\"\r\n [popupSize]=\"tableFormPopupSize\" (onHide)=\"tableFormShow = false\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormTableDetailForm']; context: {\r\n $implicit: tableFormSchema, parentSetting: setting, data: tableFormData, onSaved: handleSavedTableRow, onCancel: handleCancelEditTableRow,\r\n onInit: handleInitTableDetailForm\r\n }\"></ng-container>\r\n <!-- <table-detail-form #formBase [parentSetting]=\"setting\" [schema]=\"tableFormSchema\" [data]=\"tableFormData\"\r\n (onSaved)=\"handleSavedTableRow($event)\" (onCancel)=\"tableFormShow = false\">\r\n </table-detail-form> -->\r\n <ng-template #footer>\r\n <ng-container *ngTemplateOutlet=\"tableFormFooterTemplate\"></ng-container>\r\n </ng-template>\r\n</tn-dialog>", styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;position:absolute;padding-left:.2em;padding-top:.3em}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{display:flex;align-items:center;font-weight:600;padding:.5em;border-width:0 1px 1px;background:#f8f9fa;color:#495057;border:1px solid #e9ecef}.show-in-box{border:1px solid #ced4da;border-radius:5px}.not-show-in-box{padding:0}.view-mode div.label{padding-bottom:3px}.view-mode div.label label{font-weight:700;font-size:.85em}.view-mode>span:not(:empty){display:inline-block;width:100%;padding:5px 0}.view-mode.type-table div.label+div{padding:5px 0}td>.view-mode{display:inline-block;padding:.25rem .5rem}td>.view-mode .view-mode{padding:0}.crud-form-control div[role=checkbox-alone]{margin-top:24px}.crud-form-control div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control .label+div[role=checkbox-alone]{margin-top:11px}.crud-form-control.type-table div[role=checkbox-alone]{margin-top:6px;text-align:center}.crud-form-control.type-table div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control.type-table div[role=checkbox-alone].align-left{text-align:left}.crud-form-control.type-title{font-size:1.2rem;font-weight:700;color:#025ba7;border-bottom:1px solid #cfcfcf;text-transform:uppercase;padding:5px;margin-bottom:5px}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{font-size:.8rem;color:#6c757d;margin-bottom:5px;margin-left:10px}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{margin-bottom:5px;font-size:.9em;height:1.15em}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{overflow:visible;animation:shrink .1s;min-height:20px;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{display:flex;position:relative;color:red;font-size:.9em;animation:fadeIn .1s}::ng-deep .crud-form-control>.error-container .error-item .error-content i{font-size:.9em;display:flex;padding-top:1px}::ng-deep .crud-form-control>.error-container .error-item .error-content span{display:flex;padding-left:5px}::ng-deep .crud-form-control.no-label>div.label{display:none}::ng-deep .crud-form-control.error select,::ng-deep .crud-form-control.error textarea,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown{border-color:#ff5722!important}::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-autocomplete-multiple-container:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #ffc4b3}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) select,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) textarea,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) input,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown{border-color:#ced4da!important}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown.tn-dropdown.p-focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext:enabled:focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-focus{box-shadow:0 0 0 .2rem #a6d5fa}@keyframes fadeIn{0%{opacity:0;top:-25px}to{opacity:1;top:0}}@keyframes shrink{0%{height:0}to{height:20px}}@media screen and (min-width: 40.063em){.label-right{padding-left:2em}}::ng-deep crud-form .crud-form-container{padding:.5rem .5rem 0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside{padding:0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}::ng-deep crud-form base-congviec-form crud-form>.crud-form-container{padding:0}:host ::ng-deep .tox-tinymce{border:none;border-top:1px solid #ccc;overflow:unset}:host ::ng-deep .tox-tinymce .tox-editor-container{overflow:unset}:host ::ng-deep .tox-tinymce .tox-toolbar{border:1px solid #ccc;border-bottom:none}:host ::ng-deep .tox-tinymce .tox-edit-area{border:1px solid #ccc}:host ::ng-deep .tox-tinymce .tox-edit-area iframe{box-shadow:inset 0 1px 1px #00000013}:host ::ng-deep .tox-tinymce .tox-menubar{border:1px solid #ccc}:host ::ng-deep .tox .tox-edit-area.tinymce-focus{border:1px solid #66afe9;box-shadow:inset 0 1px 1px #00000013,0 0 3px #66afe9;transition:box-shadow .3s,border-color .3s;transition-property:box-shadow,border-color;transition-duration:.3s,.3s;transition-timing-function:ease,ease;transition-delay:0s,0s}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{margin-bottom:40px;display:block}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i7.ContextMenu, selector: "p-contextMenu", inputs: ["autoZIndex", "baseZIndex", "triggerEvent", "model", "global", "target", "style", "styleClass", "appendTo"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i13.Table, selector: "p-table", inputs: ["pageLinks", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "contextMenuSelectionMode", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "filterDelay", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "virtualScrollDelay", "virtualRowHeight", "columnResizeMode", "loadingIcon", "showLoader", "stateStorage", "editMode", "totalRecords", "value", "columns", "first", "rows", "sortField", "sortOrder", "multiSortMeta", "selection", "contextMenuSelection", "frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "rowsPerPageOptions", "paginatorDropdownAppendTo", "showCurrentPageReport", "showJumpToPageDropdown", "selectionMode", "dataKey", "metaKeySelection", "globalFilterFields", "filterLocale", "scrollable", "scrollHeight", "virtualScroll", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "reorderableColumns", "loading", "rowHover", "customSort", "autoLayout", "exportFunction", "stateKey", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i13.ReorderableRowHandle, selector: "[pReorderableRowHandle]", inputs: ["pReorderableRowHandle"] }, { kind: "directive", type: i13.ReorderableRow, selector: "[pReorderableRow]", inputs: ["pReorderableRow", "pReorderableRowDisabled"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5$2.Checkbox, selector: "p-checkbox", inputs: ["checkboxIcon", "disabled", "value", "name", "binary", "label", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "readonly", "required"], outputs: ["onChange"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i5$4.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "component", type: i19.InputSwitch, selector: "p-inputSwitch", inputs: ["disabled", "style", "styleClass", "tabindex", "inputId", "name", "readonly", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: i20.Slider, selector: "p-slider", inputs: ["min", "max", "orientation", "tabindex", "disabled", "animate", "step", "range", "style", "styleClass", "ariaLabelledBy"], outputs: ["onChange", "onSlideEnd"] }, { kind: "directive", type: i21.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["options", "max", "min"] }, { kind: "component", type: AutoCompletePickerComponent, selector: "autocomplete-picker", inputs: ["control", "groupKey", "valueInGroup", "disabled", "popupSize", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: CheckBoxListComponent, selector: "check-box-list", inputs: ["styleClass", "control", "dataSource", "disabled"], outputs: ["onSelect", "onReady"] }, { kind: "component", type: CommonPickerComponent, selector: "common-picker", inputs: ["control", "extraData", "disabled", "groupKey", "valueInGroup"], outputs: ["onSelect", "onUnSelect", "onChanged", "onBlur"] }, { kind: "component", type: CoCauToChucPickerListComponent, selector: "cocautochuc-picker-list", inputs: ["control", "disabled", "readOnlyValues"], outputs: ["onChanged", "onSelect", "onUnSelect", "onClear", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: DatetimePickerComponent, selector: "datetime-picker", inputs: ["control", "disabled"], outputs: ["onSelect", "onChanged", "onFocus", "onBlur", "onClose"] }, { kind: "component", type: DatetimePickerRangeComponent, selector: "tn-datetime-picker-range", inputs: ["control", "disabled"], outputs: ["onClose", "onChanged"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["showClear", "disableDisplayFieldServerSearch", "filter", "control", "defaultLabel", "appendTo", "dataSource", "value", "itemSelectedStyleClass"], outputs: ["onChanged", "onCollapse", "onExpand", "onDropdownClick", "onShow", "onShowSmartEvent", "onHide", "onHideSmartEvent", "onFocus", "onBlur", "onReady", "onDataSourceLoaded", "valueChange", "adjustValue"] }, { kind: "component", type: EntityPickerComponent, selector: "entity-picker", inputs: ["control", "disabled", "readOnly", "children"], outputs: ["onSelect", "onUnSelect", "onChanged"] }, { kind: "component", type: FileUploadComponent, selector: "file-upload", inputs: ["chooseLabel", "readonly", "accept", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "sharedFolderType"], outputs: ["onSelect", "onRemove", "onChanged"] }, { kind: "component", type: MaskComponent, selector: "tn-mask", inputs: ["maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces", "viewMode", "inputStyleClass"], outputs: ["onFocus", "onBlur", "onChanged"] }, { kind: "component", type: NumberPickerRangeComponent, selector: "tn-number-picker-range", inputs: ["readonly", "maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces"], outputs: ["focus", "enterSmart", "enter", "blur", "change"] }, { kind: "component", type: RadioButtonListComponent, selector: "radio-button-list", inputs: ["control", "dataSource", "value", "disabled"], outputs: ["valueChange", "onChanged", "onDataSourceLoaded", "adjustValue", "onReady"] }, { kind: "component", type: ReferenceTextBoxComponent, selector: "reference-textbox", inputs: ["control", "value"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: TnColorPickerComponent, selector: "tn-color-picker", inputs: ["disabled", "appendTo"], outputs: ["change"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "component", type: TnTinymceComponent, selector: "tn-tinymce", inputs: ["mode", "disabled", "required", "height", "field", "languageCode"], outputs: ["keydown", "onBlur", "onChanged"] }, { kind: "component", type: CoCauToChucPickerComponent, selector: "cocautochuc-picker", inputs: ["control", "autoDisplayFirst", "multiple", "required", "readonly", "limit", "filter", "isUsingId", "parentOrgId", "parentOrgCode", "showClear", "disabledParentItem", "rootParentId"], outputs: ["onChanged"] }, { kind: "component", type: UserPickerComponent, selector: "user-picker", inputs: ["control", "popupSize", "multiple", "disabled", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: AutocompleteDatasourceComponent, selector: "app-autocomplete-datasource", inputs: ["suggestions", "control"], outputs: ["onValueChanged"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
25105
+ CrudFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: CrudFormComponent, selector: "crud-form", inputs: { setting: "setting", context: "context", filesUploaded: "filesUploaded", isViewMode: "isViewMode", disableKeypressControl: "disableKeypressControl", disableCaching: "disableCaching", styleClass: "styleClass", formId: "formId", formClass: "formClass", autoFocus: "autoFocus", trapFocus: "trapFocus", data: "data", formState: "formState" }, outputs: { onFormReady: "onFormReady", onControlReady: "onControlReady", onAllControlReady: "onAllControlReady", onModelChanged: "onModelChanged", dataChange: "dataChange", onChange: "onChange", onAfterTrinhKy: "onAfterTrinhKy" }, providers: [ComponentContextService], queries: [{ propertyName: "children", predicate: TemplateRef }], viewQueries: [{ propertyName: "formElement", first: true, predicate: ["formElement"], descendants: true }, { propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"_styleClass\">\r\n <form #formElement autocomplete=\"off\" autocorrect=\"off\" spellcheck=\"false\"\r\n [class]=\"'p-grid form-group crud-form' + (formClass ? ' ' + formClass : '')\"\r\n (keydown.shift.tab)=\"preventBlur($event)\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\">\r\n <ng-container *ngFor=\"let control of setting.schema\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<ng-template #customControl let-data=\"data\" let-control=\"control\" let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\"\r\n let-rowIndex=\"index\" let-path=\"path\" let-parentPath=\"parentPath\" let-tablePath=\"tablePath\" let-groupKey=\"groupKey\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\" id=\"{{path}}-holder\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} crud-form-control type-{{control.dataType}}\"\r\n [class.error]=\"data._errors[control.field].length > 0\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel\">\r\n <label *ngIf=\"control.label\" [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}\r\n <span *ngIf=\"control.required\" class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container [ngSwitch]=\"control.controlType\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <ng-container [ngTemplateOutlet]=\"labelControl\"\r\n [ngTemplateOutletContext]=\"{control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <label *ngIf=\"!control.ishtml\" [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | translate\"></label>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div class=\"p-inputgroup\" *ngIf=\"control.suffFix\">\r\n <input [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText\r\n [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n <span class=\"p-inputgroup-addon\">({{control.suffFix}})</span>\r\n </div>\r\n <input *ngIf=\"!control.suffFix\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText [type]=\"control.dataFormat\"\r\n [(ngModel)]=\"data[control.field]\" [max]=\"control.max\" [min]=\"control.min\"\r\n [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'reference-text'\">\r\n <reference-textbox [control]=\"control\" [value]=\"data[control.field]\"></reference-textbox>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'template'\">\r\n <ng-container [ngTemplateOutlet]=\"control.template\"\r\n [ngTemplateOutletContext]=\"{$implicit: _rootNode, control: control, data: data, tablePath: tablePath, parentPath: parentPath, rowIndex: rowIndex, funcUpdateModel: updateModelFromExternal}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <tn-mask [prefix]=\"control.prefix\" [decimalPlaces]=\"control.decimalPlaces\" [suffix]=\"control.suffix\"\r\n [placeholder]=\"control.placeholder\" [disabled]=\"checkDisabled(data, control)\"\r\n [maskType]=\"control.maskType\" [min]=\"control.min\" [max]=\"control.max\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\"\r\n [disabled]=\"checkDisabled(data, control)\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\"\r\n (search)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (blur)=\"handleFieldValueChange(control, $event, 'blur', data, parentPath)\">\r\n </tn-number-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <input currencyMask [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText type=\"tel\"\r\n [(ngModel)]=\"data[control.field]\"\r\n [options]=\"{prefix: '', thousands: '.', decimal: ',',precision:control.dataFormat === 'money'?0:0 }\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'phoneOrfax'\">\r\n <input [placeholder]=\"control.dataFormat==='phone'?'(999) 999-9999':'999-999-9999'\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" type=\"tel\" pInputText\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></textarea>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'editor'\">\r\n <tn-tinymce *ngIf=\"!checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [required]=\"control.validators && control.validators.required\" [mode]=\"control.mode\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [height]=\"control.height ? control.height : 250\" [languageCode]=\"control.languageCode\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n <div *ngIf=\"checkDisabled(data, control)\" class=\"html-box\"\r\n [innerHTML]=\"data[control.field] ? (data[control.field] | safeHtml) : ''\">\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <datetime-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </datetime-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <app-autocomplete-datasource [control]=\"control\" [(ngModel)]=\"data[control.field]\"\r\n [suggestions]=\"data._source[control.field] || control.dataSource\"\r\n (onValueChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </app-autocomplete-datasource>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetimerange'\">\r\n <tn-datetime-picker-range [(ngModel)]=\"data[control.field]\" [disabled]=\"control.disabled\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-datetime-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <dropdown [control]=\"control\" [dataSource]=\"getControlDataSource(control, data)\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleChangeDropdown(control, $event, 'change', data, parentPath)\"\r\n (onHideSmartEvent)=\"handleChangeDropdown(control, $event, 'hide', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormFileManagerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"control.entityKey ? control.entityKey : data[control.entityKeyField]\"\r\n [readonly]=\"control.disabled\" [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [inTaiLieu]=\"control.inTaiLieu\" [inTaiLieuChung]=\"control.inTaiLieuChung\"\r\n [copyToFolderId]=\"control.copyToFolderId\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n [(value)]=\"data[control.field]\" (onSelected)=\"control.onSelected($event)\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </file-manager> -->\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [readonly]=\"control.readonly\" [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormServiceFileUploadComponent']; context: {\r\n $implicit: data, control: control, parentContext: context, parentPath: parentPath, \r\n checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </service-file-upload> -->\r\n </span>\r\n <ng-container *ngSwitchCase=\"'user-picker'\">\r\n <user-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [readOnlyValues]=\"data[control.field + '_readOnly']\" [(ngModel)]=\"data[control.field]\"\r\n [multiple]=\"control.multiple\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </user-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <p-inputSwitch [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-inputSwitch>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div [class]=\"control.class\" role=\"checkbox-alone\">\r\n <p-checkbox [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [label]=\"!control.hiddenLabel ? control.label : null\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" binary=\"true\">\r\n </p-checkbox>\r\n <!-- <tn-checkbox [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></tn-checkbox> -->\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button type=\"button\" pButton [class]=\"control.btClass\" [icon]=\"control.icon\"\r\n [label]=\"control.label | translate\" [ngStyle]=\"control.btStyle\"\r\n (click)=\"handleButtonClick(control, $event, parentPath)\"></button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: subControl, data: data[control.field], parentPath: path, rowIndex: rowIndex, path: path + '.' + subControl.field, showLabel: subControl.showLabel, mdWidth: subControl.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkboxlist'\">\r\n <check-box-list [control]=\"control\" [dataSource]=\"data._source[control.field] || control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </check-box-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'radiobuttonlist'\">\r\n <radio-button-list [control]=\"control\" [dataSource]=\"control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\">\r\n </radio-button-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorPicker'\">\r\n <tn-color-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-color-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.field]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.field]\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorControl'\">\r\n <span class=\"show-color-control\" [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormAddressComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\"\r\n [disabled]=\"checkDisabled(data, control)\" [(data)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </address-picker> -->\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete-picker'\">\r\n <autocomplete-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </autocomplete-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'entity-picker'\">\r\n <entity-picker [control]=\"control\" [children]=\"children\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </entity-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc'\">\r\n <cocautochuc-picker [control]=\"control\" [parentOrgId]=\"control.parentOrgId\"\r\n [disabled]=\"checkDisabled(data, control)\" [parentOrgCode]=\"control.parentOrgCode\"\r\n [filter]=\"control.filter\" [multiple]=\"control.multiple\" [required]=\"control.required\"\r\n [isUsingId]=\"control.isUsingId\" [disabledParentItem]=\"control.disabledParentItem\"\r\n [rootParentId]=\"control.rootParentId\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </cocautochuc-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc-picker'\">\r\n <cocautochuc-picker-list [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </cocautochuc-picker-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'vanban'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormVanBanPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\" [readOnly]=\"control.readOnly\"\r\n [loaiVanBan]=\"control.loaiVanBan\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </vanban-picker> -->\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'congviec'\">\r\n <div>\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormCongViecPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <congviec-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </congviec-picker> -->\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <div>\r\n <tn-mask [suffix]=\"'%'\" [placeholder]=\"control.placeholder\" [maskType]=\"'int'\" [min]=\"0\" [max]=\"100\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n <p-slider [step]=\"1\" [min]=\"0\" [max]=\"100\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onSlideEnd)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-slider>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'common-picker'\">\r\n <common-picker [control]=\"control\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\"\r\n [groupKey]=\"groupKey\" [valueInGroup]=\"model[control.field]\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event,'change', data, parentPath);\">\r\n </common-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table class=\"new-table scr-table table-control\" [value]=\"data[control.field]\"\r\n [columns]=\"control.headerTemplate\" [responsive]=\"true\" [scrollable]=\"false\"\r\n [rowTrackBy]=\"trackByFuncId\"\r\n (onRowReorder)=\"handleRowOrdered(control, $event, 'rowReorder', data, parentPath)\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-rowData let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 5%\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\" tooltipPosition=\"top\"\r\n style=\"text-align: center;\" [style.width]=\"subControl.width\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"control.enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"control.showFunction\" [style.width]=\"control.widthFunctionColumn\"\r\n class=\"table-function column-function\">\r\n <div class=\"cell-header-function\"><span>Ch\u1EE9c n\u0103ng</span></div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr [pReorderableRow]=\"ri\">\r\n <td class=\"stt\" style=\"text-align: center; vertical-align: inherit\">\r\n <span>\r\n {{ri + 1}}\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [class.control-inside]=\"true\" [class]=\"subControl.class\"\r\n [ngStyle]=\"{'text-align': getTextAlign(subControl.textAlign), 'vertical-align': 'inherit'}\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-template [ngIf]=\"getControlType(subControl) != 'column'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]=\"getControlType(subControl) == 'column'\">\r\n <span>{{_modelData[control.field][ri][subControl.field]}}</span>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"control.enableReorderRow\" class=\"no-padding center v-center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\"\r\n pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"control.showFunction\" style=\"text-align: center\"\r\n class=\"column-function text-center\">\r\n <div *ngIf=\"!control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <button *ngIf=\"control.showSave\" [disabled]=\"rowData._disableSave\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-save\" [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-pencil\" [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton\r\n class=\"p-button-text p-button-danger p-button-rounded\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n (click)=\"deleteRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.rowButtons\" type=\"button\" pButton\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData, control)\"></button>\r\n </div>\r\n <div *ngIf=\"control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <ng-container\r\n *ngTemplateOutlet=\"control.rowButtonTemplate; context: {rowData: _modelData[control.field][ri], rowIndex: ri, path: path, control: control}\">\r\n </ng-container>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"control.summaryTemplate\" pTemplate=\"summary\" let-rowData>\r\n <ng-container *ngTemplateOutlet=\"control.summaryTemplate; context: {rowData: rowData}\">\r\n </ng-container>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"control.showFooter\" class=\"--table-schema-footer\">\r\n <button *ngIf=\"control.showAdd\" type=\"button\" pButton style=\"width:auto\" label=\"Th\u00EAm m\u1EDBi\"\r\n icon=\"pi pi-plus\" class=\"p-button-text\" (click)=\"addNewRow(control, path)\"></button>\r\n <span *ngIf=\"control.showDialog\" style=\"font-weight: normal;\">\r\n <p-checkbox label=\"M\u1EDF dialog\" [binary]=\"true\" [(ngModel)]=\"control.showEdit\">\r\n </p-checkbox>\r\n </span>\r\n <button *ngIf=\"control.enableAddMulti\" type=\"button\" pButton\r\n style=\"width:auto; margin-left:10px;\" label=\"Th\u00EAm nhi\u1EC1u\" icon=\"pi pi-clone\"\r\n class=\"p-button-text\" (click)=\"addMultiRow(control, 5, path)\"></button>\r\n <button *ngFor=\"let bt of control.footerButtons\" type=\"button\" pButton [class]=\"bt.class\"\r\n [icon]=\"bt.icon\" [label]=\"bt.label | translate\" style=\"width:auto; margin-left:10px;\"\r\n (click)=\"messageRow( -1, control, path)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.field)\" [ngTemplateOutletContext]=\"{\r\n crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange\r\n }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"validation; context: {control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #validation let-control=\"control\" let-data=\"data\">\r\n <ng-container *ngIf=\"data._errors[control.field].length > 0\">\r\n <div class=\"error-container\">\r\n <ng-container *ngFor=\"let error of data._errors[control.field]\">\r\n <div class=\"error-item\" *ngIf=\"error\">\r\n <ng-container [ngTemplateOutlet]=\"errorMessage\" [ngTemplateOutletContext]=\"{content: error}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #errorMessage let-content=\"content\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-ban\"></i>\r\n <span> {{content}}</span>\r\n </div>\r\n</ng-template>\r\n<ng-template #labelControl let-control=\"control\">\r\n <ng-container>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\" [attr.label-index]=\"control.indexLabel\"\r\n [pTooltip]=\"control.title\" tooltipPosition=\"top\" tooltipStyleClass=\"wrap\" [escape]=\"false\"\r\n [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<tn-dialog *ngIf=\"tableFormShow\" #dialog [styleClass]=\"'address-form'\" [header]=\"tableFormTitle | translate\"\r\n [popupSize]=\"tableFormPopupSize\" (onHide)=\"tableFormShow = false\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormTableDetailForm']; context: {\r\n $implicit: tableFormSchema, parentSetting: setting, data: tableFormData, onSaved: handleSavedTableRow, onCancel: handleCancelEditTableRow,\r\n onInit: handleInitTableDetailForm\r\n }\"></ng-container>\r\n <!-- <table-detail-form #formBase [parentSetting]=\"setting\" [schema]=\"tableFormSchema\" [data]=\"tableFormData\"\r\n (onSaved)=\"handleSavedTableRow($event)\" (onCancel)=\"tableFormShow = false\">\r\n </table-detail-form> -->\r\n <ng-template #footer>\r\n <ng-container *ngTemplateOutlet=\"tableFormFooterTemplate\"></ng-container>\r\n </ng-template>\r\n</tn-dialog>", styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;position:absolute;padding-left:.2em;padding-top:.3em}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{display:flex;align-items:center;font-weight:600;padding:.5em;border-width:0 1px 1px;background:#f8f9fa;color:#495057;border:1px solid #e9ecef}.show-in-box{border:1px solid #ced4da;border-radius:5px}.not-show-in-box{padding:0}.view-mode div.label{padding-bottom:3px}.view-mode div.label label{font-weight:700;font-size:.85em}.view-mode>span:not(:empty){display:inline-block;width:100%;padding:5px 0}.view-mode.type-table div.label+div{padding:5px 0}td>.view-mode{display:inline-block;padding:.25rem .5rem}td>.view-mode .view-mode{padding:0}.crud-form-control div[role=checkbox-alone]{margin-top:24px}.crud-form-control div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control .label+div[role=checkbox-alone]{margin-top:11px}.crud-form-control.type-table div[role=checkbox-alone]{margin-top:6px;text-align:center}.crud-form-control.type-table div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control.type-table div[role=checkbox-alone].align-left{text-align:left}.crud-form-control.type-title{font-size:1.2rem;font-weight:700;color:#025ba7;border-bottom:1px solid #cfcfcf;text-transform:uppercase;padding:5px;margin-bottom:5px}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{font-size:.8rem;color:#6c757d;margin-bottom:5px;margin-left:10px}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{margin-bottom:5px;font-size:.9em;height:1.15em}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{overflow:visible;animation:shrink .1s;min-height:20px;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{display:flex;position:relative;color:red;font-size:.9em;animation:fadeIn .1s}::ng-deep .crud-form-control>.error-container .error-item .error-content i{font-size:.9em;display:flex;padding-top:1px}::ng-deep .crud-form-control>.error-container .error-item .error-content span{display:flex;padding-left:5px}::ng-deep .crud-form-control.no-label>div.label{display:none}::ng-deep .crud-form-control.error select,::ng-deep .crud-form-control.error textarea,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown{border-color:#ff5722!important}::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-autocomplete-multiple-container:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #ffc4b3}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) select,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) textarea,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) input,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown{border-color:#ced4da!important}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown.tn-dropdown.p-focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext:enabled:focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-focus{box-shadow:0 0 0 .2rem #a6d5fa}@keyframes fadeIn{0%{opacity:0;top:-25px}to{opacity:1;top:0}}@keyframes shrink{0%{height:0}to{height:20px}}@media screen and (min-width: 40.063em){.label-right{padding-left:2em}}::ng-deep crud-form .crud-form-container{padding:.5rem .5rem 0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside{padding:0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}::ng-deep crud-form base-congviec-form crud-form>.crud-form-container{padding:0}:host ::ng-deep .tox-tinymce{border:none;border-top:1px solid #ccc;overflow:unset}:host ::ng-deep .tox-tinymce .tox-editor-container{overflow:unset}:host ::ng-deep .tox-tinymce .tox-toolbar{border:1px solid #ccc;border-bottom:none}:host ::ng-deep .tox-tinymce .tox-edit-area{border:1px solid #ccc}:host ::ng-deep .tox-tinymce .tox-edit-area iframe{box-shadow:inset 0 1px 1px #00000013}:host ::ng-deep .tox-tinymce .tox-menubar{border:1px solid #ccc}:host ::ng-deep .tox .tox-edit-area.tinymce-focus{border:1px solid #66afe9;box-shadow:inset 0 1px 1px #00000013,0 0 3px #66afe9;transition:box-shadow .3s,border-color .3s;transition-property:box-shadow,border-color;transition-duration:.3s,.3s;transition-timing-function:ease,ease;transition-delay:0s,0s}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{margin-bottom:40px;display:block}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i7.ContextMenu, selector: "p-contextMenu", inputs: ["autoZIndex", "baseZIndex", "triggerEvent", "model", "global", "target", "style", "styleClass", "appendTo"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i13.Table, selector: "p-table", inputs: ["pageLinks", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "contextMenuSelectionMode", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "filterDelay", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "virtualScrollDelay", "virtualRowHeight", "columnResizeMode", "loadingIcon", "showLoader", "stateStorage", "editMode", "totalRecords", "value", "columns", "first", "rows", "sortField", "sortOrder", "multiSortMeta", "selection", "contextMenuSelection", "frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "rowsPerPageOptions", "paginatorDropdownAppendTo", "showCurrentPageReport", "showJumpToPageDropdown", "selectionMode", "dataKey", "metaKeySelection", "globalFilterFields", "filterLocale", "scrollable", "scrollHeight", "virtualScroll", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "reorderableColumns", "loading", "rowHover", "customSort", "autoLayout", "exportFunction", "stateKey", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i13.ReorderableRowHandle, selector: "[pReorderableRowHandle]", inputs: ["pReorderableRowHandle"] }, { kind: "directive", type: i13.ReorderableRow, selector: "[pReorderableRow]", inputs: ["pReorderableRow", "pReorderableRowDisabled"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5$2.Checkbox, selector: "p-checkbox", inputs: ["checkboxIcon", "disabled", "value", "name", "binary", "label", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "readonly", "required"], outputs: ["onChange"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i5$4.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "component", type: i19.InputSwitch, selector: "p-inputSwitch", inputs: ["disabled", "style", "styleClass", "tabindex", "inputId", "name", "readonly", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: i20.Slider, selector: "p-slider", inputs: ["min", "max", "orientation", "tabindex", "disabled", "animate", "step", "range", "style", "styleClass", "ariaLabelledBy"], outputs: ["onChange", "onSlideEnd"] }, { kind: "directive", type: i21.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["max", "min", "options"] }, { kind: "component", type: AutoCompletePickerComponent, selector: "autocomplete-picker", inputs: ["control", "groupKey", "valueInGroup", "disabled", "popupSize", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: CheckBoxListComponent, selector: "check-box-list", inputs: ["styleClass", "control", "dataSource", "disabled"], outputs: ["onSelect", "onReady"] }, { kind: "component", type: CommonPickerComponent, selector: "common-picker", inputs: ["control", "extraData", "disabled", "groupKey", "valueInGroup"], outputs: ["onSelect", "onUnSelect", "onChanged", "onBlur"] }, { kind: "component", type: CoCauToChucPickerListComponent, selector: "cocautochuc-picker-list", inputs: ["control", "disabled", "readOnlyValues"], outputs: ["onChanged", "onSelect", "onUnSelect", "onClear", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: DatetimePickerComponent, selector: "datetime-picker", inputs: ["control", "disabled"], outputs: ["onSelect", "onChanged", "onFocus", "onBlur", "onClose"] }, { kind: "component", type: DatetimePickerRangeComponent, selector: "tn-datetime-picker-range", inputs: ["control", "disabled"], outputs: ["onClose", "onChanged"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["showClear", "disableDisplayFieldServerSearch", "filter", "control", "defaultLabel", "appendTo", "dataSource", "value", "itemSelectedStyleClass"], outputs: ["onChanged", "onCollapse", "onExpand", "onDropdownClick", "onShow", "onShowSmartEvent", "onHide", "onHideSmartEvent", "onFocus", "onBlur", "onReady", "onDataSourceLoaded", "valueChange", "adjustValue"] }, { kind: "component", type: EntityPickerComponent, selector: "entity-picker", inputs: ["control", "disabled", "readOnly", "children"], outputs: ["onSelect", "onUnSelect", "onChanged"] }, { kind: "component", type: FileUploadComponent, selector: "file-upload", inputs: ["chooseLabel", "readonly", "accept", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "sharedFolderType"], outputs: ["onSelect", "onRemove", "onChanged"] }, { kind: "component", type: MaskComponent, selector: "tn-mask", inputs: ["maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces", "viewMode", "inputStyleClass"], outputs: ["onFocus", "onBlur", "onChanged"] }, { kind: "component", type: NumberPickerRangeComponent, selector: "tn-number-picker-range", inputs: ["readonly", "maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces"], outputs: ["focus", "enterSmart", "enter", "blur", "change"] }, { kind: "component", type: RadioButtonListComponent, selector: "radio-button-list", inputs: ["control", "dataSource", "value", "disabled"], outputs: ["valueChange", "onChanged", "onDataSourceLoaded", "adjustValue", "onReady"] }, { kind: "component", type: ReferenceTextBoxComponent, selector: "reference-textbox", inputs: ["control", "value"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: TnColorPickerComponent, selector: "tn-color-picker", inputs: ["disabled", "appendTo"], outputs: ["change"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "component", type: TnTinymceComponent, selector: "tn-tinymce", inputs: ["mode", "disabled", "required", "height", "field", "languageCode"], outputs: ["keydown", "onBlur", "onChanged"] }, { kind: "component", type: CoCauToChucPickerComponent, selector: "cocautochuc-picker", inputs: ["control", "autoDisplayFirst", "multiple", "required", "readonly", "limit", "filter", "isUsingId", "parentOrgId", "parentOrgCode", "showClear", "disabledParentItem", "rootParentId"], outputs: ["onChanged"] }, { kind: "component", type: UserPickerComponent, selector: "user-picker", inputs: ["control", "popupSize", "multiple", "disabled", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: AutocompleteDatasourceComponent, selector: "app-autocomplete-datasource", inputs: ["suggestions", "control"], outputs: ["onValueChanged"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
25173
25106
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CrudFormComponent, decorators: [{
25174
25107
  type: Component,
25175
25108
  args: [{ selector: 'crud-form', providers: [ComponentContextService], template: "<div [class]=\"_styleClass\">\r\n <form #formElement autocomplete=\"off\" autocorrect=\"off\" spellcheck=\"false\"\r\n [class]=\"'p-grid form-group crud-form' + (formClass ? ' ' + formClass : '')\"\r\n (keydown.shift.tab)=\"preventBlur($event)\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\">\r\n <ng-container *ngFor=\"let control of setting.schema\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<ng-template #customControl let-data=\"data\" let-control=\"control\" let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\"\r\n let-rowIndex=\"index\" let-path=\"path\" let-parentPath=\"parentPath\" let-tablePath=\"tablePath\" let-groupKey=\"groupKey\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\" id=\"{{path}}-holder\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} crud-form-control type-{{control.dataType}}\"\r\n [class.error]=\"data._errors[control.field].length > 0\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel\">\r\n <label *ngIf=\"control.label\" [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}\r\n <span *ngIf=\"control.required\" class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container [ngSwitch]=\"control.controlType\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <ng-container [ngTemplateOutlet]=\"labelControl\"\r\n [ngTemplateOutletContext]=\"{control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <label *ngIf=\"!control.ishtml\" [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | translate\"></label>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div class=\"p-inputgroup\" *ngIf=\"control.suffFix\">\r\n <input [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText\r\n [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n <span class=\"p-inputgroup-addon\">({{control.suffFix}})</span>\r\n </div>\r\n <input *ngIf=\"!control.suffFix\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText [type]=\"control.dataFormat\"\r\n [(ngModel)]=\"data[control.field]\" [max]=\"control.max\" [min]=\"control.min\"\r\n [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'reference-text'\">\r\n <reference-textbox [control]=\"control\" [value]=\"data[control.field]\"></reference-textbox>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'template'\">\r\n <ng-container [ngTemplateOutlet]=\"control.template\"\r\n [ngTemplateOutletContext]=\"{$implicit: _rootNode, control: control, data: data, tablePath: tablePath, parentPath: parentPath, rowIndex: rowIndex, funcUpdateModel: updateModelFromExternal}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <tn-mask [prefix]=\"control.prefix\" [decimalPlaces]=\"control.decimalPlaces\" [suffix]=\"control.suffix\"\r\n [placeholder]=\"control.placeholder\" [disabled]=\"checkDisabled(data, control)\"\r\n [maskType]=\"control.maskType\" [min]=\"control.min\" [max]=\"control.max\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\"\r\n [disabled]=\"checkDisabled(data, control)\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\"\r\n (search)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (blur)=\"handleFieldValueChange(control, $event, 'blur', data, parentPath)\">\r\n </tn-number-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <input currencyMask [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText type=\"tel\"\r\n [(ngModel)]=\"data[control.field]\"\r\n [options]=\"{prefix: '', thousands: '.', decimal: ',',precision:control.dataFormat === 'money'?0:0 }\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'phoneOrfax'\">\r\n <input [placeholder]=\"control.dataFormat==='phone'?'(999) 999-9999':'999-999-9999'\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" type=\"tel\" pInputText\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></textarea>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'editor'\">\r\n <tn-tinymce *ngIf=\"!checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [required]=\"control.validators && control.validators.required\" [mode]=\"control.mode\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [height]=\"control.height ? control.height : 250\" [languageCode]=\"control.languageCode\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n <div *ngIf=\"checkDisabled(data, control)\" class=\"html-box\"\r\n [innerHTML]=\"data[control.field] ? (data[control.field] | safeHtml) : ''\">\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <datetime-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </datetime-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <app-autocomplete-datasource [control]=\"control\" [(ngModel)]=\"data[control.field]\"\r\n [suggestions]=\"data._source[control.field] || control.dataSource\"\r\n (onValueChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </app-autocomplete-datasource>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetimerange'\">\r\n <tn-datetime-picker-range [(ngModel)]=\"data[control.field]\" [disabled]=\"control.disabled\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-datetime-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <dropdown [control]=\"control\" [dataSource]=\"getControlDataSource(control, data)\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleChangeDropdown(control, $event, 'change', data, parentPath)\"\r\n (onHideSmartEvent)=\"handleChangeDropdown(control, $event, 'hide', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormFileManagerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"control.entityKey ? control.entityKey : data[control.entityKeyField]\"\r\n [readonly]=\"control.disabled\" [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [inTaiLieu]=\"control.inTaiLieu\" [inTaiLieuChung]=\"control.inTaiLieuChung\"\r\n [copyToFolderId]=\"control.copyToFolderId\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n [(value)]=\"data[control.field]\" (onSelected)=\"control.onSelected($event)\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </file-manager> -->\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [readonly]=\"control.readonly\" [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormServiceFileUploadComponent']; context: {\r\n $implicit: data, control: control, parentContext: context, parentPath: parentPath, \r\n checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </service-file-upload> -->\r\n </span>\r\n <ng-container *ngSwitchCase=\"'user-picker'\">\r\n <user-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [readOnlyValues]=\"data[control.field + '_readOnly']\" [(ngModel)]=\"data[control.field]\"\r\n [multiple]=\"control.multiple\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </user-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <p-inputSwitch [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-inputSwitch>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div [class]=\"control.class\" role=\"checkbox-alone\">\r\n <p-checkbox [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [label]=\"!control.hiddenLabel ? control.label : null\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" binary=\"true\">\r\n </p-checkbox>\r\n <!-- <tn-checkbox [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></tn-checkbox> -->\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button type=\"button\" pButton [class]=\"control.btClass\" [icon]=\"control.icon\"\r\n [label]=\"control.label | translate\" [ngStyle]=\"control.btStyle\"\r\n (click)=\"handleButtonClick(control, $event, parentPath)\"></button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: subControl, data: data[control.field], parentPath: path, rowIndex: rowIndex, path: path + '.' + subControl.field, showLabel: subControl.showLabel, mdWidth: subControl.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkboxlist'\">\r\n <check-box-list [control]=\"control\" [dataSource]=\"data._source[control.field] || control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </check-box-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'radiobuttonlist'\">\r\n <radio-button-list [control]=\"control\" [dataSource]=\"control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\">\r\n </radio-button-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorPicker'\">\r\n <tn-color-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-color-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.field]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.field]\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorControl'\">\r\n <span class=\"show-color-control\" [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormAddressComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\"\r\n [disabled]=\"checkDisabled(data, control)\" [(data)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </address-picker> -->\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete-picker'\">\r\n <autocomplete-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </autocomplete-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'entity-picker'\">\r\n <entity-picker [control]=\"control\" [children]=\"children\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </entity-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc'\">\r\n <cocautochuc-picker [control]=\"control\" [parentOrgId]=\"control.parentOrgId\"\r\n [disabled]=\"checkDisabled(data, control)\" [parentOrgCode]=\"control.parentOrgCode\"\r\n [filter]=\"control.filter\" [multiple]=\"control.multiple\" [required]=\"control.required\"\r\n [isUsingId]=\"control.isUsingId\" [disabledParentItem]=\"control.disabledParentItem\"\r\n [rootParentId]=\"control.rootParentId\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </cocautochuc-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc-picker'\">\r\n <cocautochuc-picker-list [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </cocautochuc-picker-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'vanban'\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormVanBanPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\" [readOnly]=\"control.readOnly\"\r\n [loaiVanBan]=\"control.loaiVanBan\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </vanban-picker> -->\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'congviec'\">\r\n <div>\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormCongViecPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <congviec-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </congviec-picker> -->\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'percent'\">\r\n <div>\r\n <tn-mask [suffix]=\"'%'\" [placeholder]=\"control.placeholder\" [maskType]=\"'int'\" [min]=\"0\" [max]=\"100\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n <p-slider [step]=\"1\" [min]=\"0\" [max]=\"100\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onSlideEnd)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-slider>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'common-picker'\">\r\n <common-picker [control]=\"control\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\"\r\n [groupKey]=\"groupKey\" [valueInGroup]=\"model[control.field]\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event,'change', data, parentPath);\">\r\n </common-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table class=\"new-table scr-table table-control\" [value]=\"data[control.field]\"\r\n [columns]=\"control.headerTemplate\" [responsive]=\"true\" [scrollable]=\"false\"\r\n [rowTrackBy]=\"trackByFuncId\"\r\n (onRowReorder)=\"handleRowOrdered(control, $event, 'rowReorder', data, parentPath)\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-rowData let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 5%\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\" tooltipPosition=\"top\"\r\n style=\"text-align: center;\" [style.width]=\"subControl.width\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"control.enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"control.showFunction\" [style.width]=\"control.widthFunctionColumn\"\r\n class=\"table-function column-function\">\r\n <div class=\"cell-header-function\"><span>Ch\u1EE9c n\u0103ng</span></div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr [pReorderableRow]=\"ri\">\r\n <td class=\"stt\" style=\"text-align: center; vertical-align: inherit\">\r\n <span>\r\n {{ri + 1}}\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [class.control-inside]=\"true\" [class]=\"subControl.class\"\r\n [ngStyle]=\"{'text-align': getTextAlign(subControl.textAlign), 'vertical-align': 'inherit'}\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-template [ngIf]=\"getControlType(subControl) != 'column'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]=\"getControlType(subControl) == 'column'\">\r\n <span>{{_modelData[control.field][ri][subControl.field]}}</span>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"control.enableReorderRow\" class=\"no-padding center v-center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\"\r\n pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"control.showFunction\" style=\"text-align: center\"\r\n class=\"column-function text-center\">\r\n <div *ngIf=\"!control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <button *ngIf=\"control.showSave\" [disabled]=\"rowData._disableSave\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-save\" [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-pencil\" [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton\r\n class=\"p-button-text p-button-danger p-button-rounded\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n (click)=\"deleteRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.rowButtons\" type=\"button\" pButton\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData, control)\"></button>\r\n </div>\r\n <div *ngIf=\"control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <ng-container\r\n *ngTemplateOutlet=\"control.rowButtonTemplate; context: {rowData: _modelData[control.field][ri], rowIndex: ri, path: path, control: control}\">\r\n </ng-container>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"control.summaryTemplate\" pTemplate=\"summary\" let-rowData>\r\n <ng-container *ngTemplateOutlet=\"control.summaryTemplate; context: {rowData: rowData}\">\r\n </ng-container>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"control.showFooter\" class=\"--table-schema-footer\">\r\n <button *ngIf=\"control.showAdd\" type=\"button\" pButton style=\"width:auto\" label=\"Th\u00EAm m\u1EDBi\"\r\n icon=\"pi pi-plus\" class=\"p-button-text\" (click)=\"addNewRow(control, path)\"></button>\r\n <span *ngIf=\"control.showDialog\" style=\"font-weight: normal;\">\r\n <p-checkbox label=\"M\u1EDF dialog\" [binary]=\"true\" [(ngModel)]=\"control.showEdit\">\r\n </p-checkbox>\r\n </span>\r\n <button *ngIf=\"control.enableAddMulti\" type=\"button\" pButton\r\n style=\"width:auto; margin-left:10px;\" label=\"Th\u00EAm nhi\u1EC1u\" icon=\"pi pi-clone\"\r\n class=\"p-button-text\" (click)=\"addMultiRow(control, 5, path)\"></button>\r\n <button *ngFor=\"let bt of control.footerButtons\" type=\"button\" pButton [class]=\"bt.class\"\r\n [icon]=\"bt.icon\" [label]=\"bt.label | translate\" style=\"width:auto; margin-left:10px;\"\r\n (click)=\"messageRow( -1, control, path)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.field)\" [ngTemplateOutletContext]=\"{\r\n crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange\r\n }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"validation; context: {control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #validation let-control=\"control\" let-data=\"data\">\r\n <ng-container *ngIf=\"data._errors[control.field].length > 0\">\r\n <div class=\"error-container\">\r\n <ng-container *ngFor=\"let error of data._errors[control.field]\">\r\n <div class=\"error-item\" *ngIf=\"error\">\r\n <ng-container [ngTemplateOutlet]=\"errorMessage\" [ngTemplateOutletContext]=\"{content: error}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #errorMessage let-content=\"content\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-ban\"></i>\r\n <span> {{content}}</span>\r\n </div>\r\n</ng-template>\r\n<ng-template #labelControl let-control=\"control\">\r\n <ng-container>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\" [attr.label-index]=\"control.indexLabel\"\r\n [pTooltip]=\"control.title\" tooltipPosition=\"top\" tooltipStyleClass=\"wrap\" [escape]=\"false\"\r\n [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<tn-dialog *ngIf=\"tableFormShow\" #dialog [styleClass]=\"'address-form'\" [header]=\"tableFormTitle | translate\"\r\n [popupSize]=\"tableFormPopupSize\" (onHide)=\"tableFormShow = false\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate['crudFormTableDetailForm']; context: {\r\n $implicit: tableFormSchema, parentSetting: setting, data: tableFormData, onSaved: handleSavedTableRow, onCancel: handleCancelEditTableRow,\r\n onInit: handleInitTableDetailForm\r\n }\"></ng-container>\r\n <!-- <table-detail-form #formBase [parentSetting]=\"setting\" [schema]=\"tableFormSchema\" [data]=\"tableFormData\"\r\n (onSaved)=\"handleSavedTableRow($event)\" (onCancel)=\"tableFormShow = false\">\r\n </table-detail-form> -->\r\n <ng-template #footer>\r\n <ng-container *ngTemplateOutlet=\"tableFormFooterTemplate\"></ng-container>\r\n </ng-template>\r\n</tn-dialog>", styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;position:absolute;padding-left:.2em;padding-top:.3em}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{display:flex;align-items:center;font-weight:600;padding:.5em;border-width:0 1px 1px;background:#f8f9fa;color:#495057;border:1px solid #e9ecef}.show-in-box{border:1px solid #ced4da;border-radius:5px}.not-show-in-box{padding:0}.view-mode div.label{padding-bottom:3px}.view-mode div.label label{font-weight:700;font-size:.85em}.view-mode>span:not(:empty){display:inline-block;width:100%;padding:5px 0}.view-mode.type-table div.label+div{padding:5px 0}td>.view-mode{display:inline-block;padding:.25rem .5rem}td>.view-mode .view-mode{padding:0}.crud-form-control div[role=checkbox-alone]{margin-top:24px}.crud-form-control div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control .label+div[role=checkbox-alone]{margin-top:11px}.crud-form-control.type-table div[role=checkbox-alone]{margin-top:6px;text-align:center}.crud-form-control.type-table div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control.type-table div[role=checkbox-alone].align-left{text-align:left}.crud-form-control.type-title{font-size:1.2rem;font-weight:700;color:#025ba7;border-bottom:1px solid #cfcfcf;text-transform:uppercase;padding:5px;margin-bottom:5px}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{font-size:.8rem;color:#6c757d;margin-bottom:5px;margin-left:10px}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{margin-bottom:5px;font-size:.9em;height:1.15em}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{overflow:visible;animation:shrink .1s;min-height:20px;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{display:flex;position:relative;color:red;font-size:.9em;animation:fadeIn .1s}::ng-deep .crud-form-control>.error-container .error-item .error-content i{font-size:.9em;display:flex;padding-top:1px}::ng-deep .crud-form-control>.error-container .error-item .error-content span{display:flex;padding-left:5px}::ng-deep .crud-form-control.no-label>div.label{display:none}::ng-deep .crud-form-control.error select,::ng-deep .crud-form-control.error textarea,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown{border-color:#ff5722!important}::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-autocomplete-multiple-container:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #ffc4b3}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) select,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) textarea,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) input,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown{border-color:#ced4da!important}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown.tn-dropdown.p-focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext:enabled:focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-focus{box-shadow:0 0 0 .2rem #a6d5fa}@keyframes fadeIn{0%{opacity:0;top:-25px}to{opacity:1;top:0}}@keyframes shrink{0%{height:0}to{height:20px}}@media screen and (min-width: 40.063em){.label-right{padding-left:2em}}::ng-deep crud-form .crud-form-container{padding:.5rem .5rem 0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside{padding:0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}::ng-deep crud-form base-congviec-form crud-form>.crud-form-container{padding:0}:host ::ng-deep .tox-tinymce{border:none;border-top:1px solid #ccc;overflow:unset}:host ::ng-deep .tox-tinymce .tox-editor-container{overflow:unset}:host ::ng-deep .tox-tinymce .tox-toolbar{border:1px solid #ccc;border-bottom:none}:host ::ng-deep .tox-tinymce .tox-edit-area{border:1px solid #ccc}:host ::ng-deep .tox-tinymce .tox-edit-area iframe{box-shadow:inset 0 1px 1px #00000013}:host ::ng-deep .tox-tinymce .tox-menubar{border:1px solid #ccc}:host ::ng-deep .tox .tox-edit-area.tinymce-focus{border:1px solid #66afe9;box-shadow:inset 0 1px 1px #00000013,0 0 3px #66afe9;transition:box-shadow .3s,border-color .3s;transition-property:box-shadow,border-color;transition-duration:.3s,.3s;transition-timing-function:ease,ease;transition-delay:0s,0s}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{margin-bottom:40px;display:block}\n"] }]
@@ -27734,24 +27667,20 @@ class ArticleService extends BaseService {
27734
27667
  return this.defaultGet(apiUrl);
27735
27668
  }
27736
27669
  createWithFormData(formData) {
27737
- return this._http
27738
- .post(`${this.serviceUri}/CreateWithFormData`, formData)
27739
- .toPromise();
27670
+ return firstValueFrom(this._http
27671
+ .post(`${this.serviceUri}/CreateWithFormData`, formData));
27740
27672
  }
27741
27673
  updateWithFormData(id, formData) {
27742
- return this._http
27743
- .post(`${this.serviceUri}/UpdateWithFormData/${id}`, formData)
27744
- .toPromise();
27674
+ return firstValueFrom(this._http
27675
+ .post(`${this.serviceUri}/UpdateWithFormData/${id}`, formData));
27745
27676
  }
27746
27677
  updateStatusItem(formData) {
27747
- return this._http
27748
- .post(`${this.serviceUri}/UpdateStatusItem`, formData)
27749
- .toPromise();
27678
+ return firstValueFrom(this._http
27679
+ .post(`${this.serviceUri}/UpdateStatusItem`, formData));
27750
27680
  }
27751
27681
  updateStatusItemMultiple(formData) {
27752
- return this._http
27753
- .post(`${this.serviceUri}/UpdateStatusItemMultiple`, formData)
27754
- .toPromise();
27682
+ return firstValueFrom(this._http
27683
+ .post(`${this.serviceUri}/UpdateStatusItemMultiple`, formData));
27755
27684
  }
27756
27685
  getArtileByStatus(statusView, key, offset, limit, sortField, isAsc = null, isIgnoreCache = false) {
27757
27686
  let queryString = `/GetByFilterLanguage?statusView=${statusView}`;
@@ -28913,7 +28842,7 @@ class CongviecDinhkemService extends BaseService {
28913
28842
  }
28914
28843
  themDinhKemNghiepVu(taskId, data) {
28915
28844
  const url = `${this.serviceUri}/ThemDinhKem/${taskId}`;
28916
- return this._http.post(url, data).toPromise();
28845
+ return firstValueFrom(this._http.post(url, data));
28917
28846
  }
28918
28847
  getDetailItem(serviceCode, entity, entityKey, fieldDisplay) {
28919
28848
  const serviceCodeEndpoint = this._environmentService.getHttpServiceEndpointWithVersion(serviceCode);
@@ -28929,7 +28858,7 @@ class CongviecDinhkemService extends BaseService {
28929
28858
  filters: [this.newFilter('id', Operator.equal, entityKey)],
28930
28859
  sorts: []
28931
28860
  });
28932
- return this._http.post(uri, gridInfo).toPromise();
28861
+ return firstValueFrom(this._http.post(uri, gridInfo));
28933
28862
  }
28934
28863
  async getDetailItems(dicGrouped) {
28935
28864
  const result = {};
@@ -28964,7 +28893,7 @@ class CongviecDinhkemService extends BaseService {
28964
28893
  sorts: []
28965
28894
  });
28966
28895
  try {
28967
- const data = await (this._http.post(uri, gridInfo).toPromise());
28896
+ const data = await (firstValueFrom(this._http.post(uri, gridInfo)));
28968
28897
  if (data.success && data.data && data.data.length) {
28969
28898
  data.data.forEach(itemDetail => {
28970
28899
  result[serviceCode][entity][itemDetail.id] = itemDetail[dataByEntity.fieldHienThi];
@@ -29006,8 +28935,7 @@ class FolderService extends BaseService {
29006
28935
  this.serviceUri = `${this.endPoint}/Folder`;
29007
28936
  }
29008
28937
  testGrpcTrace() {
29009
- return this._http.get(`${this.endPoint}/TraceTest/TestGrpcTrace`)
29010
- .toPromise();
28938
+ return firstValueFrom(this._http.get(`${this.endPoint}/TraceTest/TestGrpcTrace`));
29011
28939
  }
29012
28940
  copyMultipleFolder(idsFolder, targetFolderId) {
29013
28941
  const url = `${this.serviceUri}/CopyMultipleFolder`;
@@ -29193,18 +29121,18 @@ class MyDriveService extends BaseService {
29193
29121
  return Promise.reject({ status: 400 });
29194
29122
  }
29195
29123
  const svUrl = `${this._serviceUri}/File/GetFileExplorerById?fileId=${fileId}`;
29196
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29124
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29197
29125
  }
29198
29126
  getMyFiles() {
29199
29127
  const svUrl = `${this._serviceUri}/File/GetMyFiles`;
29200
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29128
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29201
29129
  }
29202
29130
  getByFolderId(folderId) {
29203
29131
  if (folderId == '00000000-0000-0000-0000-000000000000') {
29204
29132
  return Promise.reject({ status: 400 });
29205
29133
  }
29206
29134
  const svUrl = `${this._serviceUri}/File?folderId=${folderId}`;
29207
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29135
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29208
29136
  }
29209
29137
  getMyShare(userId) {
29210
29138
  if (userId < 0) {
@@ -29212,7 +29140,7 @@ class MyDriveService extends BaseService {
29212
29140
  }
29213
29141
  // const svUrl = `${this._serviceUri}/Folder/GetMyShare?userId=${userId}`;
29214
29142
  const svUrl = `${this._serviceUri}/File/GetMyShare?userId=${userId}`;
29215
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29143
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29216
29144
  }
29217
29145
  getMyShareToOther(ownerId) {
29218
29146
  if (ownerId < 0) {
@@ -29220,51 +29148,50 @@ class MyDriveService extends BaseService {
29220
29148
  }
29221
29149
  // const svUrl = `${this._serviceUri}/Folder/GetMyShareToOther?ownerId=${ownerId}`;
29222
29150
  const svUrl = `${this._serviceUri}/File/GetMyShareToOther?ownerId=${ownerId}`;
29223
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29151
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29224
29152
  }
29225
29153
  getFolderTree(folderId) {
29226
29154
  if (folderId == '00000000-0000-0000-0000-000000000000') {
29227
29155
  return Promise.reject({ status: 400 });
29228
29156
  }
29229
29157
  const apiUrl = `${this._serviceUri}/File/GetTree?folderId=${folderId}`;
29230
- return this._http.get(apiUrl)
29231
- .pipe(catchError((err) => this.handleError(err)))
29232
- .toPromise();
29158
+ return firstValueFrom(this._http.get(apiUrl)
29159
+ .pipe(catchError((err) => this.handleError(err))));
29233
29160
  }
29234
29161
  getShareToOtherByFolderId(folderId, objectId) {
29235
29162
  if (folderId == '00000000-0000-0000-0000-000000000000') {
29236
29163
  return Promise.reject({ status: 400 });
29237
29164
  }
29238
29165
  const svUrl = `${this._serviceUri}/File/GetFileExplorerShareToOther?folderId=${folderId}&objectId=${objectId}`;
29239
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29166
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29240
29167
  }
29241
29168
  createNewFolder(folder) {
29242
29169
  const svUrl = `${this._serviceUri}/Folder`;
29243
- return this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))).toPromise();
29170
+ return firstValueFrom(this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))));
29244
29171
  }
29245
29172
  deleteFolder(folderId) {
29246
29173
  const svUrl = `${this._serviceUri}/Folder/${folderId}`;
29247
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29174
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29248
29175
  }
29249
29176
  deleteMultipleFolder(folderIds) {
29250
29177
  const svUrl = `${this._serviceUri}/Folder/deleteMultipleFolder`;
29251
- return this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err))).toPromise();
29178
+ return firstValueFrom(this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err))));
29252
29179
  }
29253
29180
  renameFolder(folderId, newFolderName) {
29254
29181
  const svUrl = `${this._serviceUri}/Folder/${folderId}/RenameFolder/${newFolderName}`;
29255
- return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))).toPromise();
29182
+ return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
29256
29183
  }
29257
29184
  shareFolder(shareFolder) {
29258
29185
  const svUrl = `${this._serviceUri}/Folder/ShareFolder`;
29259
- return this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))).toPromise();
29186
+ return firstValueFrom(this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))));
29260
29187
  }
29261
29188
  deleteShareFolder(folderId, objectId) {
29262
29189
  const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteUserShareFolder/${objectId}`;
29263
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29190
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29264
29191
  }
29265
29192
  deleteShareFolderToOther(folderId, ownerId) {
29266
29193
  const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteShareFolder/${ownerId}`;
29267
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29194
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29268
29195
  }
29269
29196
  getUploadUrl() {
29270
29197
  return `${this._serviceUri}/File`;
@@ -29274,7 +29201,7 @@ class MyDriveService extends BaseService {
29274
29201
  }
29275
29202
  getFile(fileId) {
29276
29203
  const svUrl = `${this._serviceUri}/File/${fileId}`;
29277
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29204
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29278
29205
  }
29279
29206
  getFileVersionDownloadUrl(fileVersionId) {
29280
29207
  return `${this._serviceUri}/FileVersion/${fileVersionId}/download`;
@@ -29287,7 +29214,7 @@ class MyDriveService extends BaseService {
29287
29214
  if (model.isFileVersion && !model.fileVersionId) {
29288
29215
  model.fileVersionId = model.fileId;
29289
29216
  }
29290
- return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))).toPromise();
29217
+ return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
29291
29218
  }
29292
29219
  downloadFile(fileId, isFileVersion = false) {
29293
29220
  const model = new GenerateLinkDownloadDTO();
@@ -29300,63 +29227,63 @@ class MyDriveService extends BaseService {
29300
29227
  }
29301
29228
  generateLinkDownloadMultiple(model) {
29302
29229
  const svUrl = `${this._serviceUri}/Download/GenerateDownloadMultipleLink`;
29303
- return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))).toPromise();
29230
+ return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
29304
29231
  }
29305
29232
  getBinaryFile(linkDownload) {
29306
- return this._http.get(linkDownload).toPromise();
29233
+ return firstValueFrom(this._http.get(linkDownload));
29307
29234
  }
29308
29235
  setMoveFileItem(moveFile) {
29309
29236
  const svUrl = `${this._serviceUri}/File/MoveFile`;
29310
- return this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))).toPromise();
29237
+ return firstValueFrom(this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))));
29311
29238
  }
29312
29239
  deleteFile(fileId) {
29313
29240
  const svUrl = `${this._serviceUri}/File/${fileId}`;
29314
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29241
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29315
29242
  }
29316
29243
  deleteMultipleFile(fileIds) {
29317
29244
  const svUrl = `${this._serviceUri}/File/deleteMultipleFile`;
29318
- return this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err))).toPromise();
29245
+ return firstValueFrom(this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err))));
29319
29246
  }
29320
29247
  deleteFileVersion(fileVersionId) {
29321
29248
  const svUrl = `${this._serviceUri}/FileVersion/${fileVersionId}`;
29322
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29249
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29323
29250
  }
29324
29251
  renameFile(fileId, newFileName) {
29325
29252
  const svUrl = `${this._serviceUri}/File/${fileId}/RenameFile/${newFileName}`;
29326
- return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))).toPromise();
29253
+ return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
29327
29254
  }
29328
29255
  shareFile(shareFile) {
29329
29256
  const svUrl = `${this._serviceUri}/File/ShareFile`;
29330
- return this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))).toPromise();
29257
+ return firstValueFrom(this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))));
29331
29258
  }
29332
29259
  deleteShareFile(fileId, objectId) {
29333
29260
  const svUrl = `${this._serviceUri}/File/${fileId}/DeleteUserShareFile/${objectId}`;
29334
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29261
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29335
29262
  }
29336
29263
  deleteShareFileToOther(fileId, ownerId) {
29337
29264
  const svUrl = `${this._serviceUri}/File/${fileId}/DeleteShareFile/${ownerId}`;
29338
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29265
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29339
29266
  }
29340
29267
  getSharedFiles(folderId) {
29341
29268
  let svUrl = `${this._serviceUri}/File/GetMySharedFiles`;
29342
29269
  if (folderId) {
29343
29270
  svUrl = `${svUrl}?folderId=${folderId}`;
29344
29271
  }
29345
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29272
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29346
29273
  }
29347
29274
  getUserSharingByFile(fileId) {
29348
29275
  let svUrl = `${this._serviceUri}/File/GetUserSharingByFile`;
29349
29276
  if (fileId) {
29350
29277
  svUrl = `${svUrl}?fileId=${fileId}`;
29351
29278
  }
29352
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29279
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29353
29280
  }
29354
29281
  getFolderId(userId) {
29355
29282
  let svUrl = `${this._serviceUri}/Folder/GetFolderId`;
29356
29283
  if (userId) {
29357
29284
  svUrl = `${svUrl}?userId=${userId}`;
29358
29285
  }
29359
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29286
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29360
29287
  }
29361
29288
  isSupportedViewOnline(fileName) {
29362
29289
  // file không có đuổi -> loại
@@ -29407,7 +29334,7 @@ class MyDriveService extends BaseService {
29407
29334
  'title': fileName,
29408
29335
  'url': downloadUrl
29409
29336
  };
29410
- this._http.post(service, input).toPromise().then((rsConvert) => {
29337
+ firstValueFrom(this._http.post(service, input)).then((rsConvert) => {
29411
29338
  resolve(rsConvert.fileUrl);
29412
29339
  }, err => {
29413
29340
  reject(null);
@@ -29418,7 +29345,7 @@ class MyDriveService extends BaseService {
29418
29345
  });
29419
29346
  }
29420
29347
  print(fileUrl) {
29421
- // this._http.get(fileUrl).toPromise().then((rs: any) => {
29348
+ // firstValueFrom(this._http.get(fileUrl)).then((rs: any) => {
29422
29349
  // const pdfBlob = new Blob([rs], { type: "application/pdf" });
29423
29350
  // const url = URL.createObjectURL(pdfBlob);
29424
29351
  // printJS(url);
@@ -29515,7 +29442,7 @@ class TnClientService {
29515
29442
  if (connetionState) {
29516
29443
  // send command
29517
29444
  command.sourceConnectionId = this._connection.id;
29518
- const status = await this._connection.status.toPromise();
29445
+ const status = await firstValueFrom(this._connection.status);
29519
29446
  console.log('status connection signalr', status);
29520
29447
  this._connection.invoke('SendCommand', command);
29521
29448
  resolve();
@@ -29560,7 +29487,7 @@ class FileVersionService extends BaseService {
29560
29487
  }
29561
29488
  getListFileVersions(fileId) {
29562
29489
  const svUrl = `${this.serviceUri}/GetFileVersionsByFileId/${fileId}`;
29563
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29490
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29564
29491
  }
29565
29492
  createNewMinorVersion(fileInstanceId, fileVersionInstanceId, isFileVersion) {
29566
29493
  const svUrl = `${this.serviceUri}/CreateNewMinorVersion`;
@@ -29587,7 +29514,7 @@ class FileVersionService extends BaseService {
29587
29514
  }
29588
29515
  getNextMajorVersion(fileId) {
29589
29516
  const svUrl = `${this.serviceUri}/GetNextMajorVersion/${fileId}`;
29590
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29517
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29591
29518
  }
29592
29519
  setVersionToMajor(fileVersionInstanceId) {
29593
29520
  const svUrl = `${this.serviceUri}/SetVersionToMajor`;
@@ -29596,7 +29523,7 @@ class FileVersionService extends BaseService {
29596
29523
  }
29597
29524
  deleteFileVersion(fileVersionId) {
29598
29525
  const svUrl = `${this.serviceUri}/Delete/${fileVersionId}`;
29599
- return this._http.delete(svUrl).toPromise();
29526
+ return firstValueFrom(this._http.delete(svUrl));
29600
29527
  }
29601
29528
  handleError(error) {
29602
29529
  if (error.status === 401) {
@@ -29627,72 +29554,71 @@ class FileExplorerNewService extends BaseService {
29627
29554
  }
29628
29555
  getMyFiles() {
29629
29556
  const svUrl = `${this._serviceUri}/File/GetMyFiles`;
29630
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29557
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29631
29558
  }
29632
29559
  getByFolderId(folderId) {
29633
29560
  if (folderId == '00000000-0000-0000-0000-000000000000') {
29634
29561
  return Promise.reject({ status: 400 });
29635
29562
  }
29636
29563
  const svUrl = `${this._serviceUri}/File?folderId=${folderId}`;
29637
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29564
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29638
29565
  }
29639
29566
  getMyDrive(folderId) {
29640
29567
  if (folderId == '00000000-0000-0000-0000-000000000000') {
29641
29568
  return Promise.reject({ status: 400 });
29642
29569
  }
29643
29570
  const svUrl = `${this._serviceUri}/File/GetMyDrive?folderId=${folderId}`;
29644
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29571
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29645
29572
  }
29646
29573
  getMyShare(userId) {
29647
29574
  if (userId < 0) {
29648
29575
  return Promise.reject({ status: 400 });
29649
29576
  }
29650
29577
  const svUrl = `${this._serviceUri}/Folder/GetMyShare?userId=${userId}`;
29651
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29578
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29652
29579
  }
29653
29580
  getMyShareToOther(ownerId) {
29654
29581
  if (ownerId < 0) {
29655
29582
  return Promise.reject({ status: 400 });
29656
29583
  }
29657
29584
  const svUrl = `${this._serviceUri}/Folder/GetMyShareToOther?ownerId=${ownerId}`;
29658
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29585
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29659
29586
  }
29660
29587
  getFolderTree(folderId) {
29661
29588
  if (folderId == '00000000-0000-0000-0000-000000000000') {
29662
29589
  return Promise.reject({ status: 400 });
29663
29590
  }
29664
29591
  const apiUrl = `${this._serviceUri}/File/GetTree?folderId=${folderId}`;
29665
- return this._http.get(apiUrl)
29666
- .pipe(catchError((err) => this.handleError(err)))
29667
- .toPromise();
29592
+ return firstValueFrom(this._http.get(apiUrl)
29593
+ .pipe(catchError((err) => this.handleError(err))));
29668
29594
  }
29669
29595
  copyFile(copyFileDto) {
29670
29596
  const svUrl = `${this._serviceUri}/File/CopyFile`;
29671
- return this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))).toPromise();
29597
+ return firstValueFrom(this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))));
29672
29598
  }
29673
29599
  createNewFolder(folder) {
29674
29600
  const svUrl = `${this._serviceUri}/Folder`;
29675
- return this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))).toPromise();
29601
+ return firstValueFrom(this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))));
29676
29602
  }
29677
29603
  deleteFolder(folderId) {
29678
29604
  const svUrl = `${this._serviceUri}/Folder/${folderId}`;
29679
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29605
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29680
29606
  }
29681
29607
  deleteMultipleFolder(folderIds) {
29682
29608
  const svUrl = `${this._serviceUri}/Folder/deleteMultipleFolder/${folderIds}`;
29683
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29609
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29684
29610
  }
29685
29611
  renameFolder(folderId, newFolderName) {
29686
29612
  const svUrl = `${this._serviceUri}/Folder/${folderId}/RenameFolder/${newFolderName}`;
29687
- return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))).toPromise();
29613
+ return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
29688
29614
  }
29689
29615
  shareFolder(shareFolder) {
29690
29616
  const svUrl = `${this._serviceUri}/Folder/ShareFolder`;
29691
- return this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))).toPromise();
29617
+ return firstValueFrom(this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))));
29692
29618
  }
29693
29619
  deleteShareFolder(folderId, objectId) {
29694
29620
  const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteShareFolder/${objectId}`;
29695
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29621
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29696
29622
  }
29697
29623
  getUploadUrl() {
29698
29624
  return `${this._serviceUri}/File`;
@@ -29702,7 +29628,7 @@ class FileExplorerNewService extends BaseService {
29702
29628
  }
29703
29629
  getBinaryFileByFileId(fileId) {
29704
29630
  return new Promise((resolve, reject) => {
29705
- this._http.get(this.getFileDownloadUrl(fileId)).toPromise().then(rs => {
29631
+ firstValueFrom(this._http.get(this.getFileDownloadUrl(fileId))).then(rs => {
29706
29632
  console.log(rs);
29707
29633
  resolve(null);
29708
29634
  }).catch(err => reject(err));
@@ -29713,7 +29639,7 @@ class FileExplorerNewService extends BaseService {
29713
29639
  }
29714
29640
  getFile(fileId) {
29715
29641
  const svUrl = `${this._serviceUri}/File/${fileId}`;
29716
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29642
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29717
29643
  }
29718
29644
  getFileVersionDownloadUrl(fileVersionId) {
29719
29645
  return `${this._serviceUri}/FileVersion/${fileVersionId}/download`;
@@ -29726,7 +29652,7 @@ class FileExplorerNewService extends BaseService {
29726
29652
  if (model.isFileVersion && !model.fileVersionId) {
29727
29653
  model.fileVersionId = model.fileId;
29728
29654
  }
29729
- return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))).toPromise();
29655
+ return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
29730
29656
  }
29731
29657
  downloadFile(fileId, isFileVersion = false) {
29732
29658
  const model = new GenerateLinkDownloadDTO();
@@ -29739,59 +29665,59 @@ class FileExplorerNewService extends BaseService {
29739
29665
  }
29740
29666
  generateLinkDownloadMultiple(model) {
29741
29667
  const svUrl = `${this._serviceUri}/Download/GenerateDownloadMultipleLink`;
29742
- return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))).toPromise();
29668
+ return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
29743
29669
  }
29744
29670
  getBinaryFile(linkDownload) {
29745
- return this._http.get(linkDownload).toPromise();
29671
+ return firstValueFrom(this._http.get(linkDownload));
29746
29672
  }
29747
29673
  setMoveFileItem(moveFile) {
29748
29674
  const svUrl = `${this._serviceUri}/File/MoveFile`;
29749
- return this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))).toPromise();
29675
+ return firstValueFrom(this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))));
29750
29676
  }
29751
29677
  deleteFile(fileId) {
29752
29678
  const svUrl = `${this._serviceUri}/File/${fileId}`;
29753
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29679
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29754
29680
  }
29755
29681
  deleteMultipleFile(fileIds) {
29756
29682
  const svUrl = `${this._serviceUri}/File/deleteMultipleFile/${fileIds}`;
29757
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29683
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29758
29684
  }
29759
29685
  deleteFileVersion(fileVersionId) {
29760
29686
  const svUrl = `${this._serviceUri}/FileVersion/${fileVersionId}`;
29761
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29687
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29762
29688
  }
29763
29689
  renameFile(fileId, newFileName) {
29764
29690
  const svUrl = `${this._serviceUri}/File/${fileId}/RenameFile/${newFileName}`;
29765
- return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))).toPromise();
29691
+ return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
29766
29692
  }
29767
29693
  shareFile(shareFile) {
29768
29694
  const svUrl = `${this._serviceUri}/File/ShareFile`;
29769
- return this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))).toPromise();
29695
+ return firstValueFrom(this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))));
29770
29696
  }
29771
29697
  deleteShareFile(fileId, objectId) {
29772
29698
  const svUrl = `${this._serviceUri}/File/${fileId}/DeleteShareFile/${objectId}`;
29773
- return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))).toPromise();
29699
+ return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
29774
29700
  }
29775
29701
  getSharedFiles(folderId) {
29776
29702
  let svUrl = `${this._serviceUri}/File/GetMySharedFiles`;
29777
29703
  if (folderId) {
29778
29704
  svUrl = `${svUrl}?folderId=${folderId}`;
29779
29705
  }
29780
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29706
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29781
29707
  }
29782
29708
  getUserSharingByFile(fileId) {
29783
29709
  let svUrl = `${this._serviceUri}/File/GetUserSharingByFile`;
29784
29710
  if (fileId) {
29785
29711
  svUrl = `${svUrl}?fileId=${fileId}`;
29786
29712
  }
29787
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29713
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29788
29714
  }
29789
29715
  getFolderId(userId) {
29790
29716
  let svUrl = `${this._serviceUri}/Folder/GetFolderId`;
29791
29717
  if (userId) {
29792
29718
  svUrl = `${svUrl}?userId=${userId}`;
29793
29719
  }
29794
- return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))).toPromise();
29720
+ return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
29795
29721
  }
29796
29722
  isSupportedViewOnline(fileName) {
29797
29723
  // file không có đuổi -> loại
@@ -29842,7 +29768,7 @@ class FileExplorerNewService extends BaseService {
29842
29768
  'title': fileName,
29843
29769
  'url': downloadUrl
29844
29770
  };
29845
- this._http.post(service, input).toPromise().then((rsConvert) => {
29771
+ firstValueFrom(this._http.post(service, input)).then((rsConvert) => {
29846
29772
  resolve(rsConvert.fileUrl);
29847
29773
  }, err => {
29848
29774
  reject(null);
@@ -29873,19 +29799,19 @@ class FileExplorerNewService extends BaseService {
29873
29799
  return fileExtArr[fileExtArr.length - 1].toLowerCase() === 'pdf';
29874
29800
  }
29875
29801
  saveSignedFile(data) {
29876
- return this._http.post(`${this._serviceUri}/Signature/SaveSignedFile`, data).toPromise();
29802
+ return firstValueFrom(this._http.post(`${this._serviceUri}/Signature/SaveSignedFile`, data));
29877
29803
  }
29878
29804
  getSignatureInfoByFileId(fileId) {
29879
- return this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileId?fileId=${fileId}`).toPromise();
29805
+ return firstValueFrom(this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileId?fileId=${fileId}`));
29880
29806
  }
29881
29807
  getSignatureInfoByFileVersionId(fileVersionId) {
29882
- return this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`).toPromise();
29808
+ return firstValueFrom(this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`));
29883
29809
  }
29884
29810
  getImageFileBase64(fileId, extension = 'jpg', width = 0, height = 0) {
29885
29811
  return new Promise((resolve, reject) => {
29886
29812
  const url = `${this._serviceUri}/File/getImageFileBase64?fileId=${fileId}&extension=${extension}&width=${width}&height=${height}`;
29887
- this._http.get(url, { responseType: 'blob' })
29888
- .toPromise().then(rs => {
29813
+ firstValueFrom(this._http.get(url, { responseType: 'blob' }))
29814
+ .then(rs => {
29889
29815
  const reader = new FileReader();
29890
29816
  reader.addEventListener('load', () => {
29891
29817
  resolve(reader.result);
@@ -29903,9 +29829,8 @@ class FileExplorerNewService extends BaseService {
29903
29829
  }
29904
29830
  getServiceFileExplorer(model) {
29905
29831
  const svUrl = `${this._serviceUri}/File/GetServiceFileExplorer?service=${model.service}&entity=${model.entity}&entityInstanceId=${model.entityInstanceId}`;
29906
- return this._http.get(svUrl)
29907
- .pipe(catchError((err) => this.handleError(err)))
29908
- .toPromise();
29832
+ return firstValueFrom(this._http.get(svUrl)
29833
+ .pipe(catchError((err) => this.handleError(err))));
29909
29834
  }
29910
29835
  }
29911
29836
  FileExplorerNewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileExplorerNewService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -30263,7 +30188,7 @@ class FileViewerComponent extends ComponentBase {
30263
30188
  || event.target.classList.contains('iv-image-view')) {
30264
30189
  this.model.activeTopbarItem = false;
30265
30190
  this.show = false;
30266
- this.onClose.next();
30191
+ this.onClose.next(1);
30267
30192
  }
30268
30193
  }
30269
30194
  print() {
@@ -30367,7 +30292,7 @@ class FileViewerComponent extends ComponentBase {
30367
30292
  }
30368
30293
  }
30369
30294
  FileViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileViewerComponent, deps: [{ token: EnvironmentService }, { token: i0.ElementRef }, { token: AuthenService }, { token: FileExplorerService }, { token: i2.MessageService }, { token: i1.TranslateService }, { token: NotifierService }, { token: i2.ConfirmationService }, { token: TnClientService }, { token: FileVersionService }, { token: CustomRouterService }, { token: i1$3.DeviceDetectorService }, { token: FileObjectService }, { token: DownloadLinkService }, { token: FolderService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
30370
- FileViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileViewerComponent, selector: "file-viewer", inputs: { model: "model", readonly: "readonly", showPrint: "showPrint", showDownload: "showDownload", showDelete: "showDelete" }, outputs: { onClose: "onClose", onRename: "onRename", onDelete: "onDelete" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-sidebar #sidebar [showCloseIcon]=\"false\" [fullScreen]=\"true\" [appendTo]=\"'body'\"\r\n [styleClass]=\"getStyleClassByDocumentType(data.fileType)\" [(visible)]=\"show\">\r\n <ng-container *ngIf=\"data.fileType == fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\" style=\"margin: 0px auto;\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <!-- UD-2450 - TuDN -->\r\n <!-- <a *ngIf=\"_deviceDetectorService.isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\"\r\n tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a> -->\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <!-- End UD-2450 - TuDN -->\r\n <a *ngIf=\"!_deviceDetectorService.isDesktop() && !readonly\" pTooltip=\"\u0110\u1ED5i t\u00EAn\"\r\n tooltipPosition=\"bottom\" (click)=\"renameFile()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\"><i\r\n class=\"fas fa-eraser\"></i></a>\r\n <a *ngIf=\"showDelete && !readonly\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"far fa-trash-alt\"></i></a>\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\"\r\n *ngIf=\"!readonly && _deviceDetectorService.isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\"> <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"_deviceDetectorService.isDesktop()\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\"><i class=\"fas fa-pen-square\"></i>S\u1EEDa\r\n file\r\n tr\u1EF1c\r\n tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"far fa-trash-alt\"></i>X\u00F3a\r\n t\u1EC7p\r\n tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n </div>\r\n <ngx-extended-pdf-viewer [src]=\"model.fileUrl\" useBrowserLocale=\"true\" height=\"calc(100vh - 50px)\"\r\n [enablePinchOnMobile]=\"true\" [filenameForDownload]=\"data.fileName\" [language]=\"'vi-VN'\"\r\n [showBookmarkButton]=\"false\" [showHandToolButton]=\"false\" [showOpenFileButton]=\"false\"\r\n [showUnverifiedSignatures]=\"true\">\r\n </ngx-extended-pdf-viewer>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"data.fileType != fileTypes.IMAGE && data.fileType != fileTypes.VIDEO && data.fileType != fileTypes.AUDIO && data.fileType != fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\" tooltipPosition=\"bottom\"\r\n placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a>\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!readonly && showDelete && isDesktop()\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a *ngIf=\"!readonly && isDesktop()\" pTooltip=\"S\u1EEDa file tr\u1EF1c tuy\u1EBFn\" (click)=\"editFile()\"\r\n placeholder=\"Bottom\" class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\">\r\n <i class=\"fas fa-pen-square\"></i></a>\r\n\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\" *ngIf=\"!isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\">\r\n <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\">\r\n <i class=\"fas fa-pen-square\"></i>S\u1EEDa file tr\u1EF1c tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly && showDelete\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"pi pi-trash\"></i>X\u00F3a\r\n t\u1EC7p tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n [class.view-file-text]=\"isFileType(fileTypes.TEXT)\"\r\n [class.view-file-spreadsheet]=\"isFileType(fileTypes.SPREADSHEET)\"\r\n [class.view-file-presentation]=\"isFileType(fileTypes.PRESENTATION)\">\r\n <div id=\"file-viewer\"></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.IMAGE && model.images.length > 0\">\r\n <div class=\"image-container\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <img *ngIf=\"model.images && model.images.length\" src=\"{{model.images[0]}}\" alt=\"Ch\u01B0a c\u00F3 \u1EA3nh\">\r\n </div>\r\n <!-- <app-image-viewer [showPDFOnlyLabel]=\"false\" [showPDFOnlyOption]=\"false\" [fullscreen]=\"false\"\r\n [images]=\"model.images\" [primaryColor]=\"'#3192e1'\" [idContainer]=\"'image-view-list'\"\r\n (mousedown)=\"closeSidebar($event)\" id=\"fileViewerHolder\" [loadOnInit]=\"true\">\r\n </app-image-viewer>\r\n <a style=\"color: white;\" (click)=\"closeSidebar(null)\" class=\"mobile-image-viewer-close\">\r\n <i class=\"far fa-times-circle\"></i></a> -->\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.VIDEO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i>\r\n </a>\r\n <a *ngIf=\"!isReadonly && !isDesktop()\" (click)=\"renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n <a *ngIf=\"!readonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n style=\"width: 80%; margin: auto; height: 100%; border-radius: 0px;\">\r\n <video width=\"100%\" height=\"100%\" style=\"margin-top: 50px;\" autoplay controls src=\"{{model.fileUrl}}\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 m\u1EDF video.\r\n </video>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.AUDIO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" (mousedown)=\"closeSidebar($event)\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!isReadonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n <audio controls autoplay src=\"{{model.fileUrl}}\"\r\n style=\"margin: auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 ph\u00E1t audio. </audio>\r\n </div>\r\n </ng-container>\r\n\r\n</p-sidebar>\r\n\r\n<tn-dialog *ngIf=\"renameFileForm.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"renameFileForm.header | translate\" [popupSize]=\"renameFileForm.popupSize\" (onHide)=\"onCancelRenameFile()\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"renameFileForm.formData\"\r\n (onSaved)=\"onSavedRenameFile()\" (onCancel)=\"onCancelRenameFile()\">\r\n </file-form>\r\n</tn-dialog>", styles: ["::ng-deep .pdf-container ngx-extended-pdf-viewer #outerContainer{top:51px}.view-file{height:92vh}.dialog-material{display:block;border-radius:4px;box-sizing:border-box;overflow:hidden;outline:0;min-height:inherit;max-height:inherit;width:50vw}.dialog-material{width:100%}.dialog-material.view-file-text{width:85%;margin:0 auto}.dialog-material.view-file-text.mobile{width:100%;margin:0 auto}.header-dialog-material{display:flex;flex-direction:row;justify-content:space-between;padding:5px 15px;box-sizing:border-box;outline:0;height:50px;line-height:50px;background:#3192e1;position:absolute;pointer-events:auto;left:0;right:0;top:0;width:auto}.header-dialog-material .flex-item{line-height:40px}.header-dialog-material .flex-item .cursor-pointer{cursor:pointer;display:inline-block;padding:0 15px}.header-dialog-material .flex-item .cursor-pointer.submenu{position:relative}.header-dialog-material .flex-item .cursor-pointer.submenu ul{display:flex;position:absolute;top:25px;right:0px;align-content:flex-end;flex-direction:column;width:230px;border-radius:2px;padding:5px 0;background:#fff;box-shadow:0 6px 12px #0000002d;z-index:1}.header-dialog-material .flex-item .cursor-pointer.submenu ul li{padding:0}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a{padding:0 0 0 5px;line-height:40px}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a:hover{background:#f5f5f5}.header-dialog-material ul:before{top:-8px;right:8px;left:auto;width:0px;height:0px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:10px solid #ffffff;content:\" \";position:absolute}.mat-dialog-content{display:block;margin:0;padding:0;max-height:100vh;max-width:50vw;overflow:auto;-webkit-overflow-scrolling:touch}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000;background:rgba(0,0,0,.7)!important}::ng-deep .cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .mat-dialog-container{display:block;padding:0!important}::ng-deep .cdk-overlay-pane{max-height:100%}.button-link:hover{transition:background-color .1s,opacity .1s;background-image:none;background-color:#ffffff40}.file-row-action i{margin-right:5px;width:40px;text-align:center}.file-row-action{line-height:34px;width:100%;display:block;color:#212529}.layout-menu li a{border:none;text-align:left}.layout-menu li a i:first-child{color:#666;font-size:1em}.footer-page{position:absolute;left:50%;margin-right:-50%;transform:translate(-50%);border-radius:3px;bottom:12px;z-index:3;overflow:hidden}.footer-page-label{border-right:1px solid rgba(255,255,255,.2);display:inline-block;font-size:13px;line-height:44px;height:44px;vertical-align:middle;background:#000000}.footer-page-label-page{display:inline-block;margin-left:12px;vertical-align:middle;background:rgba(0,0,0,.75);color:#fff}.footer-page-label-numberpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}.footer-page-label-space{display:inline-block;margin-left:12px;vertical-align:middle;color:#fff}.footer-page-label-totalpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}::ng-deep p-table .ui-table-tbody>tr>td{overflow:unset}::ng-deep .ui-sidebar-left.ui-sidebar-active{padding-top:55px;background:rgba(0,0,0,.4);border:0}::ng-deep .layout-wrapper .layout-menu-container{border-radius:unset}::ng-deep .p-sidebar{padding:0!important;background-color:#000}::ng-deep .image-container{display:flex;justify-content:center;background-color:#000}::ng-deep .image-container .image-container-toolbar{display:flex;justify-content:flex-end}::ng-deep .image-container>img{height:calc(100ch - 50px)!important;max-height:100%!important;margin-top:50px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i16$1.Sidebar, selector: "p-sidebar", inputs: ["position", "blockScroll", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "visible", "fullScreen", "appendTo", "style", "styleClass", "ariaCloseLabel"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "useBrowserLocale", "backgroundColor", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "sidebarVisible", "showFindButton", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "src", "base64Src", "height", "showSidebarButton", "page", "mobileFriendlyZoom", "customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "rotation", "startTabindex", "spread"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: FileFormComponent, selector: "file-form" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
30295
+ FileViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileViewerComponent, selector: "file-viewer", inputs: { model: "model", readonly: "readonly", showPrint: "showPrint", showDownload: "showDownload", showDelete: "showDelete" }, outputs: { onClose: "onClose", onRename: "onRename", onDelete: "onDelete" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-sidebar #sidebar [showCloseIcon]=\"false\" [fullScreen]=\"true\" [appendTo]=\"'body'\"\r\n [styleClass]=\"getStyleClassByDocumentType(data.fileType)\" [(visible)]=\"show\">\r\n <ng-container *ngIf=\"data.fileType == fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\" style=\"margin: 0px auto;\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <!-- UD-2450 - TuDN -->\r\n <!-- <a *ngIf=\"_deviceDetectorService.isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\"\r\n tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a> -->\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <!-- End UD-2450 - TuDN -->\r\n <a *ngIf=\"!_deviceDetectorService.isDesktop() && !readonly\" pTooltip=\"\u0110\u1ED5i t\u00EAn\"\r\n tooltipPosition=\"bottom\" (click)=\"renameFile()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\"><i\r\n class=\"fas fa-eraser\"></i></a>\r\n <a *ngIf=\"showDelete && !readonly\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"far fa-trash-alt\"></i></a>\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\"\r\n *ngIf=\"!readonly && _deviceDetectorService.isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\"> <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"_deviceDetectorService.isDesktop()\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\"><i class=\"fas fa-pen-square\"></i>S\u1EEDa\r\n file\r\n tr\u1EF1c\r\n tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"far fa-trash-alt\"></i>X\u00F3a\r\n t\u1EC7p\r\n tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n </div>\r\n <ngx-extended-pdf-viewer [src]=\"model.fileUrl\" useBrowserLocale=\"true\" height=\"calc(100vh - 50px)\"\r\n [enablePinchOnMobile]=\"true\" [filenameForDownload]=\"data.fileName\" [language]=\"'vi-VN'\"\r\n [showBookmarkButton]=\"false\" [showHandToolButton]=\"false\" [showOpenFileButton]=\"false\"\r\n [showUnverifiedSignatures]=\"true\">\r\n </ngx-extended-pdf-viewer>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"data.fileType != fileTypes.IMAGE && data.fileType != fileTypes.VIDEO && data.fileType != fileTypes.AUDIO && data.fileType != fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\" tooltipPosition=\"bottom\"\r\n placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a>\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!readonly && showDelete && isDesktop()\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a *ngIf=\"!readonly && isDesktop()\" pTooltip=\"S\u1EEDa file tr\u1EF1c tuy\u1EBFn\" (click)=\"editFile()\"\r\n placeholder=\"Bottom\" class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\">\r\n <i class=\"fas fa-pen-square\"></i></a>\r\n\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\" *ngIf=\"!isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\">\r\n <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\">\r\n <i class=\"fas fa-pen-square\"></i>S\u1EEDa file tr\u1EF1c tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly && showDelete\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"pi pi-trash\"></i>X\u00F3a\r\n t\u1EC7p tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n [class.view-file-text]=\"isFileType(fileTypes.TEXT)\"\r\n [class.view-file-spreadsheet]=\"isFileType(fileTypes.SPREADSHEET)\"\r\n [class.view-file-presentation]=\"isFileType(fileTypes.PRESENTATION)\">\r\n <div id=\"file-viewer\"></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.IMAGE && model.images.length > 0\">\r\n <div class=\"image-container\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <img *ngIf=\"model.images && model.images.length\" src=\"{{model.images[0]}}\" alt=\"Ch\u01B0a c\u00F3 \u1EA3nh\">\r\n </div>\r\n <!-- <app-image-viewer [showPDFOnlyLabel]=\"false\" [showPDFOnlyOption]=\"false\" [fullscreen]=\"false\"\r\n [images]=\"model.images\" [primaryColor]=\"'#3192e1'\" [idContainer]=\"'image-view-list'\"\r\n (mousedown)=\"closeSidebar($event)\" id=\"fileViewerHolder\" [loadOnInit]=\"true\">\r\n </app-image-viewer>\r\n <a style=\"color: white;\" (click)=\"closeSidebar(null)\" class=\"mobile-image-viewer-close\">\r\n <i class=\"far fa-times-circle\"></i></a> -->\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.VIDEO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i>\r\n </a>\r\n <a *ngIf=\"!isReadonly && !isDesktop()\" (click)=\"renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n <a *ngIf=\"!readonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n style=\"width: 80%; margin: auto; height: 100%; border-radius: 0px;\">\r\n <video width=\"100%\" height=\"100%\" style=\"margin-top: 50px;\" autoplay controls src=\"{{model.fileUrl}}\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 m\u1EDF video.\r\n </video>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.AUDIO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" (mousedown)=\"closeSidebar($event)\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!isReadonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n <audio controls autoplay src=\"{{model.fileUrl}}\"\r\n style=\"margin: auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 ph\u00E1t audio. </audio>\r\n </div>\r\n </ng-container>\r\n\r\n</p-sidebar>\r\n\r\n<tn-dialog *ngIf=\"renameFileForm.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"renameFileForm.header | translate\" [popupSize]=\"renameFileForm.popupSize\" (onHide)=\"onCancelRenameFile()\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"renameFileForm.formData\"\r\n (onSaved)=\"onSavedRenameFile()\" (onCancel)=\"onCancelRenameFile()\">\r\n </file-form>\r\n</tn-dialog>", styles: ["::ng-deep .pdf-container ngx-extended-pdf-viewer #outerContainer{top:51px}.view-file{height:92vh}.dialog-material{display:block;border-radius:4px;box-sizing:border-box;overflow:hidden;outline:0;min-height:inherit;max-height:inherit;width:50vw}.dialog-material{width:100%}.dialog-material.view-file-text{width:85%;margin:0 auto}.dialog-material.view-file-text.mobile{width:100%;margin:0 auto}.header-dialog-material{display:flex;flex-direction:row;justify-content:space-between;padding:5px 15px;box-sizing:border-box;outline:0;height:50px;line-height:50px;background:#3192e1;position:absolute;pointer-events:auto;left:0;right:0;top:0;width:auto}.header-dialog-material .flex-item{line-height:40px}.header-dialog-material .flex-item .cursor-pointer{cursor:pointer;display:inline-block;padding:0 15px}.header-dialog-material .flex-item .cursor-pointer.submenu{position:relative}.header-dialog-material .flex-item .cursor-pointer.submenu ul{display:flex;position:absolute;top:25px;right:0px;align-content:flex-end;flex-direction:column;width:230px;border-radius:2px;padding:5px 0;background:#fff;box-shadow:0 6px 12px #0000002d;z-index:1}.header-dialog-material .flex-item .cursor-pointer.submenu ul li{padding:0}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a{padding:0 0 0 5px;line-height:40px}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a:hover{background:#f5f5f5}.header-dialog-material ul:before{top:-8px;right:8px;left:auto;width:0px;height:0px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:10px solid #ffffff;content:\" \";position:absolute}.mat-dialog-content{display:block;margin:0;padding:0;max-height:100vh;max-width:50vw;overflow:auto;-webkit-overflow-scrolling:touch}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000;background:rgba(0,0,0,.7)!important}::ng-deep .cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .mat-dialog-container{display:block;padding:0!important}::ng-deep .cdk-overlay-pane{max-height:100%}.button-link:hover{transition:background-color .1s,opacity .1s;background-image:none;background-color:#ffffff40}.file-row-action i{margin-right:5px;width:40px;text-align:center}.file-row-action{line-height:34px;width:100%;display:block;color:#212529}.layout-menu li a{border:none;text-align:left}.layout-menu li a i:first-child{color:#666;font-size:1em}.footer-page{position:absolute;left:50%;margin-right:-50%;transform:translate(-50%);border-radius:3px;bottom:12px;z-index:3;overflow:hidden}.footer-page-label{border-right:1px solid rgba(255,255,255,.2);display:inline-block;font-size:13px;line-height:44px;height:44px;vertical-align:middle;background:#000000}.footer-page-label-page{display:inline-block;margin-left:12px;vertical-align:middle;background:rgba(0,0,0,.75);color:#fff}.footer-page-label-numberpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}.footer-page-label-space{display:inline-block;margin-left:12px;vertical-align:middle;color:#fff}.footer-page-label-totalpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}::ng-deep p-table .ui-table-tbody>tr>td{overflow:unset}::ng-deep .ui-sidebar-left.ui-sidebar-active{padding-top:55px;background:rgba(0,0,0,.4);border:0}::ng-deep .layout-wrapper .layout-menu-container{border-radius:unset}::ng-deep .p-sidebar{padding:0!important;background-color:#000}::ng-deep .image-container{display:flex;justify-content:center;background-color:#000}::ng-deep .image-container .image-container-toolbar{display:flex;justify-content:flex-end}::ng-deep .image-container>img{height:calc(100ch - 50px)!important;max-height:100%!important;margin-top:50px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i16$1.Sidebar, selector: "p-sidebar", inputs: ["position", "blockScroll", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "visible", "fullScreen", "appendTo", "style", "styleClass", "ariaCloseLabel"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customPdfViewer", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "showFreeFloatingBar", "enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "rotation", "src", "base64Src", "minHeight", "height", "useBrowserLocale", "forceUsingLegacyES5", "backgroundColor", "pdfBackground", "pdfBackgroundColorToReplace", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "startTabindex", "showSidebarButton", "sidebarVisible", "showFindButton", "showFindHighlightAll", "showFindMatchCase", "showFindCurrentPageOnly", "showFindPageRange", "showFindEntireWord", "showFindEntirePhrase", "showFindIgnoreAccents", "showFindFuzzySearch", "showFindResultsCount", "showFindMessages", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "formTheme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "spread", "page", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "wheelAction", "mobileFriendlyZoom"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingStarts", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: FileFormComponent, selector: "file-form" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
30371
30296
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileViewerComponent, decorators: [{
30372
30297
  type: Component,
30373
30298
  args: [{ selector: 'file-viewer', providers: [ComponentContextService], template: "<p-sidebar #sidebar [showCloseIcon]=\"false\" [fullScreen]=\"true\" [appendTo]=\"'body'\"\r\n [styleClass]=\"getStyleClassByDocumentType(data.fileType)\" [(visible)]=\"show\">\r\n <ng-container *ngIf=\"data.fileType == fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\" style=\"margin: 0px auto;\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <!-- UD-2450 - TuDN -->\r\n <!-- <a *ngIf=\"_deviceDetectorService.isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\"\r\n tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a> -->\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <!-- End UD-2450 - TuDN -->\r\n <a *ngIf=\"!_deviceDetectorService.isDesktop() && !readonly\" pTooltip=\"\u0110\u1ED5i t\u00EAn\"\r\n tooltipPosition=\"bottom\" (click)=\"renameFile()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\"><i\r\n class=\"fas fa-eraser\"></i></a>\r\n <a *ngIf=\"showDelete && !readonly\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"far fa-trash-alt\"></i></a>\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\"\r\n *ngIf=\"!readonly && _deviceDetectorService.isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\"> <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"_deviceDetectorService.isDesktop()\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\"><i class=\"fas fa-pen-square\"></i>S\u1EEDa\r\n file\r\n tr\u1EF1c\r\n tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"far fa-trash-alt\"></i>X\u00F3a\r\n t\u1EC7p\r\n tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n </div>\r\n <ngx-extended-pdf-viewer [src]=\"model.fileUrl\" useBrowserLocale=\"true\" height=\"calc(100vh - 50px)\"\r\n [enablePinchOnMobile]=\"true\" [filenameForDownload]=\"data.fileName\" [language]=\"'vi-VN'\"\r\n [showBookmarkButton]=\"false\" [showHandToolButton]=\"false\" [showOpenFileButton]=\"false\"\r\n [showUnverifiedSignatures]=\"true\">\r\n </ngx-extended-pdf-viewer>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"data.fileType != fileTypes.IMAGE && data.fileType != fileTypes.VIDEO && data.fileType != fileTypes.AUDIO && data.fileType != fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\" tooltipPosition=\"bottom\"\r\n placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a>\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!readonly && showDelete && isDesktop()\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a *ngIf=\"!readonly && isDesktop()\" pTooltip=\"S\u1EEDa file tr\u1EF1c tuy\u1EBFn\" (click)=\"editFile()\"\r\n placeholder=\"Bottom\" class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\">\r\n <i class=\"fas fa-pen-square\"></i></a>\r\n\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\" *ngIf=\"!isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\">\r\n <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\">\r\n <i class=\"fas fa-pen-square\"></i>S\u1EEDa file tr\u1EF1c tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly && showDelete\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"pi pi-trash\"></i>X\u00F3a\r\n t\u1EC7p tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n [class.view-file-text]=\"isFileType(fileTypes.TEXT)\"\r\n [class.view-file-spreadsheet]=\"isFileType(fileTypes.SPREADSHEET)\"\r\n [class.view-file-presentation]=\"isFileType(fileTypes.PRESENTATION)\">\r\n <div id=\"file-viewer\"></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.IMAGE && model.images.length > 0\">\r\n <div class=\"image-container\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <img *ngIf=\"model.images && model.images.length\" src=\"{{model.images[0]}}\" alt=\"Ch\u01B0a c\u00F3 \u1EA3nh\">\r\n </div>\r\n <!-- <app-image-viewer [showPDFOnlyLabel]=\"false\" [showPDFOnlyOption]=\"false\" [fullscreen]=\"false\"\r\n [images]=\"model.images\" [primaryColor]=\"'#3192e1'\" [idContainer]=\"'image-view-list'\"\r\n (mousedown)=\"closeSidebar($event)\" id=\"fileViewerHolder\" [loadOnInit]=\"true\">\r\n </app-image-viewer>\r\n <a style=\"color: white;\" (click)=\"closeSidebar(null)\" class=\"mobile-image-viewer-close\">\r\n <i class=\"far fa-times-circle\"></i></a> -->\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.VIDEO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i>\r\n </a>\r\n <a *ngIf=\"!isReadonly && !isDesktop()\" (click)=\"renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n <a *ngIf=\"!readonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n style=\"width: 80%; margin: auto; height: 100%; border-radius: 0px;\">\r\n <video width=\"100%\" height=\"100%\" style=\"margin-top: 50px;\" autoplay controls src=\"{{model.fileUrl}}\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 m\u1EDF video.\r\n </video>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.AUDIO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" (mousedown)=\"closeSidebar($event)\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!isReadonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n <audio controls autoplay src=\"{{model.fileUrl}}\"\r\n style=\"margin: auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 ph\u00E1t audio. </audio>\r\n </div>\r\n </ng-container>\r\n\r\n</p-sidebar>\r\n\r\n<tn-dialog *ngIf=\"renameFileForm.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"renameFileForm.header | translate\" [popupSize]=\"renameFileForm.popupSize\" (onHide)=\"onCancelRenameFile()\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"renameFileForm.formData\"\r\n (onSaved)=\"onSavedRenameFile()\" (onCancel)=\"onCancelRenameFile()\">\r\n </file-form>\r\n</tn-dialog>", styles: ["::ng-deep .pdf-container ngx-extended-pdf-viewer #outerContainer{top:51px}.view-file{height:92vh}.dialog-material{display:block;border-radius:4px;box-sizing:border-box;overflow:hidden;outline:0;min-height:inherit;max-height:inherit;width:50vw}.dialog-material{width:100%}.dialog-material.view-file-text{width:85%;margin:0 auto}.dialog-material.view-file-text.mobile{width:100%;margin:0 auto}.header-dialog-material{display:flex;flex-direction:row;justify-content:space-between;padding:5px 15px;box-sizing:border-box;outline:0;height:50px;line-height:50px;background:#3192e1;position:absolute;pointer-events:auto;left:0;right:0;top:0;width:auto}.header-dialog-material .flex-item{line-height:40px}.header-dialog-material .flex-item .cursor-pointer{cursor:pointer;display:inline-block;padding:0 15px}.header-dialog-material .flex-item .cursor-pointer.submenu{position:relative}.header-dialog-material .flex-item .cursor-pointer.submenu ul{display:flex;position:absolute;top:25px;right:0px;align-content:flex-end;flex-direction:column;width:230px;border-radius:2px;padding:5px 0;background:#fff;box-shadow:0 6px 12px #0000002d;z-index:1}.header-dialog-material .flex-item .cursor-pointer.submenu ul li{padding:0}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a{padding:0 0 0 5px;line-height:40px}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a:hover{background:#f5f5f5}.header-dialog-material ul:before{top:-8px;right:8px;left:auto;width:0px;height:0px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:10px solid #ffffff;content:\" \";position:absolute}.mat-dialog-content{display:block;margin:0;padding:0;max-height:100vh;max-width:50vw;overflow:auto;-webkit-overflow-scrolling:touch}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000;background:rgba(0,0,0,.7)!important}::ng-deep .cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .mat-dialog-container{display:block;padding:0!important}::ng-deep .cdk-overlay-pane{max-height:100%}.button-link:hover{transition:background-color .1s,opacity .1s;background-image:none;background-color:#ffffff40}.file-row-action i{margin-right:5px;width:40px;text-align:center}.file-row-action{line-height:34px;width:100%;display:block;color:#212529}.layout-menu li a{border:none;text-align:left}.layout-menu li a i:first-child{color:#666;font-size:1em}.footer-page{position:absolute;left:50%;margin-right:-50%;transform:translate(-50%);border-radius:3px;bottom:12px;z-index:3;overflow:hidden}.footer-page-label{border-right:1px solid rgba(255,255,255,.2);display:inline-block;font-size:13px;line-height:44px;height:44px;vertical-align:middle;background:#000000}.footer-page-label-page{display:inline-block;margin-left:12px;vertical-align:middle;background:rgba(0,0,0,.75);color:#fff}.footer-page-label-numberpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}.footer-page-label-space{display:inline-block;margin-left:12px;vertical-align:middle;color:#fff}.footer-page-label-totalpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}::ng-deep p-table .ui-table-tbody>tr>td{overflow:unset}::ng-deep .ui-sidebar-left.ui-sidebar-active{padding-top:55px;background:rgba(0,0,0,.4);border:0}::ng-deep .layout-wrapper .layout-menu-container{border-radius:unset}::ng-deep .p-sidebar{padding:0!important;background-color:#000}::ng-deep .image-container{display:flex;justify-content:center;background-color:#000}::ng-deep .image-container .image-container-toolbar{display:flex;justify-content:flex-end}::ng-deep .image-container>img{height:calc(100ch - 50px)!important;max-height:100%!important;margin-top:50px}\n"] }]
@@ -30779,7 +30704,7 @@ class KySoSimSignPDFService extends BaseService {
30779
30704
  // Ký số có chọn vị trí ký bằng sim
30780
30705
  signLoc(data) {
30781
30706
  const apiUrl = `${this.serviceUri}/SignLoc`;
30782
- return this._http.post(apiUrl, data).toPromise();
30707
+ return firstValueFrom(this._http.post(apiUrl, data));
30783
30708
  }
30784
30709
  }
30785
30710
  KySoSimSignPDFService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: KySoSimSignPDFService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -31149,7 +31074,7 @@ class FileKySoSimComponent extends ComponentBase {
31149
31074
  }
31150
31075
  }
31151
31076
  FileKySoSimComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileKySoSimComponent, deps: [{ token: i0.Injector }, { token: DomService }, { token: FileExplorerService }, { token: UserService }, { token: NotifierService }, { token: KySoSimSignPDFService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
31152
- FileKySoSimComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileKySoSimComponent, selector: "app-file-ky-so-sim", providers: [ComponentContextService], viewQueries: [{ propertyName: "signContainer", first: true, predicate: ["signContainer"], descendants: true }, { propertyName: "extendedPdfViewer", first: true, predicate: ["extendedPdfViewer"], descendants: true }, { propertyName: "imgSignImage", first: true, predicate: ["signImage"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"isLoading\" class=\"div-loading\">\r\n <div class=\"div-loading-image\">\r\n <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" styleClass=\"custom-spinner\" strokeWidth=\"8\"\r\n fill=\"#EEEEEE\" animationDuration=\".5s\"></p-progressSpinner>\r\n </div>\r\n</div>\r\n<div style=\"text-align: center;\">\r\n <!-- -->\r\n <ngx-extended-pdf-viewer #extendedPdfViewer pageViewMode=\"single\" useBrowserLocale=\"true\"\r\n height=\"calc(100vh - 100px)\" [src]=\"model.pdfAsDataUri\" [showToolbar]=\"true\" [showSidebarButton]=\"false\"\r\n [showFindButton]=\"false\" [showPagingButtons]=\"true\" [showZoomButtons]=\"false\"\r\n [showPresentationModeButton]=\"false\" [showOpenFileButton]=\"false\" [showPrintButton]=\"false\"\r\n [showDownloadButton]=\"false\" [showBookmarkButton]=\"false\" [showSecondaryToolbarButton]=\"false\"\r\n [showRotateButton]=\"false\" [showHandToolButton]=\"false\" [showScrollingButton]=\"false\" [showSpreadButton]=\"false\"\r\n [showPropertiesButton]=\"false\" [enablePinchOnMobile]=\"true\" [showUnverifiedSignatures]=\"true\"\r\n [filenameForDownload]=\"'file1.pdf'\" [zoom]=\"100\" [language]=\"'vi-VN'\" [handTool]=\"false\"\r\n [(page)]=\"myState.currentPage\" (currentZoomFactor)=\"onPDFZoom($event)\" (pagesLoaded)=\"pagesLoaded($event)\">\r\n </ngx-extended-pdf-viewer>\r\n <div #signContainer id=\"signContainer\" class=\"sign-container\" (window:resize)=\"onResize($event)\">\r\n <img #signImage *ngIf=\"model.kySimDataChuKy.signImageAsDataUri != null\" id=\"signImage\"\r\n [src]=\"model.kySimDataChuKy.signImageAsDataUri\" />\r\n <span *ngIf=\"model.kySimDataChuKy.signImageAsDataUri == null\">\r\n <i class=\"fas fa-signature\"></i> Ch\u1ECDn v\u1ECB tr\u00ED k\u00FD\r\n </span>\r\n <div class=\"resize top-left\"></div>\r\n <div class=\"resize bottom-right\"></div>\r\n </div>\r\n</div>\r\n<tn-dialog *ngIf=\"forms.danhSachChuKy.show\" #dialog [styleClass]=\"'address-form'\" [useDefaultScrollBar]=\"true\"\r\n [header]=\"forms.danhSachChuKy.header | translate\" [popupSize]=\"forms.danhSachChuKy.popupSize\" [showFooter]=\"true\"\r\n (onHide)=\"forms.danhSachChuKy.show=false\">\r\n <app-ky-so-sim-danh-sach-chu-ky [formData]=\"forms.danhSachChuKy\" [parentModel]=\"model\" [parentContext]=\"context\">\r\n </app-ky-so-sim-danh-sach-chu-ky>\r\n</tn-dialog>", styles: [".sign-container{display:none;position:absolute;z-index:1;top:10px;left:0;touch-action:none;-webkit-user-select:none;user-select:none;background:rgba(33,150,243,.1490196078);border:2px dashed #2196f3}.sign-container span{font-size:20px;color:#555;padding:10px 20px 10px 10px;display:block;font-style:italic;font-weight:700}.sign-container img{width:100%;height:100%}.resize{display:inline-block;position:absolute;width:16px;height:16px;border-radius:50%;border:1px solid #ffffff;background:#2196f3;box-shadow:1px 1px 3px 1px #00000040}.top-left{top:-8px;left:-8px}.bottom-right{bottom:-8px;right:-8px}.div-loading{width:100%;height:100%;top:0px;left:0px;position:fixed;display:block;z-index:99;background:rgba(0,0,0,.4509803922)}.div-loading-image{position:absolute;top:50%;left:50%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "useBrowserLocale", "backgroundColor", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "sidebarVisible", "showFindButton", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "src", "base64Src", "height", "showSidebarButton", "page", "mobileFriendlyZoom", "customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "rotation", "startTabindex", "spread"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["strokeWidth", "fill", "animationDuration", "style", "styleClass"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: KySoSimDanhSachChuKyComponent, selector: "app-ky-so-sim-danh-sach-chu-ky", inputs: ["formData"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
31077
+ FileKySoSimComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileKySoSimComponent, selector: "app-file-ky-so-sim", providers: [ComponentContextService], viewQueries: [{ propertyName: "signContainer", first: true, predicate: ["signContainer"], descendants: true }, { propertyName: "extendedPdfViewer", first: true, predicate: ["extendedPdfViewer"], descendants: true }, { propertyName: "imgSignImage", first: true, predicate: ["signImage"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"isLoading\" class=\"div-loading\">\r\n <div class=\"div-loading-image\">\r\n <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" styleClass=\"custom-spinner\" strokeWidth=\"8\"\r\n fill=\"#EEEEEE\" animationDuration=\".5s\"></p-progressSpinner>\r\n </div>\r\n</div>\r\n<div style=\"text-align: center;\">\r\n <!-- -->\r\n <ngx-extended-pdf-viewer #extendedPdfViewer pageViewMode=\"single\" useBrowserLocale=\"true\"\r\n height=\"calc(100vh - 100px)\" [src]=\"model.pdfAsDataUri\" [showToolbar]=\"true\" [showSidebarButton]=\"false\"\r\n [showFindButton]=\"false\" [showPagingButtons]=\"true\" [showZoomButtons]=\"false\"\r\n [showPresentationModeButton]=\"false\" [showOpenFileButton]=\"false\" [showPrintButton]=\"false\"\r\n [showDownloadButton]=\"false\" [showBookmarkButton]=\"false\" [showSecondaryToolbarButton]=\"false\"\r\n [showRotateButton]=\"false\" [showHandToolButton]=\"false\" [showScrollingButton]=\"false\" [showSpreadButton]=\"false\"\r\n [showPropertiesButton]=\"false\" [enablePinchOnMobile]=\"true\" [showUnverifiedSignatures]=\"true\"\r\n [filenameForDownload]=\"'file1.pdf'\" [zoom]=\"100\" [language]=\"'vi-VN'\" [handTool]=\"false\"\r\n [(page)]=\"myState.currentPage\" (currentZoomFactor)=\"onPDFZoom($event)\" (pagesLoaded)=\"pagesLoaded($event)\">\r\n </ngx-extended-pdf-viewer>\r\n <div #signContainer id=\"signContainer\" class=\"sign-container\" (window:resize)=\"onResize($event)\">\r\n <img #signImage *ngIf=\"model.kySimDataChuKy.signImageAsDataUri != null\" id=\"signImage\"\r\n [src]=\"model.kySimDataChuKy.signImageAsDataUri\" />\r\n <span *ngIf=\"model.kySimDataChuKy.signImageAsDataUri == null\">\r\n <i class=\"fas fa-signature\"></i> Ch\u1ECDn v\u1ECB tr\u00ED k\u00FD\r\n </span>\r\n <div class=\"resize top-left\"></div>\r\n <div class=\"resize bottom-right\"></div>\r\n </div>\r\n</div>\r\n<tn-dialog *ngIf=\"forms.danhSachChuKy.show\" #dialog [styleClass]=\"'address-form'\" [useDefaultScrollBar]=\"true\"\r\n [header]=\"forms.danhSachChuKy.header | translate\" [popupSize]=\"forms.danhSachChuKy.popupSize\" [showFooter]=\"true\"\r\n (onHide)=\"forms.danhSachChuKy.show=false\">\r\n <app-ky-so-sim-danh-sach-chu-ky [formData]=\"forms.danhSachChuKy\" [parentModel]=\"model\" [parentContext]=\"context\">\r\n </app-ky-so-sim-danh-sach-chu-ky>\r\n</tn-dialog>", styles: [".sign-container{display:none;position:absolute;z-index:1;top:10px;left:0;touch-action:none;-webkit-user-select:none;user-select:none;background:rgba(33,150,243,.1490196078);border:2px dashed #2196f3}.sign-container span{font-size:20px;color:#555;padding:10px 20px 10px 10px;display:block;font-style:italic;font-weight:700}.sign-container img{width:100%;height:100%}.resize{display:inline-block;position:absolute;width:16px;height:16px;border-radius:50%;border:1px solid #ffffff;background:#2196f3;box-shadow:1px 1px 3px 1px #00000040}.top-left{top:-8px;left:-8px}.bottom-right{bottom:-8px;right:-8px}.div-loading{width:100%;height:100%;top:0px;left:0px;position:fixed;display:block;z-index:99;background:rgba(0,0,0,.4509803922)}.div-loading-image{position:absolute;top:50%;left:50%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customPdfViewer", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "showFreeFloatingBar", "enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "rotation", "src", "base64Src", "minHeight", "height", "useBrowserLocale", "forceUsingLegacyES5", "backgroundColor", "pdfBackground", "pdfBackgroundColorToReplace", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "startTabindex", "showSidebarButton", "sidebarVisible", "showFindButton", "showFindHighlightAll", "showFindMatchCase", "showFindCurrentPageOnly", "showFindPageRange", "showFindEntireWord", "showFindEntirePhrase", "showFindIgnoreAccents", "showFindFuzzySearch", "showFindResultsCount", "showFindMessages", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "formTheme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "spread", "page", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "wheelAction", "mobileFriendlyZoom"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingStarts", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["strokeWidth", "fill", "animationDuration", "style", "styleClass"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: KySoSimDanhSachChuKyComponent, selector: "app-ky-so-sim-danh-sach-chu-ky", inputs: ["formData"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
31153
31078
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileKySoSimComponent, decorators: [{
31154
31079
  type: Component,
31155
31080
  args: [{ selector: 'app-file-ky-so-sim', providers: [ComponentContextService], template: "<div *ngIf=\"isLoading\" class=\"div-loading\">\r\n <div class=\"div-loading-image\">\r\n <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" styleClass=\"custom-spinner\" strokeWidth=\"8\"\r\n fill=\"#EEEEEE\" animationDuration=\".5s\"></p-progressSpinner>\r\n </div>\r\n</div>\r\n<div style=\"text-align: center;\">\r\n <!-- -->\r\n <ngx-extended-pdf-viewer #extendedPdfViewer pageViewMode=\"single\" useBrowserLocale=\"true\"\r\n height=\"calc(100vh - 100px)\" [src]=\"model.pdfAsDataUri\" [showToolbar]=\"true\" [showSidebarButton]=\"false\"\r\n [showFindButton]=\"false\" [showPagingButtons]=\"true\" [showZoomButtons]=\"false\"\r\n [showPresentationModeButton]=\"false\" [showOpenFileButton]=\"false\" [showPrintButton]=\"false\"\r\n [showDownloadButton]=\"false\" [showBookmarkButton]=\"false\" [showSecondaryToolbarButton]=\"false\"\r\n [showRotateButton]=\"false\" [showHandToolButton]=\"false\" [showScrollingButton]=\"false\" [showSpreadButton]=\"false\"\r\n [showPropertiesButton]=\"false\" [enablePinchOnMobile]=\"true\" [showUnverifiedSignatures]=\"true\"\r\n [filenameForDownload]=\"'file1.pdf'\" [zoom]=\"100\" [language]=\"'vi-VN'\" [handTool]=\"false\"\r\n [(page)]=\"myState.currentPage\" (currentZoomFactor)=\"onPDFZoom($event)\" (pagesLoaded)=\"pagesLoaded($event)\">\r\n </ngx-extended-pdf-viewer>\r\n <div #signContainer id=\"signContainer\" class=\"sign-container\" (window:resize)=\"onResize($event)\">\r\n <img #signImage *ngIf=\"model.kySimDataChuKy.signImageAsDataUri != null\" id=\"signImage\"\r\n [src]=\"model.kySimDataChuKy.signImageAsDataUri\" />\r\n <span *ngIf=\"model.kySimDataChuKy.signImageAsDataUri == null\">\r\n <i class=\"fas fa-signature\"></i> Ch\u1ECDn v\u1ECB tr\u00ED k\u00FD\r\n </span>\r\n <div class=\"resize top-left\"></div>\r\n <div class=\"resize bottom-right\"></div>\r\n </div>\r\n</div>\r\n<tn-dialog *ngIf=\"forms.danhSachChuKy.show\" #dialog [styleClass]=\"'address-form'\" [useDefaultScrollBar]=\"true\"\r\n [header]=\"forms.danhSachChuKy.header | translate\" [popupSize]=\"forms.danhSachChuKy.popupSize\" [showFooter]=\"true\"\r\n (onHide)=\"forms.danhSachChuKy.show=false\">\r\n <app-ky-so-sim-danh-sach-chu-ky [formData]=\"forms.danhSachChuKy\" [parentModel]=\"model\" [parentContext]=\"context\">\r\n </app-ky-so-sim-danh-sach-chu-ky>\r\n</tn-dialog>", styles: [".sign-container{display:none;position:absolute;z-index:1;top:10px;left:0;touch-action:none;-webkit-user-select:none;user-select:none;background:rgba(33,150,243,.1490196078);border:2px dashed #2196f3}.sign-container span{font-size:20px;color:#555;padding:10px 20px 10px 10px;display:block;font-style:italic;font-weight:700}.sign-container img{width:100%;height:100%}.resize{display:inline-block;position:absolute;width:16px;height:16px;border-radius:50%;border:1px solid #ffffff;background:#2196f3;box-shadow:1px 1px 3px 1px #00000040}.top-left{top:-8px;left:-8px}.bottom-right{bottom:-8px;right:-8px}.div-loading{width:100%;height:100%;top:0px;left:0px;position:fixed;display:block;z-index:99;background:rgba(0,0,0,.4509803922)}.div-loading-image{position:absolute;top:50%;left:50%;z-index:100}\n"] }]
@@ -31928,7 +31853,7 @@ class FileManagerComponent extends DataListBase {
31928
31853
  this.setDatasource(this.model.dataSource);
31929
31854
  }
31930
31855
  ngOnDestroy() {
31931
- this._unsubcribleAll.next();
31856
+ this._unsubcribleAll.next(1);
31932
31857
  this._unsubcribleAll.complete();
31933
31858
  if (this.fileDataService) {
31934
31859
  this.fileDataService.unregister(this);
@@ -36391,7 +36316,7 @@ class WorkflowHistoryNewComponent extends DataListBase {
36391
36316
  }
36392
36317
  }
36393
36318
  WorkflowHistoryNewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: WorkflowHistoryNewComponent, deps: [{ token: i0.Injector }, { token: WorkflowHistoryService }, { token: CoCauToChucOldService }, { token: UserGroupRealService }, { token: DmChucVuService }, { token: FileDataService }], target: i0.ɵɵFactoryTarget.Component });
36394
- WorkflowHistoryNewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: WorkflowHistoryNewComponent, selector: "workflow-history-new", inputs: { businessSetting: "businessSetting", isRelativeForm: "isRelativeForm", tableName: "tableName", item: "item", workflowSetting: "workflowSetting" }, providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\r\n <as-split direction=\"vertical\">\r\n <as-split-area [size]=\"40\">\r\n <div class=\"state-designer-container\">\r\n <div>\r\n S\u01A1 \u0111\u1ED3 quy tr\u00ECnh {{workflowTitle}}\r\n </div>\r\n <div>\r\n <statemachines-designer *ngIf=\"!waitToDetach && readyToRaw\" [data]=\"machinesData\"\r\n [currentConnection]=\"currentConnection\" [jsPlumbOption]=\"jsPlumbOption\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n <after-view-checked *ngIf=\"waitToDetach\" (loaded)=\"waitToDetach = false\"></after-view-checked>\r\n </div>\r\n </div>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <crud-list-simple *ngIf=\"model.ready\" #crudList [model]=\"model\" [setting]=\"setting\"\r\n [dataSource]=\"model.dataSource\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\">\r\n <ng-template #note let-rowData=\"rowData\">\r\n <div *ngIf=\"rowData.note==null?'':rowData.note\" [innerHTML]=\"rowData.note | safeHtml\"></div>\r\n </ng-template>\r\n <ng-template #receiver let-rowData=\"rowData\">\r\n <div *ngIf=\"!rowData.notInMainThread\" class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserIds}}</div>\r\n <div *ngIf=\"rowData.strdonViIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViIds}}</div>\r\n <div *ngIf=\"rowData.strgroupIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupIds}}</div>\r\n <div *ngIf=\"rowData.strroleIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleIds}}</div>\r\n </div>\r\n <div *ngIf=\"rowData.notInMainThread\">\r\n <div *ngFor=\"let changedField of rowData.jsonModelChange\">\r\n {{changedField.field}},\r\n {{changedField.valueOld}} => {{changedField.valueNew}}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #receiverView let-rowData=\"rowData\">\r\n <div class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserViewIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserViewIds}}</div>\r\n <div *ngIf=\"rowData.strdonViViewIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViViewIds}}</div>\r\n <div *ngIf=\"rowData.strgroupViewIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupViewIds}}</div>\r\n <div *ngIf=\"rowData.strroleViewIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleViewIds}}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template #fileDinhKem let-rowData=\"rowData\">\r\n <file-manager [fileDataService]=\"fileDataService\"\r\n [serviceCode]=\"_workflowHistoryService.serviceCode\"\r\n [entity]=\"_workflowHistoryService.entityName\" [entityKey]=\"rowData.id\"\r\n [layout]=\"layoutFile.SIMPLE\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #function let-rowData=\"rowData\">\r\n <button *ngIf=\"rowData.status == enumWorkflowHistoryStatus.IN_MAIN_THREAD\" pButton\r\n icon=\"pi pi-replay\" class=\"p-button-text p-button-rounded link-or-action\"\r\n pTooltip=\"Thu h\u1ED3i v\u1EC1 b\u01B0\u1EDBc n\u00E0y\" tooltipPosition=\"top\"\r\n (click)=\"rollbackByHistory(rowData)\"></button>\r\n </ng-template>\r\n </crud-list-simple>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".state-designer-container{height:100%;display:flex;flex-direction:column}.state-designer-container>div:first-child{position:absolute;left:.5em;top:.5em;font-weight:700;font-size:.9em;padding:.5em 0}.state-designer-container>div:last-child{flex:1 1;overflow:auto}.container-receiver div{margin-bottom:10px}.container-receiver div:last-child{margin-bottom:0}::ng-deep workflow-history-new tr.recalled{opacity:.5}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration"], outputs: ["dragStart", "dragEnd", "gutterClick", "gutterDblClick", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: AfterViewCheckedComponent, selector: "after-view-checked", inputs: ["renderKey"], outputs: ["loaded", "loading", "unloading", "reRender"] }, { kind: "component", type: CrudListSimpleComponent, selector: "crud-list-simple", inputs: ["model", "setting", "fileName", "lazy", "widthCheckbox", "widthOrderColumn", "widthFunctionColumn", "classRowGroup", "showScrollBar", "pTableScrollable", "pTableScrollHeight", "responsive", "showScrollHorizontal", "showRadio", "hiddenAdd", "hiddenDelete", "hiddenDeleteMultiple", "hiddenEdit", "hiddenView", "escape", "enableReorderRow", "templates", "menuButtons", "showMenuButtons", "fieldOrder", "style", "tableClass", "dataSource", "filter_default", "expandedSearch"], outputs: ["onRowSelect", "onReordered", "onCheckAll", "onReload", "onReloaded", "onReady", "onContentInit", "onAdd", "onEdit", "onView", "onDelete", "onDeleteMultiple", "onInvalidWorkflow", "onAfterTrinhKy", "onStartedWorkflow", "onProcessedWorkflow", "onRollbackedWorkflow", "onChangedStatusWorkflow", "onViewWorkflow", "onPermissionShare", "onPermission", "onCreatedSearchInfo"] }, { kind: "component", type: StateMachinesDesignerComponent, selector: "statemachines-designer", inputs: ["useScrollBar", "viewOnly", "data", "currentConnection", "containerId", "jsPlumbOption"] }, { kind: "component", type: FileManagerComponent, selector: "file-manager", inputs: ["control", "fileDataService", "layout", "hiddenCreateFolder", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "dataType", "rootFolderName", "serviceCode", "entity", "entityKey", "readonly", "inTaiLieu", "inTaiLieuChung", "copyToFolderId", "value", "multipleCheckWhenClickRow"], outputs: ["onReady", "entityKeyChange", "closePopup", "valueChange", "onChanged", "onSelected"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
36319
+ WorkflowHistoryNewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: WorkflowHistoryNewComponent, selector: "workflow-history-new", inputs: { businessSetting: "businessSetting", isRelativeForm: "isRelativeForm", tableName: "tableName", item: "item", workflowSetting: "workflowSetting" }, providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\r\n <as-split direction=\"vertical\">\r\n <as-split-area [size]=\"40\">\r\n <div class=\"state-designer-container\">\r\n <div>\r\n S\u01A1 \u0111\u1ED3 quy tr\u00ECnh {{workflowTitle}}\r\n </div>\r\n <div>\r\n <statemachines-designer *ngIf=\"!waitToDetach && readyToRaw\" [data]=\"machinesData\"\r\n [currentConnection]=\"currentConnection\" [jsPlumbOption]=\"jsPlumbOption\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n <after-view-checked *ngIf=\"waitToDetach\" (loaded)=\"waitToDetach = false\"></after-view-checked>\r\n </div>\r\n </div>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <crud-list-simple *ngIf=\"model.ready\" #crudList [model]=\"model\" [setting]=\"setting\"\r\n [dataSource]=\"model.dataSource\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\">\r\n <ng-template #note let-rowData=\"rowData\">\r\n <div *ngIf=\"rowData.note==null?'':rowData.note\" [innerHTML]=\"rowData.note | safeHtml\"></div>\r\n </ng-template>\r\n <ng-template #receiver let-rowData=\"rowData\">\r\n <div *ngIf=\"!rowData.notInMainThread\" class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserIds}}</div>\r\n <div *ngIf=\"rowData.strdonViIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViIds}}</div>\r\n <div *ngIf=\"rowData.strgroupIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupIds}}</div>\r\n <div *ngIf=\"rowData.strroleIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleIds}}</div>\r\n </div>\r\n <div *ngIf=\"rowData.notInMainThread\">\r\n <div *ngFor=\"let changedField of rowData.jsonModelChange\">\r\n {{changedField.field}},\r\n {{changedField.valueOld}} => {{changedField.valueNew}}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #receiverView let-rowData=\"rowData\">\r\n <div class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserViewIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserViewIds}}</div>\r\n <div *ngIf=\"rowData.strdonViViewIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViViewIds}}</div>\r\n <div *ngIf=\"rowData.strgroupViewIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupViewIds}}</div>\r\n <div *ngIf=\"rowData.strroleViewIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleViewIds}}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template #fileDinhKem let-rowData=\"rowData\">\r\n <file-manager [fileDataService]=\"fileDataService\"\r\n [serviceCode]=\"_workflowHistoryService.serviceCode\"\r\n [entity]=\"_workflowHistoryService.entityName\" [entityKey]=\"rowData.id\"\r\n [layout]=\"layoutFile.SIMPLE\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #function let-rowData=\"rowData\">\r\n <button *ngIf=\"rowData.status == enumWorkflowHistoryStatus.IN_MAIN_THREAD\" pButton\r\n icon=\"pi pi-replay\" class=\"p-button-text p-button-rounded link-or-action\"\r\n pTooltip=\"Thu h\u1ED3i v\u1EC1 b\u01B0\u1EDBc n\u00E0y\" tooltipPosition=\"top\"\r\n (click)=\"rollbackByHistory(rowData)\"></button>\r\n </ng-template>\r\n </crud-list-simple>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".state-designer-container{height:100%;display:flex;flex-direction:column}.state-designer-container>div:first-child{position:absolute;left:.5em;top:.5em;font-weight:700;font-size:.9em;padding:.5em 0}.state-designer-container>div:last-child{flex:1 1;overflow:auto}.container-receiver div{margin-bottom:10px}.container-receiver div:last-child{margin-bottom:0}::ng-deep workflow-history-new tr.recalled{opacity:.5}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: AfterViewCheckedComponent, selector: "after-view-checked", inputs: ["renderKey"], outputs: ["loaded", "loading", "unloading", "reRender"] }, { kind: "component", type: CrudListSimpleComponent, selector: "crud-list-simple", inputs: ["model", "setting", "fileName", "lazy", "widthCheckbox", "widthOrderColumn", "widthFunctionColumn", "classRowGroup", "showScrollBar", "pTableScrollable", "pTableScrollHeight", "responsive", "showScrollHorizontal", "showRadio", "hiddenAdd", "hiddenDelete", "hiddenDeleteMultiple", "hiddenEdit", "hiddenView", "escape", "enableReorderRow", "templates", "menuButtons", "showMenuButtons", "fieldOrder", "style", "tableClass", "dataSource", "filter_default", "expandedSearch"], outputs: ["onRowSelect", "onReordered", "onCheckAll", "onReload", "onReloaded", "onReady", "onContentInit", "onAdd", "onEdit", "onView", "onDelete", "onDeleteMultiple", "onInvalidWorkflow", "onAfterTrinhKy", "onStartedWorkflow", "onProcessedWorkflow", "onRollbackedWorkflow", "onChangedStatusWorkflow", "onViewWorkflow", "onPermissionShare", "onPermission", "onCreatedSearchInfo"] }, { kind: "component", type: StateMachinesDesignerComponent, selector: "statemachines-designer", inputs: ["useScrollBar", "viewOnly", "data", "currentConnection", "containerId", "jsPlumbOption"] }, { kind: "component", type: FileManagerComponent, selector: "file-manager", inputs: ["control", "fileDataService", "layout", "hiddenCreateFolder", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "dataType", "rootFolderName", "serviceCode", "entity", "entityKey", "readonly", "inTaiLieu", "inTaiLieuChung", "copyToFolderId", "value", "multipleCheckWhenClickRow"], outputs: ["onReady", "entityKeyChange", "closePopup", "valueChange", "onChanged", "onSelected"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
36395
36320
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: WorkflowHistoryNewComponent, decorators: [{
36396
36321
  type: Component,
36397
36322
  args: [{ selector: 'workflow-history-new', providers: [ComponentContextService], template: "<div style=\"height: 100%\">\r\n <as-split direction=\"vertical\">\r\n <as-split-area [size]=\"40\">\r\n <div class=\"state-designer-container\">\r\n <div>\r\n S\u01A1 \u0111\u1ED3 quy tr\u00ECnh {{workflowTitle}}\r\n </div>\r\n <div>\r\n <statemachines-designer *ngIf=\"!waitToDetach && readyToRaw\" [data]=\"machinesData\"\r\n [currentConnection]=\"currentConnection\" [jsPlumbOption]=\"jsPlumbOption\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n <after-view-checked *ngIf=\"waitToDetach\" (loaded)=\"waitToDetach = false\"></after-view-checked>\r\n </div>\r\n </div>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <crud-list-simple *ngIf=\"model.ready\" #crudList [model]=\"model\" [setting]=\"setting\"\r\n [dataSource]=\"model.dataSource\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\">\r\n <ng-template #note let-rowData=\"rowData\">\r\n <div *ngIf=\"rowData.note==null?'':rowData.note\" [innerHTML]=\"rowData.note | safeHtml\"></div>\r\n </ng-template>\r\n <ng-template #receiver let-rowData=\"rowData\">\r\n <div *ngIf=\"!rowData.notInMainThread\" class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserIds}}</div>\r\n <div *ngIf=\"rowData.strdonViIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViIds}}</div>\r\n <div *ngIf=\"rowData.strgroupIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupIds}}</div>\r\n <div *ngIf=\"rowData.strroleIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleIds}}</div>\r\n </div>\r\n <div *ngIf=\"rowData.notInMainThread\">\r\n <div *ngFor=\"let changedField of rowData.jsonModelChange\">\r\n {{changedField.field}},\r\n {{changedField.valueOld}} => {{changedField.valueNew}}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #receiverView let-rowData=\"rowData\">\r\n <div class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserViewIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserViewIds}}</div>\r\n <div *ngIf=\"rowData.strdonViViewIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViViewIds}}</div>\r\n <div *ngIf=\"rowData.strgroupViewIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupViewIds}}</div>\r\n <div *ngIf=\"rowData.strroleViewIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleViewIds}}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template #fileDinhKem let-rowData=\"rowData\">\r\n <file-manager [fileDataService]=\"fileDataService\"\r\n [serviceCode]=\"_workflowHistoryService.serviceCode\"\r\n [entity]=\"_workflowHistoryService.entityName\" [entityKey]=\"rowData.id\"\r\n [layout]=\"layoutFile.SIMPLE\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #function let-rowData=\"rowData\">\r\n <button *ngIf=\"rowData.status == enumWorkflowHistoryStatus.IN_MAIN_THREAD\" pButton\r\n icon=\"pi pi-replay\" class=\"p-button-text p-button-rounded link-or-action\"\r\n pTooltip=\"Thu h\u1ED3i v\u1EC1 b\u01B0\u1EDBc n\u00E0y\" tooltipPosition=\"top\"\r\n (click)=\"rollbackByHistory(rowData)\"></button>\r\n </ng-template>\r\n </crud-list-simple>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".state-designer-container{height:100%;display:flex;flex-direction:column}.state-designer-container>div:first-child{position:absolute;left:.5em;top:.5em;font-weight:700;font-size:.9em;padding:.5em 0}.state-designer-container>div:last-child{flex:1 1;overflow:auto}.container-receiver div{margin-bottom:10px}.container-receiver div:last-child{margin-bottom:0}::ng-deep workflow-history-new tr.recalled{opacity:.5}\n"] }]
@@ -39996,11 +39921,11 @@ class PathNameService extends BaseService {
39996
39921
  }
39997
39922
  getByPathName(pathName) {
39998
39923
  const uri = `${this.serviceUri}/GetSimplePathNamesByUrl?url=${pathName}`;
39999
- return this._httpClient.get(uri).toPromise();
39924
+ return firstValueFrom(this._httpClient.get(uri));
40000
39925
  }
40001
39926
  checkPathNameHasGuide(pathName) {
40002
39927
  const uri = `${this.serviceUri}/CheckPathNameHasGuide?pathName=${pathName}`;
40003
- return this._httpClient.get(uri).toPromise();
39928
+ return firstValueFrom(this._httpClient.get(uri));
40004
39929
  }
40005
39930
  }
40006
39931
  PathNameService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PathNameService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -42087,7 +42012,7 @@ class HighPerformanceService {
42087
42012
  return new Promise(async (resolve) => {
42088
42013
  const highPerformanceEndpoint = `${this.serviceUri}/HighPerformance/DoWork?returnSequenceNumber=${returnSequenceNumber}`;
42089
42014
  try {
42090
- const rs = await this._httpClient.post(highPerformanceEndpoint, model).toPromise();
42015
+ const rs = await firstValueFrom(this._httpClient.post(highPerformanceEndpoint, model));
42091
42016
  if (rs.success) {
42092
42017
  resolve(rs.data);
42093
42018
  }
@@ -42100,7 +42025,7 @@ class HighPerformanceService {
42100
42025
  async cancelProcess(queueName, uniqueKey) {
42101
42026
  try {
42102
42027
  const highPerformanceEndpoint = `${this.serviceUri}/HighPerformance/CancelWork?queueName=${queueName}&uniqueKey=${uniqueKey}`;
42103
- const rs = await this._httpClient.post(highPerformanceEndpoint, {}).toPromise();
42028
+ const rs = await firstValueFrom(this._httpClient.post(highPerformanceEndpoint, {}));
42104
42029
  if (rs.success) {
42105
42030
  return rs.data;
42106
42031
  }
@@ -45946,7 +45871,7 @@ class CommonAppComponentComponent {
45946
45871
  // tslint:disable-next-line: use-life-cycle-interface
45947
45872
  ngOnDestroy() {
45948
45873
  // Unsubscribe from all subscriptions
45949
- this._unsubscribeAll.next();
45874
+ this._unsubscribeAll.next(1);
45950
45875
  this._unsubscribeAll.complete();
45951
45876
  this._componentContextService.fireEvent(ComCtxConstants.ROOT.DESTROY_TASK_DETAIL_COMPONENT);
45952
45877
  }
@@ -48568,7 +48493,7 @@ class BaseCauHinhWorkflowComponent extends DataListBase {
48568
48493
  }
48569
48494
  }
48570
48495
  BaseCauHinhWorkflowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseCauHinhWorkflowComponent, deps: [{ token: i0.Injector }, { token: DmLoaiCongViecService }, { token: CauHinhWorkflowService }], target: i0.ɵɵFactoryTarget.Component });
48571
- BaseCauHinhWorkflowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BaseCauHinhWorkflowComponent, selector: "base-cauhinh-workflow", providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div class=\"tn-main-content\">\r\n <as-split>\r\n <as-split-area [size]=\"40\">\r\n <base-dm-loai-congviec [inCauHinhWorkflow]=\"true\" (onRowSelect)=\"handleSelectLoaiCongViec($event)\">\r\n </base-dm-loai-congviec>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <base-cauhinh-workflow-detail [isDetail]=\"true\" [itemLoaiCongViec]=\"itemLoaiCongViec\">\r\n </base-cauhinh-workflow-detail>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".container-task-info .percent-done{position:relative;border-radius:2px;background-color:#f0f0f0;height:5px;margin-top:5px;overflow:hidden}.container-task-info .percent-done .detail{position:absolute;left:0;top:0;height:5px;border-radius:2px;font-size:13px;text-align:center;color:#fff}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration"], outputs: ["dragStart", "dragEnd", "gutterClick", "gutterDblClick", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: BaseCauHinhWorkflowDetailComponent, selector: "base-cauhinh-workflow-detail", inputs: ["isDetail", "itemLoaiCongViec"] }, { kind: "component", type: BaseDmLoaiCongViecComponent, selector: "base-dm-loai-congviec", inputs: ["inCauHinhWorkflow"], outputs: ["onRowSelect"] }] });
48496
+ BaseCauHinhWorkflowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BaseCauHinhWorkflowComponent, selector: "base-cauhinh-workflow", providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div class=\"tn-main-content\">\r\n <as-split>\r\n <as-split-area [size]=\"40\">\r\n <base-dm-loai-congviec [inCauHinhWorkflow]=\"true\" (onRowSelect)=\"handleSelectLoaiCongViec($event)\">\r\n </base-dm-loai-congviec>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <base-cauhinh-workflow-detail [isDetail]=\"true\" [itemLoaiCongViec]=\"itemLoaiCongViec\">\r\n </base-cauhinh-workflow-detail>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".container-task-info .percent-done{position:relative;border-radius:2px;background-color:#f0f0f0;height:5px;margin-top:5px;overflow:hidden}.container-task-info .percent-done .detail{position:absolute;left:0;top:0;height:5px;border-radius:2px;font-size:13px;text-align:center;color:#fff}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: BaseCauHinhWorkflowDetailComponent, selector: "base-cauhinh-workflow-detail", inputs: ["isDetail", "itemLoaiCongViec"] }, { kind: "component", type: BaseDmLoaiCongViecComponent, selector: "base-dm-loai-congviec", inputs: ["inCauHinhWorkflow"], outputs: ["onRowSelect"] }] });
48572
48497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseCauHinhWorkflowComponent, decorators: [{
48573
48498
  type: Component,
48574
48499
  args: [{ selector: 'base-cauhinh-workflow', providers: [ComponentContextService], template: "<div class=\"tn-main-content\">\r\n <as-split>\r\n <as-split-area [size]=\"40\">\r\n <base-dm-loai-congviec [inCauHinhWorkflow]=\"true\" (onRowSelect)=\"handleSelectLoaiCongViec($event)\">\r\n </base-dm-loai-congviec>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <base-cauhinh-workflow-detail [isDetail]=\"true\" [itemLoaiCongViec]=\"itemLoaiCongViec\">\r\n </base-cauhinh-workflow-detail>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".container-task-info .percent-done{position:relative;border-radius:2px;background-color:#f0f0f0;height:5px;margin-top:5px;overflow:hidden}.container-task-info .percent-done .detail{position:absolute;left:0;top:0;height:5px;border-radius:2px;font-size:13px;text-align:center;color:#fff}\n"] }]
@@ -50551,10 +50476,10 @@ class UniqueNumberService {
50551
50476
  this.serviceUri = this.endPoint;
50552
50477
  }
50553
50478
  getUniqueNumber(code) {
50554
- return this._http.get(`${this.serviceUri}/Main/GetUniqueNumber/${code}`).toPromise();
50479
+ return firstValueFrom(this._http.get(`${this.serviceUri}/Main/GetUniqueNumber/${code}`));
50555
50480
  }
50556
50481
  confirmUniqueNumber(code, number) {
50557
- return this._http.get(`${this.serviceUri}/Main/ConfirmUniqueNumber/${code}/${number}`).toPromise();
50482
+ return firstValueFrom(this._http.get(`${this.serviceUri}/Main/ConfirmUniqueNumber/${code}/${number}`));
50558
50483
  }
50559
50484
  }
50560
50485
  UniqueNumberService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UniqueNumberService, deps: [{ token: i1$1.HttpClient }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });