tnx-shared 5.1.28 → 5.1.29

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 (81) hide show
  1. package/bundles/tnx-shared.umd.js +1520 -142
  2. package/bundles/tnx-shared.umd.js.map +1 -1
  3. package/bundles/tnx-shared.umd.min.js +1 -1
  4. package/bundles/tnx-shared.umd.min.js.map +1 -1
  5. package/components/chat/chat-box/chat-box.component.d.ts +102 -0
  6. package/components/chat/chat-box/chat-box.component.d.ts.map +1 -0
  7. package/components/chat/chat-box/chat-box.component.ngfactory.d.ts.map +1 -0
  8. package/components/chat/chat-box/chat-box.component.scss.shim.ngstyle.d.ts.map +1 -0
  9. package/components/chat/chat-send-message-box/chat-send-message-box.component.d.ts +37 -0
  10. package/components/chat/chat-send-message-box/chat-send-message-box.component.d.ts.map +1 -0
  11. package/components/chat/chat-send-message-box/chat-send-message-box.component.ngfactory.d.ts.map +1 -0
  12. package/components/chat/chat-send-message-box/chat-send-message-box.component.scss.shim.ngstyle.d.ts.map +1 -0
  13. package/components/chat/common-style.scss.shim.ngstyle.d.ts.map +1 -0
  14. package/components/chat/models/enums.d.ts +11 -0
  15. package/components/chat/models/enums.d.ts.map +1 -0
  16. package/components/chat/models/models.d.ts +10 -0
  17. package/components/chat/models/models.d.ts.map +1 -0
  18. package/components/chat/services/chat.service.d.ts +34 -0
  19. package/components/chat/services/chat.service.d.ts.map +1 -0
  20. package/components/chat/services/chat.service.ngfactory.d.ts.map +1 -0
  21. package/components/chat/services/content.service.d.ts +20 -0
  22. package/components/chat/services/content.service.d.ts.map +1 -0
  23. package/components/chat/services/content.service.ngfactory.d.ts.map +1 -0
  24. package/components/chat/services/message-board.service.d.ts +15 -0
  25. package/components/chat/services/message-board.service.d.ts.map +1 -0
  26. package/components/chat/services/message-board.service.ngfactory.d.ts.map +1 -0
  27. package/components/chat/services/status.service.d.ts +14 -0
  28. package/components/chat/services/status.service.d.ts.map +1 -0
  29. package/components/chat/services/status.service.ngfactory.d.ts.map +1 -0
  30. package/components/file-explorer/models/service-request-model.d.ts +1 -0
  31. package/components/file-explorer/models/service-request-model.d.ts.map +1 -1
  32. package/components/user-picker/user-picker-dialog/user-picker-dialog.component.d.ts +23 -0
  33. package/components/user-picker/user-picker-dialog/user-picker-dialog.component.d.ts.map +1 -0
  34. package/components/user-picker/user-picker-dialog/user-picker-dialog.component.ngfactory.d.ts.map +1 -0
  35. package/components/user-picker/user-picker-dialog/user-picker-dialog.component.scss.shim.ngstyle.d.ts.map +1 -0
  36. package/congviec/congviec/congviec-form/congviec-form.component.d.ts +9 -1
  37. package/congviec/congviec/congviec-form/congviec-form.component.d.ts.map +1 -1
  38. package/esm2015/classes/base/data-list-base.js +3 -3
  39. package/esm2015/components/chat/chat-box/chat-box.component.js +626 -0
  40. package/esm2015/components/chat/chat-send-message-box/chat-send-message-box.component.js +245 -0
  41. package/esm2015/components/chat/models/enums.js +13 -0
  42. package/esm2015/components/chat/models/models.js +12 -0
  43. package/esm2015/components/chat/services/chat.service.js +113 -0
  44. package/esm2015/components/chat/services/content.service.js +57 -0
  45. package/esm2015/components/chat/services/message-board.service.js +40 -0
  46. package/esm2015/components/chat/services/status.service.js +36 -0
  47. package/esm2015/components/file-explorer/file-manager/file-manager.component.js +3 -3
  48. package/esm2015/components/file-explorer/file-viewer/file-viewer.component.js +2 -2
  49. package/esm2015/components/file-explorer/models/service-request-model.js +5 -2
  50. package/esm2015/components/user-picker/user-picker-dialog/user-picker-dialog.component.js +52 -0
  51. package/esm2015/congviec/cauhinh-workflow/cauhinh-workflow-detail/cauhinh-workflow-detail.component.js +2 -2
  52. package/esm2015/congviec/congviec/congviec-form/congviec-form.component.js +25 -4
  53. package/esm2015/congviec/congviec/congviec.component.js +3 -3
  54. package/esm2015/models/basic-user-info.js +6 -1
  55. package/esm2015/public-api.js +4 -1
  56. package/esm2015/services/base.service.js +17 -7
  57. package/esm2015/services/crud.service.js +56 -41
  58. package/esm2015/services/notifier.service.js +2 -2
  59. package/esm2015/services/user.service.js +37 -23
  60. package/esm2015/tnx-shared.js +9 -5
  61. package/esm2015/tnx-shared.module.js +8 -2
  62. package/fesm2015/tnx-shared.js +1318 -137
  63. package/fesm2015/tnx-shared.js.map +1 -1
  64. package/models/basic-user-info.d.ts +2 -3
  65. package/models/basic-user-info.d.ts.map +1 -1
  66. package/package.json +2 -2
  67. package/public-api.d.ts +3 -0
  68. package/public-api.d.ts.map +1 -1
  69. package/services/base.service.d.ts +1 -0
  70. package/services/base.service.d.ts.map +1 -1
  71. package/services/crud.service.d.ts.map +1 -1
  72. package/services/notifier.service.d.ts +1 -1
  73. package/services/notifier.service.d.ts.map +1 -1
  74. package/services/user.service.d.ts +14 -2
  75. package/services/user.service.d.ts.map +1 -1
  76. package/tnx-shared.d.ts +8 -4
  77. package/tnx-shared.d.ts.map +1 -1
  78. package/tnx-shared.metadata.json +1 -1
  79. package/tnx-shared.module.d.ts +4 -1
  80. package/tnx-shared.module.d.ts.map +1 -1
  81. package/tnx-shared.module.ngfactory.d.ts.map +1 -1
@@ -904,7 +904,7 @@
904
904
  life: life
905
905
  });
906
906
  };
907
- NotifierService.prototype.showWarningByReponse = function (res) {
907
+ NotifierService.prototype.showWarningByResponse = function (res) {
908
908
  var message = res.message;
909
909
  if (!message)
910
910
  message = res.error;
@@ -5475,16 +5475,16 @@
5475
5475
  return Math.ceil(milisecond / 3600000) + ' giờ trước';
5476
5476
  }
5477
5477
  else {
5478
- return ('Hôm qua lúc ' +
5479
- this.datePipe.transform(datetime, 'HH:mm'));
5478
+ return ('Hôm qua lúc '
5479
+ + this.datePipe.transform(datetime, 'HH:mm'));
5480
5480
  }
5481
5481
  }
5482
5482
  if (milisecond >= 86400000) {
5483
- if (datetime.getDate() == now.getDate() - 1 &&
5484
- datetime.getMonth() == now.getMonth() &&
5485
- datetime.getYear() == now.getYear()) {
5486
- return ('Hôm qua lúc ' +
5487
- this.datePipe.transform(datetime, 'HH:mm'));
5483
+ if (datetime.getDate() == now.getDate() - 1
5484
+ && datetime.getMonth() == now.getMonth()
5485
+ && datetime.getYear() == now.getYear()) {
5486
+ return ('Hôm qua lúc '
5487
+ + this.datePipe.transform(datetime, 'HH:mm'));
5488
5488
  }
5489
5489
  else {
5490
5490
  return this.datePipe.transform(datetime, 'dd/MM/yyyy HH:mm');
@@ -5519,25 +5519,25 @@
5519
5519
  return Math.ceil(milisecond / 3600000) + ' giờ nữa';
5520
5520
  }
5521
5521
  else {
5522
- return ('Ngày mai lúc ' +
5523
- this.datePipe.transform(datetime, 'HH:mm'));
5522
+ return ('Ngày mai lúc '
5523
+ + this.datePipe.transform(datetime, 'HH:mm'));
5524
5524
  }
5525
5525
  }
5526
5526
  if (milisecond >= 86400000) {
5527
- if (datetime.getDate() == now.getDate() - 1 &&
5528
- datetime.getMonth() == now.getMonth() &&
5529
- datetime.getYear() == now.getYear()) {
5530
- return ('Ngày mai lúc ' +
5531
- this.datePipe.transform(datetime, 'HH:mm'));
5532
- }
5533
- if (datetime.getDate() == now.getDate() - 2 &&
5534
- datetime.getMonth() == now.getMonth() &&
5535
- datetime.getYear() == now.getYear()) {
5527
+ if (datetime.getDate() == now.getDate() - 1
5528
+ && datetime.getMonth() == now.getMonth()
5529
+ && datetime.getYear() == now.getYear()) {
5530
+ return ('Ngày mai lúc '
5531
+ + this.datePipe.transform(datetime, 'HH:mm'));
5532
+ }
5533
+ if (datetime.getDate() == now.getDate() - 2
5534
+ && datetime.getMonth() == now.getMonth()
5535
+ && datetime.getYear() == now.getYear()) {
5536
5536
  return 'Hai ngày nữa';
5537
5537
  }
5538
- else if (datetime.getDate() == now.getDate() - 3 &&
5539
- datetime.getMonth() == now.getMonth() &&
5540
- datetime.getYear() == now.getYear()) {
5538
+ else if (datetime.getDate() == now.getDate() - 3
5539
+ && datetime.getMonth() == now.getMonth()
5540
+ && datetime.getYear() == now.getYear()) {
5541
5541
  return 'Ba ngày nữa';
5542
5542
  }
5543
5543
  else {
@@ -5558,8 +5558,8 @@
5558
5558
  return this.datePipe.transform(datetime, 'dd/MM/yyyy');
5559
5559
  }
5560
5560
  var now = new Date();
5561
- if (datetime.getMonth() == now.getMonth() &&
5562
- datetime.getYear() == now.getYear()) {
5561
+ if (datetime.getMonth() == now.getMonth()
5562
+ && datetime.getYear() == now.getYear()) {
5563
5563
  var days = datetime.getDate() - now.getDate();
5564
5564
  if (days == 0) {
5565
5565
  return 'Hôm nay';
@@ -5590,7 +5590,8 @@
5590
5590
  return this.datePipe.transform(datetime, 'dd/MM/yyyy');
5591
5591
  }
5592
5592
  };
5593
- CrudService.prototype.hideControlAndLabel = function () { };
5593
+ CrudService.prototype.hideControlAndLabel = function () {
5594
+ };
5594
5595
  CrudService.prototype.buildFilter = function (field, operator, value) {
5595
5596
  return new Filter({ field: field, operator: operator, value: value });
5596
5597
  };
@@ -5697,7 +5698,8 @@
5697
5698
  _this.createDropdownOptions(schema));
5698
5699
  }
5699
5700
  promise.then(function (res) {
5700
- var funcSetValueRow = function (rowItem, data) { };
5701
+ var funcSetValueRow = function (rowItem, data) {
5702
+ };
5701
5703
  if (schema.funcSetValueRow) {
5702
5704
  funcSetValueRow = schema.funcSetValueRow;
5703
5705
  }
@@ -6024,19 +6026,24 @@
6024
6026
  this._injector.get(NotifierService).showWarning('Có lỗi xảy ra. Liên hệ quản trị viên để biết thêm chi tiết.');
6025
6027
  }
6026
6028
  else {
6027
- if (res.message != null && res.message != '')
6029
+ if (res.message != null && res.message != '') {
6028
6030
  this._injector.get(NotifierService).showWarning(res.message);
6029
- else
6031
+ }
6032
+ else {
6030
6033
  this._injector.get(NotifierService).showWarning(res.error);
6034
+ }
6031
6035
  }
6032
- if (callBackError)
6036
+ if (callBackError) {
6033
6037
  callBackError(res);
6038
+ }
6034
6039
  return;
6035
6040
  }
6036
- if (message)
6041
+ if (message) {
6037
6042
  this._injector.get(NotifierService).showSuccess(message);
6038
- if (callBack)
6043
+ }
6044
+ if (callBack) {
6039
6045
  callBack(res);
6046
+ }
6040
6047
  };
6041
6048
  CrudService.prototype.handleReponsePromise = function (res, messageSuccess) {
6042
6049
  var _this = this;
@@ -6087,14 +6094,16 @@
6087
6094
  };
6088
6095
  if (model.hasOwnProperty(sourceField)) {
6089
6096
  valueFilter = model[sourceField];
6090
- if (canAccessSubField(valueFilter))
6097
+ if (canAccessSubField(valueFilter)) {
6091
6098
  valueFilter = valueFilter[subField];
6099
+ }
6092
6100
  }
6093
6101
  else if (rootModel) {
6094
6102
  if (rootModel.hasOwnProperty(sourceField)) {
6095
6103
  valueFilter = rootModel[sourceField];
6096
- if (canAccessSubField(valueFilter))
6104
+ if (canAccessSubField(valueFilter)) {
6097
6105
  valueFilter = valueFilter[subField];
6106
+ }
6098
6107
  }
6099
6108
  else {
6100
6109
  var fields = sourceField.split('.');
@@ -6118,25 +6127,30 @@
6118
6127
  }
6119
6128
  finally { if (e_1) throw e_1.error; }
6120
6129
  }
6121
- if (canAccessSubField(temp))
6130
+ if (canAccessSubField(temp)) {
6122
6131
  valueFilter = temp[subField];
6132
+ }
6123
6133
  }
6124
6134
  }
6125
- if (filter.logic == null && (valueFilter == null || valueFilter === '' || valueFilter.length == 0))
6135
+ if (filter.logic == null && (valueFilter == null || valueFilter === '' || valueFilter.length == 0)) {
6126
6136
  return;
6137
+ }
6127
6138
  var tmpFilter = new Filter(filter);
6128
6139
  delete tmpFilter.sourceField;
6129
- if (tmpFilter.funcGetValue)
6140
+ if (tmpFilter.funcGetValue) {
6130
6141
  valueFilter = tmpFilter.funcGetValue(valueFilter);
6142
+ }
6131
6143
  tmpFilter.value = JSON.stringify(valueFilter);
6132
6144
  tmpFilter.filters = [];
6133
6145
  if (filter.logic && filter.filters) {
6134
6146
  filter.filters.forEach(function (f) { return _this.deQuyReplaceValue(tmpFilter.filters, f, model, rootModel); });
6135
- if (tmpFilter.filters.length > 0)
6147
+ if (tmpFilter.filters.length > 0) {
6136
6148
  filters.push(tmpFilter);
6149
+ }
6137
6150
  }
6138
- else
6151
+ else {
6139
6152
  filters.push(tmpFilter);
6153
+ }
6140
6154
  };
6141
6155
  CrudService.prototype.getWorkflowCoreStatusText = function (workflowCoreStatusValue) {
6142
6156
  var item = DataSourceWorkflowCoreStatus.find(function (x) { return x.id == workflowCoreStatusValue; });
@@ -6282,7 +6296,8 @@
6282
6296
  if (schema.funcGetLabel) {
6283
6297
  funcGetLabel = schema.funcGetLabel;
6284
6298
  }
6285
- var funcSetValueRow = function (rowItem, data) { };
6299
+ var funcSetValueRow = function (rowItem, data) {
6300
+ };
6286
6301
  var funcGetRefDataRow = function (refItems) {
6287
6302
  return refItems.map(function (item) { return funcGetLabel(item); }).join(schema.separator + " ");
6288
6303
  };
@@ -6439,14 +6454,17 @@
6439
6454
  }
6440
6455
  }
6441
6456
  });
6442
- if (apiUrl.indexOf('?') == -1)
6457
+ if (apiUrl.indexOf('?') == -1) {
6443
6458
  apiUrl += "?";
6444
- else
6459
+ }
6460
+ else {
6445
6461
  apiUrl += "&";
6462
+ }
6446
6463
  apiUrl += "_keySignalr=" + topic;
6447
6464
  _this._http.get(apiUrl)
6448
6465
  .pipe(operators.shareReplay(_this.REPLAY_COUNT), operators.retry(_this.RETRY_COUNT), operators.catchError(function (err) { return _this.handleError(err, _this._injector); })).toPromise()
6449
- .then(function (res) { })
6466
+ .then(function (res) {
6467
+ })
6450
6468
  .catch(function (err) {
6451
6469
  _this.unSubscribeSignalR(topic);
6452
6470
  reject(err);
@@ -6468,14 +6486,17 @@
6468
6486
  }
6469
6487
  }
6470
6488
  });
6471
- if (apiUrl.indexOf('?') == -1)
6489
+ if (apiUrl.indexOf('?') == -1) {
6472
6490
  apiUrl += "?";
6473
- else
6491
+ }
6492
+ else {
6474
6493
  apiUrl += "&";
6494
+ }
6475
6495
  apiUrl += "_keySignalr=" + topic;
6476
6496
  _this._http.post(apiUrl, data)
6477
6497
  .pipe(operators.shareReplay(_this.REPLAY_COUNT), operators.retry(_this.RETRY_COUNT), operators.catchError(function (err) { return _this.handleError(err, _this._injector); })).toPromise()
6478
- .then(function (res) { })
6498
+ .then(function (res) {
6499
+ })
6479
6500
  .catch(function (err) {
6480
6501
  _this.unSubscribeSignalR(topic);
6481
6502
  reject(err);
@@ -6819,6 +6840,11 @@
6819
6840
  var url = this.serviceUri + "/" + id;
6820
6841
  return this._http.delete(url).toPromise();
6821
6842
  };
6843
+ BaseService.prototype.deleteById = function (id) {
6844
+ var _this = this;
6845
+ var url = this.serviceUri + "/" + id;
6846
+ return this._http.delete(url).pipe(operators.catchError(function (err) { return _this.handleError(err, _this._injector); })).toPromise();
6847
+ };
6822
6848
  BaseService.prototype.deleteMany = function (lstId) {
6823
6849
  var url = this.serviceUri + "/DeleteManyAsync/" + lstId;
6824
6850
  return this._http.delete(url).toPromise();
@@ -9177,6 +9203,12 @@
9177
9203
  });
9178
9204
  }
9179
9205
  };
9206
+ /**
9207
+ * Hàm dùng để lấy thông tin cơ bản nhiều người dùng dựa vào userName,
9208
+ * hiện tại chưa có thông tin về đơn vị và chức vụ người dùng để giảm load và vì chưa dùng đến
9209
+ * @param {string} userName
9210
+ * @return {Promise<BasicUserInfo[]>
9211
+ */
9180
9212
  UserService.prototype.getBasicUserInfoByUserName = function (userName) {
9181
9213
  var _this = this;
9182
9214
  var storageItem = localStorage.getItem(this.USER_INFO_KEY + '_' + userName);
@@ -9211,24 +9243,37 @@
9211
9243
  }); });
9212
9244
  }
9213
9245
  };
