tnx-shared 5.3.187 → 5.3.189

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 (35) hide show
  1. package/bundles/tnx-shared.umd.js +148 -91
  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/classes/base/list-base.d.ts +3 -0
  6. package/classes/base/list-base.d.ts.map +1 -1
  7. package/classes/base/list-component-base.d.ts +1 -1
  8. package/classes/base/list-component-base.d.ts.map +1 -1
  9. package/classes/form-schema.d.ts +1 -0
  10. package/classes/form-schema.d.ts.map +1 -1
  11. package/components/common-search-form/common-search-form.component.d.ts +1 -0
  12. package/components/common-search-form/common-search-form.component.d.ts.map +1 -1
  13. package/components/dropdown/dropdown.component.d.ts.map +1 -1
  14. package/esm2015/classes/base/list-base.js +35 -3
  15. package/esm2015/classes/base/list-component-base.js +9 -6
  16. package/esm2015/classes/base/validators.js +2 -2
  17. package/esm2015/classes/form-schema.js +2 -1
  18. package/esm2015/components/access-denied-component/access-denied.component.js +1 -1
  19. package/esm2015/components/common-search-form/common-search-form.component.js +31 -28
  20. package/esm2015/components/dropdown/dropdown.component.js +4 -9
  21. package/esm2015/components/equation-editor/equation-editor.component.js +1 -1
  22. package/esm2015/components/settings/settings-authorize-button/settings-authorize-button.component.js +2 -2
  23. package/esm2015/components/splash-component/splash-component.component.js +1 -1
  24. package/esm2015/directives/authorize.directive.js +4 -4
  25. package/esm2015/services/announcementreads.service.js +2 -1
  26. package/esm2015/services/common.service.js +15 -1
  27. package/esm2015/services/logger.service.js +4 -19
  28. package/fesm2015/tnx-shared.js +100 -66
  29. package/fesm2015/tnx-shared.js.map +1 -1
  30. package/package.json +2 -2
  31. package/services/announcementreads.service.d.ts.map +1 -1
  32. package/services/common.service.d.ts +1 -0
  33. package/services/common.service.d.ts.map +1 -1
  34. package/services/logger.service.d.ts.map +1 -1
  35. package/tnx-shared.metadata.json +1 -1
@@ -1128,6 +1128,7 @@
1128
1128
  this.showHistory = false;
1129
1129
  this.colorFilterField = '';
1130
1130
  this.colorFilterTable = [];
1131
+ this.buttonsPermissionCustom = [];
1131
1132
  this.entityMetadataSetting = new CrudFormSetting();
1132
1133
  this.fieldSearchText = [];
1133
1134
  this.function = new CrudListCustomFunction();
@@ -4133,6 +4134,20 @@
4133
4134
  CommonService.prototype.getCurrentMonth = function () {
4134
4135
  return new Date().getMonth();
4135
4136
  };
4137
+ CommonService.prototype.getRangeYearBetween = function (previousYear, nextYear) {
4138
+ var dataSourceYear = [];
4139
+ if (nextYear >= previousYear) {
4140
+ var tmp = __spreadArray([], __read(Array(nextYear - previousYear + 1).keys())).map(function (x) {
4141
+ var year = x + previousYear;
4142
+ return {
4143
+ id: year,
4144
+ ten: year
4145
+ };
4146
+ });
4147
+ dataSourceYear = tmp;
4148
+ }
4149
+ return dataSourceYear.reverse();
4150
+ };
4136
4151
  CommonService.prototype.getDynamicFormId = function (service, entity, action) {
4137
4152
  return (service + "_" + entity + "_" + action).toUpperCase();
4138
4153
  };
@@ -5784,28 +5799,13 @@
5784
5799
  this.flushGroupWarning(category);
5785
5800
  };
5786
5801
  LoggerService.prototype.flushGroupInfo = function (category) {
5787
- if (this.logGroups.info[category]) {
5788
- this.logGroups.info[category] = [];
5789
- }
5790
- else {
5791
- this.logGroups.info[category] = [];
5792
- }
5802
+ this.logGroups.info[category] = [];
5793
5803
  };
5794
5804
  LoggerService.prototype.flushGroupError = function (category) {
5795
- if (this.logGroups.error[category]) {
5796
- this.logGroups.error[category] = [];
5797
- }
5798
- else {
5799
- this.logGroups.error[category] = [];
5800
- }
5805
+ this.logGroups.error[category] = [];
5801
5806
  };
5802
5807
  LoggerService.prototype.flushGroupWarning = function (category) {
5803
- if (this.logGroups.warning[category]) {
5804
- this.logGroups.warning[category] = [];
5805
- }
5806
- else {
5807
- this.logGroups.warning[category] = [];
5808
- }
5808
+ this.logGroups.warning[category] = [];
5809
5809
  };
