@lenne.tech/ng-base 17.0.1 → 18.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/base-cms/pages/base-cms/base-cms.component.d.ts +1 -1
  2. package/base-cms/public-api.d.ts +0 -1
  3. package/base-components/components/breadcrumb/breadcrumb.component.d.ts +1 -1
  4. package/base-components/components/change-password/change-password.component.d.ts +1 -1
  5. package/base-components/components/checkbox/checkbox.component.d.ts +1 -1
  6. package/base-components/components/delete-account/delete-account.component.d.ts +1 -1
  7. package/base-components/components/fab-button/fab-button.component.d.ts +1 -1
  8. package/base-components/components/input/input.component.d.ts +1 -1
  9. package/base-components/components/model-form/model-form-base.component.d.ts +1 -1
  10. package/base-components/components/model-form/model-form.component.d.ts +1 -1
  11. package/base-components/components/model-form-sub/model-form-sub.component.d.ts +1 -1
  12. package/base-components/components/model-table/model-table.component.d.ts +1 -1
  13. package/base-components/components/refence-input/refence-input.component.d.ts +1 -1
  14. package/base-components/components/select/select.component.d.ts +1 -1
  15. package/base-components/components/skeleton-loader/skeleton-loader.component.d.ts +1 -1
  16. package/base-components/components/tags/tags.component.d.ts +1 -1
  17. package/base-components/components/textarea/textarea.component.d.ts +1 -1
  18. package/base-components/components/toast/toast.component.d.ts +1 -1
  19. package/base-components/components/upload-image/upload-image.component.d.ts +1 -1
  20. package/base-components/directives/back-button.directive.d.ts +1 -1
  21. package/base-components/directives/context-menu.directive.d.ts +1 -1
  22. package/base-components/directives/sort.directive.d.ts +1 -1
  23. package/base-components/directives/stop-propagation.directive.d.ts +1 -1
  24. package/base-components/pipes/ellipses.pipe.d.ts +1 -1
  25. package/base-components/public-api.d.ts +0 -1
  26. package/base-prototype/pages/email-verification/email-verification.component.d.ts +1 -1
  27. package/base-prototype/pages/forgot-password/forgot-password.component.d.ts +1 -1
  28. package/base-prototype/pages/login/login.component.d.ts +1 -1
  29. package/base-prototype/pages/profile/profile.component.d.ts +1 -1
  30. package/base-prototype/pages/register/register.component.d.ts +2 -2
  31. package/base-prototype/pages/set-password/set-password.component.d.ts +1 -1
  32. package/base-prototype/public-api.d.ts +0 -1
  33. package/esm2022/base-cms/pages/base-cms/base-cms.component.mjs +14 -8
  34. package/esm2022/base-cms/public-api.mjs +1 -3
  35. package/esm2022/base-components/components/breadcrumb/breadcrumb.component.mjs +10 -7
  36. package/esm2022/base-components/components/change-password/change-password.component.mjs +11 -9
  37. package/esm2022/base-components/components/checkbox/checkbox.component.mjs +10 -6
  38. package/esm2022/base-components/components/delete-account/delete-account.component.mjs +5 -6
  39. package/esm2022/base-components/components/fab-button/fab-button.component.mjs +11 -7
  40. package/esm2022/base-components/components/input/input.component.mjs +10 -6
  41. package/esm2022/base-components/components/loading-bar/loading-bar.component.mjs +5 -6
  42. package/esm2022/base-components/components/model-form/model-form-base.component.mjs +5 -4
  43. package/esm2022/base-components/components/model-form/model-form.component.mjs +17 -10
  44. package/esm2022/base-components/components/model-form-sub/model-form-sub.component.mjs +20 -13
  45. package/esm2022/base-components/components/model-table/model-table.component.mjs +23 -14
  46. package/esm2022/base-components/components/refence-input/refence-input.component.mjs +13 -7
  47. package/esm2022/base-components/components/select/select.component.mjs +10 -6
  48. package/esm2022/base-components/components/skeleton-loader/skeleton-loader.component.mjs +8 -6
  49. package/esm2022/base-components/components/tags/tags.component.mjs +11 -7
  50. package/esm2022/base-components/components/textarea/textarea.component.mjs +10 -6
  51. package/esm2022/base-components/components/toast/toast.component.mjs +7 -6
  52. package/esm2022/base-components/components/upload-image/upload-image.component.mjs +13 -9
  53. package/esm2022/base-components/directives/back-button.directive.mjs +5 -4
  54. package/esm2022/base-components/directives/context-menu.directive.mjs +5 -4
  55. package/esm2022/base-components/directives/sort.directive.mjs +5 -4
  56. package/esm2022/base-components/directives/stop-propagation.directive.mjs +5 -4
  57. package/esm2022/base-components/pipes/ellipses.pipe.mjs +5 -4
  58. package/esm2022/base-components/public-api.mjs +1 -3
  59. package/esm2022/base-prototype/pages/email-verification/email-verification.component.mjs +5 -6
  60. package/esm2022/base-prototype/pages/forgot-password/forgot-password.component.mjs +12 -8
  61. package/esm2022/base-prototype/pages/login/login.component.mjs +12 -8
  62. package/esm2022/base-prototype/pages/profile/profile.component.mjs +8 -6
  63. package/esm2022/base-prototype/pages/register/register.component.mjs +14 -9
  64. package/esm2022/base-prototype/pages/set-password/set-password.component.mjs +11 -9
  65. package/esm2022/base-prototype/public-api.mjs +1 -3
  66. package/esm2022/shared/classes/basic-user.class.mjs +1 -1
  67. package/esm2022/shared/classes/graphql-meta.class.mjs +1 -1
  68. package/esm2022/shared/classes/helper.class.mjs +1 -1
  69. package/esm2022/shared/classes/sort.class.mjs +1 -1
  70. package/esm2022/shared/classes/standard.class.mjs +1 -1
  71. package/esm2022/shared/functions/ws-client.function.mjs +1 -1
  72. package/esm2022/shared/services/auth.service.mjs +4 -4
  73. package/esm2022/shared/services/breadcrumb.service.mjs +4 -4
  74. package/esm2022/shared/services/cms.service.mjs +4 -4
  75. package/esm2022/shared/services/file.service.mjs +4 -4
  76. package/esm2022/shared/services/forms.service.mjs +4 -4
  77. package/esm2022/shared/services/graphql-meta.service.mjs +4 -4
  78. package/esm2022/shared/services/graphql-plus.service.mjs +4 -4
  79. package/esm2022/shared/services/graphql.service.mjs +7 -7
  80. package/esm2022/shared/services/image.service.mjs +4 -4
  81. package/esm2022/shared/services/loader.service.mjs +4 -4
  82. package/esm2022/shared/services/navigation.service.mjs +4 -4
  83. package/esm2022/shared/services/scroll.service.mjs +4 -4
  84. package/esm2022/shared/services/storage.service.mjs +4 -4
  85. package/esm2022/shared/services/toast.service.mjs +4 -4
  86. package/esm2022/shared/services/user.service.mjs +3 -3
  87. package/esm2022/shared/services/ws.service.mjs +3 -3
  88. package/esm2022/shared/validators/match.validator.mjs +1 -1
  89. package/esm2022/src/base.module.mjs +7 -40
  90. package/esm2022/src/decorators/auto-unsubscribe.decorator.mjs +1 -1
  91. package/esm2022/src/directives/lazy-load.directive.mjs +5 -4
  92. package/esm2022/src/directives/match-height.directive.mjs +5 -4
  93. package/esm2022/src/directives/resizable.directive.mjs +5 -4
  94. package/esm2022/src/factories/apollo-options.factory.mjs +1 -1
  95. package/esm2022/src/functions/extract-files.function.mjs +1 -1
  96. package/esm2022/src/guards/auth.guard.mjs +4 -4
  97. package/esm2022/src/guards/can-deactivate.guard.mjs +3 -3
  98. package/esm2022/src/guards/logout.guard.mjs +4 -4
  99. package/esm2022/src/pipes/date-ago.pipe.mjs +5 -4
  100. package/esm2022/src/pipes/safe-html.pipe.mjs +5 -5
  101. package/esm2022/src/services/fullscreen.service.mjs +4 -4
  102. package/esm2022/src/services/seo.service.mjs +4 -4
  103. package/esm2022/src/services/theme.service.mjs +4 -4
  104. package/fesm2022/lenne.tech-ng-base-base-cms.mjs +16 -93
  105. package/fesm2022/lenne.tech-ng-base-base-cms.mjs.map +1 -1
  106. package/fesm2022/lenne.tech-ng-base-base-components.mjs +668 -697
  107. package/fesm2022/lenne.tech-ng-base-base-components.mjs.map +1 -1
  108. package/fesm2022/lenne.tech-ng-base-base-prototype.mjs +48 -74
  109. package/fesm2022/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
  110. package/fesm2022/lenne.tech-ng-base-shared.mjs +51 -51
  111. package/fesm2022/lenne.tech-ng-base-shared.mjs.map +1 -1
  112. package/fesm2022/lenne.tech-ng-base.mjs +199 -223
  113. package/fesm2022/lenne.tech-ng-base.mjs.map +1 -1
  114. package/package.json +12 -12
  115. package/src/base.module.d.ts +2 -8
  116. package/src/directives/lazy-load.directive.d.ts +1 -1
  117. package/src/directives/match-height.directive.d.ts +1 -1
  118. package/src/directives/resizable.directive.d.ts +1 -1
  119. package/src/pipes/date-ago.pipe.d.ts +1 -1
  120. package/src/pipes/safe-html.pipe.d.ts +1 -1
  121. package/base-cms/base-cms-routing.module.d.ts +0 -7
  122. package/base-cms/base-cms.module.d.ts +0 -26
  123. package/base-components/base-components.module.d.ts +0 -32
  124. package/base-prototype/base-prototype.module.d.ts +0 -17
  125. package/esm2022/base-cms/base-cms-routing.module.mjs +0 -32
  126. package/esm2022/base-cms/base-cms.module.mjs +0 -60
  127. package/esm2022/base-components/base-components.module.mjs +0 -122
  128. package/esm2022/base-prototype/base-prototype.module.mjs +0 -53
@@ -1,18 +1,249 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, ViewChild, Directive, Inject, HostListener, Pipe, ViewContainerRef, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/forms';
4
- import { FormControl, UntypedFormControl, UntypedFormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import * as i2 from '@angular/common';
6
- import { DOCUMENT, CommonModule } from '@angular/common';
7
- import { style, animate, query, transition, trigger } from '@angular/animations';
2
+ import { EventEmitter, Directive, Inject, Input, Output, HostListener, Pipe, Component, ViewChild, ViewContainerRef } from '@angular/core';
3
+ import { DOCUMENT, NgClass, NgStyle, AsyncPipe, DatePipe } from '@angular/common';
4
+ import * as i1 from '@lenne.tech/ng-base/shared';
5
+ import { Sort, ToastType, SortOrderEnum, GraphQLRequestType, BasicUser, fullEmail, securePasswordValidator, Validation } from '@lenne.tech/ng-base/shared';
6
+ import * as i1$1 from '@angular/forms';
7
+ import { ReactiveFormsModule, FormControl, FormsModule, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
8
+ import { trigger, transition, query, style, animate } from '@angular/animations';
8
9
  import { Subscription } from 'rxjs';
9
- import * as i1$1 from '@lenne.tech/ng-base/shared';
10
- import { ToastType, Sort, SortOrderEnum, GraphQLRequestType, BasicUser, fullEmail, securePasswordValidator, Validation } from '@lenne.tech/ng-base/shared';
11
- import * as i2$1 from '@angular/router';
12
- import { RouterModule } from '@angular/router';
10
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
11
+ import * as i2 from '@angular/router';
12
+ import { RouterLink } from '@angular/router';
13
+ import { ImageCropperComponent } from 'ngx-image-cropper';
13
14
  import * as i1$2 from '@angular/common/http';
14
- import * as i4 from 'ngx-image-cropper';
15
- import { ImageCropperModule } from 'ngx-image-cropper';
15
+
16
+ class SortDirective {
17
+ renderer;
18
+ targetElem;
19
+ baseSort;
20
+ baseSorted = new EventEmitter();
21
+ constructor(renderer, targetElem, document) {
22
+ this.renderer = renderer;
23
+ this.targetElem = targetElem;
24
+ }
25
+ /**
26
+ * Sorts columns on click
27
+ */
28
+ sortColumn() {
29
+ const items = document.getElementsByTagName('th');
30
+ for (let i = 0; i < items.length; i++) {
31
+ items[i].classList.remove('asc');
32
+ items[i].classList.remove('desc');
33
+ }
34
+ const sort = new Sort();
35
+ const elem = this.targetElem.nativeElement;
36
+ const order = elem.getAttribute('data-order');
37
+ const type = elem.getAttribute('data-type');
38
+ const property = elem.getAttribute('data-name');
39
+ if (order === 'desc') {
40
+ this.baseSorted.emit([...this.baseSort].sort(sort.startSort(property, order, type)));
41
+ elem.setAttribute('data-order', 'asc');
42
+ elem.classList.remove('desc');
43
+ elem.classList.add('asc');
44
+ }
45
+ else {
46
+ this.baseSorted.emit([...this.baseSort].sort(sort.startSort(property, order, type)));
47
+ elem.setAttribute('data-order', 'desc');
48
+ elem.classList.remove('asc');
49
+ elem.classList.add('desc');
50
+ }
51
+ }
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SortDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
53
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: SortDirective, isStandalone: true, selector: "[baseSort]", inputs: { baseSort: "baseSort" }, outputs: { baseSorted: "baseSorted" }, host: { listeners: { "click": "sortColumn()" } }, ngImport: i0 });
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SortDirective, decorators: [{
56
+ type: Directive,
57
+ args: [{
58
+ selector: '[baseSort]',
59
+ standalone: true,
60
+ }]
61
+ }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: Document, decorators: [{
62
+ type: Inject,
63
+ args: [DOCUMENT]
64
+ }] }], propDecorators: { baseSort: [{
65
+ type: Input
66
+ }], baseSorted: [{
67
+ type: Output
68
+ }], sortColumn: [{
69
+ type: HostListener,
70
+ args: ['click']
71
+ }] } });
72
+
73
+ class BackButtonDirective {
74
+ navigation;
75
+ constructor(navigation) {
76
+ this.navigation = navigation;
77
+ }
78
+ onClick() {
79
+ this.navigation.back();
80
+ }
81
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: BackButtonDirective, deps: [{ token: i1.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
82
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: BackButtonDirective, isStandalone: true, selector: "[baseBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: BackButtonDirective, decorators: [{
85
+ type: Directive,
86
+ args: [{
87
+ selector: '[baseBackButton]',
88
+ standalone: true,
89
+ }]
90
+ }], ctorParameters: () => [{ type: i1.NavigationService }], propDecorators: { onClick: [{
91
+ type: HostListener,
92
+ args: ['click']
93
+ }] } });
94
+
95
+ /**
96
+ * Directive vor context menu
97
+ * See https://stackblitz.com/edit/angular-custom-context-menu
98
+ */
99
+ class ContextMenuDirective {
100
+ el;
101
+ contextMenuData;
102
+ ltContextMenu;
103
+ xGap = 0;
104
+ yGap = 0;
105
+ overflowSpace = 10;
106
+ selectors = '*';
107
+ clickedElement = null;
108
+ previousDisplayStatus = null;
109
+ constructor(el) {
110
+ this.el = el;
111
+ }
112
+ ngOnInit() {
113
+ if (this.ltContextMenu) {
114
+ this.previousDisplayStatus = this.ltContextMenu.style.display;
115
+ }
116
+ // Add a click listener to the window,
117
+ // so that we can close the context menu on left click
118
+ window.addEventListener('click', () => {
119
+ this.showContextMenu(null, false);
120
+ });
121
+ // Close context menu when escape is pressed
122
+ window.addEventListener('keydown', (e) => {
123
+ if (e.code === 'Escape') {
124
+ this.showContextMenu(null, false);
125
+ }
126
+ });
127
+ // Add an event listener to listen to the 'contextmenu' event
128
+ this.el.nativeElement.addEventListener('contextmenu', (e) => {
129
+ // Prevent the default context menu to popup
130
+ if (e.preventDefault) {
131
+ e.preventDefault();
132
+ }
133
+ // Shows our own context menu
134
+ this.showContextMenu(e, true);
135
+ });
136
+ }
137
+ // Shows or hides our custom context menu, which is specified as a input
138
+ showContextMenu(event, show) {
139
+ const cm = this.ltContextMenu;
140
+ if (cm) {
141
+ // Try to open context menu
142
+ if (show && event && event instanceof MouseEvent) {
143
+ // Get valid clicked structureElement
144
+ const clickedElement = event?.target?.closest(this.selectors);
145
+ if (clickedElement) {
146
+ this.clickedElement = clickedElement;
147
+ setTimeout(() => {
148
+ // Set display status
149
+ cm.style.display = 'block';
150
+ // Calculate top position
151
+ let top = event.y + this.yGap;
152
+ if (top + cm.offsetHeight + 10 > document.documentElement.clientHeight) {
153
+ top = document.documentElement.clientHeight - cm.offsetHeight - this.overflowSpace;
154
+ }
155
+ // Calculate left position
156
+ let left = event.x + this.xGap;
157
+ if (left + cm.offsetWidth + 10 > document.documentElement.clientWidth) {
158
+ left = document.documentElement.clientWidth - cm.offsetWidth - this.overflowSpace;
159
+ }
160
+ // Set position
161
+ cm.style.top = top + 'px';
162
+ cm.style.left = left + 'px';
163
+ // Show
164
+ cm.style.opacity = '1.0';
165
+ cm.style['pointer-events'] = 'auto';
166
+ }, 1);
167
+ return;
168
+ }
169
+ }
170
+ // Close context menu
171
+ this.clickedElement = null;
172
+ if (this.previousDisplayStatus) {
173
+ cm.style.display = this.previousDisplayStatus;
174
+ }
175
+ cm.style.opacity = '0.01';
176
+ cm.style['pointer-events'] = 'none';
177
+ }
178
+ }
179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ContextMenuDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
180
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: ContextMenuDirective, isStandalone: true, selector: "[ltContextMenu]", inputs: { contextMenuData: "contextMenuData", ltContextMenu: "ltContextMenu", xGap: "xGap", yGap: "yGap", overflowSpace: "overflowSpace", selectors: "selectors" }, outputs: { clickedElement: "clickedElement" }, exportAs: ["contextMenuData"], ngImport: i0 });
181
+ }
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ContextMenuDirective, decorators: [{
183
+ type: Directive,
184
+ args: [{
185
+ selector: '[ltContextMenu]',
186
+ exportAs: 'contextMenuData',
187
+ standalone: true,
188
+ }]
189
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { contextMenuData: [{
190
+ type: Input
191
+ }], ltContextMenu: [{
192
+ type: Input
193
+ }], xGap: [{
194
+ type: Input
195
+ }], yGap: [{
196
+ type: Input
197
+ }], overflowSpace: [{
198
+ type: Input
199
+ }], selectors: [{
200
+ type: Input
201
+ }], clickedElement: [{
202
+ type: Output
203
+ }] } });
204
+
205
+ /**
206
+ * Stops propagation of click events
207
+ * Inspired by https://stackoverflow.com/a/41001184
208
+ */
209
+ class StopPropagationDirective {
210
+ onClick(event) {
211
+ event.stopPropagation();
212
+ }
213
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
214
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: StopPropagationDirective, isStandalone: true, selector: "[baseStopPropagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
215
+ }
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: StopPropagationDirective, decorators: [{
217
+ type: Directive,
218
+ args: [{
219
+ selector: '[baseStopPropagation]',
220
+ standalone: true,
221
+ }]
222
+ }], propDecorators: { onClick: [{
223
+ type: HostListener,
224
+ args: ['click', ['$event']]
225
+ }] } });
226
+
227
+ /**
228
+ * Truncate string with ellipses
229
+ */
230
+ class EllipsesPipe {
231
+ transform(value, limit) {
232
+ if (!value) {
233
+ return null;
234
+ }
235
+ return value.length > limit ? value.substring(0, limit) + '...' : value;
236
+ }
237
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: EllipsesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
238
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: EllipsesPipe, isStandalone: true, name: "baseEllipses" });
239
+ }
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: EllipsesPipe, decorators: [{
241
+ type: Pipe,
242
+ args: [{
243
+ name: 'baseEllipses',
244
+ standalone: true,
245
+ }]
246
+ }] });
16
247
 
17
248
  class InputComponent {
18
249
  id;
@@ -47,12 +278,15 @@ class InputComponent {
47
278
  this.type = 'password';
48
279
  }
49
280
  }