9214
- UserService.prototype.getBasicUsersInfoByUserName = function (userNames) {
9215
- var _this = this;
9216
- var storageItem = localStorage.getItem(this.USER_INFO_KEY);
9217
- var userInfos = JSON.parse(storageItem);
9218
- var check = userInfos ? userNames.indexOf(userInfos['userName']) > -1 : null;
9219
- if (check) {
9220
- return new Promise(function (resolve, reject) { return resolve(userInfos); });
9221
- }
9222
- else {
9223
- return new Promise(function (resolve, reject) {
9224
- var svUrl = _this.serviceUri + "/GetBasicUsersInfoByUserName?userNames=" + userNames;
9225
- _this._http.get(svUrl).pipe(operators.shareReplay(_this.REPLAY_COUNT), operators.retry(_this.RETRY_COUNT), operators.catchError(function (err) { return _this.handleError(err, _this._injector); }), operators.map(function (repsonse) { return repsonse.data; })).toPromise().then(function (success) {
9226
- resolve(success);
9227
- }).catch(function (err) {
9228
- resolve([]);
9229
- });
9246
+ /**
9247
+ * Hàm dùng để lấy thông tin cơ bản nhiều người dùng dựa vào userName,
9248
+ * hiện tại chưa có thông tin về đơn vị và chức vụ người dùng để giảm load và vì chưa dùng đến
9249
+ * @param {string} userNames
9250
+ * @return {Promise<BasicUserInfo[]>
9251
+ */
9252
+ UserService.prototype.getBasicUsersInfoByUserNames = function (userNames) {
9253
+ return __awaiter(this, void 0, void 0, function () {
9254
+ var storageItem, userInfos, check, svUrl;
9255
+ var _this = this;
9256
+ return __generator(this, function (_b) {
9257
+ switch (_b.label) {
9258
+ case 0:
9259
+ storageItem = localStorage.getItem(this.USER_INFO_KEY);
9260
+ userInfos = JSON.parse(storageItem);
9261
+ check = userInfos ? userNames.indexOf(userInfos['userName']) > -1 : null;
9262
+ if (!check) return [3 /*break*/, 1];
9263
+ return [2 /*return*/, userInfos];
9264
+ case 1:
9265
+ svUrl = this.serviceUri + "/GetBasicUsersInfoByUserNames?userNames=" + userNames;
9266
+ return [4 /*yield*/, this._http.get(svUrl).pipe(operators.shareReplay(this.REPLAY_COUNT), operators.retry(this.RETRY_COUNT), operators.catchError(function (err) { return _this.handleError(err, _this._injector); }), operators.map(function (repsonse) {
9267
+ localStorage.setItem(_this.USER_INFO_KEY + '_' + repsonse.data.map(function (x) {
9268
+ if (x.userName)
9269
+ return x.userName;
9270
+ }), JSON.stringify(repsonse.data));
9271
+ return repsonse.data;
9272
+ })).toPromise().catch(function (err) { return []; })];
9273
+ case 2: return [2 /*return*/, _b.sent()];
9274
+ }
9230
9275
  });
9231
- }
9276
+ });
9232
9277
  };
9233
9278
  UserService.prototype.convertListUserIdToString = function (userIds) {
9234
9279
  if (userIds.length > 0) {
@@ -9236,14 +9281,14 @@
9236
9281
  }
9237
9282
  return ',';
9238
9283
  };
9239
- UserService.prototype.fillBasicUserInfo = function (dataSource, propertyName, users) {
9284
+ UserService.prototype.fillBasicUserInfo = function (dataSource, propertyName) {
9240
9285
  dataSource.forEach(function (item) {
9241
9286
  var userId = item[propertyName].id ? item[propertyName].id : item[propertyName];
9242
9287
  // tslint:disable-next-line:no-shadowed-variable
9243
- var user = users.find(function (user) { return user.id === userId; });
9244
- if (user) {
9245
- item[propertyName] = user;
9246
- }
9288
+ // const user = users.find(user => user.id === userId);
9289
+ // if (user) {
9290
+ // item[propertyName] = user;
9291
+ // }
9247
9292
  });
9248
9293
  return dataSource;
9249
9294
  };
@@ -11520,7 +11565,7 @@
11520
11565
  _this._notifierService.showDeleteDataSuccess();
11521
11566
  }
11522
11567
  else {
11523
- _this._notifierService.showWarningByReponse(response);
11568
+ _this._notifierService.showWarningByResponse(response);
11524
11569
  }
11525
11570
  }, function (error) {
11526
11571
  _this._notifierService.showDeleteDataError();
@@ -11545,7 +11590,7 @@
11545
11590
  _this._notifierService.showDeleteDataSuccess();
11546
11591
  }
11547
11592
  else {
11548
- _this._notifierService.showWarningByReponse(response);
11593
+ _this._notifierService.showWarningByResponse(response);
11549
11594
  }
11550
11595
  });
11551
11596
  }
@@ -33437,7 +33482,7 @@
33437
33482
  _this._notifierService.showDeleteDataSuccess();
33438
33483
  }
33439
33484
  else {
33440
- _this._notifierService.showWarningByReponse(response);
33485
+ _this._notifierService.showWarningByResponse(response);
33441
33486
  }
33442
33487
  });
33443
33488
  });
@@ -33558,7 +33603,7 @@
33558
33603
  _this.data.moving = {};
33559
33604
  }
33560
33605
  else {
33561
- _this._notifierService.showWarningByReponse(response);
33606
+ _this._notifierService.showWarningByResponse(response);
33562
33607
  }
33563
33608
  });
33564
33609
  };
@@ -34565,7 +34610,7 @@
34565
34610
  _this.onClose.next(true);
34566
34611
  }
34567
34612
  else {
34568
- _this._notifierService.showWarningByReponse(response);
34613
+ _this._notifierService.showWarningByResponse(response);
34569
34614
  }
34570
34615
  });
34571
34616
  });
@@ -44821,7 +44866,7 @@
44821
44866
  BaseCauHinhWorkflowDetailComponent.decorators = [
44822
44867
  { type: i0.Component, args: [{
44823
44868
  selector: 'base-cauhinh-workflow-detail',
44824
- template: "<workflow-picker #workflowPicker *ngIf=\"readyGenWorkflow\" #formBase [data]=\"workflowData\" [showButtonSave]=\"true\"\r\n (onSaveSetting)=\"handleSave($event)\"></workflow-picker>\r\n<after-view-checked *ngIf=\"hasCountDown\" (loaded)=\"handleReadyToGetWorkflowData()\">\r\n</after-view-checked>",
44869
+ template: "<workflow-picker #workflowPicker *ngIf=\"readyGenWorkflow\" #formBase [data]=\"workflowData\" [showButtonSave]=\"true\"\r\n (onSaveSetting)=\"handleSave($event)\"></workflow-picker>\r\n<after-view-checked *ngIf=\"hasCountDown\" (loaded)=\"handleReadyToGetWorkflowData()\">\r\n</after-view-checked>\r\n",
44825
44870
  providers: [ComponentContextService],
44826
44871
  styles: [".container-task-info .percent-done{background-color:#f0f0f0;border-radius:2px;height:5px;margin-top:5px;overflow:hidden;position:relative}.container-task-info .percent-done .detail{border-radius:2px;color:#fff;font-size:13px;height:5px;left:0;position:absolute;text-align:center;top:0}"]
44827
44872
  },] }
@@ -45374,6 +45419,12 @@
45374
45419
  _this.autoFocus = true;
45375
45420
  _this.enumFormState = exports.FormState;
45376
45421
  _this.enumLoaiDanhSachCongViec = exports.EnumLoaiDanhSachCongViec;
45422
+ _this.users = {
45423
+ taskName: '',
45424
+ assigner: 0,
45425
+ assignee: 0,
45426
+ relatedUsers: [],
45427
+ };
45377
45428
  _this.tabDataChild = [
45378
45429
  {
45379
45430
  code: 'fileDinhKem',
@@ -45389,6 +45440,11 @@
45389
45440
  code: 'taskLienQuan',
45390
45441
  icon: 'pi pi-share-alt',
45391
45442
  label: 'Công việc liên quan'
45443
+ },
45444
+ {
45445
+ code: 'traoDoiCongViec',
45446
+ icon: 'pi pi-comment',
45447
+ label: 'Trao đổi công việc',
45392
45448
  }
45393
45449
  ];
45394
45450
  _this.handleChangeLoaiCongViecWhenAdd = function (evt) { return __awaiter(_this, void 0, void 0, function () {
@@ -45404,6 +45460,9 @@
45404
45460
  }
45405
45461
  });
45406
45462
  }); };
45463
+ _this.users.assigner = 0;
45464
+ _this.users.assignee = 0;
45465
+ _this.users.relatedUsers = [];
45407
45466
  return _this;
45408
45467
  }
45409
45468
  Object.defineProperty(BaseCongViecFormComponent.prototype, "tenCongViec", {
@@ -45519,19 +45578,25 @@
45519
45578
  });
45520
45579
  });
45521
45580
  };
45522
- BaseCongViecFormComponent.prototype.onBeforeSave = function () {
45523
- };
45524
45581
  BaseCongViecFormComponent.prototype.onAfterSave = function (res) {
45525
45582
  if (this.model.formState == exports.FormState.ADD && res && res.success && res.data) {
45526
45583
  this.onAfterSaved.emit(res.data);
45527
45584
  }
45528
45585
  };
45586
+ BaseCongViecFormComponent.prototype.onTabChange = function (evt) {
45587
+ this.currentTabIndex = evt.index;
45588
+ this.users.taskName = this.model.data.ten;
45589
+ };
45590
+ BaseCongViecFormComponent.prototype.forcusToFirstInputControl = function (event) {
45591
+ event.preventDefault();
45592
+ this.context.fireEvent(ComCtxConstants.COMMON.FOCUS_TO_FIRST_INPUT_CONTROL);
45593
+ };
45529
45594
  return BaseCongViecFormComponent;
45530
45595
  }(DataFormBase));
45531
45596
  BaseCongViecFormComponent.decorators = [
45532
45597
  { type: i0.Component, args: [{
45533
45598
  selector: 'base-congviec-form',
45534
- template: "<crud-form #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\"\r\n [autoFocus]=\"autoFocus\" (onFormReady)=\"_handleFormReady($event)\">\r\n</crud-form>\r\n<base-congviec-dinhkem [loadDetailFromQueryParam]=\"false\" [formState]=\"model.formState\" [taskId]=\"model.data.id\">\r\n</base-congviec-dinhkem>\r\n<div class=\"tab-child\">\r\n <tn-tabview [data]=\"tabDataChild\">\r\n <ng-template #fileDinhKem>\r\n <file-manager [loadDetailFromQueryParam]=\"false\" [serviceCode]=\"setting.baseService.serviceCode\"\r\n [entity]=\"setting.baseService.entityName\" [entityKey]=\"model.data.id\"\r\n [readonly]=\"model.formState == enumFormState.VIEW\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #taskChild>\r\n <div style=\"height: 100%\">\r\n <base-congviec [loadDetailFromQueryParam]=\"false\" [isChildView]=\"true\" [formState]=\"model.formState\"\r\n [loaiDanhSach]=\"enumLoaiDanhSachCongViec.CongViecCon\" [idCongViec]=\"model.data.id\">\r\n </base-congviec>\r\n </div>\r\n </ng-template>\r\n <ng-template #taskLienQuan>\r\n <base-congviec [loadDetailFromQueryParam]=\"false\" [isChildView]=\"true\" [formState]=\"model.formState\"\r\n [loaiDanhSach]=\"enumLoaiDanhSachCongViec.CongViecLienQuan\" [idCongViec]=\"model.data.id\">\r\n </base-congviec>\r\n </ng-template>\r\n </tn-tabview>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button *ngIf=\"!model.data.__disableEdit && !__isFormView\" type=\"button\" pButton icon=\"pi pi-save\"\r\n class=\"p-button-text\" [label]=\"'FORM.SAVE' | translate\" (click)=\"_handleSave($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)=\"_handleCancel($event)\"></button>\r\n</ng-template>",
45599
+ template: "<crud-form #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\"\r\n [autoFocus]=\"autoFocus\" (onFormReady)=\"_handleFormReady($event)\">\r\n</crud-form>\r\n<base-congviec-dinhkem [loadDetailFromQueryParam]=\"false\" [formState]=\"model.formState\" [taskId]=\"model.data.id\">\r\n</base-congviec-dinhkem>\r\n<div class=\"tab-child\">\r\n <tn-tabview [data]=\"tabDataChild\" (onTabChange)=\"onTabChange($event)\">\r\n <ng-template #fileDinhKem>\r\n <file-manager [loadDetailFromQueryParam]=\"false\" [serviceCode]=\"setting.baseService.serviceCode\"\r\n [entity]=\"setting.baseService.entityName\" [entityKey]=\"model.data.id\"\r\n [readonly]=\"model.formState == enumFormState.VIEW\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #taskChild>\r\n <div style=\"height: 100%\">\r\n <base-congviec [loadDetailFromQueryParam]=\"false\" [isChildView]=\"true\" [formState]=\"model.formState\"\r\n [loaiDanhSach]=\"enumLoaiDanhSachCongViec.CongViecCon\" [idCongViec]=\"model.data.id\">\r\n </base-congviec>\r\n </div>\r\n </ng-template>\r\n <ng-template #taskLienQuan>\r\n <base-congviec [loadDetailFromQueryParam]=\"false\" [isChildView]=\"true\" [formState]=\"model.formState\"\r\n [loaiDanhSach]=\"enumLoaiDanhSachCongViec.CongViecLienQuan\" [idCongViec]=\"model.data.id\">\r\n </base-congviec>\r\n </ng-template>\r\n <ng-template #traoDoiCongViec>\r\n <div style=\"height: 350px;\">\r\n <chat-box [showSendMessageBox]=\"false\" [serviceCode]=\"'congviec'\" [entity]=\"'congviec'\"\r\n [taskId]=\"model.data.id\" [parentModel]=\"model\" [parentContext]=\"context\"\r\n [users]=\"users\"\r\n ></chat-box>\r\n </div>\r\n <chat-send-message-box [parentContext]=\"context\">\r\n </chat-send-message-box>\r\n </ng-template>\r\n </tn-tabview>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button *ngIf=\"!model.data.__disableEdit && !__isFormView\" type=\"button\" pButton icon=\"pi pi-save\"\r\n class=\"p-button-text\" [label]=\"'FORM.SAVE' | translate\" (click)=\"_handleSave($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)=\"_handleCancel($event)\"></button>\r\n</ng-template>\r\n",
45535
45600
  providers: [ComponentContextService],
45536
45601
  styles: [".tab-child{padding:1em}"]
45537
45602
  },] }
@@ -45895,7 +45960,7 @@
45895
45960
  _this.reload();
45896
45961
  }
45897
45962
  else {
45898
- _this._notifierService.showWarningByReponse(response);
45963
+ _this._notifierService.showWarningByResponse(response);
45899
45964
  }
45900
45965
  }, function (error) {
45901
45966
  _this._notifierService.showDeleteDataError();
@@ -45909,7 +45974,7 @@
45909
45974
  _this.reload();
45910
45975
  }
45911
45976
  else {
45912
- _this._notifierService.showWarningByReponse(response);
45977
+ _this._notifierService.showWarningByResponse(response);
45913
45978
  }
45914
45979
  }, function (error) {
45915
45980
  _this._notifierService.showDeleteDataError();
@@ -47829,6 +47894,1368 @@
47829
47894
  { type: UserService }
47830
47895
  ]; };
47831
47896
 
