@abp/ng.theme.shared 5.0.0-rc.1 → 5.0.2

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 (207) hide show
  1. package/abp-ng.theme.shared.d.ts +5 -5
  2. package/bundles/abp-ng.theme.shared-extensions.umd.js +1749 -1748
  3. package/bundles/abp-ng.theme.shared-extensions.umd.js.map +1 -1
  4. package/bundles/abp-ng.theme.shared-testing.umd.js +41 -41
  5. package/bundles/abp-ng.theme.shared.umd.js +2316 -2316
  6. package/bundles/abp-ng.theme.shared.umd.js.map +1 -1
  7. package/esm2015/abp-ng.theme.shared.js +4 -4
  8. package/esm2015/extensions/abp-ng.theme.shared-extensions.js +4 -4
  9. package/esm2015/extensions/lib/adapters/date-time.adapter.js +33 -33
  10. package/esm2015/extensions/lib/adapters/date.adapter.js +40 -40
  11. package/esm2015/extensions/lib/adapters/time.adapter.js +35 -35
  12. package/esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js +24 -24
  13. package/esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js +73 -73
  14. package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js +164 -164
  15. package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js +70 -70
  16. package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js +133 -133
  17. package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js +45 -45
  18. package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js +45 -45
  19. package/esm2015/extensions/lib/constants/extra-properties.js +1 -1
  20. package/esm2015/extensions/lib/directives/disabled.directive.js +28 -28
  21. package/esm2015/extensions/lib/directives/prop-data.directive.js +40 -40
  22. package/esm2015/extensions/lib/enums/props.enum.js +1 -1
  23. package/esm2015/extensions/lib/models/actions.js +45 -45
  24. package/esm2015/extensions/lib/models/entity-actions.js +28 -28
  25. package/esm2015/extensions/lib/models/entity-props.js +36 -34
  26. package/esm2015/extensions/lib/models/form-props.js +51 -51
  27. package/esm2015/extensions/lib/models/internal/object-extensions.js +1 -1
  28. package/esm2015/extensions/lib/models/object-extensions.js +2 -2
  29. package/esm2015/extensions/lib/models/props.js +49 -49
  30. package/esm2015/extensions/lib/models/toolbar-actions.js +40 -40
  31. package/esm2015/extensions/lib/services/extensions.service.js +23 -23
  32. package/esm2015/extensions/lib/tokens/extensions.token.js +6 -6
  33. package/esm2015/extensions/lib/ui-extensions.module.js +91 -91
  34. package/esm2015/extensions/lib/utils/actions.util.js +8 -8
  35. package/esm2015/extensions/lib/utils/enum.util.js +41 -41
  36. package/esm2015/extensions/lib/utils/factory.util.js +3 -3
  37. package/esm2015/extensions/lib/utils/form-props.util.js +50 -50
  38. package/esm2015/extensions/lib/utils/localization.util.js +12 -12
  39. package/esm2015/extensions/lib/utils/props.util.js +13 -13
  40. package/esm2015/extensions/lib/utils/state.util.js +123 -123
  41. package/esm2015/extensions/lib/utils/typeahead.util.js +51 -51
  42. package/esm2015/extensions/lib/utils/validation.util.js +10 -10
  43. package/esm2015/extensions/public-api.js +27 -27
  44. package/esm2015/lib/animations/bounce.animations.js +16 -16
  45. package/esm2015/lib/animations/collapse.animations.js +49 -49
  46. package/esm2015/lib/animations/fade.animations.js +37 -37
  47. package/esm2015/lib/animations/index.js +6 -6
  48. package/esm2015/lib/animations/modal.animations.js +10 -10
  49. package/esm2015/lib/animations/slide.animations.js +7 -7
  50. package/esm2015/lib/animations/toast.animations.js +12 -12
  51. package/esm2015/lib/components/breadcrumb/breadcrumb.component.js +48 -48
  52. package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js +21 -21
  53. package/esm2015/lib/components/button/button.component.js +71 -71
  54. package/esm2015/lib/components/confirmation/confirmation.component.js +39 -39
  55. package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js +65 -65
  56. package/esm2015/lib/components/index.js +12 -12
  57. package/esm2015/lib/components/loader-bar/loader-bar.component.js +101 -101
  58. package/esm2015/lib/components/loading/loading.component.js +17 -17
  59. package/esm2015/lib/components/modal/modal-close.directive.js +27 -27
  60. package/esm2015/lib/components/modal/modal-ref.service.js +25 -25
  61. package/esm2015/lib/components/modal/modal.component.js +188 -188
  62. package/esm2015/lib/components/toast/toast.component.js +60 -60
  63. package/esm2015/lib/components/toast-container/toast-container.component.js +48 -48
  64. package/esm2015/lib/constants/styles.js +1 -1
  65. package/esm2015/lib/constants/validation.js +14 -14
  66. package/esm2015/lib/directives/ellipsis.directive.js +62 -62
  67. package/esm2015/lib/directives/index.js +4 -4
  68. package/esm2015/lib/directives/loading.directive.js +89 -89
  69. package/esm2015/lib/directives/ngx-datatable-default.directive.js +74 -74
  70. package/esm2015/lib/directives/ngx-datatable-list.directive.js +93 -93
  71. package/esm2015/lib/enums/index.js +1 -1
  72. package/esm2015/lib/enums/route-names.js +1 -1
  73. package/esm2015/lib/handlers/document-dir.handler.js +32 -32
  74. package/esm2015/lib/handlers/error.handler.js +291 -291
  75. package/esm2015/lib/handlers/index.js +2 -2
  76. package/esm2015/lib/models/common.js +1 -1
  77. package/esm2015/lib/models/confirmation.js +9 -9
  78. package/esm2015/lib/models/index.js +5 -5
  79. package/esm2015/lib/models/nav-item.js +6 -6
  80. package/esm2015/lib/models/statistics.js +1 -1
  81. package/esm2015/lib/models/toaster.js +1 -1
  82. package/esm2015/lib/providers/index.js +2 -2
  83. package/esm2015/lib/providers/ng-bootstrap-config.provider.js +16 -16
  84. package/esm2015/lib/providers/route.provider.js +17 -17
  85. package/esm2015/lib/services/confirmation.service.js +67 -67
  86. package/esm2015/lib/services/index.js +4 -4
  87. package/esm2015/lib/services/nav-items.service.js +50 -50
  88. package/esm2015/lib/services/page-alert.service.js +25 -25
  89. package/esm2015/lib/services/toaster.service.js +102 -102
  90. package/esm2015/lib/theme-shared.module.js +164 -164
  91. package/esm2015/lib/tokens/append-content.token.js +10 -10
  92. package/esm2015/lib/tokens/http-error.token.js +9 -9
  93. package/esm2015/lib/tokens/index.js +4 -4
  94. package/esm2015/lib/tokens/ngx-datatable-messages.token.js +7 -7
  95. package/esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js +2 -2
  96. package/esm2015/lib/utils/date-parser-formatter.js +58 -58
  97. package/esm2015/lib/utils/index.js +2 -2
  98. package/esm2015/lib/utils/validation-utils.js +32 -32
  99. package/esm2015/public-api.js +15 -15
  100. package/esm2015/testing/abp-ng.theme.shared-testing.js +4 -4
  101. package/esm2015/testing/lib/models/config.js +1 -1
  102. package/esm2015/testing/lib/models/index.js +1 -1
  103. package/esm2015/testing/lib/theme-shared-testing.module.js +42 -42
  104. package/esm2015/testing/public-api.js +3 -3
  105. package/extensions/abp-ng.theme.shared-extensions.d.ts +5 -5
  106. package/extensions/lib/adapters/date-time.adapter.d.ts +11 -11
  107. package/extensions/lib/adapters/date.adapter.d.ts +9 -9
  108. package/extensions/lib/adapters/time.adapter.d.ts +8 -8
  109. package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +14 -14
  110. package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +16 -16
  111. package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +37 -37
  112. package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +24 -24
  113. package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +35 -35
  114. package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +13 -13
  115. package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +12 -12
  116. package/extensions/lib/constants/extra-properties.d.ts +1 -1
  117. package/extensions/lib/directives/disabled.directive.d.ts +11 -11
  118. package/extensions/lib/directives/prop-data.directive.d.ts +19 -19
  119. package/extensions/lib/enums/props.enum.d.ts +15 -15
  120. package/extensions/lib/models/actions.d.ts +35 -35
  121. package/extensions/lib/models/entity-actions.d.ts +22 -22
  122. package/extensions/lib/models/entity-props.d.ts +29 -29
  123. package/extensions/lib/models/form-props.d.ts +42 -42
  124. package/extensions/lib/models/internal/object-extensions.d.ts +85 -85
  125. package/extensions/lib/models/object-extensions.d.ts +2 -2
  126. package/extensions/lib/models/props.d.ts +39 -39
  127. package/extensions/lib/models/toolbar-actions.d.ts +29 -29
  128. package/extensions/lib/services/extensions.service.d.ts +14 -14
  129. package/extensions/lib/tokens/extensions.token.d.ts +14 -14
  130. package/extensions/lib/ui-extensions.module.d.ts +23 -23
  131. package/extensions/lib/utils/actions.util.d.ts +7 -7
  132. package/extensions/lib/utils/enum.util.d.ts +7 -7
  133. package/extensions/lib/utils/factory.util.d.ts +1 -1
  134. package/extensions/lib/utils/form-props.util.d.ts +3 -3
  135. package/extensions/lib/utils/localization.util.d.ts +3 -3
  136. package/extensions/lib/utils/props.util.d.ts +8 -8
  137. package/extensions/lib/utils/state.util.d.ts +5 -5
  138. package/extensions/lib/utils/typeahead.util.d.ts +11 -11
  139. package/extensions/lib/utils/validation.util.d.ts +3 -3
  140. package/extensions/public-api.d.ts +27 -27
  141. package/fesm2015/abp-ng.theme.shared-extensions.js +1227 -1226
  142. package/fesm2015/abp-ng.theme.shared-extensions.js.map +1 -1
  143. package/fesm2015/abp-ng.theme.shared-testing.js +37 -37
  144. package/fesm2015/abp-ng.theme.shared.js +1858 -1858
  145. package/fesm2015/abp-ng.theme.shared.js.map +1 -1
  146. package/lib/animations/bounce.animations.d.ts +1 -1
  147. package/lib/animations/collapse.animations.d.ts +9 -9
  148. package/lib/animations/fade.animations.d.ts +10 -10
  149. package/lib/animations/index.d.ts +6 -6
  150. package/lib/animations/modal.animations.d.ts +2 -2
  151. package/lib/animations/slide.animations.d.ts +1 -1
  152. package/lib/animations/toast.animations.d.ts +1 -1
  153. package/lib/components/breadcrumb/breadcrumb.component.d.ts +16 -16
  154. package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +7 -7
  155. package/lib/components/button/button.component.d.ts +25 -25
  156. package/lib/components/confirmation/confirmation.component.d.ts +14 -14
  157. package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +27 -27
  158. package/lib/components/index.d.ts +12 -12
  159. package/lib/components/loader-bar/loader-bar.component.d.ts +33 -33
  160. package/lib/components/loading/loading.component.d.ts +5 -5
  161. package/lib/components/modal/modal-close.directive.d.ts +9 -9
  162. package/lib/components/modal/modal-ref.service.d.ts +13 -13
  163. package/lib/components/modal/modal.component.d.ts +50 -50
  164. package/lib/components/toast/toast.component.d.ts +14 -14
  165. package/lib/components/toast-container/toast-container.component.d.ts +18 -18
  166. package/lib/constants/styles.d.ts +2 -2
  167. package/lib/constants/validation.d.ts +14 -14
  168. package/lib/directives/ellipsis.directive.d.ts +21 -21
  169. package/lib/directives/index.d.ts +4 -4
  170. package/lib/directives/loading.directive.d.ts +25 -25
  171. package/lib/directives/ngx-datatable-default.directive.d.ts +30 -30
  172. package/lib/directives/ngx-datatable-list.directive.d.ts +24 -24
  173. package/lib/enums/index.d.ts +1 -1
  174. package/lib/enums/route-names.d.ts +3 -3
  175. package/lib/handlers/document-dir.handler.d.ts +13 -13
  176. package/lib/handlers/error.handler.d.ts +82 -82
  177. package/lib/handlers/index.d.ts +2 -2
  178. package/lib/models/common.d.ts +19 -19
  179. package/lib/models/confirmation.d.ts +25 -25
  180. package/lib/models/index.d.ts +5 -5
  181. package/lib/models/nav-item.d.ts +11 -11
  182. package/lib/models/statistics.d.ts +12 -12
  183. package/lib/models/toaster.d.ts +30 -30
  184. package/lib/providers/index.d.ts +2 -2
  185. package/lib/providers/ng-bootstrap-config.provider.d.ts +8 -8
  186. package/lib/providers/route.provider.d.ts +8 -8
  187. package/lib/services/confirmation.service.d.ts +21 -21
  188. package/lib/services/index.d.ts +4 -4
  189. package/lib/services/nav-items.service.d.ts +13 -13
  190. package/lib/services/page-alert.service.d.ts +18 -18
  191. package/lib/services/toaster.service.d.ts +60 -60
  192. package/lib/theme-shared.module.d.ts +33 -33
  193. package/lib/tokens/append-content.token.d.ts +2 -2
  194. package/lib/tokens/http-error.token.d.ts +5 -5
  195. package/lib/tokens/index.d.ts +4 -4
  196. package/lib/tokens/ngx-datatable-messages.token.d.ts +12 -12
  197. package/lib/tokens/suppress-unsaved-changes-warning.token.d.ts +2 -2
  198. package/lib/utils/date-parser-formatter.d.ts +12 -12
  199. package/lib/utils/index.d.ts +2 -2
  200. package/lib/utils/validation-utils.d.ts +3 -3
  201. package/package.json +4 -4
  202. package/public-api.d.ts +12 -12
  203. package/testing/abp-ng.theme.shared-testing.d.ts +5 -5
  204. package/testing/lib/models/config.d.ts +4 -4
  205. package/testing/lib/models/index.d.ts +1 -1
  206. package/testing/lib/theme-shared-testing.module.d.ts +14 -14
  207. package/testing/public-api.d.ts +3 -3
@@ -18,223 +18,223 @@ import { HttpErrorResponse } from '@angular/common/http';
18
18
  import { NgxValidateCoreModule, VALIDATION_BLUEPRINTS, VALIDATION_MAP_ERRORS_FN, defaultMapErrorsFn, VALIDATION_VALIDATE_ON_SUBMIT, validatePassword } from '@ngx-validate/core';
19
19
  import { Validators } from '@angular/forms';
20
20
 
