@volosoft/abp.ng.theme.lepton-x 2.2.0 → 2.3.0-rc.1

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 (127) hide show
  1. package/account/account/account-layout.component.d.ts +6 -6
  2. package/account/account/account-layout.module.d.ts +20 -22
  3. package/account/account/components/auth-wrapper/auth-wrapper.component.d.ts +7 -8
  4. package/account/account/components/index.d.ts +2 -2
  5. package/account/account/components/tenant-box/tenant-box.component.d.ts +7 -8
  6. package/account/account/index.d.ts +3 -3
  7. package/account/index.d.ts +1 -1
  8. package/esm2022/account/account/account-layout.component.mjs +20 -0
  9. package/esm2022/account/account/account-layout.module.mjs +52 -0
  10. package/esm2022/account/account/components/auth-wrapper/auth-wrapper.component.mjs +29 -0
  11. package/{esm2020 → esm2022}/account/account/components/index.mjs +2 -2
  12. package/esm2022/account/account/components/tenant-box/tenant-box.component.mjs +22 -0
  13. package/{esm2020 → esm2022}/account/account/index.mjs +3 -3
  14. package/{esm2020 → esm2022}/account/index.mjs +1 -1
  15. package/{esm2020 → esm2022}/account/volosoft-abp.ng.theme.lepton-x-account.mjs +4 -4
  16. package/{esm2020 → esm2022}/index.mjs +1 -1
  17. package/{esm2020 → esm2022}/layouts/index.mjs +2 -2
  18. package/{esm2020 → esm2022}/layouts/side-menu/index.mjs +1 -1
  19. package/{esm2020 → esm2022}/layouts/side-menu/layout/index.mjs +3 -3
  20. package/{esm2020 → esm2022}/layouts/side-menu/layout/providers/index.mjs +1 -1
  21. package/{esm2020 → esm2022}/layouts/side-menu/layout/providers/translate.provider.mjs +16 -16
  22. package/esm2022/layouts/side-menu/layout/side-menu-application-layout.component.mjs +30 -0
  23. package/esm2022/layouts/side-menu/layout/side-menu-layout.module.mjs +74 -0
  24. package/{esm2020 → esm2022}/layouts/top-menu/index.mjs +1 -1
  25. package/{esm2020 → esm2022}/layouts/top-menu/layout/index.mjs +1 -1
  26. package/{esm2020 → esm2022}/layouts/top-menu/layout/providers/index.mjs +1 -1
  27. package/{esm2020 → esm2022}/layouts/top-menu/layout/providers/translate.provider.mjs +12 -12
  28. package/esm2022/layouts/top-menu/layout/top-menu-application-layout.component.mjs +28 -0
  29. package/esm2022/layouts/top-menu/layout/top-menu-layout.module.mjs +79 -0
  30. package/{esm2020 → esm2022}/layouts/volosoft-abp.ng.theme.lepton-x-layouts.mjs +4 -4
  31. package/esm2022/lib/components/abp-validation-error/abp-validation-error.component.mjs +52 -0
  32. package/esm2022/lib/components/abp-validation-error/abp-validation-error.module.mjs +40 -0
  33. package/{esm2020 → esm2022}/lib/components/abp-validation-error/index.mjs +2 -2
  34. package/esm2022/lib/components/http-error/http-error.component.mjs +45 -0
  35. package/esm2022/lib/components/http-error/http-error.module.mjs +26 -0
  36. package/{esm2020 → esm2022}/lib/components/http-error/index.mjs +2 -2
  37. package/{esm2020 → esm2022}/lib/components/index.mjs +2 -2
  38. package/{esm2020 → esm2022}/lib/enums/components.mjs +1 -1
  39. package/{esm2020 → esm2022}/lib/enums/index.mjs +2 -2
  40. package/{esm2020 → esm2022}/lib/enums/user-menu-items.mjs +9 -9
  41. package/{esm2020 → esm2022}/lib/index.mjs +5 -5
  42. package/esm2022/lib/lepton-x.module.mjs +60 -0
  43. package/esm2022/lib/providers/account-layout.provider.mjs +20 -0
  44. package/{esm2020 → esm2022}/lib/providers/init-service.provider.mjs +18 -18
  45. package/{esm2020 → esm2022}/lib/providers/style.provider.mjs +17 -17
  46. package/{esm2020 → esm2022}/lib/providers/translate.provider.mjs +21 -21
  47. package/{esm2020 → esm2022}/lib/providers/user-menu-service.provider.mjs +88 -88
  48. package/esm2022/lib/services/abp-auth.service.mjs +24 -0
  49. package/esm2022/lib/services/abp-settings.service.mjs +125 -0
  50. package/esm2022/lib/services/abp-toolbar.service.mjs +33 -0
  51. package/esm2022/lib/services/abp-translate.service.mjs +47 -0
  52. package/{esm2020 → esm2022}/lib/services/index.mjs +4 -4
  53. package/{esm2020 → esm2022}/lib/tokens/index.mjs +1 -1
  54. package/{esm2020 → esm2022}/lib/tokens/translate-key-map.mjs +2 -2
  55. package/{esm2020 → esm2022}/volosoft-abp.ng.theme.lepton-x.mjs +4 -4
  56. package/fesm2022/volosoft-abp.ng.theme.lepton-x-account.mjs +108 -0
  57. package/fesm2022/volosoft-abp.ng.theme.lepton-x-account.mjs.map +1 -0
  58. package/{fesm2015 → fesm2022}/volosoft-abp.ng.theme.lepton-x-layouts.mjs +188 -188
  59. package/fesm2022/volosoft-abp.ng.theme.lepton-x-layouts.mjs.map +1 -0
  60. package/{fesm2020 → fesm2022}/volosoft-abp.ng.theme.lepton-x.mjs +502 -483
  61. package/fesm2022/volosoft-abp.ng.theme.lepton-x.mjs.map +1 -0
  62. package/index.d.ts +1 -1
  63. package/layouts/index.d.ts +2 -2
  64. package/layouts/side-menu/index.d.ts +1 -1
  65. package/layouts/side-menu/layout/index.d.ts +3 -3
  66. package/layouts/side-menu/layout/providers/index.d.ts +1 -1
  67. package/layouts/side-menu/layout/providers/translate.provider.d.ts +2 -2
  68. package/layouts/side-menu/layout/side-menu-application-layout.component.d.ts +17 -17
  69. package/layouts/side-menu/layout/side-menu-layout.module.d.ts +15 -15
  70. package/layouts/top-menu/index.d.ts +1 -1
  71. package/layouts/top-menu/layout/index.d.ts +1 -1
  72. package/layouts/top-menu/layout/providers/index.d.ts +1 -1
  73. package/layouts/top-menu/layout/providers/translate.provider.d.ts +2 -2
  74. package/layouts/top-menu/layout/top-menu-application-layout.component.d.ts +15 -15
  75. package/layouts/top-menu/layout/top-menu-layout.module.d.ts +16 -16
  76. package/lib/components/abp-validation-error/abp-validation-error.component.d.ts +9 -9
  77. package/lib/components/abp-validation-error/abp-validation-error.module.d.ts +12 -12
  78. package/lib/components/abp-validation-error/index.d.ts +2 -2
  79. package/lib/components/http-error/http-error.component.d.ts +10 -10
  80. package/lib/components/http-error/http-error.module.d.ts +13 -13
  81. package/lib/components/http-error/index.d.ts +2 -2
  82. package/lib/components/index.d.ts +2 -2
  83. package/lib/enums/components.d.ts +20 -20
  84. package/lib/enums/index.d.ts +2 -2
  85. package/lib/enums/user-menu-items.d.ts +8 -8
  86. package/lib/index.d.ts +5 -5
  87. package/lib/lepton-x.module.d.ts +11 -11
  88. package/lib/providers/account-layout.provider.d.ts +8 -0
  89. package/lib/providers/init-service.provider.d.ts +6 -6
  90. package/lib/providers/style.provider.d.ts +3 -3
  91. package/lib/providers/translate.provider.d.ts +6 -6
  92. package/lib/providers/user-menu-service.provider.d.ts +8 -8
  93. package/lib/services/abp-auth.service.d.ts +12 -12
  94. package/lib/services/abp-settings.service.d.ts +26 -26
  95. package/lib/services/abp-toolbar.service.d.ts +13 -13
  96. package/lib/services/abp-translate.service.d.ts +14 -14
  97. package/lib/services/index.d.ts +4 -4
  98. package/lib/tokens/index.d.ts +1 -1
  99. package/lib/tokens/translate-key-map.d.ts +4 -4
  100. package/package.json +18 -28
  101. package/esm2020/account/account/account-layout.component.mjs +0 -19
  102. package/esm2020/account/account/account-layout.module.mjs +0 -71
  103. package/esm2020/account/account/components/auth-wrapper/auth-wrapper.component.mjs +0 -20
  104. package/esm2020/account/account/components/tenant-box/tenant-box.component.mjs +0 -20
  105. package/esm2020/layouts/side-menu/layout/side-menu-application-layout.component.mjs +0 -29
  106. package/esm2020/layouts/side-menu/layout/side-menu-layout.module.mjs +0 -73
  107. package/esm2020/layouts/top-menu/layout/top-menu-application-layout.component.mjs +0 -27
  108. package/esm2020/layouts/top-menu/layout/top-menu-layout.module.mjs +0 -78
  109. package/esm2020/lib/components/abp-validation-error/abp-validation-error.component.mjs +0 -51
  110. package/esm2020/lib/components/abp-validation-error/abp-validation-error.module.mjs +0 -39
  111. package/esm2020/lib/components/http-error/http-error.component.mjs +0 -44
  112. package/esm2020/lib/components/http-error/http-error.module.mjs +0 -25
  113. package/esm2020/lib/lepton-x.module.mjs +0 -57
  114. package/esm2020/lib/services/abp-auth.service.mjs +0 -23
  115. package/esm2020/lib/services/abp-settings.service.mjs +0 -124
  116. package/esm2020/lib/services/abp-toolbar.service.mjs +0 -32
  117. package/esm2020/lib/services/abp-translate.service.mjs +0 -46
  118. package/fesm2015/volosoft-abp.ng.theme.lepton-x-account.mjs +0 -121
  119. package/fesm2015/volosoft-abp.ng.theme.lepton-x-account.mjs.map +0 -1
  120. package/fesm2015/volosoft-abp.ng.theme.lepton-x-layouts.mjs.map +0 -1
  121. package/fesm2015/volosoft-abp.ng.theme.lepton-x.mjs +0 -542
  122. package/fesm2015/volosoft-abp.ng.theme.lepton-x.mjs.map +0 -1
  123. package/fesm2020/volosoft-abp.ng.theme.lepton-x-account.mjs +0 -121
  124. package/fesm2020/volosoft-abp.ng.theme.lepton-x-account.mjs.map +0 -1
  125. package/fesm2020/volosoft-abp.ng.theme.lepton-x-layouts.mjs +0 -219
  126. package/fesm2020/volosoft-abp.ng.theme.lepton-x-layouts.mjs.map +0 -1
  127. package/fesm2020/volosoft-abp.ng.theme.lepton-x.mjs.map +0 -1