47897
+ var ServiceRequestModel = /** @class */ (function () {
47898
+ function ServiceRequestModel(init) {
47899
+ this.service = '';
47900
+ this.entityInstanceId = '';
47901
+ this.parent = null;
47902
+ this.serviceCode = '';
47903
+ this.entity = '';
47904
+ this.entityKey = '';
47905
+ for (var key in init) {
47906
+ this[key] = init[key];
47907
+ }
47908
+ }
47909
+ return ServiceRequestModel;
47910
+ }());
47911
+
47912
+ var ContentsService = /** @class */ (function (_super) {
47913
+ __extends(ContentsService, _super);
47914
+ function ContentsService(_injector, _httpClient, _moduleConfigService, _fileService) {
47915
+ var _this = _super.call(this, _httpClient, _injector, _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/Contents") || this;
47916
+ _this._moduleConfigService = _moduleConfigService;
47917
+ _this._fileService = _fileService;
47918
+ _this.entityName = 'Contents';
47919
+ _this.serviceCode = 'chat';
47920
+ _this.endPoint = "" + _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint;
47921
+ return _this;
47922
+ }
47923
+ ContentsService.prototype.getByService = function (model, page) {
47924
+ if (page === void 0) { page = 0; }
47925
+ var serviceCode = model.serviceCode, entity = model.entity, entityKey = model.entityKey;
47926
+ var url = this.serviceUri + "/GetByService?serviceCode=" + serviceCode + "&entity=" + entity + "&entityKey=" + entityKey + "&page=" + page;
47927
+ return this.defaultGet(url);
47928
+ };
47929
+ ContentsService.prototype.getByTaskId = function (model, taskId) {
47930
+ var serviceCode = model.serviceCode, entity = model.entity, entityKey = model.entityKey;
47931
+ var url = this.serviceUri + "/GetByTaskId?serviceCode=" + serviceCode + "&entity=" + entity + "&entityKey=" + entityKey + "&taskId=" + taskId;
47932
+ return this.defaultGet(url);
47933
+ };
47934
+ ContentsService.prototype.getContentById = function (data) {
47935
+ var url = this.serviceUri + "/GetByChatId/" + data.instanceId;
47936
+ if (data.page) {
47937
+ url += url + "?page=" + data.page;
47938
+ }
47939
+ return this.defaultGet(url);
47940
+ };
47941
+ ContentsService.prototype.sendMessage = function (messageContent) {
47942
+ var url = this.serviceUri + "/SendMessage";
47943
+ return this.defaultPost(url, messageContent);
47944
+ };
47945
+ ContentsService.prototype.markAsReadAllContents = function (chatId) {
47946
+ var url = this.serviceUri + "ReadInfo/MarkAsReadAllContents/" + chatId;
47947
+ return this.defaultPost(url, chatId);
47948
+ };
47949
+ return ContentsService;
47950
+ }(BaseService));
47951
+ ContentsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ContentsService_Factory() { return new ContentsService(i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(FileExplorerService)); }, token: ContentsService, providedIn: "root" });
47952
+ ContentsService.decorators = [
47953
+ { type: i0.Injectable, args: [{
47954
+ providedIn: 'root'
47955
+ },] }
47956
+ ];
47957
+ ContentsService.ctorParameters = function () { return [
47958
+ { type: i0.Injector },
47959
+ { type: i1$1.HttpClient },
47960
+ { type: ModuleConfigService },
47961
+ { type: FileExplorerService }
47962
+ ]; };
47963
+
47964
+ var StatusExtendsService = /** @class */ (function (_super) {
47965
+ __extends(StatusExtendsService, _super);
47966
+ function StatusExtendsService(_injector, _http, _moduleConfigService) {
47967
+ var _this = _super.call(this, _http, _injector, _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/StatusExtends") || this;
47968
+ _this._moduleConfigService = _moduleConfigService;
47969
+ _this.entityName = 'StatusExtends';
47970
+ _this.serviceCode = 'chat';
47971
+ _this.endPoint = "" + _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint;
47972
+ return _this;
47973
+ }
47974
+ StatusExtendsService.prototype.insertUserOnline = function (chatId) {
47975
+ var statusExtends = { chatId: chatId };
47976
+ var url = this.serviceUri + "/InsertUserOnline";
47977
+ return this.defaultPost(url, statusExtends);
47978
+ };
47979
+ StatusExtendsService.prototype.removeUserOnline = function (id) {
47980
+ return this.deleteById(id);
47981
+ };
47982
+ return StatusExtendsService;
47983
+ }(BaseService));
47984
+ StatusExtendsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StatusExtendsService_Factory() { return new StatusExtendsService(i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(ModuleConfigService)); }, token: StatusExtendsService, providedIn: "root" });
47985
+ StatusExtendsService.decorators = [
47986
+ { type: i0.Injectable, args: [{
47987
+ providedIn: 'root'
47988
+ },] }
47989
+ ];
47990
+ StatusExtendsService.ctorParameters = function () { return [
47991
+ { type: i0.Injector },
47992
+ { type: i1$1.HttpClient },
47993
+ { type: ModuleConfigService }
47994
+ ]; };
47995
+
47996
+ var ChatService = /** @class */ (function (_super) {
47997
+ __extends(ChatService, _super);
47998
+ function ChatService(_injector, _httpClient, _moduleConfigService, _folderService, _myDriveService, _fileService, _contentService, _statusService) {
47999
+ var _this = _super.call(this, _httpClient, _injector, _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/Instances") || this;
48000
+ _this._moduleConfigService = _moduleConfigService;
48001
+ _this._folderService = _folderService;
48002
+ _this._myDriveService = _myDriveService;
48003
+ _this._fileService = _fileService;
48004
+ _this._contentService = _contentService;
48005
+ _this._statusService = _statusService;
48006
+ _this.entityName = 'Instances';
48007
+ _this.serviceCode = 'chat';
48008
+ _this.SERVICE = 'chat';
48009
+ _this.ENTITY_CONTENT = 'contents';
48010
+ _this.endPoint = "" + _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint;
48011
+ return _this;
48012
+ }
48013
+ ChatService.prototype.getListAttachment = function (id) {
48014
+ return __awaiter(this, void 0, void 0, function () {
48015
+ var request;
48016
+ return __generator(this, function (_a) {
48017
+ request = new ServiceRequestModel({
48018
+ service: this.SERVICE,
48019
+ serviceCode: this.SERVICE,
48020
+ entity: this.ENTITY_CONTENT,
48021
+ entityInstanceId: id,
48022
+ entityKey: 'id',
48023
+ });
48024
+ // const result = await this._folderService.getServiceFolderId(request);
48025
+ // if (!result.success || !result.data) {
48026
+ // return [];
48027
+ // }
48028
+ // const folder = await this._folderService.getDetail(result.data);
48029
+ // // const folder = await this._myDriveService.getByFolderId(result.data);
48030
+ // if (result.success) {
48031
+ // if (folder.data.length > 0) {
48032
+ // return folder.data.map(x => {
48033
+ // const item = <any>{
48034
+ // id: x.id,
48035
+ // fileName: x.name,
48036
+ // type: this._commonService.isImage(x.name) ? 'image' : ''
48037
+ // };
48038
+ //
48039
+ // item.url = this._fileService.getFileDownloadUrl(x.id);
48040
+ //
48041
+ // return item;
48042
+ // });
48043
+ // }
48044
+ // }
48045
+ return [2 /*return*/, []];
48046
+ });
48047
+ });
48048
+ };
48049
+ ChatService.prototype.getChatId = function (model) {
48050
+ var serviceCode = model.serviceCode, entity = model.entity, entityKey = model.entityKey;
48051
+ var url = this.serviceUri + "/GetIdByService?serviceCode=" + serviceCode + "&entity=" + entity + "&entityKey=" + entityKey;
48052
+ return this.defaultGet(url);
48053
+ };
48054
+ ChatService.prototype.getChatIdByTask = function (serviceRequest, taskId) {
48055
+ var serviceCode = serviceRequest.serviceCode, entity = serviceRequest.entity, entityKey = serviceRequest.entityKey;
48056
+ var url = this.serviceUri + "/GetIdByTaskId?serviceCode=" + serviceCode + "&entity=" + entity + "&entityKey=" + entityKey + "&taskId=" + taskId;
48057
+ return this.defaultGet(url);
48058
+ };
48059
+ ChatService.prototype.getByService = function (model, page) {
48060
+ if (page === void 0) { page = 0; }
48061
+ return this._contentService.getByService(model, page);
48062
+ };
48063
+ ChatService.prototype.getContentByTaskId = function (serviceRequest, taskId) {
48064
+ return this._contentService.getByTaskId(serviceRequest, taskId);
48065
+ };
48066
+ ChatService.prototype.markAsReadAllContents = function (chatId) {
48067
+ return this._contentService.markAsReadAllContents(chatId);
48068
+ };
48069
+ ChatService.prototype.sendMessage = function (messageContent) {
48070
+ return this._contentService.sendMessage(messageContent);
48071
+ };
48072
+ ChatService.prototype.insertUserOnline = function (chatId) {
48073
+ return this._statusService.insertUserOnline(chatId);
48074
+ };
48075
+ ChatService.prototype.removeUserOnline = function (id) {
48076
+ return this._statusService.removeUserOnline(id);
48077
+ };
48078
+ return ChatService;
48079
+ }(BaseService));
48080
+ ChatService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ChatService_Factory() { return new ChatService(i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(FolderService), i0.ɵɵinject(MyDriveService), i0.ɵɵinject(FileExplorerService), i0.ɵɵinject(ContentsService), i0.ɵɵinject(StatusExtendsService)); }, token: ChatService, providedIn: "root" });
48081
+ ChatService.decorators = [
48082
+ { type: i0.Injectable, args: [{
48083
+ providedIn: 'root'
48084
+ },] }
48085
+ ];
48086
+ ChatService.ctorParameters = function () { return [
48087
+ { type: i0.Injector },
48088
+ { type: i1$1.HttpClient },
48089
+ { type: ModuleConfigService },
48090
+ { type: FolderService },
48091
+ { type: MyDriveService },
48092
+ { type: FileExplorerService },
48093
+ { type: ContentsService },
48094
+ { type: StatusExtendsService }
48095
+ ]; };
48096
+
48097
+ var MessageBoardService = /** @class */ (function (_super) {
48098
+ __extends(MessageBoardService, _super);
48099
+ function MessageBoardService(_injector, _http, _moduleConfigService) {
48100
+ var _this = _super.call(this, _http, _injector, _moduleConfigService.getConfig().environment.apiDomain.chatEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/MessageBoards") || this;
48101
+ _this._moduleConfigService = _moduleConfigService;
48102
+ _this.entityName = 'MessageBoards';
48103
+ _this.serviceCode = 'chat';
48104
+ _this.endPoint = "" + _this._moduleConfigService.getConfig().environment.apiDomain.chatEndpoint;
48105
+ return _this;
48106
+ }
48107
+ MessageBoardService.prototype.pinMessage = function (messageId, pinned, correlationId) {
48108
+ var url = this.serviceUri + "/PinnedMessage";
48109
+ return this.defaultPost(url, { pinned: pinned, id: messageId, correlationId: correlationId });
48110
+ };
48111
+ MessageBoardService.prototype.getLatestPinnedMessage = function (chatId) {
48112
+ var url = this.serviceUri + "/GetLatestPinnedMessage?chatId=" + chatId;
48113
+ return this.defaultGet(url);
48114
+ };
48115
+ MessageBoardService.prototype.getListPinnedMessage = function (chatId) {
48116
+ var url = this.serviceUri + "/GetListPinnedMessage?chatId=" + chatId;
48117
+ return this.defaultGet(url);
48118
+ };
48119
+ return MessageBoardService;
48120
+ }(BaseService));
48121
+ MessageBoardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MessageBoardService_Factory() { return new MessageBoardService(i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(ModuleConfigService)); }, token: MessageBoardService, providedIn: "root" });
48122
+ MessageBoardService.decorators = [
48123
+ { type: i0.Injectable, args: [{
48124
+ providedIn: 'root'
48125
+ },] }
48126
+ ];
48127
+ MessageBoardService.ctorParameters = function () { return [
48128
+ { type: i0.Injector },
48129
+ { type: i1$1.HttpClient },
48130
+ { type: ModuleConfigService }
48131
+ ]; };
48132
+
48133
+ var CheckControlVisibleService = /** @class */ (function () {
48134
+ function CheckControlVisibleService() {
48135
+ }
48136
+ CheckControlVisibleService.prototype.checkDisplayStatus = function (elem) {
48137
+ var _this = this;
48138
+ return new Promise(function (resolve, reject) {
48139
+ _this.doCheck(resolve, elem);
48140
+ });
48141
+ };
48142
+ CheckControlVisibleService.prototype.doCheck = function (resolve, elem) {
48143
+ var _this = this;
48144
+ var timeoutCheckDisplayStatus;
48145
+ timeoutCheckDisplayStatus = setTimeout(function () {
48146
+ _this.doCheck(resolve, elem);
48147
+ }, 100);
48148
+ var newStatus = this.isVisible(elem);
48149
+ if (newStatus) {
48150
+ setTimeout(function () {
48151
+ // show control
48152
+ resolve(true);
48153
+ });
48154
+ clearTimeout(timeoutCheckDisplayStatus);
48155
+ }
48156
+ };
48157
+ CheckControlVisibleService.prototype.isVisible = function (elem) {
48158
+ var style = getComputedStyle(elem);
48159
+ if (style.display === 'none')
48160
+ return false;
48161
+ if (style.visibility !== 'visible')
48162
+ return false;
48163
+ if (+style.opacity < 0.1)
48164
+ return false;
48165
+ if (elem.offsetWidth + elem.offsetHeight + elem.getBoundingClientRect().height +
48166
+ elem.getBoundingClientRect().width === 0) {
48167
+ return false;
48168
+ }
48169
+ var elemCenter = {
48170
+ x: elem.getBoundingClientRect().left + elem.offsetWidth / 2,
48171
+ y: elem.getBoundingClientRect().top + elem.offsetHeight / 2
48172
+ };
48173
+ var pointContainer = document.elementFromPoint(elemCenter.x, elemCenter.y);
48174
+ if (pointContainer) {
48175
+ do {
48176
+ if (pointContainer === elem)
48177
+ return true;
48178
+ } while (pointContainer = pointContainer.parentNode);
48179
+ }
48180
+ return false;
48181
+ };
48182
+ return CheckControlVisibleService;
48183
+ }());
48184
+ CheckControlVisibleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CheckControlVisibleService_Factory() { return new CheckControlVisibleService(); }, token: CheckControlVisibleService, providedIn: "root" });
48185
+ CheckControlVisibleService.decorators = [
48186
+ { type: i0.Injectable, args: [{
48187
+ providedIn: 'root'
48188
+ },] }
48189
+ ];
48190
+ CheckControlVisibleService.ctorParameters = function () { return []; };
48191
+
48192
+ var NEW_MESSAGE = 'NewMessage';
48193
+ var PINNED_CHANGED = 'PinnedChanged';
48194
+ var NotificationType;
48195
+ (function (NotificationType) {
48196
+ NotificationType[NotificationType["NewMessage"] = 0] = "NewMessage";
48197
+ NotificationType[NotificationType["PinnedChanged"] = 1] = "PinnedChanged";
48198
+ })(NotificationType || (NotificationType = {}));
48199
+ var MessageType;
48200
+ (function (MessageType) {
48201
+ MessageType[MessageType["TEXT"] = 0] = "TEXT";
48202
+ MessageType[MessageType["FILE"] = 1] = "FILE";
48203
+ })(MessageType || (MessageType = {}));
48204
+
48205
+ // fix for build prod
48206
+ var moment$1 = moment___namespace;
48207
+ var ChatBoxComponent = /** @class */ (function (_super) {
48208
+ __extends(ChatBoxComponent, _super);
48209
+ function ChatBoxComponent(injector, _chatService, _messageBoardService, _userService, _checkControlVisible, _signalrService, _fileService, _crudService, _notifierService, _moduleConfigService) {
48210
+ var _this = _super.call(this, injector) || this;
48211
+ _this._chatService = _chatService;
48212
+ _this._messageBoardService = _messageBoardService;
48213
+ _this._userService = _userService;
48214
+ _this._checkControlVisible = _checkControlVisible;
48215
+ _this._signalrService = _signalrService;
48216
+ _this._fileService = _fileService;
48217
+ _this._crudService = _crudService;
48218
+ _this._notifierService = _notifierService;
48219
+ _this._moduleConfigService = _moduleConfigService;
48220
+ _this.showSendMessageBox = true;
48221
+ _this.userPickerForm = {
48222
+ selectedValue: [],
48223
+ data: null,
48224
+ };
48225
+ _this.topic = '';
48226
+ _this.firstTime = true;
48227
+ _this.multiple = true;
48228
+ _this.showAddNoteForm = false;
48229
+ _this.fileApi = '';
48230
+ _this.peopleAll = [];
48231
+ _this.correlationIds = [];
48232
+ _this.attachments = [];
48233
+ _this.image = '';
48234
+ _this.peopleAllUsers = [];
48235
+ _this.peopleRelatedUsers = [];
48236
+ _this.editFormModel = {};
48237
+ _this._moduleConfig = _this._moduleConfigService.getConfig();
48238
+ _this.environment = _this._moduleConfig.environment;
48239
+ _this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
48240
+ _this.fileApi = _this.environment.apiDomain.fileEndpoint;
48241
+ _this.model.userPickerForm = { popupSize: PopupSize, data: {} };
48242
+ _this.model.quickNoteForm = { popupSize: {}, data: {} };
48243
+ _this.context.subscribe('QUICK_NOTE_POPUP.CLOSE_POPUP', function (response) {
48244
+ _this.model.editFormModel.showQuickNoteForm = false;
48245
+ });
48246
+ return _this;
48247
+ }
48248
+ ChatBoxComponent.prototype.updateUsers = function (assignee, assigner, relatedUser) {
48249
+ this.assignee = assignee;
48250
+ this.assigner = assigner;
48251
+ this.relatedUser = relatedUser;
48252
+ var all = [];
48253
+ all.push(assignee);
48254
+ all.push(assigner);
48255
+ if (this.relatedUser.length > 0) {
48256
+ all = all.concat(relatedUser);
48257
+ }
48258
+ this.peopleAll = all.filter(function (x, i, a) { return a.indexOf(x) == i; });
48259
+ };
48260
+ ChatBoxComponent.prototype.ngOnInit = function () {
48261
+ var _this = this;
48262
+ this.initClassVar();
48263
+ this.getMessages(null);
48264
+ this._chatService.getChatIdByTask(this.serviceRequestModel, this.taskId).then(function (rs) {
48265
+ if (!rs.success)
48266
+ _this._notifierService.showWarning(rs.message);
48267
+ if (!rs.data)
48268
+ return;
48269
+ _this.model.id = rs.data;
48270
+ _this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_INSTANCE_ID_LOADED, _this.model.id);
48271
+ _this.topic = "chat." + _this.model.id;
48272
+ _this._signalrService.start(null, _this.topic, function (data) { return _this.handleChanges(data); });
48273
+ // get pinned message
48274
+ if (_this.model.id) {
48275
+ _this._messageBoardService.getLatestPinnedMessage(_this.model.id).then(function (rs) {
48276
+ if (rs.data) {
48277
+ _this.model.pinnedMessage = rs.data.content;
48278
+ }
48279
+ });
48280
+ }
48281
+ });
48282
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_MESSAGE_SENDING, function (data) { return __awaiter(_this, void 0, void 0, function () {
48283
+ var temp;
48284
+ return __generator(this, function (_c) {
48285
+ switch (_c.label) {
48286
+ case 0:
48287
+ this.model.correlationIds.push(data.message.correlationId);
48288
+ if (data.attachments && data.attachments.length > 0) {
48289
+ data.attachments = data.attachments.map(function (x) {
48290
+ x.url = null;
48291
+ return x;
48292
+ });
48293
+ }
48294
+ return [4 /*yield*/, this.appendMessage(data.message.messageContent, 'own', 'sending', this.currentUser.userName, data.attachments, data.message.correlationId, false)];
48295
+ case 1:
48296
+ temp = _c.sent();
48297
+ console.log(temp);
48298
+ return [2 /*return*/];
48299
+ }
48300
+ });
48301
+ }); });
48302
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_MESSAGE_SENT, function (data) {
48303
+ });
48304
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_LOAD_MORE, function (data) {
48305
+ // this.getMessages(this.model.createdFrom);
48306
+ });
48307
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_SCROLLING, function (scrolling) {
48308
+ if (scrolling) {
48309
+ _this.model.scrolling = true;
48310
+ }
48311
+ else {
48312
+ _this.model.scrolling = false;
48313
+ _this.model.newMessageNotUpdatedCount = 0;
48314
+ }
48315
+ });
48316
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_HAS_NEW_MESSAGE_NOT_UPDATED, function (count) {
48317
+ _this.model.scrolling = count !== 0;
48318
+ _this.model.newMessageNotUpdatedCount = count;
48319
+ });
48320
+ this.context.subscribe('CLOSE_POPUP', function (rs) {
48321
+ _this.model.userPickerForm.show = false;
48322
+ _this.parentContext.fireEvent('TASK.RELATED_USER_CHANGED', rs);
48323
+ });
48324
+ this.parentContext.subscribe('TASK.DATA_CHANGED', function (rs) {
48325
+ _this.updateUsers(rs.assignee, rs.assigner, rs.relatedUser);
48326
+ });
48327
+ };
48328
+ ChatBoxComponent.prototype.handleChanges = function (data) {
48329
+ return __awaiter(this, void 0, void 0, function () {
48330
+ var newMessage, _c, ind;
48331
+ return __generator(this, function (_d) {
48332
+ switch (_d.label) {
48333
+ case 0:
48334
+ newMessage = JSON.parse(data);
48335
+ if (!newMessage || !newMessage.data) {
48336
+ this._notifierService.showWarning('SYS_ERR_DEV: Lỗi SignalR');
48337
+ return [2 /*return*/];
48338
+ }
48339
+ _c = newMessage.notificationType;
48340
+ switch (_c) {
48341
+ case NotificationType.NewMessage: return [3 /*break*/, 1];
48342
+ case NEW_MESSAGE: return [3 /*break*/, 1];
48343
+ case NotificationType.PinnedChanged: return [3 /*break*/, 3];
48344
+ case PINNED_CHANGED: return [3 /*break*/, 3];
48345
+ }
48346
+ return [3 /*break*/, 7];
48347
+ case 1: return [4 /*yield*/, this.handleNewMessageNotification(newMessage.data)];
48348
+ case 2:
48349
+ _d.sent();
48350
+ return [3 /*break*/, 7];
48351
+ case 3:
48352
+ ind = this.model.correlationIds.findIndex(function (x) { return x == newMessage.correlationId; });
48353
+ if (!(ind > -1)) return [3 /*break*/, 4];
48354
+ this.model.correlationIds.splice(ind, 1);
48355
+ return [3 /*break*/, 6];
48356
+ case 4: return [4 /*yield*/, this.handlePinnedChangeNotification(newMessage.data)];
48357
+ case 5:
48358
+ _d.sent();
48359
+ _d.label = 6;
48360
+ case 6: return [3 /*break*/, 7];
48361
+ case 7: return [2 /*return*/];
48362
+ }
48363
+ });
48364
+ });
48365
+ };
48366
+ ChatBoxComponent.prototype.initClassVar = function () {
48367
+ var _this = this;
48368
+ this.fileViewerModel = {
48369
+ data: {},
48370
+ showEditForm: false,
48371
+ };
48372
+ this.userPickerControl = new UserPickerControlSchema({
48373
+ field: 'id',
48374
+ label: '',
48375
+ fullLabel: '',
48376
+ multiple: true,
48377
+ hiddenCheck: function () { return _this.userPickerForm.show; },
48378
+ });
48379
+ this.serviceRequestModel = {
48380
+ service: this.serviceCode,
48381
+ serviceCode: this.serviceCode,
48382
+ entity: this.entity,
48383
+ entityKey: 'id',
48384
+ entityInstanceId: this.taskId
48385
+ };
48386
+ this.model.dataSource = [];
48387
+ this.model.correlationIds = [];
48388
+ this.model.attachments = [];
48389
+ this.model.maxFileSize = 3000000;
48390
+ this.model.img = {};
48391
+ this.currentUser = this._userService.getCurrentUser();
48392
+ this.peopleAllUsers = [];
48393
+ this.peopleRelatedUsers = [];
48394
+ this.model.editFormModel = [];
48395
+ if (this.users) {
48396
+ this.model.taskName = this.users.taskName;
48397
+ this.updateUsers(this.users.assignee, this.users.assigner, this.users.relatedUsers);
48398
+ this.getRelatedUserInfo();
48399
+ }
48400
+ };
48401
+ ChatBoxComponent.prototype.getRelatedUserInfo = function () {
48402
+ return __awaiter(this, void 0, void 0, function () {
48403
+ var peopleRelatedUsers, peopleRelatedUsers_1, peopleRelatedUsers_1_1, item;
48404
+ var e_1, _c;
48405
+ return __generator(this, function (_d) {
48406
+ switch (_d.label) {
48407
+ case 0: return [4 /*yield*/, this._userService.getBasicUsersInfo(this.relatedUser.join())];
48408
+ case 1:
48409
+ peopleRelatedUsers = _d.sent();
48410
+ if (peopleRelatedUsers == null || peopleRelatedUsers.length == 0) {
48411
+ return [2 /*return*/];
48412
+ }
48413
+ try {
48414
+ for (peopleRelatedUsers_1 = __values(peopleRelatedUsers), peopleRelatedUsers_1_1 = peopleRelatedUsers_1.next(); !peopleRelatedUsers_1_1.done; peopleRelatedUsers_1_1 = peopleRelatedUsers_1.next()) {
48415
+ item = peopleRelatedUsers_1_1.value;
48416
+ this.peopleRelatedUsers.push({
48417
+ title: item.fullName,
48418
+ label: item.fullName,
48419
+ value: item.id
48420
+ });
48421
+ }
48422
+ }
48423
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
48424
+ finally {
48425
+ try {
48426
+ if (peopleRelatedUsers_1_1 && !peopleRelatedUsers_1_1.done && (_c = peopleRelatedUsers_1.return)) _c.call(peopleRelatedUsers_1);
48427
+ }
48428
+ finally { if (e_1) throw e_1.error; }
48429
+ }
48430
+ return [2 /*return*/];
48431
+ }
48432
+ });
48433
+ });
48434
+ };
48435
+ ChatBoxComponent.prototype.handlePinnedChangeNotification = function (data) {
48436
+ return __awaiter(this, void 0, void 0, function () {
48437
+ return __generator(this, function (_c) {
48438
+ if (data.pinned) {
48439
+ this.model.pinnedMessage = data.message;
48440
+ }
48441
+ else {
48442
+ this.model.pinnedMessage = null;
48443
+ }
48444
+ return [2 /*return*/];
48445
+ });
48446
+ });
48447
+ };
48448
+ ChatBoxComponent.prototype.handleNewMessageNotification = function (newMessage) {
48449
+ return __awaiter(this, void 0, void 0, function () {
48450
+ var ind, _c;
48451
+ return __generator(this, function (_d) {
48452
+ switch (_d.label) {
48453
+ case 0:
48454
+ ind = this.model.correlationIds.findIndex(function (x) { return x == newMessage.correlationId; });
48455
+ if (!(newMessage.messageType == MessageType.FILE)) return [3 /*break*/, 2];
48456
+ _c = newMessage;
48457
+ return [4 /*yield*/, this._chatService.getListAttachment(newMessage.id)];
48458
+ case 1:
48459
+ _c.attachments = _d.sent();
48460
+ _d.label = 2;
48461
+ case 2:
48462
+ if (!(ind === -1)) return [3 /*break*/, 4];
48463
+ return [4 /*yield*/, this.appendMessage(newMessage.content, this.getTypeOfMessage(newMessage.createdBy), 'received', newMessage.createdBy, newMessage.attachments, '', true)];
48464
+ case 3:
48465
+ _d.sent();
48466
+ return [3 /*break*/, 5];
48467
+ case 4:
48468
+ this.updateMessage(newMessage.correlationId, newMessage);
48469
+ this.model.correlationIds.splice(ind, 1);
48470
+ _d.label = 5;
48471
+ case 5: return [2 /*return*/];
48472
+ }
48473
+ });
48474
+ });
48475
+ };
48476
+ ChatBoxComponent.prototype.getMessages = function (createdFrom) {
48477
+ var _this = this;
48478
+ this._chatService.getContentByTaskId(this.serviceRequestModel, this.taskId).then(function (rs) { return __awaiter(_this, void 0, void 0, function () {
48479
+ var currentUserName, nearByCreated, index, userNames, _c, _d, item, _e, e_2_1, userInfos, _loop_1, _f, _g, item;
48480
+ var e_2, _h, e_3, _j;
48481
+ return __generator(this, function (_k) {
48482
+ switch (_k.label) {
48483
+ case 0:
48484
+ currentUserName = this.currentUser.userName;
48485
+ nearByCreated = '';
48486
+ index = 0;
48487
+ userNames = '';
48488
+ if (!rs.success) {
48489
+ return [2 /*return*/, this._notifierService.showWarning(rs.message)];
48490
+ }
48491
+ _k.label = 1;
48492
+ case 1:
48493
+ _k.trys.push([1, 7, 8, 9]);
48494
+ _c = __values(rs.data), _d = _c.next();
48495
+ _k.label = 2;
48496
+ case 2:
48497
+ if (!!_d.done) return [3 /*break*/, 6];
48498
+ item = _d.value;
48499
+ if (item.createdBy && item.createdBy != '')
48500
+ userNames += "" + (index == 0 ? '' : ',') + item.createdBy;
48501
+ if (index === 0)
48502
+ this.model.createdFrom = item.created;
48503
+ item.type = item.createdBy === currentUserName ? 'own' : 'from';
48504
+ if (!(item.messageType === MessageType.FILE)) return [3 /*break*/, 4];
48505
+ _e = item;
48506
+ return [4 /*yield*/, this._chatService.getListAttachment(item.id)];
48507
+ case 3:
48508
+ _e.attachments = _k.sent();
48509
+ _k.label = 4;
48510
+ case 4:
48511
+ item.isLastMessageFlow = false;
48512
+ if (item.createdBy !== nearByCreated) {
48513
+ if (+item > -0) {
48514
+ rs.data[+item - 1].isLastMessageFlow = true;
48515
+ }
48516
+ nearByCreated = item.createdBy;
48517
+ item.isFirstMessageFlow = true;
48518
+ }
48519
+ else {
48520
+ item.isFirstMessageFlow = false;
48521
+ }
48522
+ if (+index === rs.data.length - 1)
48523
+ item.isLastMessageFlow = true;
48524
+ index++;
48525
+ _k.label = 5;
48526
+ case 5:
48527
+ _d = _c.next();
48528
+ return [3 /*break*/, 2];
48529
+ case 6: return [3 /*break*/, 9];
48530
+ case 7:
48531
+ e_2_1 = _k.sent();
48532
+ e_2 = { error: e_2_1 };
48533
+ return [3 /*break*/, 9];
48534
+ case 8:
48535
+ try {
48536
+ if (_d && !_d.done && (_h = _c.return)) _h.call(_c);
48537
+ }
48538
+ finally { if (e_2) throw e_2.error; }
48539
+ return [7 /*endfinally*/];
48540
+ case 9:
48541
+ if (createdFrom) {
48542
+ this.model.dataSource = __spread(rs.data, this.model.dataSource);
48543
+ }
48544
+ else {
48545
+ this.model.dataSource = rs.data;
48546
+ }
48547
+ if (!(userNames != '')) return [3 /*break*/, 11];
48548
+ return [4 /*yield*/, this._userService.getBasicUsersInfoByUserNames(userNames)];
48549
+ case 10:
48550
+ userInfos = _k.sent();
48551
+ if (userInfos != null) {
48552
+ _loop_1 = function (item) {
48553
+ var user = userInfos.find(function (x) { return x.userName == item.createdBy; });
48554
+ if (!user) {
48555
+ return "continue";
48556
+ }
48557
+ item.avatar = user.avatar;
48558
+ item.fullName = user.fullName;
48559
+ };
48560
+ try {
48561
+ for (_f = __values(this.model.dataSource), _g = _f.next(); !_g.done; _g = _f.next()) {
48562
+ item = _g.value;
48563
+ _loop_1(item);
48564
+ }
48565
+ }
48566
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
48567
+ finally {
48568
+ try {
48569
+ if (_g && !_g.done && (_j = _f.return)) _j.call(_f);
48570
+ }
48571
+ finally { if (e_3) throw e_3.error; }
48572
+ }
48573
+ }
48574
+ _k.label = 11;
48575
+ case 11:
48576
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_DATA_LOADED, true);
48577
+ return [2 /*return*/];
48578
+ }
48579
+ });
48580
+ }); });
48581
+ };
48582
+ ChatBoxComponent.prototype.scrollToBottom = function (speed, force, sent) {
48583
+ if (speed === void 0) { speed = 0; }
48584
+ if (force === void 0) { force = false; }
48585
+ if (!this.model.scrolling) {
48586
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_HAS_NEW_MESSAGE, { speed: speed, force: true });
48587
+ }
48588
+ else if (sent !== false) {
48589
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_HAS_NEW_MESSAGE, { speed: speed, force: force });
48590
+ }
48591
+ };
48592
+ ChatBoxComponent.prototype.appendMessage = function (message, type, status, createdBy, attachments, correlationId, sent) {
48593
+ if (attachments === void 0) { attachments = []; }
48594
+ if (correlationId === void 0) { correlationId = ''; }
48595
+ var _a, _b;
48596
+ return __awaiter(this, void 0, void 0, function () {
48597
+ var fullName, avatar, user, clonedAttachment;
48598
+ return __generator(this, function (_c) {
48599
+ switch (_c.label) {
48600
+ case 0:
48601
+ fullName = '';
48602
+ avatar = '';
48603
+ return [4 /*yield*/, this._userService.getBasicUserInfoByUserName(createdBy)];
48604
+ case 1:
48605
+ user = _c.sent();
48606
+ fullName = (_a = user.fullName) !== null && _a !== void 0 ? _a : '';
48607
+ avatar = (_b = user.avatar) !== null && _b !== void 0 ? _b : '';
48608
+ if (attachments && attachments.length > 0) {
48609
+ clonedAttachment = JSON.parse(JSON.stringify(attachments));
48610
+ this.model.dataSource.push({
48611
+ created: new Date(),
48612
+ createdBy: createdBy,
48613
+ fullName: fullName,
48614
+ status: status,
48615
+ type: type,
48616
+ avatar: avatar,
48617
+ attachments: clonedAttachment,
48618
+ correlationId: correlationId,
48619
+ isFirstMessageFlow: false,
48620
+ isLastMessageFlow: false,
48621
+ sent: sent
48622
+ });
48623
+ this.updateFirstOrLastMessage();
48624
+ }
48625
+ if (message && message.trim() != '') {
48626
+ this.model.dataSource.push({
48627
+ created: new Date(),
48628
+ createdBy: createdBy,
48629
+ fullName: fullName,
48630
+ content: message,
48631
+ status: status,
48632
+ type: type,
48633
+ avatar: avatar,
48634
+ correlationId: correlationId,
48635
+ isFirstMessageFlow: false,
48636
+ isLastMessageFlow: false,
48637
+ sent: sent
48638
+ });
48639
+ this.updateFirstOrLastMessage();
48640
+ }
48641
+ return [2 /*return*/, this.model.dataSource];
48642
+ }
48643
+ });
48644
+ });
48645
+ };
48646
+ ChatBoxComponent.prototype.updateFirstOrLastMessage = function () {
48647
+ if (this.model.dataSource.length > 0) {
48648
+ var length = this.model.dataSource.length;
48649
+ if (length === 1) {
48650
+ this.model.dataSource[0].isFirstMessageFlow = true;
48651
+ }
48652
+ else {
48653
+ var createdBy = this.model.dataSource[length - 2].createdBy;
48654
+ var createdBy2 = this.model.dataSource[length - 1].createdBy;
48655
+ if (createdBy !== createdBy2) {
48656
+ this.model.dataSource[length - 2].isLastMessageFlow = true;
48657
+ this.model.dataSource[length - 1].isFirstMessageFlow = true;
48658
+ }
48659
+ else {
48660
+ this.model.dataSource[length - 2].isLastMessageFlow = false;
48661
+ this.model.dataSource[length - 1].isLastMessageFlow = true;
48662
+ }
48663
+ }
48664
+ }
48665
+ };
48666
+ ChatBoxComponent.prototype.updateMessage = function (correlationId, message) {
48667
+ var item = this.model.dataSource.find(function (x) { return x.correlationId === correlationId; });
48668
+ if (item) {
48669
+ if (message.attachments && message.attachments.length > 0) {
48670
+ item.attachments = message.attachments;
48671
+ }
48672
+ item.id = message.id;
48673
+ item.sent = true;
48674
+ }
48675
+ };
48676
+ ChatBoxComponent.prototype.updateMessageStatus = function (message, status, errorMessage) {
48677
+ if (errorMessage === void 0) { errorMessage = ''; }
48678
+ var item = this.model.dataSource.find(function (x) { return x.message === message; });
48679
+ item.status = status;
48680
+ item.errorMessage = errorMessage;
48681
+ };
48682
+ ChatBoxComponent.prototype.getDisplayStatus = function (status) {
48683
+ switch (status) {
48684
+ case 'sending':
48685
+ return 'Đang gửi';
48686
+ case 'sent':
48687
+ return 'Đã gửi';
48688
+ default:
48689
+ return '';
48690
+ }
48691
+ };
48692
+ ChatBoxComponent.prototype.ngOnDestroy = function () {
48693
+ // unscrible signalr
48694
+ this._signalrService.unSubscribeViewCode(null, this.topic);
48695
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_MESSAGE_SENDING);
48696
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_MESSAGE_SENT);
48697
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_LOAD_MORE);
48698
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_SCROLLING);
48699
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_HAS_NEW_MESSAGE_NOT_UPDATED);
48700
+ _super.prototype.ngOnDestroy.call(this);
48701
+ };
48702
+ ChatBoxComponent.prototype.getTypeOfMessage = function (createdBy) {
48703
+ return createdBy === this.currentUser.userName ? 'own' : 'from';
48704
+ };
48705
+ ChatBoxComponent.prototype.trackByFunc = function (index, item) {
48706
+ return item.id;
48707
+ };
48708
+ ChatBoxComponent.prototype.trackAttachmentByFunc = function (index, item) {
48709
+ return item.fileName;
48710
+ };
48711
+ ChatBoxComponent.prototype.handlePaste = function (event) {
48712
+ var objectData = this.getImageClipboardData(event);
48713
+ if (objectData) {
48714
+ this.model.attachments.push({
48715
+ type: 'image',
48716
+ url: objectData.url,
48717
+ data: objectData.blob,
48718
+ fileName: this._commonService.guid() + '.png'
48719
+ });
48720
+ }
48721
+ };
48722
+ ChatBoxComponent.prototype.getImageClipboardData = function (e) {
48723
+ for (var i = 0; i < e.clipboardData.items.length; i++) {
48724
+ var item = e.clipboardData.items[i];
48725
+ if (item.type.indexOf('image') != -1) {
48726
+ var imageObj = item.getAsFile();
48727
+ if (imageObj.size < this.model.maxFileSize) {
48728
+ return { url: URL.createObjectURL(imageObj), blob: imageObj };
48729
+ }
48730
+ else {
48731
+ return null;
48732
+ }
48733
+ }
48734
+ }
48735
+ return null;
48736
+ };
48737
+ ChatBoxComponent.prototype.viewOrDownloadFile = function (evt, attachmentItem) {
48738
+ return __awaiter(this, void 0, void 0, function () {
48739
+ var _c;
48740
+ return __generator(this, function (_d) {
48741
+ switch (_d.label) {
48742
+ case 0:
48743
+ if (!this._fileService.isSupportedViewOnline(attachmentItem.fileName)) return [3 /*break*/, 1];
48744
+ // this.model.fileViewer.data = {};
48745
+ // this.model.fileViewer.data.fileId = attachmentItem.id;
48746
+ // this.model.fileViewer.data.fileName = attachmentItem.fileName;
48747
+ // this.model.fileViewer.data.isFileVersion = false;
48748
+ // this.model.fileViewer.show = true;
48749
+ this.fileViewerModel = {
48750
+ data: {
48751
+ fileId: attachmentItem.id,
48752
+ fileName: attachmentItem.fileName,
48753
+ isFileVersion: false,
48754
+ },
48755
+ showEditForm: true,
48756
+ };
48757
+ return [3 /*break*/, 3];
48758
+ case 1:
48759
+ _c = top.location;
48760
+ return [4 /*yield*/, this.getDownloadLink(attachmentItem)];
48761
+ case 2:
48762
+ _c.href = _d.sent();
48763
+ _d.label = 3;
48764
+ case 3: return [2 /*return*/];
48765
+ }
48766
+ });
48767
+ });
48768
+ };
48769
+ ChatBoxComponent.prototype.getDownloadLink = function (file) {
48770
+ var _this = this;
48771
+ return new Promise(function (resolve, reject) {
48772
+ var model = new GenerateLinkDownloadDTO();
48773
+ model.fileId = file.id;
48774
+ model.isFileVersion = false;
48775
+ _this._fileService.generateLinkDownload(model)
48776
+ .then(function (response) {
48777
+ var downloadUrl = _this._fileService.getAnonymousDownloadUrl(response.data);
48778
+ resolve(downloadUrl);
48779
+ }, function (error) {
48780
+ throw new Error('Cannot get download link');
48781
+ });
48782
+ });
48783
+ };
48784
+ ChatBoxComponent.prototype.browseFileFromPersonal = function () {
48785
+ };
48786
+ ChatBoxComponent.prototype.browseFileFromComputer = function () {
48787
+ this.fileElement.advancedFileInput.nativeElement.click();
48788
+ };
48789
+ ChatBoxComponent.prototype.onSelectFileFromComputer = function (evt) {
48790
+ try {
48791
+ if (evt.files && evt.files.length > 0) {
48792
+ for (var index = 0; index < evt.files.length; index++) {
48793
+ var fileName = evt.files[index].name;
48794
+ var type = this._commonService.isImage(fileName) ? 'image' : 'file';
48795
+ var attachmentItem = {
48796
+ type: type,
48797
+ data: evt.files[index], fileName: fileName
48798
+ };
48799
+ if (attachmentItem.type == 'image') {
48800
+ attachmentItem.url = evt.files[index].objectURL.changingThisBreaksApplicationSecurity;
48801
+ }
48802
+ this.model.attachments.push(attachmentItem);
48803
+ }
48804
+ }
48805
+ }
48806
+ catch (e) {
48807
+ console.error('error on process select file computer', e);
48808
+ }
48809
+ // this.fileElement.clear();
48810
+ };
48811
+ ChatBoxComponent.prototype.removeAttachment = function (item) {
48812
+ var ind = this.model.attachments.findIndex(function (x) { return x.url === item.url; });
48813
+ this.model.attachments.splice(ind, 1);
48814
+ };
48815
+ ChatBoxComponent.prototype.hasAttachment = function (item) {
48816
+ return item.attachments && item.attachments.length > 0;
48817
+ };
48818
+ ChatBoxComponent.prototype.loadImg = function (evt, parentIndex, index) {
48819
+ this.model.img["" + parentIndex + index] = true;
48820
+ this.model.img[parentIndex + "width" + index] = (evt.target.width + 32) + 'px';
48821
+ };
48822
+ ChatBoxComponent.prototype.inTheSameTime = function (i, item, dataSource) {
48823
+ if (i < dataSource.length - 1) {
48824
+ var d1 = new Date(dataSource[i + 1].created);
48825
+ var d2 = new Date(item.created);
48826
+ var ms = d1.getTime() - d2.getTime();
48827
+ return ms < 30000;
48828
+ }
48829
+ return false;
48830
+ };
48831
+ ChatBoxComponent.prototype.pinMessage = function (item) {
48832
+ var _this = this;
48833
+ if (this.model.pinnedMessage) {
48834
+ if (this.model.pinnedMessage.id != item.id) {
48835
+ this._notifierService.showConfirm('Bạn có chắc chắn muốn ghim tin nhắn này? Tin nhắn đã ghim trước đó sẽ được bỏ ghim.').then(function (rs) {
48836
+ if (!rs)
48837
+ return;
48838
+ _this.doPin(item, item.id, true);
48839
+ });
48840
+ }
48841
+ else {
48842
+ this.doPin(item, item.id, false);
48843
+ }
48844
+ }
48845
+ else {
48846
+ this.doPin(item, item.id, true);
48847
+ }
48848
+ };
48849
+ ChatBoxComponent.prototype.doPin = function (item, id, pinned) {
48850
+ var _this = this;
48851
+ var correlationId = this._commonService.guid();
48852
+ this.model.correlationIds.push(correlationId);
48853
+ this._messageBoardService.pinMessage(id, pinned, correlationId).then(function (rs) {
48854
+ if (pinned) {
48855
+ _this.model.pinnedMessage = item;
48856
+ }
48857
+ else {
48858
+ _this.model.pinnedMessage = null;
48859
+ }
48860
+ });
48861
+ };
48862
+ ChatBoxComponent.prototype.getCurrentUserAvatar = function (avatar) {
48863
+ if (avatar != null) {
48864
+ return this.fileApi + "/file/public/" + avatar + "/Download";
48865
+ }
48866
+ else {
48867
+ return this.defaultAvatar;
48868
+ }
48869
+ };
48870
+ ChatBoxComponent.prototype.addPeople = function () {
48871
+ this.userPickerForm.selectedValue = this.peopleRelatedUsers;
48872
+ this.userPickerForm.multiple = this.multiple;
48873
+ this.userPickerForm.show = true;
48874
+ };
48875
+ ChatBoxComponent.prototype.quickNote = function (item) {
48876
+ return __awaiter(this, void 0, void 0, function () {
48877
+ var userResult;
48878
+ return __generator(this, function (_c) {
48879
+ switch (_c.label) {
48880
+ case 0: return [4 /*yield*/, this._userService.getBasicUserInfo(item.createdBy)];
48881
+ case 1:
48882
+ userResult = _c.sent();
48883
+ this.context.data.noteDataModel = {
48884
+ editFormModel: {
48885
+ showEditForm: true,
48886
+ showQuickNoteForm: true,
48887
+ popupSize: {},
48888
+ data: {
48889
+ name: item.content1,
48890
+ content: '<b>' + userResult.fullName + '</b>' + ' đã chat tại công việc '
48891
+ + '<b>' + this.model.taskName + '</b>' + ' với nội dung '
48892
+ + '<b>' + item.content1 + '</b>' + ' vào lúc ' + moment$1(new Date(item.created)).format('YYYY-MM-DD hh:mm:ss A')
48893
+ }
48894
+ }
48895
+ };
48896
+ this.model.editFormModel.showQuickNoteForm = true;
48897
+ this.showAddNoteForm = true;
48898
+ return [2 /*return*/];
48899
+ }
48900
+ });
48901
+ });
48902
+ };
48903
+ ChatBoxComponent.prototype.onMouseUp = function (event) {
48904
+ event.cancelBubble = true;
48905
+ event.stopPropagation();
48906
+ };
48907
+ ChatBoxComponent.prototype.addClassToMessage = function (item, isPinnedMessage) {
48908
+ var styleClass = '';
48909
+ if (!isPinnedMessage) {
48910
+ if (item.isFirstMessageFlow) {
48911
+ styleClass = 'first';
48912
+ }
48913
+ else if (item.isLastMessageFlow) {
48914
+ styleClass = 'last';
48915
+ }
48916
+ else {
48917
+ styleClass = 'middle';
48918
+ }
48919
+ }
48920
+ if (item.sent == false) {
48921
+ styleClass = 'sending';
48922
+ }
48923
+ return styleClass;
48924
+ };
48925
+ return ChatBoxComponent;
48926
+ }(ComponentBase));
48927
+ ChatBoxComponent.decorators = [
48928
+ { type: i0.Component, args: [{
48929
+ selector: 'chat-box',
48930
+ template: "<div class=\"dashboard\">\r\n <div class=\"chat\">\r\n <div class=\"group-info\">\r\n <a href=\"javascript:\">C\u00F3 {{peopleAll.length}} ng\u01B0\u1EDDi trong nh\u00F3m n\u00E0y</a>\r\n <div class=\"circleButton\" pTooltip=\"Xem to\u00E0n b\u1ED9 \u0111\u00EDnh k\u00E8m\" tooltipPosition=\"top\">\r\n <a href=\"javascript:\"><i class=\"far fa-images\"></i></a>\r\n </div>\r\n <div (click)=\"addPeople()\" class=\"circleButton\" pTooltip=\"Th\u00EAm m\u1EDBi ng\u01B0\u1EDDi v\u00E0o nh\u00F3m\" tooltipPosition=\"top\"\r\n disabled=\"true\">\r\n <a href=\"javascript:\"><i class=\"fas fa-user-plus\"></i></a>\r\n </div>\r\n </div>\r\n <ul #scrollMe [ngClass]=\"{'hasPin': model.pinnedMessage != null}\">\r\n <li *ngIf=\"model.pinnedMessage\" class=\"clearfix pin\" [ngClass]=\"{'message-from': true}\">\r\n <ng-container\r\n *ngTemplateOutlet=\"messageItem; context: { i : -1, item: model.pinnedMessage, isPinnedMessage: true}\">\r\n </ng-container>\r\n </li>\r\n <li *ngFor=\"let item of model.dataSource; let i = index; trackBy: trackByFunc\" class=\"clearfix\"\r\n [ngClass]=\"{ 'message-own': item.type == 'own'}\">\r\n <ng-container *ngTemplateOutlet=\"messageItem; context: { i : i, item: item}\">\r\n </ng-container>\r\n </li>\r\n </ul>\r\n <!-- <chat-send-message-box *ngIf=\"showSendMessageBox\"></chat-send-message-box>-->\r\n <div [ngClass]=\"{'visible2': model.scrolling, 'hidden2': !model.scrolling}\" class=\"scroll-to-bottom\">\r\n <span *ngIf=\"model.newMessageNotUpdatedCount > 0\" (click)=\"scrollToBottom(350, true, null)\">\r\n {{model.newMessageNotUpdatedCount <= 5 ? model.newMessageNotUpdatedCount : '5+' }} </span>\r\n <span (click)=\"scrollToBottom(350, true, null)\" *ngIf=\"model.newMessageNotUpdatedCount == 0\">\r\n <i class=\"fas fa-chevron-down\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<file-viewer *ngIf=\"fileViewerModel.showEditForm\" [parentContext]=\"context\" [parentModel]=\"model\"\r\n [model]=\"fileViewerModel\">\r\n</file-viewer>\r\n\r\n<ng-template #messageItem let-i=\"i\" let-isPinnedMessage=\"isPinnedMessage\" let-item=\"item\">\r\n <img *ngIf=\"item.isFirstMessageFlow && item.type != 'own' && !isPinnedMessage && item.avatar != null\" alt=\"\"\r\n class=\"chat-avatar\" src=\"{{getCurrentUserAvatar(item.avatar)}}\">\r\n <p *ngIf=\"(item.isFirstMessageFlow && item.type != 'own') && !isPinnedMessage\" class=\"message-created-by\">\r\n {{item.fullName}}\r\n </p>\r\n <span *ngIf=\"!hasAttachment(item)\">\r\n <!-- [class]=\"addClassToMessage(item, isPinnedMessage)\">-->\r\n <p *ngIf=\"!hasAttachment(item)\" class=\"message-content\">\r\n <i (click)=\"pinMessage(item)\" class=\"fas fa-thumbtack\" style=\"right: 0;\"></i>\r\n <i (click)=\"quickNote(item)\" class=\"fas fa-sticky-note\"></i>\r\n {{item.content}}\r\n </p>\r\n <p *ngIf=\"!isPinnedMessage && (item.isLastMessageFlow || !inTheSameTime(i, item, model.dataSource))\"\r\n class=\"message-created\" pTooltip=\"{{item.created | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"{{item.type != 'own'?'right':'left'}}\">\r\n {{_crudService.renderDateTime(item.created)}}\r\n </p>\r\n <p *ngIf=\"isPinnedMessage\" class=\"message-created\">\r\n {{item.createdBy}} \u0111\u00E3 g\u1EEDi l\u00FAc {{item.created | date:'dd/MM/yyyy HH:mm'}}\r\n </p>\r\n </span>\r\n <ng-container *ngIf=\"hasAttachment(item)\">\r\n <ng-container *ngFor=\"let attachmentItem of item.attachments;let index=index\">\r\n <div class=\"file\"\r\n [ngClass]=\"{'first':item.isFirstMessageFlow && index == 0, 'middle':index > 0 || !item.isFirstMessageFlow, 'image' : attachmentItem.type == 'image'}\"\r\n [ngStyle]=\"{'width': model.img[i + 'width' + index]}\">\r\n <p class=\"attachment\">\r\n <span (mouseup)=\"onMouseUp($event)\" class=\"attachment-item\">\r\n <a *ngIf=\"attachmentItem.type != 'image'\" (click)=\"viewOrDownloadFile($event, attachmentItem)\">\r\n <i class=\"fas fa-paperclip\"></i>{{attachmentItem.fileName}}\r\n </a>\r\n <a *ngIf=\"attachmentItem.type == 'image'\" #aElement\r\n [ngClass]=\"{'hidden': !model.img[i + '' + index], 'visible':model.img[i + '' + index]}\"\r\n (click)=\"viewOrDownloadFile($event, attachmentItem)\">\r\n <img class=\"message-img\" (load)=\"loadImg($event, i, index)\"\r\n [src]=\"attachmentItem.url | secure | async\" />\r\n </a>\r\n </span>\r\n </p>\r\n <div style=\"clear: both\"></div>\r\n <p class=\"message-created\" pTooltip=\"{{item.created | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"{{item.type != 'own'?'right':'left'}}\">\r\n {{_crudService.renderDateTime(item.created)}}\r\n </p>\r\n </div>\r\n <div style=\"clear: both\"></div>\r\n </ng-container>\r\n </ng-container>\r\n <after-view-checked *ngIf=\"model.dataSource.length == i + 1\" (loading)=\"scrollToBottom(0, false, item.sent)\">\r\n </after-view-checked>\r\n</ng-template>\r\n\r\n<!--<tn-dialog *ngIf=\"userPickerForm.show\" #dialog [styleClass]=\"'tn-form-dialog'\"-->\r\n<!-- [header]=\"'Th\u00EAm m\u1EDBi ng\u01B0\u1EDDi d\u00F9ng' | translate\" [popupSize]=\"userPickerForm.popupSize\"-->\r\n<!-- (onCancel)=\"userPickerForm.show = false\"-->\r\n<!-- (onHide)=\"userPickerForm.show = false\">-->\r\n<!-- &lt;!&ndash; <congviec-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"formModel\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onSaved)=\"showDetailForm = false;crudList.reload()\" (onCancel)=\"_handleCancel($event)\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onAfterSaved)=\"onAfterSaved($event)\"></congviec-form>&ndash;&gt;-->\r\n<!-- <user-picker-box #formBase [control]=\"userPickerControl\"-->\r\n<!-- [(ngModel)]=\"this.peopleAll\" [multiple]=\"userPickerControl.multiple\">-->\r\n<!-- </user-picker-box>-->\r\n<!--</tn-dialog>-->\r\n\r\n\r\n<!--<tn-dialog *ngIf=\"userPickerForm.show\" #dialog [styleClass]=\"'tn-form-dialog'\"-->\r\n<!-- [header]=\"'Th\u00EAm m\u1EDBi ng\u01B0\u1EDDi d\u00F9ng' | translate\" [popupSize]=\"userPickerForm.popupSize\" (onHide)=\"userPickerForm.show == false\">-->\r\n<!-- &lt;!&ndash; <congviec-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"formModel\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onSaved)=\"showDetailForm = false;crudList.reload()\" (onCancel)=\"_handleCancel($event)\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onAfterSaved)=\"onAfterSaved($event)\"></congviec-form>&ndash;&gt;-->\r\n\r\n<!-- &lt;!&ndash;<quick-add-form *ngIf=\"model.editFormModel.showQuickNoteForm\" [parentContext]=\"context\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; [parentModel]=\"context.data.noteDataModel\"></quick-add-form>&ndash;&gt;-->\r\n<!--</tn-dialog>-->",
48931
+ providers: [ComponentContextService, CheckControlVisibleService],
48932
+ styles: [".paging-advance{list-style:none;margin:3px 0;padding-left:0}.paging-advance li{line-height:30;padding-left:15px;width:150px}.paging-advance li.disabled{color:#bdbdbd;outline:none}.paging-advance li.disabled:hover{background:none;cursor:default}.paging-advance li:hover{background:red;cursor:pointer}.paging-advance-overlay .ui-overlaypanel-content{padding:0}.paging-advance-overlay.ui-overlaypanel-shifted:before{left:1.25em;margin-left:-10;right:auto}.paging-advance-overlay.ui-overlaypanel-shifted:after{left:1.25em;margin-left:-8px;right:auto}.chat-avatar{border:2px solid #eee;height:36px}", "@charset \"UTF-8\";@import url(C:\\Users\\vietp\\source\\repos\\5.1\\shared\\AppSharedV5\\node_modules\\@angular\\material\\prebuilt-themes\\indigo-pink.css);@import url(C:\\Users\\vietp\\source\\repos\\5.1\\shared\\AppSharedV5\\node_modules\\jsoneditor\\dist\\jsoneditor.min.css);.flex{display:flex}.flex .fit{flex:1 1}.flex.flex-column{flex-direction:column}.flex.flex-wrap{flex-wrap:wrap}.flex.center-v{align-items:center}.flex.center-all,.flex.center-h{justify-content:center}.flex.center-all{align-items:center}.validate-item{color:#e00000;display:inline-block;font-size:.9em;white-space:nowrap}.tn-scroll-bar.bgWhite>div,.validate-item{background-color:#fff}.label-primary{background-color:#1ab394;padding:2px}.label-danger,.label-primary{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px}.label-danger{background-color:#ed5565;padding:2px 5px}.label-warning{background-color:#b8860b}.label-secondary,.label-warning{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.label-secondary{background-color:#a9a9a9}.label-done{background-color:#3b1ef7;border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.text-navy{color:#1ab394!important}.text-danger{color:red!important}.fa-user-edit{font-size:14px}.flexcolumn{border:1px solid #eee;border-radius:5px;min-height:80px;overflow-x:hidden;overflow-y:hidden}.flexcolumn,.has2ScrollZone2 .flexcolumn{max-height:calc(100vh - 180px)}.headerNoBorder>th{border:none!important;border-bottom:1px solid #eee!important}.cellNoBorder table tr td{border:0!important}.layout-wrapper .layout-main{overflow:hidden;padding:60px 0 0}div.circleButton{border-radius:50%;display:inline-block;height:32px;line-height:32px;margin-bottom:4px;margin-top:4px;overflow:hidden;position:relative;text-align:center;transform:perspective(1px);width:32px}div.circleButton>a{line-height:32px;padding:0!important}div.circleButton>a>i{width:24px!important}div.circleButton:before{background:#e6e6e6;border-radius:50%;bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:all .3s cubic-bezier(.4,.34,.01,.97);z-index:-1}div.circleButton:hover:before{transform:scale(1)}.message-notice{background:#e0e0e0;text-align:center}.message-created-by{color:#888;font-size:.82em;font-weight:400;margin-bottom:3px;margin-left:45px;margin-top:5px}.message-created{color:#495057;display:inline-block;font-size:.82em;margin-bottom:0;margin-top:0}.message-own .message-created{padding-left:10px;padding-right:6px}.message-from .message-created{padding-left:6px;padding-right:10px}.message-content{color:#000;line-height:20px;margin-bottom:6px;margin-top:3px;position:relative}.message-content i{display:none}.message-content:hover i{display:block}.message-content:hover{padding-right:20px!important}.chat-box-content{max-height:500px}.attachment-list .attachment-item{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background:#f1f1f1;border:1px solid #ccc;border-radius:8px;box-shadow:1px 2px 3px rgba(0,0,0,.06);float:left;height:84px;margin:8px;overflow:hidden;position:relative;text-align:center;user-select:none;width:84px}.attachment-list .attachment-item img{height:100%;width:100%}.attachment-list .attachment-item span{left:0;padding:5px;position:absolute;top:25px;width:100%;word-break:break-all}.clearfix{clear:both}.dashboard .chat ul li img.message-img{float:none;height:120px;margin-left:0;width:auto}.message-attachment{cursor:pointer;font-size:1.5em;margin:0 5px 0 0;position:relative}.hidden{display:none}.message-input{width:100%}.message-input label{font-size:1.2rem}.remove-file-attachment{background:#495057;border-radius:50%;color:#fff;cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px}.attachment-list{background:#fff;bottom:51px;box-shadow:0 -2px 3px -3px rgba(0,0,0,.21176470588235294);display:none;height:100px;left:-15px;position:absolute;width:calc(100% + 30px)}.attachment-list.attached-file{display:block}.dashboard{margin-bottom:-15px;margin-top:-5px}.dashboard .timeline>.ui-g .ui-g-9 .event-text{color:#555;white-space:nowrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2{line-height:18px;padding-left:30px;text-align:justify;white-space:pre-wrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2 i{left:20px;margin-top:3px;position:absolute}.new-message{align-items:center;justify-content:center}.dashboard .chat .new-message{border:0;display:flex;margin:0;padding:0;text-align:left}.dashboard .chat .new-message i{color:#495057}.dashboard .chat .new-message .message-attachment{border:0}.dashboard .chat .new-message .button-send{display:inline-block;line-height:40px;position:relative}.dashboard .chat .new-message .button-send .p-button-label{text-align:center}.dashboard .chat .new-message .message-emotion{display:inline-block;height:100%;line-height:40px;text-align:center;width:40px}.dashboard .chat .new-message .message-emotion i{font-size:24px;line-height:inherit}.dashboard .chat .new-message .message-input{width:calc(100% - 155px)}.dashboard .chat ul li.message-from,.dashboard .chat ul li.message-own{padding:0}.dashboard .chat ul li.message-from>span{background-color:#f0e3fd;border:0;border-radius:2px 20px 20px 2px}.dashboard .chat ul li.message-from>.first,.dashboard .chat ul li.message-from>.middle{margin-left:45px!important}.dashboard .chat ul li.message-from>.last{border-radius:2px 20px 20px 20px;margin-left:45px!important}.dashboard .chat ul li.message-from>img{border-radius:50%;margin-top:5px;position:absolute;width:36px}.dashboard .chat ul li.message-own>span{background-color:#def6f8;border:0;border-radius:20px 2px 2px 20px;text-align:right}.dashboard .chat ul li.message-own>span.sending{background-color:#eee}.dashboard .chat ul li.message-own>span.last{border-radius:20px 2px 20px 20px}.dashboard .chat ul li.message-own .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-own .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-own>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:right}.dashboard .chat ul li.message-from .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-from .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-from .attachment span.attachment-item a img{margin-right:0}.dashboard .chat ul li.message-from>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:left}.dashboard .chat ul li .attachment span.attachment-item a>i{padding-right:8px}.dashboard .chat ul li div.file p.attachment{display:inline-block;margin-bottom:5px}.dashboard .chat ul li.message-from{text-align:left}.dashboard .chat ul li.message-own{text-align:right}.dashboard .chat ul li>div.file.image{height:170px;max-width:100%;padding:15px;transition:width .15s linear;width:220px}.dashboard .chat ul li>div.file.image p.attachment{height:120px}.dashboard .chat ul li>div.file{padding:15px}.dashboard .chat ul li>div.file p,.dashboard .chat ul li>div.file span{display:inline-block;margin:0;padding:0}.visible{opacity:1;transition:opacity .15s linear;visibility:visible}.hidden{opacity:0;transition:visibility 0s .1s,opacity .1s linear;visibility:hidden}.visible2{opacity:1;transition:opacity .35s linear;visibility:visible}.hidden2{opacity:0;transition:visibility 0s .3s,opacity .3s linear;visibility:hidden}.dashboard .chat{position:relative}.dashboard .chat .scroll-to-bottom{bottom:6px;min-height:40px;padding-right:12px;position:sticky;text-align:right}.dashboard .chat .scroll-to-bottom span{background:#495057;border:2px solid #fff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.34901960784313724);color:#fff;cursor:pointer;display:inline-block;font-size:20px;height:35px;line-height:35px;overflow:hidden;text-align:center;width:35px}.dashboard .chat .group-info{line-height:30px;margin:-10px;padding:5px 10px;top:0;z-index:99}.dashboard .chat .group-info,.dashboard .chat .pin{background:#fff;box-shadow:0 0 3px -1px rgba(0,0,0,.21176470588235294);position:sticky}.dashboard .chat .pin{margin-bottom:10px;margin-left:-10px;top:40px;width:calc(100% + 20px);z-index:98}.dashboard .chat ul li.message-from.pin>span,.dashboard .chat ul li.message-own.pin>span{background-color:transparent}.dashboard .chat ul li.message-from.pin>span{margin-left:0}.dashboard .chat .message-content i{color:#495057;cursor:pointer;font-size:11px}.dashboard .chat .pin .message-content i{display:block}.dashboard .chat li.message-from .message-content{padding-left:6px}.dashboard .chat li.message-from .message-content i{padding:5px}.dashboard .chat li.message-own .message-content i{padding:5px;position:absolute;right:-15px}.dashboard .chat .group-info .circleButton{float:right;margin-bottom:0;margin-top:0}.dashboard .chat ul{margin-top:20px;padding:0}.dashboard .chat .new-message .message-input input.ui-inputtext:focus{box-shadow:none;outline:none}.dashboard .chat ul.hasPin{margin-top:10px}.dashboard .chat .group-info a{color:#495057}.normalHtml,.normalHtml b,.normalHtml strong{font-weight:400}.normalHtml{display:inline-block}.avatar-viewer .profile-image{border:1px solid #fff;border-radius:50%;height:40px;margin-top:-6px;width:40px}a.button>i{margin-right:5px}.dashboard .timeline{padding-top:20px}.ui-inputgroup .ui-inputtext{padding-right:0}.new-message .ui-inputtext{width:100%}.full-screen,.full-screen>.p-dialog{height:100%!important;left:0!important;max-height:100%;min-height:unset!important;min-width:100%!important;top:0!important;width:100%!important}#image-view-list.image-gallery-2{background-color:rgba(0,0,0,.4);height:calc(100vh - 41px);margin:-14px auto 0;touch-action:none;width:100%}#image-view-list.image-gallery-2 .image-container{background-color:transparent;border:0;bottom:0;height:85%;margin:auto}#image-view-list.image-gallery-2 .image-container .iv-snap-view{bottom:20px;left:calc(50% - 75px);top:auto}#image-view-list.image-gallery-2 .image-container .iv-image-view img{touch-action:auto}#image-view-list .inline-icon{margin-top:-41px}#image-view-list .footer-info,#image-view-list .material-icons.next,#image-view-list .material-icons.prev{display:none}#image-view-list .options-image-viewer{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;margin-right:37px;user-select:none}.mobile-image-viewer-close{color:#fff;cursor:pointer;font-size:x-large;height:42px;line-height:42px;padding-right:7px;padding-top:2px;position:absolute;right:0;text-align:center;top:0;vertical-align:middle;width:37px}.mobile-image-viewer-close:hover{color:#feca37!important}.hide-holder{padding:0}.file-ex-name{word-break:break-all}.box-function{background:#fff;border-radius:0 0 5px 5px;border-top:1px solid #e8e8e8;bottom:0;left:0;padding:8px 30px;position:absolute;text-align:right;width:100%}.box-function button{margin-left:5px}.quick-note-button-holder{bottom:40px;display:none;height:50px;position:absolute;right:50px;width:50px;z-index:99}.quick-note-button{background:#ffc107;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:2em;height:50px;line-height:50px;outline:none;text-align:center;width:50px}.quick-note-button:hover{color:#fff}.all-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.all-note-button:hover{color:#fff}.setting-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.setting-note-button:hover{color:#fff}.pinned-notes-holder{bottom:20px;display:none;left:20px;position:absolute;width:250px;z-index:98}.pinned-notes{background:transparent;display:block;outline:none;padding:0}.pinned-notes-header{font-size:1rem;font-weight:700}.pinned-notes-setting{position:absolute;right:.5rem}.pinned-note{background-color:#fff1ac;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);font-size:.8rem;margin-bottom:10px;padding:0;position:relative}.pinned-note:last-child{margin-bottom:0}.pinned-notes-minimize-button{background:#ffc003;border:1px solid #fff;border-radius:50%;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);color:#fff;cursor:pointer;height:25px;padding-top:5px;position:absolute;right:-15px;text-align:center;top:-15px;width:25px;z-index:1}.pinned-note-header-line{border:1px solid #fff;box-shadow:1px 1px 2px rgba(0,0,0,.4);height:calc(100% - 1rem);left:3px;margin-bottom:.5rem;margin-top:.5rem;max-height:20px;position:absolute;width:13px}.pinned-note-header-right{cursor:pointer;float:right;margin-left:3px;width:32px}.pinned-note-header-time{font-size:.6rem}.pinned-note-header-button-unpin{display:none;float:left;height:14px;margin-right:2px;opacity:.8;width:14px}.pinned-note-header-button-complete{display:none;padding-top:2px}.pinned-note-body{float:right;padding:.5rem .5rem .5rem 25px;width:100%}.pinned-note-body:hover{background-color:#feeb82}.pinned-note-body:hover .pinned-note-header-time{display:none}.pinned-note-body:hover .pinned-note-header-button-complete,.pinned-note-body:hover .pinned-note-header-button-unpin{display:block}.pinned-note-line-title{color:#333;display:block;font-weight:700;padding-bottom:6px}.pinned-note-line{display:block}.view-port{border-radius:5px;box-shadow:0 0 0 9999px rgba(0,0,0,.5882352941176471);display:none;height:0;width:0;z-index:999}.view-port,.view-port-mask{background:transparent;position:absolute}.view-port-mask{display:block;height:100%;left:0;top:0;width:100%;z-index:9998}.tinymce-control{border:1px solid #ccc;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;width:100%}.input-tab-trap{filter:alpha(opacity=0)!important;opacity:0!important;overflow:hidden!important;width:0!important}.color-value input{font-size:.8em;line-height:16px}.dialog-material.mobile{width:100%!important}audio,audio:focus,video,video:focus{outline:none}.iv-image-view img.iv-image{-webkit-animation:fadein .5s;animation:fadein .5s;visibility:hidden!important}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.iv-image-view img.iv-image.show{visibility:visible!important}.row-line{padding-bottom:0;padding-top:0}.fc-ltr{padding-bottom:7px}.padding-bottom-5px{padding-bottom:5px}.no-margin{margin:0!important}.no-padding{padding:0}.no-padding-left{padding-left:0}.float-left{float:left}body .fc .fc-toolbar .fc-button{background-color:#007ad9;border:1px solid #007ad9;border-radius:3px;color:#fff;font-size:14px;transition:background-color .2s,box-shadow .2s}body .fc .fc-toolbar .fc-button:enabled:hover{background-color:#116fbf;border-color:#116fbf;color:#fff}body .fc .fc-toolbar .fc-button:focus{box-shadow:0 0 0 .2em #8dcdff;outline:0 none;outline-offset:0}body .fc .fc-toolbar .fc-button-group .fc-button{border-radius:0}body .fc .fc-toolbar .fc-button-group .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-button-group .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}body .fc .fc-toolbar .fc-right .fc-button{border-radius:0}body .fc .fc-toolbar .fc-right .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-right .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.fc-toolbar>*>:not(:first-child){margin-left:0}.fc-axis,.fc-dayGridMonth-button,.fc-timeGridDay-button,.fc-timeGridWeek-button,.old-content{line-height:0;text-indent:-9999px}.fc-axis:after,.fc-dayGridMonth-button:after,.fc-timeGridDay-button:after,.fc-timeGridWeek-button:after,.new-content{display:block;line-height:normal;text-indent:0}.fc-dayGridMonth-button:after{content:\"Th\u00E1ng\";padding:.2em}.fc-timeGridWeek-button:after{content:\"Tu\u1EA7n\";padding:.2em}.fc-timeGridDay-button:after{content:\"Ng\u00E0y\";padding:.2em}body .fc th{background-color:#f4f4f4;border:1px solid #c8c8c8;color:#333;padding:.571em 1em}.ui-fluid .button-group button,.ui-fluid .button-group p-button{margin-right:.5em!important;text-align:left;width:auto}.layout-wrapper .layout-menu-container{z-index:97}.base-status,.base-status-aborted,.base-status-approved,.base-status-completed,.base-status-create-new,.base-status-ended,.base-status-high,.base-status-immediately,.base-status-low,.base-status-medium,.base-status-on-conducting,.base-status-on-going,.base-status-pending,.base-status-rejected,.base-status-returned,.base-status-urgent{border-radius:.25em;color:#fff;font-size:.8em;padding:3px;text-align:center}.base-status-create-new{background-color:#f2f2f2;color:#666}.base-status-on-conducting,.base-status-on-going{background-color:#337ab7}.base-status-pending{background-color:#ffba01}.base-status-approved{background-color:#34a835}.base-status-returned{background-color:#ffba01}.base-status-rejected{background-color:#d9534f}.base-status-completed{background-color:#34a835}.base-status-aborted{background-color:#ffba01}.base-status-ended{background-color:#34a835}.base-status-low,.base-status-medium{background-color:#f2f2f2;color:#666}.base-status-high{background-color:#ffba01}.base-status-immediately,.base-status-urgent{background-color:#d9534f}.text-align-center{text-align:center}.font-weight-bold{font-weight:700}.landing-body .landing-menu li a:hover{border-bottom:none}.landing-body .landing-menu li:first-child{margin-left:8px}.crud-form .label-control p{margin:0;padding:0}.crud-form .tn-check-box-list .p-row{display:block;padding:.5em;width:100%}.crud-form dropdown,.crud-form tn-mask{width:100%}.crud-form .tn-dropdown{min-height:32px}.crud-form .tn-dropdown.free-text.horizontal{display:flex}.crud-form .tn-dropdown.free-text.horizontal>div{flex-grow:1;padding-left:.5em;padding-right:.5em}.crud-form .tn-dropdown.free-text.horizontal>div:first-child{padding-left:0}.crud-form .tn-dropdown.free-text.horizontal>div:last-child{padding-right:0}.crud-form .tn-dropdown.free-text.vertical input.ui-inputtext.input-free-text{margin-top:.5em}.crud-form.assessment .label-control{font-weight:700}.crud-form.assessment .label-control.haveIndex{display:block;margin-bottom:5px;padding-left:20px;position:relative}.crud-form.assessment .label-control.haveIndex:before{content:\" \" attr(label-index) \".\";left:0;position:absolute;top:0}.crud-form.assessment .ViewMode{border-bottom:none}.crud-form.assessment .ViewMode .label-control{margin-bottom:0}body .ui-inputtext.min-width{padding:6px}.ps__rail-x,.ps__rail-y{z-index:2}.zIndex5 .ps__rail-x,.zIndex5 .ps__rail-y{z-index:5}.table-sticky table{border-collapse:separate;border-spacing:0}.table-sticky tr td,.table-sticky tr th{border:1px solid #eee!important;border-left:none!important;border-top:none!important}.table-sticky tr td:first-child,.table-sticky tr th:first-child{border-left:1px solid #eee!important}.table-sticky tr td:last-child,.table-sticky tr th:last-child{border-right:none!important}.table-sticky tr:first-child th{border-top:1px solid #eee!important}.table-sticky th{background:#eee}.table-sticky tbody td.disabled{background:#eee!important}.table-sticky tbody td.disabled:not(:last-child){border-right:1px solid #fff!important}.table-sticky.fix-height tr:first-child th{position:sticky;top:0;z-index:2}.container-flex{align-items:center;display:flex}.container-flex>div:first-child{flex:0 0 auto;margin-right:.5em}.container-flex>div:last-child{flex-grow:1}.container-control{display:flex}.container-control>span.label{flex:0 0 auto;padding-right:.5em;padding-top:.5em}.container-control>span.label+*{flex-grow:1;flex-shrink:1;position:relative}.container-control>span.label+* .tn-dropdown,.container-control>span.label+* .ui-autocomplete-multiple,.container-control>span.label+* .ui-inputgroup .ui-inputtext{width:100%}.container-control>span.label+* .validation-container{margin-top:3px}.container-control>span.label+* .validation-container .validate-item{white-space:unset}.container-control>span.label+*>div{left:0;position:absolute;top:0;width:100%}.container-control.no-label>span.label{display:none}.container-control.inline{display:inline-flex}.align-flex-center{align-items:center;display:flex;justify-content:center}@media print{.isPrinting>*{display:none}.isPrinting app-print-layout{display:block}}.layout-wrapper .topbar .topbar-left,.layout-wrapper .topbar .topbar-right{background:#397ac3}#searchResultPanel-holder{padding:0 .5em}.cus-dropdown{line-height:normal;margin-right:1em}.tn-thumbnail{padding:.5rem}.tn-thumbnail.tn-thumbnail.tn-thumbnail{box-sizing:border-box}.fa-10:before{content:\"A+\";font-family:cursive;font-weight:700}.layout-wrapper .topbar .topbar-right #menu-button i{font-size:20px;margin-top:4px}.layout-wrapper .layout-menu li a i.menuitem-toggle-icon{font-size:15px;margin-left:auto}.flex-container-main-content{display:flex;flex-direction:column}.flex-container-main-content>div:last-child{background-color:#f4f4f4;display:flex;flex:1 1;overflow:hidden;position:relative}.flex-container-main-content>div:last-child>div{height:100%;left:0;overflow:hidden;padding-top:.5em;position:absolute;top:0;width:100%}.flex-container-main-content .block-with-button-search{display:flex;justify-content:flex-end}.flex-container-main-content .block-with-button-search>*{margin-left:.5em}.flex-container-main-content .block-with-button-search>input{height:26px;margin-left:0;max-width:200px;width:100%}.flex-container-main-content .block-with-button-search>dropdown{max-width:140px;width:100%}.flex-container-main-content .title-main-component{border-bottom:2px solid #1ca7ff}.clickable-table.clickable-table{cursor:pointer}.main-crud-container{height:calc(100vh - 76px)}.flex-container-fit-child{display:flex;flex-direction:column;height:100%;overflow:hidden}.flex-container-fit-child>div.fit-content{flex:1 1;position:relative}.flex-container-fit-child>div.fit-content>div{height:100%;overflow:auto;position:absolute;width:100%}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.waiting-box.show{display:block}.function-topbar>*{vertical-align:top}.function-topbar button{width:auto}.function-topbar p-fileUpload{margin-right:1em}.function-topbar .container-control{display:inline-flex;line-height:normal}.function-topbar .container-control dropdown{width:100%}:focus{outline-color:#a6d5fa!important}address{font-style:normal}body .p-toast .p-toast-message{border-radius:0;border-width:0 0 0 4px!important}.__status span,.status span{font-size:.8rem}p-table.single-check .p-datatable .p-datatable-tbody>tr{cursor:pointer}p-table.single-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important;outline:2px solid #a6d5fa}p-table.single-check .p-datatable .p-datatable-tbody>tr td.sticky .fix-sticky.top{display:none}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td{border-color:#fff}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td .fix-sticky{background-color:#fff}.tn-animated-left-arrow-icon,.tn-animated-right-arrow-icon{height:32px;position:relative;width:14px;z-index:10}.tn-animated-right-arrow-icon{-webkit-animation:arrowBounceToRight .8s ease-in-out infinite alternate;animation:arrowBounceToRight .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon{-webkit-animation:arrowBounceToLeft .8s ease-in-out infinite alternate;animation:arrowBounceToLeft .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon:after,.tn-animated-left-arrow-icon:before,.tn-animated-right-arrow-icon:after,.tn-animated-right-arrow-icon:before{background-color:#88b0dd;content:\"\";display:block;height:20px;position:absolute;width:5px}.tn-animated-right-arrow-icon:before{left:4px;top:0;transform:rotate(-35deg)}.tn-animated-right-arrow-icon:after{left:4px;top:14px;transform:rotate(35deg)}.tn-animated-left-arrow-icon:before{right:4px;top:0;transform:rotate(35deg)}.tn-animated-left-arrow-icon:after{right:4px;top:14px;transform:rotate(-35deg)}@-webkit-keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@-webkit-keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}@keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}.pass{color:#49c949}.not-pass,.pass{margin:5px;text-align:center}.not-pass{color:red}"]
48933
+ },] }
48934
+ ];
48935
+ ChatBoxComponent.ctorParameters = function () { return [
48936
+ { type: i0.Injector },
48937
+ { type: ChatService },
48938
+ { type: MessageBoardService },
48939
+ { type: UserService },
48940
+ { type: CheckControlVisibleService },
48941
+ { type: SignalRService },
48942
+ { type: FileExplorerService },
48943
+ { type: CrudService },
48944
+ { type: NotifierService },
48945
+ { type: ModuleConfigService }
48946
+ ]; };
48947
+ ChatBoxComponent.propDecorators = {
48948
+ taskId: [{ type: i0.Input }],
48949
+ serviceCode: [{ type: i0.Input }],
48950
+ entity: [{ type: i0.Input }],
48951
+ users: [{ type: i0.Input }],
48952
+ showSendMessageBox: [{ type: i0.Input }],
48953
+ input: [{ type: i0.ViewChild, args: ['input',] }],
48954
+ fileElement: [{ type: i0.ViewChild, args: ['fileElement',] }]
48955
+ };
48956
+
48957
+ // fix for prod build
48958
+ // const objectToFormData = objectToFormData_;
48959
+ var ChatSendMessageBoxComponent = /** @class */ (function (_super) {
48960
+ __extends(ChatSendMessageBoxComponent, _super);
48961
+ function ChatSendMessageBoxComponent(injector, _chatService, _checkControlVisible, _fileExplorerNewService, _notifierService) {
48962
+ var _this = _super.call(this, injector) || this;
48963
+ _this._chatService = _chatService;
48964
+ _this._checkControlVisible = _checkControlVisible;
48965
+ _this._fileExplorerNewService = _fileExplorerNewService;
48966
+ _this._notifierService = _notifierService;
48967
+ _this.model.driveFileDialog = { popupSize: {} };
48968
+ return _this;
48969
+ }
48970
+ ChatSendMessageBoxComponent.prototype.ngOnInit = function () {
48971
+ var _this = this;
48972
+ console.log('inside ChatSendMessageBoxComponent');
48973
+ this.model.dataSource = [];
48974
+ this.model.correlationIds = [];
48975
+ this.model.attachments = [];
48976
+ this.model.maxFileSize = 3000000;
48977
+ this.model.fileViewer = {};
48978
+ this._checkControlVisible.checkDisplayStatus(this.input.nativeElement).then(function (rs) {
48979
+ _this.input.nativeElement.focus();
48980
+ });
48981
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_INSTANCE_ID_LOADED, function (data) {
48982
+ if (data) {
48983
+ _this.model.id = data;
48984
+ _this.chatInstanceId = data;
48985
+ _this.notifiUserOnline(_this.model.id);
48986
+ }
48987
+ });
48988
+ this.rootContext.subscribe(ComCtxConstants.ROOT.CHAT_MOUSE_UP, function (data) {
48989
+ if (data) {
48990
+ _this.onMouseUp(null);
48991
+ }
48992
+ });
48993
+ this.rootContext.subscribe('DRIVE_FILE_DIALOG.CLOSE_POPUP', function (response) {
48994
+ if (response != null) {
48995
+ var type = _this._commonService.isImage(response.name) ? 'image' : 'file';
48996
+ var attachmentItem_1 = {
48997
+ type: type,
48998
+ fileId: response.id,
48999
+ fileName: response.name
49000
+ };
49001
+ if (attachmentItem_1.type == 'image') {
49002
+ // Get preview url
49003
+ _this._fileExplorerNewService.getImageFileBase64(response.id).then(function (result) {
49004
+ attachmentItem_1.url = result;
49005
+ });
49006
+ }
49007
+ _this.model.attachments.push(attachmentItem_1);
49008
+ _this.input.nativeElement.focus();
49009
+ _this.model.classHasAttachment = 'attached-file';
49010
+ _this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_ATTACH_FILE, true);
49011
+ }
49012
+ _this.model.driveFileDialog.show = false;
49013
+ });
49014
+ this.rootContext.subscribe(ComCtxConstants.ROOT.DESTROY_TASK_DETAIL_COMPONENT, function (data) {
49015
+ if (_this.model.userOnlineId) {
49016
+ _this.removeUserOnline(_this.model.userOnlineId);
49017
+ }
49018
+ });
49019
+ };
49020
+ ChatSendMessageBoxComponent.prototype.browseFileFromPersonal = function () {
49021
+ this.model.driveFileDialog = {
49022
+ show: true
49023
+ };
49024
+ };
49025
+ ChatSendMessageBoxComponent.prototype.onSendMessage = function (message) {
49026
+ var e_1, _a;
49027
+ var _this = this;
49028
+ if ((!message || message.trim() == '') && this.model.attachments.length === 0) {
49029
+ return;
49030
+ }
49031
+ if (!message) {
49032
+ message = '';
49033
+ }
49034
+ message = message.trim();
49035
+ var objToSend = {
49036
+ chatId: this.model.id,
49037
+ messageContent: message,
49038
+ correlationId: this._commonService.guid()
49039
+ };
49040
+ var formData = new FormData();
49041
+ for (var key in objToSend) {
49042
+ formData.append(key, objToSend[key]);
49043
+ }
49044
+ try {
49045
+ for (var _b = __values(this.model.attachments), _c = _b.next(); !_c.done; _c = _b.next()) {
49046
+ var item = _c.value;
49047
+ // const item = this.model.attachments[itejm];
49048
+ if (item.fileId != null) {
49049
+ formData.append('fileId', item.fileId);
49050
+ }
49051
+ else {
49052
+ if (item.type == 'image') {
49053
+ formData.append('files', item.data, item.fileName);
49054
+ }
49055
+ else {
49056
+ formData.append('files', item.data);
49057
+ }
49058
+ }
49059
+ }
49060
+ }
49061
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
49062
+ finally {
49063
+ try {
49064
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
49065
+ }
49066
+ finally { if (e_1) throw e_1.error; }
49067
+ }
49068
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_SENDING, {
49069
+ message: objToSend,
49070
+ attachments: this.model.attachments
49071
+ });
49072
+ // reset attachment list
49073
+ this.model.attachments.length = 0;
49074
+ this.model.content = '';
49075
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_ATTACH_FILE, false);
49076
+ this.model.classHasAttachment = '';
49077
+ this._chatService.sendMessage(formData).then(function (rs) {
49078
+ _this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_SENT, { message: objToSend, status: true });
49079
+ }).catch(function (err) {
49080
+ _this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_SENT, {
49081
+ message: objToSend,
49082
+ status: false,
49083
+ error: err.error
49084
+ });
49085
+ _this._notifierService.showWarningByResponse(err);
49086
+ });
49087
+ };
49088
+ ChatSendMessageBoxComponent.prototype.handlePaste = function (event) {
49089
+ // console.log(event.clipboardData);
49090
+ var objectData = this.getImageClipboardData(event);
49091
+ if (objectData) {
49092
+ this.model.attachments.push({
49093
+ type: 'image',
49094
+ url: objectData.url,
49095
+ data: objectData.blob, fileName: this._commonService.guid() + '.png'
49096
+ });
49097
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_ATTACH_FILE, true);
49098
+ this.model.classHasAttachment = 'attached-file';
49099
+ }
49100
+ };
49101
+ ChatSendMessageBoxComponent.prototype.getImageClipboardData = function (e) {
49102
+ for (var i = 0; i < e.clipboardData.items.length; i++) {
49103
+ var item = e.clipboardData.items[i];
49104
+ if (item.type.indexOf('image') != -1) {
49105
+ var imageObj = item.getAsFile();
49106
+ if (imageObj.size < this.model.maxFileSize) {
49107
+ return { url: URL.createObjectURL(imageObj), blob: imageObj };
49108
+ }
49109
+ else {
49110
+ return null;
49111
+ }
49112
+ }
49113
+ }
49114
+ return null;
49115
+ };
49116
+ ChatSendMessageBoxComponent.prototype.browseFileFromComputer = function () {
49117
+ this.fileElement.advancedFileInput.nativeElement.click();
49118
+ };
49119
+ ChatSendMessageBoxComponent.prototype.onSelectFileFromComputer = function (evt) {
49120
+ try {
49121
+ if (evt.files && evt.files.length > 0) {
49122
+ for (var index = 0; index < evt.files.length; index++) {
49123
+ var fileName = evt.files[index].name;
49124
+ var type = this._commonService.isImage(fileName) ? 'image' : 'file';
49125
+ var attachmentItem = {
49126
+ type: type,
49127
+ data: evt.files[index], fileName: fileName
49128
+ };
49129
+ if (attachmentItem.type == 'image') {
49130
+ attachmentItem.url = evt.files[index].objectURL.changingThisBreaksApplicationSecurity;
49131
+ }
49132
+ this.model.attachments.push(attachmentItem);
49133
+ }
49134
+ this.input.nativeElement.focus();
49135
+ this.model.classHasAttachment = 'attached-file';
49136
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_ATTACH_FILE, true);
49137
+ }
49138
+ }
49139
+ catch (e) {
49140
+ console.error('error on process select file computer', e);
49141
+ }
49142
+ this.fileElement.clear();
49143
+ };
49144
+ ChatSendMessageBoxComponent.prototype.removeAttachment = function (item) {
49145
+ var attachments = this.model.attachments;
49146
+ var index = attachments.findIndex(function (x) { return x.url == item.url; });
49147
+ this.model.attachments.splice(index, 1);
49148
+ if (this.model.attachments.length === 0) {
49149
+ this.model.classHasAttachment = '';
49150
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.CHAT_MESSAGE_ATTACH_FILE, false);
49151
+ }
49152
+ };
49153
+ ChatSendMessageBoxComponent.prototype.onMouseUp = function ($event) {
49154
+ this.input.nativeElement.focus();
49155
+ };
49156
+ ChatSendMessageBoxComponent.prototype.cancelBlur = function (event) {
49157
+ event.preventDefault();
49158
+ };
49159
+ ChatSendMessageBoxComponent.prototype.ngOnDestroy = function () {
49160
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_INSTANCE_ID_LOADED);
49161
+ this.rootContext.unSubscribe(ComCtxConstants.ROOT.CHAT_MOUSE_UP);
49162
+ };
49163
+ ChatSendMessageBoxComponent.prototype.notifiUserOnline = function (chatId) {
49164
+ var _this = this;
49165
+ this._chatService.insertUserOnline(chatId).then(function (rs) {
49166
+ if (rs.success) {
49167
+ _this.model.userOnlineId = rs.data;
49168
+ }
49169
+ });
49170
+ };
49171
+ ChatSendMessageBoxComponent.prototype.removeUserOnline = function (userOnlineId) {
49172
+ var _this = this;
49173
+ this.chatInstanceId = '';
49174
+ this._chatService.removeUserOnline(userOnlineId).then(function (rs) {
49175
+ if (rs.success) {
49176
+ _this._notifierService.showWarning('Đã bỏ người dùng thành công');
49177
+ }
49178
+ });
49179
+ };
49180
+ ChatSendMessageBoxComponent.prototype.clickInputText = function () {
49181
+ if (this.model.instanceId) {
49182
+ this._chatService.markAsReadAllContents(this.model.id).then(function (rs) {
49183
+ console.log('markAsReadAllContents');
49184
+ });
49185
+ }
49186
+ };
49187
+ return ChatSendMessageBoxComponent;
49188
+ }(ComponentBase));
49189
+ ChatSendMessageBoxComponent.decorators = [
49190
+ { type: i0.Component, args: [{
49191
+ selector: 'chat-send-message-box',
49192
+ template: "<div class=\"dashboard\" (mouseup)=\"onMouseUp($event)\">\r\n <div class=\"chat\">\r\n <div class=\"new-message\">\r\n <div class=\"message-emotion\">\r\n <i class=\"far fa-smile\" style=\"color: gray;\" disabled=\"true\"></i>\r\n </div>\r\n <div class=\"message-attachment\" pTooltip=\"\u0110\u00EDnh k\u00E8m file\" tooltipPosition=\"top\" (click)=\"op.toggle($event)\">\r\n <i class=\"fas fa-paperclip\"></i>\r\n </div>\r\n <p-overlayPanel #op [dismissable]=\"true\" [appendTo]=\"'body'\" [styleClass]=\"'paging-advance-overlay'\"\r\n (mouseup)=\"onMouseUp($event)\">\r\n <ul class=\"paging-advance\">\r\n <li (click)=\"browseFileFromPersonal()\">T\u1EEB file c\u00E1 nh\u00E2n</li>\r\n <li (click)=\"browseFileFromComputer()\">T\u1EA3i l\u00EAn t\u1EEB m\u00E1y t\u00EDnh</li>\r\n </ul>\r\n </p-overlayPanel>\r\n <div class=\"message-input p-float-label\">\r\n <input #input pInputText\r\n id=\"message\"\r\n autocomplete=\"off\" autocorrect=\"off\"\r\n spellcheck=\"false\" class=\"ui-inputtext\"\r\n type=\"text\" placeholder=\"N\u1ED9i dung tin nh\u1EAFn\"\r\n [(ngModel)]=\"model.content\"\r\n (keyup.enter)=\"onSendMessage($event.target.value)\" (keydown.shift.tab)=\"cancelBlur($event)\"\r\n (keydown.tab)=\"cancelBlur($event)\" (paste)=\"handlePaste($event)\" (click)=\"clickInputText()\"/>\r\n </div>\r\n <div>\r\n <button pButton class=\"p-button-danger\" icon=\"fas fa-send\" type=\"button\" label=\"G\u1EEDi\"\r\n (click)=\"onSendMessage(model.content)\">\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"attachment-list\" [ngClass]=\"model.classHasAttachment\">\r\n <tn-custom-scrollbar #scrollbar [style]=\"{'height': '100px'}\">\r\n <div *ngFor=\"let item of model.attachments\" class=\"attachment-item\">\r\n <img *ngIf=\"item.type == 'image'\" [src]=\"item.url | safeUrl\"/>\r\n <span *ngIf=\"item.type == 'file'\">{{item.fileName}}</span>\r\n <i class=\"far fa-times-circle label-danger remove-file-attachment\"\r\n (click)=\"removeAttachment(item)\"></i>\r\n </div>\r\n </tn-custom-scrollbar>\r\n <!-- <div class=\"clearfix\"></div>-->\r\n </div>\r\n </div>\r\n</div>\r\n<p-fileUpload [ngStyle]=\"{'display': 'none'}\" #fileElement (onSelect)=\"onSelectFileFromComputer($event)\"\r\n multiple=\"multiple\" name=\"fileUpload\" [maxFileSize]=\"model.maxFileSize\" auto=\"false\">\r\n</p-fileUpload>\r\n\r\n<!-- <app-drive-file-dialog *ngIf=\"model.driveFileDialog.show\" [parentDataContext]=\"dataContext\"\r\n []=\"model.driveFileDialog\" #driveFileDialog>\r\n</app-drive-file-dialog> -->\r\n",
49193
+ providers: [ComponentContextService],
49194
+ styles: ["", "@charset \"UTF-8\";@import url(C:\\Users\\vietp\\source\\repos\\5.1\\shared\\AppSharedV5\\node_modules\\@angular\\material\\prebuilt-themes\\indigo-pink.css);@import url(C:\\Users\\vietp\\source\\repos\\5.1\\shared\\AppSharedV5\\node_modules\\jsoneditor\\dist\\jsoneditor.min.css);.flex{display:flex}.flex .fit{flex:1 1}.flex.flex-column{flex-direction:column}.flex.flex-wrap{flex-wrap:wrap}.flex.center-v{align-items:center}.flex.center-all,.flex.center-h{justify-content:center}.flex.center-all{align-items:center}.validate-item{color:#e00000;display:inline-block;font-size:.9em;white-space:nowrap}.tn-scroll-bar.bgWhite>div,.validate-item{background-color:#fff}.label-primary{background-color:#1ab394;padding:2px}.label-danger,.label-primary{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px}.label-danger{background-color:#ed5565;padding:2px 5px}.label-warning{background-color:#b8860b}.label-secondary,.label-warning{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.label-secondary{background-color:#a9a9a9}.label-done{background-color:#3b1ef7;border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.text-navy{color:#1ab394!important}.text-danger{color:red!important}.fa-user-edit{font-size:14px}.flexcolumn{border:1px solid #eee;border-radius:5px;min-height:80px;overflow-x:hidden;overflow-y:hidden}.flexcolumn,.has2ScrollZone2 .flexcolumn{max-height:calc(100vh - 180px)}.headerNoBorder>th{border:none!important;border-bottom:1px solid #eee!important}.cellNoBorder table tr td{border:0!important}.layout-wrapper .layout-main{overflow:hidden;padding:60px 0 0}div.circleButton{border-radius:50%;display:inline-block;height:32px;line-height:32px;margin-bottom:4px;margin-top:4px;overflow:hidden;position:relative;text-align:center;transform:perspective(1px);width:32px}div.circleButton>a{line-height:32px;padding:0!important}div.circleButton>a>i{width:24px!important}div.circleButton:before{background:#e6e6e6;border-radius:50%;bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:all .3s cubic-bezier(.4,.34,.01,.97);z-index:-1}div.circleButton:hover:before{transform:scale(1)}.message-notice{background:#e0e0e0;text-align:center}.message-created-by{color:#888;font-size:.82em;font-weight:400;margin-bottom:3px;margin-left:45px;margin-top:5px}.message-created{color:#495057;display:inline-block;font-size:.82em;margin-bottom:0;margin-top:0}.message-own .message-created{padding-left:10px;padding-right:6px}.message-from .message-created{padding-left:6px;padding-right:10px}.message-content{color:#000;line-height:20px;margin-bottom:6px;margin-top:3px;position:relative}.message-content i{display:none}.message-content:hover i{display:block}.message-content:hover{padding-right:20px!important}.chat-box-content{max-height:500px}.attachment-list .attachment-item{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background:#f1f1f1;border:1px solid #ccc;border-radius:8px;box-shadow:1px 2px 3px rgba(0,0,0,.06);float:left;height:84px;margin:8px;overflow:hidden;position:relative;text-align:center;user-select:none;width:84px}.attachment-list .attachment-item img{height:100%;width:100%}.attachment-list .attachment-item span{left:0;padding:5px;position:absolute;top:25px;width:100%;word-break:break-all}.clearfix{clear:both}.dashboard .chat ul li img.message-img{float:none;height:120px;margin-left:0;width:auto}.message-attachment{cursor:pointer;font-size:1.5em;margin:0 5px 0 0;position:relative}.hidden{display:none}.message-input{width:100%}.message-input label{font-size:1.2rem}.remove-file-attachment{background:#495057;border-radius:50%;color:#fff;cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px}.attachment-list{background:#fff;bottom:51px;box-shadow:0 -2px 3px -3px rgba(0,0,0,.21176470588235294);display:none;height:100px;left:-15px;position:absolute;width:calc(100% + 30px)}.attachment-list.attached-file{display:block}.dashboard{margin-bottom:-15px;margin-top:-5px}.dashboard .timeline>.ui-g .ui-g-9 .event-text{color:#555;white-space:nowrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2{line-height:18px;padding-left:30px;text-align:justify;white-space:pre-wrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2 i{left:20px;margin-top:3px;position:absolute}.new-message{align-items:center;justify-content:center}.dashboard .chat .new-message{border:0;display:flex;margin:0;padding:0;text-align:left}.dashboard .chat .new-message i{color:#495057}.dashboard .chat .new-message .message-attachment{border:0}.dashboard .chat .new-message .button-send{display:inline-block;line-height:40px;position:relative}.dashboard .chat .new-message .button-send .p-button-label{text-align:center}.dashboard .chat .new-message .message-emotion{display:inline-block;height:100%;line-height:40px;text-align:center;width:40px}.dashboard .chat .new-message .message-emotion i{font-size:24px;line-height:inherit}.dashboard .chat .new-message .message-input{width:calc(100% - 155px)}.dashboard .chat ul li.message-from,.dashboard .chat ul li.message-own{padding:0}.dashboard .chat ul li.message-from>span{background-color:#f0e3fd;border:0;border-radius:2px 20px 20px 2px}.dashboard .chat ul li.message-from>.first,.dashboard .chat ul li.message-from>.middle{margin-left:45px!important}.dashboard .chat ul li.message-from>.last{border-radius:2px 20px 20px 20px;margin-left:45px!important}.dashboard .chat ul li.message-from>img{border-radius:50%;margin-top:5px;position:absolute;width:36px}.dashboard .chat ul li.message-own>span{background-color:#def6f8;border:0;border-radius:20px 2px 2px 20px;text-align:right}.dashboard .chat ul li.message-own>span.sending{background-color:#eee}.dashboard .chat ul li.message-own>span.last{border-radius:20px 2px 20px 20px}.dashboard .chat ul li.message-own .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-own .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-own>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:right}.dashboard .chat ul li.message-from .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-from .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-from .attachment span.attachment-item a img{margin-right:0}.dashboard .chat ul li.message-from>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:left}.dashboard .chat ul li .attachment span.attachment-item a>i{padding-right:8px}.dashboard .chat ul li div.file p.attachment{display:inline-block;margin-bottom:5px}.dashboard .chat ul li.message-from{text-align:left}.dashboard .chat ul li.message-own{text-align:right}.dashboard .chat ul li>div.file.image{height:170px;max-width:100%;padding:15px;transition:width .15s linear;width:220px}.dashboard .chat ul li>div.file.image p.attachment{height:120px}.dashboard .chat ul li>div.file{padding:15px}.dashboard .chat ul li>div.file p,.dashboard .chat ul li>div.file span{display:inline-block;margin:0;padding:0}.visible{opacity:1;transition:opacity .15s linear;visibility:visible}.hidden{opacity:0;transition:visibility 0s .1s,opacity .1s linear;visibility:hidden}.visible2{opacity:1;transition:opacity .35s linear;visibility:visible}.hidden2{opacity:0;transition:visibility 0s .3s,opacity .3s linear;visibility:hidden}.dashboard .chat{position:relative}.dashboard .chat .scroll-to-bottom{bottom:6px;min-height:40px;padding-right:12px;position:sticky;text-align:right}.dashboard .chat .scroll-to-bottom span{background:#495057;border:2px solid #fff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.34901960784313724);color:#fff;cursor:pointer;display:inline-block;font-size:20px;height:35px;line-height:35px;overflow:hidden;text-align:center;width:35px}.dashboard .chat .group-info{line-height:30px;margin:-10px;padding:5px 10px;top:0;z-index:99}.dashboard .chat .group-info,.dashboard .chat .pin{background:#fff;box-shadow:0 0 3px -1px rgba(0,0,0,.21176470588235294);position:sticky}.dashboard .chat .pin{margin-bottom:10px;margin-left:-10px;top:40px;width:calc(100% + 20px);z-index:98}.dashboard .chat ul li.message-from.pin>span,.dashboard .chat ul li.message-own.pin>span{background-color:transparent}.dashboard .chat ul li.message-from.pin>span{margin-left:0}.dashboard .chat .message-content i{color:#495057;cursor:pointer;font-size:11px}.dashboard .chat .pin .message-content i{display:block}.dashboard .chat li.message-from .message-content{padding-left:6px}.dashboard .chat li.message-from .message-content i{padding:5px}.dashboard .chat li.message-own .message-content i{padding:5px;position:absolute;right:-15px}.dashboard .chat .group-info .circleButton{float:right;margin-bottom:0;margin-top:0}.dashboard .chat ul{margin-top:20px;padding:0}.dashboard .chat .new-message .message-input input.ui-inputtext:focus{box-shadow:none;outline:none}.dashboard .chat ul.hasPin{margin-top:10px}.dashboard .chat .group-info a{color:#495057}.normalHtml,.normalHtml b,.normalHtml strong{font-weight:400}.normalHtml{display:inline-block}.avatar-viewer .profile-image{border:1px solid #fff;border-radius:50%;height:40px;margin-top:-6px;width:40px}a.button>i{margin-right:5px}.dashboard .timeline{padding-top:20px}.ui-inputgroup .ui-inputtext{padding-right:0}.new-message .ui-inputtext{width:100%}.full-screen,.full-screen>.p-dialog{height:100%!important;left:0!important;max-height:100%;min-height:unset!important;min-width:100%!important;top:0!important;width:100%!important}#image-view-list.image-gallery-2{background-color:rgba(0,0,0,.4);height:calc(100vh - 41px);margin:-14px auto 0;touch-action:none;width:100%}#image-view-list.image-gallery-2 .image-container{background-color:transparent;border:0;bottom:0;height:85%;margin:auto}#image-view-list.image-gallery-2 .image-container .iv-snap-view{bottom:20px;left:calc(50% - 75px);top:auto}#image-view-list.image-gallery-2 .image-container .iv-image-view img{touch-action:auto}#image-view-list .inline-icon{margin-top:-41px}#image-view-list .footer-info,#image-view-list .material-icons.next,#image-view-list .material-icons.prev{display:none}#image-view-list .options-image-viewer{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;margin-right:37px;user-select:none}.mobile-image-viewer-close{color:#fff;cursor:pointer;font-size:x-large;height:42px;line-height:42px;padding-right:7px;padding-top:2px;position:absolute;right:0;text-align:center;top:0;vertical-align:middle;width:37px}.mobile-image-viewer-close:hover{color:#feca37!important}.hide-holder{padding:0}.file-ex-name{word-break:break-all}.box-function{background:#fff;border-radius:0 0 5px 5px;border-top:1px solid #e8e8e8;bottom:0;left:0;padding:8px 30px;position:absolute;text-align:right;width:100%}.box-function button{margin-left:5px}.quick-note-button-holder{bottom:40px;display:none;height:50px;position:absolute;right:50px;width:50px;z-index:99}.quick-note-button{background:#ffc107;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:2em;height:50px;line-height:50px;outline:none;text-align:center;width:50px}.quick-note-button:hover{color:#fff}.all-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.all-note-button:hover{color:#fff}.setting-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.setting-note-button:hover{color:#fff}.pinned-notes-holder{bottom:20px;display:none;left:20px;position:absolute;width:250px;z-index:98}.pinned-notes{background:transparent;display:block;outline:none;padding:0}.pinned-notes-header{font-size:1rem;font-weight:700}.pinned-notes-setting{position:absolute;right:.5rem}.pinned-note{background-color:#fff1ac;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);font-size:.8rem;margin-bottom:10px;padding:0;position:relative}.pinned-note:last-child{margin-bottom:0}.pinned-notes-minimize-button{background:#ffc003;border:1px solid #fff;border-radius:50%;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);color:#fff;cursor:pointer;height:25px;padding-top:5px;position:absolute;right:-15px;text-align:center;top:-15px;width:25px;z-index:1}.pinned-note-header-line{border:1px solid #fff;box-shadow:1px 1px 2px rgba(0,0,0,.4);height:calc(100% - 1rem);left:3px;margin-bottom:.5rem;margin-top:.5rem;max-height:20px;position:absolute;width:13px}.pinned-note-header-right{cursor:pointer;float:right;margin-left:3px;width:32px}.pinned-note-header-time{font-size:.6rem}.pinned-note-header-button-unpin{display:none;float:left;height:14px;margin-right:2px;opacity:.8;width:14px}.pinned-note-header-button-complete{display:none;padding-top:2px}.pinned-note-body{float:right;padding:.5rem .5rem .5rem 25px;width:100%}.pinned-note-body:hover{background-color:#feeb82}.pinned-note-body:hover .pinned-note-header-time{display:none}.pinned-note-body:hover .pinned-note-header-button-complete,.pinned-note-body:hover .pinned-note-header-button-unpin{display:block}.pinned-note-line-title{color:#333;display:block;font-weight:700;padding-bottom:6px}.pinned-note-line{display:block}.view-port{border-radius:5px;box-shadow:0 0 0 9999px rgba(0,0,0,.5882352941176471);display:none;height:0;width:0;z-index:999}.view-port,.view-port-mask{background:transparent;position:absolute}.view-port-mask{display:block;height:100%;left:0;top:0;width:100%;z-index:9998}.tinymce-control{border:1px solid #ccc;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;width:100%}.input-tab-trap{filter:alpha(opacity=0)!important;opacity:0!important;overflow:hidden!important;width:0!important}.color-value input{font-size:.8em;line-height:16px}.dialog-material.mobile{width:100%!important}audio,audio:focus,video,video:focus{outline:none}.iv-image-view img.iv-image{-webkit-animation:fadein .5s;animation:fadein .5s;visibility:hidden!important}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.iv-image-view img.iv-image.show{visibility:visible!important}.row-line{padding-bottom:0;padding-top:0}.fc-ltr{padding-bottom:7px}.padding-bottom-5px{padding-bottom:5px}.no-margin{margin:0!important}.no-padding{padding:0}.no-padding-left{padding-left:0}.float-left{float:left}body .fc .fc-toolbar .fc-button{background-color:#007ad9;border:1px solid #007ad9;border-radius:3px;color:#fff;font-size:14px;transition:background-color .2s,box-shadow .2s}body .fc .fc-toolbar .fc-button:enabled:hover{background-color:#116fbf;border-color:#116fbf;color:#fff}body .fc .fc-toolbar .fc-button:focus{box-shadow:0 0 0 .2em #8dcdff;outline:0 none;outline-offset:0}body .fc .fc-toolbar .fc-button-group .fc-button{border-radius:0}body .fc .fc-toolbar .fc-button-group .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-button-group .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}body .fc .fc-toolbar .fc-right .fc-button{border-radius:0}body .fc .fc-toolbar .fc-right .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-right .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.fc-toolbar>*>:not(:first-child){margin-left:0}.fc-axis,.fc-dayGridMonth-button,.fc-timeGridDay-button,.fc-timeGridWeek-button,.old-content{line-height:0;text-indent:-9999px}.fc-axis:after,.fc-dayGridMonth-button:after,.fc-timeGridDay-button:after,.fc-timeGridWeek-button:after,.new-content{display:block;line-height:normal;text-indent:0}.fc-dayGridMonth-button:after{content:\"Th\u00E1ng\";padding:.2em}.fc-timeGridWeek-button:after{content:\"Tu\u1EA7n\";padding:.2em}.fc-timeGridDay-button:after{content:\"Ng\u00E0y\";padding:.2em}body .fc th{background-color:#f4f4f4;border:1px solid #c8c8c8;color:#333;padding:.571em 1em}.ui-fluid .button-group button,.ui-fluid .button-group p-button{margin-right:.5em!important;text-align:left;width:auto}.layout-wrapper .layout-menu-container{z-index:97}.base-status,.base-status-aborted,.base-status-approved,.base-status-completed,.base-status-create-new,.base-status-ended,.base-status-high,.base-status-immediately,.base-status-low,.base-status-medium,.base-status-on-conducting,.base-status-on-going,.base-status-pending,.base-status-rejected,.base-status-returned,.base-status-urgent{border-radius:.25em;color:#fff;font-size:.8em;padding:3px;text-align:center}.base-status-create-new{background-color:#f2f2f2;color:#666}.base-status-on-conducting,.base-status-on-going{background-color:#337ab7}.base-status-pending{background-color:#ffba01}.base-status-approved{background-color:#34a835}.base-status-returned{background-color:#ffba01}.base-status-rejected{background-color:#d9534f}.base-status-completed{background-color:#34a835}.base-status-aborted{background-color:#ffba01}.base-status-ended{background-color:#34a835}.base-status-low,.base-status-medium{background-color:#f2f2f2;color:#666}.base-status-high{background-color:#ffba01}.base-status-immediately,.base-status-urgent{background-color:#d9534f}.text-align-center{text-align:center}.font-weight-bold{font-weight:700}.landing-body .landing-menu li a:hover{border-bottom:none}.landing-body .landing-menu li:first-child{margin-left:8px}.crud-form .label-control p{margin:0;padding:0}.crud-form .tn-check-box-list .p-row{display:block;padding:.5em;width:100%}.crud-form dropdown,.crud-form tn-mask{width:100%}.crud-form .tn-dropdown{min-height:32px}.crud-form .tn-dropdown.free-text.horizontal{display:flex}.crud-form .tn-dropdown.free-text.horizontal>div{flex-grow:1;padding-left:.5em;padding-right:.5em}.crud-form .tn-dropdown.free-text.horizontal>div:first-child{padding-left:0}.crud-form .tn-dropdown.free-text.horizontal>div:last-child{padding-right:0}.crud-form .tn-dropdown.free-text.vertical input.ui-inputtext.input-free-text{margin-top:.5em}.crud-form.assessment .label-control{font-weight:700}.crud-form.assessment .label-control.haveIndex{display:block;margin-bottom:5px;padding-left:20px;position:relative}.crud-form.assessment .label-control.haveIndex:before{content:\" \" attr(label-index) \".\";left:0;position:absolute;top:0}.crud-form.assessment .ViewMode{border-bottom:none}.crud-form.assessment .ViewMode .label-control{margin-bottom:0}body .ui-inputtext.min-width{padding:6px}.ps__rail-x,.ps__rail-y{z-index:2}.zIndex5 .ps__rail-x,.zIndex5 .ps__rail-y{z-index:5}.table-sticky table{border-collapse:separate;border-spacing:0}.table-sticky tr td,.table-sticky tr th{border:1px solid #eee!important;border-left:none!important;border-top:none!important}.table-sticky tr td:first-child,.table-sticky tr th:first-child{border-left:1px solid #eee!important}.table-sticky tr td:last-child,.table-sticky tr th:last-child{border-right:none!important}.table-sticky tr:first-child th{border-top:1px solid #eee!important}.table-sticky th{background:#eee}.table-sticky tbody td.disabled{background:#eee!important}.table-sticky tbody td.disabled:not(:last-child){border-right:1px solid #fff!important}.table-sticky.fix-height tr:first-child th{position:sticky;top:0;z-index:2}.container-flex{align-items:center;display:flex}.container-flex>div:first-child{flex:0 0 auto;margin-right:.5em}.container-flex>div:last-child{flex-grow:1}.container-control{display:flex}.container-control>span.label{flex:0 0 auto;padding-right:.5em;padding-top:.5em}.container-control>span.label+*{flex-grow:1;flex-shrink:1;position:relative}.container-control>span.label+* .tn-dropdown,.container-control>span.label+* .ui-autocomplete-multiple,.container-control>span.label+* .ui-inputgroup .ui-inputtext{width:100%}.container-control>span.label+* .validation-container{margin-top:3px}.container-control>span.label+* .validation-container .validate-item{white-space:unset}.container-control>span.label+*>div{left:0;position:absolute;top:0;width:100%}.container-control.no-label>span.label{display:none}.container-control.inline{display:inline-flex}.align-flex-center{align-items:center;display:flex;justify-content:center}@media print{.isPrinting>*{display:none}.isPrinting app-print-layout{display:block}}.layout-wrapper .topbar .topbar-left,.layout-wrapper .topbar .topbar-right{background:#397ac3}#searchResultPanel-holder{padding:0 .5em}.cus-dropdown{line-height:normal;margin-right:1em}.tn-thumbnail{padding:.5rem}.tn-thumbnail.tn-thumbnail.tn-thumbnail{box-sizing:border-box}.fa-10:before{content:\"A+\";font-family:cursive;font-weight:700}.layout-wrapper .topbar .topbar-right #menu-button i{font-size:20px;margin-top:4px}.layout-wrapper .layout-menu li a i.menuitem-toggle-icon{font-size:15px;margin-left:auto}.flex-container-main-content{display:flex;flex-direction:column}.flex-container-main-content>div:last-child{background-color:#f4f4f4;display:flex;flex:1 1;overflow:hidden;position:relative}.flex-container-main-content>div:last-child>div{height:100%;left:0;overflow:hidden;padding-top:.5em;position:absolute;top:0;width:100%}.flex-container-main-content .block-with-button-search{display:flex;justify-content:flex-end}.flex-container-main-content .block-with-button-search>*{margin-left:.5em}.flex-container-main-content .block-with-button-search>input{height:26px;margin-left:0;max-width:200px;width:100%}.flex-container-main-content .block-with-button-search>dropdown{max-width:140px;width:100%}.flex-container-main-content .title-main-component{border-bottom:2px solid #1ca7ff}.clickable-table.clickable-table{cursor:pointer}.main-crud-container{height:calc(100vh - 76px)}.flex-container-fit-child{display:flex;flex-direction:column;height:100%;overflow:hidden}.flex-container-fit-child>div.fit-content{flex:1 1;position:relative}.flex-container-fit-child>div.fit-content>div{height:100%;overflow:auto;position:absolute;width:100%}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.waiting-box.show{display:block}.function-topbar>*{vertical-align:top}.function-topbar button{width:auto}.function-topbar p-fileUpload{margin-right:1em}.function-topbar .container-control{display:inline-flex;line-height:normal}.function-topbar .container-control dropdown{width:100%}:focus{outline-color:#a6d5fa!important}address{font-style:normal}body .p-toast .p-toast-message{border-radius:0;border-width:0 0 0 4px!important}.__status span,.status span{font-size:.8rem}p-table.single-check .p-datatable .p-datatable-tbody>tr{cursor:pointer}p-table.single-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important;outline:2px solid #a6d5fa}p-table.single-check .p-datatable .p-datatable-tbody>tr td.sticky .fix-sticky.top{display:none}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td{border-color:#fff}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td .fix-sticky{background-color:#fff}.tn-animated-left-arrow-icon,.tn-animated-right-arrow-icon{height:32px;position:relative;width:14px;z-index:10}.tn-animated-right-arrow-icon{-webkit-animation:arrowBounceToRight .8s ease-in-out infinite alternate;animation:arrowBounceToRight .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon{-webkit-animation:arrowBounceToLeft .8s ease-in-out infinite alternate;animation:arrowBounceToLeft .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon:after,.tn-animated-left-arrow-icon:before,.tn-animated-right-arrow-icon:after,.tn-animated-right-arrow-icon:before{background-color:#88b0dd;content:\"\";display:block;height:20px;position:absolute;width:5px}.tn-animated-right-arrow-icon:before{left:4px;top:0;transform:rotate(-35deg)}.tn-animated-right-arrow-icon:after{left:4px;top:14px;transform:rotate(35deg)}.tn-animated-left-arrow-icon:before{right:4px;top:0;transform:rotate(35deg)}.tn-animated-left-arrow-icon:after{right:4px;top:14px;transform:rotate(-35deg)}@-webkit-keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@-webkit-keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}@keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}.pass{color:#49c949}.not-pass,.pass{margin:5px;text-align:center}.not-pass{color:red}"]
49195
+ },] }
49196
+ ];
49197
+ ChatSendMessageBoxComponent.ctorParameters = function () { return [
49198
+ { type: i0.Injector },
49199
+ { type: ChatService },
49200
+ { type: CheckControlVisibleService },
49201
+ { type: FileExplorerNewService },
49202
+ { type: NotifierService }
49203
+ ]; };
49204
+ ChatSendMessageBoxComponent.propDecorators = {
49205
+ fileElement: [{ type: i0.ViewChild, args: ['fileElement', { static: false },] }],
49206
+ input: [{ type: i0.ViewChild, args: ['input', { static: true },] }],
49207
+ driveFileDialog: [{ type: i0.ViewChild, args: ['driveFileDialog', { static: false },] }]
49208
+ };
49209
+
49210
+ var UserPickerDialogComponent = /** @class */ (function (_super) {
49211
+ __extends(UserPickerDialogComponent, _super);
49212
+ function UserPickerDialogComponent(_userService, _injector) {
49213
+ var _this = _super.call(this, _injector) || this;
49214
+ _this._userService = _userService;
49215
+ _this.STORAGE_KEY_USER_PICKER_NAME = 'user_picker_storage_name';
49216
+ _this.STORAGE_KEY_USER_PICKER_ID_USER = 'user_picker_storage_id_user';
49217
+ _this.STORAGE_KEY_USER_PICKER_SEARCH_KEY = 'user_picker_storage_search_key';
49218
+ _this.STORAGE_KEY_USER_PICKER_NODE_SELECTED = 'user_picker_storage_node';
49219
+ _this.rootTreeNode = [
49220
+ {
49221
+ label: '',
49222
+ data: '-1',
49223
+ expandedIcon: 'pi pi-folder-open',
49224
+ collapsedIcon: 'pi pi-folder',
49225
+ children: []
49226
+ }
49227
+ ];
49228
+ _this.multiple = false;
49229
+ _this.enableCaching = true;
49230
+ _this.isFirstLoad = true;
49231
+ _this.rootFilter = {};
49232
+ return _this;
49233
+ }
49234
+ UserPickerDialogComponent.prototype.ngOnInit = function () {
49235
+ this.setting.baseService = this._userService;
49236
+ _super.prototype.ngOnInit.call(this);
49237
+ };
49238
+ return UserPickerDialogComponent;
49239
+ }(DataListBase));
49240
+ UserPickerDialogComponent.decorators = [
49241
+ { type: i0.Component, args: [{
49242
+ selector: 'app-user-picker-dialog',
49243
+ template: "<p>\r\n user-picker-dialog works!\r\n</p>\r\n",
49244
+ providers: [ComponentContextService],
49245
+ styles: [""]
49246
+ },] }
49247
+ ];
49248
+ UserPickerDialogComponent.ctorParameters = function () { return [
49249
+ { type: UserService },
49250
+ { type: i0.Injector }
49251
+ ]; };
49252
+ UserPickerDialogComponent.propDecorators = {
49253
+ dialog: [{ type: i0.ViewChild, args: ['dialog',] }],
49254
+ multiple: [{ type: i0.Input }],
49255
+ enableCaching: [{ type: i0.Input }],
49256
+ control: [{ type: i0.Input }]
49257
+ };
49258
+
47832
49259
  function coreDeclaration() {
47833
49260
  return [
47834
49261
  AddressComponent,
@@ -47971,7 +49398,10 @@
47971
49398
  AddNewsComponent,
47972
49399
  CommonDashboardComponent,
47973
49400
  NotFoundComponent,
47974
- UniversalLinkProcessorComponent
49401
+ UniversalLinkProcessorComponent,
49402
+ ChatBoxComponent,
49403
+ ChatSendMessageBoxComponent,
49404
+ UserPickerDialogComponent
47975
49405
  ];
47976
49406
  }