50
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: InputComponent, selector: "base-input", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", type: "type", required: "required", eyeButton: "eyeButton", objectPath: "objectPath" }, outputs: { enter: "enter" }, ngImport: i0, template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n <div class=\"input-group\">\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [type]=\"type\"\n [formControl]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (keyup.enter)=\"enterEvent()\"\n [attr.aria-describedby]=\"id + 'eye-button'\"\n [attr.data-cy]=\"name\"\n />\n <button\n class=\"btn btn-outline-primary\"\n type=\"button\"\n [id]=\"id + 'eye-button'\"\n (click)=\"togglePasswordType()\"\n *ngIf=\"eyeButton\"\n >\n <i class=\"bi bi-eye\" *ngIf=\"type === 'password'\"></i>\n <i class=\"bi bi-eye-slash\" *ngIf=\"type === 'text'\"></i>\n </button>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['pattern'] && type === 'tel'\">Bitte eine g\u00FCltige Telefonnummer angeben.</div>\n <div *ngIf=\"control?.errors?.['invalidEmail']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['matching']\">Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n <div *ngIf=\"control?.errors?.['invalidSecurePassword']\">\n Das Passwort ist zu unsicher. Es muss mind. 8 Zeichen lang sein, ein Gro\u00DFbustabe, ein Kleinbuchstabe, eine Zahl\n und ein Sonderzeichen enthalten.\n </div>\n </div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}.input-group>.btn{min-width:100px}button{height:100%}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
281
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
282
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: InputComponent, isStandalone: true, selector: "base-input", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", type: "type", required: "required", eyeButton: "eyeButton", objectPath: "objectPath" }, outputs: { enter: "enter" }, ngImport: i0, template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n <div class=\"input-group\">\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [type]=\"type\"\n [formControl]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (keyup.enter)=\"enterEvent()\"\n [attr.aria-describedby]=\"id + 'eye-button'\"\n [attr.data-cy]=\"name\"\n />\n @if (eyeButton) {\n <button\n class=\"btn btn-outline-primary\"\n type=\"button\"\n [id]=\"id + 'eye-button'\"\n (click)=\"togglePasswordType()\"\n >\n @if (type === 'password') {\n <i class=\"bi bi-eye\"></i>\n }\n @if (type === 'text') {\n <i class=\"bi bi-eye-slash\"></i>\n }\n </button>\n }\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n @if (control?.errors?.['pattern'] && type === 'tel') {\n <div>Bitte eine g\u00FCltige Telefonnummer angeben.</div>\n }\n @if (control?.errors?.['invalidEmail']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n @if (control?.errors?.['matching']) {\n <div>Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n }\n @if (control?.errors?.['invalidSecurePassword']) {\n <div>\n Das Passwort ist zu unsicher. Es muss mind. 8 Zeichen lang sein, ein Gro\u00DFbustabe, ein Kleinbuchstabe, eine Zahl\n und ein Sonderzeichen enthalten.\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}.input-group>.btn{min-width:100px}button{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
52
283
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: InputComponent, decorators: [{
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: InputComponent, decorators: [{
54
285
  type: Component,
55
- args: [{ selector: 'base-input', template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n <div class=\"input-group\">\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [type]=\"type\"\n [formControl]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (keyup.enter)=\"enterEvent()\"\n [attr.aria-describedby]=\"id + 'eye-button'\"\n [attr.data-cy]=\"name\"\n />\n <button\n class=\"btn btn-outline-primary\"\n type=\"button\"\n [id]=\"id + 'eye-button'\"\n (click)=\"togglePasswordType()\"\n *ngIf=\"eyeButton\"\n >\n <i class=\"bi bi-eye\" *ngIf=\"type === 'password'\"></i>\n <i class=\"bi bi-eye-slash\" *ngIf=\"type === 'text'\"></i>\n </button>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['pattern'] && type === 'tel'\">Bitte eine g\u00FCltige Telefonnummer angeben.</div>\n <div *ngIf=\"control?.errors?.['invalidEmail']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['matching']\">Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n <div *ngIf=\"control?.errors?.['invalidSecurePassword']\">\n Das Passwort ist zu unsicher. Es muss mind. 8 Zeichen lang sein, ein Gro\u00DFbustabe, ein Kleinbuchstabe, eine Zahl\n und ein Sonderzeichen enthalten.\n </div>\n </div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}.input-group>.btn{min-width:100px}button{height:100%}\n"] }]
286
+ args: [{ selector: 'base-input', standalone: true, imports: [
287
+ ReactiveFormsModule,
288
+ NgClass
289
+ ], template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n <div class=\"input-group\">\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [type]=\"type\"\n [formControl]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (keyup.enter)=\"enterEvent()\"\n [attr.aria-describedby]=\"id + 'eye-button'\"\n [attr.data-cy]=\"name\"\n />\n @if (eyeButton) {\n <button\n class=\"btn btn-outline-primary\"\n type=\"button\"\n [id]=\"id + 'eye-button'\"\n (click)=\"togglePasswordType()\"\n >\n @if (type === 'password') {\n <i class=\"bi bi-eye\"></i>\n }\n @if (type === 'text') {\n <i class=\"bi bi-eye-slash\"></i>\n }\n </button>\n }\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n @if (control?.errors?.['pattern'] && type === 'tel') {\n <div>Bitte eine g\u00FCltige Telefonnummer angeben.</div>\n }\n @if (control?.errors?.['invalidEmail']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n @if (control?.errors?.['matching']) {\n <div>Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n }\n @if (control?.errors?.['invalidSecurePassword']) {\n <div>\n Das Passwort ist zu unsicher. Es muss mind. 8 Zeichen lang sein, ein Gro\u00DFbustabe, ein Kleinbuchstabe, eine Zahl\n und ein Sonderzeichen enthalten.\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}.input-group>.btn{min-width:100px}button{height:100%}\n"] }]
56
290
  }], propDecorators: { id: [{
57
291
  type: Input
58
292
  }], name: [{
@@ -100,12 +334,15 @@ class SelectComponent {
100
334
  this.select.nativeElement.setAttribute('multiple', true);
101
335
  }
102
336
  }
103
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: SelectComponent, selector: "base-select", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", objectPath: "objectPath", control: "control", tabIndex: "tabIndex", required: "required", multiple: "multiple", search: "search", options: "options" }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true }], ngImport: i0, template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n <select\n #select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [attr.data-live-search]=\"search\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" disabled selected>{{ placeholder }}</option>\n <option *ngFor=\"let option of options\" [ngValue]=\"option.value\">\n {{ option.text }}\n </option>\n </select>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}\n"], dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
337
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
338
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: SelectComponent, isStandalone: true, selector: "base-select", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", objectPath: "objectPath", control: "control", tabIndex: "tabIndex", required: "required", multiple: "multiple", search: "search", options: "options" }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true }], ngImport: i0, template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n <select\n #select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [attr.data-live-search]=\"search\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" disabled selected>{{ placeholder }}</option>\n @for (option of options; track option) {\n <option [ngValue]=\"option.value\">\n {{ option.text }}\n </option>\n }\n </select>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n </div>\n }\n</div>\n", styles: [".required:after{content:\" *\"}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
105
339
  }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: SelectComponent, decorators: [{
340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SelectComponent, decorators: [{
107
341
  type: Component,
108
- args: [{ selector: 'base-select', template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n <select\n #select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [attr.data-live-search]=\"search\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" disabled selected>{{ placeholder }}</option>\n <option *ngFor=\"let option of options\" [ngValue]=\"option.value\">\n {{ option.text }}\n </option>\n </select>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}\n"] }]
342
+ args: [{ selector: 'base-select', standalone: true, imports: [
343
+ NgClass,
344
+ ReactiveFormsModule,
345
+ ], template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n <select\n #select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [attr.data-live-search]=\"search\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" disabled selected>{{ placeholder }}</option>\n @for (option of options; track option) {\n <option [ngValue]=\"option.value\">\n {{ option.text }}\n </option>\n }\n </select>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n </div>\n }\n</div>\n", styles: [".required:after{content:\" *\"}\n"] }]
109
346
  }], propDecorators: { select: [{
110
347
  type: ViewChild,
111
348
  args: ['select']
@@ -143,12 +380,15 @@ class CheckboxComponent {
143
380
  control;
144
381
  required = false;
145
382
  objectPath = '';
146
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
147
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: CheckboxComponent, selector: "base-checkbox", inputs: { id: "id", name: "name", label: "label", value: "value", control: "control", required: "required", objectPath: "objectPath" }, ngImport: i0, template: "<div class=\"form-check\">\n <input\n class=\"form-check-input\"\n type=\"checkbox\"\n [formControl]=\"control\"\n [required]=\"required\"\n [value]=\"value\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n />\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">\n <ng-container *ngIf=\"label\">\n {{ label }}\n </ng-container>\n <ng-content></ng-content>\n </label>\n\n <div class=\"invalid-feedback ms-0 m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}\n"], dependencies: [{ kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
383
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
384
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: CheckboxComponent, isStandalone: true, selector: "base-checkbox", inputs: { id: "id", name: "name", label: "label", value: "value", control: "control", required: "required", objectPath: "objectPath" }, ngImport: i0, template: "<div class=\"form-check\">\n <input\n class=\"form-check-input\"\n type=\"checkbox\"\n [formControl]=\"control\"\n [required]=\"required\"\n [value]=\"value\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n />\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">\n @if (label) {\n {{ label }}\n }\n <ng-content></ng-content>\n </label>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback ms-0 m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n </div>\n }\n</div>\n", styles: [".required:after{content:\" *\"}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
148
385
  }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CheckboxComponent, decorators: [{
386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: CheckboxComponent, decorators: [{
150
387
  type: Component,
151
- args: [{ selector: 'base-checkbox', template: "<div class=\"form-check\">\n <input\n class=\"form-check-input\"\n type=\"checkbox\"\n [formControl]=\"control\"\n [required]=\"required\"\n [value]=\"value\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n />\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">\n <ng-container *ngIf=\"label\">\n {{ label }}\n </ng-container>\n <ng-content></ng-content>\n </label>\n\n <div class=\"invalid-feedback ms-0 m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}\n"] }]
388
+ args: [{ selector: 'base-checkbox', standalone: true, imports: [
389
+ ReactiveFormsModule,
390
+ NgClass
391
+ ], template: "<div class=\"form-check\">\n <input\n class=\"form-check-input\"\n type=\"checkbox\"\n [formControl]=\"control\"\n [required]=\"required\"\n [value]=\"value\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n />\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">\n @if (label) {\n {{ label }}\n }\n <ng-content></ng-content>\n </label>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback ms-0 m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n </div>\n }\n</div>\n", styles: [".required:after{content:\" *\"}\n"] }]
152
392
  }], propDecorators: { id: [{
153
393
  type: Input
154
394
  }], name: [{
@@ -203,12 +443,15 @@ class TextareaComponent {
203
443
  event.target.style.cssText = 'height:' + (event.target.scrollHeight + 5) + 'px';
204
444
  }, 0);
205
445
  }
206
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
207
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: TextareaComponent, selector: "base-textarea", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", control: "control", rows: "rows", required: "required", autoHeight: "autoHeight", tabIndex: "tabIndex", objectPath: "objectPath" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <textarea\n #textarea\n class=\"form-control\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [rows]=\"rows\"\n (input)=\"adjustHeight($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n ></textarea>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
446
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
447
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: TextareaComponent, isStandalone: true, selector: "base-textarea", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", control: "control", rows: "rows", required: "required", autoHeight: "autoHeight", tabIndex: "tabIndex", objectPath: "objectPath" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n\n <textarea\n #textarea\n class=\"form-control\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [rows]=\"rows\"\n (input)=\"adjustHeight($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n ></textarea>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n </div>\n }\n</div>\n", styles: [".required:after{content:\" *\"}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
208
448
  }
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: TextareaComponent, decorators: [{
449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: TextareaComponent, decorators: [{
210
450
  type: Component,
211
- args: [{ selector: 'base-textarea', template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <textarea\n #textarea\n class=\"form-control\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [rows]=\"rows\"\n (input)=\"adjustHeight($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n ></textarea>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}\n"] }]
451
+ args: [{ selector: 'base-textarea', standalone: true, imports: [
452
+ NgClass,
453
+ ReactiveFormsModule
454
+ ], template: "<div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n\n <textarea\n #textarea\n class=\"form-control\"\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [rows]=\"rows\"\n (input)=\"adjustHeight($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n ></textarea>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n </div>\n }\n</div>\n", styles: [".required:after{content:\" *\"}\n"] }]
212
455
  }], propDecorators: { textarea: [{
213
456
  type: ViewChild,
214
457
  args: ['textarea']
@@ -236,68 +479,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
236
479
  type: Input
237
480
  }] } });
238
481
 
239
- const toastAnimation = trigger('toastAnimation', [
240
- transition('* <=> *', [
241
- query(':enter', [style({ transform: 'translateX({{ x }})' }), animate('200ms ease-in', style({ transform: 'translateX(0%)' }))], { optional: true }),
242
- query(':leave', animate('200ms ease-in', style({ transform: 'translateX({{ x }})' })), { optional: true }),
243
- ]),
244
- ]);
245
- class ToastComponent {
246
- toastService;
247
- toasts = [];
248
- ToastType = ToastType;
249
- subscriptions = new Subscription();
250
- position = 'bottom-right';
251
- constructor(toastService) {
252
- this.toastService = toastService;
253
- }
254
- ngOnInit() {
255
- this.subscriptions.add(this.toastService.toastsAsObservable.subscribe({
256
- next: (value) => {
257
- this.toasts = value;
258
- },
259
- }));
260
- }
261
- ngOnDestroy() {
262
- this.subscriptions.unsubscribe();
263
- }
264
- getDefaultTitle(toast) {
265
- switch (toast.type) {
266
- case ToastType.ERROR:
267
- return 'Irgendetwas ist schiefgelaufen';
268
- case ToastType.INFO:
269
- return 'Info';
270
- case ToastType.WARNING:
271
- return 'Achtung';
272
- case ToastType.SUCCESS:
273
- return 'Erfolgreich';
274
- }
275
- }
276
- getDefaultDescription(toast) {
277
- switch (toast.type) {
278
- case ToastType.ERROR:
279
- return 'Sollte das Problem länger bestehen bleiben, dann wenden Sie sich bitte\n' + ' an den Support.';
280
- case ToastType.INFO:
281
- return 'Info';
282
- case ToastType.WARNING:
283
- return 'Warning';
284
- case ToastType.SUCCESS:
285
- return 'Die Änderungen wurden erfolgreich gespeichert.';
286
- }
287
- }
288
- reload() {
289
- location.reload();
290
- }
291
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToastComponent, deps: [{ token: i1$1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
292
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ToastComponent, selector: "base-toast", inputs: { position: "position" }, ngImport: i0, template: "<div\n class=\"toast-container position-fixed\"\n [ngClass]=\"position\"\n [@toastAnimation]=\"{ value: toasts.length, params: { x: position.includes('left') ? '-100%' : '100%' } }\"\n>\n <div\n class=\"toast show\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n *ngFor=\"let toast of toasts\"\n [ngClass]=\"toast.type\"\n >\n <div class=\"toast-header\">\n <strong class=\"me-auto\">{{ toast?.title ?? getDefaultTitle(toast) }}</strong>\n <button type=\"button\" class=\"btn-close btn-close-white\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n <div class=\"toast-body\">\n {{ toast?.description ?? getDefaultDescription(toast) }}\n\n <div class=\"mt-2\" *ngIf=\"toast?.errorCode\">\n <code>ERROR: {{ toast.errorCode }}</code>\n </div>\n\n <div class=\"mt-2\" *ngIf=\"toast.type === ToastType.ERROR\">\n <a class=\"color-secondary\" href=\"#\" (click)=\"reload()\">Seite neu laden</a>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{--base-toast-z-index: 999}.toast-container{padding:10px;z-index:var(--base-toast-z-index)}.bottom-right{bottom:0;right:0}.top-right{top:0;right:0}.bottom-left{bottom:0;left:0}.top-left{top:0;left:0}.toast{border-radius:0;border:0}.toast a{text-decoration:none;font-weight:600}.toast .toast-header{border-radius:0}.error .toast-header{background-color:var(--bs-danger);color:var(--bs-white)}.warning .toast-header{background-color:var(--bs-warning);color:var(--bs-white)}.info .toast-header{background-color:var(--bs-info);color:var(--bs-white)}.success .toast-header{background-color:var(--bs-success);color:var(--bs-white)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [toastAnimation] });
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToastComponent, decorators: [{
295
- type: Component,
296
- args: [{ selector: 'base-toast', animations: [toastAnimation], template: "<div\n class=\"toast-container position-fixed\"\n [ngClass]=\"position\"\n [@toastAnimation]=\"{ value: toasts.length, params: { x: position.includes('left') ? '-100%' : '100%' } }\"\n>\n <div\n class=\"toast show\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n *ngFor=\"let toast of toasts\"\n [ngClass]=\"toast.type\"\n >\n <div class=\"toast-header\">\n <strong class=\"me-auto\">{{ toast?.title ?? getDefaultTitle(toast) }}</strong>\n <button type=\"button\" class=\"btn-close btn-close-white\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n <div class=\"toast-body\">\n {{ toast?.description ?? getDefaultDescription(toast) }}\n\n <div class=\"mt-2\" *ngIf=\"toast?.errorCode\">\n <code>ERROR: {{ toast.errorCode }}</code>\n </div>\n\n <div class=\"mt-2\" *ngIf=\"toast.type === ToastType.ERROR\">\n <a class=\"color-secondary\" href=\"#\" (click)=\"reload()\">Seite neu laden</a>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{--base-toast-z-index: 999}.toast-container{padding:10px;z-index:var(--base-toast-z-index)}.bottom-right{bottom:0;right:0}.top-right{top:0;right:0}.bottom-left{bottom:0;left:0}.top-left{top:0;left:0}.toast{border-radius:0;border:0}.toast a{text-decoration:none;font-weight:600}.toast .toast-header{border-radius:0}.error .toast-header{background-color:var(--bs-danger);color:var(--bs-white)}.warning .toast-header{background-color:var(--bs-warning);color:var(--bs-white)}.info .toast-header{background-color:var(--bs-info);color:var(--bs-white)}.success .toast-header{background-color:var(--bs-success);color:var(--bs-white)}\n"] }]
297
- }], ctorParameters: () => [{ type: i1$1.ToastService }], propDecorators: { position: [{
298
- type: Input
299
- }] } });
300
-
301
482
  class TagsComponent {
302
483
  id;
303
484
  name;
@@ -480,12 +661,16 @@ class TagsComponent {
480
661
  }, 250);
481
662
  }
482
663
  }
483
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: TagsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
484
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: TagsComponent, selector: "base-tags", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", options: "options", custom: "custom", removeByKey: "removeByKey", required: "required", objectPath: "objectPath", validators: "validators" }, ngImport: i0, template: "<div class=\"form-group position-relative\" *ngIf=\"control\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <div class=\"tag-wrapper\" *ngIf=\"control?.value\">\n <div class=\"tag\" *ngFor=\"let tag of control?.value\">\n {{ getReadableTag(tag) }}\n <span (click)=\"removeTag(tag)\" data-cy=\"input-tags-item-remove\"><i class=\"bi bi-x-circle\"></i></span>\n </div>\n </div>\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n [(ngModel)]=\"inputValue\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n type=\"text\"\n class=\"form-control\"\n (keyup)=\"enterKey($event)\"\n [attr.data-cy]=\"'input-tags-field'\"\n />\n\n <div class=\"tag-options\" *ngIf=\"options && selectedElement\">\n <div class=\"tag-option-item\" *ngFor=\"let option of filterOptions()\" (click)=\"addTag(option?.text, true, true)\">\n {{ option?.text }}\n </div>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['invalidReference'] && inputValue\">\n {{ inputValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte gib eine g\u00FCltige E-Mail Adresse ein.</div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}.tag-options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.tag-options .tag-option-item{padding:10px;cursor:pointer}.tag-options .tag-option-item:hover{color:var(--bs-primary)}.tag-wrapper{display:flex;flex-direction:row;justify-content:flex-start;column-gap:10px;row-gap:10px;flex-wrap:wrap;margin-bottom:10px;position:relative}.tag-wrapper .tag{background-color:var(--bs-light);color:var(--bs-dark);padding:10px 15px;font-style:normal;font-weight:300;font-size:14px;line-height:140%}.tag-wrapper .tag span{margin-left:20px;cursor:pointer}.tag-wrapper .tag span .bi{color:var(--bs-black)}.tag-wrapper .tag span .bi:before{vertical-align:-.175em}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
664
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: TagsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
665
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: TagsComponent, isStandalone: true, selector: "base-tags", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", options: "options", custom: "custom", removeByKey: "removeByKey", required: "required", objectPath: "objectPath", validators: "validators" }, ngImport: i0, template: "@if (control) {\n <div class=\"form-group position-relative\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n @if (control?.value) {\n <div class=\"tag-wrapper\">\n @for (tag of control?.value; track tag) {\n <div class=\"tag\">\n {{ getReadableTag(tag) }}\n <span (click)=\"removeTag(tag)\" data-cy=\"input-tags-item-remove\"><i class=\"bi bi-x-circle\"></i></span>\n </div>\n }\n </div>\n }\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n [(ngModel)]=\"inputValue\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n type=\"text\"\n class=\"form-control\"\n (keyup)=\"enterKey($event)\"\n [attr.data-cy]=\"'input-tags-field'\"\n />\n @if (options && selectedElement) {\n <div class=\"tag-options\">\n @for (option of filterOptions(); track option) {\n <div class=\"tag-option-item\" (click)=\"addTag(option?.text, true, true)\">\n {{ option?.text }}\n </div>\n }\n </div>\n }\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['invalidReference'] && inputValue) {\n <div>\n {{ inputValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte gib eine g\u00FCltige E-Mail Adresse ein.</div>\n }\n </div>\n }\n </div>\n}\n", styles: [".required:after{content:\" *\"}.tag-options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.tag-options .tag-option-item{padding:10px;cursor:pointer}.tag-options .tag-option-item:hover{color:var(--bs-primary)}.tag-wrapper{display:flex;flex-direction:row;justify-content:flex-start;column-gap:10px;row-gap:10px;flex-wrap:wrap;margin-bottom:10px;position:relative}.tag-wrapper .tag{background-color:var(--bs-light);color:var(--bs-dark);padding:10px 15px;font-style:normal;font-weight:300;font-size:14px;line-height:140%}.tag-wrapper .tag span{margin-left:20px;cursor:pointer}.tag-wrapper .tag span .bi{color:var(--bs-black)}.tag-wrapper .tag span .bi:before{vertical-align:-.175em}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
485
666
  }
486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: TagsComponent, decorators: [{
667
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: TagsComponent, decorators: [{
487
668
  type: Component,
488
- args: [{ selector: 'base-tags', template: "<div class=\"form-group position-relative\" *ngIf=\"control\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <div class=\"tag-wrapper\" *ngIf=\"control?.value\">\n <div class=\"tag\" *ngFor=\"let tag of control?.value\">\n {{ getReadableTag(tag) }}\n <span (click)=\"removeTag(tag)\" data-cy=\"input-tags-item-remove\"><i class=\"bi bi-x-circle\"></i></span>\n </div>\n </div>\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n [(ngModel)]=\"inputValue\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n type=\"text\"\n class=\"form-control\"\n (keyup)=\"enterKey($event)\"\n [attr.data-cy]=\"'input-tags-field'\"\n />\n\n <div class=\"tag-options\" *ngIf=\"options && selectedElement\">\n <div class=\"tag-option-item\" *ngFor=\"let option of filterOptions()\" (click)=\"addTag(option?.text, true, true)\">\n {{ option?.text }}\n </div>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['invalidReference'] && inputValue\">\n {{ inputValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte gib eine g\u00FCltige E-Mail Adresse ein.</div>\n </div>\n</div>\n", styles: [".required:after{content:\" *\"}.tag-options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.tag-options .tag-option-item{padding:10px;cursor:pointer}.tag-options .tag-option-item:hover{color:var(--bs-primary)}.tag-wrapper{display:flex;flex-direction:row;justify-content:flex-start;column-gap:10px;row-gap:10px;flex-wrap:wrap;margin-bottom:10px;position:relative}.tag-wrapper .tag{background-color:var(--bs-light);color:var(--bs-dark);padding:10px 15px;font-style:normal;font-weight:300;font-size:14px;line-height:140%}.tag-wrapper .tag span{margin-left:20px;cursor:pointer}.tag-wrapper .tag span .bi{color:var(--bs-black)}.tag-wrapper .tag span .bi:before{vertical-align:-.175em}\n"] }]
669
+ args: [{ selector: 'base-tags', standalone: true, imports: [
670
+ NgClass,
671
+ ReactiveFormsModule,
672
+ FormsModule
673
+ ], template: "@if (control) {\n <div class=\"form-group position-relative\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n @if (control?.value) {\n <div class=\"tag-wrapper\">\n @for (tag of control?.value; track tag) {\n <div class=\"tag\">\n {{ getReadableTag(tag) }}\n <span (click)=\"removeTag(tag)\" data-cy=\"input-tags-item-remove\"><i class=\"bi bi-x-circle\"></i></span>\n </div>\n }\n </div>\n }\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n [(ngModel)]=\"inputValue\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n type=\"text\"\n class=\"form-control\"\n (keyup)=\"enterKey($event)\"\n [attr.data-cy]=\"'input-tags-field'\"\n />\n @if (options && selectedElement) {\n <div class=\"tag-options\">\n @for (option of filterOptions(); track option) {\n <div class=\"tag-option-item\" (click)=\"addTag(option?.text, true, true)\">\n {{ option?.text }}\n </div>\n }\n </div>\n }\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['invalidReference'] && inputValue) {\n <div>\n {{ inputValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte gib eine g\u00FCltige E-Mail Adresse ein.</div>\n }\n </div>\n }\n </div>\n}\n", styles: [".required:after{content:\" *\"}.tag-options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.tag-options .tag-option-item{padding:10px;cursor:pointer}.tag-options .tag-option-item:hover{color:var(--bs-primary)}.tag-wrapper{display:flex;flex-direction:row;justify-content:flex-start;column-gap:10px;row-gap:10px;flex-wrap:wrap;margin-bottom:10px;position:relative}.tag-wrapper .tag{background-color:var(--bs-light);color:var(--bs-dark);padding:10px 15px;font-style:normal;font-weight:300;font-size:14px;line-height:140%}.tag-wrapper .tag span{margin-left:20px;cursor:pointer}.tag-wrapper .tag span .bi{color:var(--bs-black)}.tag-wrapper .tag span .bi:before{vertical-align:-.175em}\n"] }]
489
674
  }], propDecorators: { id: [{
490
675
  type: Input
491
676
  }], name: [{
@@ -516,266 +701,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
516
701
  type: Input
517
702
  }] } });
518
703
 
519
- class LoadingBarComponent {
520
- ngZone;
521
- changeDetectorRef;
522
- loaderService;
523
- manuallyLoading = false;
524
- loading = false;
525
- subscription = new Subscription();
526
- constructor(ngZone, changeDetectorRef, loaderService) {
527
- this.ngZone = ngZone;
528
- this.changeDetectorRef = changeDetectorRef;
529
- this.loaderService = loaderService;
530
- }
531
- ngOnInit() {
532
- this.ngZone.runOutsideAngular(() => {
533
- this.subscription.add(this.loaderService.isLoading.subscribe((value) => {
534
- this.loading = value;
535
- this.changeDetectorRef.detectChanges();
536
- }));
537
- });
538
- }
539
- ngOnDestroy() {
540
- this.subscription.unsubscribe();
541
- }
542
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LoadingBarComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1$1.LoaderService }], target: i0.ɵɵFactoryTarget.Component });
543
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: LoadingBarComponent, selector: "base-loading-bar", inputs: { manuallyLoading: "manuallyLoading" }, ngImport: i0, template: "<div class=\"slider\" *ngIf=\"loading || manuallyLoading\">\n <div class=\"line\"></div>\n <div class=\"subline inc\"></div>\n <div class=\"subline dec\"></div>\n</div>\n", styles: [":host{--base-loading-bar-color: #f28c18;--base-loading-bar-height: 5px;--base-loading-bar-z-index: 999999999}.slider{position:fixed;left:0;right:0;height:var(--base-loading-bar-height);overflow-x:hidden;z-index:var(--base-loading-bar-z-index);background-color:#fff}.line{position:absolute;opacity:.6;background:var(--base-loading-bar-color);width:150%;height:var(--base-loading-bar-height)}.subline{position:absolute;background:var(--base-loading-bar-color);height:var(--base-loading-bar-height)}.inc{animation:increase 2s infinite}.dec{animation:decrease 2s .5s infinite}@keyframes increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
544
- }
545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LoadingBarComponent, decorators: [{
546
- type: Component,
547
- args: [{ selector: 'base-loading-bar', template: "<div class=\"slider\" *ngIf=\"loading || manuallyLoading\">\n <div class=\"line\"></div>\n <div class=\"subline inc\"></div>\n <div class=\"subline dec\"></div>\n</div>\n", styles: [":host{--base-loading-bar-color: #f28c18;--base-loading-bar-height: 5px;--base-loading-bar-z-index: 999999999}.slider{position:fixed;left:0;right:0;height:var(--base-loading-bar-height);overflow-x:hidden;z-index:var(--base-loading-bar-z-index);background-color:#fff}.line{position:absolute;opacity:.6;background:var(--base-loading-bar-color);width:150%;height:var(--base-loading-bar-height)}.subline{position:absolute;background:var(--base-loading-bar-color);height:var(--base-loading-bar-height)}.inc{animation:increase 2s infinite}.dec{animation:decrease 2s .5s infinite}@keyframes increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}\n"] }]
548
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1$1.LoaderService }], propDecorators: { manuallyLoading: [{
549
- type: Input
550
- }] } });
551
-
552
- class SkeletonLoaderComponent {
553
- type;
554
- count = 1;
555
- size = 18;
556
- convertToArray(value) {
557
- if (!value) {
558
- return [];
559
- }
560
- const res = [];
561
- for (let i = 0; i < value; i++) {
562
- res.push(i);
563
- }
564
- return res;
565
- }
566
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: SkeletonLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
567
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: SkeletonLoaderComponent, selector: "base-skeleton-loader", inputs: { type: "type", count: "count", size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"type\" [ngSwitch]=\"type\">\n <div *ngSwitchCase=\"'LINE'\">\n <div class=\"line-loader-wrapper\">\n <div class=\"line-loader\" *ngFor=\"let key of convertToArray(count)\"></div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'RECTANGLE'\">\n <div class=\"line-rectangle\" [ngStyle]=\"{ height: size + 'px' }\"></div>\n </div>\n\n <div *ngSwitchCase=\"'AVATAR'\">\n <div class=\"line-avatar\" [ngStyle]=\"{ height: size + 'px', width: size + 'px' }\"></div>\n </div>\n</ng-container>\n", styles: ["@keyframes shine{to{background-position-x:-200%}}.line-loader-wrapper>:not(:first-of-type){margin-top:10px}.line-loader-wrapper .line-loader{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;height:18px;border-radius:5px}.line-rectangle{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:5px}.line-avatar{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
568
- }
569
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: SkeletonLoaderComponent, decorators: [{
570
- type: Component,
571
- args: [{ selector: 'base-skeleton-loader', template: "<ng-container *ngIf=\"type\" [ngSwitch]=\"type\">\n <div *ngSwitchCase=\"'LINE'\">\n <div class=\"line-loader-wrapper\">\n <div class=\"line-loader\" *ngFor=\"let key of convertToArray(count)\"></div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'RECTANGLE'\">\n <div class=\"line-rectangle\" [ngStyle]=\"{ height: size + 'px' }\"></div>\n </div>\n\n <div *ngSwitchCase=\"'AVATAR'\">\n <div class=\"line-avatar\" [ngStyle]=\"{ height: size + 'px', width: size + 'px' }\"></div>\n </div>\n</ng-container>\n", styles: ["@keyframes shine{to{background-position-x:-200%}}.line-loader-wrapper>:not(:first-of-type){margin-top:10px}.line-loader-wrapper .line-loader{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;height:18px;border-radius:5px}.line-rectangle{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:5px}.line-avatar{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:50%}\n"] }]
572
- }], propDecorators: { type: [{
573
- type: Input
574
- }], count: [{
575
- type: Input
576
- }], size: [{
577
- type: Input
578
- }] } });
579
-
580
- class BreadcrumbComponent {
581
- breadcrumbService;
582
- breadcrumbs$;
583
- constructor(breadcrumbService) {
584
- this.breadcrumbService = breadcrumbService;
585
- this.breadcrumbs$ = breadcrumbService.breadcrumbsObservable;
586
- }
587
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i1$1.BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component });
588
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: BreadcrumbComponent, selector: "base-breadcrumb", ngImport: i0, template: "<ul class=\"pt-3\">\n <li *ngFor=\"let breadcrumb of breadcrumbs$ | async\">\n <a [routerLink]=\"breadcrumb.url\">{{ breadcrumb.label }}</a>\n </li>\n</ul>\n", styles: ["ul{list-style:none;margin:0;padding:0}ul li{display:inline}ul li:before{content:\"|\";margin:0 6px}ul li:first-child:before{content:\"\";margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
589
- }
590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
591
- type: Component,
592
- args: [{ selector: 'base-breadcrumb', template: "<ul class=\"pt-3\">\n <li *ngFor=\"let breadcrumb of breadcrumbs$ | async\">\n <a [routerLink]=\"breadcrumb.url\">{{ breadcrumb.label }}</a>\n </li>\n</ul>\n", styles: ["ul{list-style:none;margin:0;padding:0}ul li{display:inline}ul li:before{content:\"|\";margin:0 6px}ul li:first-child:before{content:\"\";margin:0}\n"] }]
593
- }], ctorParameters: () => [{ type: i1$1.BreadcrumbService }] });
594
-
595
- class SortDirective {
596
- renderer;
597
- targetElem;
598
- baseSort;
599
- baseSorted = new EventEmitter();
600
- constructor(renderer, targetElem, document) {
601
- this.renderer = renderer;
602
- this.targetElem = targetElem;
603
- }
604
- /**
605
- * Sorts columns on click
606
- */
607
- sortColumn() {
608
- const items = document.getElementsByTagName('th');
609
- for (let i = 0; i < items.length; i++) {
610
- items[i].classList.remove('asc');
611
- items[i].classList.remove('desc');
612
- }
613
- const sort = new Sort();
614
- const elem = this.targetElem.nativeElement;
615
- const order = elem.getAttribute('data-order');
616
- const type = elem.getAttribute('data-type');
617
- const property = elem.getAttribute('data-name');
618
- if (order === 'desc') {
619
- this.baseSorted.emit([...this.baseSort].sort(sort.startSort(property, order, type)));
620
- elem.setAttribute('data-order', 'asc');
621
- elem.classList.remove('desc');
622
- elem.classList.add('asc');
623
- }
624
- else {
625
- this.baseSorted.emit([...this.baseSort].sort(sort.startSort(property, order, type)));
626
- elem.setAttribute('data-order', 'desc');
627
- elem.classList.remove('asc');
628
- elem.classList.add('desc');
629
- }
630
- }
631
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: SortDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
632
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: SortDirective, selector: "[baseSort]", inputs: { baseSort: "baseSort" }, outputs: { baseSorted: "baseSorted" }, host: { listeners: { "click": "sortColumn()" } }, ngImport: i0 });
633
- }
634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: SortDirective, decorators: [{
635
- type: Directive,
636
- args: [{
637
- selector: '[baseSort]',
638
- }]
639
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: Document, decorators: [{
640
- type: Inject,
641
- args: [DOCUMENT]
642
- }] }], propDecorators: { baseSort: [{
643
- type: Input
644
- }], baseSorted: [{
645
- type: Output
646
- }], sortColumn: [{
647
- type: HostListener,
648
- args: ['click']
649
- }] } });
650
-
651
- /**
652
- * Directive vor context menu
653
- * See https://stackblitz.com/edit/angular-custom-context-menu
654
- */
655
- class ContextMenuDirective {
656
- el;
657
- contextMenuData;
658
- ltContextMenu;
659
- xGap = 0;
660
- yGap = 0;
661
- overflowSpace = 10;
662
- selectors = '*';
663
- clickedElement = null;
664
- previousDisplayStatus = null;
665
- constructor(el) {
666
- this.el = el;
667
- }
668
- ngOnInit() {
669
- if (this.ltContextMenu) {
670
- this.previousDisplayStatus = this.ltContextMenu.style.display;
671
- }
672
- // Add a click listener to the window,
673
- // so that we can close the context menu on left click
674
- window.addEventListener('click', () => {
675
- this.showContextMenu(null, false);
676
- });
677
- // Close context menu when escape is pressed
678
- window.addEventListener('keydown', (e) => {
679
- if (e.code === 'Escape') {
680
- this.showContextMenu(null, false);
681
- }
682
- });
683
- // Add an event listener to listen to the 'contextmenu' event
684
- this.el.nativeElement.addEventListener('contextmenu', (e) => {
685
- // Prevent the default context menu to popup
686
- if (e.preventDefault) {
687
- e.preventDefault();
688
- }
689
- // Shows our own context menu
690
- this.showContextMenu(e, true);
691
- });
692
- }
693
- // Shows or hides our custom context menu, which is specified as a input
694
- showContextMenu(event, show) {
695
- const cm = this.ltContextMenu;
696
- if (cm) {
697
- // Try to open context menu
698
- if (show && event && event instanceof MouseEvent) {
699
- // Get valid clicked structureElement
700
- const clickedElement = event?.target?.closest(this.selectors);
701
- if (clickedElement) {
702
- this.clickedElement = clickedElement;
703
- setTimeout(() => {
704
- // Set display status
705
- cm.style.display = 'block';
706
- // Calculate top position
707
- let top = event.y + this.yGap;
708
- if (top + cm.offsetHeight + 10 > document.documentElement.clientHeight) {
709
- top = document.documentElement.clientHeight - cm.offsetHeight - this.overflowSpace;
710
- }
711
- // Calculate left position
712
- let left = event.x + this.xGap;
713
- if (left + cm.offsetWidth + 10 > document.documentElement.clientWidth) {
714
- left = document.documentElement.clientWidth - cm.offsetWidth - this.overflowSpace;
715
- }
716
- // Set position
717
- cm.style.top = top + 'px';
718
- cm.style.left = left + 'px';
719
- // Show
720
- cm.style.opacity = '1.0';
721
- cm.style['pointer-events'] = 'auto';
722
- }, 1);
723
- return;
724
- }
725
- }
726
- // Close context menu
727
- this.clickedElement = null;
728
- if (this.previousDisplayStatus) {
729
- cm.style.display = this.previousDisplayStatus;
730
- }
731
- cm.style.opacity = '0.01';
732
- cm.style['pointer-events'] = 'none';
704
+ const toastAnimation = trigger('toastAnimation', [
705
+ transition('* <=> *', [
706
+ query(':enter', [style({ transform: 'translateX({{ x }})' }), animate('200ms ease-in', style({ transform: 'translateX(0%)' }))], { optional: true }),
707
+ query(':leave', animate('200ms ease-in', style({ transform: 'translateX({{ x }})' })), { optional: true }),
708
+ ]),
709
+ ]);
710
+ class ToastComponent {
711
+ toastService;
712
+ toasts = [];
713
+ ToastType = ToastType;
714
+ subscriptions = new Subscription();
715
+ position = 'bottom-right';
716
+ constructor(toastService) {
717
+ this.toastService = toastService;
718
+ }
719
+ ngOnInit() {
720
+ this.subscriptions.add(this.toastService.toastsAsObservable.subscribe({
721
+ next: (value) => {
722
+ this.toasts = value;
723
+ },
724
+ }));
725
+ }
726
+ ngOnDestroy() {
727
+ this.subscriptions.unsubscribe();
728
+ }
729
+ getDefaultTitle(toast) {
730
+ switch (toast.type) {
731
+ case ToastType.ERROR:
732
+ return 'Irgendetwas ist schiefgelaufen';
733
+ case ToastType.INFO:
734
+ return 'Info';
735
+ case ToastType.WARNING:
736
+ return 'Achtung';
737
+ case ToastType.SUCCESS:
738
+ return 'Erfolgreich';
739
+ }
740
+ }
741
+ getDefaultDescription(toast) {
742
+ switch (toast.type) {
743
+ case ToastType.ERROR:
744
+ return 'Sollte das Problem länger bestehen bleiben, dann wenden Sie sich bitte\n' + ' an den Support.';
745
+ case ToastType.INFO:
746
+ return 'Info';
747
+ case ToastType.WARNING:
748
+ return 'Warning';
749
+ case ToastType.SUCCESS:
750
+ return 'Die Änderungen wurden erfolgreich gespeichert.';
733
751
  }
734
752
  }
735
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ContextMenuDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
736
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: ContextMenuDirective, selector: "[ltContextMenu]", inputs: { contextMenuData: "contextMenuData", ltContextMenu: "ltContextMenu", xGap: "xGap", yGap: "yGap", overflowSpace: "overflowSpace", selectors: "selectors" }, outputs: { clickedElement: "clickedElement" }, exportAs: ["contextMenuData"], ngImport: i0 });
753
+ reload() {
754
+ location.reload();
755
+ }
756
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ToastComponent, deps: [{ token: i1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
757
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: ToastComponent, isStandalone: true, selector: "base-toast", inputs: { position: "position" }, ngImport: i0, template: "<div\n class=\"toast-container position-fixed\"\n [ngClass]=\"position\"\n [@toastAnimation]=\"{ value: toasts.length, params: { x: position.includes('left') ? '-100%' : '100%' } }\"\n >\n @for (toast of toasts; track toast) {\n <div\n class=\"toast show\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n [ngClass]=\"toast.type\"\n >\n <div class=\"toast-header\">\n <strong class=\"me-auto\">{{ toast?.title ?? getDefaultTitle(toast) }}</strong>\n <button type=\"button\" class=\"btn-close btn-close-white\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n <div class=\"toast-body\">\n {{ toast?.description ?? getDefaultDescription(toast) }}\n @if (toast?.errorCode) {\n <div class=\"mt-2\">\n <code>ERROR: {{ toast.errorCode }}</code>\n </div>\n }\n @if (toast.type === ToastType.ERROR) {\n <div class=\"mt-2\">\n <a class=\"color-secondary\" href=\"#\" (click)=\"reload()\">Seite neu laden</a>\n </div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{--base-toast-z-index: 999}.toast-container{padding:10px;z-index:var(--base-toast-z-index)}.bottom-right{bottom:0;right:0}.top-right{top:0;right:0}.bottom-left{bottom:0;left:0}.top-left{top:0;left:0}.toast{border-radius:0;border:0}.toast a{text-decoration:none;font-weight:600}.toast .toast-header{border-radius:0}.error .toast-header{background-color:var(--bs-danger);color:var(--bs-white)}.warning .toast-header{background-color:var(--bs-warning);color:var(--bs-white)}.info .toast-header{background-color:var(--bs-info);color:var(--bs-white)}.success .toast-header{background-color:var(--bs-success);color:var(--bs-white)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: BrowserAnimationsModule }], animations: [toastAnimation] });
737
758
  }
738
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ContextMenuDirective, decorators: [{
739
- type: Directive,
740
- args: [{
741
- selector: '[ltContextMenu]',
742
- exportAs: 'contextMenuData',
743
- }]
744
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { contextMenuData: [{
745
- type: Input
746
- }], ltContextMenu: [{
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ToastComponent, decorators: [{
760
+ type: Component,
761
+ args: [{ selector: 'base-toast', animations: [toastAnimation], standalone: true, imports: [NgClass, BrowserAnimationsModule], template: "<div\n class=\"toast-container position-fixed\"\n [ngClass]=\"position\"\n [@toastAnimation]=\"{ value: toasts.length, params: { x: position.includes('left') ? '-100%' : '100%' } }\"\n >\n @for (toast of toasts; track toast) {\n <div\n class=\"toast show\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n [ngClass]=\"toast.type\"\n >\n <div class=\"toast-header\">\n <strong class=\"me-auto\">{{ toast?.title ?? getDefaultTitle(toast) }}</strong>\n <button type=\"button\" class=\"btn-close btn-close-white\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n <div class=\"toast-body\">\n {{ toast?.description ?? getDefaultDescription(toast) }}\n @if (toast?.errorCode) {\n <div class=\"mt-2\">\n <code>ERROR: {{ toast.errorCode }}</code>\n </div>\n }\n @if (toast.type === ToastType.ERROR) {\n <div class=\"mt-2\">\n <a class=\"color-secondary\" href=\"#\" (click)=\"reload()\">Seite neu laden</a>\n </div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{--base-toast-z-index: 999}.toast-container{padding:10px;z-index:var(--base-toast-z-index)}.bottom-right{bottom:0;right:0}.top-right{top:0;right:0}.bottom-left{bottom:0;left:0}.top-left{top:0;left:0}.toast{border-radius:0;border:0}.toast a{text-decoration:none;font-weight:600}.toast .toast-header{border-radius:0}.error .toast-header{background-color:var(--bs-danger);color:var(--bs-white)}.warning .toast-header{background-color:var(--bs-warning);color:var(--bs-white)}.info .toast-header{background-color:var(--bs-info);color:var(--bs-white)}.success .toast-header{background-color:var(--bs-success);color:var(--bs-white)}\n"] }]
762
+ }], ctorParameters: () => [{ type: i1.ToastService }], propDecorators: { position: [{
747
763
  type: Input
748
- }], xGap: [{
764
+ }] } });
765
+
766
+ class LoadingBarComponent {
767
+ ngZone;
768
+ changeDetectorRef;
769
+ loaderService;
770
+ manuallyLoading = false;
771
+ loading = false;
772
+ subscription = new Subscription();
773
+ constructor(ngZone, changeDetectorRef, loaderService) {
774
+ this.ngZone = ngZone;
775
+ this.changeDetectorRef = changeDetectorRef;
776
+ this.loaderService = loaderService;
777
+ }
778
+ ngOnInit() {
779
+ this.ngZone.runOutsideAngular(() => {
780
+ this.subscription.add(this.loaderService.isLoading.subscribe((value) => {
781
+ this.loading = value;
782
+ this.changeDetectorRef.detectChanges();
783
+ }));
784
+ });
785
+ }
786
+ ngOnDestroy() {
787
+ this.subscription.unsubscribe();
788
+ }
789
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: LoadingBarComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.LoaderService }], target: i0.ɵɵFactoryTarget.Component });
790
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: LoadingBarComponent, selector: "base-loading-bar", inputs: { manuallyLoading: "manuallyLoading" }, ngImport: i0, template: "@if (loading || manuallyLoading) {\n <div class=\"slider\">\n <div class=\"line\"></div>\n <div class=\"subline inc\"></div>\n <div class=\"subline dec\"></div>\n </div>\n}\n", styles: [":host{--base-loading-bar-color: #f28c18;--base-loading-bar-height: 5px;--base-loading-bar-z-index: 999999999}.slider{position:fixed;left:0;right:0;height:var(--base-loading-bar-height);overflow-x:hidden;z-index:var(--base-loading-bar-z-index);background-color:#fff}.line{position:absolute;opacity:.6;background:var(--base-loading-bar-color);width:150%;height:var(--base-loading-bar-height)}.subline{position:absolute;background:var(--base-loading-bar-color);height:var(--base-loading-bar-height)}.inc{animation:increase 2s infinite}.dec{animation:decrease 2s .5s infinite}@keyframes increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}\n"] });
791
+ }
792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: LoadingBarComponent, decorators: [{
793
+ type: Component,
794
+ args: [{ selector: 'base-loading-bar', template: "@if (loading || manuallyLoading) {\n <div class=\"slider\">\n <div class=\"line\"></div>\n <div class=\"subline inc\"></div>\n <div class=\"subline dec\"></div>\n </div>\n}\n", styles: [":host{--base-loading-bar-color: #f28c18;--base-loading-bar-height: 5px;--base-loading-bar-z-index: 999999999}.slider{position:fixed;left:0;right:0;height:var(--base-loading-bar-height);overflow-x:hidden;z-index:var(--base-loading-bar-z-index);background-color:#fff}.line{position:absolute;opacity:.6;background:var(--base-loading-bar-color);width:150%;height:var(--base-loading-bar-height)}.subline{position:absolute;background:var(--base-loading-bar-color);height:var(--base-loading-bar-height)}.inc{animation:increase 2s infinite}.dec{animation:decrease 2s .5s infinite}@keyframes increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}\n"] }]
795
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1.LoaderService }], propDecorators: { manuallyLoading: [{
749
796
  type: Input
750
- }], yGap: [{
797
+ }] } });
798
+
799
+ class SkeletonLoaderComponent {
800
+ type;
801
+ count = 1;
802
+ size = 18;
803
+ convertToArray(value) {
804
+ if (!value) {
805
+ return [];
806
+ }
807
+ const res = [];
808
+ for (let i = 0; i < value; i++) {
809
+ res.push(i);
810
+ }
811
+ return res;
812
+ }
813
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SkeletonLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
814
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: SkeletonLoaderComponent, isStandalone: true, selector: "base-skeleton-loader", inputs: { type: "type", count: "count", size: "size" }, ngImport: i0, template: "@if (type) {\n @switch (type) {\n @case ('LINE') {\n <div>\n <div class=\"line-loader-wrapper\">\n @for (key of convertToArray(count); track key) {\n <div class=\"line-loader\"></div>\n }\n </div>\n </div>\n }\n @case ('RECTANGLE') {\n <div>\n <div class=\"line-rectangle\" [ngStyle]=\"{ height: size + 'px' }\"></div>\n </div>\n }\n @case ('AVATAR') {\n <div>\n <div class=\"line-avatar\" [ngStyle]=\"{ height: size + 'px', width: size + 'px' }\"></div>\n </div>\n }\n }\n}\n", styles: ["@keyframes shine{to{background-position-x:-200%}}.line-loader-wrapper>:not(:first-of-type){margin-top:10px}.line-loader-wrapper .line-loader{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;height:18px;border-radius:5px}.line-rectangle{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:5px}.line-avatar{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:50%}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
815
+ }
816
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SkeletonLoaderComponent, decorators: [{
817
+ type: Component,
818
+ args: [{ selector: 'base-skeleton-loader', standalone: true, imports: [
819
+ NgStyle
820
+ ], template: "@if (type) {\n @switch (type) {\n @case ('LINE') {\n <div>\n <div class=\"line-loader-wrapper\">\n @for (key of convertToArray(count); track key) {\n <div class=\"line-loader\"></div>\n }\n </div>\n </div>\n }\n @case ('RECTANGLE') {\n <div>\n <div class=\"line-rectangle\" [ngStyle]=\"{ height: size + 'px' }\"></div>\n </div>\n }\n @case ('AVATAR') {\n <div>\n <div class=\"line-avatar\" [ngStyle]=\"{ height: size + 'px', width: size + 'px' }\"></div>\n </div>\n }\n }\n}\n", styles: ["@keyframes shine{to{background-position-x:-200%}}.line-loader-wrapper>:not(:first-of-type){margin-top:10px}.line-loader-wrapper .line-loader{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;height:18px;border-radius:5px}.line-rectangle{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:5px}.line-avatar{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);background-size:200% 100%;animation:1.5s shine linear infinite;border-radius:50%}\n"] }]
821
+ }], propDecorators: { type: [{
751
822
  type: Input
752
- }], overflowSpace: [{
823
+ }], count: [{
753
824
  type: Input
754
- }], selectors: [{
825
+ }], size: [{
755
826
  type: Input
756
- }], clickedElement: [{
757
- type: Output
758
827
  }] } });