5810
5810
  return LoggerService;
5811
5811
  }());
@@ -13697,7 +13697,7 @@
13697
13697
  var value = event.value;
13698
13698
  if (value == null || value === '')
13699
13699
  return true;
13700
- var re = /^[ ]|[+(]*[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$/g;
13700
+ var re = /^([ ]|[+(]*[0-9]{1,4}[)]{0,1}[-\s\./0-9]*)$/g;
13701
13701
  return re.test(String(value).toLowerCase());
13702
13702
  };
13703
13703
  PhoneNumberValidator.prototype.getError = function () {
@@ -25232,7 +25232,7 @@
25232
25232
  if (!buttonText || lstBtnAction.some(function (p) { return p.rawText === buttonText; })) {
25233
25233
  return "continue";
25234
25234
  }
25235
- this_5.addButtonAction(lstBtnAction, this_5.authorizeButtonKey, buttonText);
25235
+ this_5.addButtonAction(lstBtnAction, buttonText);
25236
25236
  };
25237
25237
  this_5 = this;
25238
25238
  try {
@@ -25252,7 +25252,10 @@
25252
25252
  case 1:
25253
25253
  lstMenuButtons = (_e = _h.sent()) !== null && _e !== void 0 ? _e : [];
25254
25254
  if (lstMenuButtons.length) {
25255
- lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstBtnAction, _this.authorizeButtonKey, item.label); });
25255
+ lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstBtnAction, item.label); });
25256
+ }
25257
+ if (this.setting.buttonsPermissionCustom.length) {
25258
+ lstBtnAction.push.apply(lstBtnAction, __spreadArray([], __read(this.setting.buttonsPermissionCustom)));
25256
25259
  }
25257
25260
  buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
25258
25261
  ((_f = buttonSetting[this.authorizeButtonKey]) === null || _f === void 0 ? void 0 : _f.length) && buttonSetting[this.authorizeButtonKey].forEach(function (item) {
@@ -25285,13 +25288,13 @@
25285
25288
  ListComponentBase.prototype.setBtnReady = function (isReady) {
25286
25289
  this.isBtnReady = isReady;
25287
25290
  };
25288
- ListComponentBase.prototype.addButtonAction = function (lstBtnAction, key, rawText, id) {
25291
+ ListComponentBase.prototype.addButtonAction = function (lstBtnAction, rawText, id) {
25289
25292
  id !== null && id !== void 0 ? id : (id = this._commonService.guid());
25290
25293
  var permissionCode = this._commonService.convertStringToUnSign(rawText).replace(/ /g, '_').toUpperCase();
25291
25294
  lstBtnAction.push(new ButtonAction({
25292
25295
  id: id,
25293
25296
  rawText: rawText,
25294
- permissionCode: "[" + key + "]_[" + permissionCode + "]"
25297
+ permissionCode: "[" + this.authorizeButtonKey + "]_[" + permissionCode + "]"
25295
25298
  }));
25296
25299
  };
25297
25300
  ListComponentBase.prototype.setAuthorizeButton = function (lstButtonTemplate) {
@@ -25326,7 +25329,7 @@
25326
25329
  this.isBtnReady = true;
25327
25330
  return [2 /*return*/];
25328
25331
  }
25329
- lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstMenuButton, _this.authorizeButtonKey, item.label); });
25332
+ lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstMenuButton, item.label); });
25330
25333
  buttonSetting[this.authorizeButtonKey].forEach(function (item) {
25331
25334
  var itemBtnMenu = lstMenuButton.find(function (p) { return p.permissionCode == item.code; });
25332
25335
  if (itemBtnMenu) {
@@ -25965,6 +25968,7 @@
25965
25968
  _this._workflowPermissionDetailService = _this._injector.get(WorkflowPermissionDetailService);
25966
25969
  _this._stateMachinesService = _this._injector.get(StateMachinesService);
25967
25970
  _this._congViecServiceInBase = _this._injector.get(CongViecService);
25971
+ _this._permissionService = _this._injector.get(PermissionService);
25968
25972
  _this._loggerService = _this._injector.get(LoggerService);
25969
25973
  _this.setting.key = _this._commonService.guid();
25970
25974
  return _this;
@@ -26419,11 +26423,65 @@
26419
26423
  });
26420
26424
  });
26421
26425
  };