21
- const bounceIn = animation([
22
- style({ opacity: '0', display: '{{ display }}' }),
23
- animate('{{ time}} {{ easing }}', keyframes([
24
- style({ opacity: '0', transform: '{{ transform }} scale(0.0)', offset: 0 }),
25
- style({ opacity: '0', transform: '{{ transform }} scale(0.8)', offset: 0.5 }),
26
- style({ opacity: '1', transform: '{{ transform }} scale(1.0)', offset: 1 }),
27
- ])),
28
- ], {
29
- params: {
30
- time: '350ms',
31
- easing: 'cubic-bezier(.7,.31,.72,1.47)',
32
- display: 'block',
33
- transform: 'translate(-50%, -50%)',
34
- },
21
+ const bounceIn = animation([
22
+ style({ opacity: '0', display: '{{ display }}' }),
23
+ animate('{{ time}} {{ easing }}', keyframes([
24
+ style({ opacity: '0', transform: '{{ transform }} scale(0.0)', offset: 0 }),
25
+ style({ opacity: '0', transform: '{{ transform }} scale(0.8)', offset: 0.5 }),
26
+ style({ opacity: '1', transform: '{{ transform }} scale(1.0)', offset: 1 }),
27
+ ])),
28
+ ], {
29
+ params: {
30
+ time: '350ms',
31
+ easing: 'cubic-bezier(.7,.31,.72,1.47)',
32
+ display: 'block',
33
+ transform: 'translate(-50%, -50%)',
34
+ },
35
35
  });
36
36
 
37
- const collapseY = animation([
38
- style({ height: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
39
- animate('{{ time }} {{ easing }}', style({ height: '0', padding: '0px' })),
40
- ], { params: { time: '350ms', easing: 'ease' } });
41
- const collapseYWithMargin = animation([
42
- style({ 'margin-top': '0' }),
43
- animate('{{ time }} {{ easing }}', style({ 'margin-left': '-100%' })),
44
- ], {
45
- params: { time: '500ms', easing: 'ease' },
46
- });
47
- const collapseX = animation([
48
- style({ width: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
49
- animate('{{ time }} {{ easing }}', style({ width: '0', padding: '0px' })),
50
- ], { params: { time: '350ms', easing: 'ease' } });
51
- const expandY = animation([
52
- style({ height: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
53
- animate('{{ time }} {{ easing }}', style({ height: '*', padding: '*' })),
54
- ], { params: { time: '350ms', easing: 'ease' } });
55
- const expandYWithMargin = animation([
56
- style({ 'margin-top': '-100%' }),
57
- animate('{{ time }} {{ easing }}', style({ 'margin-top': '0' })),
58
- ], {
59
- params: { time: '500ms', easing: 'ease' },
60
- });
61
- const expandX = animation([
62
- style({ width: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
63
- animate('{{ time }} {{ easing }}', style({ width: '*', padding: '*' })),
64
- ], { params: { time: '350ms', easing: 'ease' } });
65
- const collapse = trigger('collapse', [
66
- state('collapsed', style({ height: '0', overflow: 'hidden' })),
67
- state('expanded', style({ height: '*', overflow: 'hidden' })),
68
- transition('expanded => collapsed', useAnimation(collapseY)),
69
- transition('collapsed => expanded', useAnimation(expandY)),
70
- ]);
71
- const collapseWithMargin = trigger('collapseWithMargin', [
72
- state('collapsed', style({ 'margin-top': '-100%' })),
73
- state('expanded', style({ 'margin-top': '0' })),
74
- transition('expanded => collapsed', useAnimation(collapseYWithMargin), {
75
- params: { time: '400ms', easing: 'linear' },
76
- }),
77
- transition('collapsed => expanded', useAnimation(expandYWithMargin)),
78
- ]);
79
- const collapseLinearWithMargin = trigger('collapseLinearWithMargin', [
80
- state('collapsed', style({ 'margin-top': '-100vh' })),
81
- state('expanded', style({ 'margin-top': '0' })),
82
- transition('expanded => collapsed', useAnimation(collapseYWithMargin, { params: { time: '200ms', easing: 'linear' } })),
83
- transition('collapsed => expanded', useAnimation(expandYWithMargin, { params: { time: '250ms', easing: 'linear' } })),
37
+ const collapseY = animation([
38
+ style({ height: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
39
+ animate('{{ time }} {{ easing }}', style({ height: '0', padding: '0px' })),
40
+ ], { params: { time: '350ms', easing: 'ease' } });
41
+ const collapseYWithMargin = animation([
42
+ style({ 'margin-top': '0' }),
43
+ animate('{{ time }} {{ easing }}', style({ 'margin-left': '-100%' })),
44
+ ], {
45
+ params: { time: '500ms', easing: 'ease' },
46
+ });
47
+ const collapseX = animation([
48
+ style({ width: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
49
+ animate('{{ time }} {{ easing }}', style({ width: '0', padding: '0px' })),
50
+ ], { params: { time: '350ms', easing: 'ease' } });
51
+ const expandY = animation([
52
+ style({ height: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
53
+ animate('{{ time }} {{ easing }}', style({ height: '*', padding: '*' })),
54
+ ], { params: { time: '350ms', easing: 'ease' } });
55
+ const expandYWithMargin = animation([
56
+ style({ 'margin-top': '-100%' }),
57
+ animate('{{ time }} {{ easing }}', style({ 'margin-top': '0' })),
58
+ ], {
59
+ params: { time: '500ms', easing: 'ease' },
60
+ });
61
+ const expandX = animation([
62
+ style({ width: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
63
+ animate('{{ time }} {{ easing }}', style({ width: '*', padding: '*' })),
64
+ ], { params: { time: '350ms', easing: 'ease' } });
65
+ const collapse = trigger('collapse', [
66
+ state('collapsed', style({ height: '0', overflow: 'hidden' })),
67
+ state('expanded', style({ height: '*', overflow: 'hidden' })),
68
+ transition('expanded => collapsed', useAnimation(collapseY)),
69
+ transition('collapsed => expanded', useAnimation(expandY)),
70
+ ]);
71
+ const collapseWithMargin = trigger('collapseWithMargin', [
72
+ state('collapsed', style({ 'margin-top': '-100%' })),
73
+ state('expanded', style({ 'margin-top': '0' })),
74
+ transition('expanded => collapsed', useAnimation(collapseYWithMargin), {
75
+ params: { time: '400ms', easing: 'linear' },
76
+ }),
77
+ transition('collapsed => expanded', useAnimation(expandYWithMargin)),
78
+ ]);
79
+ const collapseLinearWithMargin = trigger('collapseLinearWithMargin', [
80
+ state('collapsed', style({ 'margin-top': '-100vh' })),
81
+ state('expanded', style({ 'margin-top': '0' })),
82
+ transition('expanded => collapsed', useAnimation(collapseYWithMargin, { params: { time: '200ms', easing: 'linear' } })),
83
+ transition('collapsed => expanded', useAnimation(expandYWithMargin, { params: { time: '250ms', easing: 'linear' } })),
84
84
  ]);
85
85
 
86
- const fadeIn = animation([style({ opacity: '0' }), animate('{{ time}} {{ easing }}', style({ opacity: '1' }))], {
87
- params: { time: '350ms', easing: 'ease' },
88
- });
89
- const fadeOut = animation([style({ opacity: '1' }), animate('{{ time}} {{ easing }}', style({ opacity: '0' }))], { params: { time: '350ms', easing: 'ease' } });
90
- const fadeInDown = animation([
91
- style({ opacity: '0', transform: '{{ transform }} translateY(-20px)' }),
92
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateY(0)' })),
93
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
94
- const fadeInUp = animation([
95
- style({ opacity: '0', transform: '{{ transform }} translateY(20px)' }),
96
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateY(0)' })),
97
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
98
- const fadeInLeft = animation([
99
- style({ opacity: '0', transform: '{{ transform }} translateX(20px)' }),
100
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateX(0)' })),
101
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
102
- const fadeInRight = animation([
103
- style({ opacity: '0', transform: '{{ transform }} translateX(-20px)' }),
104
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateX(0)' })),
105
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
106
- const fadeOutDown = animation([
107
- style({ opacity: '1', transform: '{{ transform }} translateY(0)' }),
108
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateY(20px)' })),
109
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
110
- const fadeOutUp = animation([
111
- style({ opacity: '1', transform: '{{ transform }} translateY(0)' }),
112
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateY(-20px)' })),
113
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
114
- const fadeOutLeft = animation([
115
- style({ opacity: '1', transform: '{{ transform }} translateX(0)' }),
116
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateX(20px)' })),
117
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
118
- const fadeOutRight = animation([
119
- style({ opacity: '1', transform: '{{ transform }} translateX(0)' }),
120
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateX(-20px)' })),
86
+ const fadeIn = animation([style({ opacity: '0' }), animate('{{ time}} {{ easing }}', style({ opacity: '1' }))], {
87
+ params: { time: '350ms', easing: 'ease' },
88
+ });
89
+ const fadeOut = animation([style({ opacity: '1' }), animate('{{ time}} {{ easing }}', style({ opacity: '0' }))], { params: { time: '350ms', easing: 'ease' } });
90
+ const fadeInDown = animation([
91
+ style({ opacity: '0', transform: '{{ transform }} translateY(-20px)' }),
92
+ animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateY(0)' })),
93
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
94
+ const fadeInUp = animation([
95
+ style({ opacity: '0', transform: '{{ transform }} translateY(20px)' }),
96
+ animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateY(0)' })),
97
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
98
+ const fadeInLeft = animation([
99
+ style({ opacity: '0', transform: '{{ transform }} translateX(20px)' }),
100
+ animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateX(0)' })),
101
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
102
+ const fadeInRight = animation([
103
+ style({ opacity: '0', transform: '{{ transform }} translateX(-20px)' }),
104
+ animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateX(0)' })),
105
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
106
+ const fadeOutDown = animation([
107
+ style({ opacity: '1', transform: '{{ transform }} translateY(0)' }),
108
+ animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateY(20px)' })),
109
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
110
+ const fadeOutUp = animation([
111
+ style({ opacity: '1', transform: '{{ transform }} translateY(0)' }),
112
+ animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateY(-20px)' })),
113
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
114
+ const fadeOutLeft = animation([
115
+ style({ opacity: '1', transform: '{{ transform }} translateX(0)' }),
116
+ animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateX(20px)' })),
117
+ ], { params: { time: '350ms', easing: 'ease', transform: '' } });
118
+ const fadeOutRight = animation([
119
+ style({ opacity: '1', transform: '{{ transform }} translateX(0)' }),
120
+ animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateX(-20px)' })),
121
121
  ], { params: { time: '350ms', easing: 'ease', transform: '' } });
122
122
 
123
- const fadeAnimation = trigger('fade', [
124
- transition(':enter', useAnimation(fadeIn)),
125
- transition(':leave', useAnimation(fadeOut)),
126
- ]);
127
- const dialogAnimation = trigger('dialog', [
128
- transition(':enter', useAnimation(fadeInDown)),
129
- transition(':leave', useAnimation(fadeOut)),
123
+ const fadeAnimation = trigger('fade', [
124
+ transition(':enter', useAnimation(fadeIn)),
125
+ transition(':leave', useAnimation(fadeOut)),
126
+ ]);
127
+ const dialogAnimation = trigger('dialog', [
128
+ transition(':enter', useAnimation(fadeInDown)),
129
+ transition(':leave', useAnimation(fadeOut)),
130
130
  ]);
131
131
 
132
- const slideFromBottom = trigger('slideFromBottom', [
133
- transition('* <=> *', [
134
- style({ 'margin-top': '20px', opacity: '0' }),
135
- animate('0.2s ease-out', style({ opacity: '1', 'margin-top': '0px' })),
136
- ]),
132
+ const slideFromBottom = trigger('slideFromBottom', [
133
+ transition('* <=> *', [
134
+ style({ 'margin-top': '20px', opacity: '0' }),
135
+ animate('0.2s ease-out', style({ opacity: '1', 'margin-top': '0px' })),
136
+ ]),
137
137
  ]);
138
138
 
139
- const toastInOut = trigger('toastInOut', [
140
- transition('* <=> *', [
141
- query(':enter', [
142
- style({ opacity: 0, transform: 'translateY(20px)' }),
143
- animate('350ms ease', style({ opacity: 1, transform: 'translateY(0)' })),
144
- ], { optional: true }),
145
- query(':leave', animate('450ms ease', style({ opacity: 0 })), {
146
- optional: true,
147
- }),
148
- ]),
139
+ const toastInOut = trigger('toastInOut', [
140
+ transition('* <=> *', [
141
+ query(':enter', [
142
+ style({ opacity: 0, transform: 'translateY(20px)' }),
143
+ animate('350ms ease', style({ opacity: 1, transform: 'translateY(0)' })),
144
+ ], { optional: true }),
145
+ query(':leave', animate('450ms ease', style({ opacity: 0 })), {
146
+ optional: true,
147
+ }),
148
+ ]),
149
149
  ]);
150
150
 
151
- class BreadcrumbItemsComponent {
152
- constructor() {
153
- this.items = [];
154
- }
155
- }
156
- BreadcrumbItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
157
- BreadcrumbItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: { items: "items" }, ngImport: i0, template: "<ol class=\"breadcrumb\" *ngIf=\"items.length\">\n <li class=\"breadcrumb-item\">\n <a routerLink=\"/\"><i class=\"fa fa-home\"></i> </a>\n </li>\n <li\n *ngFor=\"let item of items; let last = last\"\n class=\"breadcrumb-item\"\n [class.active]=\"last\"\n aria-current=\"page\"\n >\n <ng-container\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\n ></ng-container>\n </li>\n</ol>\n\n<ng-template #linkTemplate let-item>\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\n</ng-template>\n\n<ng-template #textTemplate let-item>\n {{ item.name | abpLocalization }}\n</ng-template>\n", directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "abpLocalization": i2.LocalizationPipe } });
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbItemsComponent, decorators: [{
159
- type: Component,
160
- args: [{
161
- selector: 'abp-breadcrumb-items',
162
- templateUrl: './breadcrumb-items.component.html',
163
- }]
164
- }], propDecorators: { items: [{
165
- type: Input
151
+ class BreadcrumbItemsComponent {
152
+ constructor() {
153
+ this.items = [];
154
+ }
155
+ }
156
+ BreadcrumbItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
157
+ BreadcrumbItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: { items: "items" }, ngImport: i0, template: "<ol class=\"breadcrumb\" *ngIf=\"items.length\">\n <li class=\"breadcrumb-item\">\n <a routerLink=\"/\"><i class=\"fa fa-home\"></i> </a>\n </li>\n <li\n *ngFor=\"let item of items; let last = last\"\n class=\"breadcrumb-item\"\n [class.active]=\"last\"\n aria-current=\"page\"\n >\n <ng-container\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\n ></ng-container>\n </li>\n</ol>\n\n<ng-template #linkTemplate let-item>\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\n</ng-template>\n\n<ng-template #textTemplate let-item>\n {{ item.name | abpLocalization }}\n</ng-template>\n", directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "abpLocalization": i2.LocalizationPipe } });
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbItemsComponent, decorators: [{
159
+ type: Component,
160
+ args: [{
161
+ selector: 'abp-breadcrumb-items',
162
+ templateUrl: './breadcrumb-items.component.html',
163
+ }]
164
+ }], propDecorators: { items: [{
165
+ type: Input
166
166
  }] } });
167
167
 
168
- class BreadcrumbComponent {
169
- constructor(cdRef, router, routes, subscription, routerEvents) {
170
- this.cdRef = cdRef;
171
- this.router = router;
172
- this.routes = routes;
173
- this.subscription = subscription;
174
- this.routerEvents = routerEvents;
175
- this.segments = [];
176
- }
177
- ngOnInit() {
178
- this.subscription.addOne(this.routerEvents.getNavigationEvents('End').pipe(startWith(null), map(() => this.routes.search({ path: getRoutePath(this.router) }))), route => {
179
- this.segments = [];
180
- if (route) {
181
- let node = { parent: route };
182
- while (node.parent) {
183
- node = node.parent;
184
- const { parent, children, isLeaf, path } = node, segment = __rest(node, ["parent", "children", "isLeaf", "path"]);
185
- if (!isAdministration(segment))
186
- this.segments.unshift(segment);
187
- }
188
- this.cdRef.detectChanges();
189
- }
190
- });
191
- }
192
- }
193
- BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.Router }, { token: i2.RoutesService }, { token: i2.SubscriptionService }, { token: i2.RouterEvents }], target: i0.ɵɵFactoryTarget.Component });
194
- BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: BreadcrumbComponent, selector: "abp-breadcrumb", providers: [SubscriptionService], ngImport: i0, template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\n", components: [{ type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbComponent, decorators: [{
196
- type: Component,
197
- args: [{
198
- selector: 'abp-breadcrumb',
199
- templateUrl: './breadcrumb.component.html',
200
- changeDetection: ChangeDetectionStrategy.OnPush,
201
- providers: [SubscriptionService],
202
- }]
203
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.Router }, { type: i2.RoutesService }, { type: i2.SubscriptionService }, { type: i2.RouterEvents }]; } });
204
- function isAdministration(route) {
205
- return route.name === "AbpUiNavigation::Menu:Administration" /* Administration */;
206
- }
207
-
208
- class ButtonComponent {
209
- constructor(renderer) {
210
- this.renderer = renderer;
211
- this.buttonId = '';
212
- this.buttonClass = 'btn btn-primary';
213
- this.buttonType = 'button';
214
- this.loading = false;
215
- this.disabled = false;
216
- this.click = new EventEmitter();
217
- this.focus = new EventEmitter();
218
- this.blur = new EventEmitter();
219
- this.abpClick = new EventEmitter();
220
- this.abpFocus = new EventEmitter();
221
- this.abpBlur = new EventEmitter();
222
- }
223
- get icon() {
224
- return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`;
225
- }
226
- ngOnInit() {
227
- if (this.attributes) {
228
- Object.keys(this.attributes).forEach(key => {
229
- var _a;
230
- if ((_a = this.attributes) === null || _a === void 0 ? void 0 : _a[key]) {
231
- this.renderer.setAttribute(this.buttonRef.nativeElement, key, this.attributes[key]);
232
- }
233
- });
234
- }
235
- }
236
- }
237
- ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
168
+ class BreadcrumbComponent {
169
+ constructor(cdRef, router, routes, subscription, routerEvents) {
170
+ this.cdRef = cdRef;
171
+ this.router = router;
172
+ this.routes = routes;
173
+ this.subscription = subscription;
174
+ this.routerEvents = routerEvents;
175
+ this.segments = [];
176
+ }
177
+ ngOnInit() {
178
+ this.subscription.addOne(this.routerEvents.getNavigationEvents('End').pipe(startWith(null), map(() => this.routes.search({ path: getRoutePath(this.router) }))), route => {
179
+ this.segments = [];
180
+ if (route) {
181
+ let node = { parent: route };
182
+ while (node.parent) {
183
+ node = node.parent;
184
+ const { parent, children, isLeaf, path } = node, segment = __rest(node, ["parent", "children", "isLeaf", "path"]);
185
+ if (!isAdministration(segment))
186
+ this.segments.unshift(segment);
187
+ }
188
+ this.cdRef.detectChanges();
189
+ }
190
+ });
191
+ }
192
+ }
193
+ BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.Router }, { token: i2.RoutesService }, { token: i2.SubscriptionService }, { token: i2.RouterEvents }], target: i0.ɵɵFactoryTarget.Component });
194
+ BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: BreadcrumbComponent, selector: "abp-breadcrumb", providers: [SubscriptionService], ngImport: i0, template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\n", components: [{ type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BreadcrumbComponent, decorators: [{
196
+ type: Component,
197
+ args: [{
198
+ selector: 'abp-breadcrumb',
199
+ templateUrl: './breadcrumb.component.html',
200
+ changeDetection: ChangeDetectionStrategy.OnPush,
201
+ providers: [SubscriptionService],
202
+ }]
203
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.Router }, { type: i2.RoutesService }, { type: i2.SubscriptionService }, { type: i2.RouterEvents }]; } });
204
+ function isAdministration(route) {
205
+ return route.name === "AbpUiNavigation::Menu:Administration" /* Administration */;
206
+ }
207
+
208
+ class ButtonComponent {
209
+ constructor(renderer) {
210
+ this.renderer = renderer;
211
+ this.buttonId = '';
212
+ this.buttonClass = 'btn btn-primary';
213
+ this.buttonType = 'button';
214
+ this.loading = false;
215
+ this.disabled = false;
216
+ this.click = new EventEmitter();
217
+ this.focus = new EventEmitter();
218
+ this.blur = new EventEmitter();
219
+ this.abpClick = new EventEmitter();
220
+ this.abpFocus = new EventEmitter();
221
+ this.abpBlur = new EventEmitter();
222
+ }
223
+ get icon() {
224
+ return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`;
225
+ }
226
+ ngOnInit() {
227
+ if (this.attributes) {
228
+ Object.keys(this.attributes).forEach(key => {
229
+ var _a;
230
+ if ((_a = this.attributes) === null || _a === void 0 ? void 0 : _a[key]) {
231
+ this.renderer.setAttribute(this.buttonRef.nativeElement, key, this.attributes[key]);
232
+ }
233
+ });
234
+ }
235
+ }
236
+ }
237
+ ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
238
238
  ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ButtonComponent, selector: "abp-button", inputs: { buttonId: "buttonId", buttonClass: "buttonClass", buttonType: "buttonType", iconClass: "iconClass", loading: "loading", disabled: "disabled", attributes: "attributes" }, outputs: { click: "click", focus: "focus", blur: "blur", abpClick: "abpClick", abpFocus: "abpFocus", abpBlur: "abpBlur" }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true, static: true }], ngImport: i0, template: `
239
239
  <button
240
240
  #button
@@ -248,11 +248,11 @@ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
248
248
  >
249
249
  <i [ngClass]="icon" class="me-1"></i><ng-content></ng-content>
250
250
  </button>
251
- `, isInline: true, directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] });
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
253
- type: Component,
254
- args: [{
255
- selector: 'abp-button',
251
+ `, isInline: true, directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] });
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
253
+ type: Component,
254
+ args: [{
255
+ selector: 'abp-button',
256
256
  template: `
257
257
  <button
258
258
  #button
@@ -266,218 +266,218 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
266
266
  >
267
267
  <i [ngClass]="icon" class="me-1"></i><ng-content></ng-content>
268
268
  </button>
269
- `,
270
- }]
271
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { buttonId: [{
272
- type: Input
273
- }], buttonClass: [{
274
- type: Input
275
- }], buttonType: [{
276
- type: Input
277
- }], iconClass: [{
278
- type: Input
279
- }], loading: [{
280
- type: Input
281
- }], disabled: [{
282
- type: Input
283
- }], attributes: [{
284
- type: Input
285
- }], click: [{
286
- type: Output
287
- }], focus: [{
288
- type: Output
289
- }], blur: [{
290
- type: Output
291
- }], abpClick: [{
292
- type: Output
293
- }], abpFocus: [{
294
- type: Output
295
- }], abpBlur: [{
296
- type: Output
297
- }], buttonRef: [{
298
- type: ViewChild,
299
- args: ['button', { static: true }]
269
+ `,
270
+ }]
271
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { buttonId: [{
272
+ type: Input
273
+ }], buttonClass: [{
274
+ type: Input
275
+ }], buttonType: [{
276
+ type: Input
277
+ }], iconClass: [{
278
+ type: Input
279
+ }], loading: [{
280
+ type: Input
281
+ }], disabled: [{
282
+ type: Input
283
+ }], attributes: [{
284
+ type: Input
285
+ }], click: [{
286
+ type: Output
287
+ }], focus: [{
288
+ type: Output
289
+ }], blur: [{
290
+ type: Output
291
+ }], abpClick: [{
292
+ type: Output
293
+ }], abpFocus: [{
294
+ type: Output
295
+ }], abpBlur: [{
296
+ type: Output
297
+ }], buttonRef: [{
298
+ type: ViewChild,
299
+ args: ['button', { static: true }]
300
300
  }] } });
301
301
 
302
- var Confirmation;
303
- (function (Confirmation) {
304
- let Status;
305
- (function (Status) {
306
- Status["confirm"] = "confirm";
307
- Status["reject"] = "reject";
308
- Status["dismiss"] = "dismiss";
309
- })(Status = Confirmation.Status || (Confirmation.Status = {}));
302
+ var Confirmation;
303
+ (function (Confirmation) {
304
+ let Status;
305
+ (function (Status) {
306
+ Status["confirm"] = "confirm";
307
+ Status["reject"] = "reject";
308
+ Status["dismiss"] = "dismiss";
309
+ })(Status = Confirmation.Status || (Confirmation.Status = {}));
310
310
  })(Confirmation || (Confirmation = {}));
311
311
 
312
- class ConfirmationComponent {
313
- constructor() {
314
- this.confirm = Confirmation.Status.confirm;
315
- this.reject = Confirmation.Status.reject;
316
- this.dismiss = Confirmation.Status.dismiss;
317
- }
318
- close(status) {
319
- this.clear(status);
320
- }
321
- getIconClass({ severity }) {
322
- switch (severity) {
323
- case 'info':
324
- return 'fa-info-circle';
325
- case 'success':
326
- return 'fa-check-circle';
327
- case 'warning':
328
- return 'fa-exclamation-triangle';
329
- case 'error':
330
- return 'fa-times-circle';
331
- default:
332
- return 'fa-question-circle';
333
- }
334
- }
335
- }
336
- ConfirmationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
337
- ConfirmationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ConfirmationComponent, selector: "abp-confirmation", ngImport: i0, template: "<div class=\"confirmation\" *ngIf=\"confirmation$ | async as data\">\n <div\n class=\"confirmation-backdrop\"\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\n ></div>\n <div class=\"confirmation-dialog\">\n <div class=\"icon-container\" [ngClass]=\"data.severity\" *ngIf=\"data.severity\">\n <i class=\"fa icon\" [ngClass]=\"getIconClass(data)\"></i>\n </div>\n <div class=\"content\">\n <h1\n class=\"title\"\n *ngIf=\"data.title\"\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\n ></h1>\n <p\n class=\"message\"\n *ngIf=\"data.message\"\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\n ></p>\n </div>\n <div class=\"footer\">\n <button\n id=\"cancel\"\n class=\"confirmation-button confirmation-button--reject\"\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\n *ngIf=\"!data?.options?.hideCancelBtn\"\n (click)=\"close(reject)\"\n ></button>\n <button\n id=\"confirm\"\n class=\"confirmation-button confirmation-button--approve\"\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\n *ngIf=\"!data?.options?.hideYesBtn\"\n (click)=\"close(confirm)\"\n ></button>\n </div>\n </div>\n</div>\n", styles: [".confirmation{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;margin:0 0 10px;padding:20px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;margin:10px auto;padding:20px;font-size:16px;font-weight:400;text-align:center}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;margin:10px 0 0;padding:20px;width:100%}.confirmation .confirmation-dialog .footer .confirmation-button{display:inline-block;margin:0 5px;padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:600}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe, "abpLocalization": i2.LocalizationPipe } });
338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationComponent, decorators: [{
339
- type: Component,
340
- args: [{
341
- selector: 'abp-confirmation',
342
- templateUrl: './confirmation.component.html',
343
- styleUrls: ['./confirmation.component.scss'],
344
- }]
312
+ class ConfirmationComponent {
313
+ constructor() {
314
+ this.confirm = Confirmation.Status.confirm;
315
+ this.reject = Confirmation.Status.reject;
316
+ this.dismiss = Confirmation.Status.dismiss;
317
+ }
318
+ close(status) {
319
+ this.clear(status);
320
+ }
321
+ getIconClass({ severity }) {
322
+ switch (severity) {
323
+ case 'info':
324
+ return 'fa-info-circle';
325
+ case 'success':
326
+ return 'fa-check-circle';
327
+ case 'warning':
328
+ return 'fa-exclamation-triangle';
329
+ case 'error':
330
+ return 'fa-times-circle';
331
+ default:
332
+ return 'fa-question-circle';
333
+ }
334
+ }
335
+ }
336
+ ConfirmationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
337
+ ConfirmationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ConfirmationComponent, selector: "abp-confirmation", ngImport: i0, template: "<div class=\"confirmation\" *ngIf=\"confirmation$ | async as data\">\n <div\n class=\"confirmation-backdrop\"\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\n ></div>\n <div class=\"confirmation-dialog\">\n <div class=\"icon-container\" [ngClass]=\"data.severity\" *ngIf=\"data.severity\">\n <i class=\"fa icon\" [ngClass]=\"getIconClass(data)\"></i>\n </div>\n <div class=\"content\">\n <h1\n class=\"title\"\n *ngIf=\"data.title\"\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\n ></h1>\n <p\n class=\"message\"\n *ngIf=\"data.message\"\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\n ></p>\n </div>\n <div class=\"footer\">\n <button\n id=\"cancel\"\n class=\"confirmation-button confirmation-button--reject\"\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\n *ngIf=\"!data?.options?.hideCancelBtn\"\n (click)=\"close(reject)\"\n ></button>\n <button\n id=\"confirm\"\n class=\"confirmation-button confirmation-button--approve\"\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\n *ngIf=\"!data?.options?.hideYesBtn\"\n (click)=\"close(confirm)\"\n ></button>\n </div>\n </div>\n</div>\n", styles: [".confirmation{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;margin:0 0 10px;padding:20px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;margin:10px auto;padding:20px;font-size:16px;font-weight:400;text-align:center}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;margin:10px 0 0;padding:20px;width:100%}.confirmation .confirmation-dialog .footer .confirmation-button{display:inline-block;margin:0 5px;padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:600}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe, "abpLocalization": i2.LocalizationPipe } });
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationComponent, decorators: [{
339
+ type: Component,
340
+ args: [{
341
+ selector: 'abp-confirmation',
342
+ templateUrl: './confirmation.component.html',
343
+ styleUrls: ['./confirmation.component.scss'],
344
+ }]
345
345
  }] });
346
346
 
347
- class HttpErrorWrapperComponent {
348
- constructor(subscription) {
349
- this.subscription = subscription;
350
- this.status = 0;
351
- this.title = 'Oops!';
352
- this.details = 'Sorry, an error has occured.';
353
- this.customComponent = undefined;
354
- this.hideCloseIcon = false;
355
- this.isHomeShow = true;
356
- }
357
- get statusText() {
358
- return this.status ? `[${this.status}]` : '';
359
- }
360
- ngOnInit() {
361
- var _a;
362
- this.backgroundColor =
363
- ((_a = window.getComputedStyle(document.body)) === null || _a === void 0 ? void 0 : _a.getPropertyValue('background-color')) || '#fff';
364
- }
365
- ngAfterViewInit() {
366
- if (this.customComponent) {
367
- const customComponentRef = this.cfRes
368
- .resolveComponentFactory(this.customComponent)
369
- .create(this.injector);
370
- customComponentRef.instance.errorStatus = this.status;
371
- customComponentRef.instance.destroy$ = this.destroy$;
372
- this.appRef.attachView(customComponentRef.hostView);
373
- if (this.containerRef) {
374
- this.containerRef.nativeElement.appendChild(customComponentRef.hostView.rootNodes[0]);
375
- }
376
- customComponentRef.changeDetectorRef.detectChanges();
377
- }
378
- const keyup$ = fromEvent(document, 'keyup').pipe(debounceTime(150), filter((key) => key && key.key === 'Escape'));
379
- this.subscription.addOne(keyup$, () => this.destroy());
380
- }
381
- ngOnDestroy() {
382
- this.destroy();
383
- }
384
- destroy() {
385
- this.destroy$.next();
386
- this.destroy$.complete();
387
- }
388
- }
389
- HttpErrorWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: HttpErrorWrapperComponent, deps: [{ token: i2.SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
390
- HttpErrorWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: HttpErrorWrapperComponent, selector: "abp-http-error-wrapper", providers: [SubscriptionService], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div\n #container\n id=\"abp-http-error-container\"\n class=\"error\"\n [style.backgroundColor]=\"backgroundColor\"\n>\n <button\n *ngIf=\"!hideCloseIcon\"\n id=\"abp-close-button\"\n type=\"button\"\n class=\"close me-2\"\n (click)=\"destroy()\"\n >\n <span aria-hidden=\"true\">&times;</span>\n </button>\n\n <div *ngIf=\"!customComponent\" class=\"row centered\">\n <div class=\"col-md-12\">\n <div class=\"error-template\">\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\n <div class=\"error-details\">\n {{ details | abpLocalization }}\n </div>\n <div class=\"error-actions\">\n <a\n *ngIf=\"isHomeShow\"\n (click)=\"destroy()\"\n routerLink=\"/\"\n class=\"btn btn-primary btn-md mt-2\"\n ><span class=\"glyphicon glyphicon-home\"></span>\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\n </a>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "abpLocalization": i2.LocalizationPipe } });
391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: HttpErrorWrapperComponent, decorators: [{
392
- type: Component,
393
- args: [{
394
- selector: 'abp-http-error-wrapper',
395
- templateUrl: './http-error-wrapper.component.html',
396
- styleUrls: ['http-error-wrapper.component.scss'],
397
- providers: [SubscriptionService],
398
- }]
399
- }], ctorParameters: function () { return [{ type: i2.SubscriptionService }]; }, propDecorators: { containerRef: [{
400
- type: ViewChild,
401
- args: ['container', { static: false }]
347
+ class HttpErrorWrapperComponent {
348
+ constructor(subscription) {
349
+ this.subscription = subscription;
350
+ this.status = 0;
351
+ this.title = 'Oops!';
352
+ this.details = 'Sorry, an error has occured.';
353
+ this.customComponent = undefined;
354
+ this.hideCloseIcon = false;
355
+ this.isHomeShow = true;
356
+ }
357
+ get statusText() {
358
+ return this.status ? `[${this.status}]` : '';
359
+ }
360
+ ngOnInit() {
361
+ var _a;
362
+ this.backgroundColor =
363
+ ((_a = window.getComputedStyle(document.body)) === null || _a === void 0 ? void 0 : _a.getPropertyValue('background-color')) || '#fff';
364
+ }
365
+ ngAfterViewInit() {
366
+ if (this.customComponent) {
367
+ const customComponentRef = this.cfRes
368
+ .resolveComponentFactory(this.customComponent)
369
+ .create(this.injector);
370
+ customComponentRef.instance.errorStatus = this.status;
371
+ customComponentRef.instance.destroy$ = this.destroy$;
372
+ this.appRef.attachView(customComponentRef.hostView);
373
+ if (this.containerRef) {
374
+ this.containerRef.nativeElement.appendChild(customComponentRef.hostView.rootNodes[0]);
375
+ }
376
+ customComponentRef.changeDetectorRef.detectChanges();
377
+ }
378
+ const keyup$ = fromEvent(document, 'keyup').pipe(debounceTime(150), filter((key) => key && key.key === 'Escape'));
379
+ this.subscription.addOne(keyup$, () => this.destroy());
380
+ }
381
+ ngOnDestroy() {
382
+ this.destroy();
383
+ }
384
+ destroy() {
385
+ this.destroy$.next();
386
+ this.destroy$.complete();
387
+ }
388
+ }
389
+ HttpErrorWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: HttpErrorWrapperComponent, deps: [{ token: i2.SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
390
+ HttpErrorWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: HttpErrorWrapperComponent, selector: "abp-http-error-wrapper", providers: [SubscriptionService], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div\n #container\n id=\"abp-http-error-container\"\n class=\"error\"\n [style.backgroundColor]=\"backgroundColor\"\n>\n <button\n *ngIf=\"!hideCloseIcon\"\n id=\"abp-close-button\"\n type=\"button\"\n class=\"btn-close me-2\"\n (click)=\"destroy()\"\n ></button>\n\n <div *ngIf=\"!customComponent\" class=\"row centered\">\n <div class=\"col-md-12\">\n <div class=\"error-template\">\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\n <div class=\"error-details\">\n {{ details | abpLocalization }}\n </div>\n <div class=\"error-actions\">\n <a\n *ngIf=\"isHomeShow\"\n (click)=\"destroy()\"\n routerLink=\"/\"\n class=\"btn btn-primary btn-md mt-2\"\n ><span class=\"glyphicon glyphicon-home\"></span>\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\n </a>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "abpLocalization": i2.LocalizationPipe } });
391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: HttpErrorWrapperComponent, decorators: [{
392
+ type: Component,
393
+ args: [{
394
+ selector: 'abp-http-error-wrapper',
395
+ templateUrl: './http-error-wrapper.component.html',
396
+ styleUrls: ['http-error-wrapper.component.scss'],
397
+ providers: [SubscriptionService],
398
+ }]
399
+ }], ctorParameters: function () { return [{ type: i2.SubscriptionService }]; }, propDecorators: { containerRef: [{
400
+ type: ViewChild,
401
+ args: ['container', { static: false }]
402
402
  }] } });
403
403
 
404
- class LoaderBarComponent {
405
- constructor(router, cdRef, subscription, httpWaitService, routerWaitService) {
406
- this.router = router;
407
- this.cdRef = cdRef;
408
- this.subscription = subscription;
409
- this.httpWaitService = httpWaitService;
410
- this.routerWaitService = routerWaitService;
411
- this.containerClass = 'abp-loader-bar';
412
- this.color = '#77b6ff';
413
- this.progressLevel = 0;
414
- this.interval = new Subscription();
415
- this.timer = new Subscription();
416
- this.intervalPeriod = 350;
417
- this.stopDelay = 800;
418
- this.clearProgress = () => {
419
- this.progressLevel = 0;
420
- this.cdRef.detectChanges();
421
- };
422
- this.reportProgress = () => {
423
- if (this.progressLevel < 75) {
424
- this.progressLevel += 1 + Math.random() * 9;
425
- }
426
- else if (this.progressLevel < 90) {
427
- this.progressLevel += 0.4;
428
- }
429
- else if (this.progressLevel < 100) {
430
- this.progressLevel += 0.1;
431
- }
432
- else {
433
- this.interval.unsubscribe();
434
- }
435
- this.cdRef.detectChanges();
436
- };
437
- }
438
- set isLoading(value) {
439
- this._isLoading = value;
440
- this.cdRef.detectChanges();
441
- }
442
- get isLoading() {
443
- return this._isLoading;
444
- }
445
- get boxShadow() {
446
- return `0 0 10px rgba(${this.color}, 0.5)`;
447
- }
448
- ngOnInit() {
449
- this.subscribeLoading();
450
- }
451
- subscribeLoading() {
452
- this.subscription.addOne(combineLatest([this.httpWaitService.getLoading$(), this.routerWaitService.getLoading$()]), ([httpLoading, routerLoading]) => {
453
- if (httpLoading || routerLoading)
454
- this.startLoading();
455
- else
456
- this.stopLoading();
457
- });
458
- }
459
- ngOnDestroy() {
460
- this.interval.unsubscribe();
461
- }
462
- startLoading() {
463
- if (this.isLoading || !this.interval.closed)
464
- return;
465
- this.isLoading = true;
466
- this.progressLevel = 0;
467
- this.cdRef.detectChanges();
468
- this.interval = timer(0, this.intervalPeriod).subscribe(this.reportProgress);
469
- this.timer.unsubscribe();
470
- }
471
- stopLoading() {
472
- this.interval.unsubscribe();
473
- this.progressLevel = 100;
474
- this.isLoading = false;
475
- if (!this.timer.closed)
476
- return;
477
- this.timer = timer(this.stopDelay).subscribe(this.clearProgress);
478
- }
479
- }
480
- LoaderBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoaderBarComponent, deps: [{ token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: i2.SubscriptionService }, { token: i2.HttpWaitService }, { token: i2.RouterWaitService }], target: i0.ɵɵFactoryTarget.Component });
404
+ class LoaderBarComponent {
405
+ constructor(router, cdRef, subscription, httpWaitService, routerWaitService) {
406
+ this.router = router;
407
+ this.cdRef = cdRef;
408
+ this.subscription = subscription;
409
+ this.httpWaitService = httpWaitService;
410
+ this.routerWaitService = routerWaitService;
411
+ this.containerClass = 'abp-loader-bar';
412
+ this.color = '#77b6ff';
413
+ this.progressLevel = 0;
414
+ this.interval = new Subscription();
415
+ this.timer = new Subscription();
416
+ this.intervalPeriod = 350;
417
+ this.stopDelay = 800;
418
+ this.clearProgress = () => {
419
+ this.progressLevel = 0;
420
+ this.cdRef.detectChanges();
421
+ };
422
+ this.reportProgress = () => {
423
+ if (this.progressLevel < 75) {
424
+ this.progressLevel += 1 + Math.random() * 9;
425
+ }
426
+ else if (this.progressLevel < 90) {
427
+ this.progressLevel += 0.4;
428
+ }
429
+ else if (this.progressLevel < 100) {
430
+ this.progressLevel += 0.1;
431
+ }
432
+ else {
433
+ this.interval.unsubscribe();
434
+ }
435
+ this.cdRef.detectChanges();
436
+ };
437
+ }
438
+ set isLoading(value) {
439
+ this._isLoading = value;
440
+ this.cdRef.detectChanges();
441
+ }
442
+ get isLoading() {
443
+ return this._isLoading;
444
+ }
445
+ get boxShadow() {
446
+ return `0 0 10px rgba(${this.color}, 0.5)`;
447
+ }
448
+ ngOnInit() {
449
+ this.subscribeLoading();
450
+ }
451
+ subscribeLoading() {
452
+ this.subscription.addOne(combineLatest([this.httpWaitService.getLoading$(), this.routerWaitService.getLoading$()]), ([httpLoading, routerLoading]) => {
453
+ if (httpLoading || routerLoading)
454
+ this.startLoading();
455
+ else
456
+ this.stopLoading();
457
+ });
458
+ }
459
+ ngOnDestroy() {
460
+ this.interval.unsubscribe();
461
+ }
462
+ startLoading() {
463
+ if (this.isLoading || !this.interval.closed)
464
+ return;
465
+ this.isLoading = true;
466
+ this.progressLevel = 0;
467
+ this.cdRef.detectChanges();
468
+ this.interval = timer(0, this.intervalPeriod).subscribe(this.reportProgress);
469
+ this.timer.unsubscribe();
470
+ }
471
+ stopLoading() {
472
+ this.interval.unsubscribe();
473
+ this.progressLevel = 100;
474
+ this.isLoading = false;
475
+ if (!this.timer.closed)
476
+ return;
477
+ this.timer = timer(this.stopDelay).subscribe(this.clearProgress);
478
+ }
479
+ }
480
+ LoaderBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoaderBarComponent, deps: [{ token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: i2.SubscriptionService }, { token: i2.HttpWaitService }, { token: i2.RouterWaitService }], target: i0.ɵɵFactoryTarget.Component });
481
481
  LoaderBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LoaderBarComponent, selector: "abp-loader-bar", inputs: { isLoading: "isLoading", containerClass: "containerClass", color: "color" }, providers: [SubscriptionService], ngImport: i0, template: `
482
482
  <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">
483
483
  <div
@@ -490,11 +490,11 @@ LoaderBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
490
490
  }"
491
491
  ></div>
492
492
  </div>
493
- `, isInline: true, styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
494
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoaderBarComponent, decorators: [{
495
- type: Component,
496
- args: [{
497
- selector: 'abp-loader-bar',
493
+ `, isInline: true, styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
494
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoaderBarComponent, decorators: [{
495
+ type: Component,
496
+ args: [{
497
+ selector: 'abp-loader-bar',
498
498
  template: `
499
499
  <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">
500
500
  <div
@@ -507,37 +507,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
507
507
  }"
508
508
  ></div>
509
509
  </div>
510
- `,
511
- styleUrls: ['./loader-bar.component.scss'],
512
- providers: [SubscriptionService],
513
- }]
514
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i0.ChangeDetectorRef }, { type: i2.SubscriptionService }, { type: i2.HttpWaitService }, { type: i2.RouterWaitService }]; }, propDecorators: { isLoading: [{
515
- type: Input
516
- }], containerClass: [{
517
- type: Input
518
- }], color: [{
519
- type: Input
510
+ `,
511
+ styleUrls: ['./loader-bar.component.scss'],
512
+ providers: [SubscriptionService],
513
+ }]
514
+ }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i0.ChangeDetectorRef }, { type: i2.SubscriptionService }, { type: i2.HttpWaitService }, { type: i2.RouterWaitService }]; }, propDecorators: { isLoading: [{
515
+ type: Input
516
+ }], containerClass: [{
517
+ type: Input
518
+ }], color: [{
519
+ type: Input
520
520
  }] } });
521
521
 
522
- class LoadingComponent {
523
- }
524
- LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
522
+ class LoadingComponent {
523
+ }
524
+ LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
525
525
  LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LoadingComponent, selector: "abp-loading", ngImport: i0, template: `
526
526
  <div class="abp-loading">
527
527
  <i class="fa fa-spinner fa-pulse abp-spinner"></i>
528
528
  </div>
529
- `, isInline: true, styles: ["\n .abp-loading {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 1040;\n }\n\n .abp-loading .abp-spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 14px;\n -moz-transform: translateX(-50%) translateY(-50%);\n -o-transform: translateX(-50%) translateY(-50%);\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n }\n "], encapsulation: i0.ViewEncapsulation.None });
530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingComponent, decorators: [{
531
- type: Component,
532
- args: [{
533
- selector: 'abp-loading',
529
+ `, isInline: true, styles: ["\n .abp-loading {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 1040;\n }\n\n .abp-loading .abp-spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 14px;\n -moz-transform: translateX(-50%) translateY(-50%);\n -o-transform: translateX(-50%) translateY(-50%);\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n }\n "], encapsulation: i0.ViewEncapsulation.None });
530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingComponent, decorators: [{
531
+ type: Component,
532
+ args: [{
533
+ selector: 'abp-loading',
534
534
  template: `
535
535
  <div class="abp-loading">
536
536
  <i class="fa fa-spinner fa-pulse abp-spinner"></i>
537
537
  </div>
538
- `,
539
- encapsulation: ViewEncapsulation.None,
540
- styles: [
538
+ `,
539
+ encapsulation: ViewEncapsulation.None,
540
+ styles: [
541
541
  `
542
542
  .abp-loading {
543
543
  position: absolute;
@@ -559,1238 +559,1238 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
559
559
  -webkit-transform: translateX(-50%) translateY(-50%);
560
560
  transform: translateX(-50%) translateY(-50%);
561
561
  }
562
- `,
563
- ],
564
- }]
562
+ `,
563
+ ],
564
+ }]
565
565
  }] });
566
566
 
567
- class ConfirmationService {
568
- constructor(contentProjectionService) {
569
- this.contentProjectionService = contentProjectionService;
570
- this.confirmation$ = new ReplaySubject(1);
571
- this.clear = (status = Confirmation.Status.dismiss) => {
572
- this.confirmation$.next();
573
- this.status$.next(status);
574
- };
575
- }
576
- setContainer() {
577
- this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ConfirmationComponent, {
578
- confirmation$: this.confirmation$,
579
- clear: this.clear,
580
- }));
581
- setTimeout(() => {
582
- this.containerComponentRef.changeDetectorRef.detectChanges();
583
- }, 0);
584
- }
585
- info(message, title, options) {
586
- return this.show(message, title, 'info', options);
587
- }
588
- success(message, title, options) {
589
- return this.show(message, title, 'success', options);
590
- }
591
- warn(message, title, options) {
592
- return this.show(message, title, 'warning', options);
593
- }
594
- error(message, title, options) {
595
- return this.show(message, title, 'error', options);
596
- }
597
- show(message, title, severity, options = {}) {
598
- if (!this.containerComponentRef)
599
- this.setContainer();
600
- this.confirmation$.next({
601
- message,
602
- title,
603
- severity: severity || 'neutral',
604
- options,
605
- });
606
- this.status$ = new Subject();
607
- const { dismissible = true } = options;
608
- if (dismissible)
609
- this.listenToEscape();
610
- return this.status$;
611
- }
612
- listenToEscape() {
613
- fromEvent(document, 'keyup')
614
- .pipe(takeUntil(this.status$), debounceTime(150), filter((key) => key && key.key === 'Escape'))
615
- .subscribe(_ => {
616
- this.clear();
617
- });
618
- }
619
- }
620
- ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationService, deps: [{ token: i2.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable });
621
- ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationService, decorators: [{
623
- type: Injectable,
624
- args: [{ providedIn: 'root' }]
567
+ class ConfirmationService {
568
+ constructor(contentProjectionService) {
569
+ this.contentProjectionService = contentProjectionService;
570
+ this.confirmation$ = new ReplaySubject(1);
571
+ this.clear = (status = Confirmation.Status.dismiss) => {
572
+ this.confirmation$.next();
573
+ this.status$.next(status);
574
+ };
575
+ }
576
+ setContainer() {
577
+ this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ConfirmationComponent, {
578
+ confirmation$: this.confirmation$,
579
+ clear: this.clear,
580
+ }));
581
+ setTimeout(() => {
582
+ this.containerComponentRef.changeDetectorRef.detectChanges();
583
+ }, 0);
584
+ }
585
+ info(message, title, options) {
586
+ return this.show(message, title, 'info', options);
587
+ }
588
+ success(message, title, options) {
589
+ return this.show(message, title, 'success', options);
590
+ }
591
+ warn(message, title, options) {
592
+ return this.show(message, title, 'warning', options);
593
+ }
594
+ error(message, title, options) {
595
+ return this.show(message, title, 'error', options);
596
+ }
597
+ show(message, title, severity, options = {}) {
598
+ if (!this.containerComponentRef)
599
+ this.setContainer();
600
+ this.confirmation$.next({
601
+ message,
602
+ title,
603
+ severity: severity || 'neutral',
604
+ options,
605
+ });
606
+ this.status$ = new Subject();
607
+ const { dismissible = true } = options;
608
+ if (dismissible)
609
+ this.listenToEscape();
610
+ return this.status$;
611
+ }
612
+ listenToEscape() {
613
+ fromEvent(document, 'keyup')
614
+ .pipe(takeUntil(this.status$), debounceTime(150), filter((key) => key && key.key === 'Escape'))
615
+ .subscribe(_ => {
616
+ this.clear();
617
+ });
618
+ }
619
+ }
620
+ ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationService, deps: [{ token: i2.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable });
621
+ ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ConfirmationService, decorators: [{
623
+ type: Injectable,
624
+ args: [{ providedIn: 'root' }]
625
625
  }], ctorParameters: function () { return [{ type: i2.ContentProjectionService }]; } });
626
626
 
627
627
  const SUPPRESS_UNSAVED_CHANGES_WARNING = new InjectionToken('SUPPRESS_UNSAVED_CHANGES_WARNING');
628
628
 
629
- class ModalRefService {
630
- constructor() {
631
- this.modalRefs = [];
632
- }
633
- register(modal) {
634
- this.modalRefs.push(modal);
635
- }
636
- unregister(modal) {
637
- const index = this.modalRefs.indexOf(modal);
638
- if (index > -1) {
639
- this.modalRefs.splice(index, 1);
640
- }
641
- }
642
- dismissAll(mode) {
643
- this.modalRefs.forEach(modal => modal.dismiss(mode));
644
- }
645
- }
646
- ModalRefService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalRefService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
647
- ModalRefService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalRefService, providedIn: 'root' });
648
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalRefService, decorators: [{
649
- type: Injectable,
650
- args: [{ providedIn: 'root' }]
629
+ class ModalRefService {
630
+ constructor() {
631
+ this.modalRefs = [];
632
+ }
633
+ register(modal) {
634
+ this.modalRefs.push(modal);
635
+ }
636
+ unregister(modal) {
637
+ const index = this.modalRefs.indexOf(modal);
638
+ if (index > -1) {
639
+ this.modalRefs.splice(index, 1);
640
+ }
641
+ }
642
+ dismissAll(mode) {
643
+ this.modalRefs.forEach(modal => modal.dismiss(mode));
644
+ }
645
+ }
646
+ ModalRefService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalRefService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
647
+ ModalRefService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalRefService, providedIn: 'root' });
648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalRefService, decorators: [{
649
+ type: Injectable,
650
+ args: [{ providedIn: 'root' }]
651
651
  }] });
652
652
 
653
- class ModalComponent {
654
- constructor(confirmationService, subscription, suppressUnsavedChangesWarningToken, modal, modalRefService) {
655
- this.confirmationService = confirmationService;
656
- this.subscription = subscription;
657
- this.suppressUnsavedChangesWarningToken = suppressUnsavedChangesWarningToken;
658
- this.modal = modal;
659
- this.modalRefService = modalRefService;
660
- this.options = {};
661
- this.suppressUnsavedChangesWarning = this.suppressUnsavedChangesWarningToken;
662
- this.visibleChange = new EventEmitter();
663
- this.init = new EventEmitter();
664
- this.appear = new EventEmitter();
665
- this.disappear = new EventEmitter();
666
- this._visible = false;
667
- this._busy = false;
668
- this.isConfirmationOpen = false;
669
- this.destroy$ = new Subject();
670
- this.modalIdentifier = `modal-${uuid()}`;
671
- this.toggle$ = new Subject();
672
- this.initToggleStream();
673
- }
674
- get visible() {
675
- return this._visible;
676
- }
677
- set visible(value) {
678
- if (typeof value !== 'boolean')
679
- return;
680
- this.toggle$.next(value);
681
- }
682
- get busy() {
683
- return this._busy;
684
- }
685
- set busy(value) {
686
- if (this.abpSubmit && this.abpSubmit instanceof ButtonComponent) {
687
- this.abpSubmit.loading = value;
688
- }
689
- this._busy = value;
690
- }
691
- get modalWindowRef() {
692
- return document.querySelector(`ngb-modal-window.${this.modalIdentifier}`);
693
- }
694
- get isFormDirty() {
695
- var _a;
696
- return Boolean((_a = this.modalWindowRef) === null || _a === void 0 ? void 0 : _a.querySelector('.ng-dirty'));
697
- }
698
- ngOnInit() {
699
- this.modalRefService.register(this);
700
- }
701
- dismiss(mode) {
702
- switch (mode) {
703
- case 'hard':
704
- this.visible = false;
705
- break;
706
- case 'soft':
707
- this.close();
708
- break;
709
- default:
710
- break;
711
- }
712
- }
713
- initToggleStream() {
714
- this.subscription.addOne(this.toggle$.pipe(debounceTime(0), distinctUntilChanged()), value => this.toggle(value));
715
- }
716
- toggle(value) {
717
- var _a;
718
- this._visible = value;
719
- this.visibleChange.emit(value);
720
- if (!value) {
721
- (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.dismiss();
722
- this.disappear.emit();
723
- this.destroy$.next();
724
- return;
725
- }
726
- setTimeout(() => this.listen(), 0);
727
- this.modalRef = this.modal.open(this.modalContent, Object.assign(Object.assign({ size: 'md', centered: false, keyboard: false, scrollable: true, beforeDismiss: () => {
728
- if (!this.visible)
729
- return true;
730
- this.close();
731
- return !this.visible;
732
- } }, this.options), { windowClass: `${this.options.windowClass || ''} ${this.modalIdentifier}` }));
733
- this.appear.emit();
734
- }
735
- ngOnDestroy() {
736
- this.modalRefService.unregister(this);
737
- this.toggle(false);
738
- this.destroy$.next();
739
- }
740
- close() {
741
- if (this.busy)
742
- return;
743
- if (this.isFormDirty && !this.suppressUnsavedChangesWarning) {
744
- if (this.isConfirmationOpen)
745
- return;
746
- this.isConfirmationOpen = true;
747
- this.confirmationService
748
- .warn('AbpAccount::AreYouSureYouWantToCancelEditingWarningMessage', 'AbpAccount::AreYouSure', { dismissible: false })
749
- .subscribe((status) => {
750
- this.isConfirmationOpen = false;
751
- if (status === Confirmation.Status.confirm) {
752
- this.visible = false;
753
- }
754
- });
755
- }
756
- else {
757
- this.visible = false;
758
- }
759
- }
760
- listen() {
761
- if (this.modalWindowRef) {
762
- fromEvent(this.modalWindowRef, 'keyup')
763
- .pipe(takeUntil(this.destroy$), debounceTime(150), filter((key) => key && key.key === 'Escape'))
764
- .subscribe(() => this.close());
765
- }
766
- fromEvent(window, 'beforeunload')
767
- .pipe(takeUntil(this.destroy$))
768
- .subscribe(event => {
769
- // TODO: check this
770
- if (!this.isFormDirty || this.suppressUnsavedChangesWarning) {
771
- event.preventDefault();
772
- }
773
- });
774
- this.init.emit();
775
- }
776
- }
777
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalComponent, deps: [{ token: ConfirmationService }, { token: i2.SubscriptionService }, { token: SUPPRESS_UNSAVED_CHANGES_WARNING, optional: true }, { token: i3.NgbModal }, { token: ModalRefService }], target: i0.ɵɵFactoryTarget.Component });
778
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ModalComponent, selector: "abp-modal", inputs: { visible: "visible", busy: "busy", options: "options", suppressUnsavedChangesWarning: "suppressUnsavedChangesWarning" }, outputs: { visibleChange: "visibleChange", init: "init", appear: "appear", disappear: "disappear" }, providers: [SubscriptionService], queries: [{ propertyName: "abpHeader", first: true, predicate: ["abpHeader"], descendants: true }, { propertyName: "abpBody", first: true, predicate: ["abpBody"], descendants: true }, { propertyName: "abpFooter", first: true, predicate: ["abpFooter"], descendants: true }, { propertyName: "abpSubmit", first: true, predicate: ButtonComponent, descendants: true, read: ButtonComponent }], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n<ng-template #modalContent let-modal>\n <div *ngIf=\"abpHeader\" id=\"abp-modal-header\" class=\"modal-header\">\n <ng-container *ngTemplateOutlet=\"abpHeader\"></ng-container>\n \u200B\n <button\n id=\"abp-modal-close-button\"\n type=\"button\"\n class=\"btn-sm btn-close\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\"\n ></button>\n </div>\n <div *ngIf=\"abpBody\" id=\"abp-modal-body\" class=\"modal-body\">\n <ng-container *ngTemplateOutlet=\"abpBody\"></ng-container>\n </div>\n <div *ngIf=\"abpFooter\" id=\"abp-modal-footer\" class=\"modal-footer\">\n <ng-container *ngTemplateOutlet=\"abpFooter\"></ng-container>\n </div>\n</ng-template>\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalComponent, decorators: [{
780
- type: Component,
781
- args: [{
782
- selector: 'abp-modal',
783
- templateUrl: './modal.component.html',
784
- styleUrls: ['./modal.component.scss'],
785
- providers: [SubscriptionService],
786
- }]
787
- }], ctorParameters: function () { return [{ type: ConfirmationService }, { type: i2.SubscriptionService }, { type: undefined, decorators: [{
788
- type: Optional
789
- }, {
790
- type: Inject,
791
- args: [SUPPRESS_UNSAVED_CHANGES_WARNING]
792
- }] }, { type: i3.NgbModal }, { type: ModalRefService }]; }, propDecorators: { visible: [{
793
- type: Input
794
- }], busy: [{
795
- type: Input
796
- }], options: [{
797
- type: Input
798
- }], suppressUnsavedChangesWarning: [{
799
- type: Input
800
- }], modalContent: [{
801
- type: ViewChild,
802
- args: ['modalContent']
803
- }], abpHeader: [{
804
- type: ContentChild,
805
- args: ['abpHeader', { static: false }]
806
- }], abpBody: [{
807
- type: ContentChild,
808
- args: ['abpBody', { static: false }]
809
- }], abpFooter: [{
810
- type: ContentChild,
811
- args: ['abpFooter', { static: false }]
812
- }], abpSubmit: [{
813
- type: ContentChild,
814
- args: [ButtonComponent, { static: false, read: ButtonComponent }]
815
- }], visibleChange: [{
816
- type: Output
817
- }], init: [{
818
- type: Output
819
- }], appear: [{
820
- type: Output
821
- }], disappear: [{
822
- type: Output
653
+ class ModalComponent {
654
+ constructor(confirmationService, subscription, suppressUnsavedChangesWarningToken, modal, modalRefService) {
655
+ this.confirmationService = confirmationService;
656
+ this.subscription = subscription;
657
+ this.suppressUnsavedChangesWarningToken = suppressUnsavedChangesWarningToken;
658
+ this.modal = modal;
659
+ this.modalRefService = modalRefService;
660
+ this.options = {};
661
+ this.suppressUnsavedChangesWarning = this.suppressUnsavedChangesWarningToken;
662
+ this.visibleChange = new EventEmitter();
663
+ this.init = new EventEmitter();
664
+ this.appear = new EventEmitter();
665
+ this.disappear = new EventEmitter();
666
+ this._visible = false;
667
+ this._busy = false;
668
+ this.isConfirmationOpen = false;
669
+ this.destroy$ = new Subject();
670
+ this.modalIdentifier = `modal-${uuid()}`;
671
+ this.toggle$ = new Subject();
672
+ this.initToggleStream();
673
+ }
674
+ get visible() {
675
+ return this._visible;
676
+ }
677
+ set visible(value) {
678
+ if (typeof value !== 'boolean')
679
+ return;
680
+ this.toggle$.next(value);
681
+ }
682
+ get busy() {
683
+ return this._busy;
684
+ }
685
+ set busy(value) {
686
+ if (this.abpSubmit && this.abpSubmit instanceof ButtonComponent) {
687
+ this.abpSubmit.loading = value;
688
+ }
689
+ this._busy = value;
690
+ }
691
+ get modalWindowRef() {
692
+ return document.querySelector(`ngb-modal-window.${this.modalIdentifier}`);
693
+ }
694
+ get isFormDirty() {
695
+ var _a;
696
+ return Boolean((_a = this.modalWindowRef) === null || _a === void 0 ? void 0 : _a.querySelector('.ng-dirty'));
697
+ }
698
+ ngOnInit() {
699
+ this.modalRefService.register(this);
700
+ }
701
+ dismiss(mode) {
702
+ switch (mode) {
703
+ case 'hard':
704
+ this.visible = false;
705
+ break;
706
+ case 'soft':
707
+ this.close();
708
+ break;
709
+ default:
710
+ break;
711
+ }
712
+ }
713
+ initToggleStream() {
714
+ this.subscription.addOne(this.toggle$.pipe(debounceTime(0), distinctUntilChanged()), value => this.toggle(value));
715
+ }
716
+ toggle(value) {
717
+ var _a;
718
+ this._visible = value;
719
+ this.visibleChange.emit(value);
720
+ if (!value) {
721
+ (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.dismiss();
722
+ this.disappear.emit();
723
+ this.destroy$.next();
724
+ return;
725
+ }
726
+ setTimeout(() => this.listen(), 0);
727
+ this.modalRef = this.modal.open(this.modalContent, Object.assign(Object.assign({ size: 'md', centered: false, keyboard: false, scrollable: true, beforeDismiss: () => {
728
+ if (!this.visible)
729
+ return true;
730
+ this.close();
731
+ return !this.visible;
732
+ } }, this.options), { windowClass: `${this.options.windowClass || ''} ${this.modalIdentifier}` }));
733
+ this.appear.emit();
734
+ }
735
+ ngOnDestroy() {
736
+ this.modalRefService.unregister(this);
737
+ this.toggle(false);
738
+ this.destroy$.next();
739
+ }
740
+ close() {
741
+ if (this.busy)
742
+ return;
743
+ if (this.isFormDirty && !this.suppressUnsavedChangesWarning) {
744
+ if (this.isConfirmationOpen)
745
+ return;
746
+ this.isConfirmationOpen = true;
747
+ this.confirmationService
748
+ .warn('AbpUi::AreYouSureYouWantToCancelEditingWarningMessage', 'AbpUi::AreYouSure', { dismissible: false })
749
+ .subscribe((status) => {
750
+ this.isConfirmationOpen = false;
751
+ if (status === Confirmation.Status.confirm) {
752
+ this.visible = false;
753
+ }
754
+ });
755
+ }
756
+ else {
757
+ this.visible = false;
758
+ }
759
+ }
760
+ listen() {
761
+ if (this.modalWindowRef) {
762
+ fromEvent(this.modalWindowRef, 'keyup')
763
+ .pipe(takeUntil(this.destroy$), debounceTime(150), filter((key) => key && key.key === 'Escape'))
764
+ .subscribe(() => this.close());
765
+ }
766
+ fromEvent(window, 'beforeunload')
767
+ .pipe(takeUntil(this.destroy$))
768
+ .subscribe(event => {
769
+ // TODO: check this
770
+ if (!this.isFormDirty || this.suppressUnsavedChangesWarning) {
771
+ event.preventDefault();
772
+ }
773
+ });
774
+ this.init.emit();
775
+ }
776
+ }
777
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalComponent, deps: [{ token: ConfirmationService }, { token: i2.SubscriptionService }, { token: SUPPRESS_UNSAVED_CHANGES_WARNING, optional: true }, { token: i3.NgbModal }, { token: ModalRefService }], target: i0.ɵɵFactoryTarget.Component });
778
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ModalComponent, selector: "abp-modal", inputs: { visible: "visible", busy: "busy", options: "options", suppressUnsavedChangesWarning: "suppressUnsavedChangesWarning" }, outputs: { visibleChange: "visibleChange", init: "init", appear: "appear", disappear: "disappear" }, providers: [SubscriptionService], queries: [{ propertyName: "abpHeader", first: true, predicate: ["abpHeader"], descendants: true }, { propertyName: "abpBody", first: true, predicate: ["abpBody"], descendants: true }, { propertyName: "abpFooter", first: true, predicate: ["abpFooter"], descendants: true }, { propertyName: "abpSubmit", first: true, predicate: ButtonComponent, descendants: true, read: ButtonComponent }], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n<ng-template #modalContent let-modal>\n <div *ngIf=\"abpHeader\" id=\"abp-modal-header\" class=\"modal-header\">\n <ng-container *ngTemplateOutlet=\"abpHeader\"></ng-container>\n \u200B\n <button\n id=\"abp-modal-close-button\"\n type=\"button\"\n class=\"btn-sm btn-close\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\"\n ></button>\n </div>\n <div *ngIf=\"abpBody\" id=\"abp-modal-body\" class=\"modal-body\">\n <ng-container *ngTemplateOutlet=\"abpBody\"></ng-container>\n </div>\n <div *ngIf=\"abpFooter\" id=\"abp-modal-footer\" class=\"modal-footer\">\n <ng-container *ngTemplateOutlet=\"abpFooter\"></ng-container>\n </div>\n</ng-template>\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalComponent, decorators: [{
780
+ type: Component,
781
+ args: [{
782
+ selector: 'abp-modal',
783
+ templateUrl: './modal.component.html',
784
+ styleUrls: ['./modal.component.scss'],
785
+ providers: [SubscriptionService],
786
+ }]
787
+ }], ctorParameters: function () { return [{ type: ConfirmationService }, { type: i2.SubscriptionService }, { type: undefined, decorators: [{
788
+ type: Optional
789
+ }, {
790
+ type: Inject,
791
+ args: [SUPPRESS_UNSAVED_CHANGES_WARNING]
792
+ }] }, { type: i3.NgbModal }, { type: ModalRefService }]; }, propDecorators: { visible: [{
793
+ type: Input
794
+ }], busy: [{
795
+ type: Input
796
+ }], options: [{
797
+ type: Input
798
+ }], suppressUnsavedChangesWarning: [{
799
+ type: Input
800
+ }], modalContent: [{
801
+ type: ViewChild,
802
+ args: ['modalContent']
803
+ }], abpHeader: [{
804
+ type: ContentChild,
805
+ args: ['abpHeader', { static: false }]
806
+ }], abpBody: [{
807
+ type: ContentChild,
808
+ args: ['abpBody', { static: false }]
809
+ }], abpFooter: [{
810
+ type: ContentChild,
811
+ args: ['abpFooter', { static: false }]
812
+ }], abpSubmit: [{
813
+ type: ContentChild,
814
+ args: [ButtonComponent, { static: false, read: ButtonComponent }]
815
+ }], visibleChange: [{
816
+ type: Output
817
+ }], init: [{
818
+ type: Output
819
+ }], appear: [{
820
+ type: Output
821
+ }], disappear: [{
822
+ type: Output
823
823
  }] } });
824
824
 
825
- class ModalCloseDirective {
826
- constructor(modal) {
827
- this.modal = modal;
828
- if (!modal) {
829
- console.error('Please use abpClose within an abp-modal');
830
- }
831
- }
832
- onClick() {
833
- var _a;
834
- (_a = this.modal) === null || _a === void 0 ? void 0 : _a.close();
835
- }
836
- }
837
- ModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalCloseDirective, deps: [{ token: ModalComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
838
- ModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ModalCloseDirective, selector: "[abpClose]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalCloseDirective, decorators: [{
840
- type: Directive,
841
- args: [{ selector: '[abpClose]' }]
842
- }], ctorParameters: function () { return [{ type: ModalComponent, decorators: [{
843
- type: Optional
844
- }] }]; }, propDecorators: { onClick: [{
845
- type: HostListener,
846
- args: ['click']
825
+ class ModalCloseDirective {
826
+ constructor(modal) {
827
+ this.modal = modal;
828
+ if (!modal) {
829
+ console.error('Please use abpClose within an abp-modal');
830
+ }
831
+ }
832
+ onClick() {
833
+ var _a;
834
+ (_a = this.modal) === null || _a === void 0 ? void 0 : _a.close();
835
+ }
836
+ }
837
+ ModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalCloseDirective, deps: [{ token: ModalComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
838
+ ModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ModalCloseDirective, selector: "[abpClose]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ModalCloseDirective, decorators: [{
840
+ type: Directive,
841
+ args: [{ selector: '[abpClose]' }]
842
+ }], ctorParameters: function () { return [{ type: ModalComponent, decorators: [{
843
+ type: Optional
844
+ }] }]; }, propDecorators: { onClick: [{
845
+ type: HostListener,
846
+ args: ['click']
847
847
  }] } });
848
848
 
849
- class ToastComponent {
850
- constructor() {
851
- this.remove = new EventEmitter();
852
- }
853
- get severityClass() {
854
- if (!this.toast || !this.toast.severity)
855
- return '';
856
- return `abp-toast-${this.toast.severity}`;
857
- }
858
- get iconClass() {
859
- switch (this.toast.severity) {
860
- case 'success':
861
- return 'fa-check-circle';
862
- case 'info':
863
- return 'fa-info-circle';
864
- case 'warning':
865
- return 'fa-exclamation-triangle';
866
- case 'error':
867
- return 'fa-times-circle';
868
- default:
869
- return 'fa-exclamation-circle';
870
- }
871
- }
872
- ngOnInit() {
873
- const { sticky, life } = this.toast.options || {};
874
- if (sticky)
875
- return;
876
- const timeout = life || 5000;
877
- setTimeout(() => {
878
- this.close();
879
- }, timeout);
880
- }
881
- close() {
882
- var _a;
883
- this.remove.emit((_a = this.toast.options) === null || _a === void 0 ? void 0 : _a.id);
884
- }
885
- tap() {
886
- var _a;
887
- if ((_a = this.toast.options) === null || _a === void 0 ? void 0 : _a.tapToDismiss)
888
- this.close();
889
- }
890
- }
891
- ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
892
- ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ToastComponent, selector: "abp-toast", inputs: { toast: "toast" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\n <div class=\"abp-toast-icon\">\n <i class=\"fa icon\" [ngClass]=\"iconClass\"></i>\n </div>\n <div class=\"abp-toast-content\">\n <button class=\"abp-toast-close-button\" (click)=\"close()\" *ngIf=\"toast.options?.closable\">\n <i class=\"fa fa-times\"></i>\n </button>\n <div class=\"abp-toast-title\">\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\n </div>\n <p\n class=\"abp-toast-message\"\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\n ></p>\n </div>\n</div>\n", styles: [".abp-toast{display:grid;grid-template-columns:50px 1fr;grid-gap:10px;gap:10px;margin:5px 0;padding:10px;border-radius:0;width:350px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e3e3e3;background-color:#e3e3e3;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #51a351;background-color:#51a351;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid #499249;background-color:#499249;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #2f96b4;background-color:#2f96b4;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid #2a85a0;background-color:#2a85a0;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #f89406;background-color:#f89406;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid #df8505;background-color:#df8505;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #bd362f;background-color:#bd362f;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid #a9302a;background-color:#a9302a;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:36px}.abp-toast .abp-toast-content{position:relative}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:25px;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "abpLocalization": i2.LocalizationPipe } });
893
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastComponent, decorators: [{
894
- type: Component,
895
- args: [{
896
- selector: 'abp-toast',
897
- templateUrl: './toast.component.html',
898
- styleUrls: ['./toast.component.scss'],
899
- }]
900
- }], propDecorators: { toast: [{
901
- type: Input
902
- }], remove: [{
903
- type: Output
849
+ class ToastComponent {
850
+ constructor() {
851
+ this.remove = new EventEmitter();
852
+ }
853
+ get severityClass() {
854
+ if (!this.toast || !this.toast.severity)
855
+ return '';
856
+ return `abp-toast-${this.toast.severity}`;
857
+ }
858
+ get iconClass() {
859
+ switch (this.toast.severity) {
860
+ case 'success':
861
+ return 'fa-check-circle';
862
+ case 'info':
863
+ return 'fa-info-circle';
864
+ case 'warning':
865
+ return 'fa-exclamation-triangle';
866
+ case 'error':
867
+ return 'fa-times-circle';
868
+ default:
869
+ return 'fa-exclamation-circle';
870
+ }
871
+ }
872
+ ngOnInit() {
873
+ const { sticky, life } = this.toast.options || {};
874
+ if (sticky)
875
+ return;
876
+ const timeout = life || 5000;
877
+ setTimeout(() => {
878
+ this.close();
879
+ }, timeout);
880
+ }
881
+ close() {
882
+ var _a;
883
+ this.remove.emit((_a = this.toast.options) === null || _a === void 0 ? void 0 : _a.id);
884
+ }
885
+ tap() {
886
+ var _a;
887
+ if ((_a = this.toast.options) === null || _a === void 0 ? void 0 : _a.tapToDismiss)
888
+ this.close();
889
+ }
890
+ }
891
+ ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
892
+ ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ToastComponent, selector: "abp-toast", inputs: { toast: "toast" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\n <div class=\"abp-toast-icon\">\n <i class=\"fa icon\" [ngClass]=\"iconClass\"></i>\n </div>\n <div class=\"abp-toast-content\">\n <button class=\"abp-toast-close-button\" (click)=\"close()\" *ngIf=\"toast.options?.closable\">\n <i class=\"fa fa-times\"></i>\n </button>\n <div class=\"abp-toast-title\">\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\n </div>\n <p\n class=\"abp-toast-message\"\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\n ></p>\n </div>\n</div>\n", styles: [".abp-toast{display:grid;grid-template-columns:50px 1fr;grid-gap:10px;gap:10px;margin:5px 0;padding:10px;border-radius:0;width:350px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9999;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e3e3e3;background-color:#e3e3e3;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #51a351;background-color:#51a351;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid #499249;background-color:#499249;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #2f96b4;background-color:#2f96b4;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid #2a85a0;background-color:#2a85a0;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #f89406;background-color:#f89406;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid #df8505;background-color:#df8505;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #bd362f;background-color:#bd362f;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid #a9302a;background-color:#a9302a;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:36px}.abp-toast .abp-toast-content{position:relative}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:25px;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "abpLocalization": i2.LocalizationPipe } });
893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastComponent, decorators: [{
894
+ type: Component,
895
+ args: [{
896
+ selector: 'abp-toast',
897
+ templateUrl: './toast.component.html',
898
+ styleUrls: ['./toast.component.scss'],
899
+ }]
900
+ }], propDecorators: { toast: [{
901
+ type: Input
902
+ }], remove: [{
903
+ type: Output
904
904
  }] } });
905
905
 
906
- class ToastContainerComponent {
907
- constructor() {
908
- this.toasts = [];
909
- this.right = '30px';
910
- this.bottom = '30px';
911
- }
912
- ngOnInit() {
913
- this.toasts$.subscribe(toasts => {
914
- this.toasts = this.toastKey
915
- ? toasts.filter(t => {
916
- return t.options && t.options.containerKey !== this.toastKey;
917
- })
918
- : toasts;
919
- });
920
- }
921
- trackByFunc(index, toast) {
922
- var _a;
923
- if (!toast)
924
- return null;
925
- return (_a = toast.options) === null || _a === void 0 ? void 0 : _a.id;
926
- }
927
- }
928
- ToastContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
929
- ToastContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ToastContainerComponent, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, ngImport: i0, template: "<div\n class=\"abp-toast-container\"\n [style.top]=\"top || 'auto'\"\n [style.right]=\"right || 'auto'\"\n [style.bottom]=\"bottom || 'auto'\"\n [style.left]=\"left || 'auto'\"\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\n [@toastInOut]=\"toasts.length\"\n>\n <abp-toast\n [toast]=\"toast\"\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\n (remove)=\"remove($event)\"\n ></abp-toast>\n</div>\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}\n"], components: [{ type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [toastInOut] });
930
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastContainerComponent, decorators: [{
931
- type: Component,
932
- args: [{
933
- selector: 'abp-toast-container',
934
- templateUrl: './toast-container.component.html',
935
- styleUrls: ['./toast-container.component.scss'],
936
- animations: [toastInOut],
937
- }]
938
- }], propDecorators: { top: [{
939
- type: Input
940
- }], right: [{
941
- type: Input
942
- }], bottom: [{
943
- type: Input
944
- }], left: [{
945
- type: Input
946
- }], toastKey: [{
947
- type: Input
906
+ class ToastContainerComponent {
907
+ constructor() {
908
+ this.toasts = [];
909
+ this.right = '30px';
910
+ this.bottom = '30px';
911
+ }
912
+ ngOnInit() {
913
+ this.toasts$.subscribe(toasts => {
914
+ this.toasts = this.toastKey
915
+ ? toasts.filter(t => {
916
+ return t.options && t.options.containerKey !== this.toastKey;
917
+ })
918
+ : toasts;
919
+ });
920
+ }
921
+ trackByFunc(index, toast) {
922
+ var _a;
923
+ if (!toast)
924
+ return null;
925
+ return (_a = toast.options) === null || _a === void 0 ? void 0 : _a.id;
926
+ }
927
+ }
928
+ ToastContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
929
+ ToastContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ToastContainerComponent, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, ngImport: i0, template: "<div\n class=\"abp-toast-container\"\n [style.top]=\"top || 'auto'\"\n [style.right]=\"right || 'auto'\"\n [style.bottom]=\"bottom || 'auto'\"\n [style.left]=\"left || 'auto'\"\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\n [@toastInOut]=\"toasts.length\"\n>\n <abp-toast\n [toast]=\"toast\"\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\n (remove)=\"remove($event)\"\n ></abp-toast>\n</div>\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}\n"], components: [{ type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [toastInOut] });
930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToastContainerComponent, decorators: [{
931
+ type: Component,
932
+ args: [{
933
+ selector: 'abp-toast-container',
934
+ templateUrl: './toast-container.component.html',
935
+ styleUrls: ['./toast-container.component.scss'],
936
+ animations: [toastInOut],
937
+ }]
938
+ }], propDecorators: { top: [{
939
+ type: Input
940
+ }], right: [{
941
+ type: Input
942
+ }], bottom: [{
943
+ type: Input
944
+ }], left: [{
945
+ type: Input
946
+ }], toastKey: [{
947
+ type: Input
948
948
  }] } });
949
949
 
950
- const DEFAULT_VALIDATION_BLUEPRINTS = {
951
- creditCard: 'AbpValidation::ThisFieldIsNotAValidCreditCardNumber.',
952
- email: 'AbpValidation::ThisFieldIsNotAValidEmailAddress.',
953
- invalid: 'AbpValidation::ThisFieldIsNotValid.',
954
- max: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
955
- maxlength: 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}[{{ requiredLength }}]',
956
- min: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
957
- minlength: 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}[{{ requiredLength }}]',
958
- ngbDate: 'AbpValidation::ThisFieldIsNotValid.',
959
- passwordMismatch: 'AbpIdentity::Volo.Abp.Identity:PasswordConfirmationFailed',
960
- range: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
961
- required: 'AbpValidation::ThisFieldIsRequired.',
962
- url: 'AbpValidation::ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl',
950
+ const DEFAULT_VALIDATION_BLUEPRINTS = {
951
+ creditCard: 'AbpValidation::ThisFieldIsNotAValidCreditCardNumber.',
952
+ email: 'AbpValidation::ThisFieldIsNotAValidEmailAddress.',
953
+ invalid: 'AbpValidation::ThisFieldIsNotValid.',
954
+ max: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
955
+ maxlength: 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}[{{ requiredLength }}]',
956
+ min: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
957
+ minlength: 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}[{{ requiredLength }}]',
958
+ ngbDate: 'AbpValidation::ThisFieldIsNotValid.',
959
+ passwordMismatch: 'AbpIdentity::Volo.Abp.Identity:PasswordConfirmationFailed',
960
+ range: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
961
+ required: 'AbpValidation::ThisFieldIsRequired.',
962
+ url: 'AbpValidation::ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl',
963
963
  };
964
964
 
965
- class EllipsisDirective {
966
- constructor(cdRef, elRef) {
967
- this.cdRef = cdRef;
968
- this.elRef = elRef;
969
- this.enabled = true;
970
- }
971
- get inlineClass() {
972
- return this.enabled && this.width;
973
- }
974
- get class() {
975
- return this.enabled && !this.width;
976
- }
977
- get maxWidth() {
978
- return this.enabled && this.width ? this.width || '170px' : undefined;
979
- }
980
- ngAfterViewInit() {
981
- this.title = this.title || this.elRef.nativeElement.innerText;
982
- this.cdRef.detectChanges();
983
- }
984
- }
985
- EllipsisDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
986
- EllipsisDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: EllipsisDirective, selector: "[abpEllipsis]", inputs: { width: ["abpEllipsis", "width"], title: "title", enabled: ["abpEllipsisEnabled", "enabled"] }, host: { properties: { "title": "this.title", "class.abp-ellipsis-inline": "this.inlineClass", "class.abp-ellipsis": "this.class", "style.max-width": "this.maxWidth" } }, ngImport: i0 });
987
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisDirective, decorators: [{
988
- type: Directive,
989
- args: [{
990
- selector: '[abpEllipsis]',
991
- }]
992
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
993
- type: Input,
994
- args: ['abpEllipsis']
995
- }], title: [{
996
- type: HostBinding,
997
- args: ['title']
998
- }, {
999
- type: Input
1000
- }], enabled: [{
1001
- type: Input,
1002
- args: ['abpEllipsisEnabled']
1003
- }], inlineClass: [{
1004
- type: HostBinding,
1005
- args: ['class.abp-ellipsis-inline']
1006
- }], class: [{
1007
- type: HostBinding,
1008
- args: ['class.abp-ellipsis']
1009
- }], maxWidth: [{
1010
- type: HostBinding,
1011
- args: ['style.max-width']
1012
- }] } });
1013
- class EllipsisModule {
1014
- }
1015
- EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1016
- EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule, declarations: [EllipsisDirective], exports: [EllipsisDirective] });
1017
- EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule });
1018
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule, decorators: [{
1019
- type: NgModule,
1020
- args: [{
1021
- exports: [EllipsisDirective],
1022
- declarations: [EllipsisDirective],
1023
- }]
965
+ class EllipsisDirective {
966
+ constructor(cdRef, elRef) {
967
+ this.cdRef = cdRef;
968
+ this.elRef = elRef;
969
+ this.enabled = true;
970
+ }
971
+ get inlineClass() {
972
+ return this.enabled && this.width;
973
+ }
974
+ get class() {
975
+ return this.enabled && !this.width;
976
+ }
977
+ get maxWidth() {
978
+ return this.enabled && this.width ? this.width || '170px' : undefined;
979
+ }
980
+ ngAfterViewInit() {
981
+ this.title = this.title || this.elRef.nativeElement.innerText;
982
+ this.cdRef.detectChanges();
983
+ }
984
+ }
985
+ EllipsisDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
986
+ EllipsisDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: EllipsisDirective, selector: "[abpEllipsis]", inputs: { width: ["abpEllipsis", "width"], title: "title", enabled: ["abpEllipsisEnabled", "enabled"] }, host: { properties: { "title": "this.title", "class.abp-ellipsis-inline": "this.inlineClass", "class.abp-ellipsis": "this.class", "style.max-width": "this.maxWidth" } }, ngImport: i0 });
987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisDirective, decorators: [{
988
+ type: Directive,
989
+ args: [{
990
+ selector: '[abpEllipsis]',
991
+ }]
992
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
993
+ type: Input,
994
+ args: ['abpEllipsis']
995
+ }], title: [{
996
+ type: HostBinding,
997
+ args: ['title']
998
+ }, {
999
+ type: Input
1000
+ }], enabled: [{
1001
+ type: Input,
1002
+ args: ['abpEllipsisEnabled']
1003
+ }], inlineClass: [{
1004
+ type: HostBinding,
1005
+ args: ['class.abp-ellipsis-inline']
1006
+ }], class: [{
1007
+ type: HostBinding,
1008
+ args: ['class.abp-ellipsis']
1009
+ }], maxWidth: [{
1010
+ type: HostBinding,
1011
+ args: ['style.max-width']
1012
+ }] } });
1013
+ class EllipsisModule {
1014
+ }
1015
+ EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1016
+ EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule, declarations: [EllipsisDirective], exports: [EllipsisDirective] });
1017
+ EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule });
1018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EllipsisModule, decorators: [{
1019
+ type: NgModule,
1020
+ args: [{
1021
+ exports: [EllipsisDirective],
1022
+ declarations: [EllipsisDirective],
1023
+ }]
1024
1024
  }] });
1025
1025
 
1026
- class LoadingDirective {
1027
- constructor(elRef, vcRef, cdRes, injector, renderer) {
1028
- this.elRef = elRef;
1029
- this.vcRef = vcRef;
1030
- this.cdRes = cdRes;
1031
- this.injector = injector;
1032
- this.renderer = renderer;
1033
- this.position = 'relative';
1034
- this.delay = 0;
1035
- this.rootNode = null;
1036
- this.timerSubscription = null;
1037
- }
1038
- get loading() {
1039
- return this._loading;
1040
- }
1041
- set loading(newValue) {
1042
- setTimeout(() => {
1043
- if (!newValue && this.timerSubscription) {
1044
- this.timerSubscription.unsubscribe();
1045
- this.timerSubscription = null;
1046
- this._loading = newValue;
1047
- if (this.rootNode) {
1048
- this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1049
- this.rootNode = null;
1050
- }
1051
- return;
1052
- }
1053
- this.timerSubscription = timer(this.delay)
1054
- .pipe(take(1))
1055
- .subscribe(() => {
1056
- var _a;
1057
- if (!this.componentRef) {
1058
- this.componentRef = this.cdRes
1059
- .resolveComponentFactory(LoadingComponent)
1060
- .create(this.injector);
1061
- }
1062
- if (newValue && !this.rootNode) {
1063
- this.rootNode = this.componentRef.hostView.rootNodes[0];
1064
- (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.appendChild(this.rootNode);
1065
- }
1066
- else if (this.rootNode) {
1067
- this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1068
- this.rootNode = null;
1069
- }
1070
- this._loading = newValue;
1071
- this.timerSubscription = null;
1072
- });
1073
- }, 0);
1074
- }
1075
- ngOnInit() {
1076
- if (!this.targetElement) {
1077
- const { offsetHeight, offsetWidth } = this.elRef.nativeElement;
1078
- if (!offsetHeight && !offsetWidth && this.elRef.nativeElement.children.length) {
1079
- this.targetElement = this.elRef.nativeElement.children[0];
1080
- }
1081
- else {
1082
- this.targetElement = this.elRef.nativeElement;
1083
- }
1084
- }
1085
- }
1086
- ngOnDestroy() {
1087
- if (this.timerSubscription) {
1088
- this.timerSubscription.unsubscribe();
1089
- }
1090
- }
1091
- }
1092
- LoadingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1093
- LoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: LoadingDirective, selector: "[abpLoading]", inputs: { loading: ["abpLoading", "loading"], targetElement: ["abpLoadingTargetElement", "targetElement"], delay: ["abpLoadingDelay", "delay"] }, host: { properties: { "style.position": "this.position" } }, ngImport: i0 });
1094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingDirective, decorators: [{
1095
- type: Directive,
1096
- args: [{ selector: '[abpLoading]' }]
1097
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.Renderer2 }]; }, propDecorators: { position: [{
1098
- type: HostBinding,
1099
- args: ['style.position']
1100
- }], loading: [{
1101
- type: Input,
1102
- args: ['abpLoading']
1103
- }], targetElement: [{
1104
- type: Input,
1105
- args: ['abpLoadingTargetElement']
1106
- }], delay: [{
1107
- type: Input,
1108
- args: ['abpLoadingDelay']
1026
+ class LoadingDirective {
1027
+ constructor(elRef, vcRef, cdRes, injector, renderer) {
1028
+ this.elRef = elRef;
1029
+ this.vcRef = vcRef;
1030
+ this.cdRes = cdRes;
1031
+ this.injector = injector;
1032
+ this.renderer = renderer;
1033
+ this.position = 'relative';
1034
+ this.delay = 0;
1035
+ this.rootNode = null;
1036
+ this.timerSubscription = null;
1037
+ }
1038
+ get loading() {
1039
+ return this._loading;
1040
+ }
1041
+ set loading(newValue) {
1042
+ setTimeout(() => {
1043
+ if (!newValue && this.timerSubscription) {
1044
+ this.timerSubscription.unsubscribe();
1045
+ this.timerSubscription = null;
1046
+ this._loading = newValue;
1047
+ if (this.rootNode) {
1048
+ this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1049
+ this.rootNode = null;
1050
+ }
1051
+ return;
1052
+ }
1053
+ this.timerSubscription = timer(this.delay)
1054
+ .pipe(take(1))
1055
+ .subscribe(() => {
1056
+ var _a;
1057
+ if (!this.componentRef) {
1058
+ this.componentRef = this.cdRes
1059
+ .resolveComponentFactory(LoadingComponent)
1060
+ .create(this.injector);
1061
+ }
1062
+ if (newValue && !this.rootNode) {
1063
+ this.rootNode = this.componentRef.hostView.rootNodes[0];
1064
+ (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.appendChild(this.rootNode);
1065
+ }
1066
+ else if (this.rootNode) {
1067
+ this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1068
+ this.rootNode = null;
1069
+ }
1070
+ this._loading = newValue;
1071
+ this.timerSubscription = null;
1072
+ });
1073
+ }, 0);
1074
+ }
1075
+ ngOnInit() {
1076
+ if (!this.targetElement) {
1077
+ const { offsetHeight, offsetWidth } = this.elRef.nativeElement;
1078
+ if (!offsetHeight && !offsetWidth && this.elRef.nativeElement.children.length) {
1079
+ this.targetElement = this.elRef.nativeElement.children[0];
1080
+ }
1081
+ else {
1082
+ this.targetElement = this.elRef.nativeElement;
1083
+ }
1084
+ }
1085
+ }
1086
+ ngOnDestroy() {
1087
+ if (this.timerSubscription) {
1088
+ this.timerSubscription.unsubscribe();
1089
+ }
1090
+ }
1091
+ }
1092
+ LoadingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1093
+ LoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: LoadingDirective, selector: "[abpLoading]", inputs: { loading: ["abpLoading", "loading"], targetElement: ["abpLoadingTargetElement", "targetElement"], delay: ["abpLoadingDelay", "delay"] }, host: { properties: { "style.position": "this.position" } }, ngImport: i0 });
1094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LoadingDirective, decorators: [{
1095
+ type: Directive,
1096
+ args: [{ selector: '[abpLoading]' }]
1097
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.Renderer2 }]; }, propDecorators: { position: [{
1098
+ type: HostBinding,
1099
+ args: ['style.position']
1100
+ }], loading: [{
1101
+ type: Input,
1102
+ args: ['abpLoading']
1103
+ }], targetElement: [{
1104
+ type: Input,
1105
+ args: ['abpLoadingTargetElement']
1106
+ }], delay: [{
1107
+ type: Input,
1108
+ args: ['abpLoadingDelay']
1109
1109
  }] } });
1110
1110
 
1111
- class NgxDatatableDefaultDirective {
1112
- constructor(table, document) {
1113
- this.table = table;
1114
- this.document = document;
1115
- this.subscription = new Subscription();
1116
- this.resizeDiff = 0;
1117
- this.class = 'material bordered';
1118
- this.table.columnMode = ColumnMode.force;
1119
- this.table.footerHeight = 50;
1120
- this.table.headerHeight = 50;
1121
- this.table.rowHeight = 'auto';
1122
- this.table.scrollbarH = true;
1123
- this.table.virtualization = false;
1124
- }
1125
- get classes() {
1126
- return `ngx-datatable ${this.class}`;
1127
- }
1128
- fixHorizontalGap(scroller) {
1129
- const { body, documentElement } = this.document;
1130
- if (documentElement.scrollHeight !== documentElement.clientHeight) {
1131
- if (this.resizeDiff === 0) {
1132
- this.resizeDiff = window.innerWidth - body.offsetWidth;
1133
- scroller.scrollWidth -= this.resizeDiff;
1134
- }
1135
- }
1136
- else {
1137
- scroller.scrollWidth += this.resizeDiff;
1138
- this.resizeDiff = 0;
1139
- }
1140
- }
1141
- fixStyleOnWindowResize() {
1142
- // avoided @HostListener('window:resize') in favor of performance
1143
- const subscription = fromEvent(window, 'resize')
1144
- .pipe(debounceTime(500))
1145
- .subscribe(() => {
1146
- const { scroller } = this.table.bodyComponent;
1147
- if (!scroller)
1148
- return;
1149
- this.fixHorizontalGap(scroller);
1150
- });
1151
- this.subscription.add(subscription);
1152
- }
1153
- ngAfterViewInit() {
1154
- this.fixStyleOnWindowResize();
1155
- }
1156
- ngOnDestroy() {
1157
- this.subscription.unsubscribe();
1158
- }
1159
- }
1160
- NgxDatatableDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableDefaultDirective, deps: [{ token: i1$2.DatatableComponent }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
1161
- NgxDatatableDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: { class: "class" }, host: { properties: { "class": "this.classes" } }, exportAs: ["ngxDatatableDefault"], ngImport: i0 });
1162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableDefaultDirective, decorators: [{
1163
- type: Directive,
1164
- args: [{
1165
- // eslint-disable-next-line @angular-eslint/directive-selector
1166
- selector: 'ngx-datatable[default]',
1167
- exportAs: 'ngxDatatableDefault',
1168
- }]
1169
- }], ctorParameters: function () { return [{ type: i1$2.DatatableComponent }, { type: undefined, decorators: [{
1170
- type: Inject,
1171
- args: [DOCUMENT]
1172
- }] }]; }, propDecorators: { class: [{
1173
- type: Input
1174
- }], classes: [{
1175
- type: HostBinding,
1176
- args: ['class']
1111
+ class NgxDatatableDefaultDirective {
1112
+ constructor(table, document) {
1113
+ this.table = table;
1114
+ this.document = document;
1115
+ this.subscription = new Subscription();
1116
+ this.resizeDiff = 0;
1117
+ this.class = 'material bordered';
1118
+ this.table.columnMode = ColumnMode.force;
1119
+ this.table.footerHeight = 50;
1120
+ this.table.headerHeight = 50;
1121
+ this.table.rowHeight = 'auto';
1122
+ this.table.scrollbarH = true;
1123
+ this.table.virtualization = false;
1124
+ }
1125
+ get classes() {
1126
+ return `ngx-datatable ${this.class}`;
1127
+ }
1128
+ fixHorizontalGap(scroller) {
1129
+ const { body, documentElement } = this.document;
1130
+ if (documentElement.scrollHeight !== documentElement.clientHeight) {
1131
+ if (this.resizeDiff === 0) {
1132
+ this.resizeDiff = window.innerWidth - body.offsetWidth;
1133
+ scroller.scrollWidth -= this.resizeDiff;
1134
+ }
1135
+ }
1136
+ else {
1137
+ scroller.scrollWidth += this.resizeDiff;
1138
+ this.resizeDiff = 0;
1139
+ }
1140
+ }
1141
+ fixStyleOnWindowResize() {
1142
+ // avoided @HostListener('window:resize') in favor of performance
1143
+ const subscription = fromEvent(window, 'resize')
1144
+ .pipe(debounceTime(500))
1145
+ .subscribe(() => {
1146
+ const { scroller } = this.table.bodyComponent;
1147
+ if (!scroller)
1148
+ return;
1149
+ this.fixHorizontalGap(scroller);
1150
+ });
1151
+ this.subscription.add(subscription);
1152
+ }
1153
+ ngAfterViewInit() {
1154
+ this.fixStyleOnWindowResize();
1155
+ }
1156
+ ngOnDestroy() {
1157
+ this.subscription.unsubscribe();
1158
+ }
1159
+ }
1160
+ NgxDatatableDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableDefaultDirective, deps: [{ token: i1$2.DatatableComponent }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
1161
+ NgxDatatableDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: { class: "class" }, host: { properties: { "class": "this.classes" } }, exportAs: ["ngxDatatableDefault"], ngImport: i0 });
1162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableDefaultDirective, decorators: [{
1163
+ type: Directive,
1164
+ args: [{
1165
+ // eslint-disable-next-line @angular-eslint/directive-selector
1166
+ selector: 'ngx-datatable[default]',
1167
+ exportAs: 'ngxDatatableDefault',
1168
+ }]
1169
+ }], ctorParameters: function () { return [{ type: i1$2.DatatableComponent }, { type: undefined, decorators: [{
1170
+ type: Inject,
1171
+ args: [DOCUMENT]
1172
+ }] }]; }, propDecorators: { class: [{
1173
+ type: Input
1174
+ }], classes: [{
1175
+ type: HostBinding,
1176
+ args: ['class']
1177
1177
  }] } });
1178
1178
 
1179
- const defaultNgxDatatableMessages = {
1180
- emptyMessage: 'AbpUi::NoDataAvailableInDatatable',
1181
- totalMessage: 'AbpUi::Total',
1182
- selectedMessage: 'AbpUi::Selected',
1183
- };
1179
+ const defaultNgxDatatableMessages = {
1180
+ emptyMessage: 'AbpUi::NoDataAvailableInDatatable',
1181
+ totalMessage: 'AbpUi::Total',
1182
+ selectedMessage: 'AbpUi::Selected',
1183
+ };
1184
1184
  const NGX_DATATABLE_MESSAGES = new InjectionToken('NGX_DATATABLE_MESSAGES');
1185
1185
 
1186
- class NgxDatatableListDirective {
1187
- constructor(table, cdRef, localizationService, ngxDatatableMessages) {
1188
- this.table = table;
1189
- this.cdRef = cdRef;
1190
- this.localizationService = localizationService;
1191
- this.ngxDatatableMessages = ngxDatatableMessages;
1192
- this.subscription = new Subscription();
1193
- this.querySubscription = new Subscription();
1194
- this.setInitialValues();
1195
- }
1196
- setInitialValues() {
1197
- this.table.externalPaging = true;
1198
- this.table.externalSorting = true;
1199
- const { emptyMessage, selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1200
- this.table.messages = {
1201
- emptyMessage: this.localizationService.instant(emptyMessage),
1202
- totalMessage: this.localizationService.instant(totalMessage),
1203
- selectedMessage: this.localizationService.instant(selectedMessage),
1204
- };
1205
- }
1206
- subscribeToPage() {
1207
- const sub = this.table.page.subscribe(({ offset }) => {
1208
- this.list.page = offset;
1209
- this.table.offset = offset;
1210
- });
1211
- this.subscription.add(sub);
1212
- }
1213
- subscribeToSort() {
1214
- const sub = this.table.sort.subscribe(({ sorts: [{ prop, dir }] }) => {
1215
- if (prop === this.list.sortKey && this.list.sortOrder === 'desc') {
1216
- this.list.sortKey = '';
1217
- this.list.sortOrder = '';
1218
- this.table.sorts = [];
1219
- this.cdRef.detectChanges();
1220
- }
1221
- else {
1222
- this.list.sortKey = prop;
1223
- this.list.sortOrder = dir;
1224
- }
1225
- });
1226
- this.subscription.add(sub);
1227
- }
1228
- subscribeToQuery() {
1229
- if (!this.querySubscription.closed)
1230
- this.querySubscription.unsubscribe();
1231
- this.querySubscription = this.list.query$.subscribe(() => {
1232
- const offset = this.list.page;
1233
- if (this.table.offset !== offset)
1234
- this.table.offset = offset;
1235
- });
1236
- }
1237
- ngOnChanges({ list }) {
1238
- this.subscribeToQuery();
1239
- if (!list.firstChange)
1240
- return;
1241
- const { maxResultCount, page } = list.currentValue;
1242
- this.table.limit = maxResultCount;
1243
- this.table.offset = page;
1244
- }
1245
- ngOnDestroy() {
1246
- this.subscription.unsubscribe();
1247
- this.querySubscription.unsubscribe();
1248
- }
1249
- ngOnInit() {
1250
- this.subscribeToPage();
1251
- this.subscribeToSort();
1252
- }
1253
- }
1254
- NgxDatatableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableListDirective, deps: [{ token: i1$2.DatatableComponent }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }, { token: NGX_DATATABLE_MESSAGES, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1255
- NgxDatatableListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: { list: "list" }, exportAs: ["ngxDatatableList"], usesOnChanges: true, ngImport: i0 });
1256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableListDirective, decorators: [{
1257
- type: Directive,
1258
- args: [{
1259
- // eslint-disable-next-line @angular-eslint/directive-selector
1260
- selector: 'ngx-datatable[list]',
1261
- exportAs: 'ngxDatatableList',
1262
- }]
1263
- }], ctorParameters: function () { return [{ type: i1$2.DatatableComponent }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }, { type: undefined, decorators: [{
1264
- type: Optional
1265
- }, {
1266
- type: Inject,
1267
- args: [NGX_DATATABLE_MESSAGES]
1268
- }] }]; }, propDecorators: { list: [{
1269
- type: Input
1186
+ class NgxDatatableListDirective {
1187
+ constructor(table, cdRef, localizationService, ngxDatatableMessages) {
1188
+ this.table = table;
1189
+ this.cdRef = cdRef;
1190
+ this.localizationService = localizationService;
1191
+ this.ngxDatatableMessages = ngxDatatableMessages;
1192
+ this.subscription = new Subscription();
1193
+ this.querySubscription = new Subscription();
1194
+ this.setInitialValues();
1195
+ }
1196
+ setInitialValues() {
1197
+ this.table.externalPaging = true;
1198
+ this.table.externalSorting = true;
1199
+ const { emptyMessage, selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1200
+ this.table.messages = {
1201
+ emptyMessage: this.localizationService.instant(emptyMessage),
1202
+ totalMessage: this.localizationService.instant(totalMessage),
1203
+ selectedMessage: this.localizationService.instant(selectedMessage),
1204
+ };
1205
+ }
1206
+ subscribeToPage() {
1207
+ const sub = this.table.page.subscribe(({ offset }) => {
1208
+ this.list.page = offset;
1209
+ this.table.offset = offset;
1210
+ });
1211
+ this.subscription.add(sub);
1212
+ }
1213
+ subscribeToSort() {
1214
+ const sub = this.table.sort.subscribe(({ sorts: [{ prop, dir }] }) => {
1215
+ if (prop === this.list.sortKey && this.list.sortOrder === 'desc') {
1216
+ this.list.sortKey = '';
1217
+ this.list.sortOrder = '';
1218
+ this.table.sorts = [];
1219
+ this.cdRef.detectChanges();
1220
+ }
1221
+ else {
1222
+ this.list.sortKey = prop;
1223
+ this.list.sortOrder = dir;
1224
+ }
1225
+ });
1226
+ this.subscription.add(sub);
1227
+ }
1228
+ subscribeToQuery() {
1229
+ if (!this.querySubscription.closed)
1230
+ this.querySubscription.unsubscribe();
1231
+ this.querySubscription = this.list.query$.subscribe(() => {
1232
+ const offset = this.list.page;
1233
+ if (this.table.offset !== offset)
1234
+ this.table.offset = offset;
1235
+ });
1236
+ }
1237
+ ngOnChanges({ list }) {
1238
+ this.subscribeToQuery();
1239
+ if (!list.firstChange)
1240
+ return;
1241
+ const { maxResultCount, page } = list.currentValue;
1242
+ this.table.limit = maxResultCount;
1243
+ this.table.offset = page;
1244
+ }
1245
+ ngOnDestroy() {
1246
+ this.subscription.unsubscribe();
1247
+ this.querySubscription.unsubscribe();
1248
+ }
1249
+ ngOnInit() {
1250
+ this.subscribeToPage();
1251
+ this.subscribeToSort();
1252
+ }
1253
+ }
1254
+ NgxDatatableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableListDirective, deps: [{ token: i1$2.DatatableComponent }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }, { token: NGX_DATATABLE_MESSAGES, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1255
+ NgxDatatableListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: { list: "list" }, exportAs: ["ngxDatatableList"], usesOnChanges: true, ngImport: i0 });
1256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NgxDatatableListDirective, decorators: [{
1257
+ type: Directive,
1258
+ args: [{
1259
+ // eslint-disable-next-line @angular-eslint/directive-selector
1260
+ selector: 'ngx-datatable[list]',
1261
+ exportAs: 'ngxDatatableList',
1262
+ }]
1263
+ }], ctorParameters: function () { return [{ type: i1$2.DatatableComponent }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }, { type: undefined, decorators: [{
1264
+ type: Optional
1265
+ }, {
1266
+ type: Inject,
1267
+ args: [NGX_DATATABLE_MESSAGES]
1268
+ }] }]; }, propDecorators: { list: [{
1269
+ type: Input
1270
1270
  }] } });
1271
1271
 
1272
- class DocumentDirHandlerService {
1273
- constructor(injector) {
1274
- this.injector = injector;
1275
- this.dir = new BehaviorSubject('ltr');
1276
- this.dir$ = this.dir.asObservable();
1277
- this.listenToLanguageChanges();
1278
- }
1279
- listenToLanguageChanges() {
1280
- const l10n = this.injector.get(LocalizationService);
1281
- // will always listen, no need to unsubscribe
1282
- l10n.languageChange$
1283
- .pipe(startWith(l10n.currentLang), map(locale => getLocaleDirection(locale)))
1284
- .subscribe(dir => {
1285
- this.dir.next(dir);
1286
- this.setBodyDir(dir);
1287
- });
1288
- }
1289
- setBodyDir(dir) {
1290
- document.body.dir = dir;
1291
- document.dir = dir;
1292
- }
1293
- }
1294
- DocumentDirHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DocumentDirHandlerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1295
- DocumentDirHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DocumentDirHandlerService });
1296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DocumentDirHandlerService, decorators: [{
1297
- type: Injectable
1272
+ class DocumentDirHandlerService {
1273
+ constructor(injector) {
1274
+ this.injector = injector;
1275
+ this.dir = new BehaviorSubject('ltr');
1276
+ this.dir$ = this.dir.asObservable();
1277
+ this.listenToLanguageChanges();
1278
+ }
1279
+ listenToLanguageChanges() {
1280
+ const l10n = this.injector.get(LocalizationService);
1281
+ // will always listen, no need to unsubscribe
1282
+ l10n.languageChange$
1283
+ .pipe(startWith(l10n.currentLang), map(locale => getLocaleDirection(locale)))
1284
+ .subscribe(dir => {
1285
+ this.dir.next(dir);
1286
+ this.setBodyDir(dir);
1287
+ });
1288
+ }
1289
+ setBodyDir(dir) {
1290
+ document.body.dir = dir;
1291
+ document.dir = dir;
1292
+ }
1293
+ }
1294
+ DocumentDirHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DocumentDirHandlerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1295
+ DocumentDirHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DocumentDirHandlerService });
1296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DocumentDirHandlerService, decorators: [{
1297
+ type: Injectable
1298
1298
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1299
1299
 
1300
- function httpErrorConfigFactory(config = {}) {
1301
- if (config.errorScreen && config.errorScreen.component && !config.errorScreen.forWhichErrors) {
1302
- config.errorScreen.forWhichErrors = [401, 403, 404, 500];
1303
- }
1304
- return Object.assign({ skipHandledErrorCodes: [], errorScreen: {} }, config);
1305
- }
1306
- const HTTP_ERROR_CONFIG = new InjectionToken('HTTP_ERROR_CONFIG');
1300
+ function httpErrorConfigFactory(config = {}) {
1301
+ if (config.errorScreen && config.errorScreen.component && !config.errorScreen.forWhichErrors) {
1302
+ config.errorScreen.forWhichErrors = [401, 403, 404, 500];
1303
+ }
1304
+ return Object.assign({ skipHandledErrorCodes: [], errorScreen: {} }, config);
1305
+ }
1306
+ const HTTP_ERROR_CONFIG = new InjectionToken('HTTP_ERROR_CONFIG');
1307
1307
  const HTTP_ERROR_HANDLER = new InjectionToken('HTTP_ERROR_HANDLER');
1308
1308
 
1309
- const DEFAULT_ERROR_MESSAGES = {
1310
- defaultError: {
1311
- title: 'An error has occurred!',
1312
- details: 'Error detail not sent by server.',
1313
- },
1314
- defaultError401: {
1315
- title: 'You are not authenticated!',
1316
- details: 'You should be authenticated (sign in) in order to perform this operation.',
1317
- },
1318
- defaultError403: {
1319
- title: 'You are not authorized!',
1320
- details: 'You are not allowed to perform this operation.',
1321
- },
1322
- defaultError404: {
1323
- title: 'Resource not found!',
1324
- details: 'The resource requested could not found on the server.',
1325
- },
1326
- defaultError500: {
1327
- title: 'Internal server error',
1328
- details: 'Error detail not sent by server.',
1329
- },
1330
- };
1331
- const DEFAULT_ERROR_LOCALIZATIONS = {
1332
- defaultError: {
1333
- title: 'AbpUi::DefaultErrorMessage',
1334
- details: 'AbpUi::DefaultErrorMessageDetail',
1335
- },
1336
- defaultError401: {
1337
- title: 'AbpUi::DefaultErrorMessage401',
1338
- details: 'AbpUi::DefaultErrorMessage401Detail',
1339
- },
1340
- defaultError403: {
1341
- title: 'AbpUi::DefaultErrorMessage403',
1342
- details: 'AbpUi::DefaultErrorMessage403Detail',
1343
- },
1344
- defaultError404: {
1345
- title: 'AbpUi::DefaultErrorMessage404',
1346
- details: 'AbpUi::DefaultErrorMessage404Detail',
1347
- },
1348
- defaultError500: {
1349
- title: 'AbpUi::500Message',
1350
- details: 'AbpUi::DefaultErrorMessage',
1351
- },
1352
- };
1353
- class ErrorHandler {
1354
- constructor(injector) {
1355
- this.injector = injector;
1356
- this.componentRef = null;
1357
- this.httpErrorHandler = this.injector.get(HTTP_ERROR_HANDLER, (_, err) => throwError(err));
1358
- this.executeErrorHandler = (error) => {
1359
- const returnValue = this.httpErrorHandler(this.injector, error);
1360
- return (returnValue instanceof Observable ? returnValue : of(null)).pipe(catchError(err => {
1361
- this.handleError(err);
1362
- return of(null);
1363
- }));
1364
- };
1365
- this.filterRestErrors = ({ status }) => {
1366
- if (typeof status !== 'number')
1367
- return false;
1368
- return (!!this.httpErrorConfig.skipHandledErrorCodes &&
1369
- this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0);
1370
- };
1371
- this.filterRouteErrors = (navigationError) => {
1372
- var _a, _b;
1373
- return (((_b = (_a = navigationError.error) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.indexOf('Cannot match')) > -1 &&
1374
- !!this.httpErrorConfig.skipHandledErrorCodes &&
1375
- this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0);
1376
- };
1377
- this.httpErrorReporter = injector.get(HttpErrorReporterService);
1378
- this.routerEvents = injector.get(RouterEvents);
1379
- this.confirmationService = injector.get(ConfirmationService);
1380
- this.cfRes = injector.get(ComponentFactoryResolver);
1381
- this.rendererFactory = injector.get(RendererFactory2);
1382
- this.httpErrorConfig = injector.get('HTTP_ERROR_CONFIG');
1383
- this.listenToRestError();
1384
- this.listenToRouterError();
1385
- this.listenToRouterDataResolved();
1386
- }
1387
- listenToRouterError() {
1388
- this.routerEvents
1389
- .getNavigationEvents('Error')
1390
- .pipe(filter(this.filterRouteErrors))
1391
- .subscribe(() => this.show404Page());
1392
- }
1393
- listenToRouterDataResolved() {
1394
- this.routerEvents
1395
- .getEvents(ResolveEnd)
1396
- .pipe(filter(() => !!this.componentRef))
1397
- .subscribe(() => {
1398
- var _a;
1399
- (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
1400
- this.componentRef = null;
1401
- });
1402
- }
1403
- listenToRestError() {
1404
- this.httpErrorReporter.reporter$
1405
- .pipe(filter(this.filterRestErrors), switchMap(this.executeErrorHandler))
1406
- .subscribe();
1407
- }
1408
- handleError(err) {
1409
- var _a;
1410
- const body = ((_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.error) || {
1411
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1412
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1413
- };
1414
- if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) {
1415
- const confirmation$ = this.showErrorWithRequestBody(body);
1416
- if (err.status === 401) {
1417
- confirmation$.subscribe(() => {
1418
- this.navigateToLogin();
1419
- });
1420
- }
1421
- }
1422
- else {
1423
- switch (err.status) {
1424
- case 401:
1425
- this.canCreateCustomError(401)
1426
- ? this.show401Page()
1427
- : this.showError({
1428
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.title,
1429
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title,
1430
- }, {
1431
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.details,
1432
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.details,
1433
- }).subscribe(() => this.navigateToLogin());
1434
- break;
1435
- case 403:
1436
- this.createErrorComponent({
1437
- title: {
1438
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError403.title,
1439
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.title,
1440
- },
1441
- details: {
1442
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError403.details,
1443
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.details,
1444
- },
1445
- status: 403,
1446
- });
1447
- break;
1448
- case 404:
1449
- this.canCreateCustomError(404)
1450
- ? this.show404Page()
1451
- : this.showError({
1452
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.details,
1453
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details,
1454
- }, {
1455
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1456
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1457
- });
1458
- break;
1459
- case 500:
1460
- this.createErrorComponent({
1461
- title: {
1462
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError500.title,
1463
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.title,
1464
- },
1465
- details: {
1466
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError500.details,
1467
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.details,
1468
- },
1469
- status: 500,
1470
- });
1471
- break;
1472
- case 0:
1473
- if (err.statusText === 'Unknown Error') {
1474
- this.createErrorComponent({
1475
- title: {
1476
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1477
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1478
- },
1479
- details: err.message,
1480
- isHomeShow: false,
1481
- });
1482
- }
1483
- break;
1484
- default:
1485
- this.showError({
1486
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.details,
1487
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.details,
1488
- }, {
1489
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1490
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1491
- });
1492
- break;
1493
- }
1494
- }
1495
- }
1496
- show401Page() {
1497
- this.createErrorComponent({
1498
- title: {
1499
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.title,
1500
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title,
1501
- },
1502
- status: 401,
1503
- });
1504
- }
1505
- show404Page() {
1506
- this.createErrorComponent({
1507
- title: {
1508
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1509
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1510
- },
1511
- status: 404,
1512
- });
1513
- }
1514
- showErrorWithRequestBody(body) {
1515
- let message;
1516
- let title;
1517
- if (body.details) {
1518
- message = body.details;
1519
- title = body.message;
1520
- }
1521
- else if (body.message) {
1522
- title = {
1523
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1524
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1525
- };
1526
- message = body.message;
1527
- }
1528
- else {
1529
- message = body.message || {
1530
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1531
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1532
- };
1533
- title = '';
1534
- }
1535
- return this.showError(message, title);
1536
- }
1537
- showError(message, title) {
1538
- return this.confirmationService.error(message, title, {
1539
- hideCancelBtn: true,
1540
- yesText: 'AbpAccount::Close',
1541
- });
1542
- }
1543
- navigateToLogin() {
1544
- this.injector.get(AuthService).navigateToLogin();
1545
- }
1546
- createErrorComponent(instance) {
1547
- var _a, _b;
1548
- const renderer = this.rendererFactory.createRenderer(null, null);
1549
- const host = renderer.selectRootElement(document.body, true);
1550
- this.componentRef = this.cfRes
1551
- .resolveComponentFactory(HttpErrorWrapperComponent)
1552
- .create(this.injector);
1553
- for (const key in instance) {
1554
- /* istanbul ignore else */
1555
- if (Object.prototype.hasOwnProperty.call(this.componentRef.instance, key)) {
1556
- this.componentRef.instance[key] = instance[key];
1557
- }
1558
- }
1559
- this.componentRef.instance.hideCloseIcon = !!((_a = this.httpErrorConfig.errorScreen) === null || _a === void 0 ? void 0 : _a.hideCloseIcon);
1560
- const appRef = this.injector.get(ApplicationRef);
1561
- if (this.canCreateCustomError(instance.status)) {
1562
- this.componentRef.instance.cfRes = this.cfRes;
1563
- this.componentRef.instance.appRef = appRef;
1564
- this.componentRef.instance.injector = this.injector;
1565
- this.componentRef.instance.customComponent = (_b = this.httpErrorConfig.errorScreen) === null || _b === void 0 ? void 0 : _b.component;
1566
- }
1567
- appRef.attachView(this.componentRef.hostView);
1568
- renderer.appendChild(host, this.componentRef.hostView.rootNodes[0]);
1569
- const destroy$ = new Subject();
1570
- this.componentRef.instance.destroy$ = destroy$;
1571
- destroy$.subscribe(() => {
1572
- var _a;
1573
- (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
1574
- this.componentRef = null;
1575
- });
1576
- }
1577
- canCreateCustomError(status) {
1578
- var _a, _b, _c, _d, _e, _f;
1579
- return !!(((_b = (_a = this.httpErrorConfig) === null || _a === void 0 ? void 0 : _a.errorScreen) === null || _b === void 0 ? void 0 : _b.component) &&
1580
- ((_d = (_c = this.httpErrorConfig) === null || _c === void 0 ? void 0 : _c.errorScreen) === null || _d === void 0 ? void 0 : _d.forWhichErrors) &&
1581
- ((_f = (_e = this.httpErrorConfig) === null || _e === void 0 ? void 0 : _e.errorScreen) === null || _f === void 0 ? void 0 : _f.forWhichErrors.indexOf(status)) > -1);
1582
- }
1583
- }
1584
- ErrorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1585
- ErrorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ErrorHandler, providedIn: 'root' });
1586
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ErrorHandler, decorators: [{
1587
- type: Injectable,
1588
- args: [{ providedIn: 'root' }]
1309
+ const DEFAULT_ERROR_MESSAGES = {
1310
+ defaultError: {
1311
+ title: 'An error has occurred!',
1312
+ details: 'Error detail not sent by server.',
1313
+ },
1314
+ defaultError401: {
1315
+ title: 'You are not authenticated!',
1316
+ details: 'You should be authenticated (sign in) in order to perform this operation.',
1317
+ },
1318
+ defaultError403: {
1319
+ title: 'You are not authorized!',
1320
+ details: 'You are not allowed to perform this operation.',
1321
+ },
1322
+ defaultError404: {
1323
+ title: 'Resource not found!',
1324
+ details: 'The resource requested could not found on the server.',
1325
+ },
1326
+ defaultError500: {
1327
+ title: 'Internal server error',
1328
+ details: 'Error detail not sent by server.',
1329
+ },
1330
+ };
1331
+ const DEFAULT_ERROR_LOCALIZATIONS = {
1332
+ defaultError: {
1333
+ title: 'AbpUi::DefaultErrorMessage',
1334
+ details: 'AbpUi::DefaultErrorMessageDetail',
1335
+ },
1336
+ defaultError401: {
1337
+ title: 'AbpUi::DefaultErrorMessage401',
1338
+ details: 'AbpUi::DefaultErrorMessage401Detail',
1339
+ },
1340
+ defaultError403: {
1341
+ title: 'AbpUi::DefaultErrorMessage403',
1342
+ details: 'AbpUi::DefaultErrorMessage403Detail',
1343
+ },
1344
+ defaultError404: {
1345
+ title: 'AbpUi::DefaultErrorMessage404',
1346
+ details: 'AbpUi::DefaultErrorMessage404Detail',
1347
+ },
1348
+ defaultError500: {
1349
+ title: 'AbpUi::500Message',
1350
+ details: 'AbpUi::DefaultErrorMessage',
1351
+ },
1352
+ };
1353
+ class ErrorHandler {
1354
+ constructor(injector) {
1355
+ this.injector = injector;
1356
+ this.componentRef = null;
1357
+ this.httpErrorHandler = this.injector.get(HTTP_ERROR_HANDLER, (_, err) => throwError(err));
1358
+ this.executeErrorHandler = (error) => {
1359
+ const returnValue = this.httpErrorHandler(this.injector, error);
1360
+ return (returnValue instanceof Observable ? returnValue : of(null)).pipe(catchError(err => {
1361
+ this.handleError(err);
1362
+ return of(null);
1363
+ }));
1364
+ };
1365
+ this.filterRestErrors = ({ status }) => {
1366
+ if (typeof status !== 'number')
1367
+ return false;
1368
+ return (!!this.httpErrorConfig.skipHandledErrorCodes &&
1369
+ this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0);
1370
+ };
1371
+ this.filterRouteErrors = (navigationError) => {
1372
+ var _a, _b;
1373
+ return (((_b = (_a = navigationError.error) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.indexOf('Cannot match')) > -1 &&
1374
+ !!this.httpErrorConfig.skipHandledErrorCodes &&
1375
+ this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0);
1376
+ };
1377
+ this.httpErrorReporter = injector.get(HttpErrorReporterService);
1378
+ this.routerEvents = injector.get(RouterEvents);
1379
+ this.confirmationService = injector.get(ConfirmationService);
1380
+ this.cfRes = injector.get(ComponentFactoryResolver);
1381
+ this.rendererFactory = injector.get(RendererFactory2);
1382
+ this.httpErrorConfig = injector.get('HTTP_ERROR_CONFIG');
1383
+ this.listenToRestError();
1384
+ this.listenToRouterError();
1385
+ this.listenToRouterDataResolved();
1386
+ }
1387
+ listenToRouterError() {
1388
+ this.routerEvents
1389
+ .getNavigationEvents('Error')
1390
+ .pipe(filter(this.filterRouteErrors))
1391
+ .subscribe(() => this.show404Page());
1392
+ }
1393
+ listenToRouterDataResolved() {
1394
+ this.routerEvents
1395
+ .getEvents(ResolveEnd)
1396
+ .pipe(filter(() => !!this.componentRef))
1397
+ .subscribe(() => {
1398
+ var _a;
1399
+ (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
1400
+ this.componentRef = null;
1401
+ });
1402
+ }
1403
+ listenToRestError() {
1404
+ this.httpErrorReporter.reporter$
1405
+ .pipe(filter(this.filterRestErrors), switchMap(this.executeErrorHandler))
1406
+ .subscribe();
1407
+ }
1408
+ handleError(err) {
1409
+ var _a;
1410
+ const body = ((_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.error) || {
1411
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1412
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1413
+ };
1414
+ if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) {
1415
+ const confirmation$ = this.showErrorWithRequestBody(body);
1416
+ if (err.status === 401) {
1417
+ confirmation$.subscribe(() => {
1418
+ this.navigateToLogin();
1419
+ });
1420
+ }
1421
+ }
1422
+ else {
1423
+ switch (err.status) {
1424
+ case 401:
1425
+ this.canCreateCustomError(401)
1426
+ ? this.show401Page()
1427
+ : this.showError({
1428
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.title,
1429
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title,
1430
+ }, {
1431
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.details,
1432
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.details,
1433
+ }).subscribe(() => this.navigateToLogin());
1434
+ break;
1435
+ case 403:
1436
+ this.createErrorComponent({
1437
+ title: {
1438
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError403.title,
1439
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.title,
1440
+ },
1441
+ details: {
1442
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError403.details,
1443
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.details,
1444
+ },
1445
+ status: 403,
1446
+ });
1447
+ break;
1448
+ case 404:
1449
+ this.canCreateCustomError(404)
1450
+ ? this.show404Page()
1451
+ : this.showError({
1452
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.details,
1453
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details,
1454
+ }, {
1455
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1456
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1457
+ });
1458
+ break;
1459
+ case 500:
1460
+ this.createErrorComponent({
1461
+ title: {
1462
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError500.title,
1463
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.title,
1464
+ },
1465
+ details: {
1466
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError500.details,
1467
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.details,
1468
+ },
1469
+ status: 500,
1470
+ });
1471
+ break;
1472
+ case 0:
1473
+ if (err.statusText === 'Unknown Error') {
1474
+ this.createErrorComponent({
1475
+ title: {
1476
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1477
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1478
+ },
1479
+ details: err.message,
1480
+ isHomeShow: false,
1481
+ });
1482
+ }
1483
+ break;
1484
+ default:
1485
+ this.showError({
1486
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.details,
1487
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.details,
1488
+ }, {
1489
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1490
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1491
+ });
1492
+ break;
1493
+ }
1494
+ }
1495
+ }
1496
+ show401Page() {
1497
+ this.createErrorComponent({
1498
+ title: {
1499
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.title,
1500
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title,
1501
+ },
1502
+ status: 401,
1503
+ });
1504
+ }
1505
+ show404Page() {
1506
+ this.createErrorComponent({
1507
+ title: {
1508
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1509
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1510
+ },
1511
+ status: 404,
1512
+ });
1513
+ }
1514
+ showErrorWithRequestBody(body) {
1515
+ let message;
1516
+ let title;
1517
+ if (body.details) {
1518
+ message = body.details;
1519
+ title = body.message;
1520
+ }
1521
+ else if (body.message) {
1522
+ title = {
1523
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1524
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1525
+ };
1526
+ message = body.message;
1527
+ }
1528
+ else {
1529
+ message = body.message || {
1530
+ key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1531
+ defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1532
+ };
1533
+ title = '';
1534
+ }
1535
+ return this.showError(message, title);
1536
+ }
1537
+ showError(message, title) {
1538
+ return this.confirmationService.error(message, title, {
1539
+ hideCancelBtn: true,
1540
+ yesText: 'AbpAccount::Close',
1541
+ });
1542
+ }
1543
+ navigateToLogin() {
1544
+ this.injector.get(AuthService).navigateToLogin();
1545
+ }
1546
+ createErrorComponent(instance) {
1547
+ var _a, _b;
1548
+ const renderer = this.rendererFactory.createRenderer(null, null);
1549
+ const host = renderer.selectRootElement(document.body, true);
1550
+ this.componentRef = this.cfRes
1551
+ .resolveComponentFactory(HttpErrorWrapperComponent)
1552
+ .create(this.injector);
1553
+ for (const key in instance) {
1554
+ /* istanbul ignore else */
1555
+ if (Object.prototype.hasOwnProperty.call(this.componentRef.instance, key)) {
1556
+ this.componentRef.instance[key] = instance[key];
1557
+ }
1558
+ }
1559
+ this.componentRef.instance.hideCloseIcon = !!((_a = this.httpErrorConfig.errorScreen) === null || _a === void 0 ? void 0 : _a.hideCloseIcon);
1560
+ const appRef = this.injector.get(ApplicationRef);
1561
+ if (this.canCreateCustomError(instance.status)) {
1562
+ this.componentRef.instance.cfRes = this.cfRes;
1563
+ this.componentRef.instance.appRef = appRef;
1564
+ this.componentRef.instance.injector = this.injector;
1565
+ this.componentRef.instance.customComponent = (_b = this.httpErrorConfig.errorScreen) === null || _b === void 0 ? void 0 : _b.component;
1566
+ }
1567
+ appRef.attachView(this.componentRef.hostView);
1568
+ renderer.appendChild(host, this.componentRef.hostView.rootNodes[0]);
1569
+ const destroy$ = new Subject();
1570
+ this.componentRef.instance.destroy$ = destroy$;
1571
+ destroy$.subscribe(() => {
1572
+ var _a;
1573
+ (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
1574
+ this.componentRef = null;
1575
+ });
1576
+ }
1577
+ canCreateCustomError(status) {
1578
+ var _a, _b, _c, _d, _e, _f;
1579
+ return !!(((_b = (_a = this.httpErrorConfig) === null || _a === void 0 ? void 0 : _a.errorScreen) === null || _b === void 0 ? void 0 : _b.component) &&
1580
+ ((_d = (_c = this.httpErrorConfig) === null || _c === void 0 ? void 0 : _c.errorScreen) === null || _d === void 0 ? void 0 : _d.forWhichErrors) &&
1581
+ ((_f = (_e = this.httpErrorConfig) === null || _e === void 0 ? void 0 : _e.errorScreen) === null || _f === void 0 ? void 0 : _f.forWhichErrors.indexOf(status)) > -1);
1582
+ }
1583
+ }
1584
+ ErrorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1585
+ ErrorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ErrorHandler, providedIn: 'root' });
1586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ErrorHandler, decorators: [{
1587
+ type: Injectable,
1588
+ args: [{ providedIn: 'root' }]
1589
1589
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1590
1590
 
1591
- class NavItem {
1592
- constructor(props) {
1593
- props = Object.assign(Object.assign({}, props), { visible: props.visible || (() => true) });
1594
- Object.assign(this, props);
1595
- }
1596
- }
1597
-
1598
- const NG_BOOTSTRAP_CONFIG_PROVIDERS = [
1599
- {
1600
- provide: APP_INITIALIZER,
1601
- useFactory: configureNgBootstrap,
1602
- deps: [NgbInputDatepickerConfig, NgbTypeaheadConfig],
1603
- multi: true,
1604
- },
1605
- ];
1606
- function configureNgBootstrap(datepicker, typeahead) {
1607
- return () => {
1608
- datepicker.container = 'body';
1609
- typeahead.container = 'body';
1610
- };
1611
- }
1612
-
1613
- const THEME_SHARED_ROUTE_PROVIDERS = [
1614
- { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
1615
- ];
1616
- function configureRoutes(routesService) {
1617
- return () => {
1618
- routesService.add([
1619
- {
1620
- path: undefined,
1621
- name: "AbpUiNavigation::Menu:Administration" /* Administration */,
1622
- iconClass: 'fa fa-wrench',
1623
- order: 100,
1624
- },
1625
- ]);
1626
- };
1627
- }
1628
-
1629
- class NavItemsService {
1630
- constructor() {
1631
- this._items$ = new BehaviorSubject([]);
1632
- }
1633
- get items() {
1634
- return this._items$.value;
1635
- }
1636
- get items$() {
1637
- return this._items$.asObservable();
1638
- }
1639
- addItems(newItems) {
1640
- const items = [...this.items];
1641
- newItems.forEach(item => items.push(new NavItem(item)));
1642
- items.sort(sortItems);
1643
- this._items$.next(items);
1644
- }
1645
- removeItem(id) {
1646
- const index = this.items.findIndex(item => item.id === id);
1647
- if (index < 0)
1648
- return;
1649
- const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
1650
- this._items$.next(items);
1651
- }
1652
- patchItem(id, item) {
1653
- const index = this.items.findIndex(i => i.id === id);
1654
- if (index < 0)
1655
- return;
1656
- const items = [...this.items];
1657
- items[index] = new NavItem(Object.assign(Object.assign({}, items[index]), item));
1658
- items.sort(sortItems);
1659
- this._items$.next(items);
1660
- }
1661
- }
1662
- NavItemsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1663
- NavItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsService, providedIn: 'root' });
1664
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsService, decorators: [{
1665
- type: Injectable,
1666
- args: [{ providedIn: 'root' }]
1667
- }] });
1668
- function sortItems(a, b) {
1669
- if (!a.order)
1670
- return 1;
1671
- if (!b.order)
1672
- return -1;
1673
- return a.order - b.order;
1674
- }
1675
-
1676
- class PageAlertService {
1677
- constructor() {
1678
- this.alerts = new InternalStore([]);
1679
- this.alerts$ = this.alerts.sliceState(state => state);
1680
- }
1681
- show(alert) {
1682
- var _a;
1683
- const newAlert = Object.assign(Object.assign({}, alert), { dismissible: (_a = alert.dismissible) !== null && _a !== void 0 ? _a : true });
1684
- this.alerts.set([newAlert, ...this.alerts.state]);
1685
- }
1686
- remove(index) {
1687
- const alerts = [...this.alerts.state];
1688
- alerts.splice(index, 1);
1689
- this.alerts.set(alerts);
1690
- }
1691
- }
1692
- PageAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1693
- PageAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertService, providedIn: 'root' });
1694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertService, decorators: [{
1695
- type: Injectable,
1696
- args: [{ providedIn: 'root' }]
1591
+ class NavItem {
1592
+ constructor(props) {
1593
+ props = Object.assign(Object.assign({}, props), { visible: props.visible || (() => true) });
1594
+ Object.assign(this, props);
1595
+ }
1596
+ }
1597
+
1598
+ const NG_BOOTSTRAP_CONFIG_PROVIDERS = [
1599
+ {
1600
+ provide: APP_INITIALIZER,
1601
+ useFactory: configureNgBootstrap,
1602
+ deps: [NgbInputDatepickerConfig, NgbTypeaheadConfig],
1603
+ multi: true,
1604
+ },
1605
+ ];
1606
+ function configureNgBootstrap(datepicker, typeahead) {
1607
+ return () => {
1608
+ datepicker.container = 'body';
1609
+ typeahead.container = 'body';
1610
+ };
1611
+ }
1612
+
1613
+ const THEME_SHARED_ROUTE_PROVIDERS = [
1614
+ { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
1615
+ ];
1616
+ function configureRoutes(routesService) {
1617
+ return () => {
1618
+ routesService.add([
1619
+ {
1620
+ path: undefined,
1621
+ name: "AbpUiNavigation::Menu:Administration" /* Administration */,
1622
+ iconClass: 'fa fa-wrench',
1623
+ order: 100,
1624
+ },
1625
+ ]);
1626
+ };
1627
+ }
1628
+
1629
+ class NavItemsService {
1630
+ constructor() {
1631
+ this._items$ = new BehaviorSubject([]);
1632
+ }
1633
+ get items() {
1634
+ return this._items$.value;
1635
+ }
1636
+ get items$() {
1637
+ return this._items$.asObservable();
1638
+ }
1639
+ addItems(newItems) {
1640
+ const items = [...this.items];
1641
+ newItems.forEach(item => items.push(new NavItem(item)));
1642
+ items.sort(sortItems);
1643
+ this._items$.next(items);
1644
+ }
1645
+ removeItem(id) {
1646
+ const index = this.items.findIndex(item => item.id === id);
1647
+ if (index < 0)
1648
+ return;
1649
+ const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
1650
+ this._items$.next(items);
1651
+ }
1652
+ patchItem(id, item) {
1653
+ const index = this.items.findIndex(i => i.id === id);
1654
+ if (index < 0)
1655
+ return;
1656
+ const items = [...this.items];
1657
+ items[index] = new NavItem(Object.assign(Object.assign({}, items[index]), item));
1658
+ items.sort(sortItems);
1659
+ this._items$.next(items);
1660
+ }
1661
+ }
1662
+ NavItemsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1663
+ NavItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsService, providedIn: 'root' });
1664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsService, decorators: [{
1665
+ type: Injectable,
1666
+ args: [{ providedIn: 'root' }]
1667
+ }] });
1668
+ function sortItems(a, b) {
1669
+ if (!a.order)
1670
+ return 1;
1671
+ if (!b.order)
1672
+ return -1;
1673
+ return a.order - b.order;
1674
+ }
1675
+
1676
+ class PageAlertService {
1677
+ constructor() {
1678
+ this.alerts = new InternalStore([]);
1679
+ this.alerts$ = this.alerts.sliceState(state => state);
1680
+ }
1681
+ show(alert) {
1682
+ var _a;
1683
+ const newAlert = Object.assign(Object.assign({}, alert), { dismissible: (_a = alert.dismissible) !== null && _a !== void 0 ? _a : true });
1684
+ this.alerts.set([newAlert, ...this.alerts.state]);
1685
+ }
1686
+ remove(index) {
1687
+ const alerts = [...this.alerts.state];
1688
+ alerts.splice(index, 1);
1689
+ this.alerts.set(alerts);
1690
+ }
1691
+ }
1692
+ PageAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1693
+ PageAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertService, providedIn: 'root' });
1694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertService, decorators: [{
1695
+ type: Injectable,
1696
+ args: [{ providedIn: 'root' }]
1697
1697
  }], ctorParameters: function () { return []; } });
1698
1698
 
1699
- class ToasterService {
1700
- constructor(contentProjectionService) {
1701
- this.contentProjectionService = contentProjectionService;
1702
- this.toasts$ = new ReplaySubject(1);
1703
- this.lastId = -1;
1704
- this.toasts = [];
1705
- /**
1706
- * Removes the toast with given id.
1707
- * @param id ID of the toast to be removed.
1708
- */
1709
- this.remove = (id) => {
1710
- this.toasts = this.toasts.filter(toast => { var _a; return ((_a = toast.options) === null || _a === void 0 ? void 0 : _a.id) !== id; });
1711
- this.toasts$.next(this.toasts);
1712
- };
1713
- }
1714
- setContainer() {
1715
- this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ToastContainerComponent, {
1716
- toasts$: this.toasts$,
1717
- remove: this.remove,
1718
- }));
1719
- this.containerComponentRef.changeDetectorRef.detectChanges();
1720
- }
1721
- /**
1722
- * Creates an info toast with given parameters.
1723
- * @param message Content of the toast
1724
- * @param title Title of the toast
1725
- * @param options Spesific style or structural options for individual toast
1726
- */
1727
- info(message, title, options) {
1728
- return this.show(message, title, 'info', options);
1729
- }
1730
- /**
1731
- * Creates a success toast with given parameters.
1732
- * @param message Content of the toast
1733
- * @param title Title of the toast
1734
- * @param options Spesific style or structural options for individual toast
1735
- */
1736
- success(message, title, options) {
1737
- return this.show(message, title, 'success', options);
1738
- }
1739
- /**
1740
- * Creates a warning toast with given parameters.
1741
- * @param message Content of the toast
1742
- * @param title Title of the toast
1743
- * @param options Spesific style or structural options for individual toast
1744
- */
1745
- warn(message, title, options) {
1746
- return this.show(message, title, 'warning', options);
1747
- }
1748
- /**
1749
- * Creates an error toast with given parameters.
1750
- * @param message Content of the toast
1751
- * @param title Title of the toast
1752
- * @param options Spesific style or structural options for individual toast
1753
- */
1754
- error(message, title, options) {
1755
- return this.show(message, title, 'error', options);
1756
- }
1757
- /**
1758
- * Creates a toast with given parameters.
1759
- * @param message Content of the toast
1760
- * @param title Title of the toast
1761
- * @param severity Sets color of the toast. "success", "warning" etc.
1762
- * @param options Spesific style or structural options for individual toast
1763
- */
1764
- show(message, title = undefined, severity = 'neutral', options = {}) {
1765
- if (!this.containerComponentRef)
1766
- this.setContainer();
1767
- const id = ++this.lastId;
1768
- this.toasts.push({
1769
- message,
1770
- title,
1771
- severity,
1772
- options: Object.assign({ closable: true, id }, options),
1773
- });
1774
- this.toasts$.next(this.toasts);
1775
- return id;
1776
- }
1777
- /**
1778
- * Removes all open toasts at once.
1779
- */
1780
- clear(containerKey) {
1781
- this.toasts = !containerKey
1782
- ? []
1783
- : this.toasts.filter(toast => { var _a; return ((_a = toast.options) === null || _a === void 0 ? void 0 : _a.containerKey) !== containerKey; });
1784
- this.toasts$.next(this.toasts);
1785
- }
1786
- }
1787
- ToasterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToasterService, deps: [{ token: i2.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable });
1788
- ToasterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToasterService, providedIn: 'root' });
1789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToasterService, decorators: [{
1790
- type: Injectable,
1791
- args: [{
1792
- providedIn: 'root',
1793
- }]
1699
+ class ToasterService {
1700
+ constructor(contentProjectionService) {
1701
+ this.contentProjectionService = contentProjectionService;
1702
+ this.toasts$ = new ReplaySubject(1);
1703
+ this.lastId = -1;
1704
+ this.toasts = [];
1705
+ /**
1706
+ * Removes the toast with given id.
1707
+ * @param id ID of the toast to be removed.
1708
+ */
1709
+ this.remove = (id) => {
1710
+ this.toasts = this.toasts.filter(toast => { var _a; return ((_a = toast.options) === null || _a === void 0 ? void 0 : _a.id) !== id; });
1711
+ this.toasts$.next(this.toasts);
1712
+ };
1713
+ }
1714
+ setContainer() {
1715
+ this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ToastContainerComponent, {
1716
+ toasts$: this.toasts$,
1717
+ remove: this.remove,
1718
+ }));
1719
+ this.containerComponentRef.changeDetectorRef.detectChanges();
1720
+ }
1721
+ /**
1722
+ * Creates an info toast with given parameters.
1723
+ * @param message Content of the toast
1724
+ * @param title Title of the toast
1725
+ * @param options Spesific style or structural options for individual toast
1726
+ */
1727
+ info(message, title, options) {
1728
+ return this.show(message, title, 'info', options);
1729
+ }
1730
+ /**
1731
+ * Creates a success toast with given parameters.
1732
+ * @param message Content of the toast
1733
+ * @param title Title of the toast
1734
+ * @param options Spesific style or structural options for individual toast
1735
+ */
1736
+ success(message, title, options) {
1737
+ return this.show(message, title, 'success', options);
1738
+ }
1739
+ /**
1740
+ * Creates a warning toast with given parameters.
1741
+ * @param message Content of the toast
1742
+ * @param title Title of the toast
1743
+ * @param options Spesific style or structural options for individual toast
1744
+ */
1745
+ warn(message, title, options) {
1746
+ return this.show(message, title, 'warning', options);
1747
+ }
1748
+ /**
1749
+ * Creates an error toast with given parameters.
1750
+ * @param message Content of the toast
1751
+ * @param title Title of the toast
1752
+ * @param options Spesific style or structural options for individual toast
1753
+ */
1754
+ error(message, title, options) {
1755
+ return this.show(message, title, 'error', options);
1756
+ }
1757
+ /**
1758
+ * Creates a toast with given parameters.
1759
+ * @param message Content of the toast
1760
+ * @param title Title of the toast
1761
+ * @param severity Sets color of the toast. "success", "warning" etc.
1762
+ * @param options Spesific style or structural options for individual toast
1763
+ */
1764
+ show(message, title = undefined, severity = 'neutral', options = {}) {
1765
+ if (!this.containerComponentRef)
1766
+ this.setContainer();
1767
+ const id = ++this.lastId;
1768
+ this.toasts.push({
1769
+ message,
1770
+ title,
1771
+ severity,
1772
+ options: Object.assign({ closable: true, id }, options),
1773
+ });
1774
+ this.toasts$.next(this.toasts);
1775
+ return id;
1776
+ }
1777
+ /**
1778
+ * Removes all open toasts at once.
1779
+ */
1780
+ clear(containerKey) {
1781
+ this.toasts = !containerKey
1782
+ ? []
1783
+ : this.toasts.filter(toast => { var _a; return ((_a = toast.options) === null || _a === void 0 ? void 0 : _a.containerKey) !== containerKey; });
1784
+ this.toasts$.next(this.toasts);
1785
+ }
1786
+ }
1787
+ ToasterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToasterService, deps: [{ token: i2.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable });
1788
+ ToasterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToasterService, providedIn: 'root' });
1789
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ToasterService, decorators: [{
1790
+ type: Injectable,
1791
+ args: [{
1792
+ providedIn: 'root',
1793
+ }]
1794
1794
  }], ctorParameters: function () { return [{ type: i2.ContentProjectionService }]; } });
1795
1795
 
1796
1796
  var styles = `
@@ -1975,238 +1975,238 @@ ngb-typeahead-window, ngb-typeahead-window.dropdown-menu {
1975
1975
  }
1976
1976
  `;
1977
1977
 
1978
- const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARED_APPEND_CONTENT', {
1979
- providedIn: 'root',
1980
- factory: () => {
1981
- const domInsertion = inject(DomInsertionService);
1982
- domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
1983
- },
1978
+ const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARED_APPEND_CONTENT', {
1979
+ providedIn: 'root',
1980
+ factory: () => {
1981
+ const domInsertion = inject(DomInsertionService);
1982
+ domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
1983
+ },
1984
1984
  });
1985
1985
 
1986
- function isNumber(value) {
1987
- return !isNaN(toInteger(value));
1988
- }
1989
- function toInteger(value) {
1990
- return parseInt(`${value}`, 10);
1991
- }
1992
- class DateParserFormatter extends NgbDateParserFormatter {
1993
- constructor(configState, locale) {
1994
- super();
1995
- this.configState = configState;
1996
- this.locale = locale;
1997
- }
1998
- parse(value) {
1999
- if (value) {
2000
- const dateParts = value.trim().split('-');
2001
- // TODO: CHANGED
2002
- if (dateParts.length === 1 && isNumber(dateParts[0])) {
2003
- return { year: toInteger(dateParts[0]), month: -1, day: -1 };
2004
- }
2005
- else if (dateParts.length === 2 && isNumber(dateParts[0]) && isNumber(dateParts[1])) {
2006
- return { year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: -1 };
2007
- }
2008
- else if (dateParts.length === 3 &&
2009
- isNumber(dateParts[0]) &&
2010
- isNumber(dateParts[1]) &&
2011
- isNumber(dateParts[2])) {
2012
- return {
2013
- year: toInteger(dateParts[0]),
2014
- month: toInteger(dateParts[1]),
2015
- day: toInteger(dateParts[2]),
2016
- };
2017
- }
2018
- }
2019
- return null;
2020
- }
2021
- format(date) {
2022
- var _a, _b;
2023
- if (!date)
2024
- return '';
2025
- const localization = this.configState.getOne('localization');
2026
- const dateFormat = ((_b = (_a = localization.currentCulture) === null || _a === void 0 ? void 0 : _a.dateTimeFormat) === null || _b === void 0 ? void 0 : _b.shortDatePattern) || 'yyyy-MM-dd';
2027
- return formatDate(new Date(date.year, date.month - 1, date.day), dateFormat, this.locale);
2028
- }
2029
- }
2030
- DateParserFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DateParserFormatter, deps: [{ token: i2.ConfigStateService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2031
- DateParserFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DateParserFormatter });
2032
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DateParserFormatter, decorators: [{
2033
- type: Injectable
2034
- }], ctorParameters: function () { return [{ type: i2.ConfigStateService }, { type: undefined, decorators: [{
2035
- type: Inject,
2036
- args: [LOCALE_ID]
1986
+ function isNumber(value) {
1987
+ return !isNaN(toInteger(value));
1988
+ }
1989
+ function toInteger(value) {
1990
+ return parseInt(`${value}`, 10);
1991
+ }
1992
+ class DateParserFormatter extends NgbDateParserFormatter {
1993
+ constructor(configState, locale) {
1994
+ super();
1995
+ this.configState = configState;
1996
+ this.locale = locale;
1997
+ }
1998
+ parse(value) {
1999
+ if (value) {
2000
+ const dateParts = value.trim().split('-');
2001
+ // TODO: CHANGED
2002
+ if (dateParts.length === 1 && isNumber(dateParts[0])) {
2003
+ return { year: toInteger(dateParts[0]), month: -1, day: -1 };
2004
+ }
2005
+ else if (dateParts.length === 2 && isNumber(dateParts[0]) && isNumber(dateParts[1])) {
2006
+ return { year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: -1 };
2007
+ }
2008
+ else if (dateParts.length === 3 &&
2009
+ isNumber(dateParts[0]) &&
2010
+ isNumber(dateParts[1]) &&
2011
+ isNumber(dateParts[2])) {
2012
+ return {
2013
+ year: toInteger(dateParts[0]),
2014
+ month: toInteger(dateParts[1]),
2015
+ day: toInteger(dateParts[2]),
2016
+ };
2017
+ }
2018
+ }
2019
+ return null;
2020
+ }
2021
+ format(date) {
2022
+ var _a, _b;
2023
+ if (!date)
2024
+ return '';
2025
+ const localization = this.configState.getOne('localization');
2026
+ const dateFormat = ((_b = (_a = localization.currentCulture) === null || _a === void 0 ? void 0 : _a.dateTimeFormat) === null || _b === void 0 ? void 0 : _b.shortDatePattern) || 'yyyy-MM-dd';
2027
+ return formatDate(new Date(date.year, date.month - 1, date.day), dateFormat, this.locale);
2028
+ }
2029
+ }
2030
+ DateParserFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DateParserFormatter, deps: [{ token: i2.ConfigStateService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2031
+ DateParserFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DateParserFormatter });
2032
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: DateParserFormatter, decorators: [{
2033
+ type: Injectable
2034
+ }], ctorParameters: function () { return [{ type: i2.ConfigStateService }, { type: undefined, decorators: [{
2035
+ type: Inject,
2036
+ args: [LOCALE_ID]
2037
2037
  }] }]; } });
2038
2038
 
2039
- const declarationsWithExports = [
2040
- BreadcrumbComponent,
2041
- BreadcrumbItemsComponent,
2042
- ButtonComponent,
2043
- ConfirmationComponent,
2044
- LoaderBarComponent,
2045
- LoadingComponent,
2046
- ModalComponent,
2047
- ToastComponent,
2048
- ToastContainerComponent,
2049
- NgxDatatableDefaultDirective,
2050
- NgxDatatableListDirective,
2051
- LoadingDirective,
2052
- ModalCloseDirective,
2053
- ];
2054
- class BaseThemeSharedModule {
2055
- }
2056
- BaseThemeSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2057
- BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, declarations: [BreadcrumbComponent,
2058
- BreadcrumbItemsComponent,
2059
- ButtonComponent,
2060
- ConfirmationComponent,
2061
- LoaderBarComponent,
2062
- LoadingComponent,
2063
- ModalComponent,
2064
- ToastComponent,
2065
- ToastContainerComponent,
2066
- NgxDatatableDefaultDirective,
2067
- NgxDatatableListDirective,
2068
- LoadingDirective,
2069
- ModalCloseDirective, HttpErrorWrapperComponent], imports: [CoreModule,
2070
- NgxDatatableModule,
2071
- NgxValidateCoreModule,
2072
- NgbPaginationModule,
2073
- EllipsisModule], exports: [NgxDatatableModule, EllipsisModule, BreadcrumbComponent,
2074
- BreadcrumbItemsComponent,
2075
- ButtonComponent,
2076
- ConfirmationComponent,
2077
- LoaderBarComponent,
2078
- LoadingComponent,
2079
- ModalComponent,
2080
- ToastComponent,
2081
- ToastContainerComponent,
2082
- NgxDatatableDefaultDirective,
2083
- NgxDatatableListDirective,
2084
- LoadingDirective,
2085
- ModalCloseDirective] });
2086
- BaseThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, providers: [DatePipe], imports: [[
2087
- CoreModule,
2088
- NgxDatatableModule,
2089
- NgxValidateCoreModule,
2090
- NgbPaginationModule,
2091
- EllipsisModule,
2092
- ], NgxDatatableModule, EllipsisModule] });
2093
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, decorators: [{
2094
- type: NgModule,
2095
- args: [{
2096
- imports: [
2097
- CoreModule,
2098
- NgxDatatableModule,
2099
- NgxValidateCoreModule,
2100
- NgbPaginationModule,
2101
- EllipsisModule,
2102
- ],
2103
- declarations: [...declarationsWithExports, HttpErrorWrapperComponent],
2104
- exports: [NgxDatatableModule, EllipsisModule, ...declarationsWithExports],
2105
- providers: [DatePipe],
2106
- entryComponents: [
2107
- HttpErrorWrapperComponent,
2108
- LoadingComponent,
2109
- ToastContainerComponent,
2110
- ConfirmationComponent,
2111
- ],
2112
- }]
2113
- }] });
2114
- class ThemeSharedModule {
2115
- static forRoot({ httpErrorConfig, validation = {} } = {}) {
2116
- return {
2117
- ngModule: ThemeSharedModule,
2118
- providers: [
2119
- {
2120
- provide: APP_INITIALIZER,
2121
- multi: true,
2122
- deps: [ErrorHandler],
2123
- useFactory: noop,
2124
- },
2125
- THEME_SHARED_ROUTE_PROVIDERS,
2126
- {
2127
- provide: APP_INITIALIZER,
2128
- multi: true,
2129
- deps: [THEME_SHARED_APPEND_CONTENT],
2130
- useFactory: noop,
2131
- },
2132
- { provide: HTTP_ERROR_CONFIG, useValue: httpErrorConfig },
2133
- {
2134
- provide: 'HTTP_ERROR_CONFIG',
2135
- useFactory: httpErrorConfigFactory,
2136
- deps: [HTTP_ERROR_CONFIG],
2137
- },
2138
- { provide: NgbDateParserFormatter, useClass: DateParserFormatter },
2139
- NG_BOOTSTRAP_CONFIG_PROVIDERS,
2140
- {
2141
- provide: VALIDATION_BLUEPRINTS,
2142
- useValue: Object.assign(Object.assign({}, DEFAULT_VALIDATION_BLUEPRINTS), (validation.blueprints || {})),
2143
- },
2144
- {
2145
- provide: VALIDATION_MAP_ERRORS_FN,
2146
- useValue: validation.mapErrorsFn || defaultMapErrorsFn,
2147
- },
2148
- {
2149
- provide: VALIDATION_VALIDATE_ON_SUBMIT,
2150
- useValue: validation.validateOnSubmit,
2151
- },
2152
- DocumentDirHandlerService,
2153
- {
2154
- provide: APP_INITIALIZER,
2155
- useFactory: noop,
2156
- multi: true,
2157
- deps: [DocumentDirHandlerService],
2158
- },
2159
- ],
2160
- };
2161
- }
2162
- }
2163
- ThemeSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2164
- ThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, imports: [BaseThemeSharedModule], exports: [BaseThemeSharedModule] });
2165
- ThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, imports: [[BaseThemeSharedModule], BaseThemeSharedModule] });
2166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, decorators: [{
2167
- type: NgModule,
2168
- args: [{
2169
- imports: [BaseThemeSharedModule],
2170
- exports: [BaseThemeSharedModule],
2171
- }]
2039
+ const declarationsWithExports = [
2040
+ BreadcrumbComponent,
2041
+ BreadcrumbItemsComponent,
2042
+ ButtonComponent,
2043
+ ConfirmationComponent,
2044
+ LoaderBarComponent,
2045
+ LoadingComponent,
2046
+ ModalComponent,
2047
+ ToastComponent,
2048
+ ToastContainerComponent,
2049
+ NgxDatatableDefaultDirective,
2050
+ NgxDatatableListDirective,
2051
+ LoadingDirective,
2052
+ ModalCloseDirective,
2053
+ ];
2054
+ class BaseThemeSharedModule {
2055
+ }
2056
+ BaseThemeSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2057
+ BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, declarations: [BreadcrumbComponent,
2058
+ BreadcrumbItemsComponent,
2059
+ ButtonComponent,
2060
+ ConfirmationComponent,
2061
+ LoaderBarComponent,
2062
+ LoadingComponent,
2063
+ ModalComponent,
2064
+ ToastComponent,
2065
+ ToastContainerComponent,
2066
+ NgxDatatableDefaultDirective,
2067
+ NgxDatatableListDirective,
2068
+ LoadingDirective,
2069
+ ModalCloseDirective, HttpErrorWrapperComponent], imports: [CoreModule,
2070
+ NgxDatatableModule,
2071
+ NgxValidateCoreModule,
2072
+ NgbPaginationModule,
2073
+ EllipsisModule], exports: [NgxDatatableModule, EllipsisModule, BreadcrumbComponent,
2074
+ BreadcrumbItemsComponent,
2075
+ ButtonComponent,
2076
+ ConfirmationComponent,
2077
+ LoaderBarComponent,
2078
+ LoadingComponent,
2079
+ ModalComponent,
2080
+ ToastComponent,
2081
+ ToastContainerComponent,
2082
+ NgxDatatableDefaultDirective,
2083
+ NgxDatatableListDirective,
2084
+ LoadingDirective,
2085
+ ModalCloseDirective] });
2086
+ BaseThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, providers: [DatePipe], imports: [[
2087
+ CoreModule,
2088
+ NgxDatatableModule,
2089
+ NgxValidateCoreModule,
2090
+ NgbPaginationModule,
2091
+ EllipsisModule,
2092
+ ], NgxDatatableModule, EllipsisModule] });
2093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeSharedModule, decorators: [{
2094
+ type: NgModule,
2095
+ args: [{
2096
+ imports: [
2097
+ CoreModule,
2098
+ NgxDatatableModule,
2099
+ NgxValidateCoreModule,
2100
+ NgbPaginationModule,
2101
+ EllipsisModule,
2102
+ ],
2103
+ declarations: [...declarationsWithExports, HttpErrorWrapperComponent],
2104
+ exports: [NgxDatatableModule, EllipsisModule, ...declarationsWithExports],
2105
+ providers: [DatePipe],
2106
+ entryComponents: [
2107
+ HttpErrorWrapperComponent,
2108
+ LoadingComponent,
2109
+ ToastContainerComponent,
2110
+ ConfirmationComponent,
2111
+ ],
2112
+ }]
2113
+ }] });
2114
+ class ThemeSharedModule {
2115
+ static forRoot({ httpErrorConfig, validation = {} } = {}) {
2116
+ return {
2117
+ ngModule: ThemeSharedModule,
2118
+ providers: [
2119
+ {
2120
+ provide: APP_INITIALIZER,
2121
+ multi: true,
2122
+ deps: [ErrorHandler],
2123
+ useFactory: noop,
2124
+ },
2125
+ THEME_SHARED_ROUTE_PROVIDERS,
2126
+ {
2127
+ provide: APP_INITIALIZER,
2128
+ multi: true,
2129
+ deps: [THEME_SHARED_APPEND_CONTENT],
2130
+ useFactory: noop,
2131
+ },
2132
+ { provide: HTTP_ERROR_CONFIG, useValue: httpErrorConfig },
2133
+ {
2134
+ provide: 'HTTP_ERROR_CONFIG',
2135
+ useFactory: httpErrorConfigFactory,
2136
+ deps: [HTTP_ERROR_CONFIG],
2137
+ },
2138
+ { provide: NgbDateParserFormatter, useClass: DateParserFormatter },
2139
+ NG_BOOTSTRAP_CONFIG_PROVIDERS,
2140
+ {
2141
+ provide: VALIDATION_BLUEPRINTS,
2142
+ useValue: Object.assign(Object.assign({}, DEFAULT_VALIDATION_BLUEPRINTS), (validation.blueprints || {})),
2143
+ },
2144
+ {
2145
+ provide: VALIDATION_MAP_ERRORS_FN,
2146
+ useValue: validation.mapErrorsFn || defaultMapErrorsFn,
2147
+ },
2148
+ {
2149
+ provide: VALIDATION_VALIDATE_ON_SUBMIT,
2150
+ useValue: validation.validateOnSubmit,
2151
+ },
2152
+ DocumentDirHandlerService,
2153
+ {
2154
+ provide: APP_INITIALIZER,
2155
+ useFactory: noop,
2156
+ multi: true,
2157
+ deps: [DocumentDirHandlerService],
2158
+ },
2159
+ ],
2160
+ };
2161
+ }
2162
+ }
2163
+ ThemeSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2164
+ ThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, imports: [BaseThemeSharedModule], exports: [BaseThemeSharedModule] });
2165
+ ThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, imports: [[BaseThemeSharedModule], BaseThemeSharedModule] });
2166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeSharedModule, decorators: [{
2167
+ type: NgModule,
2168
+ args: [{
2169
+ imports: [BaseThemeSharedModule],
2170
+ exports: [BaseThemeSharedModule],
2171
+ }]
2172
2172
  }] });
2173
2173
 
2174
- const { minLength, maxLength } = Validators;
2175
- function getPasswordValidators(injector) {
2176
- const getRule = getRuleFn(injector);
2177
- const passwordRulesArr = [];
2178
- let requiredLength = 1;
2179
- if (getRule('RequireDigit') === 'true') {
2180
- passwordRulesArr.push('number');
2181
- }
2182
- if (getRule('RequireLowercase') === 'true') {
2183
- passwordRulesArr.push('small');
2184
- }
2185
- if (getRule('RequireUppercase') === 'true') {
2186
- passwordRulesArr.push('capital');
2187
- }
2188
- if (getRule('RequireNonAlphanumeric') === 'true') {
2189
- passwordRulesArr.push('special');
2190
- }
2191
- if (Number.isInteger(+getRule('RequiredLength'))) {
2192
- requiredLength = +getRule('RequiredLength');
2193
- }
2194
- return [validatePassword(passwordRulesArr), minLength(requiredLength), maxLength(128)];
2195
- }
2196
- function getRuleFn(injector) {
2197
- const configState = injector.get(ConfigStateService);
2198
- return (key) => {
2199
- const passwordRules = configState.getSettings('Identity.Password');
2200
- return (passwordRules[`Abp.Identity.Password.${key}`] || '').toLowerCase();
2201
- };
2202
- }
2203
-
2204
- /*
2205
- * Public API Surface of theme-shared
2174
+ const { minLength, maxLength } = Validators;
2175
+ function getPasswordValidators(injector) {
2176
+ const getRule = getRuleFn(injector);
2177
+ const passwordRulesArr = [];
2178
+ let requiredLength = 1;
2179
+ if (getRule('RequireDigit') === 'true') {
2180
+ passwordRulesArr.push('number');
2181
+ }
2182
+ if (getRule('RequireLowercase') === 'true') {
2183
+ passwordRulesArr.push('small');
2184
+ }
2185
+ if (getRule('RequireUppercase') === 'true') {
2186
+ passwordRulesArr.push('capital');
2187
+ }
2188
+ if (getRule('RequireNonAlphanumeric') === 'true') {
2189
+ passwordRulesArr.push('special');
2190
+ }
2191
+ if (Number.isInteger(+getRule('RequiredLength'))) {
2192
+ requiredLength = +getRule('RequiredLength');
2193
+ }
2194
+ return [validatePassword(passwordRulesArr), minLength(requiredLength), maxLength(128)];
2195
+ }
2196
+ function getRuleFn(injector) {
2197
+ const configState = injector.get(ConfigStateService);
2198
+ return (key) => {
2199
+ const passwordRules = configState.getSettings('Identity.Password');
2200
+ return (passwordRules[`Abp.Identity.Password.${key}`] || '').toLowerCase();
2201
+ };
2202
+ }
2203
+
2204
+ /*
2205
+ * Public API Surface of theme-shared
2206
2206
  */
2207
2207
 
2208
- /**
2209
- * Generated bundle index. Do not edit.
2208
+ /**
2209
+ * Generated bundle index. Do not edit.
2210
2210
  */
2211
2211
 
2212
2212
  export { BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, Confirmation, ConfirmationComponent, ConfirmationService, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_VALIDATION_BLUEPRINTS, DateParserFormatter, DocumentDirHandlerService, EllipsisDirective, EllipsisModule, ErrorHandler, HTTP_ERROR_CONFIG, HTTP_ERROR_HANDLER, HttpErrorWrapperComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, SUPPRESS_UNSAVED_CHANGES_WARNING, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, ThemeSharedModule, ToastComponent, ToastContainerComponent, ToasterService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getPasswordValidators, httpErrorConfigFactory, slideFromBottom, toastInOut };