759
828
 
760
- /**
761
- * Stops propagation of click events
762
- * Inspired by https://stackoverflow.com/a/41001184
763
- */
764
- class StopPropagationDirective {
765
- onClick(event) {
766
- event.stopPropagation();
829
+ class BreadcrumbComponent {
830
+ breadcrumbService;
831
+ breadcrumbs$;
832
+ constructor(breadcrumbService) {
833
+ this.breadcrumbService = breadcrumbService;
834
+ this.breadcrumbs$ = breadcrumbService.breadcrumbsObservable;
767
835
  }
768
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
769
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: StopPropagationDirective, selector: "[baseStopPropagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
836
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i1.BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component });
837
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: BreadcrumbComponent, isStandalone: true, selector: "base-breadcrumb", ngImport: i0, template: "<ul class=\"pt-3\">\n @for (breadcrumb of breadcrumbs$ | async; track breadcrumb) {\n <li>\n <a [routerLink]=\"breadcrumb.url\">{{ breadcrumb.label }}</a>\n </li>\n }\n</ul>\n", styles: ["ul{list-style:none;margin:0;padding:0}ul li{display:inline}ul li:before{content:\"|\";margin:0 6px}ul li:first-child:before{content:\"\";margin:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
770
838
  }
771
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: StopPropagationDirective, decorators: [{
772
- type: Directive,
773
- args: [{
774
- selector: '[baseStopPropagation]',
775
- }]
776
- }], propDecorators: { onClick: [{
777
- type: HostListener,
778
- args: ['click', ['$event']]
839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: BreadcrumbComponent, decorators: [{
840
+ type: Component,
841
+ args: [{ selector: 'base-breadcrumb', standalone: true, imports: [
842
+ RouterLink,
843
+ AsyncPipe
844
+ ], template: "<ul class=\"pt-3\">\n @for (breadcrumb of breadcrumbs$ | async; track breadcrumb) {\n <li>\n <a [routerLink]=\"breadcrumb.url\">{{ breadcrumb.label }}</a>\n </li>\n }\n</ul>\n", styles: ["ul{list-style:none;margin:0;padding:0}ul li{display:inline}ul li:before{content:\"|\";margin:0 6px}ul li:first-child:before{content:\"\";margin:0}\n"] }]
845
+ }], ctorParameters: () => [{ type: i1.BreadcrumbService }] });
846
+
847
+ class FabButtonComponent {
848
+ fabIcon = 'bi-list';
849
+ buttons;
850
+ toggle = false;
851
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
852
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: FabButtonComponent, isStandalone: true, selector: "base-fab-button", inputs: { fabIcon: "fabIcon", buttons: "buttons" }, ngImport: i0, template: "<div class=\"fab-container\" [ngClass]=\"{ 'fab-container-active': toggle }\">\n <div class=\"fab shadow\">\n <div class=\"fab-content\" (click)=\"toggle = !toggle\">\n @if (toggle) {\n <i class=\"bi bi-x-lg\"></i>\n }\n @if (!toggle) {\n <i class=\"bi\" [ngClass]=\"fabIcon\"></i>\n }\n </div>\n </div>\n @for (button of buttons; track button) {\n <div\n class=\"sub-button shadow\"\n (click)=\"button.event.emit(true); toggle = !toggle\"\n [ngStyle]=\"{ backgroundColor: button.color }\"\n >\n <a [routerLink]=\"button.routerLink\">\n <i class=\"bi\" [ngClass]=\"button.icon\"></i>\n </a>\n </div>\n }\n</div>\n", styles: [".fab-container{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;-webkit-user-select:none;user-select:none;position:absolute;bottom:10px;right:10px}.fab-container-active{height:100%}.fab-container-active .sub-button:nth-child(2){transform:translateY(-80px)}.fab-container-active .sub-button:nth-child(3){transform:translateY(-140px)}.fab-container-active .sub-button:nth-child(4){transform:translateY(-200px)}.fab-container-active .sub-button:nth-child(5){transform:translateY(-260px)}.fab-container-active .sub-button:nth-child(6){transform:translateY(-320px)}.fab-container .fab{position:relative;height:60px;width:60px;background-color:var(--bs-primary);border-radius:50%;z-index:2}.fab-container .fab:before{content:\" \";position:absolute;bottom:0;right:0;height:30px;width:30px;background-color:inherit;border-radius:0 0 10px;z-index:-1}.fab-container .fab .fab-content{display:flex;align-items:center;justify-content:center;height:inherit;width:inherit;border-radius:50%}.fab-container .fab .fab-content .bi{color:#fff;font-size:32px}.fab-container .sub-button{position:absolute;display:flex;align-items:center;justify-content:center;bottom:10px;right:10px;height:40px;width:40px;background-color:var(--bs-primary);border-radius:50%;transition:all .3s ease}.fab-container .sub-button:hover{cursor:pointer}.fab-container .sub-button .bi{color:#fff;padding-top:6px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
853
+ }
854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FabButtonComponent, decorators: [{
855
+ type: Component,
856
+ args: [{ selector: 'base-fab-button', standalone: true, imports: [
857
+ NgClass,
858
+ NgStyle,
859
+ RouterLink
860
+ ], template: "<div class=\"fab-container\" [ngClass]=\"{ 'fab-container-active': toggle }\">\n <div class=\"fab shadow\">\n <div class=\"fab-content\" (click)=\"toggle = !toggle\">\n @if (toggle) {\n <i class=\"bi bi-x-lg\"></i>\n }\n @if (!toggle) {\n <i class=\"bi\" [ngClass]=\"fabIcon\"></i>\n }\n </div>\n </div>\n @for (button of buttons; track button) {\n <div\n class=\"sub-button shadow\"\n (click)=\"button.event.emit(true); toggle = !toggle\"\n [ngStyle]=\"{ backgroundColor: button.color }\"\n >\n <a [routerLink]=\"button.routerLink\">\n <i class=\"bi\" [ngClass]=\"button.icon\"></i>\n </a>\n </div>\n }\n</div>\n", styles: [".fab-container{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;-webkit-user-select:none;user-select:none;position:absolute;bottom:10px;right:10px}.fab-container-active{height:100%}.fab-container-active .sub-button:nth-child(2){transform:translateY(-80px)}.fab-container-active .sub-button:nth-child(3){transform:translateY(-140px)}.fab-container-active .sub-button:nth-child(4){transform:translateY(-200px)}.fab-container-active .sub-button:nth-child(5){transform:translateY(-260px)}.fab-container-active .sub-button:nth-child(6){transform:translateY(-320px)}.fab-container .fab{position:relative;height:60px;width:60px;background-color:var(--bs-primary);border-radius:50%;z-index:2}.fab-container .fab:before{content:\" \";position:absolute;bottom:0;right:0;height:30px;width:30px;background-color:inherit;border-radius:0 0 10px;z-index:-1}.fab-container .fab .fab-content{display:flex;align-items:center;justify-content:center;height:inherit;width:inherit;border-radius:50%}.fab-container .fab .fab-content .bi{color:#fff;font-size:32px}.fab-container .sub-button{position:absolute;display:flex;align-items:center;justify-content:center;bottom:10px;right:10px;height:40px;width:40px;background-color:var(--bs-primary);border-radius:50%;transition:all .3s ease}.fab-container .sub-button:hover{cursor:pointer}.fab-container .sub-button .bi{color:#fff;padding-top:6px}\n"] }]
861
+ }], propDecorators: { fabIcon: [{
862
+ type: Input
863
+ }], buttons: [{
864
+ type: Input
779
865
  }] } });
780
866
 
781
867
  class UploadImageComponent {
@@ -1049,13 +1135,17 @@ class UploadImageComponent {
1049
1135
  description: 'Es ist ein Fehler aufgetreten. Bitte probieren Sie es später erneut oder wenden Sie sich an den Support.',
1050
1136
  }, 3500);
1051
1137
  }