26426
+ ListBase.prototype.getMenuButtonCustomAuthorized = function (menuButtons) {
26427
+ return __awaiter(this, void 0, void 0, function () {
26428
+ var buttonSetting, authorizeButtonKey, serviceCode, lstButtonAuthorize, promises, authorizedButtons, _loop_1, this_1, menuButtons_1, menuButtons_1_1, item;
26429
+ var e_2, _a;
26430
+ return __generator(this, function (_b) {
26431
+ switch (_b.label) {
26432
+ case 0:
26433
+ buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
26434
+ authorizeButtonKey = window.location.pathname.substring(1).toUpperCase().replace(/\//g, '_');
26435
+ serviceCode = this.setting.baseService.serviceCode.toUpperCase();
26436
+ if (i0.isDevMode()) {
26437
+ authorizeButtonKey = serviceCode + "_" + window.location.pathname.substring(1).toUpperCase();
26438
+ }
26439
+ lstButtonAuthorize = buttonSetting[authorizeButtonKey];
26440
+ if (!(lstButtonAuthorize === null || lstButtonAuthorize === void 0 ? void 0 : lstButtonAuthorize.length)) {
26441
+ return [2 /*return*/, menuButtons];
26442
+ }
26443
+ promises = [];
26444
+ authorizedButtons = [];
26445
+ _loop_1 = function (item) {
26446
+ var permission = lstButtonAuthorize.find(function (p) { return p.code == item.authorizationPermission; });
26447
+ if (!item.authorizationPermission || !permission) {
26448
+ authorizedButtons.push(item);
26449
+ return "continue";
26450
+ }
26451
+ promises.push(this_1._permissionService.isAuthorized(item.authorizationServiceCode || serviceCode, permission ? permission.code : item.authorizationPermission, true).then(function (authorized) {
26452
+ if (authorized !== true) {
26453
+ return;
26454
+ }
26455
+ authorizedButtons.push(item);
26456
+ }));
26457
+ };
26458
+ this_1 = this;
26459
+ try {
26460
+ for (menuButtons_1 = __values(menuButtons), menuButtons_1_1 = menuButtons_1.next(); !menuButtons_1_1.done; menuButtons_1_1 = menuButtons_1.next()) {
26461
+ item = menuButtons_1_1.value;
26462
+ _loop_1(item);
26463
+ }
26464
+ }
26465
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
26466
+ finally {
26467
+ try {
26468
+ if (menuButtons_1_1 && !menuButtons_1_1.done && (_a = menuButtons_1.return)) _a.call(menuButtons_1);
26469
+ }
26470
+ finally { if (e_2) throw e_2.error; }
26471
+ }
26472
+ return [4 /*yield*/, Promise.all(promises)];
26473
+ case 1:
26474
+ _b.sent();
26475
+ return [2 /*return*/, authorizedButtons];
26476
+ }
26477
+ });
26478
+ });
26479
+ };
26422
26480
  ListBase.prototype.beforeRenderDataSource = function (datasource) {
26423
26481
  return datasource;
26424
26482
  };
26425
26483
  ListBase.prototype.mergeRefFields = function (dataSource) {
26426
- var e_2, _a, e_3, _b;
26484
+ var e_3, _a, e_4, _b;
26427
26485
  var schemas = this.setting.cols.filter(function (p) { return p.isForeignField && !!p.displayFieldInGrid && !p.field.startsWith('str'); });
26428
26486
  if (!schemas.length)
26429
26487
  return;
@@ -26431,35 +26489,35 @@
26431
26489
  for (var dataSource_1 = __values(dataSource), dataSource_1_1 = dataSource_1.next(); !dataSource_1_1.done; dataSource_1_1 = dataSource_1.next()) {
26432
26490
  var rowData = dataSource_1_1.value;
26433
26491
  try {
26434
- for (var schemas_1 = (e_3 = void 0, __values(schemas)), schemas_1_1 = schemas_1.next(); !schemas_1_1.done; schemas_1_1 = schemas_1.next()) {
26492
+ for (var schemas_1 = (e_4 = void 0, __values(schemas)), schemas_1_1 = schemas_1.next(); !schemas_1_1.done; schemas_1_1 = schemas_1.next()) {
26435
26493
  var schema = schemas_1_1.value;
26436
26494
  rowData['str' + schema.field] = rowData[schema.displayFieldInGrid];
26437
26495
  }
26438
26496
  }
26439
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
26497
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
26440
26498
  finally {
26441
26499
  try {
26442
26500
  if (schemas_1_1 && !schemas_1_1.done && (_b = schemas_1.return)) _b.call(schemas_1);
26443
26501
  }
26444
- finally { if (e_3) throw e_3.error; }
26502
+ finally { if (e_4) throw e_4.error; }
26445
26503
  }
26446
26504
  }
26447
26505
  }
26448
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
26506
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
26449
26507
  finally {
26450
26508
  try {
26451
26509
  if (dataSource_1_1 && !dataSource_1_1.done && (_a = dataSource_1.return)) _a.call(dataSource_1);
26452
26510
  }
26453
- finally { if (e_2) throw e_2.error; }
26511
+ finally { if (e_3) throw e_3.error; }
26454
26512
  }
26455
26513
  };
26456
26514
  ListBase.prototype.calculateRowSpan = function (dataSource, fields, funcNext) {
26457
- var e_4, _a;
26515
+ var e_5, _a;
26458
26516
  for (var i = 0; i < dataSource.length - 1; i++) {
26459
26517
  if (funcNext && funcNext(dataSource[i]) != funcNext(dataSource[i + 1]))
26460
26518
  continue;
26461
26519
  try {
26462
- for (var fields_1 = (e_4 = void 0, __values(fields)), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
26520
+ for (var fields_1 = (e_5 = void 0, __values(fields)), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
26463
26521
  var element = fields_1_1.value;
26464
26522
  var field = element.field;
26465
26523
  var fieldRootIndex = "rootIndex_" + field;
@@ -26488,12 +26546,12 @@
26488
26546
  }
26489
26547
  }
26490
26548
  }
26491
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
26549
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
26492
26550
  finally {
26493
26551
  try {
26494
26552
  if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);
26495
26553
  }
26496
- finally { if (e_4) throw e_4.error; }
26554
+ finally { if (e_5) throw e_5.error; }
26497
26555
  }
26498
26556
  }
26499
26557
  };