@@ -4,7 +4,7 @@ import { ValidationErrorComponent, VALIDATION_ERROR_TEMPLATE, VALIDATION_INVALID
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i1$1 from '@abp/ng.core';
7
- import { CoreModule, getLocaleDirection, NAVIGATE_TO_MANAGE_PROFILE, AuthService, ConfigStateService } from '@abp/ng.core';
7
+ import { CoreModule, getLocaleDirection, NAVIGATE_TO_MANAGE_PROFILE, AuthService, ConfigStateService, ReplaceableComponentsService } from '@abp/ng.core';
8
8
  import * as i1$2 from '@angular/router';
9
9
  import { filter, switchMap, map } from 'rxjs/operators';
10
10
  import * as i4 from 'rxjs';
@@ -17,530 +17,549 @@ import { UserMenuService } from '@abp/ng.theme.shared';
17
17
  import * as i1$3 from '@volosoft/ngx-lepton-x/layouts';
18
18
  import { ThemeTranslateKeys, LpxModule } from '@volosoft/ngx-lepton-x';
19
19
  import { AbpNavbarService, LeptonXAbpCoreModule } from '@volo/abp.ng.lepton-x.core';
20
+ import { AccountLayoutComponent } from '@volosoft/abp.ng.theme.lepton-x/account';
20
21
 
21
- class AbpValidationErrorComponent extends ValidationErrorComponent {
22
- get abpErrors() {
23
- if (!this.errors || !this.errors.length) {
24
- return [];
25
- }
26
- return this.errors.map(error => {
27
- if (!error.message) {
28
- return error;
29
- }
30
- const index = error.message.indexOf('[');
31
- if (index > -1) {
32
- return {
33
- ...error,
34
- message: error.message.slice(0, index),
35
- interpoliteParams: error.message.slice(index + 1, error.message.length - 1).split(','),
36
- };
37
- }
38
- return error;
39
- });
40
- }
41
- }
42
- AbpValidationErrorComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpValidationErrorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
43
- AbpValidationErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AbpValidationErrorComponent, selector: "abp-validation-error", usesInheritance: true, ngImport: i0, template: `
22
+ class AbpValidationErrorComponent extends ValidationErrorComponent {
23
+ get abpErrors() {
24
+ if (!this.errors || !this.errors.length) {
25
+ return [];
26
+ }
27
+ return this.errors.map(error => {
28
+ if (!error.message) {
29
+ return error;
30
+ }
31
+ const index = error.message.indexOf('[');
32
+ if (index > -1) {
33
+ return {
34
+ ...error,
35
+ message: error.message.slice(0, index),
36
+ interpoliteParams: error.message.slice(index + 1, error.message.length - 1).split(','),
37
+ };
38
+ }
39
+ return error;
40
+ });
41
+ }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpValidationErrorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
43
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: AbpValidationErrorComponent, selector: "abp-validation-error", usesInheritance: true, ngImport: i0, template: `
44
44
  <span class="text-danger" data-valmsg-for="Role.Name" data-valmsg-replace="true"
45
45
  ><span *ngFor="let error of abpErrors; trackBy: trackByFn">
46
46
  {{ error.message | abpLocalization: error.interpoliteParams }}</span
47
47
  ></span
48
48
  >
49
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpValidationErrorComponent, decorators: [{
51
- type: Component,
52
- args: [{
53
- selector: 'abp-validation-error',
54
- // TODO: add validation error class to span
49
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
50
+ }
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpValidationErrorComponent, decorators: [{
52
+ type: Component,
53
+ args: [{
54
+ selector: 'abp-validation-error',
55
+ // TODO: add validation error class to span
55
56
  template: `
56
57
  <span class="text-danger" data-valmsg-for="Role.Name" data-valmsg-replace="true"
57
58
  ><span *ngFor="let error of abpErrors; trackBy: trackByFn">
58
59
  {{ error.message | abpLocalization: error.interpoliteParams }}</span
59
60
  ></span
60
61
  >
61
- `,
62
- changeDetection: ChangeDetectionStrategy.OnPush,
63
- encapsulation: ViewEncapsulation.None,
64
- }]
62
+ `,
63
+ changeDetection: ChangeDetectionStrategy.OnPush,
64
+ encapsulation: ViewEncapsulation.None,
65
+ }]
65
66
  }] });
66
67
 
67
- class AbpValidationErrorModule {
68
- static forRoot() {
69
- return {
70
- ngModule: AbpValidationErrorModule,
71
- providers: [
72
- {
73
- provide: VALIDATION_ERROR_TEMPLATE,
74
- useValue: AbpValidationErrorComponent,
75
- },
76
- {
77
- provide: VALIDATION_INVALID_CLASSES,
78
- useValue: 'is-invalid',
79
- },
80
- {
81
- provide: VALIDATION_TARGET_SELECTOR,
82
- useValue: '.form-group',
83
- },
84
- ],
85
- };
86
- }
87
- }
88
- AbpValidationErrorModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpValidationErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
89
- AbpValidationErrorModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AbpValidationErrorModule, declarations: [AbpValidationErrorComponent], imports: [CommonModule, CoreModule, NgxValidateCoreModule], exports: [AbpValidationErrorComponent, NgxValidateCoreModule] });
90
- AbpValidationErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpValidationErrorModule, imports: [CommonModule, CoreModule, NgxValidateCoreModule, NgxValidateCoreModule] });
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpValidationErrorModule, decorators: [{
92
- type: NgModule,
93
- args: [{
94
- declarations: [AbpValidationErrorComponent],
95
- imports: [CommonModule, CoreModule, NgxValidateCoreModule],
96
- exports: [AbpValidationErrorComponent, NgxValidateCoreModule],
97
- }]
68
+ class AbpValidationErrorModule {
69
+ static forRoot() {
70
+ return {
71
+ ngModule: AbpValidationErrorModule,
72
+ providers: [
73
+ {
74
+ provide: VALIDATION_ERROR_TEMPLATE,
75
+ useValue: AbpValidationErrorComponent,
76
+ },
77
+ {
78
+ provide: VALIDATION_INVALID_CLASSES,
79
+ useValue: 'is-invalid',
80
+ },
81
+ {
82
+ provide: VALIDATION_TARGET_SELECTOR,
83
+ useValue: '.form-group',
84
+ },
85
+ ],
86
+ };
87
+ }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpValidationErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
89
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: AbpValidationErrorModule, declarations: [AbpValidationErrorComponent], imports: [CommonModule, CoreModule, NgxValidateCoreModule], exports: [AbpValidationErrorComponent, NgxValidateCoreModule] }); }
90
+ static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpValidationErrorModule, imports: [CommonModule, CoreModule, NgxValidateCoreModule, NgxValidateCoreModule] }); }
91
+ }
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpValidationErrorModule, decorators: [{
93
+ type: NgModule,
94
+ args: [{
95
+ declarations: [AbpValidationErrorComponent],
96
+ imports: [CommonModule, CoreModule, NgxValidateCoreModule],
97
+ exports: [AbpValidationErrorComponent, NgxValidateCoreModule],
98
+ }]
98
99
  }] });
99
100
 
100
- class HttpErrorComponent {
101
- constructor() {
102
- this.errorStatus = '401';
103
- }
104
- get errorStatusText() {
105
- switch (this.errorStatus) {
106
- case '401':
107
- return 'AbpUi::401Message';
108
- case '403':
109
- return 'AbpUi::403Message';
110
- case '404':
111
- return 'AbpUi::404Message';
112
- case '500':
113
- return 'AbpUi::500Message';
114
- default:
115
- return '';
116
- }
117
- }
118
- get errorDetail() {
119
- switch (this.errorStatus) {
120
- case '401':
121
- return 'AbpUi::DefaultErrorMessage401Detail';
122
- case '403':
123
- return 'AbpUi::DefaultErrorMessage403Detail';
124
- case '404':
125
- return 'AbpUi::DefaultErrorMessage404Detail';
126
- case '500':
127
- return 'AbpUi::DefaultErrorMessage';
128
- default:
129
- return '';
130
- }
131
- }
132
- }
133
- HttpErrorComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
- HttpErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: HttpErrorComponent, selector: "abp-http-error", ngImport: i0, template: "<div class=\"error-page-container\">\r\n <div class=\"row\">\r\n <div class=\"col col-auto\">\r\n <div class=\"status-icon\">\r\n <i class=\"fa fa-frown-o text-danger\" aria-hidden=\"true\"></i>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"col\">\r\n <div class=\"status-content\">\r\n <h1>{{ errorStatus }}</h1>\r\n <h2 class=\"text-danger mb-0\">\r\n {{ errorStatusText | abpLocalization\r\n }}<small class=\"text-muted\">{{\r\n errorDetail | abpLocalization\r\n }}</small>\r\n </h2>\r\n <p class=\"mt-3 mb-4\"></p>\r\n <a (click)=\"destroy$.next()\" routerLink=\"/\" class=\"btn btn-primary\">{{\r\n 'AbpUi::GoHomePage' | abpLocalization\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n class=\"mt-4 mb-1 d-block\"\r\n (click)=\"destroy$.next()\"\r\n ><i class=\"fa fa-long-arrow-left me-1\"></i\r\n >{{ 'AbpUi::GoBack' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] });
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorComponent, decorators: [{
136
- type: Component,
137
- args: [{ selector: 'abp-http-error', template: "<div class=\"error-page-container\">\r\n <div class=\"row\">\r\n <div class=\"col col-auto\">\r\n <div class=\"status-icon\">\r\n <i class=\"fa fa-frown-o text-danger\" aria-hidden=\"true\"></i>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"col\">\r\n <div class=\"status-content\">\r\n <h1>{{ errorStatus }}</h1>\r\n <h2 class=\"text-danger mb-0\">\r\n {{ errorStatusText | abpLocalization\r\n }}<small class=\"text-muted\">{{\r\n errorDetail | abpLocalization\r\n }}</small>\r\n </h2>\r\n <p class=\"mt-3 mb-4\"></p>\r\n <a (click)=\"destroy$.next()\" routerLink=\"/\" class=\"btn btn-primary\">{{\r\n 'AbpUi::GoHomePage' | abpLocalization\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n class=\"mt-4 mb-1 d-block\"\r\n (click)=\"destroy$.next()\"\r\n ><i class=\"fa fa-long-arrow-left me-1\"></i\r\n >{{ 'AbpUi::GoBack' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
101
+ class HttpErrorComponent {
102
+ constructor() {
103
+ this.errorStatus = '401';
104
+ }
105
+ get errorStatusText() {
106
+ switch (this.errorStatus) {
107
+ case '401':
108
+ return 'AbpUi::401Message';
109
+ case '403':
110
+ return 'AbpUi::403Message';
111
+ case '404':
112
+ return 'AbpUi::404Message';
113
+ case '500':
114
+ return 'AbpUi::500Message';
115
+ default:
116
+ return '';
117
+ }
118
+ }
119
+ get errorDetail() {
120
+ switch (this.errorStatus) {
121
+ case '401':
122
+ return 'AbpUi::DefaultErrorMessage401Detail';
123
+ case '403':
124
+ return 'AbpUi::DefaultErrorMessage403Detail';
125
+ case '404':
126
+ return 'AbpUi::DefaultErrorMessage404Detail';
127
+ case '500':
128
+ return 'AbpUi::DefaultErrorMessage';
129
+ default:
130
+ return '';
131
+ }
132
+ }
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: HttpErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
134
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.4", type: HttpErrorComponent, selector: "abp-http-error", ngImport: i0, template: "<div class=\"error-page-container\">\r\n <div class=\"row\">\r\n <div class=\"col col-auto\">\r\n <div class=\"status-icon\">\r\n <i class=\"fa fa-frown-o text-danger\" aria-hidden=\"true\"></i>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"col\">\r\n <div class=\"status-content\">\r\n <h1>{{ errorStatus }}</h1>\r\n <h2 class=\"text-danger mb-0\">\r\n {{ errorStatusText | abpLocalization\r\n }}<small class=\"text-muted\">{{\r\n errorDetail | abpLocalization\r\n }}</small>\r\n </h2>\r\n <p class=\"mt-3 mb-4\"></p>\r\n <a (click)=\"destroy$.next()\" routerLink=\"/\" class=\"btn btn-primary\">{{\r\n 'AbpUi::GoHomePage' | abpLocalization\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n class=\"mt-4 mb-1 d-block\"\r\n (click)=\"destroy$.next()\"\r\n ><i class=\"fa fa-long-arrow-left me-1\"></i\r\n >{{ 'AbpUi::GoBack' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }] }); }
135
+ }
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: HttpErrorComponent, decorators: [{
137
+ type: Component,
138
+ args: [{ selector: 'abp-http-error', template: "<div class=\"error-page-container\">\r\n <div class=\"row\">\r\n <div class=\"col col-auto\">\r\n <div class=\"status-icon\">\r\n <i class=\"fa fa-frown-o text-danger\" aria-hidden=\"true\"></i>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"col\">\r\n <div class=\"status-content\">\r\n <h1>{{ errorStatus }}</h1>\r\n <h2 class=\"text-danger mb-0\">\r\n {{ errorStatusText | abpLocalization\r\n }}<small class=\"text-muted\">{{\r\n errorDetail | abpLocalization\r\n }}</small>\r\n </h2>\r\n <p class=\"mt-3 mb-4\"></p>\r\n <a (click)=\"destroy$.next()\" routerLink=\"/\" class=\"btn btn-primary\">{{\r\n 'AbpUi::GoHomePage' | abpLocalization\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n class=\"mt-4 mb-1 d-block\"\r\n (click)=\"destroy$.next()\"\r\n ><i class=\"fa fa-long-arrow-left me-1\"></i\r\n >{{ 'AbpUi::GoBack' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
138
139
  }] });
139
140
 
140
- class HttpErrorModule {
141
- static forRoot() {
142
- return {
143
- ngModule: HttpErrorModule,
144
- providers: [],
145
- };
146
- }
147
- }
148
- HttpErrorModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
149
- HttpErrorModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorModule, declarations: [HttpErrorComponent], imports: [CoreModule, CommonModule], exports: [HttpErrorComponent] });
150
- HttpErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorModule, imports: [CoreModule, CommonModule] });
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorModule, decorators: [{
152
- type: NgModule,
153
- args: [{
154
- declarations: [HttpErrorComponent],
155
- imports: [CoreModule, CommonModule],
156
- exports: [HttpErrorComponent],
157
- }]
141
+ class HttpErrorModule {
142
+ static forRoot() {
143
+ return {
144
+ ngModule: HttpErrorModule,
145
+ providers: [],
146
+ };
147
+ }
148
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: HttpErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
149
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: HttpErrorModule, declarations: [HttpErrorComponent], imports: [CoreModule, CommonModule], exports: [HttpErrorComponent] }); }
150
+ static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: HttpErrorModule, imports: [CoreModule, CommonModule] }); }
151
+ }
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: HttpErrorModule, decorators: [{
153
+ type: NgModule,
154
+ args: [{
155
+ declarations: [HttpErrorComponent],
156
+ imports: [CoreModule, CommonModule],
157
+ exports: [HttpErrorComponent],
158
+ }]
158
159
  }] });
159
160
 
160
- var eUserMenuItems;
161
- (function (eUserMenuItems) {
162
- eUserMenuItems["LinkedAccounts"] = "LinkedAccounts";
163
- eUserMenuItems["MyAccount"] = "MyAccount";
164
- eUserMenuItems["Logout"] = "Logout";
165
- eUserMenuItems["SecurityLogs"] = "SecurityLogs";
166
- eUserMenuItems["BackToImpersonator"] = "BackToImpersonator";
167
- eUserMenuItems["AuthorityDelegation"] = "AuthorityDelegation";
161
+ var eUserMenuItems;
162
+ (function (eUserMenuItems) {
163
+ eUserMenuItems["LinkedAccounts"] = "LinkedAccounts";
164
+ eUserMenuItems["MyAccount"] = "MyAccount";
165
+ eUserMenuItems["Logout"] = "Logout";
166
+ eUserMenuItems["SecurityLogs"] = "SecurityLogs";
167
+ eUserMenuItems["BackToImpersonator"] = "BackToImpersonator";
168
+ eUserMenuItems["AuthorityDelegation"] = "AuthorityDelegation";
168
169
  })(eUserMenuItems || (eUserMenuItems = {}));
169
170
 
170
- class AbpSettingsService {
171
- constructor(sessionService, configStateService, languageService, userProfileService, profilePicture$, navigateToManageProfile, navigateToMySecurityLogs, openMyLinkUsersModal, userMenuService) {
172
- this.sessionService = sessionService;
173
- this.configStateService = configStateService;
174
- this.languageService = languageService;
175
- this.userProfileService = userProfileService;
176
- this.profilePicture$ = profilePicture$;
177
- this.navigateToManageProfile = navigateToManageProfile;
178
- this.navigateToMySecurityLogs = navigateToMySecurityLogs;
179
- this.openMyLinkUsersModal = openMyLinkUsersModal;
180
- this.userMenuService = userMenuService;
181
- }
182
- setUpListeners() {
183
- this.listenToLangChange();
184
- this.setLanguageOptions();
185
- this.setUserProfile();
186
- this.setProfilePicture();
187
- this.setUserMenuGroups();
188
- }
189
- setUserProfile() {
190
- const emptyStringOnNull = (value) => value || '';
191
- const currentUser$ = this.configStateService
192
- .getOne$('currentUser')
193
- .pipe(filter(Boolean));
194
- const currentTenant$ = this.configStateService
195
- .getOne$('currentTenant')
196
- .pipe(filter(Boolean));
197
- combineLatest([currentUser$, currentTenant$]).subscribe(([currentUser, currentTenant]) => {
198
- this.userProfileService.patchUser({
199
- userName: currentUser.userName,
200
- fullName: emptyStringOnNull(currentUser.name) +
201
- ' ' +
202
- emptyStringOnNull(currentUser.surName),
203
- email: currentUser.email,
204
- tenant: currentTenant,
205
- });
206
- });
207
- }
208
- setUserMenuGroups() {
209
- this.userMenuService.items$.subscribe((userMenu) => {
210
- const userActionGroups = userMenu.reduce((acc, curr, index) => {
211
- const menuItem = {
212
- icon: curr.textTemplate?.icon,
213
- text: curr.textTemplate?.text,
214
- component: curr?.component,
215
- action: () => {
216
- curr.action();
217
- return of(true);
218
- },
219
- visible: curr.visible,
220
- };
221
- const setIndex = index === userMenu.length - 1 ? 1 : 0;
222
- acc[setIndex].push(menuItem);
223
- return acc;
224
- }, [[], []]);
225
- this.userProfileService.patchUser({
226
- userActionGroups,
227
- });
228
- });
229
- }
230
- setProfilePicture() {
231
- this.profilePicture$
232
- .pipe(filter(Boolean))
233
- .subscribe((avatar) => this.userProfileService.patchUser({
234
- avatar: {
235
- type: avatar.type,
236
- source: avatar.source || '',
237
- },
238
- }));
239
- }
240
- setLanguageOptions() {
241
- this.sessionService
242
- .getLanguage$()
243
- .pipe(switchMap((currentLang) => this.configStateService.getDeep$('localization.languages').pipe(filter(Boolean), map((languages) => languages.map(({ cultureName, ...rest }) => ({
244
- ...rest,
245
- cultureName,
246
- selected: cultureName === currentLang,
247
- isRTL: getLocaleDirection(cultureName) === 'rtl',
248
- }))))))
249
- .subscribe((settings) => {
250
- this.languageService.setLanguages(settings);
251
- });
252
- }
253
- listenToLangChange() {
254
- this.languageService.selectedLanguage$
255
- .pipe(filter(Boolean))
256
- .subscribe((lang) => {
257
- this.sessionService.setLanguage(lang?.cultureName || '');
258
- });
259
- }
260
- }
261
- AbpSettingsServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpSettingsService, deps: [{ token: i1$1.SessionStateService }, { token: i1$1.ConfigStateService }, { token: i2.LanguageService }, { token: i2.UserProfileService }, { token: PROFILE_PICTURE }, { token: NAVIGATE_TO_MANAGE_PROFILE }, { token: NAVIGATE_TO_MY_SECURITY_LOGS }, { token: OPEN_MY_LINK_USERS_MODAL, optional: true }, { token: i3.UserMenuService }], target: i0.ɵɵFactoryTarget.Injectable });
262
- AbpSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpSettingsService, providedIn: 'root' });
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpSettingsService, decorators: [{
264
- type: Injectable,
265
- args: [{ providedIn: 'root' }]
266
- }], ctorParameters: function () { return [{ type: i1$1.SessionStateService }, { type: i1$1.ConfigStateService }, { type: i2.LanguageService }, { type: i2.UserProfileService }, { type: i4.BehaviorSubject, decorators: [{
267
- type: Inject,
268
- args: [PROFILE_PICTURE]
269
- }] }, { type: undefined, decorators: [{
270
- type: Inject,
271
- args: [NAVIGATE_TO_MANAGE_PROFILE]
272
- }] }, { type: undefined, decorators: [{
273
- type: Inject,
274
- args: [NAVIGATE_TO_MY_SECURITY_LOGS]
275
- }] }, { type: undefined, decorators: [{
276
- type: Optional
277
- }, {
278
- type: Inject,
279
- args: [OPEN_MY_LINK_USERS_MODAL]
171
+ class AbpSettingsService {
172
+ constructor(sessionService, configStateService, languageService, userProfileService, profilePicture$, navigateToManageProfile, navigateToMySecurityLogs, openMyLinkUsersModal, userMenuService) {
173
+ this.sessionService = sessionService;
174
+ this.configStateService = configStateService;
175
+ this.languageService = languageService;
176
+ this.userProfileService = userProfileService;
177
+ this.profilePicture$ = profilePicture$;
178
+ this.navigateToManageProfile = navigateToManageProfile;
179
+ this.navigateToMySecurityLogs = navigateToMySecurityLogs;
180
+ this.openMyLinkUsersModal = openMyLinkUsersModal;
181
+ this.userMenuService = userMenuService;
182
+ }
183
+ setUpListeners() {
184
+ this.listenToLangChange();
185
+ this.setLanguageOptions();
186
+ this.setUserProfile();
187
+ this.setProfilePicture();
188
+ this.setUserMenuGroups();
189
+ }
190
+ setUserProfile() {
191
+ const emptyStringOnNull = (value) => value || '';
192
+ const currentUser$ = this.configStateService
193
+ .getOne$('currentUser')
194
+ .pipe(filter(Boolean));
195
+ const currentTenant$ = this.configStateService
196
+ .getOne$('currentTenant')
197
+ .pipe(filter(Boolean));
198
+ combineLatest([currentUser$, currentTenant$]).subscribe(([currentUser, currentTenant]) => {
199
+ this.userProfileService.patchUser({
200
+ userName: currentUser.userName,
201
+ fullName: emptyStringOnNull(currentUser.name) +
202
+ ' ' +
203
+ emptyStringOnNull(currentUser.surName),
204
+ email: currentUser.email,
205
+ tenant: currentTenant,
206
+ });
207
+ });
208
+ }
209
+ setUserMenuGroups() {
210
+ this.userMenuService.items$.subscribe((userMenu) => {
211
+ const userActionGroups = userMenu.reduce((acc, curr, index) => {
212
+ const menuItem = {
213
+ icon: curr.textTemplate?.icon,
214
+ text: curr.textTemplate?.text,
215
+ component: curr?.component,
216
+ action: () => {
217
+ curr.action();
218
+ return of(true);
219
+ },
220
+ visible: curr.visible,
221
+ };
222
+ const setIndex = index === userMenu.length - 1 ? 1 : 0;
223
+ acc[setIndex].push(menuItem);
224
+ return acc;
225
+ }, [[], []]);
226
+ this.userProfileService.patchUser({
227
+ userActionGroups,
228
+ });
229
+ });
230
+ }
231
+ setProfilePicture() {
232
+ this.profilePicture$
233
+ .pipe(filter(Boolean))
234
+ .subscribe((avatar) => this.userProfileService.patchUser({
235
+ avatar: {
236
+ type: avatar.type,
237
+ source: avatar.source || '',
238
+ },
239
+ }));
240
+ }
241
+ setLanguageOptions() {
242
+ this.sessionService
243
+ .getLanguage$()
244
+ .pipe(switchMap((currentLang) => this.configStateService.getDeep$('localization.languages').pipe(filter(Boolean), map((languages) => languages.map(({ cultureName, ...rest }) => ({
245
+ ...rest,
246
+ cultureName,
247
+ selected: cultureName === currentLang,
248
+ isRTL: getLocaleDirection(cultureName) === 'rtl',
249
+ }))))))
250
+ .subscribe((settings) => {
251
+ this.languageService.setLanguages(settings);
252
+ });
253
+ }
254
+ listenToLangChange() {
255
+ this.languageService.selectedLanguage$
256
+ .pipe(filter(Boolean))
257
+ .subscribe((lang) => {
258
+ this.sessionService.setLanguage(lang?.cultureName || '');
259
+ });
260
+ }
261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpSettingsService, deps: [{ token: i1$1.SessionStateService }, { token: i1$1.ConfigStateService }, { token: i2.LanguageService }, { token: i2.UserProfileService }, { token: PROFILE_PICTURE }, { token: NAVIGATE_TO_MANAGE_PROFILE }, { token: NAVIGATE_TO_MY_SECURITY_LOGS }, { token: OPEN_MY_LINK_USERS_MODAL, optional: true }, { token: i3.UserMenuService }], target: i0.ɵɵFactoryTarget.Injectable }); }
262
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpSettingsService, providedIn: 'root' }); }
263
+ }
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpSettingsService, decorators: [{
265
+ type: Injectable,
266
+ args: [{ providedIn: 'root' }]
267
+ }], ctorParameters: function () { return [{ type: i1$1.SessionStateService }, { type: i1$1.ConfigStateService }, { type: i2.LanguageService }, { type: i2.UserProfileService }, { type: i4.BehaviorSubject, decorators: [{
268
+ type: Inject,
269
+ args: [PROFILE_PICTURE]
270
+ }] }, { type: undefined, decorators: [{
271
+ type: Inject,
272
+ args: [NAVIGATE_TO_MANAGE_PROFILE]
273
+ }] }, { type: undefined, decorators: [{
274
+ type: Inject,
275
+ args: [NAVIGATE_TO_MY_SECURITY_LOGS]
276
+ }] }, { type: undefined, decorators: [{
277
+ type: Optional
278
+ }, {
279
+ type: Inject,
280
+ args: [OPEN_MY_LINK_USERS_MODAL]
280
281
  }] }, { type: i3.UserMenuService }]; } });
281
282
 
282
- class AbpToolbarService {
283
- constructor(toolbar, navItems, permissionService) {
284
- this.toolbar = toolbar;
285
- this.navItems = navItems;
286
- this.permissionService = permissionService;
287
- }
288
- listenNavItems() {
289
- this.navItems.items$
290
- .pipe(switchMap((items) => this.permissionService.filterItemsByPolicy$(items)))
291
- .subscribe((items) => {
292
- this.toolbar.setItems(items);
293
- });
294
- }
295
- }
296
- AbpToolbarServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpToolbarService, deps: [{ token: i1$3.ToolbarService }, { token: i3.NavItemsService }, { token: i1$1.PermissionService }], target: i0.ɵɵFactoryTarget.Injectable });
297
- AbpToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpToolbarService, providedIn: 'root' });
298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpToolbarService, decorators: [{
299
- type: Injectable,
300
- args: [{
301
- providedIn: 'root',
302
- }]
283
+ class AbpToolbarService {
284
+ constructor(toolbar, navItems, permissionService) {
285
+ this.toolbar = toolbar;
286
+ this.navItems = navItems;
287
+ this.permissionService = permissionService;
288
+ }
289
+ listenNavItems() {
290
+ this.navItems.items$
291
+ .pipe(switchMap((items) => this.permissionService.filterItemsByPolicy$(items)))
292
+ .subscribe((items) => {
293
+ this.toolbar.setItems(items);
294
+ });
295
+ }
296
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpToolbarService, deps: [{ token: i1$3.ToolbarService }, { token: i3.NavItemsService }, { token: i1$1.PermissionService }], target: i0.ɵɵFactoryTarget.Injectable }); }
297
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpToolbarService, providedIn: 'root' }); }
298
+ }
299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpToolbarService, decorators: [{
300
+ type: Injectable,
301
+ args: [{
302
+ providedIn: 'root',
303
+ }]
303
304
  }], ctorParameters: function () { return [{ type: i1$3.ToolbarService }, { type: i3.NavItemsService }, { type: i1$1.PermissionService }]; } });
304
305
 
305
306
  const LPX_TRANSLATE_KEY_MAP_TOKEN = new InjectionToken('LPX_TRANSLATE_KEY_MAP_TOKEN');
306
307
 
307
- class AbpTranslateService {
308
- constructor(localization, translateKeys) {
309
- this.localization = localization;
310
- this.translateKeys = translateKeys;
311
- }
312
- get(key, defaultValue) {
313
- const keyToTranslate = this.getKey(key);
314
- if (keyToTranslate) {
315
- return this.localization.instant({
316
- key: keyToTranslate,
317
- defaultValue,
318
- });
319
- }
320
- return defaultValue || key;
321
- }
322
- get$(key, defaultValue) {
323
- const keyToTranslate = this.getKey(key);
324
- if (keyToTranslate) {
325
- return this.localization.get({
326
- key: keyToTranslate,
327
- defaultValue,
328
- });
329
- }
330
- return of(defaultValue || key);
331
- }
332
- getKey(key) {
333
- const keys = flatArrayDeepToObject(this.translateKeys);
334
- return keys[key] ? keys[key] : key.includes('::') ? key : undefined;
335
- }
336
- }
337
- AbpTranslateServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpTranslateService, deps: [{ token: i1$1.LocalizationService }, { token: LPX_TRANSLATE_KEY_MAP_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
338
- AbpTranslateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpTranslateService });
339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpTranslateService, decorators: [{
340
- type: Injectable
341
- }], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: Array, decorators: [{
342
- type: Inject,
343
- args: [LPX_TRANSLATE_KEY_MAP_TOKEN]
308
+ class AbpTranslateService {
309
+ constructor(localization, translateKeys) {
310
+ this.localization = localization;
311
+ this.translateKeys = translateKeys;
312
+ }
313
+ get(key, defaultValue) {
314
+ const keyToTranslate = this.getKey(key);
315
+ if (keyToTranslate) {
316
+ return this.localization.instant({
317
+ key: keyToTranslate,
318
+ defaultValue,
319
+ });
320
+ }
321
+ return defaultValue || key;
322
+ }
323
+ get$(key, defaultValue) {
324
+ const keyToTranslate = this.getKey(key);
325
+ if (keyToTranslate) {
326
+ return this.localization.get({
327
+ key: keyToTranslate,
328
+ defaultValue,
329
+ });
330
+ }
331
+ return of(defaultValue || key);
332
+ }
333
+ getKey(key) {
334
+ const keys = flatArrayDeepToObject(this.translateKeys);
335
+ return keys[key] ? keys[key] : key.includes('::') ? key : undefined;
336
+ }
337
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpTranslateService, deps: [{ token: i1$1.LocalizationService }, { token: LPX_TRANSLATE_KEY_MAP_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
338
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpTranslateService }); }
339
+ }
340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpTranslateService, decorators: [{
341
+ type: Injectable
342
+ }], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: Array, decorators: [{
343
+ type: Inject,
344
+ args: [LPX_TRANSLATE_KEY_MAP_TOKEN]
344
345
  }] }]; } });
345
346
 
346
- class AbpAuthService {
347
- constructor(userProfileService, authService) {
348
- this.userProfileService = userProfileService;
349
- this.authService = authService;
350
- this.isUserExists$ = this.userProfileService.user$.pipe(map((user) => user && !!user.userName));
351
- }
352
- navigateToLogin() {
353
- this.authService.navigateToLogin();
354
- }
355
- }
356
- AbpAuthServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpAuthService, deps: [{ token: i2.UserProfileService }, { token: i1$1.AuthService }], target: i0.ɵɵFactoryTarget.Injectable });
357
- AbpAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpAuthService });
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpAuthService, decorators: [{
359
- type: Injectable
347
+ class AbpAuthService {
348
+ constructor(userProfileService, authService) {
349
+ this.userProfileService = userProfileService;
350
+ this.authService = authService;
351
+ this.isUserExists$ = this.userProfileService.user$.pipe(map((user) => user && !!user.userName));
352
+ }
353
+ navigateToLogin() {
354
+ this.authService.navigateToLogin();
355
+ }
356
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpAuthService, deps: [{ token: i2.UserProfileService }, { token: i1$1.AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
357
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpAuthService }); }
358
+ }
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AbpAuthService, decorators: [{
360
+ type: Injectable
360
361
  }], ctorParameters: function () { return [{ type: i2.UserProfileService }, { type: i1$1.AuthService }]; } });
361
362
 
362
- const LPX_STYLE_PROVIDER = {
363
- provide: APP_INITIALIZER,
364
- useFactory: initStyles,
365
- multi: true,
366
- };
367
- function initStyles() {
368
- function init() {
369
- const loader = document.querySelector('#lp-page-loader');
370
- if (loader) {
371
- loader.style.background = 'var(--background)';
372
- setTimeout(() => loader.parentNode?.removeChild(loader), 500);
373
- }
374
- return Promise.resolve();
375
- }
376
- return init;
363
+ const LPX_STYLE_PROVIDER = {
364
+ provide: APP_INITIALIZER,
365
+ useFactory: initStyles,
366
+ multi: true,
367
+ };
368
+ function initStyles() {
369
+ function init() {
370
+ const loader = document.querySelector('#lp-page-loader');
371
+ if (loader) {
372
+ loader.style.background = 'var(--background)';
373
+ setTimeout(() => loader.parentNode?.removeChild(loader), 500);
374
+ }
375
+ return Promise.resolve();
376
+ }
377
+ return init;
377
378
  }
378
379
 
379
- const INIT_SERVICE_PROVIDER = {
380
- provide: APP_INITIALIZER,
381
- useFactory: initServices,
382
- deps: [AbpNavbarService, AbpToolbarService, AbpSettingsService],
383
- multi: true,
384
- };
385
- function initServices(navbar, abpToolbar, setting) {
386
- function init() {
387
- abpToolbar.listenNavItems();
388
- setting.setUpListeners();
389
- navbar.initRoutes();
390
- }
391
- return init;
380
+ const INIT_SERVICE_PROVIDER = {
381
+ provide: APP_INITIALIZER,
382
+ useFactory: initServices,
383
+ deps: [AbpNavbarService, AbpToolbarService, AbpSettingsService],
384
+ multi: true,
385
+ };
386
+ function initServices(navbar, abpToolbar, setting) {
387
+ function init() {
388
+ abpToolbar.listenNavItems();
389
+ setting.setUpListeners();
390
+ navbar.initRoutes();
391
+ }
392
+ return init;
392
393
  }
393
394
 
394
- const LPX_TRANSLATE_PROVIDER = {
395
- provide: LPX_TRANSLATE_SERVICE_TOKEN,
396
- useClass: AbpTranslateService,
397
- };
398
- const translateKeys = {
399
- [LanguageTranslateKeys.SettingsTitle]: 'LeptonX::Language',
400
- [ThemeTranslateKeys.AppearanceTitle]: 'LeptonX::Appearance',
401
- [ThemeTranslateKeys.DarkMode]: 'LeptonX::Theme:dark',
402
- [ThemeTranslateKeys.LightMode]: 'LeptonX::Theme:light',
403
- [ThemeTranslateKeys.SemiDarkMode]: 'LeptonX::Theme:dim',
404
- [ThemeTranslateKeys.System]: 'LeptonX::Theme:system',
405
- };
406
- const LPX_TRANSLATE_KEYS_PROVIDER = {
407
- provide: LPX_TRANSLATE_KEY_MAP_TOKEN,
408
- multi: true,
409
- useValue: translateKeys,
395
+ const LPX_TRANSLATE_PROVIDER = {
396
+ provide: LPX_TRANSLATE_SERVICE_TOKEN,
397
+ useClass: AbpTranslateService,
398
+ };
399
+ const translateKeys = {
400
+ [LanguageTranslateKeys.SettingsTitle]: 'LeptonX::Language',
401
+ [ThemeTranslateKeys.AppearanceTitle]: 'LeptonX::Appearance',
402
+ [ThemeTranslateKeys.DarkMode]: 'LeptonX::Theme:dark',
403
+ [ThemeTranslateKeys.LightMode]: 'LeptonX::Theme:light',
404
+ [ThemeTranslateKeys.SemiDarkMode]: 'LeptonX::Theme:dim',
405
+ [ThemeTranslateKeys.System]: 'LeptonX::Theme:system',
410
406
  };
407
+ const LPX_TRANSLATE_KEYS_PROVIDER = {
408
+ provide: LPX_TRANSLATE_KEY_MAP_TOKEN,
409
+ multi: true,
410
+ useValue: translateKeys,
411
+ };
412
+
413
+ const LEPTON_X_USER_MENU_PROVIDERS = [
414
+ {
415
+ provide: APP_INITIALIZER,
416
+ useFactory: configureUserMenu,
417
+ deps: [Injector],
418
+ multi: true,
419
+ },
420
+ ];
421
+ function configureUserMenu(injector) {
422
+ const userMenu = injector.get(UserMenuService);
423
+ const authService = injector.get(AuthService);
424
+ const navigateToManageProfile = injector.get(NAVIGATE_TO_MANAGE_PROFILE);
425
+ const navigateToMySecurityLogs = injector.get(NAVIGATE_TO_MY_SECURITY_LOGS);
426
+ const configStateService = injector.get(ConfigStateService);
427
+ const impersonateService = injector.get(ImpersonationService);
428
+ const openMyLinkUsersModal = injector.get(OPEN_MY_LINK_USERS_MODAL, null);
429
+ const openAuthorityDelegationModal = injector.get(OPEN_AUTHORITY_DELEGATION_MODAL, null);
430
+ return () => {
431
+ userMenu.addItems([
432
+ {
433
+ id: eUserMenuItems.LinkedAccounts,
434
+ order: 100,
435
+ textTemplate: {
436
+ icon: 'bi bi-link',
437
+ text: 'AbpAccount::LinkedAccounts',
438
+ },
439
+ action: () => openMyLinkUsersModal(),
440
+ visible: () => !!openMyLinkUsersModal,
441
+ },
442
+ {
443
+ id: eUserMenuItems.AuthorityDelegation,
444
+ order: 100,
445
+ textTemplate: {
446
+ text: 'AbpAccount::AuthorityDelegation',
447
+ icon: 'fa fa-users',
448
+ },
449
+ action: () => openAuthorityDelegationModal(),
450
+ },
451
+ {
452
+ id: eUserMenuItems.MyAccount,
453
+ order: 100,
454
+ textTemplate: {
455
+ icon: 'bi bi-sliders',
456
+ text: 'AbpAccount::MyAccount',
457
+ },
458
+ action: () => navigateToManageProfile(),
459
+ },
460
+ {
461
+ id: eUserMenuItems.SecurityLogs,
462
+ order: 100,
463
+ textTemplate: {
464
+ icon: 'bi bi-list-ul',
465
+ text: 'AbpAccount::MySecurityLogs',
466
+ },
467
+ action: () => navigateToMySecurityLogs(),
468
+ },
469
+ {
470
+ id: eUserMenuItems.Logout,
471
+ order: 102,
472
+ textTemplate: {
473
+ icon: 'bi bi-box-arrow-right',
474
+ text: 'AbpUi::Logout',
475
+ },
476
+ action: () => {
477
+ authService.logout().subscribe();
478
+ },
479
+ },
480
+ {
481
+ id: eUserMenuItems.BackToImpersonator,
482
+ order: 101,
483
+ textTemplate: {
484
+ text: 'AbpAccount::BackToImpersonator',
485
+ icon: 'fa fa-arrow-left',
486
+ },
487
+ visible: () => {
488
+ const { currentUser: { impersonatorUserId: userId }, } = configStateService.getAll();
489
+ return !!userId;
490
+ },
491
+ action: () => impersonateService.impersonate({}).subscribe(),
492
+ },
493
+ ]);
494
+ };
495
+ }
411
496
 
412
- const LEPTON_X_USER_MENU_PROVIDERS = [
413
- {
414
- provide: APP_INITIALIZER,
415
- useFactory: configureUserMenu,
416
- deps: [Injector],
417
- multi: true,
418
- },
419
- ];
420
- function configureUserMenu(injector) {
421
- const userMenu = injector.get(UserMenuService);
422
- const authService = injector.get(AuthService);
423
- const navigateToManageProfile = injector.get(NAVIGATE_TO_MANAGE_PROFILE);
424
- const navigateToMySecurityLogs = injector.get(NAVIGATE_TO_MY_SECURITY_LOGS);
425
- const configStateService = injector.get(ConfigStateService);
426
- const impersonateService = injector.get(ImpersonationService);
427
- const openMyLinkUsersModal = injector.get(OPEN_MY_LINK_USERS_MODAL, null);
428
- const openAuthorityDelegationModal = injector.get(OPEN_AUTHORITY_DELEGATION_MODAL, null);
429
- return () => {
430
- userMenu.addItems([
431
- {
432
- id: eUserMenuItems.LinkedAccounts,
433
- order: 100,
434
- textTemplate: {
435
- icon: 'bi bi-link',
436
- text: 'AbpAccount::LinkedAccounts',
437
- },
438
- action: () => openMyLinkUsersModal(),
439
- visible: () => !!openMyLinkUsersModal,
440
- },
441
- {
442
- id: eUserMenuItems.AuthorityDelegation,
443
- order: 100,
444
- textTemplate: {
445
- text: 'AbpAccount::AuthorityDelegation',
446
- icon: 'fa fa-users',
447
- },
448
- action: () => openAuthorityDelegationModal(),
449
- },
450
- {
451
- id: eUserMenuItems.MyAccount,
452
- order: 100,
453
- textTemplate: {
454
- icon: 'bi bi-sliders',
455
- text: 'AbpAccount::MyAccount',
456
- },
457
- action: () => navigateToManageProfile(),
458
- },
459
- {
460
- id: eUserMenuItems.SecurityLogs,
461
- order: 100,
462
- textTemplate: {
463
- icon: 'bi bi-list-ul',
464
- text: 'AbpAccount::MySecurityLogs',
465
- },
466
- action: () => navigateToMySecurityLogs(),
467
- },
468
- {
469
- id: eUserMenuItems.Logout,
470
- order: 102,
471
- textTemplate: {
472
- icon: 'bi bi-box-arrow-right',
473
- text: 'AbpUi::Logout',
474
- },
475
- action: () => {
476
- authService.logout().subscribe();
477
- },
478
- },
479
- {
480
- id: eUserMenuItems.BackToImpersonator,
481
- order: 101,
482
- textTemplate: {
483
- text: 'AbpAccount::BackToImpersonator',
484
- icon: 'fa fa-arrow-left',
485
- },
486
- visible: () => {
487
- const { currentUser: { impersonatorUserId: userId }, } = configStateService.getAll();
488
- return !!userId;
489
- },
490
- action: () => impersonateService.impersonate({}).subscribe(),
491
- },
492
- ]);
493
- };
497
+ const ACCOUNT_LAYOUT_PROVIDER = {
498
+ provide: APP_INITIALIZER,
499
+ useFactory: initAccountLayout,
500
+ deps: [Injector],
501
+ multi: true,
502
+ };
503
+ function initAccountLayout(injector) {
504
+ function init() {
505
+ const replaceableComponents = injector.get(ReplaceableComponentsService);
506
+ replaceableComponents.add({
507
+ key: "Theme.AccountLayoutComponent" /* eThemeLeptonXComponents.AccountLayout */,
508
+ component: AccountLayoutComponent,
509
+ });
510
+ }
511
+ return init;
494
512
  }
495
513
 
496
- class ThemeLeptonXModule {
497
- static forRoot(options) {
498
- return {
499
- ngModule: ThemeLeptonXModule,
500
- providers: [
501
- LPX_STYLE_PROVIDER,
502
- PROFILE_PICTURE_PROVIDERS,
503
- LEPTON_X_USER_MENU_PROVIDERS,
504
- INIT_SERVICE_PROVIDER,
505
- AbpValidationErrorModule.forRoot().providers,
506
- // TODO: muhammed: Create an injection token for theme settings
507
- LpxModule.forRoot({
508
- ...createLpxModuleOptions(options),
509
- }).providers,
510
- LPX_TRANSLATE_KEYS_PROVIDER,
511
- LPX_TRANSLATE_PROVIDER,
512
- LeptonXAbpCoreModule.forRoot().providers,
513
- ],
514
- };
515
- }
516
- }
517
- ThemeLeptonXModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThemeLeptonXModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
518
- ThemeLeptonXModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ThemeLeptonXModule, imports: [HttpErrorModule], exports: [HttpErrorModule] });
519
- ThemeLeptonXModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThemeLeptonXModule, imports: [HttpErrorModule, HttpErrorModule] });
520
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThemeLeptonXModule, decorators: [{
521
- type: NgModule,
522
- args: [{
523
- imports: [HttpErrorModule],
524
- exports: [HttpErrorModule],
525
- }]
526
- }] });
527
- function createLpxModuleOptions(options) {
528
- return {
529
- ...options,
530
- styleFactory: (styles) => {
531
- styles.push({
532
- bundleName: 'abp-bundle',
533
- });
534
- if (options?.styleFactory) {
535
- return options.styleFactory(styles);
536
- }
537
- return styles;
538
- },
539
- };
514
+ class ThemeLeptonXModule {
515
+ static forRoot(options) {
516
+ return {
517
+ ngModule: ThemeLeptonXModule,
518
+ providers: [
519
+ LPX_STYLE_PROVIDER,
520
+ PROFILE_PICTURE_PROVIDERS,
521
+ LEPTON_X_USER_MENU_PROVIDERS,
522
+ INIT_SERVICE_PROVIDER,
523
+ AbpValidationErrorModule.forRoot().providers,
524
+ // TODO: muhammed: Create an injection token for theme settings
525
+ LpxModule.forRoot({
526
+ ...createLpxModuleOptions(options),
527
+ }).providers,
528
+ LPX_TRANSLATE_KEYS_PROVIDER,
529
+ LPX_TRANSLATE_PROVIDER,
530
+ LeptonXAbpCoreModule.forRoot().providers,
531
+ ACCOUNT_LAYOUT_PROVIDER,
532
+ ],
533
+ };
534
+ }
535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ThemeLeptonXModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
536
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: ThemeLeptonXModule, imports: [HttpErrorModule], exports: [HttpErrorModule] }); }
537
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ThemeLeptonXModule, imports: [HttpErrorModule, HttpErrorModule] }); }
538
+ }
539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: ThemeLeptonXModule, decorators: [{
540
+ type: NgModule,
541
+ args: [{
542
+ imports: [HttpErrorModule],
543
+ exports: [HttpErrorModule],
544
+ }]
545
+ }] });
546
+ function createLpxModuleOptions(options) {
547
+ return {
548
+ ...options,
549
+ styleFactory: (styles) => {
550
+ styles.push({
551
+ bundleName: 'abp-bundle',
552
+ });
553
+ if (options?.styleFactory) {
554
+ return options.styleFactory(styles);
555
+ }
556
+ return styles;
557
+ },
558
+ };
540
559
  }
541
560
 
542
- /**
543
- * Generated bundle index. Do not edit.
561
+ /**
562
+ * Generated bundle index. Do not edit.
544
563
  */
545
564
 
546
565
  export { AbpAuthService, AbpSettingsService, AbpToolbarService, AbpTranslateService, AbpValidationErrorComponent, AbpValidationErrorModule, HttpErrorComponent, HttpErrorModule, LPX_TRANSLATE_KEY_MAP_TOKEN, ThemeLeptonXModule, eUserMenuItems };