1052
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: UploadImageComponent, deps: [{ token: i1$2.HttpClient }, { token: i1$1.AuthService }, { token: i1$1.FileService }, { token: i1$1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
1053
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: UploadImageComponent, selector: "base-upload-image", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", supportText: "supportText", required: "required", defaultDragText: "defaultDragText", defaultReleaseText: "defaultReleaseText", preButtonText: "preButtonText", buttonText: "buttonText", validExtensions: "validExtensions", control: "control", url: "url", uploadPath: "uploadPath", deletePath: "deletePath", path: "path", compressOptions: "compressOptions", maxSize: "maxSize", uploadDirectly: "uploadDirectly", croppingImage: "croppingImage", croppingOptions: "croppingOptions", objectPath: "objectPath", mode: "mode" }, outputs: { imageUploaded: "imageUploaded", imageDeleted: "imageDeleted", fileChanged: "fileChanged" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"form-group mt-3\" [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <div\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive, pointer: !loading, 'is-invalid': control?.invalid && control?.touched }\"\n (click)=\"!croppedInProgress && !loading && fileInput.click()\"\n >\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedFile && !fileEvent && !croppedInProgress && !loading\">\n <img [src]=\"fileUrl\" *ngIf=\"selectedFile\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile()\" baseStopPropagation>L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"control?.value && !fileEvent && !selectedFile && !loading && !croppedInProgress\">\n <img [src]=\"control?.value.startsWith('data:') ? control?.value : url + path + control?.value\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile(control?.value)\" baseStopPropagation>\n L\u00F6schen\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"!selectedFile && !control?.value && !loading && !fileEvent\">\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\"\n >{{ preButtonText }}\n <span class=\"button\" (click)=\"fileInput.click()\" baseStopPropagation>{{ buttonText }}</span></span\n >\n <span class=\"support\" [innerText]=\"supportText\"></span>\n </ng-container>\n\n <input type=\"file\" (change)=\"selectFile($event)\" [attr.accept]=\"validExtensions?.join(',')\" hidden #fileInput />\n\n <ng-container *ngIf=\"croppedInProgress && fileEvent\">\n <image-cropper\n [imageChangedEvent]=\"fileEvent\"\n [maintainAspectRatio]=\"cOptions.maintainAspectRatio\"\n [aspectRatio]=\"cOptions.aspectRatio\"\n [alignImage]=\"cOptions.alignImage\"\n [resizeToWidth]=\"cOptions.resizeToWidth\"\n [resizeToHeight]=\"cOptions.resizeToHeight\"\n [autoCrop]=\"cOptions.autoCrop\"\n [imageQuality]=\"cOptions.imageQuality\"\n [onlyScaleDown]=\"cOptions.onlyScaleDown\"\n [format]=\"cOptions.format\"\n (imageCropped)=\"imageCropped($event, fileEvent)\"\n (loadImageFailed)=\"loadImageFailed()\"\n ></image-cropper>\n <button class=\"btn btn-primary mt-2\" type=\"button\" (click)=\"finishedCropping()\" baseStopPropagation>\n Zuschneiden\n </button>\n </ng-container>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n </div>\n</div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.is-invalid .drag-area{border-color:var(--bs-danger)}.is-invalid .invalid-feedback{display:block}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:280px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}.pointer{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "format", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "directive", type: StopPropagationDirective, selector: "[baseStopPropagation]" }] });
1138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: UploadImageComponent, deps: [{ token: i1$2.HttpClient }, { token: i1.AuthService }, { token: i1.FileService }, { token: i1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
1139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: UploadImageComponent, isStandalone: true, selector: "base-upload-image", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", supportText: "supportText", required: "required", defaultDragText: "defaultDragText", defaultReleaseText: "defaultReleaseText", preButtonText: "preButtonText", buttonText: "buttonText", validExtensions: "validExtensions", control: "control", url: "url", uploadPath: "uploadPath", deletePath: "deletePath", path: "path", compressOptions: "compressOptions", maxSize: "maxSize", uploadDirectly: "uploadDirectly", croppingImage: "croppingImage", croppingOptions: "croppingOptions", objectPath: "objectPath", mode: "mode" }, outputs: { imageUploaded: "imageUploaded", imageDeleted: "imageDeleted", fileChanged: "fileChanged" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"form-group mt-3\" [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n\n <div\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive, pointer: !loading, 'is-invalid': control?.invalid && control?.touched }\"\n (click)=\"!croppedInProgress && !loading && fileInput.click()\"\n >\n @if (loading) {\n <div class=\"d-flex justify-content-center\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n }\n\n @if (selectedFile && !fileEvent && !croppedInProgress && !loading) {\n @if (selectedFile) {\n <img [src]=\"fileUrl\" />\n }\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile()\" baseStopPropagation>L\u00F6schen</button>\n }\n\n @if (control?.value && !fileEvent && !selectedFile && !loading && !croppedInProgress) {\n <img [src]=\"control?.value.startsWith('data:') ? control?.value : url + path + control?.value\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile(control?.value)\" baseStopPropagation>\n L\u00F6schen\n </button>\n }\n\n @if (!selectedFile && !control?.value && !loading && !fileEvent) {\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\"\n >{{ preButtonText }}\n <span class=\"button\" (click)=\"fileInput.click()\" baseStopPropagation>{{ buttonText }}</span></span\n >\n <span class=\"support\" [innerText]=\"supportText\"></span>\n }\n\n <input type=\"file\" (change)=\"selectFile($event)\" [attr.accept]=\"validExtensions?.join(',')\" hidden #fileInput />\n\n @if (croppedInProgress && fileEvent) {\n <image-cropper\n [imageChangedEvent]=\"fileEvent\"\n [maintainAspectRatio]=\"cOptions.maintainAspectRatio\"\n [aspectRatio]=\"cOptions.aspectRatio\"\n [alignImage]=\"cOptions.alignImage\"\n [resizeToWidth]=\"cOptions.resizeToWidth\"\n [resizeToHeight]=\"cOptions.resizeToHeight\"\n [autoCrop]=\"cOptions.autoCrop\"\n [imageQuality]=\"cOptions.imageQuality\"\n [onlyScaleDown]=\"cOptions.onlyScaleDown\"\n [format]=\"cOptions.format\"\n (imageCropped)=\"imageCropped($event, fileEvent)\"\n (loadImageFailed)=\"loadImageFailed()\"\n ></image-cropper>\n <button class=\"btn btn-primary mt-2\" type=\"button\" (click)=\"finishedCropping()\" baseStopPropagation>\n Zuschneiden\n </button>\n }\n </div>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n </div>\n }\n </div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.is-invalid .drag-area{border-color:var(--bs-danger)}.is-invalid .invalid-feedback{display:block}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:280px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}.pointer{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "cropperFrameAriaLabel", "output", "format", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "directive", type: StopPropagationDirective, selector: "[baseStopPropagation]" }] });
1054
1140
  }
1055
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: UploadImageComponent, decorators: [{
1141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: UploadImageComponent, decorators: [{
1056
1142
  type: Component,
1057
- args: [{ selector: 'base-upload-image', template: "<div class=\"form-group mt-3\" [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <div\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive, pointer: !loading, 'is-invalid': control?.invalid && control?.touched }\"\n (click)=\"!croppedInProgress && !loading && fileInput.click()\"\n >\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedFile && !fileEvent && !croppedInProgress && !loading\">\n <img [src]=\"fileUrl\" *ngIf=\"selectedFile\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile()\" baseStopPropagation>L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"control?.value && !fileEvent && !selectedFile && !loading && !croppedInProgress\">\n <img [src]=\"control?.value.startsWith('data:') ? control?.value : url + path + control?.value\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile(control?.value)\" baseStopPropagation>\n L\u00F6schen\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"!selectedFile && !control?.value && !loading && !fileEvent\">\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\"\n >{{ preButtonText }}\n <span class=\"button\" (click)=\"fileInput.click()\" baseStopPropagation>{{ buttonText }}</span></span\n >\n <span class=\"support\" [innerText]=\"supportText\"></span>\n </ng-container>\n\n <input type=\"file\" (change)=\"selectFile($event)\" [attr.accept]=\"validExtensions?.join(',')\" hidden #fileInput />\n\n <ng-container *ngIf=\"croppedInProgress && fileEvent\">\n <image-cropper\n [imageChangedEvent]=\"fileEvent\"\n [maintainAspectRatio]=\"cOptions.maintainAspectRatio\"\n [aspectRatio]=\"cOptions.aspectRatio\"\n [alignImage]=\"cOptions.alignImage\"\n [resizeToWidth]=\"cOptions.resizeToWidth\"\n [resizeToHeight]=\"cOptions.resizeToHeight\"\n [autoCrop]=\"cOptions.autoCrop\"\n [imageQuality]=\"cOptions.imageQuality\"\n [onlyScaleDown]=\"cOptions.onlyScaleDown\"\n [format]=\"cOptions.format\"\n (imageCropped)=\"imageCropped($event, fileEvent)\"\n (loadImageFailed)=\"loadImageFailed()\"\n ></image-cropper>\n <button class=\"btn btn-primary mt-2\" type=\"button\" (click)=\"finishedCropping()\" baseStopPropagation>\n Zuschneiden\n </button>\n </ng-container>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n </div>\n</div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.is-invalid .drag-area{border-color:var(--bs-danger)}.is-invalid .invalid-feedback{display:block}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:280px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}.pointer{cursor:pointer}\n"] }]
1058
- }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i1$1.AuthService }, { type: i1$1.FileService }, { type: i1$1.ToastService }], propDecorators: { fileInput: [{
1143
+ args: [{ selector: 'base-upload-image', standalone: true, imports: [
1144
+ NgClass,
1145
+ ImageCropperComponent,
1146
+ StopPropagationDirective
1147
+ ], template: "<div class=\"form-group mt-3\" [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n\n <div\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive, pointer: !loading, 'is-invalid': control?.invalid && control?.touched }\"\n (click)=\"!croppedInProgress && !loading && fileInput.click()\"\n >\n @if (loading) {\n <div class=\"d-flex justify-content-center\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n }\n\n @if (selectedFile && !fileEvent && !croppedInProgress && !loading) {\n @if (selectedFile) {\n <img [src]=\"fileUrl\" />\n }\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile()\" baseStopPropagation>L\u00F6schen</button>\n }\n\n @if (control?.value && !fileEvent && !selectedFile && !loading && !croppedInProgress) {\n <img [src]=\"control?.value.startsWith('data:') ? control?.value : url + path + control?.value\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile(control?.value)\" baseStopPropagation>\n L\u00F6schen\n </button>\n }\n\n @if (!selectedFile && !control?.value && !loading && !fileEvent) {\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\"\n >{{ preButtonText }}\n <span class=\"button\" (click)=\"fileInput.click()\" baseStopPropagation>{{ buttonText }}</span></span\n >\n <span class=\"support\" [innerText]=\"supportText\"></span>\n }\n\n <input type=\"file\" (change)=\"selectFile($event)\" [attr.accept]=\"validExtensions?.join(',')\" hidden #fileInput />\n\n @if (croppedInProgress && fileEvent) {\n <image-cropper\n [imageChangedEvent]=\"fileEvent\"\n [maintainAspectRatio]=\"cOptions.maintainAspectRatio\"\n [aspectRatio]=\"cOptions.aspectRatio\"\n [alignImage]=\"cOptions.alignImage\"\n [resizeToWidth]=\"cOptions.resizeToWidth\"\n [resizeToHeight]=\"cOptions.resizeToHeight\"\n [autoCrop]=\"cOptions.autoCrop\"\n [imageQuality]=\"cOptions.imageQuality\"\n [onlyScaleDown]=\"cOptions.onlyScaleDown\"\n [format]=\"cOptions.format\"\n (imageCropped)=\"imageCropped($event, fileEvent)\"\n (loadImageFailed)=\"loadImageFailed()\"\n ></image-cropper>\n <button class=\"btn btn-primary mt-2\" type=\"button\" (click)=\"finishedCropping()\" baseStopPropagation>\n Zuschneiden\n </button>\n }\n </div>\n\n @if (control?.invalid && (control?.dirty || control?.touched)) {\n <div class=\"invalid-feedback m-2\">\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n </div>\n }\n </div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.is-invalid .drag-area{border-color:var(--bs-danger)}.is-invalid .invalid-feedback{display:block}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:280px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}.pointer{cursor:pointer}\n"] }]
1148
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i1.AuthService }, { type: i1.FileService }, { type: i1.ToastService }], propDecorators: { fileInput: [{
1059
1149
  type: ViewChild,
1060
1150
  args: ['fileInput']
1061
1151
  }], id: [{
@@ -1329,13 +1419,18 @@ class RefenceInputComponent {
1329
1419
  return object[this.nameField]?.includes(this.currentValue);
1330
1420
  }
1331
1421
  }
1332
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RefenceInputComponent, deps: [{ token: i1$1.GraphQLService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1333
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: RefenceInputComponent, selector: "base-refence-input", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", isList: "isList", search: "search", useParamAsArg: "useParamAsArg", param: "param", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", required: "required", method: "method", fields: "fields", valueField: "valueField", objectPath: "objectPath", nameField: "nameField", creationLink: "creationLink" }, ngImport: i0, template: "<ng-container *ngIf=\"!isList\">\n <div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <div class=\"position-relative\" *ngIf=\"search\">\n <div class=\"d-flex flex-row\">\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [(ngModel)]=\"currentValue\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (keyup)=\"enterKey($event)\"\n />\n <button class=\"btn btn-primary\" (click)=\"openLink()\" *ngIf=\"creationLink\">Erstellen</button>\n </div>\n <div class=\"options\" *ngIf=\"objects && selectedElement\">\n <div class=\"option-item\" *ngFor=\"let object of filterOptions()\" (click)=\"set(object[valueField])\">\n {{ prepareNameField(object) }}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!search\">\n <div class=\"d-flex flex-row\">\n <select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" selected>{{ placeholder }}</option>\n <option *ngFor=\"let object of objects\" [ngValue]=\"object[valueField]\">\n {{ prepareNameField(object) }}\n </option>\n </select>\n <button class=\"btn btn-primary\" (click)=\"openLink()\" *ngIf=\"creationLink\">Erstellen</button>\n </div>\n </div>\n\n <div\n class=\"d-block invalid-feedback m-2\"\n *ngIf=\"control?.invalid && (control?.dirty || control?.touched) && !selectedElement\"\n >\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['invalidReference'] && currentValue\">\n {{ currentValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['matching']\">Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isList\">\n <base-tags\n [id]=\"id\"\n [label]=\"label\"\n [name]=\"name\"\n [control]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [custom]=\"false\"\n [options]=\"optionsForTagInput\"\n ></base-tags>\n</ng-container>\n", styles: [".options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.options .option-item{padding:10px;cursor:pointer}.options .option-item:hover{color:var(--bs-primary)}\n"], dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required", "objectPath", "validators"] }] });
1422
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: RefenceInputComponent, deps: [{ token: i1.GraphQLService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
1423
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: RefenceInputComponent, isStandalone: true, selector: "base-refence-input", inputs: { id: "id", name: "name", infoText: "infoText", label: "label", isList: "isList", search: "search", useParamAsArg: "useParamAsArg", param: "param", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", required: "required", method: "method", fields: "fields", valueField: "valueField", objectPath: "objectPath", nameField: "nameField", creationLink: "creationLink" }, ngImport: i0, template: "@if (!isList) {\n <div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n @if (search) {\n <div class=\"position-relative\">\n <div class=\"d-flex flex-row\">\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [(ngModel)]=\"currentValue\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (keyup)=\"enterKey($event)\"\n />\n @if (creationLink) {\n <button class=\"btn btn-primary\" (click)=\"openLink()\">Erstellen</button>\n }\n </div>\n @if (objects && selectedElement) {\n <div class=\"options\">\n @for (object of filterOptions(); track object) {\n <div class=\"option-item\" (click)=\"set(object[valueField])\">\n {{ prepareNameField(object) }}\n </div>\n }\n </div>\n }\n </div>\n }\n @if (!search) {\n <div>\n <div class=\"d-flex flex-row\">\n <select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" selected>{{ placeholder }}</option>\n @for (object of objects; track object) {\n <option [ngValue]=\"object[valueField]\">\n {{ prepareNameField(object) }}\n </option>\n }\n </select>\n @if (creationLink) {\n <button class=\"btn btn-primary\" (click)=\"openLink()\">Erstellen</button>\n }\n </div>\n </div>\n }\n @if (control?.invalid && (control?.dirty || control?.touched) && !selectedElement) {\n <div\n class=\"d-block invalid-feedback m-2\"\n >\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['invalidReference'] && currentValue) {\n <div>\n {{ currentValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n @if (control?.errors?.['matching']) {\n <div>Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n }\n </div>\n }\n </div>\n}\n\n@if (isList) {\n <base-tags\n [id]=\"id\"\n [label]=\"label\"\n [name]=\"name\"\n [control]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [custom]=\"false\"\n [options]=\"optionsForTagInput\"\n ></base-tags>\n}\n", styles: [".options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.options .option-item{padding:10px;cursor:pointer}.options .option-item:hover{color:var(--bs-primary)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required", "objectPath", "validators"] }] });
1334
1424
  }
1335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RefenceInputComponent, decorators: [{
1425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: RefenceInputComponent, decorators: [{
1336
1426
  type: Component,
1337
- args: [{ selector: 'base-refence-input', template: "<ng-container *ngIf=\"!isList\">\n <div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\" *ngIf=\"infoText\"></i>\n </div>\n\n <div class=\"position-relative\" *ngIf=\"search\">\n <div class=\"d-flex flex-row\">\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [(ngModel)]=\"currentValue\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (keyup)=\"enterKey($event)\"\n />\n <button class=\"btn btn-primary\" (click)=\"openLink()\" *ngIf=\"creationLink\">Erstellen</button>\n </div>\n <div class=\"options\" *ngIf=\"objects && selectedElement\">\n <div class=\"option-item\" *ngFor=\"let object of filterOptions()\" (click)=\"set(object[valueField])\">\n {{ prepareNameField(object) }}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!search\">\n <div class=\"d-flex flex-row\">\n <select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" selected>{{ placeholder }}</option>\n <option *ngFor=\"let object of objects\" [ngValue]=\"object[valueField]\">\n {{ prepareNameField(object) }}\n </option>\n </select>\n <button class=\"btn btn-primary\" (click)=\"openLink()\" *ngIf=\"creationLink\">Erstellen</button>\n </div>\n </div>\n\n <div\n class=\"d-block invalid-feedback m-2\"\n *ngIf=\"control?.invalid && (control?.dirty || control?.touched) && !selectedElement\"\n >\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['invalidReference'] && currentValue\">\n {{ currentValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['matching']\">Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isList\">\n <base-tags\n [id]=\"id\"\n [label]=\"label\"\n [name]=\"name\"\n [control]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [custom]=\"false\"\n [options]=\"optionsForTagInput\"\n ></base-tags>\n</ng-container>\n", styles: [".options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.options .option-item{padding:10px;cursor:pointer}.options .option-item:hover{color:var(--bs-primary)}\n"] }]
1338
- }], ctorParameters: () => [{ type: i1$1.GraphQLService }, { type: i2$1.Router }], propDecorators: { id: [{
1427
+ args: [{ selector: 'base-refence-input', standalone: true, imports: [
1428
+ NgClass,
1429
+ ReactiveFormsModule,
1430
+ FormsModule,
1431
+ TagsComponent
1432
+ ], template: "@if (!isList) {\n <div class=\"form-group mb-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n @if (label) {\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\">{{ label }}</label>\n }\n @if (infoText) {\n <i class=\"bi bi-info-circle\" [ngbTooltip]=\"infoText\" placement=\"start\"></i>\n }\n </div>\n @if (search) {\n <div class=\"position-relative\">\n <div class=\"d-flex flex-row\">\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-control\"\n [(ngModel)]=\"currentValue\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (keyup)=\"enterKey($event)\"\n />\n @if (creationLink) {\n <button class=\"btn btn-primary\" (click)=\"openLink()\">Erstellen</button>\n }\n </div>\n @if (objects && selectedElement) {\n <div class=\"options\">\n @for (object of filterOptions(); track object) {\n <div class=\"option-item\" (click)=\"set(object[valueField])\">\n {{ prepareNameField(object) }}\n </div>\n }\n </div>\n }\n </div>\n }\n @if (!search) {\n <div>\n <div class=\"d-flex flex-row\">\n <select\n [id]=\"objectPath ? objectPath + '.' + id : id\"\n [name]=\"name\"\n class=\"form-select\"\n [attr.aria-label]=\"placeholder\"\n [formControl]=\"control\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex ?? null\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n >\n <option [ngValue]=\"null\" selected>{{ placeholder }}</option>\n @for (object of objects; track object) {\n <option [ngValue]=\"object[valueField]\">\n {{ prepareNameField(object) }}\n </option>\n }\n </select>\n @if (creationLink) {\n <button class=\"btn btn-primary\" (click)=\"openLink()\">Erstellen</button>\n }\n </div>\n </div>\n }\n @if (control?.invalid && (control?.dirty || control?.touched) && !selectedElement) {\n <div\n class=\"d-block invalid-feedback m-2\"\n >\n @if (control?.errors?.['required']) {\n <div>Dieses Feld ist ein Pflichtfeld.</div>\n }\n @if (control?.errors?.['invalidReference'] && currentValue) {\n <div>\n {{ currentValue }} ist kein g\u00FCltiger Wert f\u00FCr {{ label }}.\n </div>\n }\n @if (control?.errors?.['minlength']) {\n <div>\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['maxlength']) {\n <div>\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n }\n @if (control?.errors?.['email']) {\n <div>Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n }\n @if (control?.errors?.['matching']) {\n <div>Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n }\n </div>\n }\n </div>\n}\n\n@if (isList) {\n <base-tags\n [id]=\"id\"\n [label]=\"label\"\n [name]=\"name\"\n [control]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [custom]=\"false\"\n [options]=\"optionsForTagInput\"\n ></base-tags>\n}\n", styles: [".options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999;max-height:200px;overflow-y:scroll}.options .option-item{padding:10px;cursor:pointer}.options .option-item:hover{color:var(--bs-primary)}\n"] }]
1433
+ }], ctorParameters: () => [{ type: i1.GraphQLService }, { type: i2.Router }], propDecorators: { id: [{
1339
1434
  type: Input
1340
1435
  }], name: [{
1341
1436
  type: Input
@@ -1451,13 +1546,21 @@ class ModelFormSubComponent {
1451
1546
  transformToControl(control) {
1452
1547
  return control;
1453
1548
  }
1454
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelFormSubComponent, deps: [{ token: i1$1.AuthService }], target: i0.ɵɵFactoryTarget.Component });
1455
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: { id: "id", parentKey: "parentKey", fields: "fields", form: "form", config: "config" }, outputs: { imageChanged: "imageChanged", fileChanged: "fileChanged" }, ngImport: i0, template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container\n *ngIf=\"checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <fieldset class=\"border rounded-3 p-3 mt-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [parentKey]=\"key\"\n [fields]=\"fields[key].fields\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n (imageChanged)=\"imageChanged.emit($event)\"\n (fileChanged)=\"fileChanged.emit($event)\"\n ></base-model-form-sub>\n </fieldset>\n </ng-container>\n\n <ng-container\n *ngIf=\"!checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <ng-container *ngIf=\"fields[key]?.isEnum && !config[key]?.exclude\">\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n [objectPath]=\"objectPath\"\n ></base-select>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isEnum && !config[key]?.exclude\">\n <ng-container [ngSwitch]=\"config[key]?.type ? config[key]?.type : fields[key]?.type\">\n <ng-container *ngSwitchCase=\"'String'\">\n <ng-container *ngIf=\"fields[key]?.isList && !config[key]?.exclude\">\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [validators]=\"config[key]?.validators\"\n [objectPath]=\"objectPath\"\n ></base-tags>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isList && !config[key]?.exclude\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Image'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [croppingOptions]=\"config[key]?.croppingOptions\"\n [croppingImage]=\"config[key]?.croppingImage\"\n [maxSize]=\"config[key]?.maxSize\"\n [uploadDirectly]=\"false\"\n [objectPath]=\"objectPath\"\n [mode]=\"config[key]?.imageMode || 'base64'\"\n (fileChanged)=\"fileChanged.emit($event)\"\n (imageDeleted)=\"imageChanged.emit(key)\"\n (imageUploaded)=\"imageChanged.emit(key)\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Upload'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [maxSize]=\"config[key]?.maxSize\"\n [objectPath]=\"objectPath\"\n [mode]=\"'file'\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Reference'\">\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [isList]=\"fields[key]?.isList\"\n [useParamAsArg]=\"config[key]?.useParamAsArg ?? false\"\n [param]=\"id\"\n [search]=\"config[key]?.searchable ?? true\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.requestFields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [nameField]=\"config[key]?.nameField || 'name'\"\n [creationLink]=\"config[key]?.creationLink || ''\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-refence-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-checkbox>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'LongText'\">\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-textarea>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Float'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Password'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Color'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'URL'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'url'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Email'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'email'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required", "eyeButton", "objectPath"], outputs: ["enter"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["id", "name", "infoText", "label", "placeholder", "objectPath", "control", "tabIndex", "required", "multiple", "search", "options"] }, { kind: "component", type: CheckboxComponent, selector: "base-checkbox", inputs: ["id", "name", "label", "value", "control", "required", "objectPath"] }, { kind: "component", type: TextareaComponent, selector: "base-textarea", inputs: ["id", "name", "infoText", "label", "placeholder", "control", "rows", "required", "autoHeight", "tabIndex", "objectPath"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required", "objectPath", "validators"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["id", "parentKey", "fields", "form", "config"], outputs: ["imageChanged", "fileChanged"] }, { kind: "component", type: UploadImageComponent, selector: "base-upload-image", inputs: ["id", "name", "infoText", "label", "supportText", "required", "defaultDragText", "defaultReleaseText", "preButtonText", "buttonText", "validExtensions", "control", "url", "uploadPath", "deletePath", "path", "compressOptions", "maxSize", "uploadDirectly", "croppingImage", "croppingOptions", "objectPath", "mode"], outputs: ["imageUploaded", "imageDeleted", "fileChanged"] }, { kind: "component", type: RefenceInputComponent, selector: "base-refence-input", inputs: ["id", "name", "infoText", "label", "isList", "search", "useParamAsArg", "param", "placeholder", "autocomplete", "tabIndex", "control", "required", "method", "fields", "valueField", "objectPath", "nameField", "creationLink"] }] });
1549
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelFormSubComponent, deps: [{ token: i1.AuthService }], target: i0.ɵɵFactoryTarget.Component });
1550
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: ModelFormSubComponent, isStandalone: true, selector: "base-model-form-sub", inputs: { id: "id", parentKey: "parentKey", fields: "fields", form: "form", config: "config" }, outputs: { imageChanged: "imageChanged", fileChanged: "fileChanged" }, ngImport: i0, template: "@for (key of keys; track key) {\n <div class=\"mt-3\">\n @if (checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)) {\n <fieldset class=\"border rounded-3 p-3 mt-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [parentKey]=\"key\"\n [fields]=\"fields[key].fields\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n (imageChanged)=\"imageChanged.emit($event)\"\n (fileChanged)=\"fileChanged.emit($event)\"\n ></base-model-form-sub>\n </fieldset>\n }\n @if (!checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)) {\n @if (fields[key]?.isEnum && !config[key]?.exclude) {\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n [objectPath]=\"objectPath\"\n ></base-select>\n }\n @if (!fields[key]?.isEnum && !config[key]?.exclude) {\n @switch (config[key]?.type ? config[key]?.type : fields[key]?.type) {\n @case ('String') {\n @if (fields[key]?.isList && !config[key]?.exclude) {\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [validators]=\"config[key]?.validators\"\n [objectPath]=\"objectPath\"\n ></base-tags>\n }\n @if (!fields[key]?.isList && !config[key]?.exclude) {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n }\n @case ('Image') {\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [croppingOptions]=\"config[key]?.croppingOptions\"\n [croppingImage]=\"config[key]?.croppingImage\"\n [maxSize]=\"config[key]?.maxSize\"\n [uploadDirectly]=\"false\"\n [objectPath]=\"objectPath\"\n [mode]=\"config[key]?.imageMode || 'base64'\"\n (fileChanged)=\"fileChanged.emit($event)\"\n (imageDeleted)=\"imageChanged.emit(key)\"\n (imageUploaded)=\"imageChanged.emit(key)\"\n ></base-upload-image>\n }\n @case ('Upload') {\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [maxSize]=\"config[key]?.maxSize\"\n [objectPath]=\"objectPath\"\n [mode]=\"'file'\"\n ></base-upload-image>\n }\n @case ('Reference') {\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [isList]=\"fields[key]?.isList\"\n [useParamAsArg]=\"config[key]?.useParamAsArg ?? false\"\n [param]=\"id\"\n [search]=\"config[key]?.searchable ?? true\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.requestFields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [nameField]=\"config[key]?.nameField || 'name'\"\n [creationLink]=\"config[key]?.creationLink || ''\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-refence-input>\n }\n @case ('Boolean') {\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-checkbox>\n }\n @case ('LongText') {\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-textarea>\n }\n @case ('Float') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('Password') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('Color') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('URL') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'url'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('Email') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'email'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('DateTime') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n }\n }\n }\n </div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["id", "parentKey", "fields", "form", "config"], outputs: ["imageChanged", "fileChanged"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required", "eyeButton", "objectPath"], outputs: ["enter"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["id", "name", "infoText", "label", "placeholder", "objectPath", "control", "tabIndex", "required", "multiple", "search", "options"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required", "objectPath", "validators"] }, { kind: "component", type: UploadImageComponent, selector: "base-upload-image", inputs: ["id", "name", "infoText", "label", "supportText", "required", "defaultDragText", "defaultReleaseText", "preButtonText", "buttonText", "validExtensions", "control", "url", "uploadPath", "deletePath", "path", "compressOptions", "maxSize", "uploadDirectly", "croppingImage", "croppingOptions", "objectPath", "mode"], outputs: ["imageUploaded", "imageDeleted", "fileChanged"] }, { kind: "component", type: RefenceInputComponent, selector: "base-refence-input", inputs: ["id", "name", "infoText", "label", "isList", "search", "useParamAsArg", "param", "placeholder", "autocomplete", "tabIndex", "control", "required", "method", "fields", "valueField", "objectPath", "nameField", "creationLink"] }, { kind: "component", type: CheckboxComponent, selector: "base-checkbox", inputs: ["id", "name", "label", "value", "control", "required", "objectPath"] }, { kind: "component", type: TextareaComponent, selector: "base-textarea", inputs: ["id", "name", "infoText", "label", "placeholder", "control", "rows", "required", "autoHeight", "tabIndex", "objectPath"] }] });
1456
1551
  }
1457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelFormSubComponent, decorators: [{
1552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelFormSubComponent, decorators: [{
1458
1553
  type: Component,
1459
- args: [{ selector: 'base-model-form-sub', template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container\n *ngIf=\"checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <fieldset class=\"border rounded-3 p-3 mt-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [parentKey]=\"key\"\n [fields]=\"fields[key].fields\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n (imageChanged)=\"imageChanged.emit($event)\"\n (fileChanged)=\"fileChanged.emit($event)\"\n ></base-model-form-sub>\n </fieldset>\n </ng-container>\n\n <ng-container\n *ngIf=\"!checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <ng-container *ngIf=\"fields[key]?.isEnum && !config[key]?.exclude\">\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n [objectPath]=\"objectPath\"\n ></base-select>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isEnum && !config[key]?.exclude\">\n <ng-container [ngSwitch]=\"config[key]?.type ? config[key]?.type : fields[key]?.type\">\n <ng-container *ngSwitchCase=\"'String'\">\n <ng-container *ngIf=\"fields[key]?.isList && !config[key]?.exclude\">\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [validators]=\"config[key]?.validators\"\n [objectPath]=\"objectPath\"\n ></base-tags>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isList && !config[key]?.exclude\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Image'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [croppingOptions]=\"config[key]?.croppingOptions\"\n [croppingImage]=\"config[key]?.croppingImage\"\n [maxSize]=\"config[key]?.maxSize\"\n [uploadDirectly]=\"false\"\n [objectPath]=\"objectPath\"\n [mode]=\"config[key]?.imageMode || 'base64'\"\n (fileChanged)=\"fileChanged.emit($event)\"\n (imageDeleted)=\"imageChanged.emit(key)\"\n (imageUploaded)=\"imageChanged.emit(key)\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Upload'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [maxSize]=\"config[key]?.maxSize\"\n [objectPath]=\"objectPath\"\n [mode]=\"'file'\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Reference'\">\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [isList]=\"fields[key]?.isList\"\n [useParamAsArg]=\"config[key]?.useParamAsArg ?? false\"\n [param]=\"id\"\n [search]=\"config[key]?.searchable ?? true\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.requestFields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [nameField]=\"config[key]?.nameField || 'name'\"\n [creationLink]=\"config[key]?.creationLink || ''\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-refence-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-checkbox>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'LongText'\">\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-textarea>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Float'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Password'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Color'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'URL'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'url'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Email'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'email'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n" }]
1460
- }], ctorParameters: () => [{ type: i1$1.AuthService }], propDecorators: { id: [{
1554
+ args: [{ selector: 'base-model-form-sub', standalone: true, imports: [
1555
+ InputComponent,
1556
+ SelectComponent,
1557
+ TagsComponent,
1558
+ UploadImageComponent,
1559
+ RefenceInputComponent,
1560
+ CheckboxComponent,
1561
+ TextareaComponent
1562
+ ], template: "@for (key of keys; track key) {\n <div class=\"mt-3\">\n @if (checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)) {\n <fieldset class=\"border rounded-3 p-3 mt-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [parentKey]=\"key\"\n [fields]=\"fields[key].fields\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n (imageChanged)=\"imageChanged.emit($event)\"\n (fileChanged)=\"fileChanged.emit($event)\"\n ></base-model-form-sub>\n </fieldset>\n }\n @if (!checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)) {\n @if (fields[key]?.isEnum && !config[key]?.exclude) {\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n [objectPath]=\"objectPath\"\n ></base-select>\n }\n @if (!fields[key]?.isEnum && !config[key]?.exclude) {\n @switch (config[key]?.type ? config[key]?.type : fields[key]?.type) {\n @case ('String') {\n @if (fields[key]?.isList && !config[key]?.exclude) {\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [validators]=\"config[key]?.validators\"\n [objectPath]=\"objectPath\"\n ></base-tags>\n }\n @if (!fields[key]?.isList && !config[key]?.exclude) {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n }\n @case ('Image') {\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [croppingOptions]=\"config[key]?.croppingOptions\"\n [croppingImage]=\"config[key]?.croppingImage\"\n [maxSize]=\"config[key]?.maxSize\"\n [uploadDirectly]=\"false\"\n [objectPath]=\"objectPath\"\n [mode]=\"config[key]?.imageMode || 'base64'\"\n (fileChanged)=\"fileChanged.emit($event)\"\n (imageDeleted)=\"imageChanged.emit(key)\"\n (imageUploaded)=\"imageChanged.emit(key)\"\n ></base-upload-image>\n }\n @case ('Upload') {\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [defaultDragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [defaultReleaseText]=\"config[key]?.releaseText || 'Loslassen zum hochladen'\"\n [preButtonText]=\"config[key]?.preButtonText || 'or'\"\n [buttonText]=\"config[key]?.buttonText || 'browse'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [compressOptions]=\"config[key]?.compressOptions\"\n [maxSize]=\"config[key]?.maxSize\"\n [objectPath]=\"objectPath\"\n [mode]=\"'file'\"\n ></base-upload-image>\n }\n @case ('Reference') {\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [isList]=\"fields[key]?.isList\"\n [useParamAsArg]=\"config[key]?.useParamAsArg ?? false\"\n [param]=\"id\"\n [search]=\"config[key]?.searchable ?? true\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.requestFields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [nameField]=\"config[key]?.nameField || 'name'\"\n [creationLink]=\"config[key]?.creationLink || ''\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-refence-input>\n }\n @case ('Boolean') {\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-checkbox>\n }\n @case ('LongText') {\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-textarea>\n }\n @case ('Float') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('Password') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('Color') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('URL') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'url'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('Email') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'email'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n @case ('DateTime') {\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [infoText]=\"config[key]?.infoText ? config[key].infoText : null\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n [objectPath]=\"objectPath\"\n ></base-input>\n }\n }\n }\n }\n </div>\n}\n" }]
1563
+ }], ctorParameters: () => [{ type: i1.AuthService }], propDecorators: { id: [{
1461
1564
  type: Input
1462
1565
  }], parentKey: [{
1463
1566
  type: Input
@@ -1473,22 +1576,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
1473
1576
  type: Output
1474
1577
  }] } });
1475
1578
 
1476
- class FabButtonComponent {
1477
- fabIcon = 'bi-list';
1478
- buttons;
1479
- toggle = false;
1480
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1481
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: FabButtonComponent, selector: "base-fab-button", inputs: { fabIcon: "fabIcon", buttons: "buttons" }, ngImport: i0, template: "<div class=\"fab-container\" [ngClass]=\"{ 'fab-container-active': toggle }\">\n <div class=\"fab shadow\">\n <div class=\"fab-content\" (click)=\"toggle = !toggle\">\n <i class=\"bi bi-x-lg\" *ngIf=\"toggle\"></i>\n <i class=\"bi\" *ngIf=\"!toggle\" [ngClass]=\"fabIcon\"></i>\n </div>\n </div>\n <div\n class=\"sub-button shadow\"\n *ngFor=\"let button of buttons\"\n (click)=\"button.event.emit(true); toggle = !toggle\"\n [ngStyle]=\"{ backgroundColor: button.color }\"\n >\n <a [routerLink]=\"button.routerLink\">\n <i class=\"bi\" [ngClass]=\"button.icon\"></i>\n </a>\n </div>\n</div>\n", styles: [".fab-container{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;-webkit-user-select:none;user-select:none;position:absolute;bottom:10px;right:10px}.fab-container-active{height:100%}.fab-container-active .sub-button:nth-child(2){transform:translateY(-80px)}.fab-container-active .sub-button:nth-child(3){transform:translateY(-140px)}.fab-container-active .sub-button:nth-child(4){transform:translateY(-200px)}.fab-container-active .sub-button:nth-child(5){transform:translateY(-260px)}.fab-container-active .sub-button:nth-child(6){transform:translateY(-320px)}.fab-container .fab{position:relative;height:60px;width:60px;background-color:var(--bs-primary);border-radius:50%;z-index:2}.fab-container .fab:before{content:\" \";position:absolute;bottom:0;right:0;height:30px;width:30px;background-color:inherit;border-radius:0 0 10px;z-index:-1}.fab-container .fab .fab-content{display:flex;align-items:center;justify-content:center;height:inherit;width:inherit;border-radius:50%}.fab-container .fab .fab-content .bi{color:#fff;font-size:32px}.fab-container .sub-button{position:absolute;display:flex;align-items:center;justify-content:center;bottom:10px;right:10px;height:40px;width:40px;background-color:var(--bs-primary);border-radius:50%;transition:all .3s ease}.fab-container .sub-button:hover{cursor:pointer}.fab-container .sub-button .bi{color:#fff;padding-top:6px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1482
- }
1483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FabButtonComponent, decorators: [{
1484
- type: Component,
1485
- args: [{ selector: 'base-fab-button', template: "<div class=\"fab-container\" [ngClass]=\"{ 'fab-container-active': toggle }\">\n <div class=\"fab shadow\">\n <div class=\"fab-content\" (click)=\"toggle = !toggle\">\n <i class=\"bi bi-x-lg\" *ngIf=\"toggle\"></i>\n <i class=\"bi\" *ngIf=\"!toggle\" [ngClass]=\"fabIcon\"></i>\n </div>\n </div>\n <div\n class=\"sub-button shadow\"\n *ngFor=\"let button of buttons\"\n (click)=\"button.event.emit(true); toggle = !toggle\"\n [ngStyle]=\"{ backgroundColor: button.color }\"\n >\n <a [routerLink]=\"button.routerLink\">\n <i class=\"bi\" [ngClass]=\"button.icon\"></i>\n </a>\n </div>\n</div>\n", styles: [".fab-container{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;-webkit-user-select:none;user-select:none;position:absolute;bottom:10px;right:10px}.fab-container-active{height:100%}.fab-container-active .sub-button:nth-child(2){transform:translateY(-80px)}.fab-container-active .sub-button:nth-child(3){transform:translateY(-140px)}.fab-container-active .sub-button:nth-child(4){transform:translateY(-200px)}.fab-container-active .sub-button:nth-child(5){transform:translateY(-260px)}.fab-container-active .sub-button:nth-child(6){transform:translateY(-320px)}.fab-container .fab{position:relative;height:60px;width:60px;background-color:var(--bs-primary);border-radius:50%;z-index:2}.fab-container .fab:before{content:\" \";position:absolute;bottom:0;right:0;height:30px;width:30px;background-color:inherit;border-radius:0 0 10px;z-index:-1}.fab-container .fab .fab-content{display:flex;align-items:center;justify-content:center;height:inherit;width:inherit;border-radius:50%}.fab-container .fab .fab-content .bi{color:#fff;font-size:32px}.fab-container .sub-button{position:absolute;display:flex;align-items:center;justify-content:center;bottom:10px;right:10px;height:40px;width:40px;background-color:var(--bs-primary);border-radius:50%;transition:all .3s ease}.fab-container .sub-button:hover{cursor:pointer}.fab-container .sub-button .bi{color:#fff;padding-top:6px}\n"] }]
1486
- }], propDecorators: { fabIcon: [{
1487
- type: Input
1488
- }], buttons: [{
1489
- type: Input
1490
- }] } });
1491
-
1492
1579
  /**
1493
1580
  * ModelFormComponent
1494
1581
  *
@@ -1986,7 +2073,128 @@ class ModelFormComponent {
1986
2073
  initFabActions() {
1987
2074
  const saveEvent = new EventEmitter();
1988
2075
  this.fabButtons.push({ icon: 'bi-check-lg', color: 'var(--bs-success)', event: saveEvent });
1989
- saveEvent.subscribe(() => this.submit(false));
2076
+ saveEvent.subscribe(() => this.submit(false));
2077
+ if (this.duplicate && this.operation === 'update') {
2078
+ const event = new EventEmitter();
2079
+ this.fabButtons.push({ icon: 'bi-back', color: 'var(--bs-info)', event });
2080
+ event.subscribe(() => this.duplicateObject());
2081
+ }
2082
+ if (this.operation === 'update' && this.delete) {
2083
+ const event = new EventEmitter();
2084
+ this.fabButtons.push({ icon: 'bi-trash3', color: 'var(--bs-danger)', event });
2085
+ event.subscribe(() => this.deleteObject());
2086
+ }
2087
+ }
2088
+ /**
2089
+ * Set file changes for process
2090
+ */
2091
+ processFileChanges(event) {
2092
+ const index = this.fileChanges?.findIndex((e) => e.field === event.field);
2093
+ if (index !== undefined && index !== -1) {
2094
+ this.fileChanges[index] = event;
2095
+ }
2096
+ else if (this.fileChanges) {
2097
+ this.fileChanges.push(event);
2098
+ }
2099
+ else {
2100
+ this.fileChanges = [event];
2101
+ }
2102
+ }
2103
+ formatDate(date) {
2104
+ if (!date) {
2105
+ return null;
2106
+ }
2107
+ const newDate = new Date(date);
2108
+ return newDate.toISOString().substring(0, 16);
2109
+ }
2110
+ nestedObject(key, nestedObject, value) {
2111
+ const props = key.split('.');
2112
+ let result = nestedObject;
2113
+ for (let i = 0; i < props.length; i++) {
2114
+ if (value && i === props.length - 1) {
2115
+ result[props[i]] = value;
2116
+ return result[props[i]];
2117
+ }
2118
+ result =
2119
+ result[props[i]]?.fields && Object.keys(result[props[i]]?.fields)?.length > 0
2120
+ ? result[props[i]]?.fields
2121
+ : result[props[i]];
2122
+ }
2123
+ return result;
2124
+ }
2125
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelFormComponent, deps: [{ token: i1.GraphQLMetaService }, { token: i1.GraphQLService }, { token: i1.FormsService }, { token: i1.AuthService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i1.CmsService }, { token: i1.ToastService }, { token: i1.FileService }], target: i0.ɵɵFactoryTarget.Component });
2126
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: ModelFormComponent, isStandalone: true, selector: "base-model-form", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", onlyUpdateMode: "onlyUpdateMode", duplicate: "duplicate", logging: "logging", config: "config", showFavButton: "showFavButton" }, outputs: { finished: "finished" }, usesOnChanges: true, ngImport: i0, template: "@if (form) {\n <div class=\"w-100\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <div class=\"responsive-back d-flex d-lg-none\">\n <i class=\"bi bi-arrow-left\" routerLink=\"../\"></i>\n </div>\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n <div class=\"d-none d-lg-flex flex-row align-items-center justify-content-end\">\n @if (id && duplicate && !_loading) {\n <button class=\"btn btn-outline-primary me-2\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n }\n @if (!_loading) {\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n }\n @if (_loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n }\n </div>\n </div>\n <form [formGroup]=\"form\">\n <base-model-form-sub\n [id]=\"id\"\n [fields]=\"fields\"\n [config]=\"config\"\n [form]=\"form\"\n (imageChanged)=\"imageChanged($event)\"\n (fileChanged)=\"processFileChanges($event)\"\n ></base-model-form-sub>\n <div class=\"d-none d-lg-flex mt-4\" [ngClass]=\"id && delete ? 'justify-content-between' : 'justify-content-end'\">\n @if (id && delete) {\n <div>\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteObject()\">L\u00F6schen</button>\n </div>\n }\n <div>\n @if (!_loading) {\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n }\n @if (_loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n }\n </div>\n </div>\n </form>\n</div>\n}\n\n@if (showFavButton) {\n <div class=\"d-block d-lg-none responsive-action-button\">\n <base-fab-button [buttons]=\"fabButtons\"></base-fab-button>\n </div>\n}\n", styles: [".responsive-back{display:flex;align-items:center;margin-right:6px}.responsive-back .bi-arrow-left{font-size:28px}h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.responsive-action-button{position:fixed;bottom:15px;right:15px;z-index:100}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["id", "parentKey", "fields", "form", "config"], outputs: ["imageChanged", "fileChanged"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FabButtonComponent, selector: "base-fab-button", inputs: ["fabIcon", "buttons"] }] });
2127
+ }
2128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelFormComponent, decorators: [{
2129
+ type: Component,
2130
+ args: [{ selector: 'base-model-form', standalone: true, imports: [
2131
+ RouterLink,
2132
+ ReactiveFormsModule,
2133
+ ModelFormSubComponent,
2134
+ NgClass,
2135
+ FabButtonComponent
2136
+ ], template: "@if (form) {\n <div class=\"w-100\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <div class=\"responsive-back d-flex d-lg-none\">\n <i class=\"bi bi-arrow-left\" routerLink=\"../\"></i>\n </div>\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n <div class=\"d-none d-lg-flex flex-row align-items-center justify-content-end\">\n @if (id && duplicate && !_loading) {\n <button class=\"btn btn-outline-primary me-2\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n }\n @if (!_loading) {\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n }\n @if (_loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n }\n </div>\n </div>\n <form [formGroup]=\"form\">\n <base-model-form-sub\n [id]=\"id\"\n [fields]=\"fields\"\n [config]=\"config\"\n [form]=\"form\"\n (imageChanged)=\"imageChanged($event)\"\n (fileChanged)=\"processFileChanges($event)\"\n ></base-model-form-sub>\n <div class=\"d-none d-lg-flex mt-4\" [ngClass]=\"id && delete ? 'justify-content-between' : 'justify-content-end'\">\n @if (id && delete) {\n <div>\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteObject()\">L\u00F6schen</button>\n </div>\n }\n <div>\n @if (!_loading) {\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n }\n @if (_loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n }\n </div>\n </div>\n </form>\n</div>\n}\n\n@if (showFavButton) {\n <div class=\"d-block d-lg-none responsive-action-button\">\n <base-fab-button [buttons]=\"fabButtons\"></base-fab-button>\n </div>\n}\n", styles: [".responsive-back{display:flex;align-items:center;margin-right:6px}.responsive-back .bi-arrow-left{font-size:28px}h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.responsive-action-button{position:fixed;bottom:15px;right:15px;z-index:100}\n"] }]
2137
+ }], ctorParameters: () => [{ type: i1.GraphQLMetaService }, { type: i1.GraphQLService }, { type: i1.FormsService }, { type: i1.AuthService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i1.CmsService }, { type: i1.ToastService }, { type: i1.FileService }], propDecorators: { modelName: [{
2138
+ type: Input
2139
+ }], label: [{
2140
+ type: Input
2141
+ }], id: [{
2142
+ type: Input
2143
+ }], delete: [{
2144
+ type: Input
2145
+ }], onlyUpdateMode: [{
2146
+ type: Input
2147
+ }], duplicate: [{
2148
+ type: Input
2149
+ }], logging: [{
2150
+ type: Input
2151
+ }], config: [{
2152
+ type: Input
2153
+ }], showFavButton: [{
2154
+ type: Input
2155
+ }], finished: [{
2156
+ type: Output
2157
+ }] } });
2158
+
2159
+ /**
2160
+ * Abstract Component for inputs and outputs only
2161
+ *
2162
+ * Hint for handling extensions of this component in project:
2163
+ * If you want to use complete custom services and methods, extend ModelFormComponent instead of ModelFormBaseComponent
2164
+ */
2165
+ class ModelFormBaseComponent {
2166
+ cmsService;
2167
+ toastService;
2168
+ router;
2169
+ route;
2170
+ modelName;
2171
+ label;
2172
+ id;
2173
+ delete = true;
2174
+ onlyUpdateMode = false;
2175
+ duplicate = false;
2176
+ logging = false;
2177
+ config = null;
2178
+ showFavButton = true;
2179
+ finished = new EventEmitter();
2180
+ fabButtons = [];
2181
+ operation;
2182
+ constructor(cmsService, toastService, router, route) {
2183
+ this.cmsService = cmsService;
2184
+ this.toastService = toastService;
2185
+ this.router = router;
2186
+ this.route = route;
2187
+ }
2188
+ ngOnInit() {
2189
+ this.initFabActions();
2190
+ }
2191
+ /**
2192
+ * Init fab buttons for mobile devices
2193
+ */
2194
+ initFabActions() {
2195
+ const saveEvent = new EventEmitter();
2196
+ this.fabButtons.push({ icon: 'bi-check-lg', color: 'var(--bs-success)', event: saveEvent });
2197
+ saveEvent.subscribe(() => this.submit());
1990
2198
  if (this.duplicate && this.operation === 'update') {
1991
2199
  const event = new EventEmitter();
1992
2200
  this.fabButtons.push({ icon: 'bi-back', color: 'var(--bs-info)', event });
@@ -1998,20 +2206,57 @@ class ModelFormComponent {
1998
2206
  event.subscribe(() => this.deleteObject());
1999
2207
  }
2000
2208
  }
2209
+ submit() { }
2001
2210
  /**
2002
- * Set file changes for process
2211
+ * It calls the graphQLService to delete the object with the id of the object that is currently being edited
2003
2212
  */
2004
- processFileChanges(event) {
2005
- const index = this.fileChanges?.findIndex((e) => e.field === event.field);
2006
- if (index !== undefined && index !== -1) {
2007
- this.fileChanges[index] = event;
2008
- }
2009
- else if (this.fileChanges) {
2010
- this.fileChanges.push(event);
2011
- }
2012
- else {
2013
- this.fileChanges = [event];
2014
- }
2213
+ deleteObject() {
2214
+ this.cmsService.deleteObject(this.id, this.modelName).then(() => {
2215
+ this.toastService.show({
2216
+ id: this.modelName + '-success',
2217
+ type: ToastType.SUCCESS,
2218
+ title: 'Erfolgreich',
2219
+ description: this.label + ' wurde erfolgreich gelöscht.',
2220
+ });
2221
+ this.finished.emit(null);
2222
+ });
2223
+ }
2224
+ /**
2225
+ * It sends a GraphQL mutation to the server to duplicate the object
2226
+ */
2227
+ async duplicateObject() {
2228
+ this.cmsService.duplicateObject(this.id, this.modelName).then(async (value) => {
2229
+ if (value?.id) {
2230
+ await this.router.navigate(['../'], { relativeTo: this.route });
2231
+ this.toastService.show({
2232
+ id: this.modelName + '-success',
2233
+ type: ToastType.SUCCESS,
2234
+ title: 'Erfolgreich',
2235
+ description: this.label + ' wurde erfolgreich dupliziert.',
2236
+ });
2237
+ }
2238
+ else {
2239
+ this.finished.emit(null);
2240
+ }
2241
+ });
2242
+ }
2243
+ /**
2244
+ * It takes a string, capitalizes the first letter, and returns the modified string
2245
+ *
2246
+ * @param value - The string to capitalize.
2247
+ * @returns The first letter of the string is being capitalized and the rest of the string is being returned.
2248
+ */
2249
+ capitalizeFirstLetter(value) {
2250
+ return this.cmsService.capitalizeFirstLetter(value);
2251
+ }
2252
+ /**
2253
+ * It takes an AbstractControl and returns a FormControl
2254
+ *
2255
+ * @param control - AbstractControl | null | undefined
2256
+ * @returns A FormControl
2257
+ */
2258
+ transformToControl(control) {
2259
+ return control;
2015
2260
  }
2016
2261
  formatDate(date) {
2017
2262
  if (!date) {
@@ -2020,28 +2265,16 @@ class ModelFormComponent {
2020
2265
  const newDate = new Date(date);
2021
2266
  return newDate.toISOString().substring(0, 16);
2022
2267
  }
2023
- nestedObject(key, nestedObject, value) {
2024
- const props = key.split('.');
2025
- let result = nestedObject;
2026
- for (let i = 0; i < props.length; i++) {
2027
- if (value && i === props.length - 1) {
2028
- result[props[i]] = value;
2029
- return result[props[i]];
2030
- }
2031
- result =
2032
- result[props[i]]?.fields && Object.keys(result[props[i]]?.fields)?.length > 0
2033
- ? result[props[i]]?.fields
2034
- : result[props[i]];
2035
- }
2036
- return result;
2037
- }
2038
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelFormComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }, { token: i1$1.FormsService }, { token: i1$1.AuthService }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }, { token: i1$1.CmsService }, { token: i1$1.ToastService }, { token: i1$1.FileService }], target: i0.ɵɵFactoryTarget.Component });
2039
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ModelFormComponent, selector: "base-model-form", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", onlyUpdateMode: "onlyUpdateMode", duplicate: "duplicate", logging: "logging", config: "config", showFavButton: "showFavButton" }, outputs: { finished: "finished" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"w-100\" *ngIf=\"form\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <div class=\"responsive-back d-flex d-lg-none\">\n <i class=\"bi bi-arrow-left\" routerLink=\"../\"></i>\n </div>\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div class=\"d-none d-lg-flex flex-row align-items-center justify-content-end\">\n <button class=\"btn btn-outline-primary me-2\" *ngIf=\"id && duplicate && !_loading\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"_loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub\n [id]=\"id\"\n [fields]=\"fields\"\n [config]=\"config\"\n [form]=\"form\"\n (imageChanged)=\"imageChanged($event)\"\n (fileChanged)=\"processFileChanges($event)\"\n ></base-model-form-sub>\n\n <div class=\"d-none d-lg-flex mt-4\" [ngClass]=\"id && delete ? 'justify-content-between' : 'justify-content-end'\">\n <div *ngIf=\"id && delete\">\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteObject()\">L\u00F6schen</button>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"_loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n </form>\n</div>\n\n<div class=\"d-block d-lg-none responsive-action-button\" *ngIf=\"showFavButton\">\n <base-fab-button [buttons]=\"fabButtons\"></base-fab-button>\n</div>\n", styles: [".responsive-back{display:flex;align-items:center;margin-right:6px}.responsive-back .bi-arrow-left{font-size:28px}h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.responsive-action-button{position:fixed;bottom:15px;right:15px;z-index:100}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["id", "parentKey", "fields", "form", "config"], outputs: ["imageChanged", "fileChanged"] }, { kind: "component", type: FabButtonComponent, selector: "base-fab-button", inputs: ["fabIcon", "buttons"] }] });
2268
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelFormBaseComponent, deps: [{ token: i1.CmsService }, { token: i1.ToastService }, { token: i2.Router }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2269
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: ModelFormBaseComponent, isStandalone: true, selector: "ng-component", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", onlyUpdateMode: "onlyUpdateMode", duplicate: "duplicate", logging: "logging", config: "config", showFavButton: "showFavButton" }, outputs: { finished: "finished" }, ngImport: i0, template: '', isInline: true });
2040
2270
  }
2041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelFormComponent, decorators: [{
2271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelFormBaseComponent, decorators: [{
2042
2272
  type: Component,
2043
- args: [{ selector: 'base-model-form', template: "<div class=\"w-100\" *ngIf=\"form\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <div class=\"responsive-back d-flex d-lg-none\">\n <i class=\"bi bi-arrow-left\" routerLink=\"../\"></i>\n </div>\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div class=\"d-none d-lg-flex flex-row align-items-center justify-content-end\">\n <button class=\"btn btn-outline-primary me-2\" *ngIf=\"id && duplicate && !_loading\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"_loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub\n [id]=\"id\"\n [fields]=\"fields\"\n [config]=\"config\"\n [form]=\"form\"\n (imageChanged)=\"imageChanged($event)\"\n (fileChanged)=\"processFileChanges($event)\"\n ></base-model-form-sub>\n\n <div class=\"d-none d-lg-flex mt-4\" [ngClass]=\"id && delete ? 'justify-content-between' : 'justify-content-end'\">\n <div *ngIf=\"id && delete\">\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteObject()\">L\u00F6schen</button>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"_loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n </form>\n</div>\n\n<div class=\"d-block d-lg-none responsive-action-button\" *ngIf=\"showFavButton\">\n <base-fab-button [buttons]=\"fabButtons\"></base-fab-button>\n</div>\n", styles: [".responsive-back{display:flex;align-items:center;margin-right:6px}.responsive-back .bi-arrow-left{font-size:28px}h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.responsive-action-button{position:fixed;bottom:15px;right:15px;z-index:100}\n"] }]
2044
- }], ctorParameters: () => [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.FormsService }, { type: i1$1.AuthService }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }, { type: i1$1.CmsService }, { type: i1$1.ToastService }, { type: i1$1.FileService }], propDecorators: { modelName: [{
2273
+ args: [{
2274
+ template: '',
2275
+ standalone: true,
2276
+ }]
2277
+ }], ctorParameters: () => [{ type: i1.CmsService }, { type: i1.ToastService }, { type: i2.Router }, { type: i2.ActivatedRoute }], propDecorators: { modelName: [{
2045
2278
  type: Input
2046
2279
  }], label: [{
2047
2280
  type: Input
@@ -2063,26 +2296,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2063
2296
  type: Output
2064
2297
  }] } });
2065
2298
 
2066
- /**
2067
- * Truncate string with ellipses
2068
- */
2069
- class EllipsesPipe {
2070
- transform(value, limit) {
2071
- if (!value) {
2072
- return null;
2073
- }
2074
- return value.length > limit ? value.substring(0, limit) + '...' : value;
2075
- }
2076
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: EllipsesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2077
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: EllipsesPipe, name: "baseEllipses" });
2078
- }
2079
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: EllipsesPipe, decorators: [{
2080
- type: Pipe,
2081
- args: [{
2082
- name: 'baseEllipses',
2083
- }]
2084
- }] });
2085
-
2086
2299
  class ModelTableComponent {
2087
2300
  graphQLMetaService;
2088
2301
  graphQLService;
@@ -2498,13 +2711,22 @@ class ModelTableComponent {
2498
2711
  this.storageService.save('pageIndex', this.selectedPageIndex);
2499
2712
  this.objects = await this.loadObjects(this.availableFields, this.pages[this.selectedPageIndex].skip, this.pages[this.selectedPageIndex].limit);
2500
2713
  }
2501
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelTableComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }, { token: i1$1.CmsService }, { token: i1$1.ToastService }, { token: i1$1.ScrollService }, { token: i1$1.StorageService }], target: i0.ɵɵFactoryTarget.Component });
2502
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ModelTableComponent, selector: "base-model-table", inputs: { modelName: "modelName", objectId: "objectId", createMode: "createMode", logging: "logging", create: "create", update: "update", delete: "delete", import: "import", export: "export", duplicate: "duplicate", modelConfig: "modelConfig", config: "config", showFavButton: "showFavButton" }, outputs: { idSelected: "idSelected", createModeChanged: "createModeChanged" }, viewQueries: [{ propertyName: "customFormTemplate", first: true, predicate: ["customFormTemplate"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!id && !createMode\">\n <div class=\"w-100 d-flex flex-row justify-content-between align-items-center mb-2 mb-lg-4\">\n <h2 id=\"model-table-top\" class=\"mb-0\" *ngIf=\"modelName\">\n {{\n modelConfig?.plural\n ? modelConfig?.plural\n : modelConfig?.label\n ? modelConfig?.label\n : capitalizeFirstLetter(camelModelName) + 's'\n }}\n </h2>\n <div class=\"d-flex align-items-center d-none d-lg-block\">\n <input #importFile type=\"file\" accept=\".json\" class=\"d-none\" (change)=\"processImport($event)\" />\n <div class=\"btn-group me-4\" *ngIf=\"import || export\">\n <i\n class=\"bi bi-three-dots-vertical\"\n id=\"settingsDropdown\"\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n data-bs-auto-close=\"true\"\n aria-expanded=\"false\"\n ></i>\n <ul class=\"dropdown-menu dropdown-menu-end\" aria-labelledby=\"settingsDropdown\">\n <li><a class=\"dropdown-item cursor-pointer\" *ngIf=\"export\" (click)=\"processExport()\">Export</a></li>\n <li><a class=\"dropdown-item cursor-pointer\" *ngIf=\"import\" (click)=\"importFile.click()\"> Import </a></li>\n </ul>\n </div>\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\" *ngIf=\"create\">Erstellen</button>\n </div>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"totalCount >= 0\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n <li class=\"page-item\" *ngFor=\"let page of pages; let i = index\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n\n <div\n class=\"table-responsive\"\n [ltContextMenu]=\"contextMenu\"\n [selectors]=\"'.object-col'\"\n #contextMenuData=\"contextMenuData\"\n >\n <table class=\"table table-hover bg-white d-none d-lg-table\">\n <thead>\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let field of availableFields\"\n [baseSort]=\"objects\"\n (baseSorted)=\"objects = $event\"\n data-order=\"desc\"\n [attr.data-name]=\"field\"\n >\n {{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"object-col\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <td class=\"cursor-pointer\" *ngFor=\"let field of availableFields\" (click)=\"selectId(object)\">\n <ng-container *ngIf=\"tableFields[field]?.dateFormat\">\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n </ng-container>\n\n <ng-container *ngIf=\"tableFields[field]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses : 60 }}\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"d-flex d-lg-none flex-column flex-grow-1\">\n <div class=\"table-card\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <div class=\"table-card-entry\" *ngFor=\"let field of availableFields; let i = index\" (click)=\"selectId(object)\">\n <b *ngIf=\"i > 0\"\n >{{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}:</b\n >\n <p [ngClass]=\"{ 'table-card-entry-first': i === 0 }\">\n <ng-container *ngIf=\"tableFields[field]?.dateFormat\">\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n </ng-container>\n\n <ng-container *ngIf=\"tableFields[field]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses : 60 }}\n </ng-container>\n </p>\n </div>\n </div>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"totalCount >= 0\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n <li class=\"page-item\" *ngFor=\"let page of pages; let i = index\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n\n <div class=\"context-menu\" #contextMenu>\n <div class=\"context-menu-item\" (click)=\"selectId({ id: contextMenuData.clickedElement?.id })\">Bearbeiten</div>\n <div class=\"context-menu-item\" (click)=\"openNewTab({ id: contextMenuData.clickedElement?.id })\">\n In neuen Tab \u00F6ffnen\n </div>\n <div class=\"context-menu-item\" *ngIf=\"duplicate\" (click)=\"duplicateObject(contextMenuData.clickedElement?.id)\">\n Duplizieren\n </div>\n <div class=\"context-menu-item\" *ngIf=\"delete\" (click)=\"deleteObject(contextMenuData.clickedElement?.id)\">\n L\u00F6schen\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"w-100\" *ngIf=\"id || createMode\">\n <button class=\"d-none d-lg-block btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n <base-model-form\n *ngIf=\"!modelConfig?.customTemplateComponent\"\n [modelName]=\"camelModelName\"\n [label]=\"modelConfig?.label\"\n [config]=\"config\"\n [logging]=\"logging\"\n [id]=\"id\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n [showFavButton]=\"showFavButton\"\n ></base-model-form>\n <ng-template *ngIf=\"modelConfig?.customTemplateComponent\" #customFormTemplate></ng-template>\n</div>\n\n<div class=\"responsive-action-button d-block d-lg-none\">\n <base-fab-button\n [fabIcon]=\"'bi-plus'\"\n (click)=\"createNewObject()\"\n *ngIf=\"!(id || createMode) && showFavButton\"\n ></base-fab-button>\n</div>\n", styles: [".cursor-pointer{cursor:pointer}.asc:after,.desc:after{border-style:solid;border-width:.2em .2em 0 0;content:\"\";display:inline-block;height:.45em;left:5px;position:relative;transform:rotate(-45deg);vertical-align:middle;width:.45em}.asc:after{transform:rotate(135deg)}td{vertical-align:middle}.bi,th{cursor:pointer;-webkit-user-select:none;user-select:none}.table>:not(:first-child){border-top:0}table{border-radius:.25rem;border-color:#e2e8f0!important}table thead{text-transform:uppercase;font-size:12px}table thead th{padding:12px 24px}table tbody tr td{font-weight:400!important;font-size:16px;padding:16px 24px}.context-menu{opacity:.01%;pointer-events:none;background-color:#fff;border:1px solid #ccc;box-shadow:1px 1px 10px #0000001a;padding:10px 0;position:fixed;top:0;left:0;width:200px;z-index:999}.context-menu-item{cursor:pointer;padding:8px 15px}.context-menu-item:hover{color:var(--bs-primary)}.table-card{background:var(--bs-white);padding:10px;margin-bottom:10px}.table-card-entry{margin-top:4px}.table-card-entry-first{font-size:18px;font-weight:800;color:var(--bs-primary)}.responsive-action-button{position:fixed;bottom:15px;right:15px}.bi-three-dots-vertical{font-size:18px;line-height:18px}.page-item{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: SortDirective, selector: "[baseSort]", inputs: ["baseSort"], outputs: ["baseSorted"] }, { kind: "directive", type: ContextMenuDirective, selector: "[ltContextMenu]", inputs: ["contextMenuData", "ltContextMenu", "xGap", "yGap", "overflowSpace", "selectors"], outputs: ["clickedElement"], exportAs: ["contextMenuData"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["id", "name", "infoText", "label", "placeholder", "objectPath", "control", "tabIndex", "required", "multiple", "search", "options"] }, { kind: "component", type: ModelFormComponent, selector: "base-model-form", inputs: ["modelName", "label", "id", "delete", "onlyUpdateMode", "duplicate", "logging", "config", "showFavButton"], outputs: ["finished"] }, { kind: "component", type: FabButtonComponent, selector: "base-fab-button", inputs: ["fabIcon", "buttons"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: EllipsesPipe, name: "baseEllipses" }] });
2714
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelTableComponent, deps: [{ token: i1.GraphQLMetaService }, { token: i1.GraphQLService }, { token: i1.CmsService }, { token: i1.ToastService }, { token: i1.ScrollService }, { token: i1.StorageService }], target: i0.ɵɵFactoryTarget.Component });
2715
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: ModelTableComponent, isStandalone: true, selector: "base-model-table", inputs: { modelName: "modelName", objectId: "objectId", createMode: "createMode", logging: "logging", create: "create", update: "update", delete: "delete", import: "import", export: "export", duplicate: "duplicate", modelConfig: "modelConfig", config: "config", showFavButton: "showFavButton" }, outputs: { idSelected: "idSelected", createModeChanged: "createModeChanged" }, viewQueries: [{ propertyName: "customFormTemplate", first: true, predicate: ["customFormTemplate"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "@if (!id && !createMode) {\n <div>\n <div class=\"w-100 d-flex flex-row justify-content-between align-items-center mb-2 mb-lg-4\">\n @if (modelName) {\n <h2 id=\"model-table-top\" class=\"mb-0\">\n {{\n modelConfig?.plural\n ? modelConfig?.plural\n : modelConfig?.label\n ? modelConfig?.label\n : capitalizeFirstLetter(camelModelName) + 's'\n }}\n </h2>\n }\n <div class=\"d-flex align-items-center d-none d-lg-block\">\n <input #importFile type=\"file\" accept=\".json\" class=\"d-none\" (change)=\"processImport($event)\" />\n @if (import || export) {\n <div class=\"btn-group me-4\">\n <i\n class=\"bi bi-three-dots-vertical\"\n id=\"settingsDropdown\"\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n data-bs-auto-close=\"true\"\n aria-expanded=\"false\"\n ></i>\n <ul class=\"dropdown-menu dropdown-menu-end\" aria-labelledby=\"settingsDropdown\">\n <li>@if (export) {\n <a class=\"dropdown-item cursor-pointer\" (click)=\"processExport()\">Export</a>\n }</li>\n <li>@if (import) {\n <a class=\"dropdown-item cursor-pointer\" (click)=\"importFile.click()\"> Import </a>\n }</li>\n </ul>\n </div>\n }\n @if (create) {\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\">Erstellen</button>\n }\n </div>\n </div>\n @if (totalCount >= 0) {\n <div class=\"container-fluid\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n @for (page of pages; track page; let i = $index) {\n <li class=\"page-item\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n }\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n }\n <div\n class=\"table-responsive\"\n [ltContextMenu]=\"contextMenu\"\n [selectors]=\"'.object-col'\"\n #contextMenuData=\"contextMenuData\"\n >\n <table class=\"table table-hover bg-white d-none d-lg-table\">\n <thead>\n <tr>\n @for (field of availableFields; track field) {\n <th\n scope=\"col\"\n [baseSort]=\"objects\"\n (baseSorted)=\"objects = $event\"\n data-order=\"desc\"\n [attr.data-name]=\"field\"\n >\n {{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (object of objects; track object) {\n <tr class=\"object-col\" [id]=\"object[uniqueField]\">\n @for (field of availableFields; track field) {\n <td class=\"cursor-pointer\" (click)=\"selectId(object)\">\n @if (tableFields[field]?.dateFormat) {\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n }\n @if (tableFields[field]?.enumValues) {\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n }\n @if (!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues) {\n {{ object[field] | baseEllipses : 60 }}\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n <div class=\"d-flex d-lg-none flex-column flex-grow-1\">\n @for (object of objects; track object) {\n <div class=\"table-card\" [id]=\"object[uniqueField]\">\n @for (field of availableFields; track field; let i = $index) {\n <div class=\"table-card-entry\" (click)=\"selectId(object)\">\n @if (i > 0) {\n <b\n >{{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}:</b\n >\n }\n <p [ngClass]=\"{ 'table-card-entry-first': i === 0 }\">\n @if (tableFields[field]?.dateFormat) {\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n }\n @if (tableFields[field]?.enumValues) {\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n }\n @if (!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues) {\n {{ object[field] | baseEllipses : 60 }}\n }\n </p>\n </div>\n }\n </div>\n }\n </div>\n @if (totalCount >= 0) {\n <div class=\"container-fluid\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n @for (page of pages; track page; let i = $index) {\n <li class=\"page-item\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n }\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n }\n <div class=\"context-menu\" #contextMenu>\n <div class=\"context-menu-item\" (click)=\"selectId({ id: contextMenuData.clickedElement?.id })\">Bearbeiten</div>\n <div class=\"context-menu-item\" (click)=\"openNewTab({ id: contextMenuData.clickedElement?.id })\">\n In neuen Tab \u00F6ffnen\n </div>\n @if (duplicate) {\n <div class=\"context-menu-item\" (click)=\"duplicateObject(contextMenuData.clickedElement?.id)\">\n Duplizieren\n </div>\n }\n @if (delete) {\n <div class=\"context-menu-item\" (click)=\"deleteObject(contextMenuData.clickedElement?.id)\">\n L\u00F6schen\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n @if (id || createMode) {\n <div class=\"w-100\">\n <button class=\"d-none d-lg-block btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n @if (!modelConfig?.customTemplateComponent) {\n <base-model-form\n [modelName]=\"camelModelName\"\n [label]=\"modelConfig?.label\"\n [config]=\"config\"\n [logging]=\"logging\"\n [id]=\"id\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n [showFavButton]=\"showFavButton\"\n ></base-model-form>\n }\n @if (modelConfig?.customTemplateComponent) {\n <ng-template #customFormTemplate></ng-template>\n }\n </div>\n }\n\n <div class=\"responsive-action-button d-block d-lg-none\">\n @if (!(id || createMode) && showFavButton) {\n <base-fab-button\n [fabIcon]=\"'bi-plus'\"\n (click)=\"createNewObject()\"\n ></base-fab-button>\n }\n </div>\n", styles: [".cursor-pointer{cursor:pointer}.asc:after,.desc:after{border-style:solid;border-width:.2em .2em 0 0;content:\"\";display:inline-block;height:.45em;left:5px;position:relative;transform:rotate(-45deg);vertical-align:middle;width:.45em}.asc:after{transform:rotate(135deg)}td{vertical-align:middle}.bi,th{cursor:pointer;-webkit-user-select:none;user-select:none}.table>:not(:first-child){border-top:0}table{border-radius:.25rem;border-color:#e2e8f0!important}table thead{text-transform:uppercase;font-size:12px}table thead th{padding:12px 24px}table tbody tr td{font-weight:400!important;font-size:16px;padding:16px 24px}.context-menu{opacity:.01%;pointer-events:none;background-color:#fff;border:1px solid #ccc;box-shadow:1px 1px 10px #0000001a;padding:10px 0;position:fixed;top:0;left:0;width:200px;z-index:999}.context-menu-item{cursor:pointer;padding:8px 15px}.context-menu-item:hover{color:var(--bs-primary)}.table-card{background:var(--bs-white);padding:10px;margin-bottom:10px}.table-card-entry{margin-top:4px}.table-card-entry-first{font-size:18px;font-weight:800;color:var(--bs-primary)}.responsive-action-button{position:fixed;bottom:15px;right:15px}.bi-three-dots-vertical{font-size:18px;line-height:18px}.page-item{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["id", "name", "infoText", "label", "placeholder", "objectPath", "control", "tabIndex", "required", "multiple", "search", "options"] }, { kind: "directive", type: ContextMenuDirective, selector: "[ltContextMenu]", inputs: ["contextMenuData", "ltContextMenu", "xGap", "yGap", "overflowSpace", "selectors"], outputs: ["clickedElement"], exportAs: ["contextMenuData"] }, { kind: "directive", type: SortDirective, selector: "[baseSort]", inputs: ["baseSort"], outputs: ["baseSorted"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: EllipsesPipe, name: "baseEllipses" }, { kind: "component", type: ModelFormComponent, selector: "base-model-form", inputs: ["modelName", "label", "id", "delete", "onlyUpdateMode", "duplicate", "logging", "config", "showFavButton"], outputs: ["finished"] }, { kind: "component", type: FabButtonComponent, selector: "base-fab-button", inputs: ["fabIcon", "buttons"] }] });
2503
2716
  }
2504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelTableComponent, decorators: [{
2717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ModelTableComponent, decorators: [{
2505
2718
  type: Component,
2506
- args: [{ selector: 'base-model-table', template: "<div *ngIf=\"!id && !createMode\">\n <div class=\"w-100 d-flex flex-row justify-content-between align-items-center mb-2 mb-lg-4\">\n <h2 id=\"model-table-top\" class=\"mb-0\" *ngIf=\"modelName\">\n {{\n modelConfig?.plural\n ? modelConfig?.plural\n : modelConfig?.label\n ? modelConfig?.label\n : capitalizeFirstLetter(camelModelName) + 's'\n }}\n </h2>\n <div class=\"d-flex align-items-center d-none d-lg-block\">\n <input #importFile type=\"file\" accept=\".json\" class=\"d-none\" (change)=\"processImport($event)\" />\n <div class=\"btn-group me-4\" *ngIf=\"import || export\">\n <i\n class=\"bi bi-three-dots-vertical\"\n id=\"settingsDropdown\"\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n data-bs-auto-close=\"true\"\n aria-expanded=\"false\"\n ></i>\n <ul class=\"dropdown-menu dropdown-menu-end\" aria-labelledby=\"settingsDropdown\">\n <li><a class=\"dropdown-item cursor-pointer\" *ngIf=\"export\" (click)=\"processExport()\">Export</a></li>\n <li><a class=\"dropdown-item cursor-pointer\" *ngIf=\"import\" (click)=\"importFile.click()\"> Import </a></li>\n </ul>\n </div>\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\" *ngIf=\"create\">Erstellen</button>\n </div>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"totalCount >= 0\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n <li class=\"page-item\" *ngFor=\"let page of pages; let i = index\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n\n <div\n class=\"table-responsive\"\n [ltContextMenu]=\"contextMenu\"\n [selectors]=\"'.object-col'\"\n #contextMenuData=\"contextMenuData\"\n >\n <table class=\"table table-hover bg-white d-none d-lg-table\">\n <thead>\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let field of availableFields\"\n [baseSort]=\"objects\"\n (baseSorted)=\"objects = $event\"\n data-order=\"desc\"\n [attr.data-name]=\"field\"\n >\n {{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"object-col\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <td class=\"cursor-pointer\" *ngFor=\"let field of availableFields\" (click)=\"selectId(object)\">\n <ng-container *ngIf=\"tableFields[field]?.dateFormat\">\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n </ng-container>\n\n <ng-container *ngIf=\"tableFields[field]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses : 60 }}\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"d-flex d-lg-none flex-column flex-grow-1\">\n <div class=\"table-card\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <div class=\"table-card-entry\" *ngFor=\"let field of availableFields; let i = index\" (click)=\"selectId(object)\">\n <b *ngIf=\"i > 0\"\n >{{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}:</b\n >\n <p [ngClass]=\"{ 'table-card-entry-first': i === 0 }\">\n <ng-container *ngIf=\"tableFields[field]?.dateFormat\">\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n </ng-container>\n\n <ng-container *ngIf=\"tableFields[field]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses : 60 }}\n </ng-container>\n </p>\n </div>\n </div>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"totalCount >= 0\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n <li class=\"page-item\" *ngFor=\"let page of pages; let i = index\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n\n <div class=\"context-menu\" #contextMenu>\n <div class=\"context-menu-item\" (click)=\"selectId({ id: contextMenuData.clickedElement?.id })\">Bearbeiten</div>\n <div class=\"context-menu-item\" (click)=\"openNewTab({ id: contextMenuData.clickedElement?.id })\">\n In neuen Tab \u00F6ffnen\n </div>\n <div class=\"context-menu-item\" *ngIf=\"duplicate\" (click)=\"duplicateObject(contextMenuData.clickedElement?.id)\">\n Duplizieren\n </div>\n <div class=\"context-menu-item\" *ngIf=\"delete\" (click)=\"deleteObject(contextMenuData.clickedElement?.id)\">\n L\u00F6schen\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"w-100\" *ngIf=\"id || createMode\">\n <button class=\"d-none d-lg-block btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n <base-model-form\n *ngIf=\"!modelConfig?.customTemplateComponent\"\n [modelName]=\"camelModelName\"\n [label]=\"modelConfig?.label\"\n [config]=\"config\"\n [logging]=\"logging\"\n [id]=\"id\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n [showFavButton]=\"showFavButton\"\n ></base-model-form>\n <ng-template *ngIf=\"modelConfig?.customTemplateComponent\" #customFormTemplate></ng-template>\n</div>\n\n<div class=\"responsive-action-button d-block d-lg-none\">\n <base-fab-button\n [fabIcon]=\"'bi-plus'\"\n (click)=\"createNewObject()\"\n *ngIf=\"!(id || createMode) && showFavButton\"\n ></base-fab-button>\n</div>\n", styles: [".cursor-pointer{cursor:pointer}.asc:after,.desc:after{border-style:solid;border-width:.2em .2em 0 0;content:\"\";display:inline-block;height:.45em;left:5px;position:relative;transform:rotate(-45deg);vertical-align:middle;width:.45em}.asc:after{transform:rotate(135deg)}td{vertical-align:middle}.bi,th{cursor:pointer;-webkit-user-select:none;user-select:none}.table>:not(:first-child){border-top:0}table{border-radius:.25rem;border-color:#e2e8f0!important}table thead{text-transform:uppercase;font-size:12px}table thead th{padding:12px 24px}table tbody tr td{font-weight:400!important;font-size:16px;padding:16px 24px}.context-menu{opacity:.01%;pointer-events:none;background-color:#fff;border:1px solid #ccc;box-shadow:1px 1px 10px #0000001a;padding:10px 0;position:fixed;top:0;left:0;width:200px;z-index:999}.context-menu-item{cursor:pointer;padding:8px 15px}.context-menu-item:hover{color:var(--bs-primary)}.table-card{background:var(--bs-white);padding:10px;margin-bottom:10px}.table-card-entry{margin-top:4px}.table-card-entry-first{font-size:18px;font-weight:800;color:var(--bs-primary)}.responsive-action-button{position:fixed;bottom:15px;right:15px}.bi-three-dots-vertical{font-size:18px;line-height:18px}.page-item{cursor:pointer}\n"] }]
2507
- }], ctorParameters: () => [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.CmsService }, { type: i1$1.ToastService }, { type: i1$1.ScrollService }, { type: i1$1.StorageService }], propDecorators: { modelName: [{
2719
+ args: [{ selector: 'base-model-table', standalone: true, imports: [
2720
+ NgClass,
2721
+ SelectComponent,
2722
+ ContextMenuDirective,
2723
+ SortDirective,
2724
+ DatePipe,
2725
+ EllipsesPipe,
2726
+ ModelFormComponent,
2727
+ FabButtonComponent,
2728
+ ], template: "@if (!id && !createMode) {\n <div>\n <div class=\"w-100 d-flex flex-row justify-content-between align-items-center mb-2 mb-lg-4\">\n @if (modelName) {\n <h2 id=\"model-table-top\" class=\"mb-0\">\n {{\n modelConfig?.plural\n ? modelConfig?.plural\n : modelConfig?.label\n ? modelConfig?.label\n : capitalizeFirstLetter(camelModelName) + 's'\n }}\n </h2>\n }\n <div class=\"d-flex align-items-center d-none d-lg-block\">\n <input #importFile type=\"file\" accept=\".json\" class=\"d-none\" (change)=\"processImport($event)\" />\n @if (import || export) {\n <div class=\"btn-group me-4\">\n <i\n class=\"bi bi-three-dots-vertical\"\n id=\"settingsDropdown\"\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n data-bs-auto-close=\"true\"\n aria-expanded=\"false\"\n ></i>\n <ul class=\"dropdown-menu dropdown-menu-end\" aria-labelledby=\"settingsDropdown\">\n <li>@if (export) {\n <a class=\"dropdown-item cursor-pointer\" (click)=\"processExport()\">Export</a>\n }</li>\n <li>@if (import) {\n <a class=\"dropdown-item cursor-pointer\" (click)=\"importFile.click()\"> Import </a>\n }</li>\n </ul>\n </div>\n }\n @if (create) {\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\">Erstellen</button>\n }\n </div>\n </div>\n @if (totalCount >= 0) {\n <div class=\"container-fluid\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n @for (page of pages; track page; let i = $index) {\n <li class=\"page-item\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n }\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n }\n <div\n class=\"table-responsive\"\n [ltContextMenu]=\"contextMenu\"\n [selectors]=\"'.object-col'\"\n #contextMenuData=\"contextMenuData\"\n >\n <table class=\"table table-hover bg-white d-none d-lg-table\">\n <thead>\n <tr>\n @for (field of availableFields; track field) {\n <th\n scope=\"col\"\n [baseSort]=\"objects\"\n (baseSorted)=\"objects = $event\"\n data-order=\"desc\"\n [attr.data-name]=\"field\"\n >\n {{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (object of objects; track object) {\n <tr class=\"object-col\" [id]=\"object[uniqueField]\">\n @for (field of availableFields; track field) {\n <td class=\"cursor-pointer\" (click)=\"selectId(object)\">\n @if (tableFields[field]?.dateFormat) {\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n }\n @if (tableFields[field]?.enumValues) {\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n }\n @if (!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues) {\n {{ object[field] | baseEllipses : 60 }}\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n <div class=\"d-flex d-lg-none flex-column flex-grow-1\">\n @for (object of objects; track object) {\n <div class=\"table-card\" [id]=\"object[uniqueField]\">\n @for (field of availableFields; track field; let i = $index) {\n <div class=\"table-card-entry\" (click)=\"selectId(object)\">\n @if (i > 0) {\n <b\n >{{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}:</b\n >\n }\n <p [ngClass]=\"{ 'table-card-entry-first': i === 0 }\">\n @if (tableFields[field]?.dateFormat) {\n {{ object[field] | date : tableFields[field]?.dateFormat }} Uhr\n }\n @if (tableFields[field]?.enumValues) {\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n }\n @if (!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues) {\n {{ object[field] | baseEllipses : 60 }}\n }\n </p>\n </div>\n }\n </div>\n }\n </div>\n @if (totalCount >= 0) {\n <div class=\"container-fluid\">\n <nav class=\"d-flex row\">\n <div class=\"col-12 col-md-2\"></div>\n <ul class=\"pagination justify-content-center col-12 col-md-8\">\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex - 1)\"\n aria-label=\"Previous\"\n [ngClass]=\"{ disabled: selectedPageIndex - 1 > 0 }\"\n >\n <span aria-hidden=\"true\">&laquo;</span>\n </a>\n </li>\n @for (page of pages; track page; let i = $index) {\n <li class=\"page-item\">\n <a class=\"page-link\" [ngClass]=\"{ active: selectedPageIndex === i }\" (click)=\"selectPage(i)\">{{ i + 1 }}</a>\n </li>\n }\n <li class=\"page-item\">\n <a\n class=\"page-link\"\n (click)=\"selectPage(selectedPageIndex + 1)\"\n aria-label=\"Next\"\n [ngClass]=\"{ disabled: pages[selectedPageIndex + 1] }\"\n >\n <span aria-hidden=\"true\">&raquo;</span>\n </a>\n </li>\n </ul>\n <div class=\"col-12 col-md-2\">\n <base-select [options]=\"pageOptions\" [control]=\"pageItemsLimitControl\"></base-select>\n </div>\n </nav>\n </div>\n }\n <div class=\"context-menu\" #contextMenu>\n <div class=\"context-menu-item\" (click)=\"selectId({ id: contextMenuData.clickedElement?.id })\">Bearbeiten</div>\n <div class=\"context-menu-item\" (click)=\"openNewTab({ id: contextMenuData.clickedElement?.id })\">\n In neuen Tab \u00F6ffnen\n </div>\n @if (duplicate) {\n <div class=\"context-menu-item\" (click)=\"duplicateObject(contextMenuData.clickedElement?.id)\">\n Duplizieren\n </div>\n }\n @if (delete) {\n <div class=\"context-menu-item\" (click)=\"deleteObject(contextMenuData.clickedElement?.id)\">\n L\u00F6schen\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n @if (id || createMode) {\n <div class=\"w-100\">\n <button class=\"d-none d-lg-block btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n @if (!modelConfig?.customTemplateComponent) {\n <base-model-form\n [modelName]=\"camelModelName\"\n [label]=\"modelConfig?.label\"\n [config]=\"config\"\n [logging]=\"logging\"\n [id]=\"id\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n [showFavButton]=\"showFavButton\"\n ></base-model-form>\n }\n @if (modelConfig?.customTemplateComponent) {\n <ng-template #customFormTemplate></ng-template>\n }\n </div>\n }\n\n <div class=\"responsive-action-button d-block d-lg-none\">\n @if (!(id || createMode) && showFavButton) {\n <base-fab-button\n [fabIcon]=\"'bi-plus'\"\n (click)=\"createNewObject()\"\n ></base-fab-button>\n }\n </div>\n", styles: [".cursor-pointer{cursor:pointer}.asc:after,.desc:after{border-style:solid;border-width:.2em .2em 0 0;content:\"\";display:inline-block;height:.45em;left:5px;position:relative;transform:rotate(-45deg);vertical-align:middle;width:.45em}.asc:after{transform:rotate(135deg)}td{vertical-align:middle}.bi,th{cursor:pointer;-webkit-user-select:none;user-select:none}.table>:not(:first-child){border-top:0}table{border-radius:.25rem;border-color:#e2e8f0!important}table thead{text-transform:uppercase;font-size:12px}table thead th{padding:12px 24px}table tbody tr td{font-weight:400!important;font-size:16px;padding:16px 24px}.context-menu{opacity:.01%;pointer-events:none;background-color:#fff;border:1px solid #ccc;box-shadow:1px 1px 10px #0000001a;padding:10px 0;position:fixed;top:0;left:0;width:200px;z-index:999}.context-menu-item{cursor:pointer;padding:8px 15px}.context-menu-item:hover{color:var(--bs-primary)}.table-card{background:var(--bs-white);padding:10px;margin-bottom:10px}.table-card-entry{margin-top:4px}.table-card-entry-first{font-size:18px;font-weight:800;color:var(--bs-primary)}.responsive-action-button{position:fixed;bottom:15px;right:15px}.bi-three-dots-vertical{font-size:18px;line-height:18px}.page-item{cursor:pointer}\n"] }]
2729
+ }], ctorParameters: () => [{ type: i1.GraphQLMetaService }, { type: i1.GraphQLService }, { type: i1.CmsService }, { type: i1.ToastService }, { type: i1.ScrollService }, { type: i1.StorageService }], propDecorators: { modelName: [{
2508
2730
  type: Input
2509
2731
  }], objectId: [{
2510
2732
  type: Input
@@ -2618,13 +2840,16 @@ class ChangePasswordComponent {
2618
2840
  },
2619
2841
  });
2620
2842
  }
2621
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1$1.FormsService }, { token: i1$1.UserService }, { token: i1$1.AuthService }, { token: i1$1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
2622
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ChangePasswordComponent, selector: "base-change-password", ngImport: i0, template: "<h3>Passwort \u00E4ndern</h3>\n\n<form [formGroup]=\"form\">\n <base-input\n [id]=\"'Aktuelles Passwort'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('current')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password'\"\n [label]=\"'Neues Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Neues Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"3\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"submit()\" *ngIf=\"!loading\">Passwort \u00E4ndern</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required", "eyeButton", "objectPath"], outputs: ["enter"] }] });
2843
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1.FormsService }, { token: i1.UserService }, { token: i1.AuthService }, { token: i1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
2844
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: ChangePasswordComponent, isStandalone: true, selector: "base-change-password", ngImport: i0, template: "<h3>Passwort \u00E4ndern</h3>\n\n<form [formGroup]=\"form\">\n <base-input\n [id]=\"'Aktuelles Passwort'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('current')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password'\"\n [label]=\"'Neues Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Neues Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"3\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n @if (!loading) {\n <button class=\"btn btn-primary\" (click)=\"submit()\">Passwort \u00E4ndern</button>\n }\n @if (loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n }\n </div>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "infoText", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required", "eyeButton", "objectPath"], outputs: ["enter"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
2623
2845
  }
2624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ChangePasswordComponent, decorators: [{
2846
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ChangePasswordComponent, decorators: [{
2625
2847
  type: Component,
2626
- args: [{ selector: 'base-change-password', template: "<h3>Passwort \u00E4ndern</h3>\n\n<form [formGroup]=\"form\">\n <base-input\n [id]=\"'Aktuelles Passwort'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('current')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password'\"\n [label]=\"'Neues Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Neues Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"3\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"submit()\" *ngIf=\"!loading\">Passwort \u00E4ndern</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</form>\n" }]
2627
- }], ctorParameters: () => [{ type: i1$1.FormsService }, { type: i1$1.UserService }, { type: i1$1.AuthService }, { type: i1$1.ToastService }] });
2848
+ args: [{ selector: 'base-change-password', standalone: true, imports: [
2849
+ InputComponent,
2850
+ ReactiveFormsModule
2851
+ ], template: "<h3>Passwort \u00E4ndern</h3>\n\n<form [formGroup]=\"form\">\n <base-input\n [id]=\"'Aktuelles Passwort'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('current')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password'\"\n [label]=\"'Neues Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Neues Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"3\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n @if (!loading) {\n <button class=\"btn btn-primary\" (click)=\"submit()\">Passwort \u00E4ndern</button>\n }\n @if (loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n }\n </div>\n </div>\n</form>\n" }]
2852
+ }], ctorParameters: () => [{ type: i1.FormsService }, { type: i1.UserService }, { type: i1.AuthService }, { type: i1.ToastService }] });
2628
2853
 