@@ -26518,32 +26576,32 @@
26518
26576
  * @param refFields
26519
26577
  */
26520
26578
  ListBase.prototype.addRefFields = function (refFields) {
26521
- var e_5, _a;
26579
+ var e_6, _a;
26522
26580
  if (this.setting.fieldNeedGetRef == null || this.setting.fieldNeedGetRef.length === 0) {
26523
26581
  this.setting.fieldNeedGetRef = __spreadArray([], __read(refFields));
26524
26582
  return;
26525
26583
  }
26526
- var _loop_1 = function (refField) {
26527
- var oldRefIndex = this_1.setting.fieldNeedGetRef.findIndex(function (x) { return x.field == refField.field; });
26584
+ var _loop_2 = function (refField) {
26585
+ var oldRefIndex = this_2.setting.fieldNeedGetRef.findIndex(function (x) { return x.field == refField.field; });
26528
26586
  if (oldRefIndex === -1) {
26529
- this_1.setting.fieldNeedGetRef.push(refField);
26587
+ this_2.setting.fieldNeedGetRef.push(refField);
26530
26588
  return "continue";
26531
26589
  }
26532
- this_1.setting.fieldNeedGetRef[oldRefIndex] = refField;
26590
+ this_2.setting.fieldNeedGetRef[oldRefIndex] = refField;
26533
26591
  };
26534
- var this_1 = this;
26592
+ var this_2 = this;
26535
26593
  try {
26536
26594
  for (var refFields_1 = __values(refFields), refFields_1_1 = refFields_1.next(); !refFields_1_1.done; refFields_1_1 = refFields_1.next()) {
26537
26595
  var refField = refFields_1_1.value;
26538
- _loop_1(refField);
26596
+ _loop_2(refField);
26539
26597
  }
26540
26598
  }
26541
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
26599
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
26542
26600
  finally {
26543
26601
  try {
26544
26602
  if (refFields_1_1 && !refFields_1_1.done && (_a = refFields_1.return)) _a.call(refFields_1);
26545
26603
  }
26546
- finally { if (e_5) throw e_5.error; }
26604
+ finally { if (e_6) throw e_6.error; }
26547
26605
  }
26548
26606
  };
26549
26607
  ListBase.prototype.groupInClient = function (dataSource) {
@@ -26939,8 +26997,8 @@
26939
26997
  };
26940
26998
  ListBase.prototype._copyLinkMultiple = function () {
26941
26999
  return __awaiter(this, void 0, void 0, function () {
26942
- var paths, _a, _b, item, _c, _d, e_6_1;
26943
- var e_6, _e;
27000
+ var paths, _a, _b, item, _c, _d, e_7_1;
27001
+ var e_7, _e;
26944
27002
  return __generator(this, function (_f) {
26945
27003
  switch (_f.label) {
26946
27004
  case 0:
@@ -26963,14 +27021,14 @@
26963
27021
  return [3 /*break*/, 2];
26964
27022
  case 5: return [3 /*break*/, 8];
26965
27023
  case 6:
26966
- e_6_1 = _f.sent();
26967
- e_6 = { error: e_6_1 };
27024
+ e_7_1 = _f.sent();
27025
+ e_7 = { error: e_7_1 };
26968
27026
  return [3 /*break*/, 8];
26969
27027
  case 7:
26970
27028
  try {
26971
27029
  if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
26972
27030
  }
26973
- finally { if (e_6) throw e_6.error; }
27031
+ finally { if (e_7) throw e_7.error; }
26974
27032
  return [7 /*endfinally*/];
26975
27033
  case 8:
26976
27034
  this._commonService.copyByStorage(paths.join('\r\n'));
@@ -27567,7 +27625,7 @@
27567
27625
  selector: 'common-splash-component',
27568
27626
  template: "<ng-template viewContainerRef></ng-template>\n",
27569
27627
  providers: [ComponentContextService],
27570
- styles: [".modules{background-color:#fff;font-family:monospace;background:url(/assets/images/splash-bg.png);background-repeat:no-repeat;background-position:50%;background-size:cover;position:fixed;top:0;left:0;z-index:100;display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;flex-direction:column}.modules div>span{min-width:100px;height:100px;width:100px;margin:10px;box-shadow:1px 2px 9px 1px #bbb;white-space:normal}.modules div>span,.modules div>span>a{display:inline-block;border-radius:5px}.modules div>span>a{height:100%;width:100%;color:#fff;text-decoration:unset;text-align:center;position:relative;font-weight:700;text-shadow:2px 3px 3px hsla(0,0%,42.7%,.4392156862745098);cursor:pointer}.modules div>span>a i{animation:in 1s}.modules div>span>a:hover i{animation:out 1s}@media (max-width:1370px){.modules{justify-content:flex-start;overflow:auto}.module-icons.module-icons{margin-bottom:20px}.welcome-user.welcome-user{margin-top:30px;margin-bottom:30px}.welcome-user.welcome-user img{width:100px;height:100px}.clock{margin:0 20px;font-size:1.5em}.data-time{margin:10px 0 20px;font-size:1em}}.modules div>span>a>span{display:inline-block;color:#fff;text-decoration:unset;text-align:center;position:absolute;bottom:10px;width:100%;left:0}.modules div>span.implementing{background-color:#fff;box-shadow:none}.modules div>span>a>i{font-size:3em;position:absolute;top:10px;width:100%;left:0}.div22{width:240px}.div33{width:360px}.div44{width:480px}.div55{width:600px}.div88{width:960px}::ng-deep .flexcolumn{max-width:calc(100vh - 20px)}.div1111-wrapper{width:100%;overflow:auto}.div1111{white-space:nowrap}.module-icons{color:#666;width:100%}.module-icons,.welcome-user{margin-bottom:80px;text-align:center}.welcome-user a{background:#c2f3c3;padding:6px;border-radius:3px;cursor:pointer}.welcome-user a i{margin-right:6px}.welcome-user img{border-radius:50%;border:2px dashed rgba(0,144,162,.5019607843137255);height:200px;width:200px;-o-object-fit:contain;object-fit:contain}.welcome-user h2{color:#0090a2}.clock-wrapper{color:rgba(0,144,162,.6666666666666666);font-size:2em;text-align:center}.loader{color:#607d8b;font-size:8px;width:1em;height:1em;border-radius:50%;position:absolute;text-indent:-9999em;animation:load4 1.3s linear infinite;transform:translate(-50%,-50%);top:50%;left:50%}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
27628
+ styles: [".modules{font-family:monospace;background:url(/assets/images/splash-bg.png);background-repeat:no-repeat;background-position:50%;background-size:cover;position:fixed;top:0;left:0;z-index:100;display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;flex-direction:column;background-color:#fff}.modules div>span{min-width:100px;height:100px;width:100px;margin:10px;box-shadow:1px 2px 9px 1px #bbb;white-space:normal}.modules div>span,.modules div>span>a{display:inline-block;border-radius:5px}.modules div>span>a{height:100%;width:100%;color:#fff;text-decoration:unset;text-align:center;position:relative;font-weight:700;text-shadow:2px 3px 3px hsla(0,0%,42.7%,.4392156862745098);cursor:pointer}.modules div>span>a i{animation:in 1s}.modules div>span>a:hover i{animation:out 1s}@media (max-width:1370px){.modules{justify-content:flex-start;overflow:auto}.module-icons.module-icons{margin-bottom:20px}.welcome-user.welcome-user{margin-top:30px;margin-bottom:30px}.welcome-user.welcome-user img{width:100px;height:100px}.clock{margin:0 20px;font-size:1.5em}.data-time{margin:10px 0 20px;font-size:1em}}.modules div>span>a>span{display:inline-block;color:#fff;text-decoration:unset;text-align:center;position:absolute;bottom:10px;width:100%;left:0}.modules div>span.implementing{box-shadow:none;background-color:#fff}.modules div>span>a>i{font-size:3em;position:absolute;top:10px;width:100%;left:0}.div22{width:240px}.div33{width:360px}.div44{width:480px}.div55{width:600px}.div88{width:960px}::ng-deep .flexcolumn{max-width:calc(100vh - 20px)}.div1111-wrapper{width:100%;overflow:auto}.div1111{white-space:nowrap}.module-icons{color:#666;width:100%}.module-icons,.welcome-user{margin-bottom:80px;text-align:center}.welcome-user a{background:#c2f3c3;padding:6px;border-radius:3px;cursor:pointer}.welcome-user a i{margin-right:6px}.welcome-user img{border-radius:50%;border:2px dashed rgba(0,144,162,.5019607843137255);height:200px;width:200px;-o-object-fit:contain;object-fit:contain}.welcome-user h2{color:#0090a2}.clock-wrapper{color:rgba(0,144,162,.6666666666666666);font-size:2em;text-align:center}.loader{color:#607d8b;font-size:8px;width:1em;height:1em;border-radius:50%;position:absolute;text-indent:-9999em;animation:load4 1.3s linear infinite;transform:translate(-50%,-50%);top:50%;left:50%}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
27571
27629
  },] }
27572
27630
  ];
27573
27631
  SplashComponentComponent.ctorParameters = function () { return [
@@ -28283,7 +28341,7 @@
28283
28341
  selector: 'common-access-denied',
28284
28342
  template: "<ng-template viewContainerRef></ng-template>\n",
28285
28343
  providers: [ComponentContextService],
28286
- styles: [".modules{background-color:#fff;font-family:monospace;background:url(/assets/images/splash-bg.png);background-repeat:no-repeat;background-position:50%;background-size:cover;position:fixed;top:0;left:0;z-index:100;display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;flex-direction:column}.welcome-user{text-align:center;margin-bottom:80px}.welcome-user a{background:#c2f3c3;padding:6px;border-radius:3px;cursor:pointer}.welcome-user a i{margin-right:6px}.welcome-user img{border-radius:50%;border:2px dashed rgba(0,144,162,.5019607843137255);height:250px;width:250px;-o-object-fit:contain;object-fit:contain}.welcome-user h2{color:#0090a2}.welcome-user h1{color:#666;max-width:75vw;font-size:2rem}"]
28344
+ styles: [".modules{font-family:monospace;background:url(/assets/images/splash-bg.png);background-repeat:no-repeat;background-position:50%;background-size:cover;position:fixed;top:0;left:0;z-index:100;display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;flex-direction:column;background-color:#fff}.welcome-user{text-align:center;margin-bottom:80px}.welcome-user a{background:#c2f3c3;padding:6px;border-radius:3px;cursor:pointer}.welcome-user a i{margin-right:6px}.welcome-user img{border-radius:50%;border:2px dashed rgba(0,144,162,.5019607843137255);height:250px;width:250px;-o-object-fit:contain;object-fit:contain}.welcome-user h2{color:#0090a2}.welcome-user h1{color:#666;max-width:75vw;font-size:2rem}"]
28287
28345
  },] }
28288
28346
  ];
28289
28347
  AccessDeniedComponent.ctorParameters = function () { return [
@@ -31656,7 +31714,6 @@
31656
31714
  return _this;
31657
31715
  }
31658
31716
  CommonSearchFormComponent.prototype.ngOnInit = function () {
31659
- var _this = this;
31660
31717
  this.mdWidth = this.parentSetting.mdWidthCommonSearch;
31661
31718
  this.setting.baseService = this.parentSetting.baseService;
31662
31719
  this.isCustomGenerateSearch = this.parentSetting.commonSchemas.length > 0;
@@ -31675,34 +31732,8 @@
31675
31732
  this.searchBoxTooltip += "" + (lstTextSearchControl.map(function (x) { return x.label; })).join(', ');
31676
31733
  this._index = 2;
31677
31734
  }
31678
- var totalControlPerRow = 12 / this.mdWidth;
31679
31735
  if (this.isCustomGenerateSearch) {
31680
- this.parentSetting.commonSchemas.forEach(function (column) {
31681
- column.showLabel = false;
31682
- column.mdWidth = _this.mdWidth;
31683
- column['placeholder'] = column.label;
31684
- if (!(column instanceof TextControlSchema) || column instanceof NumberRangeControlSchema || column instanceof DropdownControlSchema) {
31685
- column.onAfterChanged = function (evt) {
31686
- _this.handleSearch(null, evt.control.field);
31687
- };
31688
- }
31689
- if (column instanceof NumberRangeControlSchema) {
31690
- _this.lstNumberRangeControl.push(column.field);
31691
- }
31692
- if (column.hasOwnProperty('defaultValue') && (column instanceof DropdownControlSchema || column instanceof DateTimeControlSchema)) {
31693
- _this.defaultValues[column.field] = column.defaultValue;
31694
- }
31695
- if (column.addToGridInfo) {
31696
- _this.lstControlAddToGridInfo.push(column.field);
31697
- }
31698
- column.isLazyLoad = !_this.parentSetting.disableLazyLoadCommonSearch && _this._index > totalControlPerRow
31699
- && column instanceof DropdownControlSchema && !!column.baseService && !(column.baseService instanceof MasterDataService);
31700
- if (column.isLazyLoad) {
31701
- _this.lstControlLazyLoad.push(column.field);
31702
- }
31703
- _this._index++;
31704
- });
31705
- this.setting.schema = this.addSearchBox(this.parentSetting.commonSchemas.sort(function (prev, next) { return prev.order - next.order; }));
31736
+ this.getFormSchemaCustom();
31706
31737
  }
31707
31738
  else {
31708
31739
  this.setting.schema = this.genFormSchema(columnFilters);
@@ -31713,6 +31744,36 @@
31713
31744
  this.handleSearch();
31714
31745
  }
31715
31746
  };
31747
+ CommonSearchFormComponent.prototype.getFormSchemaCustom = function () {
31748
+ var _this = this;
31749
+ var totalControlPerRow = 12 / this.mdWidth;
31750
+ this.parentSetting.commonSchemas.forEach(function (column) {
31751
+ column.showLabel = false;
31752
+ column.mdWidth = _this.mdWidth;
31753
+ column['placeholder'] = column.label;
31754
+ if (!(column instanceof TextControlSchema) || column instanceof NumberRangeControlSchema || column instanceof DropdownControlSchema) {
31755
+ column.onAfterChanged = function (evt) {
31756
+ _this.handleSearch(null, evt.control.field);
31757
+ };
31758
+ }
31759
+ if (column instanceof NumberRangeControlSchema) {
31760
+ _this.lstNumberRangeControl.push(column.field);
31761
+ }
31762
+ if (column.hasOwnProperty('defaultValue') && (column instanceof DropdownControlSchema || column instanceof DateTimeControlSchema)) {
31763
+ _this.defaultValues[column.field] = column.defaultValue;
31764
+ }
31765
+ if (column.addToGridInfo) {
31766
+ _this.lstControlAddToGridInfo.push(column.field);
31767
+ }
31768
+ column.isLazyLoad = !_this.parentSetting.disableLazyLoadCommonSearch && _this._index > totalControlPerRow
31769
+ && column instanceof DropdownControlSchema && !!column.baseService && !(column.baseService instanceof MasterDataService);
31770
+ if (column.isLazyLoad) {
31771
+ _this.lstControlLazyLoad.push(column.field);
31772
+ }
31773
+ _this._index++;
31774
+ });
31775
+ this.setting.schema = this.addSearchBox(this.parentSetting.commonSchemas.sort(function (prev, next) { return prev.order - next.order; }));
31776
+ };
31716
31777
  CommonSearchFormComponent.prototype.genFormSchema = function (columns) {
31717
31778
  var _this = this;
31718
31779
  var result = [];
@@ -32056,7 +32117,7 @@
32056
32117
  _this.handleScroll = function (evt) {
32057
32118
  if (evt.srcElement.scrollTop > 0
32058
32119
  && !_this.firstScroll
32059
- && evt.srcElement.offsetHeight + evt.srcElement.scrollTop == evt.srcElement.scrollHeight) {
32120
+ && evt.srcElement.offsetHeight + evt.srcElement.scrollTop >= evt.srcElement.scrollHeight - 1) {
32060
32121
  _this.firstScroll = true;
32061
32122
  if (_this.timeoutScroll)
32062
32123
  clearTimeout(_this.timeoutScroll);
@@ -32140,12 +32201,7 @@
32140
32201
  });
32141
32202
  Object.defineProperty(DropdownComponent.prototype, "itemSelectedStyleClass", {
32142
32203
  set: function (value) {
32143
- if (value) {
32144
- this._itemSelectedStyleClass = this.defaultSelectedStyleClass + " " + value;
32145
- }
32146
- else {
32147
- this._itemSelectedStyleClass = this.defaultSelectedStyleClass + " " + value;
32148
- }
32204
+ this._itemSelectedStyleClass = this.defaultSelectedStyleClass + " " + value;
32149
32205
  },
32150
32206
  enumerable: false,
32151
32207
  configurable: true
@@ -32640,7 +32696,7 @@
32640
32696
  return __generator(this, function (_b) {
32641
32697
  switch (_b.label) {
32642
32698
  case 0:
32643
- this.page = page;
32699
+ this.page = page || 1;
32644
32700
  this.loading = true;
32645
32701
  return [4 /*yield*/, this.filterProcess(this.filterFromParents)];
32646
32702
  case 1:
@@ -38746,7 +38802,7 @@
38746
38802
  });
38747
38803
  };
38748
38804
  AuthorizeDirective.prototype.setAuthorizeButton = function () {
38749
- var _a, _b, _c, _d;
38805
+ var _a, _b, _c, _d, _e;
38750
38806
  var key = window.location.pathname.substring(1).toUpperCase().replace(/\//g, '_');
38751
38807
  if (i0.isDevMode()) {
38752
38808
  key = this.appCode + "_" + window.location.pathname.substring(1).toUpperCase();
@@ -38755,14 +38811,14 @@
38755
38811
  // if (componentName && !key.endsWith(componentName)) {
38756
38812
  // key += `_${componentName}`;
38757
38813
  // }
38758
- var buttonText = (_c = (_b = (_a = this._element.getAttribute(exports.EnumProperties.LABEL)) !== null && _a !== void 0 ? _a : this._element.getAttribute(exports.EnumProperties.TOOLTIP)) !== null && _b !== void 0 ? _b : this._element.getAttribute(exports.EnumProperties.NG_REFLECT_TEXT)) !== null && _c !== void 0 ? _c : this._element.getAttribute(exports.EnumProperties.NG_REFLECT_LABEL);
38814
+ var buttonText = (_d = (_c = (_b = (_a = this._element.getAttribute(exports.EnumProperties.LABEL)) !== null && _a !== void 0 ? _a : this._element.getAttribute(exports.EnumProperties.TOOLTIP)) !== null && _b !== void 0 ? _b : this._element.getAttribute(exports.EnumProperties.NG_REFLECT_TEXT)) !== null && _c !== void 0 ? _c : this._element.getAttribute(exports.EnumProperties.NG_REFLECT_LABEL)) !== null && _d !== void 0 ? _d : this._element.innerText;
38759
38815
  if (!buttonText) {
38760
38816
  this.enableAuthorize = false;
38761
38817
  return;
38762
38818
  }
38763
38819
  this.buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
38764
38820
  var permissionCode = "[" + key + "]_[" + this._commonService.convertStringToUnSign(buttonText).replace(/ /g, '_').toUpperCase() + "]";
38765
- var isSetAuthorize = (_d = this.buttonSetting[key]) === null || _d === void 0 ? void 0 : _d.find(function (p) { return p.code == permissionCode; });
38821
+ var isSetAuthorize = (_e = this.buttonSetting[key]) === null || _e === void 0 ? void 0 : _e.find(function (p) { return p.code == permissionCode; });
38766
38822
  if (isSetAuthorize) {
38767
38823
  this.permission = permissionCode;
38768
38824
  }
@@ -40041,6 +40097,7 @@
40041
40097
  return BaseMenuService;
40042
40098
  }());
40043
40099
 
40100
+ //1/1/1/
40044
40101
  var AnnouncementReadsService = /** @class */ (function (_super) {
40045
40102
  __extends(AnnouncementReadsService, _super);
40046
40103
  function AnnouncementReadsService(http, injector, _moduleConfigService) {
@@ -46964,7 +47021,7 @@
46964
47021
  selector: 'equation-editor',
46965
47022
  template: "<div class=\"ui-fluid\">\n <textarea #textarea class=\"latexContent\" placeholder=\"G\u00F5 c\u00F4ng th\u1EE9c to\u00E1n h\u1ECDc t\u1EA1i \u0111\u00E2y...\" rows=\"6\" pInputTextarea\n (ngModelChange)=\"onModelChange($event)\" [(ngModel)]=\"equationLatex\"></textarea>\n</div>\n<div class=\"preview\">\n <img #preview latex=\"true\" *ngIf=\"imageSrc\" [attr.height]=\"data.height != 0 ? data.height : null\"\n class=\"latex\" [style]=\"data.style | safeStyle\" [src]=\"imageSrc\" [alt]=\"equationLatex\" />\n</div>",
46966
47023
  providers: [ComponentContextService],
46967
- styles: [".btn-equation{width:30xp;height:30px;cursor:pointer}.preview{text-align:center;margin-top:10px;padding:0 10px}.latexContent{resize:none;border-radius:0}"]
47024
+ styles: [".btn-equation{width:30px;height:30px;cursor:pointer}.preview{text-align:center;margin-top:10px;padding:0 10px}.latexContent{resize:none;border-radius:0}"]
46968
47025
  },] }
46969
47026
  ];
46970
47027
  EquationEditorComponent.ctorParameters = function () { return [
@@ -50155,7 +50212,7 @@
50155
50212
  ];
50156
50213
  this.setting.cols = [
50157
50214
  new ColumnSchemaBase({ field: 'permissionCode', sort: false, showEditLink: false }),
50158
- new ColumnSchemaBase({ field: 'rawText', width: '230px', sort: false }),
50215
+ new ColumnSchemaBase({ field: 'rawText', width: '300px', sort: false }),
50159
50216
  new ColumnSchemaBase({ field: 'isAuthorize', dataType: exports.DataType.boolean, width: '100px', sort: false }),
50160
50217
  ];
50161
50218
  _super.prototype.ngOnInit.call(this);