47977
49407
  function coreModuleImport() {
@@ -49215,65 +50645,6 @@
49215
50645
  { type: ModuleConfigService }
49216
50646
  ]; };
49217
50647
 
49218
- var CheckControlVisibleService = /** @class */ (function () {
49219
- function CheckControlVisibleService() {
49220
- }
49221
- CheckControlVisibleService.prototype.checkDisplayStatus = function (elem) {
49222
- var _this = this;
49223
- return new Promise(function (resolve, reject) {
49224
- _this.doCheck(resolve, elem);
49225
- });
49226
- };
49227
- CheckControlVisibleService.prototype.doCheck = function (resolve, elem) {
49228
- var _this = this;
49229
- var timeoutCheckDisplayStatus;
49230
- timeoutCheckDisplayStatus = setTimeout(function () {
49231
- _this.doCheck(resolve, elem);
49232
- }, 100);
49233
- var newStatus = this.isVisible(elem);
49234
- if (newStatus) {
49235
- setTimeout(function () {
49236
- // show control
49237
- resolve(true);
49238
- });
49239
- clearTimeout(timeoutCheckDisplayStatus);
49240
- }
49241
- };
49242
- CheckControlVisibleService.prototype.isVisible = function (elem) {
49243
- var style = getComputedStyle(elem);
49244
- if (style.display === 'none')
49245
- return false;
49246
- if (style.visibility !== 'visible')
49247
- return false;
49248
- if (+style.opacity < 0.1)
49249
- return false;
49250
- if (elem.offsetWidth + elem.offsetHeight + elem.getBoundingClientRect().height +
49251
- elem.getBoundingClientRect().width === 0) {
49252
- return false;
49253
- }
49254
- var elemCenter = {
49255
- x: elem.getBoundingClientRect().left + elem.offsetWidth / 2,
49256
- y: elem.getBoundingClientRect().top + elem.offsetHeight / 2
49257
- };
49258
- var pointContainer = document.elementFromPoint(elemCenter.x, elemCenter.y);
49259
- if (pointContainer) {
49260
- do {
49261
- if (pointContainer === elem)
49262
- return true;
49263
- } while (pointContainer = pointContainer.parentNode);
49264
- }
49265
- return false;
49266
- };
49267
- return CheckControlVisibleService;
49268
- }());
49269
- CheckControlVisibleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CheckControlVisibleService_Factory() { return new CheckControlVisibleService(); }, token: CheckControlVisibleService, providedIn: "root" });
49270
- CheckControlVisibleService.decorators = [
49271
- { type: i0.Injectable, args: [{
49272
- providedIn: 'root'
49273
- },] }
49274
- ];
49275
- CheckControlVisibleService.ctorParameters = function () { return []; };
49276
-
49277
50648
  var ImageService = /** @class */ (function () {
49278
50649
  function ImageService(_moduleConfigService) {
49279
50650
  this._moduleConfigService = _moduleConfigService;
@@ -49949,6 +51320,8 @@
49949
51320
  exports.CanBoHoSoService = CanBoHoSoService;
49950
51321
  exports.CauHinhWorkflowService = CauHinhWorkflowService;
49951
51322
  exports.CellExcel = CellExcel;
51323
+ exports.ChatBoxComponent = ChatBoxComponent;
51324
+ exports.ChatSendMessageBoxComponent = ChatSendMessageBoxComponent;
49952
51325
  exports.CheckBoxListControlSchema = CheckBoxListControlSchema;
49953
51326
  exports.CheckControlVisibleService = CheckControlVisibleService;
49954
51327
  exports.CheckDuplicateFieldsValidator = CheckDuplicateFieldsValidator;
@@ -50218,6 +51591,7 @@
50218
51591
  exports.UserFormatPipe = UserFormatPipe;
50219
51592
  exports.UserGroupService = UserGroupService;
50220
51593
  exports.UserPickerControlSchema = UserPickerControlSchema;
51594
+ exports.UserPickerDialogComponent = UserPickerDialogComponent;
50221
51595
  exports.UserService = UserService;
50222
51596
  exports.UserV5Service = UserV5Service;
50223
51597
  exports.UsersFormatPipe = UsersFormatPipe;
@@ -50380,10 +51754,14 @@
50380
51754
  exports.ɵec = NewsCategoryService;
50381
51755
  exports.ɵed = NotFoundComponent;
50382
51756
  exports.ɵee = UniversalLinkProcessorComponent;
50383
- exports.ɵef = CheckReadyComponent;
50384
- exports.ɵeg = SendAccessTokenInterceptor;
50385
- exports.ɵeh = LogInterceptor;
50386
- exports.ɵei = PermissionUtilsInterceptor;
51757
+ exports.ɵef = ChatService;
51758
+ exports.ɵeg = ContentsService;
51759
+ exports.ɵeh = StatusExtendsService;
51760
+ exports.ɵei = MessageBoardService;
51761
+ exports.ɵej = CheckReadyComponent;
51762
+ exports.ɵek = SendAccessTokenInterceptor;
51763
+ exports.ɵel = LogInterceptor;
51764
+ exports.ɵem = PermissionUtilsInterceptor;
50387
51765
  exports.ɵf = AfterViewCheckedComponent;
50388
51766
  exports.ɵg = AdvanceSearchComponent;
50389
51767
  exports.ɵh = AppRootMenuComponent;