2629
2854
  class DeleteAccountComponent {
2630
2855
  userService;
@@ -2670,278 +2895,24 @@ class DeleteAccountComponent {
2670
2895
  },
2671
2896
  });
2672
2897
  }
2673
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DeleteAccountComponent, deps: [{ token: i1$1.UserService }, { token: i1$1.AuthService }, { token: i1$1.ToastService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component });
2674
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: DeleteAccountComponent, selector: "base-delete-account", inputs: { description: "description" }, ngImport: i0, template: "<div>\n <h3>Konto l\u00F6schen</h3>\n\n <p>{{ description }}</p>\n\n <div class=\"d-flex justify-content-end mt-3\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"deleteAccount()\" *ngIf=\"!loading\">Konto l\u00F6schen</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2675
- }
2676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DeleteAccountComponent, decorators: [{
2677
- type: Component,
2678
- args: [{ selector: 'base-delete-account', template: "<div>\n <h3>Konto l\u00F6schen</h3>\n\n <p>{{ description }}</p>\n\n <div class=\"d-flex justify-content-end mt-3\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"deleteAccount()\" *ngIf=\"!loading\">Konto l\u00F6schen</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</div>\n" }]
2679
- }], ctorParameters: () => [{ type: i1$1.UserService }, { type: i1$1.AuthService }, { type: i1$1.ToastService }, { type: i2$1.Router }], propDecorators: { description: [{
2680
- type: Input
2681
- }] } });
2682
-
2683
- class BackButtonDirective {
2684
- navigation;
2685
- constructor(navigation) {
2686
- this.navigation = navigation;
2687
- }
2688
- onClick() {
2689
- this.navigation.back();
2690
- }
2691
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BackButtonDirective, deps: [{ token: i1$1.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
2692
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: BackButtonDirective, selector: "[baseBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
2693
- }
2694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BackButtonDirective, decorators: [{
2695
- type: Directive,
2696
- args: [{
2697
- selector: '[baseBackButton]',
2698
- }]
2699
- }], ctorParameters: () => [{ type: i1$1.NavigationService }], propDecorators: { onClick: [{
2700
- type: HostListener,
2701
- args: ['click']
2702
- }] } });
2703
-
2704
- // Modules
2705
- const imports = [FormsModule, ReactiveFormsModule, CommonModule, RouterModule, ImageCropperModule];
2706
- // Imported and exported elements
2707
- const elements = [
2708
- // Directives
2709
- SortDirective,
2710
- BackButtonDirective,
2711
- ContextMenuDirective,
2712
- StopPropagationDirective,
2713
- // Components
2714
- InputComponent,
2715
- SelectComponent,
2716
- CheckboxComponent,
2717
- TextareaComponent,
2718
- ToastComponent,
2719
- TagsComponent,
2720
- LoadingBarComponent,
2721
- SkeletonLoaderComponent,
2722
- BreadcrumbComponent,
2723
- ModelFormComponent,
2724
- ModelTableComponent,
2725
- ModelFormSubComponent,
2726
- UploadImageComponent,
2727
- RefenceInputComponent,
2728
- ChangePasswordComponent,
2729
- DeleteAccountComponent,
2730
- FabButtonComponent,
2731
- // Pipes
2732
- EllipsesPipe,
2733
- ];
2734
- class BaseComponentsModule {
2735
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BaseComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2736
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: BaseComponentsModule, declarations: [
2737
- // Directives
2738
- SortDirective,
2739
- BackButtonDirective,
2740
- ContextMenuDirective,
2741
- StopPropagationDirective,
2742
- // Components
2743
- InputComponent,
2744
- SelectComponent,
2745
- CheckboxComponent,
2746
- TextareaComponent,
2747
- ToastComponent,
2748
- TagsComponent,
2749
- LoadingBarComponent,
2750
- SkeletonLoaderComponent,
2751
- BreadcrumbComponent,
2752
- ModelFormComponent,
2753
- ModelTableComponent,
2754
- ModelFormSubComponent,
2755
- UploadImageComponent,
2756
- RefenceInputComponent,
2757
- ChangePasswordComponent,
2758
- DeleteAccountComponent,
2759
- FabButtonComponent,
2760
- // Pipes
2761
- EllipsesPipe], imports: [FormsModule, ReactiveFormsModule, CommonModule, RouterModule, ImageCropperModule], exports: [
2762
- // Directives
2763
- SortDirective,
2764
- BackButtonDirective,
2765
- ContextMenuDirective,
2766
- StopPropagationDirective,
2767
- // Components
2768
- InputComponent,
2769
- SelectComponent,
2770
- CheckboxComponent,
2771
- TextareaComponent,
2772
- ToastComponent,
2773
- TagsComponent,
2774
- LoadingBarComponent,
2775
- SkeletonLoaderComponent,
2776
- BreadcrumbComponent,
2777
- ModelFormComponent,
2778
- ModelTableComponent,
2779
- ModelFormSubComponent,
2780
- UploadImageComponent,
2781
- RefenceInputComponent,
2782
- ChangePasswordComponent,
2783
- DeleteAccountComponent,
2784
- FabButtonComponent,
2785
- // Pipes
2786
- EllipsesPipe] });
2787
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BaseComponentsModule, imports: [imports] });
2788
- }
2789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: BaseComponentsModule, decorators: [{
2790
- type: NgModule,
2791
- args: [{
2792
- declarations: elements,
2793
- imports,
2794
- exports: elements,
2795
- }]
2796
- }] });
2797
-
2798
- /**
2799
- * Abstract Component for inputs and outputs only
2800
- *
2801
- * Hint for handling extensions of this component in project:
2802
- * If you want to use complete custom services and methods, extend ModelFormComponent instead of ModelFormBaseComponent
2803
- */
2804
- class ModelFormBaseComponent {
2805
- cmsService;
2806
- toastService;
2807
- router;
2808
- route;
2809
- modelName;
2810
- label;
2811
- id;
2812
- delete = true;
2813
- onlyUpdateMode = false;
2814
- duplicate = false;
2815
- logging = false;
2816
- config = null;
2817
- showFavButton = true;
2818
- finished = new EventEmitter();
2819
- fabButtons = [];
2820
- operation;
2821
- constructor(cmsService, toastService, router, route) {
2822
- this.cmsService = cmsService;
2823
- this.toastService = toastService;
2824
- this.router = router;
2825
- this.route = route;
2826
- }
2827
- ngOnInit() {
2828
- this.initFabActions();
2829
- }
2830
- /**
2831
- * Init fab buttons for mobile devices
2832
- */
2833
- initFabActions() {
2834
- const saveEvent = new EventEmitter();
2835
- this.fabButtons.push({ icon: 'bi-check-lg', color: 'var(--bs-success)', event: saveEvent });
2836
- saveEvent.subscribe(() => this.submit());
2837
- if (this.duplicate && this.operation === 'update') {
2838
- const event = new EventEmitter();
2839
- this.fabButtons.push({ icon: 'bi-back', color: 'var(--bs-info)', event });
2840
- event.subscribe(() => this.duplicateObject());
2841
- }
2842
- if (this.operation === 'update' && this.delete) {
2843
- const event = new EventEmitter();
2844
- this.fabButtons.push({ icon: 'bi-trash3', color: 'var(--bs-danger)', event });
2845
- event.subscribe(() => this.deleteObject());
2846
- }
2847
- }
2848
- submit() { }
2849
- /**
2850
- * It calls the graphQLService to delete the object with the id of the object that is currently being edited
2851
- */
2852
- deleteObject() {
2853
- this.cmsService.deleteObject(this.id, this.modelName).then(() => {
2854
- this.toastService.show({
2855
- id: this.modelName + '-success',
2856
- type: ToastType.SUCCESS,
2857
- title: 'Erfolgreich',
2858
- description: this.label + ' wurde erfolgreich gelöscht.',
2859
- });
2860
- this.finished.emit(null);
2861
- });
2862
- }
2863
- /**
2864
- * It sends a GraphQL mutation to the server to duplicate the object
2865
- */
2866
- async duplicateObject() {
2867
- this.cmsService.duplicateObject(this.id, this.modelName).then(async (value) => {
2868
- if (value?.id) {
2869
- await this.router.navigate(['../'], { relativeTo: this.route });
2870
- this.toastService.show({
2871
- id: this.modelName + '-success',
2872
- type: ToastType.SUCCESS,
2873
- title: 'Erfolgreich',
2874
- description: this.label + ' wurde erfolgreich dupliziert.',
2875
- });
2876
- }
2877
- else {
2878
- this.finished.emit(null);
2879
- }
2880
- });
2881
- }
2882
- /**
2883
- * It takes a string, capitalizes the first letter, and returns the modified string
2884
- *
2885
- * @param value - The string to capitalize.
2886
- * @returns The first letter of the string is being capitalized and the rest of the string is being returned.
2887
- */
2888
- capitalizeFirstLetter(value) {
2889
- return this.cmsService.capitalizeFirstLetter(value);
2890
- }
2891
- /**
2892
- * It takes an AbstractControl and returns a FormControl
2893
- *
2894
- * @param control - AbstractControl | null | undefined
2895
- * @returns A FormControl
2896
- */
2897
- transformToControl(control) {
2898
- return control;
2899
- }
2900
- formatDate(date) {
2901
- if (!date) {
2902
- return null;
2903
- }
2904
- const newDate = new Date(date);
2905
- return newDate.toISOString().substring(0, 16);
2906
- }
2907
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelFormBaseComponent, deps: [{ token: i1$1.CmsService }, { token: i1$1.ToastService }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2908
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ModelFormBaseComponent, selector: "ng-component", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", onlyUpdateMode: "onlyUpdateMode", duplicate: "duplicate", logging: "logging", config: "config", showFavButton: "showFavButton" }, outputs: { finished: "finished" }, ngImport: i0, template: '', isInline: true });
2898
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: DeleteAccountComponent, deps: [{ token: i1.UserService }, { token: i1.AuthService }, { token: i1.ToastService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
2899
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: DeleteAccountComponent, isStandalone: true, selector: "base-delete-account", inputs: { description: "description" }, ngImport: i0, template: "<div>\n <h3>Konto l\u00F6schen</h3>\n\n <p>{{ description }}</p>\n\n <div class=\"d-flex justify-content-end mt-3\">\n <div>\n @if (!loading) {\n <button class=\"btn btn-primary\" (click)=\"deleteAccount()\">Konto l\u00F6schen</button>\n }\n @if (loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n }\n </div>\n </div>\n</div>\n", styles: [""] });
2909
2900
  }
2910
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ModelFormBaseComponent, decorators: [{
2901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: DeleteAccountComponent, decorators: [{
2911
2902
  type: Component,
2912
- args: [{
2913
- template: '',
2914
- }]
2915
- }], ctorParameters: () => [{ type: i1$1.CmsService }, { type: i1$1.ToastService }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }], propDecorators: { modelName: [{
2916
- type: Input
2917
- }], label: [{
2903
+ args: [{ selector: 'base-delete-account', standalone: true, template: "<div>\n <h3>Konto l\u00F6schen</h3>\n\n <p>{{ description }}</p>\n\n <div class=\"d-flex justify-content-end mt-3\">\n <div>\n @if (!loading) {\n <button class=\"btn btn-primary\" (click)=\"deleteAccount()\">Konto l\u00F6schen</button>\n }\n @if (loading) {\n <button class=\"btn btn-primary\" type=\"button\" disabled>\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n }\n </div>\n </div>\n</div>\n" }]
2904
+ }], ctorParameters: () => [{ type: i1.UserService }, { type: i1.AuthService }, { type: i1.ToastService }, { type: i2.Router }], propDecorators: { description: [{
2918
2905
  type: Input
2919
- }], id: [{
2920
- type: Input
2921
- }], delete: [{
2922
- type: Input
2923
- }], onlyUpdateMode: [{
2924
- type: Input
2925
- }], duplicate: [{
2926
- type: Input
2927
- }], logging: [{
2928
- type: Input
2929
- }], config: [{
2930
- type: Input
2931
- }], showFavButton: [{
2932
- type: Input
2933
- }], finished: [{
2934
- type: Output
2935
2906
  }] } });
2936
2907
 
2937
2908
  /**
2938
2909
  * Exports for public API
2939
2910
  */
2940
- // Module
2911
+ // Directives
2941
2912
 
2942
2913
  /**
2943
2914
  * Generated bundle index. Do not edit.
2944
2915
  */
2945
2916
 
2946
- export { BackButtonDirective, BaseComponentsModule, BreadcrumbComponent, ChangePasswordComponent, CheckboxComponent, ContextMenuDirective, DeleteAccountComponent, EllipsesPipe, FabButtonComponent, InputComponent, LoadingBarComponent, ModelFormBaseComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, StopPropagationDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
2917
+ export { BackButtonDirective, BreadcrumbComponent, ChangePasswordComponent, CheckboxComponent, ContextMenuDirective, DeleteAccountComponent, EllipsesPipe, FabButtonComponent, InputComponent, LoadingBarComponent, ModelFormBaseComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, StopPropagationDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
2947
2918
  //# sourceMappingURL=lenne.tech-ng-base-base-components.mjs.map