@abp/ng.theme.shared 5.0.1 → 5.1.1

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