tnx-shared 5.3.331 → 5.3.333

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 +130 -63
  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-component-base.d.ts +1 -0
  6. package/classes/base/list-component-base.d.ts.map +1 -1
  7. package/classes/public-function.d.ts.map +1 -1
  8. package/components/change-password-component/change-password.component.d.ts +10 -0
  9. package/components/change-password-component/change-password.component.d.ts.map +1 -0
  10. package/components/change-password-component/change-password.component.ngfactory.d.ts.map +1 -0
  11. package/components/change-password-component/change-password.component.scss.shim.ngstyle.d.ts.map +1 -0
  12. package/components/my-drive-component/my-drive.component.d.ts +10 -0
  13. package/components/my-drive-component/my-drive.component.d.ts.map +1 -0
  14. package/components/my-drive-component/my-drive.component.ngfactory.d.ts.map +1 -0
  15. package/components/my-drive-component/my-drive.component.scss.shim.ngstyle.d.ts.map +1 -0
  16. package/components/profile-component/profile.component.d.ts +10 -0
  17. package/components/profile-component/profile.component.d.ts.map +1 -0
  18. package/components/profile-component/profile.component.ngfactory.d.ts.map +1 -0
  19. package/components/profile-component/profile.component.scss.shim.ngstyle.d.ts.map +1 -0
  20. package/esm2015/classes/base/list-component-base.js +15 -40
  21. package/esm2015/classes/public-function.js +16 -1
  22. package/esm2015/components/change-password-component/change-password.component.js +27 -0
  23. package/esm2015/components/my-drive-component/my-drive.component.js +27 -0
  24. package/esm2015/components/profile-component/profile.component.js +27 -0
  25. package/esm2015/tnx-shared.js +26 -23
  26. package/esm2015/tnx-shared.module.js +7 -1
  27. package/fesm2015/tnx-shared.js +99 -40
  28. package/fesm2015/tnx-shared.js.map +1 -1
  29. package/package.json +2 -2
  30. package/tnx-shared.d.ts +25 -22
  31. package/tnx-shared.d.ts.map +1 -1
  32. package/tnx-shared.metadata.json +1 -1
  33. package/tnx-shared.module.d.ts +4 -1
  34. package/tnx-shared.module.d.ts.map +1 -1
  35. package/tnx-shared.module.ngfactory.d.ts.map +1 -1
@@ -22458,6 +22458,7 @@
22458
22458
  _this.isSuperUser = false;
22459
22459
  _this.showFormWorkflow = false;
22460
22460
  _this.headerWorkflow = '';
22461
+ _this.componentKey = '';
22461
22462
  _this.lstBtnAuthorizeMenu = [];
22462
22463
  _this.popupSizeWorkflow = new PopupSize({ width: 950, height: 540 });
22463
22464
  _this.showHistoryWorkflow = false;
@@ -22965,6 +22966,7 @@
22965
22966
  }
22966
22967
  };
22967
22968
  ListComponentBase.prototype.initColumnSchema = function (cols) {
22969
+ var _a, _b, _c, _d;
22968
22970
  if (!cols || !cols.length)
22969
22971
  return;
22970
22972
  var colFunction = null, colGroup = null, colHasToggleIcon = null;
@@ -22987,6 +22989,7 @@
22987
22989
  colHasToggleIcon = this.setting.cols[0];
22988
22990
  }
22989
22991
  colHasToggleIcon.colHasToggleIcon = true;
