@abp/ng.theme.shared 5.0.0 → 5.1.2

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