22992
+ this.componentKey = location.pathname + "/" + (((_d = (_c = (_b = (_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.closest('crud-list').parentNode) === null || _c === void 0 ? void 0 : _c.tagName) === null || _d === void 0 ? void 0 : _d.toLowerCase()) || '') + (this.setting.settingKey ? '/' + this.setting.settingKey : '');
22990
22993
  this.getColorSetting();
22991
22994
  this.getColumnSetting(colGroup);
22992
22995
  this.getPageSetting();
@@ -23203,16 +23206,12 @@
23203
23206
  var dataSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLUMN_SETTING);
23204
23207
  var jsonData = this.tryParseJson(dataSetting);
23205
23208
  if (dataSetting && jsonData.valid && jsonData.value.length > 0) {
23206
- var pathName = location.pathname;
23207
- if (this.setting.settingKey) {
23208
- pathName += '/' + this.setting.settingKey;
23209
- }
23210
23209
  var settings = jsonData.value;
23211
23210
  try {
23212
23211
  for (var settings_1 = __values(settings), settings_1_1 = settings_1.next(); !settings_1_1.done; settings_1_1 = settings_1.next()) {
23213
23212
  var element = settings_1_1.value;
23214
23213
  // const element = settings[i];
23215
- if (element.pathname === pathName) {
23214
+ if (element.pathname === this.componentKey) {
23216
23215
  this.setting.columnSetting.sortField = element.setting.sortField;
23217
23216
  this.setting.columnSetting.sortDir = element.setting.sortDir ? element.setting.sortDir : 0;
23218
23217
  if (this.setting.columnSetting.sortDir == 0) {
@@ -23250,16 +23249,13 @@
23250
23249
  }
23251
23250
  };
23252
23251
  ListComponentBase.prototype.saveColumnSetting = function () {
23253
- var pathName = location.pathname;
23254
- if (this.setting.settingKey) {
23255
- pathName += '/' + this.setting.settingKey;
23256
- }
23252
+ var _this = this;
23257
23253
  var columnSetting = [];
23258
23254
  var checkExist = false;
23259
23255
  var dataSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLUMN_SETTING);
23260
23256
  if (dataSetting) {
23261
23257
  columnSetting = JSON.parse(dataSetting);
23262
- var itemSetting = columnSetting.find(function (q) { return q.pathname == pathName; });
23258
+ var itemSetting = columnSetting.find(function (q) { return q.pathname == _this.componentKey; });
23263
23259
  if (itemSetting) {
23264
23260
  itemSetting.setting.sortField = this.setting.columnSetting.sortField;
23265
23261
  itemSetting.setting.sortDir = this.setting.columnSetting.sortDir;
@@ -23270,20 +23266,17 @@
23270
23266
  }
23271
23267
  }
23272
23268
  if (!checkExist) {
23273
- columnSetting.push({ pathname: pathName, setting: this.setting.columnSetting });
23269
+ columnSetting.push({ pathname: this.componentKey, setting: this.setting.columnSetting });
23274
23270
  }
23275
23271
  localStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.COLUMN_SETTING, JSON.stringify(columnSetting));
23276
23272
  };
23277
23273
  ListComponentBase.prototype.deleteColumnSetting = function () {
23278
- var pathName = location.pathname;
23279
- if (this.setting.settingKey) {
23280
- pathName += '/' + this.setting.settingKey;
23281
- }
23274
+ var _this = this;
23282
23275
  var columnSetting = [];
23283
23276
  var dataSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLUMN_SETTING);
23284
23277
  if (dataSetting) {
23285
23278
  columnSetting = JSON.parse(dataSetting);
23286
- var index = columnSetting.findIndex(function (q) { return q.pathname == pathName; });
23279
+ var index = columnSetting.findIndex(function (q) { return q.pathname == _this.componentKey; });
23287
23280
  if (index > -1)
23288
23281
  columnSetting.splice(index, 1);
23289
23282
  }
@@ -23293,14 +23286,10 @@
23293
23286
  ListComponentBase.prototype.getColorSetting = function () {
23294
23287
  var dataPageSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLOR_SETTING);
23295
23288
  if (dataPageSetting) {
23296
- var pathName = location.pathname;
23297
- if (this.setting.settingKey) {
23298
- pathName += '/' + this.setting.settingKey;
23299
- }
23300
23289
  var settings = JSON.parse(dataPageSetting);
23301
23290
  for (var i = 0; i < settings.length; i++) {
23302
23291
  var element = settings[i];
23303
- if (element.pathname === pathName) {
23292
+ if (element.pathname === this.componentKey) {
23304
23293
  this.setting.colorFilterField = element.colorFilterField;
23305
23294
  this.setting.colorFilterTable = element.colorFilterTable;
23306
23295
  break;
@@ -23325,17 +23314,13 @@
23325
23314
  };
23326
23315
  ListComponentBase.prototype.setColorSetting = function () {
23327
23316
  var _this = this;
23328
- var pathName = location.pathname;
23329
- if (this.setting.settingKey) {
23330
- pathName += '/' + this.setting.settingKey;
23331
- }
23332
23317
  var colorSetting = [];
23333
23318
  var checkExist = false;
23334
23319
  var dataColorSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLOR_SETTING);
23335
23320
  if (dataColorSetting) {
23336
23321
  colorSetting = JSON.parse(dataColorSetting);
23337
23322
  colorSetting.forEach(function (element) {
23338
- if (element.pathname === pathName) {
23323
+ if (element.pathname === _this.componentKey) {
23339
23324
  element.colorFilterField = _this.setting.colorFilterField;
23340
23325
  element.colorFilterTable = _this.setting.colorFilterTable;
23341
23326
  checkExist = true;
@@ -23344,7 +23329,7 @@
23344
23329
  }
23345
23330
  if (!checkExist) {
23346
23331
  colorSetting.push({
23347
- pathname: pathName,
23332
+ pathname: this.componentKey,
23348
23333
  colorFilterField: this.setting.colorFilterField,
23349
23334
  colorFilterTable: this.setting.colorFilterTable
23350
23335
  });
@@ -23354,14 +23339,10 @@
23354
23339
  ListComponentBase.prototype.getPageSetting = function () {
23355
23340
  var dataPageSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.PAGE_SETTING);
23356
23341
  if (dataPageSetting) {
23357
- var pathName = location.pathname;
23358
- if (this.setting.settingKey) {
23359
- pathName += '/' + this.setting.settingKey;
23360
- }
23361
23342
  var pageSettings = JSON.parse(dataPageSetting);
23362
23343
  for (var i = 0; i < pageSettings.length; i++) {
23363
23344
  var element = pageSettings[i];
23364
- if (element.pathname === pathName) {
23345
+ if (element.pathname === this.componentKey) {
23365
23346
  this.setting.pageSetting.pageSize = element.pageSize;
23366
23347
  break;
23367
23348
  }
@@ -23370,24 +23351,20 @@
23370
23351
  };
23371
23352
  ListComponentBase.prototype.savePageSetting = function () {
23372
23353
  var _this = this;
23373
- var pathName = location.pathname;
23374
- if (this.setting.settingKey) {
23375
- pathName += '/' + this.setting.settingKey;
23376
- }
23377
23354
  var pageSetting = [];
23378
23355
  var checkExist = false;
23379
23356
  var dataPageSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.PAGE_SETTING);
23380
23357
  if (dataPageSetting) {
23381
23358
  pageSetting = JSON.parse(dataPageSetting);
23382
23359
  pageSetting.forEach(function (element) {
23383
- if (element.pathname === pathName) {
23360
+ if (element.pathname === _this.componentKey) {
23384
23361
  element.pageSize = _this.setting.pageSetting.pageSize;
23385
23362
  checkExist = true;
23386
23363
  }
23387
23364
  });
23388
23365
  }
23389
23366
  if (!checkExist) {
23390
- pageSetting.push({ pathname: pathName, pageSize: this.setting.pageSetting.pageSize });
23367
+ pageSetting.push({ pathname: this.componentKey, pageSize: this.setting.pageSetting.pageSize });
23391
23368
  }
23392
23369
  localStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.PAGE_SETTING, JSON.stringify(pageSetting));
23393
23370
  };
@@ -23660,7 +23637,7 @@
23660
23637
  }
23661
23638
  }
23662
23639
  }
23663
- return transformed.map(function (row) { return row.map(function (cell) { return cell || ""; }); });
23640
+ return transformed.map(function (row) { return row.map(function (cell) { return cell || ''; }); });
23664
23641
  };
23665
23642
  ListComponentBase.prototype.getValueRow = function (rowData, index, value) {
23666
23643
  if (rowData[index] != null) {
@@ -29734,6 +29711,78 @@
29734
29711
  viewContainerRef: [{ type: i0.ViewChild, args: [ViewContainerRefDirective, { static: true },] }]
29735
29712
  };
29736
29713
 
29714
+ var MyDriveComponent = /** @class */ (function () {
29715
+ function MyDriveComponent(_federationService) {
29716
+ this._federationService = _federationService;
29717
+ }
29718
+ MyDriveComponent.prototype.ngOnInit = function () {
29719
+ this._federationService.loadRemoteComponent('commonapp', 'MyDriveListComponent', this.viewContainerRef);
29720
+ };
29721
+ return MyDriveComponent;
29722
+ }());
29723
+ MyDriveComponent.decorators = [
29724
+ { type: i0.Component, args: [{
29725
+ selector: 'common-my-drive',
29726
+ template: "<ng-template viewContainerRef></ng-template>\n",
29727
+ providers: [ComponentContextService],
29728
+ 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}"]
29729
+ },] }
29730
+ ];
29731
+ MyDriveComponent.ctorParameters = function () { return [
29732
+ { type: FederationService }
29733
+ ]; };
29734
+ MyDriveComponent.propDecorators = {
29735
+ viewContainerRef: [{ type: i0.ViewChild, args: [ViewContainerRefDirective, { static: true },] }]
29736
+ };
29737
+
29738
+ var ChangePasswordComponent = /** @class */ (function () {
29739
+ function ChangePasswordComponent(_federationService) {
29740
+ this._federationService = _federationService;
29741
+ }
29742
+ ChangePasswordComponent.prototype.ngOnInit = function () {
29743
+ this._federationService.loadRemoteComponent('commonapp', 'ChangePasswordComponent', this.viewContainerRef);
29744
+ };
29745
+ return ChangePasswordComponent;
29746
+ }());
29747
+ ChangePasswordComponent.decorators = [
29748
+ { type: i0.Component, args: [{
29749
+ selector: 'common-change-password',
29750
+ template: "<ng-template viewContainerRef></ng-template>\n",
29751
+ providers: [ComponentContextService],
29752
+ 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}"]
29753
+ },] }
29754
+ ];
29755
+ ChangePasswordComponent.ctorParameters = function () { return [
29756
+ { type: FederationService }
29757
+ ]; };
29758
+ ChangePasswordComponent.propDecorators = {
29759
+ viewContainerRef: [{ type: i0.ViewChild, args: [ViewContainerRefDirective, { static: true },] }]
29760
+ };
29761
+
29762
+ var ProfileComponent = /** @class */ (function () {
29763
+ function ProfileComponent(_federationService) {
29764
+ this._federationService = _federationService;
29765
+ }
29766
+ ProfileComponent.prototype.ngOnInit = function () {
29767
+ this._federationService.loadRemoteComponent('commonapp', 'ProfileComponent', this.viewContainerRef);
29768
+ };
29769
+ return ProfileComponent;
29770
+ }());
29771
+ ProfileComponent.decorators = [
29772
+ { type: i0.Component, args: [{
29773
+ selector: 'common-profile',
29774
+ template: "<ng-template viewContainerRef></ng-template>\n",
29775
+ providers: [ComponentContextService],
29776
+ 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}"]
29777
+ },] }
29778
+ ];
29779
+ ProfileComponent.ctorParameters = function () { return [
29780
+ { type: FederationService }
29781
+ ]; };
29782
+ ProfileComponent.propDecorators = {
29783
+ viewContainerRef: [{ type: i0.ViewChild, args: [ViewContainerRefDirective, { static: true },] }]
29784
+ };
29785
+
29737
29786
  var PublicFunction = /** @class */ (function () {
29738
29787
  function PublicFunction() {
29739
29788
  }
@@ -29763,6 +29812,18 @@
29763
29812
  path: 'thong-bao',
29764
29813
  component: ThongBaoComponent,
29765
29814
  },
29815
+ {
29816
+ path: 'my-drive',
29817
+ component: MyDriveComponent,
29818
+ },
29819
+ {
29820
+ path: 'change-password',
29821
+ component: ChangePasswordComponent,
29822
+ },
29823
+ {
29824
+ path: 'profile',
29825
+ component: ProfileComponent,
29826
+ },
29766
29827
  ];
29767
29828
  result.forEach(function (item) {
29768
29829
  var customRoute = routes.find(function (route) { return route.path == item.path; });
@@ -56517,6 +56578,9 @@
56517
56578
  QrCodeGeneratorComponent,
56518
56579
  AccessDeniedComponent,
56519
56580
  ThongBaoComponent,
56581
+ MyDriveComponent,
56582
+ ChangePasswordComponent,
56583
+ ProfileComponent,
56520
56584
  FilePickerDialogComponent,
56521
56585
  AddNewsComponent,
56522
56586
  CommonDashboardComponent,
@@ -57216,31 +57280,34 @@
57216
57280
  exports["ɵdd"] = ReferenceTextBoxComponent;
57217
57281
  exports["ɵde"] = QrCodeGeneratorComponent;
57218
57282
  exports["ɵdf"] = ThongBaoComponent;
57219
- exports["ɵdg"] = AddNewsComponent;
57220
- exports["ɵdh"] = ArticleService;
57221
- exports["ɵdi"] = NewsCategoryService;
57222
- exports["ɵdj"] = UniversalLinkProcessorComponent;
57223
- exports["ɵdk"] = SignatureDetailComponent;
57224
- exports["ɵdl"] = KySoSimDanhSachChuKyComponent;
57225
- exports["ɵdm"] = KySoSimChuKyUserService;
57226
- exports["ɵdn"] = FileKySoSimComponent;
57227
- exports["ɵdo"] = KySoSimSignPDFService;
57228
- exports["ɵdp"] = TaiLieuCuaToiComponent;
57229
- exports["ɵdq"] = KhaiThacTaiLieuDungChungComponent;
57230
- exports["ɵdr"] = DanhMucDungChungService;
57231
- exports["ɵds"] = TnTemplateComponent;
57232
- exports["ɵdt"] = DropdownSettingFormComponent;
57233
- exports["ɵdu"] = CheckReadyComponent;
57234
- exports["ɵdv"] = TnAccordionTabComponent;
57235
- exports["ɵdw"] = SettingsWorkflowComponent;
57236
- exports["ɵdx"] = SettingAuthorizeButtonComponent;
57237
- exports["ɵdy"] = BasePermissionService;
57238
- exports["ɵdz"] = SettingsWorkflowNo1Component;
57283
+ exports["ɵdg"] = MyDriveComponent;
57284
+ exports["ɵdh"] = ChangePasswordComponent;
57285
+ exports["ɵdi"] = ProfileComponent;
57286
+ exports["ɵdj"] = AddNewsComponent;
57287
+ exports["ɵdk"] = ArticleService;
57288
+ exports["ɵdl"] = NewsCategoryService;
57289
+ exports["ɵdm"] = UniversalLinkProcessorComponent;
57290
+ exports["ɵdn"] = SignatureDetailComponent;
57291
+ exports["ɵdo"] = KySoSimDanhSachChuKyComponent;
57292
+ exports["ɵdp"] = KySoSimChuKyUserService;
57293
+ exports["ɵdq"] = FileKySoSimComponent;
57294
+ exports["ɵdr"] = KySoSimSignPDFService;
57295
+ exports["ɵds"] = TaiLieuCuaToiComponent;
57296
+ exports["ɵdt"] = KhaiThacTaiLieuDungChungComponent;
57297
+ exports["ɵdu"] = DanhMucDungChungService;
57298
+ exports["ɵdv"] = TnTemplateComponent;
57299
+ exports["ɵdw"] = DropdownSettingFormComponent;
57300
+ exports["ɵdx"] = CheckReadyComponent;
57301
+ exports["ɵdy"] = TnAccordionTabComponent;
57302
+ exports["ɵdz"] = SettingsWorkflowComponent;
57239
57303
  exports["ɵe"] = ListBase;
57240
- exports["ɵea"] = HtmlPreviewComponent;
57241
- exports["ɵeb"] = AUTOCOMPLETE_VALUE_ACCESSOR;
57242
- exports["ɵec"] = AutoComplete;
57243
- exports["ɵed"] = AutoCompleteModule;
57304
+ exports["ɵea"] = SettingAuthorizeButtonComponent;
57305
+ exports["ɵeb"] = BasePermissionService;
57306
+ exports["ɵec"] = SettingsWorkflowNo1Component;
57307
+ exports["ɵed"] = HtmlPreviewComponent;
57308
+ exports["ɵee"] = AUTOCOMPLETE_VALUE_ACCESSOR;
57309
+ exports["ɵef"] = AutoComplete;
57310
+ exports["ɵeg"] = AutoCompleteModule;
57244
57311
  exports["ɵf"] = ListComponentBase;
57245
57312
  exports["ɵg"] = TreeTableComponent;
57246
57313
  exports["ɵh"] = NotFoundComponent;