@devopmaat/badaboom 1.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 (231) hide show
  1. package/README.md +3 -0
  2. package/_index.scss +1 -0
  3. package/esm2022/devopmaat-badaboom.mjs +5 -0
  4. package/esm2022/lib/application/common/bdb-data-source.mjs +42 -0
  5. package/esm2022/lib/application/common/paginator/bdb-paginator.component.mjs +37 -0
  6. package/esm2022/lib/application/common/query-input/bdb-query-input.component.mjs +45 -0
  7. package/esm2022/lib/application/common/search/bdb-search-wrapper.component.mjs +33 -0
  8. package/esm2022/lib/application/common/search/bdb-search.component.mjs +163 -0
  9. package/esm2022/lib/application/common/table/bdb-cell.directive.mjs +20 -0
  10. package/esm2022/lib/application/common/table/bdb-column-builder.mjs +94 -0
  11. package/esm2022/lib/application/common/table/bdb-column-options.mjs +2 -0
  12. package/esm2022/lib/application/common/table/bdb-column-type.mjs +12 -0
  13. package/esm2022/lib/application/common/table/bdb-column.mjs +2 -0
  14. package/esm2022/lib/application/common/table/bdb-context-action.mjs +2 -0
  15. package/esm2022/lib/application/common/table/bdb-table.component.mjs +193 -0
  16. package/esm2022/lib/application/common/table/dynamic.pipe.mjs +26 -0
  17. package/esm2022/lib/application/exception-log/exception-log-table/exception-log-table.component.mjs +49 -0
  18. package/esm2022/lib/application/task-log/task-log-outcome.pipe.mjs +31 -0
  19. package/esm2022/lib/application/task-log/task-log-status.pipe.mjs +29 -0
  20. package/esm2022/lib/application/task-log-parameter/task-log-parameter-value.pipe.mjs +49 -0
  21. package/esm2022/lib/application/user/user-table/user-table.component.mjs +68 -0
  22. package/esm2022/lib/bdb-auth-options.mjs +39 -0
  23. package/esm2022/lib/bdb-options.mjs +25 -0
  24. package/esm2022/lib/common/alert/bdb-alert.component.mjs +40 -0
  25. package/esm2022/lib/common/alert-error-response/bdb-alert-error-response.component.mjs +107 -0
  26. package/esm2022/lib/common/bdb-flex-child.directive.mjs +24 -0
  27. package/esm2022/lib/common/bdb-flex.directive.mjs +112 -0
  28. package/esm2022/lib/common/bdb-form-error.directive.mjs +74 -0
  29. package/esm2022/lib/common/bdb-grid-child.directive.mjs +81 -0
  30. package/esm2022/lib/common/bdb-grid.directive.mjs +107 -0
  31. package/esm2022/lib/common/bdb-palette.mjs +2 -0
  32. package/esm2022/lib/common/boolean-display/bdb-boolean-display.component.mjs +23 -0
  33. package/esm2022/lib/common/color.mjs +26 -0
  34. package/esm2022/lib/common/constructor.mjs +2 -0
  35. package/esm2022/lib/common/field/bdb-field.component.mjs +17 -0
  36. package/esm2022/lib/common/function.pipe.mjs +20 -0
  37. package/esm2022/lib/common/layout-error.mjs +6 -0
  38. package/esm2022/lib/common/linked-list.mjs +53 -0
  39. package/esm2022/lib/domain/auth/account-info.mjs +2 -0
  40. package/esm2022/lib/domain/auth/account.service.mjs +32 -0
  41. package/esm2022/lib/domain/auth/auth.service.mjs +119 -0
  42. package/esm2022/lib/domain/auth/reset-password-token.mjs +2 -0
  43. package/esm2022/lib/domain/auth/token-expired.interceptor.mjs +21 -0
  44. package/esm2022/lib/domain/auth/token-reponse.mjs +2 -0
  45. package/esm2022/lib/domain/auth/token.interceptor.mjs +17 -0
  46. package/esm2022/lib/domain/common/bdb-filter.mjs +2 -0
  47. package/esm2022/lib/domain/common/bdb-request.mjs +2 -0
  48. package/esm2022/lib/domain/common/bdb-response.mjs +2 -0
  49. package/esm2022/lib/domain/common/entities/bdb-entity-read.mjs +2 -0
  50. package/esm2022/lib/domain/common/entities/bdb-entity-update.mjs +2 -0
  51. package/esm2022/lib/domain/common/entities/bdb-entity.mjs +2 -0
  52. package/esm2022/lib/domain/common/services/bdb-service-cr.mjs +7 -0
  53. package/esm2022/lib/domain/common/services/bdb-service-crd.mjs +7 -0
  54. package/esm2022/lib/domain/common/services/bdb-service-cru.mjs +7 -0
  55. package/esm2022/lib/domain/common/services/bdb-service-crud.mjs +7 -0
  56. package/esm2022/lib/domain/common/services/bdb-service-r.mjs +10 -0
  57. package/esm2022/lib/domain/common/services/bdb-service-rd.mjs +7 -0
  58. package/esm2022/lib/domain/common/services/bdb-service-ru.mjs +7 -0
  59. package/esm2022/lib/domain/common/services/bdb-service-rud.mjs +7 -0
  60. package/esm2022/lib/domain/common/services/bdb-service.mjs +11 -0
  61. package/esm2022/lib/domain/entities/exception-log/exception-log-read.mjs +2 -0
  62. package/esm2022/lib/domain/entities/exception-log/exception-log.mjs +2 -0
  63. package/esm2022/lib/domain/entities/exception-log/exception-log.service.mjs +17 -0
  64. package/esm2022/lib/domain/entities/media/media-read.mjs +2 -0
  65. package/esm2022/lib/domain/entities/media/media.mjs +2 -0
  66. package/esm2022/lib/domain/entities/media/media.service.mjs +27 -0
  67. package/esm2022/lib/domain/entities/role/role-read.mjs +2 -0
  68. package/esm2022/lib/domain/entities/role/role.mjs +2 -0
  69. package/esm2022/lib/domain/entities/role/role.service.mjs +17 -0
  70. package/esm2022/lib/domain/entities/task-log/task-log-create.mjs +2 -0
  71. package/esm2022/lib/domain/entities/task-log/task-log-read.mjs +2 -0
  72. package/esm2022/lib/domain/entities/task-log/task-log.mjs +2 -0
  73. package/esm2022/lib/domain/entities/task-log/task-log.service.mjs +20 -0
  74. package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter-create.mjs +2 -0
  75. package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter-read.mjs +2 -0
  76. package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter.mjs +2 -0
  77. package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter.service.mjs +17 -0
  78. package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule-create.mjs +2 -0
  79. package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule-read.mjs +2 -0
  80. package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule-update.mjs +2 -0
  81. package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule.mjs +2 -0
  82. package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule.service.mjs +17 -0
  83. package/esm2022/lib/domain/entities/user/user-create.mjs +2 -0
  84. package/esm2022/lib/domain/entities/user/user-read.mjs +2 -0
  85. package/esm2022/lib/domain/entities/user/user-update.mjs +2 -0
  86. package/esm2022/lib/domain/entities/user/user.mjs +2 -0
  87. package/esm2022/lib/domain/entities/user/user.service.mjs +17 -0
  88. package/esm2022/lib/domain/entities/user-role/user-role-create.mjs +2 -0
  89. package/esm2022/lib/domain/entities/user-role/user-role-read.mjs +2 -0
  90. package/esm2022/lib/domain/entities/user-role/user-role.mjs +2 -0
  91. package/esm2022/lib/domain/entities/user-role/user-role.service.mjs +17 -0
  92. package/esm2022/lib/domain/enums/media-type.mjs +7 -0
  93. package/esm2022/lib/domain/enums/task-log-outcome.mjs +9 -0
  94. package/esm2022/lib/domain/enums/task-log-parameter-type.mjs +8 -0
  95. package/esm2022/lib/domain/enums/task-log-status.mjs +8 -0
  96. package/esm2022/lib/domain/tasks/task-log-scheduler.service.mjs +26 -0
  97. package/esm2022/lib/domain/tasks/task-log-type-parameter.mjs +2 -0
  98. package/esm2022/lib/domain/tasks/task-log-type.mjs +2 -0
  99. package/esm2022/lib/domain/tasks/task-log-type.service.mjs +44 -0
  100. package/esm2022/lib/lib.config.mjs +67 -0
  101. package/esm2022/lib/presentation/access-denied-page/access-denied-page.component.mjs +51 -0
  102. package/esm2022/lib/presentation/auth-container/auth-container.component.mjs +12 -0
  103. package/esm2022/lib/presentation/forgot-password-page/forgot-password-page.component.mjs +75 -0
  104. package/esm2022/lib/presentation/invalid-token-page/invalid-token-page.component.mjs +26 -0
  105. package/esm2022/lib/presentation/logged-out.guard.mjs +16 -0
  106. package/esm2022/lib/presentation/login-page/login-page.component.mjs +90 -0
  107. package/esm2022/lib/presentation/logout-page/logout-page.component.mjs +33 -0
  108. package/esm2022/lib/presentation/reset-password-page/reset-password-page.component.mjs +102 -0
  109. package/esm2022/lib/presentation/reset-password.resolver.mjs +25 -0
  110. package/esm2022/lib/presentation/role.guard.mjs +28 -0
  111. package/esm2022/public-api.mjs +109 -0
  112. package/fesm2022/devopmaat-badaboom.mjs +2443 -0
  113. package/fesm2022/devopmaat-badaboom.mjs.map +1 -0
  114. package/index.d.ts +5 -0
  115. package/lib/_theme.scss +32 -0
  116. package/lib/application/common/bdb-data-source.d.ts +25 -0
  117. package/lib/application/common/paginator/bdb-paginator.component.d.ts +17 -0
  118. package/lib/application/common/query-input/_bdb-query-input-theme.scss +17 -0
  119. package/lib/application/common/query-input/bdb-query-input.component.d.ts +15 -0
  120. package/lib/application/common/search/_bdb-search-theme.scss +12 -0
  121. package/lib/application/common/search/bdb-search-wrapper.component.d.ts +13 -0
  122. package/lib/application/common/search/bdb-search.component.d.ts +43 -0
  123. package/lib/application/common/table/_bdb-table-theme.scss +48 -0
  124. package/lib/application/common/table/bdb-cell.directive.d.ts +9 -0
  125. package/lib/application/common/table/bdb-column-builder.d.ts +18 -0
  126. package/lib/application/common/table/bdb-column-options.d.ts +32 -0
  127. package/lib/application/common/table/bdb-column-type.d.ts +10 -0
  128. package/lib/application/common/table/bdb-column.d.ts +19 -0
  129. package/lib/application/common/table/bdb-context-action.d.ts +7 -0
  130. package/lib/application/common/table/bdb-table.component.d.ts +57 -0
  131. package/lib/application/common/table/dynamic.pipe.d.ts +9 -0
  132. package/lib/application/exception-log/exception-log-table/exception-log-table.component.d.ts +26 -0
  133. package/lib/application/task-log/task-log-outcome.pipe.d.ts +8 -0
  134. package/lib/application/task-log/task-log-status.pipe.d.ts +8 -0
  135. package/lib/application/task-log-parameter/task-log-parameter-value.pipe.d.ts +10 -0
  136. package/lib/application/user/user-table/user-table.component.d.ts +25 -0
  137. package/lib/bdb-auth-options.d.ts +28 -0
  138. package/lib/bdb-options.d.ts +16 -0
  139. package/lib/common/_button-theme.scss +87 -0
  140. package/lib/common/_icon-theme.scss +32 -0
  141. package/lib/common/alert/_bdb-alert-theme.scss +34 -0
  142. package/lib/common/alert/bdb-alert.component.d.ts +20 -0
  143. package/lib/common/alert-error-response/bdb-alert-error-response.component.d.ts +17 -0
  144. package/lib/common/bdb-flex-child.directive.d.ts +11 -0
  145. package/lib/common/bdb-flex.directive.d.ts +28 -0
  146. package/lib/common/bdb-form-error.directive.d.ts +15 -0
  147. package/lib/common/bdb-grid-child.directive.d.ts +14 -0
  148. package/lib/common/bdb-grid.directive.d.ts +26 -0
  149. package/lib/common/bdb-palette.d.ts +1 -0
  150. package/lib/common/boolean-display/_bdb-boolean-display-theme.scss +18 -0
  151. package/lib/common/boolean-display/bdb-boolean-display.component.d.ts +7 -0
  152. package/lib/common/color.d.ts +14 -0
  153. package/lib/common/constructor.d.ts +2 -0
  154. package/lib/common/field/bdb-field.component.d.ts +6 -0
  155. package/lib/common/function.pipe.d.ts +7 -0
  156. package/lib/common/layout-error.d.ts +3 -0
  157. package/lib/common/linked-list.d.ts +15 -0
  158. package/lib/domain/auth/account-info.d.ts +6 -0
  159. package/lib/domain/auth/account.service.d.ts +29 -0
  160. package/lib/domain/auth/auth.service.d.ts +35 -0
  161. package/lib/domain/auth/reset-password-token.d.ts +4 -0
  162. package/lib/domain/auth/token-expired.interceptor.d.ts +2 -0
  163. package/lib/domain/auth/token-reponse.d.ts +5 -0
  164. package/lib/domain/auth/token.interceptor.d.ts +2 -0
  165. package/lib/domain/common/bdb-filter.d.ts +9 -0
  166. package/lib/domain/common/bdb-request.d.ts +10 -0
  167. package/lib/domain/common/bdb-response.d.ts +6 -0
  168. package/lib/domain/common/entities/bdb-entity-read.d.ts +3 -0
  169. package/lib/domain/common/entities/bdb-entity-update.d.ts +3 -0
  170. package/lib/domain/common/entities/bdb-entity.d.ts +3 -0
  171. package/lib/domain/common/services/bdb-service-cr.d.ts +7 -0
  172. package/lib/domain/common/services/bdb-service-crd.d.ts +7 -0
  173. package/lib/domain/common/services/bdb-service-cru.d.ts +8 -0
  174. package/lib/domain/common/services/bdb-service-crud.d.ts +8 -0
  175. package/lib/domain/common/services/bdb-service-r.d.ts +10 -0
  176. package/lib/domain/common/services/bdb-service-rd.d.ts +7 -0
  177. package/lib/domain/common/services/bdb-service-ru.d.ts +8 -0
  178. package/lib/domain/common/services/bdb-service-rud.d.ts +8 -0
  179. package/lib/domain/common/services/bdb-service.d.ts +6 -0
  180. package/lib/domain/entities/exception-log/exception-log-read.d.ts +9 -0
  181. package/lib/domain/entities/exception-log/exception-log.d.ts +9 -0
  182. package/lib/domain/entities/exception-log/exception-log.service.d.ts +9 -0
  183. package/lib/domain/entities/media/media-read.d.ts +14 -0
  184. package/lib/domain/entities/media/media.d.ts +15 -0
  185. package/lib/domain/entities/media/media.service.d.ts +12 -0
  186. package/lib/domain/entities/role/role-read.d.ts +7 -0
  187. package/lib/domain/entities/role/role.d.ts +4 -0
  188. package/lib/domain/entities/role/role.service.d.ts +9 -0
  189. package/lib/domain/entities/task-log/task-log-create.d.ts +5 -0
  190. package/lib/domain/entities/task-log/task-log-read.d.ts +11 -0
  191. package/lib/domain/entities/task-log/task-log.d.ts +15 -0
  192. package/lib/domain/entities/task-log/task-log.service.d.ts +12 -0
  193. package/lib/domain/entities/task-log-parameter/task-log-parameter-create.d.ts +7 -0
  194. package/lib/domain/entities/task-log-parameter/task-log-parameter-read.d.ts +11 -0
  195. package/lib/domain/entities/task-log-parameter/task-log-parameter.d.ts +10 -0
  196. package/lib/domain/entities/task-log-parameter/task-log-parameter.service.d.ts +9 -0
  197. package/lib/domain/entities/task-log-schedule/task-log-schedule-create.d.ts +5 -0
  198. package/lib/domain/entities/task-log-schedule/task-log-schedule-read.d.ts +7 -0
  199. package/lib/domain/entities/task-log-schedule/task-log-schedule-update.d.ts +5 -0
  200. package/lib/domain/entities/task-log-schedule/task-log-schedule.d.ts +7 -0
  201. package/lib/domain/entities/task-log-schedule/task-log-schedule.service.d.ts +11 -0
  202. package/lib/domain/entities/user/user-create.d.ts +3 -0
  203. package/lib/domain/entities/user/user-read.d.ts +6 -0
  204. package/lib/domain/entities/user/user-update.d.ts +4 -0
  205. package/lib/domain/entities/user/user.d.ts +5 -0
  206. package/lib/domain/entities/user/user.service.d.ts +11 -0
  207. package/lib/domain/entities/user-role/user-role-create.d.ts +4 -0
  208. package/lib/domain/entities/user-role/user-role-read.d.ts +7 -0
  209. package/lib/domain/entities/user-role/user-role.d.ts +7 -0
  210. package/lib/domain/entities/user-role/user-role.service.d.ts +10 -0
  211. package/lib/domain/enums/media-type.d.ts +5 -0
  212. package/lib/domain/enums/task-log-outcome.d.ts +7 -0
  213. package/lib/domain/enums/task-log-parameter-type.d.ts +6 -0
  214. package/lib/domain/enums/task-log-status.d.ts +6 -0
  215. package/lib/domain/tasks/task-log-scheduler.service.d.ts +11 -0
  216. package/lib/domain/tasks/task-log-type-parameter.d.ts +11 -0
  217. package/lib/domain/tasks/task-log-type.d.ts +7 -0
  218. package/lib/domain/tasks/task-log-type.service.d.ts +14 -0
  219. package/lib/lib.config.d.ts +11 -0
  220. package/lib/presentation/access-denied-page/access-denied-page.component.d.ts +16 -0
  221. package/lib/presentation/auth-container/auth-container.component.d.ts +5 -0
  222. package/lib/presentation/forgot-password-page/forgot-password-page.component.d.ts +20 -0
  223. package/lib/presentation/invalid-token-page/invalid-token-page.component.d.ts +8 -0
  224. package/lib/presentation/logged-out.guard.d.ts +2 -0
  225. package/lib/presentation/login-page/login-page.component.d.ts +27 -0
  226. package/lib/presentation/logout-page/logout-page.component.d.ts +13 -0
  227. package/lib/presentation/reset-password-page/reset-password-page.component.d.ts +31 -0
  228. package/lib/presentation/reset-password.resolver.d.ts +3 -0
  229. package/lib/presentation/role.guard.d.ts +2 -0
  230. package/package.json +27 -0
  231. package/public-api.d.ts +99 -0
@@ -0,0 +1,2443 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, Component, makeEnvironmentProviders, Input, HostBinding, Pipe, Directive, Optional, Self, ViewChild, Injector, EventEmitter, Output, ContentChildren, LOCALE_ID, Inject } from '@angular/core';
3
+ import { HttpClient, HttpErrorResponse, provideHttpClient, withInterceptors } from '@angular/common/http';
4
+ import { BehaviorSubject, catchError, throwError, filter, take, concatMap as concatMap$1, of, tap as tap$1, map, Subject, finalize, takeUntil, debounceTime, distinctUntilChanged } from 'rxjs';
5
+ import { tap, concatMap, shareReplay, map as map$1 } from 'rxjs/operators';
6
+ import * as i2$1 from '@angular/router';
7
+ import { RouterOutlet, Router, provideRouter, RouterLink } from '@angular/router';
8
+ import * as i1 from '@angular/material/paginator';
9
+ import { MatPaginatorModule } from '@angular/material/paginator';
10
+ import * as i1$1 from '@angular/common';
11
+ import { CommonModule } from '@angular/common';
12
+ import * as i3 from '@angular/forms';
13
+ import { FormControl, ReactiveFormsModule, ControlContainer, Validators, FormGroup } from '@angular/forms';
14
+ import * as i3$1 from '@angular/material/icon';
15
+ import { MatIconModule } from '@angular/material/icon';
16
+ import * as i6 from '@angular/material/autocomplete';
17
+ import { MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
18
+ import * as i8 from '@angular/material/button';
19
+ import { MatButtonModule } from '@angular/material/button';
20
+ import * as i4 from '@angular/material/form-field';
21
+ import { MatFormFieldModule } from '@angular/material/form-field';
22
+ import * as i5 from '@angular/material/input';
23
+ import { MatInputModule } from '@angular/material/input';
24
+ import * as i7 from '@angular/material/core';
25
+ import * as i5$1 from '@angular/material/menu';
26
+ import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
27
+ import * as i2 from '@angular/material/table';
28
+ import { MatTableModule } from '@angular/material/table';
29
+ import * as i3$2 from '@angular/material/checkbox';
30
+ import { MatCheckboxModule } from '@angular/material/checkbox';
31
+ import * as i4$1 from '@angular/material/sort';
32
+ import { MatSortModule } from '@angular/material/sort';
33
+ import * as i1$2 from '@angular/material/dialog';
34
+ import { MatDialogModule } from '@angular/material/dialog';
35
+ import * as i3$3 from '@angular/material/card';
36
+ import { MatCardModule } from '@angular/material/card';
37
+
38
+ class BdbAuthOptionsBuilder {
39
+ constructor(configure) {
40
+ this._addPresentation = false;
41
+ configure(this);
42
+ }
43
+ set loginPath(path) {
44
+ this._loginPath = path;
45
+ }
46
+ set logoutPath(path) {
47
+ this._logoutPath = path;
48
+ }
49
+ set accessDeniedPath(path) {
50
+ this._accessDeniedPath = path;
51
+ }
52
+ set forgotPasswordPath(path) {
53
+ this._forgotPasswordPath = path;
54
+ }
55
+ set resetPasswordPath(path) {
56
+ this._resetPasswordPath = path;
57
+ }
58
+ set invalidTokenPath(path) {
59
+ this._invalidTokenPath = path;
60
+ }
61
+ addPresentation() {
62
+ this._addPresentation = true;
63
+ }
64
+ build() {
65
+ return {
66
+ loginPath: this._loginPath ?? 'inloggen',
67
+ logoutPath: this._logoutPath ?? 'uitloggen',
68
+ accessDeniedPath: this._accessDeniedPath ?? 'toegang-geweigerd',
69
+ forgotPasswordPath: this._forgotPasswordPath ?? 'wachtwoord-vergeten',
70
+ resetPasswordPath: this._resetPasswordPath ?? 'herstel-wachtwoord',
71
+ invalidTokenPath: this._invalidTokenPath ?? 'ongeldig-token',
72
+ addPresentation: this._addPresentation,
73
+ };
74
+ }
75
+ }
76
+
77
+ class BdbOptionsBuilder {
78
+ constructor(configure) {
79
+ configure(this);
80
+ }
81
+ set backendUrl(url) {
82
+ this._backendUrl = url;
83
+ }
84
+ addAuth(configure) {
85
+ this._auth = configure;
86
+ }
87
+ build() {
88
+ if (!this._backendUrl) {
89
+ throw 'backendUrl mag niet leeg zijn';
90
+ }
91
+ const options = { backendUrl: this._backendUrl };
92
+ if (this._auth) {
93
+ options.authOptions = new BdbAuthOptionsBuilder(this._auth).build();
94
+ }
95
+ return options;
96
+ }
97
+ }
98
+ const BDB_OPTIONS = new InjectionToken('BdbOptions');
99
+
100
+ class BdbService {
101
+ constructor(areaName) {
102
+ const bdbOptions = inject(BDB_OPTIONS);
103
+ this.baseUrl = `${bdbOptions.backendUrl}/${areaName}`;
104
+ this.httpClient = inject(HttpClient);
105
+ }
106
+ }
107
+
108
+ class AccountService extends BdbService {
109
+ constructor() {
110
+ super('account');
111
+ }
112
+ login(value) {
113
+ return this.httpClient.post(`${this.baseUrl}/login`, value);
114
+ }
115
+ exchangeRefreshToken(value) {
116
+ return this.httpClient.post(`${this.baseUrl}/exchange-refresh-token`, value);
117
+ }
118
+ forgotPassword(value) {
119
+ return this.httpClient.post(`${this.baseUrl}/forgot-password`, value);
120
+ }
121
+ resetPassword(value) {
122
+ return this.httpClient.post(`${this.baseUrl}/reset-password`, value);
123
+ }
124
+ validateResetPasswordToken(value) {
125
+ return this.httpClient.post(`${this.baseUrl}/validate-reset-password-token`, value);
126
+ }
127
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AccountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
128
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AccountService, providedIn: 'root' }); }
129
+ }
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AccountService, decorators: [{
131
+ type: Injectable,
132
+ args: [{
133
+ providedIn: 'root',
134
+ }]
135
+ }], ctorParameters: () => [] });
136
+
137
+ const tokenKey = 'access_token';
138
+ const refreshTokenKey = 'refresh_token';
139
+ const emailAddressClaimName = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress';
140
+ const roleClaimName = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role';
141
+ const nameClaimName = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name';
142
+ const nameIdentifierClaimName = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier';
143
+ const defaultClaims = [
144
+ 'AspNet.Identity.SecurityStamp',
145
+ 'aud',
146
+ 'exp',
147
+ 'iss',
148
+ roleClaimName,
149
+ nameClaimName,
150
+ nameIdentifierClaimName,
151
+ emailAddressClaimName,
152
+ ];
153
+ function getAuthorizationHeaderFromToken(token) {
154
+ return `Bearer ${token}`;
155
+ }
156
+ function getTokenFromAuthorizationHeader(header) {
157
+ return header.replace(/^(Bearer )/g, '');
158
+ }
159
+ class AuthService {
160
+ constructor(accountService) {
161
+ this.accountService = accountService;
162
+ const token = localStorage.getItem(tokenKey);
163
+ this.token$ = new BehaviorSubject(token);
164
+ const accountInfo = token === null ? null : this.getAccountInfoFromToken(token);
165
+ this.account$ = new BehaviorSubject(accountInfo);
166
+ }
167
+ login(value) {
168
+ return this.accountService.login(value).pipe(tap({
169
+ next: tokenResponse => this.processTokenResponse(tokenResponse),
170
+ }));
171
+ }
172
+ logout() {
173
+ this.token$.next(null);
174
+ this.account$.next(null);
175
+ localStorage.removeItem(tokenKey);
176
+ localStorage.removeItem(refreshTokenKey);
177
+ }
178
+ refreshToken(expiredToken) {
179
+ const currentToken = this.token$.getValue();
180
+ if (expiredToken !== currentToken) {
181
+ return this.token$.asObservable();
182
+ }
183
+ const refreshToken = localStorage.getItem(refreshTokenKey);
184
+ if (!refreshToken) {
185
+ throw new Error('Versen login token mislukt');
186
+ }
187
+ this.token$.next(null);
188
+ return this.accountService.exchangeRefreshToken({ token: currentToken, refreshToken }).pipe(concatMap(x => {
189
+ this.processTokenResponse(x);
190
+ return this.token$;
191
+ }));
192
+ }
193
+ resetPassword(value) {
194
+ return this.accountService.resetPassword(value).pipe(tap({
195
+ next: tokenResponse => this.processTokenResponse(tokenResponse),
196
+ }));
197
+ }
198
+ forgotPassword(value) {
199
+ return this.accountService.forgotPassword(value);
200
+ }
201
+ validateResetPasswordToken(value) {
202
+ return this.accountService.validateResetPasswordToken(value);
203
+ }
204
+ /* helper methods */
205
+ processTokenResponse(x) {
206
+ if (!x || !x.token || !x.refreshToken) {
207
+ this.logout();
208
+ return;
209
+ }
210
+ this.token$.next(x.token);
211
+ this.account$.next(this.getAccountInfoFromToken(x.token));
212
+ localStorage.setItem(tokenKey, x.token);
213
+ localStorage.setItem(refreshTokenKey, x.refreshToken);
214
+ }
215
+ getAccountInfoFromToken(token) {
216
+ const decodedJWT = JSON.parse(window.atob(token.split('.')[1]));
217
+ let roles = [];
218
+ const decodedRoles = decodedJWT[roleClaimName];
219
+ if (decodedRoles) {
220
+ if (Array.isArray(decodedRoles)) {
221
+ roles = decodedRoles;
222
+ }
223
+ else {
224
+ roles = [decodedRoles];
225
+ }
226
+ }
227
+ const claims = new Map();
228
+ for (const [key, value] of Object.entries(decodedJWT)) {
229
+ if (defaultClaims.indexOf(key) >= 0) {
230
+ continue;
231
+ }
232
+ claims.set(key, value);
233
+ }
234
+ return {
235
+ email: decodedJWT[nameClaimName],
236
+ id: decodedJWT['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier'],
237
+ roles: roles,
238
+ claims: claims,
239
+ };
240
+ }
241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AuthService, deps: [{ token: AccountService }], target: i0.ɵɵFactoryTarget.Injectable }); }
242
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AuthService, providedIn: 'root' }); }
243
+ }
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AuthService, decorators: [{
245
+ type: Injectable,
246
+ args: [{
247
+ providedIn: 'root',
248
+ }]
249
+ }], ctorParameters: () => [{ type: AccountService }] });
250
+
251
+ const TokenExpired = 'token-expired';
252
+ const tokenExpiredInterceptor = (req, next) => {
253
+ const authService = inject(AuthService);
254
+ return next(req).pipe(catchError(error => {
255
+ if (!(error instanceof HttpErrorResponse) || error.status !== 401 || !error.headers.get(TokenExpired)) {
256
+ return throwError(() => error);
257
+ }
258
+ const authorizationHeader = req.headers.get('Authorization');
259
+ const expiredToken = getTokenFromAuthorizationHeader(authorizationHeader ?? '');
260
+ return authService.refreshToken(expiredToken).pipe(filter(x => x !== null), take(1), concatMap$1(x => next(req.clone({
261
+ setHeaders: {
262
+ Authorization: getAuthorizationHeaderFromToken(x ?? ''),
263
+ },
264
+ }))));
265
+ }));
266
+ };
267
+
268
+ class AuthContainerComponent {
269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AuthContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
270
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: AuthContainerComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<router-outlet></router-outlet>\r\n", styles: [":host{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
271
+ }
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AuthContainerComponent, decorators: [{
273
+ type: Component,
274
+ args: [{ standalone: true, imports: [RouterOutlet], template: "<router-outlet></router-outlet>\r\n", styles: [":host{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"] }]
275
+ }] });
276
+
277
+ const loggedOutGuard = (_, state) => {
278
+ const authService = inject(AuthService);
279
+ const router = inject(Router);
280
+ const bdbOptions = inject(BDB_OPTIONS);
281
+ const isLoggedIn = !!authService.account$.getValue();
282
+ return isLoggedIn
283
+ ? router.createUrlTree([`/${bdbOptions.authOptions?.logoutPath}`], {
284
+ queryParams: { returnUrl: state.url },
285
+ })
286
+ : true;
287
+ };
288
+
289
+ function roleGuard(...roles) {
290
+ return (_, state) => {
291
+ const authService = inject(AuthService);
292
+ const router = inject(Router);
293
+ const bdbOptions = inject(BDB_OPTIONS);
294
+ const account = authService.account$.getValue();
295
+ if (!account) {
296
+ return router.createUrlTree([`/${bdbOptions.authOptions?.loginPath}`], {
297
+ queryParams: { returnUrl: state.url },
298
+ });
299
+ }
300
+ if (!roles.length) {
301
+ return true;
302
+ }
303
+ const userRoles = account.roles;
304
+ if (userRoles.some(x => roles.includes(x))) {
305
+ return true;
306
+ }
307
+ return router.createUrlTree([`/${bdbOptions.authOptions?.accessDeniedPath}`], {
308
+ queryParams: { returnUrl: state.url },
309
+ });
310
+ };
311
+ }
312
+
313
+ const resetPasswordResolver = route => {
314
+ const authService = inject(AuthService);
315
+ const router = inject(Router);
316
+ const bdbOptions = inject(BDB_OPTIONS);
317
+ const invalidTokenPath = bdbOptions.authOptions?.invalidTokenPath;
318
+ const model = {
319
+ token: route.queryParams['token'],
320
+ email: route.queryParams['email'],
321
+ };
322
+ return of(model).pipe(tap$1(x => {
323
+ if (!x.token || !x.email) {
324
+ throw new Error('Could not obtain token');
325
+ }
326
+ }), concatMap$1(x => authService.validateResetPasswordToken(x)), tap$1(x => {
327
+ if (!x) {
328
+ throw new Error('Token is not valid');
329
+ }
330
+ }), catchError(() => router.navigate(['/', invalidTokenPath])), map(() => model));
331
+ };
332
+
333
+ const tokenInterceptor = (req, next) => {
334
+ const authService = inject(AuthService);
335
+ return authService.token$.pipe(take(1), concatMap$1(x => {
336
+ const request = x === null
337
+ ? req
338
+ : req.clone({
339
+ setHeaders: {
340
+ Authorization: getAuthorizationHeaderFromToken(x ?? ''),
341
+ },
342
+ });
343
+ return next(request);
344
+ }));
345
+ };
346
+
347
+ /**
348
+ * Configures BaDaBoom by providing necessary tokens.
349
+ * Takes root routes and provides the router with these routes, appending routes if specified
350
+ * @param {BdbOptionsConfigure} optionsConfigure
351
+ * @param {Routes} routes
352
+ * @return {EnvironmentProviders}
353
+ */
354
+ function provideBaDaBoom(optionsConfigure, routes) {
355
+ const options = new BdbOptionsBuilder(optionsConfigure).build();
356
+ let authRoutes = [];
357
+ if (options.authOptions?.addPresentation) {
358
+ const authOptions = options.authOptions;
359
+ authRoutes = [
360
+ {
361
+ path: '',
362
+ component: AuthContainerComponent,
363
+ children: [
364
+ {
365
+ path: authOptions.loginPath,
366
+ canActivate: [loggedOutGuard],
367
+ loadComponent: () => Promise.resolve().then(function () { return loginPage_component; }).then(x => x.LoginPageComponent),
368
+ },
369
+ {
370
+ path: authOptions.logoutPath,
371
+ canActivate: [roleGuard()],
372
+ loadComponent: () => Promise.resolve().then(function () { return logoutPage_component; }).then(x => x.LogoutPageComponent),
373
+ },
374
+ {
375
+ path: authOptions.forgotPasswordPath,
376
+ canActivate: [loggedOutGuard],
377
+ loadComponent: () => Promise.resolve().then(function () { return forgotPasswordPage_component; }).then(x => x.ForgotPasswordPageComponent),
378
+ },
379
+ {
380
+ path: authOptions.resetPasswordPath,
381
+ canActivate: [loggedOutGuard],
382
+ resolve: [resetPasswordResolver],
383
+ loadComponent: () => Promise.resolve().then(function () { return resetPasswordPage_component; }).then(x => x.ResetPasswordPageComponent),
384
+ },
385
+ {
386
+ path: authOptions.accessDeniedPath,
387
+ loadComponent: () => Promise.resolve().then(function () { return accessDeniedPage_component; }).then(x => x.AccessDeniedPageComponent),
388
+ },
389
+ {
390
+ path: authOptions.invalidTokenPath,
391
+ loadComponent: () => Promise.resolve().then(function () { return invalidTokenPage_component; }).then(x => x.InvalidTokenPageComponent),
392
+ },
393
+ ],
394
+ },
395
+ ];
396
+ }
397
+ return makeEnvironmentProviders([
398
+ { provide: BDB_OPTIONS, useValue: options },
399
+ provideHttpClient(withInterceptors([tokenInterceptor, tokenExpiredInterceptor])),
400
+ provideRouter([...routes, ...authRoutes]),
401
+ ]);
402
+ }
403
+
404
+ class BdbDataSource {
405
+ get data() {
406
+ return this.dataSubject.value;
407
+ }
408
+ constructor(service, initialRequest = {}) {
409
+ this.service = service;
410
+ this.dataSubject = new BehaviorSubject([]);
411
+ this.responseSubject = new Subject();
412
+ this.loadingSubject = new BehaviorSubject(false);
413
+ this.errorSubject = new BehaviorSubject(null);
414
+ this.loading$ = this.loadingSubject.asObservable();
415
+ this.error$ = this.errorSubject.asObservable();
416
+ this.response$ = this.responseSubject.asObservable();
417
+ this.request = initialRequest;
418
+ }
419
+ disconnect() {
420
+ return;
421
+ }
422
+ connect() {
423
+ return this.dataSubject.asObservable();
424
+ }
425
+ loadMethod(service, request) {
426
+ return service.read(request);
427
+ }
428
+ load() {
429
+ this.loadingSubject.next(true);
430
+ this.errorSubject.next(null);
431
+ this.loadMethod(this.service, this.request)
432
+ .pipe(catchError((err) => {
433
+ this.errorSubject.next(err);
434
+ return of({ page: 0, count: 0, rows: [], pageSize: 15 });
435
+ }), finalize(() => this.loadingSubject.next(false)))
436
+ .subscribe({
437
+ next: (response) => {
438
+ this.dataSubject.next(response.rows);
439
+ this.responseSubject.next(response);
440
+ },
441
+ });
442
+ }
443
+ }
444
+
445
+ class BdbPaginatorComponent {
446
+ constructor() {
447
+ this._onDestroy = new Subject();
448
+ }
449
+ ngOnInit() {
450
+ this.dataSource.response$.pipe(takeUntil(this._onDestroy)).subscribe({
451
+ next: x => {
452
+ this.pageSize = x.pageSize;
453
+ this.page = x.page;
454
+ this.length = x.count;
455
+ },
456
+ });
457
+ }
458
+ ngOnDestroy() {
459
+ this._onDestroy.next();
460
+ this._onDestroy.complete();
461
+ }
462
+ changePage(event) {
463
+ this.dataSource.request.page = event.pageIndex;
464
+ this.dataSource.request.pageSize = event.pageSize;
465
+ this.dataSource.load();
466
+ }
467
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
468
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbPaginatorComponent, isStandalone: true, selector: "bdb-paginator", inputs: { dataSource: "dataSource" }, ngImport: i0, template: "<mat-paginator\r\n [pageSize]=\"pageSize\"\r\n [pageIndex]=\"page\"\r\n [length]=\"length\"\r\n (page)=\"changePage($event)\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n [hidePageSize]=\"true\">\r\n</mat-paginator>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }] }); }
469
+ }
470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbPaginatorComponent, decorators: [{
471
+ type: Component,
472
+ args: [{ selector: 'bdb-paginator', standalone: true, imports: [MatPaginatorModule], template: "<mat-paginator\r\n [pageSize]=\"pageSize\"\r\n [pageIndex]=\"page\"\r\n [length]=\"length\"\r\n (page)=\"changePage($event)\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n [hidePageSize]=\"true\">\r\n</mat-paginator>\r\n" }]
473
+ }], propDecorators: { dataSource: [{
474
+ type: Input
475
+ }] } });
476
+
477
+ class BdbQueryInputComponent {
478
+ constructor() {
479
+ this.class = 'khi-query-input';
480
+ this._onDestroy = new Subject();
481
+ this.queryFormControl = new FormControl(undefined, { nonNullable: true });
482
+ }
483
+ ngOnInit() {
484
+ this.queryFormControl.valueChanges
485
+ .pipe(debounceTime(100), distinctUntilChanged(), takeUntil(this._onDestroy))
486
+ .subscribe({
487
+ next: x => {
488
+ if (this.dataSource) {
489
+ this.dataSource.request.query = x;
490
+ this.dataSource.request.page = 0;
491
+ this.dataSource.load();
492
+ }
493
+ },
494
+ });
495
+ }
496
+ ngOnDestroy() {
497
+ this._onDestroy.next();
498
+ this._onDestroy.complete();
499
+ }
500
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbQueryInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
501
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbQueryInputComponent, isStandalone: true, selector: "bdb-query-input[dataSource]", inputs: { dataSource: "dataSource" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<input spellcheck=\"false\" autocomplete=\"false\" [formControl]=\"queryFormControl\" />\r\n<mat-icon *ngIf=\"!queryFormControl.value\">search</mat-icon>\r\n<mat-icon *ngIf=\"queryFormControl.value\" (click)=\"queryFormControl.patchValue(undefined)\">clear</mat-icon>\r\n", styles: [":host{display:inline-flex;border-radius:4px;min-height:36px;max-width:100%;flex-direction:row;align-items:center}input{border:none;outline:none;padding:4px;font-size:1rem;min-width:40px;min-height:auto}.mat-icon{flex:24px 0 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
502
+ }
503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbQueryInputComponent, decorators: [{
504
+ type: Component,
505
+ args: [{ selector: 'bdb-query-input[dataSource]', standalone: true, imports: [CommonModule, ReactiveFormsModule, MatIconModule], template: "<input spellcheck=\"false\" autocomplete=\"false\" [formControl]=\"queryFormControl\" />\r\n<mat-icon *ngIf=\"!queryFormControl.value\">search</mat-icon>\r\n<mat-icon *ngIf=\"queryFormControl.value\" (click)=\"queryFormControl.patchValue(undefined)\">clear</mat-icon>\r\n", styles: [":host{display:inline-flex;border-radius:4px;min-height:36px;max-width:100%;flex-direction:row;align-items:center}input{border:none;outline:none;padding:4px;font-size:1rem;min-width:40px;min-height:auto}.mat-icon{flex:24px 0 0}\n"] }]
506
+ }], propDecorators: { class: [{
507
+ type: HostBinding,
508
+ args: ['class']
509
+ }], dataSource: [{
510
+ type: Input
511
+ }] } });
512
+
513
+ class BdbSearchWrapperBaseComponent {
514
+ constructor() {
515
+ this.controlContainer = inject(ControlContainer);
516
+ }
517
+ ngOnInit() {
518
+ if (this.control) {
519
+ this.formControl = this.control;
520
+ return;
521
+ }
522
+ if (!this.controlName) {
523
+ throw 'No FormControl or FormControlName provided';
524
+ }
525
+ const ctrl = this.controlContainer.control?.get(this.controlName);
526
+ if (!ctrl) {
527
+ throw `FormControl '${this.controlName}' not found`;
528
+ }
529
+ this.formControl = ctrl;
530
+ }
531
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbSearchWrapperBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
532
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbSearchWrapperBaseComponent, isStandalone: true, selector: "ng-component", inputs: { controlName: "controlName", control: "control" }, ngImport: i0, template: '', isInline: true }); }
533
+ }
534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbSearchWrapperBaseComponent, decorators: [{
535
+ type: Component,
536
+ args: [{ template: '', standalone: true }]
537
+ }], propDecorators: { controlName: [{
538
+ type: Input
539
+ }], control: [{
540
+ type: Input
541
+ }] } });
542
+
543
+ // Opzettelijk geen bdb prefix, aangezien dit een pure util is
544
+ // Daartoe in eerste instantie ook niet beschikbaar gesteld in public api
545
+ // Als hier wel reden toe is: heroverwegen bdb prefix toe te voegen
546
+ class FunctionPipe {
547
+ transform(value, fn) {
548
+ return fn(value);
549
+ }
550
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: FunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
551
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: FunctionPipe, isStandalone: true, name: "function" }); }
552
+ }
553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: FunctionPipe, decorators: [{
554
+ type: Pipe,
555
+ args: [{
556
+ name: 'function',
557
+ standalone: true,
558
+ }]
559
+ }] });
560
+
561
+ const errorMessageMap = new Map([
562
+ ['required', 'Verplicht'],
563
+ ['email', 'Ongeldig e-mail'],
564
+ ['phone', 'Ongeldig tel.nr'],
565
+ ['requiredTrue', 'Verplicht'],
566
+ ['pattern', 'Ongeldig'],
567
+ ]);
568
+ function getErrorMessage(validationErrorKey, validationErrorValue) {
569
+ switch (validationErrorKey) {
570
+ case 'minlength':
571
+ return `Minimum lengte: ${validationErrorValue['requiredLength']}`;
572
+ case 'maxlength':
573
+ return `Maximum lengte: ${validationErrorValue['requiredLength']}`;
574
+ case 'max':
575
+ return `Max: ${validationErrorValue['max']}`;
576
+ case 'min':
577
+ return `Min: ${validationErrorValue['min']}`;
578
+ case 'custom':
579
+ return `${validationErrorValue}`;
580
+ default:
581
+ return errorMessageMap.get(validationErrorKey) ?? validationErrorKey;
582
+ }
583
+ }
584
+ class BdbFormErrorDirective {
585
+ constructor(element, renderer, controlContainer) {
586
+ this.element = element;
587
+ this.renderer = renderer;
588
+ this.controlContainer = controlContainer;
589
+ }
590
+ ngOnInit() {
591
+ if (!this.bdbFormError) {
592
+ throw new Error('No (name for) formcontrol provided');
593
+ }
594
+ if (typeof this.bdbFormError === 'string') {
595
+ const ctrl = this.controlContainer.control?.get(this.bdbFormError);
596
+ if (!ctrl) {
597
+ throw new Error(`No formcontrol found for name '${this.bdbFormError}'`);
598
+ }
599
+ this.control = ctrl;
600
+ }
601
+ else {
602
+ this.control = this.bdbFormError;
603
+ }
604
+ this.setError();
605
+ this.control.statusChanges.subscribe({
606
+ next: () => this.setError(),
607
+ });
608
+ }
609
+ setError() {
610
+ const validationErrors = this.control.errors;
611
+ if (!validationErrors) {
612
+ return;
613
+ }
614
+ const validationErrorKey = Object.keys(validationErrors)[0];
615
+ const validationErrorValue = validationErrors[validationErrorKey];
616
+ const errorMessage = getErrorMessage(validationErrorKey, validationErrorValue);
617
+ this.renderer.setProperty(this.element.nativeElement, 'innerText', errorMessage);
618
+ }
619
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFormErrorDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i3.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
620
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: BdbFormErrorDirective, isStandalone: true, selector: "[bdbFormError]", inputs: { bdbFormError: "bdbFormError" }, ngImport: i0 }); }
621
+ }
622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFormErrorDirective, decorators: [{
623
+ type: Directive,
624
+ args: [{
625
+ selector: '[bdbFormError]',
626
+ standalone: true,
627
+ }]
628
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i3.ControlContainer }], propDecorators: { bdbFormError: [{
629
+ type: Input
630
+ }] } });
631
+
632
+ class BdbSearchComponent {
633
+ constructor(ngControl) {
634
+ this.ngControl = ngControl;
635
+ this.label = '';
636
+ this.hint = '';
637
+ this.placeholder = '';
638
+ this._onDestroy = new Subject();
639
+ this.viewChange = new BehaviorSubject({
640
+ start: 0,
641
+ end: Number.MAX_VALUE,
642
+ });
643
+ this.searchCtrl = new FormControl('', {
644
+ nonNullable: true,
645
+ validators: [() => this.ngControl.errors],
646
+ });
647
+ this.inputTabIndex = 0;
648
+ this.hasValue = false;
649
+ this.isDisabled = false;
650
+ ngControl.valueAccessor = this;
651
+ this.searchCtrl.valueChanges
652
+ .pipe(takeUntil(this._onDestroy), debounceTime(100), distinctUntilChanged(), filter(x => typeof x === 'string'))
653
+ .subscribe({
654
+ next: x => {
655
+ this.dataSource.request.query = x;
656
+ this.dataSource.load();
657
+ },
658
+ });
659
+ }
660
+ ngOnInit() {
661
+ this.searchOptions = this.dataSource.connect();
662
+ this.ngControl.valueChanges?.pipe(takeUntil(this._onDestroy)).subscribe({
663
+ next: () => this.searchCtrl.updateValueAndValidity(),
664
+ });
665
+ }
666
+ ngAfterViewInit() {
667
+ this.autoCompleteTrigger?.panelClosingActions.pipe(takeUntil(this._onDestroy)).subscribe({
668
+ next: x => {
669
+ if (x === null) {
670
+ this.searchCtrl.setValue('');
671
+ this.searchInput?.nativeElement.blur();
672
+ }
673
+ },
674
+ });
675
+ }
676
+ ngOnDestroy() {
677
+ this._onDestroy.next();
678
+ this._onDestroy.complete();
679
+ }
680
+ writeValue(obj) {
681
+ if (!obj) {
682
+ this.hasValue = false;
683
+ this.inputTabIndex = 0;
684
+ this.searchCtrl.setValue('');
685
+ return;
686
+ }
687
+ this.searchCtrl.setValue(obj);
688
+ this.inputTabIndex = -1;
689
+ this.hasValue = true;
690
+ }
691
+ registerOnChange(fn) {
692
+ this.onChange = fn;
693
+ }
694
+ registerOnTouched(fn) {
695
+ this.onTouch = fn;
696
+ }
697
+ setDisabledState(isDisabled) {
698
+ isDisabled ? this.searchCtrl.disable() : this.searchCtrl.enable();
699
+ this.isDisabled = isDisabled;
700
+ }
701
+ onFocus() {
702
+ if (this.hasValue) {
703
+ this.searchInput?.nativeElement.blur();
704
+ this.autoCompleteTrigger?.closePanel();
705
+ this.clearButton?.focus();
706
+ }
707
+ }
708
+ onBlur() {
709
+ if (!this.onTouch) {
710
+ throw 'No onTouch callback registered';
711
+ }
712
+ this.onTouch();
713
+ }
714
+ selectOption(event) {
715
+ if (!this.onChange) {
716
+ throw 'No onChange callback registered';
717
+ }
718
+ this.inputTabIndex = -1;
719
+ this.hasValue = true;
720
+ this.searchInput?.nativeElement.blur();
721
+ const value = event.option.value;
722
+ this.onChange(value);
723
+ }
724
+ clear() {
725
+ if (!this.onChange) {
726
+ throw 'No onChange callback registered';
727
+ }
728
+ this.hasValue = false;
729
+ this.inputTabIndex = 0;
730
+ this.searchCtrl.setValue('');
731
+ this.searchInput?.nativeElement.focus();
732
+ this.onChange(null);
733
+ }
734
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbSearchComponent, deps: [{ token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
735
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbSearchComponent, isStandalone: true, selector: "bdb-search", inputs: { dataSource: "dataSource", displayFn: "displayFn", label: "label", hint: "hint", placeholder: "placeholder" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true }, { propertyName: "autoCompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-disabled-cover\" *ngIf=\"hasValue\">\r\n <button #clearButton mat-icon-button type=\"button\" [disabled]=\"isDisabled\" (click)=\"clear()\" color=\"danger\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n </div>\r\n <mat-form-field class=\"search-form-field\">\r\n <mat-label>{{ label }}</mat-label>\r\n <input\r\n type=\"text\"\r\n matInput\r\n [formControl]=\"searchCtrl\"\r\n [matAutocomplete]=\"autoComplete\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n #searchInput\r\n [tabIndex]=\"inputTabIndex\"\r\n [placeholder]=\"placeholder\" />\r\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"selectOption($event)\" [displayWith]=\"displayFn\">\r\n <mat-option *ngFor=\"let option of searchOptions | async\" [value]=\"option\">\r\n {{ option | function: displayFn }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n\r\n <mat-icon *ngIf=\"!hasValue\" matSuffix [ngClass]=\"{ 'search-icon-disabled': isDisabled }\">search</mat-icon>\r\n <mat-error [bdbFormError]=\"searchCtrl\"> </mat-error>\r\n <mat-hint>{{ hint }}</mat-hint>\r\n </mat-form-field>\r\n</div>\r\n", styles: [".search-container{position:relative}.search-disabled-cover{position:absolute;width:100%;height:100%;z-index:10;display:flex;justify-content:flex-end;align-items:flex-start;padding:4px}.search-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: BdbFormErrorDirective, selector: "[bdbFormError]", inputs: ["bdbFormError"] }, { kind: "pipe", type: FunctionPipe, name: "function" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
736
+ }
737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbSearchComponent, decorators: [{
738
+ type: Component,
739
+ args: [{ selector: 'bdb-search', standalone: true, imports: [
740
+ CommonModule,
741
+ MatIconModule,
742
+ MatFormFieldModule,
743
+ MatInputModule,
744
+ ReactiveFormsModule,
745
+ MatAutocompleteModule,
746
+ BdbFormErrorDirective,
747
+ FunctionPipe,
748
+ MatButtonModule,
749
+ ], template: "<div class=\"search-container\">\r\n <div class=\"search-disabled-cover\" *ngIf=\"hasValue\">\r\n <button #clearButton mat-icon-button type=\"button\" [disabled]=\"isDisabled\" (click)=\"clear()\" color=\"danger\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n </div>\r\n <mat-form-field class=\"search-form-field\">\r\n <mat-label>{{ label }}</mat-label>\r\n <input\r\n type=\"text\"\r\n matInput\r\n [formControl]=\"searchCtrl\"\r\n [matAutocomplete]=\"autoComplete\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n #searchInput\r\n [tabIndex]=\"inputTabIndex\"\r\n [placeholder]=\"placeholder\" />\r\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"selectOption($event)\" [displayWith]=\"displayFn\">\r\n <mat-option *ngFor=\"let option of searchOptions | async\" [value]=\"option\">\r\n {{ option | function: displayFn }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n\r\n <mat-icon *ngIf=\"!hasValue\" matSuffix [ngClass]=\"{ 'search-icon-disabled': isDisabled }\">search</mat-icon>\r\n <mat-error [bdbFormError]=\"searchCtrl\"> </mat-error>\r\n <mat-hint>{{ hint }}</mat-hint>\r\n </mat-form-field>\r\n</div>\r\n", styles: [".search-container{position:relative}.search-disabled-cover{position:absolute;width:100%;height:100%;z-index:10;display:flex;justify-content:flex-end;align-items:flex-start;padding:4px}.search-form-field{width:100%}\n"] }]
750
+ }], ctorParameters: () => [{ type: i3.NgControl, decorators: [{
751
+ type: Optional
752
+ }, {
753
+ type: Self
754
+ }] }], propDecorators: { dataSource: [{
755
+ type: Input
756
+ }], displayFn: [{
757
+ type: Input
758
+ }], label: [{
759
+ type: Input
760
+ }], hint: [{
761
+ type: Input
762
+ }], placeholder: [{
763
+ type: Input
764
+ }], searchInput: [{
765
+ type: ViewChild,
766
+ args: ['searchInput']
767
+ }], clearButton: [{
768
+ type: ViewChild,
769
+ args: ['clearButton']
770
+ }], autoCompleteTrigger: [{
771
+ type: ViewChild,
772
+ args: [MatAutocompleteTrigger]
773
+ }] } });
774
+
775
+ class BdbCellDirective {
776
+ constructor(templateRef) {
777
+ this.templateRef = templateRef;
778
+ this.bdbCellDef = '';
779
+ }
780
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbCellDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
781
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: BdbCellDirective, isStandalone: true, selector: "ng-template[bdbCellDef]", inputs: { bdbCellDef: "bdbCellDef" }, ngImport: i0 }); }
782
+ }
783
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbCellDirective, decorators: [{
784
+ type: Directive,
785
+ args: [{
786
+ selector: 'ng-template[bdbCellDef]',
787
+ standalone: true,
788
+ }]
789
+ }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { bdbCellDef: [{
790
+ type: Input
791
+ }] } });
792
+
793
+ var BdbColumnType;
794
+ (function (BdbColumnType) {
795
+ BdbColumnType["String"] = "String";
796
+ BdbColumnType["Number"] = "Number";
797
+ BdbColumnType["Percentage"] = "Percentage";
798
+ BdbColumnType["Currency"] = "Currency";
799
+ BdbColumnType["Date"] = "Date";
800
+ BdbColumnType["Boolean"] = "Boolean";
801
+ BdbColumnType["Enum"] = "Enum";
802
+ BdbColumnType["Custom"] = "Custom";
803
+ })(BdbColumnType || (BdbColumnType = {}));
804
+
805
+ class BdbColumnBuilder {
806
+ build(...columns) {
807
+ return columns;
808
+ }
809
+ string(field, title, options = {}) {
810
+ const ret = this._buildCommonOptions(BdbColumnType.String, field, title, options);
811
+ ret.pipe = options.pipe;
812
+ return ret;
813
+ }
814
+ number(field, title, options = {}) {
815
+ options.textAlign = options.textAlign ?? 'end';
816
+ const ret = this._buildCommonOptions(BdbColumnType.Number, field, title, options);
817
+ ret.format = options.format;
818
+ return ret;
819
+ }
820
+ percentage(field, title, options = {}) {
821
+ options.textAlign = options.textAlign ?? 'end';
822
+ const ret = this._buildCommonOptions(BdbColumnType.Percentage, field, title, options);
823
+ ret.digitsInfo = options.digitsInfo;
824
+ ret.locale = options.locale;
825
+ return ret;
826
+ }
827
+ currency(field, title, options = {}) {
828
+ options.textAlign = options.textAlign ?? 'end';
829
+ const ret = this._buildCommonOptions(BdbColumnType.Currency, field, title, options);
830
+ ret.currencyCode = options.currencyCode;
831
+ ret.display = options.display;
832
+ ret.digitsInfo = options.digitsInfo;
833
+ ret.locale = options.locale;
834
+ return ret;
835
+ }
836
+ date(field, title, options = {}) {
837
+ options.textAlign = options.textAlign ?? 'end';
838
+ const ret = this._buildCommonOptions(BdbColumnType.Date, field, title, options);
839
+ ret.format = options.format ?? 'short';
840
+ if (ret.width === undefined) {
841
+ switch (ret.format) {
842
+ case 'short':
843
+ ret.width = 144;
844
+ break;
845
+ case 'shortDate':
846
+ ret.width = 96;
847
+ break;
848
+ }
849
+ }
850
+ return ret;
851
+ }
852
+ boolean(field, title, options = {}) {
853
+ const ret = this._buildCommonOptions(BdbColumnType.Boolean, field, title, options);
854
+ ret.icon = options.icon ?? true;
855
+ return ret;
856
+ }
857
+ enum(field, title, options = {}) {
858
+ const ret = this._buildCommonOptions(BdbColumnType.Enum, field, title, options);
859
+ ret.pipe = options.pipe;
860
+ return ret;
861
+ }
862
+ custom(id, title, options = {}) {
863
+ return {
864
+ type: BdbColumnType.Custom,
865
+ id: id,
866
+ title: title,
867
+ field: () => undefined,
868
+ sortDisabled: options.sortDisabled ?? true,
869
+ width: options.width,
870
+ textAlign: options.textAlign,
871
+ };
872
+ }
873
+ _buildCommonOptions(type, field, title, options = undefined) {
874
+ const fxString = field.toString();
875
+ const id = options?.id ?? fxString.substring(fxString.lastIndexOf('.') + 1).trim();
876
+ return {
877
+ type: type,
878
+ id: id,
879
+ title: title,
880
+ field: field,
881
+ sortDisabled: options?.sortDisabled,
882
+ width: options?.width,
883
+ textAlign: options?.textAlign,
884
+ };
885
+ }
886
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbColumnBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
887
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbColumnBuilder, providedIn: 'root' }); }
888
+ }
889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbColumnBuilder, decorators: [{
890
+ type: Injectable,
891
+ args: [{
892
+ providedIn: 'root',
893
+ }]
894
+ }] });
895
+
896
+ function mixinColor(base, defaultColor) {
897
+ return class extends base {
898
+ get color() {
899
+ return this._color;
900
+ }
901
+ set color(value) {
902
+ const colorPalette = value || this.defaultColor;
903
+ if (colorPalette !== this._color) {
904
+ if (this._color) {
905
+ this._elementRef.nativeElement.classList.remove(`bdb-${this._color}`);
906
+ }
907
+ if (colorPalette) {
908
+ this._elementRef.nativeElement.classList.add(`bdb-${colorPalette}`);
909
+ }
910
+ this._color = colorPalette;
911
+ }
912
+ }
913
+ constructor(...args) {
914
+ super(...args);
915
+ this.defaultColor = defaultColor;
916
+ // Set the default color that can be specified from the mixin.
917
+ this.color = defaultColor;
918
+ }
919
+ };
920
+ }
921
+
922
+ // Boilerplate for applying mixins to BdbAlert.
923
+ const _BdbAlertBase = mixinColor(class {
924
+ constructor(_elementRef) {
925
+ this._elementRef = _elementRef;
926
+ }
927
+ });
928
+ class BdbAlertComponent extends _BdbAlertBase {
929
+ constructor(elementRef) {
930
+ super(elementRef);
931
+ this.class = 'bdb-alert';
932
+ this.label = '';
933
+ this.icon = 'task_alt';
934
+ this.inline = false;
935
+ }
936
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbAlertComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
937
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbAlertComponent, isStandalone: true, selector: "bdb-alert", inputs: { color: "color", label: "label", icon: "icon", inline: "inline" }, host: { properties: { "class": "this.class" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"bdb-alert-wrapper\" [ngStyle]=\"{ display: inline ? 'inline-flex' : 'flex' }\">\r\n <div class=\"bdb-icon-container\">\r\n <mat-icon>{{ icon }}</mat-icon>\r\n </div>\r\n <div class=\"content-container\">\r\n <div>\r\n <div class=\"label\">\r\n {{ label }}\r\n </div>\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".bdb-alert-wrapper{border-radius:4px;border:1px solid}.bdb-alert-wrapper .bdb-icon-container{min-height:100%;min-width:48px;display:flex;justify-content:center;align-items:center}.bdb-alert-wrapper .inline{max-width:100%}.content-container{padding:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
938
+ }
939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbAlertComponent, decorators: [{
940
+ type: Component,
941
+ args: [{ selector: 'bdb-alert', standalone: true, imports: [CommonModule, MatIconModule], template: "<div class=\"bdb-alert-wrapper\" [ngStyle]=\"{ display: inline ? 'inline-flex' : 'flex' }\">\r\n <div class=\"bdb-icon-container\">\r\n <mat-icon>{{ icon }}</mat-icon>\r\n </div>\r\n <div class=\"content-container\">\r\n <div>\r\n <div class=\"label\">\r\n {{ label }}\r\n </div>\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".bdb-alert-wrapper{border-radius:4px;border:1px solid}.bdb-alert-wrapper .bdb-icon-container{min-height:100%;min-width:48px;display:flex;justify-content:center;align-items:center}.bdb-alert-wrapper .inline{max-width:100%}.content-container{padding:8px}\n"] }]
942
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { class: [{
943
+ type: HostBinding,
944
+ args: ['class']
945
+ }], color: [{
946
+ type: Input
947
+ }], label: [{
948
+ type: Input
949
+ }], icon: [{
950
+ type: Input
951
+ }], inline: [{
952
+ type: Input
953
+ }] } });
954
+
955
+ const LoginFailed = 'LOGIN_FAILED';
956
+ const LoginNotAllowed = 'LOGIN_NOT_ALLOWED';
957
+ const LoginRequiredTwoFactor = 'LOGIN_REQUIRES_TWO_FACTOR';
958
+ const LockedOut = 'LOCKED_OUT';
959
+ class BdbAlertErrorResponseComponent {
960
+ constructor() {
961
+ this.loginFailed = false;
962
+ this.color = 'danger';
963
+ this.icon = 'error_outline';
964
+ this.label = 'Onbekende fout';
965
+ this.message = '';
966
+ }
967
+ validationFailures() {
968
+ if (this.value && this.value.error && this.value.error.errors) {
969
+ const ret = [];
970
+ const pd = this.value.error;
971
+ if (pd.errors) {
972
+ const errors = pd.errors;
973
+ Object.keys(errors).forEach((x) => ret.push(`${errors[x]}`));
974
+ }
975
+ return ret;
976
+ }
977
+ return null;
978
+ }
979
+ ngOnChanges() {
980
+ this.errorCode = undefined;
981
+ this.color = 'danger';
982
+ if (this.value) {
983
+ switch (this.value.status) {
984
+ case 0:
985
+ this.label = 'Communicatie mislukt';
986
+ this.message = 'Controleer uw internetverbinding';
987
+ break;
988
+ case 400:
989
+ this.color = 'warn';
990
+ this.icon = 'warning';
991
+ this.label = 'Invoerfout';
992
+ break;
993
+ case 401:
994
+ if (this.value.error === LoginFailed) {
995
+ this.label = 'Inloggen mislukt';
996
+ this.message = 'Controleer gegevens en probeer opnieuw';
997
+ }
998
+ else if (this.value.error === LoginNotAllowed) {
999
+ this.label = 'Inloggen mislukt';
1000
+ this.message = 'Login niet toegestaan';
1001
+ }
1002
+ else if (this.value.error === LockedOut) {
1003
+ this.color = 'warn';
1004
+ this.icon = 'warning';
1005
+ this.label = 'Tijdelijk geblokkeerd';
1006
+ this.message = 'Te veel mislukte inlogpogingen';
1007
+ }
1008
+ else if (this.value.error === LoginRequiredTwoFactor) {
1009
+ this.label = 'Inloggen mislukt';
1010
+ this.message = 'Tweestapsverificatie vereist';
1011
+ }
1012
+ else {
1013
+ this.label = 'Onbevoegd';
1014
+ this.message = 'U bent niet bevoegd voor de gevraagde actie';
1015
+ }
1016
+ break;
1017
+ case 403:
1018
+ this.label = 'Toegang geweigerd';
1019
+ this.message = 'Onvoldoende rechten voor de gevraagde actie';
1020
+ break;
1021
+ case 404:
1022
+ this.label = 'Niet gevonden';
1023
+ this.message = 'De opgevraagde bron kon niet worden gevonden';
1024
+ break;
1025
+ case 415:
1026
+ this.label = 'Mediatype niet ondersteund';
1027
+ this.message = this.value.error;
1028
+ break;
1029
+ case 500: {
1030
+ this.label = this.value.error?.title ?? 'Fout bij afhandeling';
1031
+ const errorDetail = this.value.error?.exceptionLogCode;
1032
+ if (errorDetail && errorDetail.match(/[A-Z0-9]{6}/g)) {
1033
+ this.errorCode = `${errorDetail.slice(0, 2)}-${errorDetail.slice(2, 4)}-${errorDetail.slice(4)}`;
1034
+ }
1035
+ else {
1036
+ this.message = this.value.error?.detail;
1037
+ }
1038
+ break;
1039
+ }
1040
+ default:
1041
+ this.label = 'Onbekende fout';
1042
+ this.message = 'Status: ' + this.value.status;
1043
+ break;
1044
+ }
1045
+ }
1046
+ }
1047
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbAlertErrorResponseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1048
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbAlertErrorResponseComponent, isStandalone: true, selector: "bdb-alert-error-response", inputs: { value: "value" }, usesOnChanges: true, ngImport: i0, template: "<bdb-alert [color]=\"color\" [icon]=\"icon\" [label]=\"label\" *ngIf=\"value\">\r\n <ng-container [ngSwitch]=\"value.status\">\r\n <ng-container *ngSwitchCase=\"400\">\r\n <div *ngFor=\"let message of validationFailures()\">{{ message }}</div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"500\">\r\n <div *ngIf=\"errorCode; else displayMessage\">\r\n Foutcode voor technische ondersteuning: <strong>{{ errorCode }}</strong>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"displayMessage\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</bdb-alert>\r\n\r\n<ng-template #displayMessage>\r\n {{ message }}\r\n</ng-template>\r\n", styles: [".alert{padding:8px;border-radius:4px;border:1px solid}.alert.warn{background-color:#fbe9e7;border-color:#d84315}.alert.danger{background-color:#ffebee;border-color:#c62828}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: BdbAlertComponent, selector: "bdb-alert", inputs: ["color", "label", "icon", "inline"] }] }); }
1049
+ }
1050
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbAlertErrorResponseComponent, decorators: [{
1051
+ type: Component,
1052
+ args: [{ selector: 'bdb-alert-error-response', standalone: true, imports: [CommonModule, BdbAlertComponent], template: "<bdb-alert [color]=\"color\" [icon]=\"icon\" [label]=\"label\" *ngIf=\"value\">\r\n <ng-container [ngSwitch]=\"value.status\">\r\n <ng-container *ngSwitchCase=\"400\">\r\n <div *ngFor=\"let message of validationFailures()\">{{ message }}</div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"500\">\r\n <div *ngIf=\"errorCode; else displayMessage\">\r\n Foutcode voor technische ondersteuning: <strong>{{ errorCode }}</strong>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"displayMessage\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</bdb-alert>\r\n\r\n<ng-template #displayMessage>\r\n {{ message }}\r\n</ng-template>\r\n", styles: [".alert{padding:8px;border-radius:4px;border:1px solid}.alert.warn{background-color:#fbe9e7;border-color:#d84315}.alert.danger{background-color:#ffebee;border-color:#c62828}\n"] }]
1053
+ }], propDecorators: { value: [{
1054
+ type: Input
1055
+ }] } });
1056
+
1057
+ class DynamicPipe {
1058
+ constructor(injector) {
1059
+ this.injector = injector;
1060
+ }
1061
+ transform(value, requiredPipe, pipeArgs) {
1062
+ const injector = Injector.create({
1063
+ name: 'DynamicPipe',
1064
+ parent: this.injector,
1065
+ providers: [{ provide: requiredPipe }],
1066
+ });
1067
+ const pipe = injector.get(requiredPipe);
1068
+ return pipe.transform(value, pipeArgs);
1069
+ }
1070
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: DynamicPipe, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Pipe }); }
1071
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: DynamicPipe, isStandalone: true, name: "dynamicPipe" }); }
1072
+ }
1073
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: DynamicPipe, decorators: [{
1074
+ type: Pipe,
1075
+ args: [{
1076
+ name: 'dynamicPipe',
1077
+ standalone: true,
1078
+ }]
1079
+ }], ctorParameters: () => [{ type: i0.Injector }] });
1080
+
1081
+ class BdbBooleanDisplayComponent {
1082
+ constructor() {
1083
+ this.class = 'bdb-boolean-display';
1084
+ }
1085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbBooleanDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1086
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbBooleanDisplayComponent, isStandalone: true, selector: "bdb-boolean-display", inputs: { value: "value" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<mat-icon *ngIf=\"value === false\" class=\"false\">clear</mat-icon>\r\n<mat-icon *ngIf=\"value === true\" class=\"true\">check</mat-icon>\r\n", styles: [".false,.true{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
1087
+ }
1088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbBooleanDisplayComponent, decorators: [{
1089
+ type: Component,
1090
+ args: [{ selector: 'bdb-boolean-display', standalone: true, imports: [CommonModule, MatIconModule], template: "<mat-icon *ngIf=\"value === false\" class=\"false\">clear</mat-icon>\r\n<mat-icon *ngIf=\"value === true\" class=\"true\">check</mat-icon>\r\n", styles: [".false,.true{display:block}\n"] }]
1091
+ }], propDecorators: { class: [{
1092
+ type: HostBinding,
1093
+ args: ['class']
1094
+ }], value: [{
1095
+ type: Input
1096
+ }] } });
1097
+
1098
+ class BdbTableComponent {
1099
+ constructor() {
1100
+ this._onDestroy = new Subject();
1101
+ this.columns = [];
1102
+ this.displayedColumns = [];
1103
+ this.contextActions = [];
1104
+ this.selectOnRowClick = true;
1105
+ this.selectedRowClass = 'selected';
1106
+ this.isClickable = true;
1107
+ this.rowClick = new EventEmitter();
1108
+ this.contextAction = new EventEmitter();
1109
+ this.columnType = BdbColumnType;
1110
+ this.contextMenuPosition = { x: '0px', y: '0px' };
1111
+ this.trackById = (_, item) => {
1112
+ return item.id;
1113
+ };
1114
+ }
1115
+ ngOnInit() {
1116
+ this.load();
1117
+ }
1118
+ ngOnChanges() {
1119
+ if (this.columns && !this.displayedColumns.length) {
1120
+ this.displayedColumns = this.columns.map(x => x.id);
1121
+ }
1122
+ if (this.selection?.isMultipleSelection() && !(this.displayedColumns[0] === 'selection')) {
1123
+ this.displayedColumns.unshift('selection');
1124
+ }
1125
+ }
1126
+ ngAfterContentInit() {
1127
+ this.setColumnTemplates();
1128
+ }
1129
+ ngOnDestroy() {
1130
+ this._onDestroy.next();
1131
+ this._onDestroy.complete();
1132
+ }
1133
+ load() {
1134
+ this.error = undefined;
1135
+ this.dataSource.load();
1136
+ }
1137
+ setColumnTemplates() {
1138
+ const templates = this.cellTemplates;
1139
+ if (templates == undefined || !this.cellTemplates?.length) {
1140
+ return;
1141
+ }
1142
+ if (this.columns && this.columns.length) {
1143
+ this.columns.forEach(x => {
1144
+ const tpl = templates.filter(y => y.bdbCellDef === x.id)[0];
1145
+ if (tpl) {
1146
+ x.template = tpl.templateRef;
1147
+ }
1148
+ });
1149
+ }
1150
+ }
1151
+ onRowClick(row) {
1152
+ if (this.selection && this.selectOnRowClick) {
1153
+ this.selection.toggle(row);
1154
+ }
1155
+ this.rowClick.emit(row);
1156
+ }
1157
+ // SORT
1158
+ sortData(event) {
1159
+ const column = this.columns.find(x => x.id === event.active);
1160
+ if (column) {
1161
+ const fxString = column.field.toString();
1162
+ this.dataSource.request.sortField = fxString.substring(fxString.lastIndexOf('.') + 1).trim();
1163
+ this.dataSource.request.sortDirection = event.direction;
1164
+ this.dataSource.load();
1165
+ }
1166
+ }
1167
+ // CONTEXT MENU
1168
+ onContextMenu(event, row) {
1169
+ event.preventDefault();
1170
+ if (this.contextActions && this.contextActions.length) {
1171
+ this.contextMenuPosition.x = event.clientX + 'px';
1172
+ this.contextMenuPosition.y = event.clientY + 'px';
1173
+ this.contextMenu.menuData = { row: row };
1174
+ if (this.contextMenu.menu) {
1175
+ this.contextMenu.menu.focusFirstItem('mouse');
1176
+ }
1177
+ this.contextMenu.openMenu();
1178
+ }
1179
+ }
1180
+ onContextMenuAction(action, row) {
1181
+ this.contextAction.emit({ action: action, row: row });
1182
+ }
1183
+ isAllSelected() {
1184
+ if (!this.selection) {
1185
+ return false;
1186
+ }
1187
+ return this.dataSource.data.every(x => this.selection?.isSelected(x));
1188
+ }
1189
+ anySelected() {
1190
+ if (!this.selection) {
1191
+ return false;
1192
+ }
1193
+ return this.dataSource.data.some(x => this.selection?.isSelected(x));
1194
+ }
1195
+ toggleAllRows() {
1196
+ if (!(this.selection && this.dataSource)) {
1197
+ return;
1198
+ }
1199
+ if (this.isAllSelected()) {
1200
+ this.selection.deselect(...this.dataSource.data);
1201
+ }
1202
+ else {
1203
+ this.selection.select(...this.dataSource.data);
1204
+ }
1205
+ }
1206
+ rowClass(row) {
1207
+ if (!(this.selection || this.rowColor)) {
1208
+ return undefined;
1209
+ }
1210
+ const ret = {};
1211
+ if (this.selection) {
1212
+ ret[this.selectedRowClass] = this.selection.isSelected(row);
1213
+ }
1214
+ if (this.rowColor) {
1215
+ const palette = this.rowColor(row);
1216
+ if (palette) {
1217
+ ret['bdb-' + palette] = true;
1218
+ }
1219
+ else if (!this.selection) {
1220
+ return undefined;
1221
+ }
1222
+ }
1223
+ return ret;
1224
+ }
1225
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1226
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbTableComponent, isStandalone: true, selector: "bdb-table[dataSource]", inputs: { columns: "columns", dataSource: "dataSource", displayedColumns: "displayedColumns", contextActions: "contextActions", selection: "selection", selectOnRowClick: "selectOnRowClick", selectedRowClass: "selectedRowClass", isClickable: "isClickable", rowColor: "rowColor" }, outputs: { rowClick: "rowClick", contextAction: "contextAction" }, queries: [{ propertyName: "cellTemplates", predicate: BdbCellDirective, descendants: true }], viewQueries: [{ propertyName: "contextMenu", first: true, predicate: MatMenuTrigger, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"bdb-table-container\">\r\n <table\r\n mat-table\r\n class=\"bdb-table\"\r\n [class.is-clickable]=\"isClickable\"\r\n [dataSource]=\"dataSource\"\r\n matSort\r\n (matSortChange)=\"sortData($event)\"\r\n *ngIf=\"dataSource\"\r\n [trackBy]=\"trackById\">\r\n <ng-container matColumnDef=\"selection\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"anySelected() && !isAllSelected()\"\r\n color=\"primary\"\r\n *ngIf=\"selection\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"\r\n color=\"accent\"\r\n *ngIf=\"selection\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container [matColumnDef]=\"column.id\" *ngFor=\"let column of columns\">\r\n <ng-container>\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n mat-sort-header=\"{{ column.id }}\"\r\n [disabled]=\"column.sortDisabled\"\r\n [width]=\"column.width\"\r\n [ngClass]=\"{ 'text-end': column.textAlign && column.textAlign === 'end' }\"\r\n [arrowPosition]=\"column.textAlign && column.textAlign === 'end' ? 'before' : 'after'\">\r\n {{ column.title }}\r\n </th>\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let row\" [ngClass]=\"{ 'text-end': column.textAlign && column.textAlign === 'end' }\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n column.template ? column.template : cellTemplate;\r\n context: { $implicit: row, column: column }\r\n \"></ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns\"\r\n (click)=\"onRowClick(row)\"\r\n [ngClass]=\"rowClass(row)\"\r\n (contextmenu)=\"onContextMenu($event, row)\"></tr>\r\n\r\n <tr class=\"mat-row\" *matNoDataRow>\r\n <td class=\"mat-cell\" [colSpan]=\"displayedColumns.length\">\r\n <bdb-alert-error-response\r\n [value]=\"dataSource.error$ | async\"\r\n *ngIf=\"dataSource && (dataSource.error$ | async); else noData\"></bdb-alert-error-response>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n\r\n<ng-content></ng-content>\r\n\r\n<ng-template #cellTemplate let-row let-column=\"column\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n column.pipe ? pipedCellTemplate : defaultCellTemplate;\r\n context: { $implicit: row, column: column }\r\n \"></ng-container>\r\n</ng-template>\r\n\r\n<ng-template #pipedCellTemplate let-column=\"column\" let-row>\r\n {{ column.field(row) | dynamicPipe: column.pipe : null }}\r\n</ng-template>\r\n\r\n<ng-template #defaultCellTemplate let-row let-column=\"column\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"columnType.String\">{{ column.field(row) }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Number\">{{ column.field(row) | number: column.format }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Percentage\">{{\r\n column.field(row) | percent: column.digitsInfo : column.locale\r\n }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Currency\">{{\r\n column.field(row) | currency: column.currencyCode : column.display : column.digitsInfo : column.locale\r\n }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Date\"> {{ column.field(row) | date: column.format }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Boolean\">\r\n <bdb-boolean-display [value]=\"column.field(row)\"></bdb-boolean-display>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Enum\">{{ column.field(row) }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Custom\">*?*</ng-container>\r\n <ng-container *ngSwitchDefault>{{ column.field(row) | json }}</ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #noData>\r\n <div class=\"no-data\"><em>Geen gegevens gevonden</em></div>\r\n</ng-template>\r\n\r\n<div\r\n style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"contextMenu\"></div>\r\n<mat-menu #contextMenu=\"matMenu\" #contextMenu2=\"matMenu\">\r\n <ng-template matMenuContent let-row=\"row\">\r\n <ng-container *ngFor=\"let action of contextActions\">\r\n <button\r\n mat-menu-item\r\n (click)=\"onContextMenuAction(action, row)\"\r\n *ngIf=\"action.condition === undefined || action.condition(row)\">\r\n <mat-icon [color]=\"action.color\">{{ action.icon }}</mat-icon> {{ action.label }}\r\n </button>\r\n </ng-container>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: [".bdb-table{width:100%}.bdb-table.is-clickable tr:hover{cursor:pointer}.bdb-table-container{height:100%;overflow:auto}.bdb-table-container::-webkit-scrollbar{width:4px}.bdb-table-container::-webkit-scrollbar-thumb{background-color:#0003}.bdb-table-container::-webkit-scrollbar-track{background-color:#0000001a}.text-end{text-align:end}.no-data{color:#00000080;padding:8px}.mat-mdc-header-row .mat-mdc-header-cell{padding-left:8px;padding-right:8px}.mat-mdc-header-row .mat-mdc-header-cell:first-of-type{padding-left:24px}.mat-mdc-header-row .mat-mdc-header-cell:last-of-type{padding-right:24px}.mat-mdc-row .mat-mdc-cell{padding-left:8px;padding-right:8px}.mat-mdc-row .mat-mdc-cell:first-of-type{padding-left:24px}.mat-mdc-row .mat-mdc-cell:last-of-type{padding-right:24px}.mat-column-selection{width:48px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.PercentPipe, name: "percent" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: BdbAlertErrorResponseComponent, selector: "bdb-alert-error-response", inputs: ["value"] }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }, { kind: "component", type: BdbBooleanDisplayComponent, selector: "bdb-boolean-display", inputs: ["value"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i5$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
1227
+ }
1228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbTableComponent, decorators: [{
1229
+ type: Component,
1230
+ args: [{ selector: 'bdb-table[dataSource]', standalone: true, imports: [
1231
+ CommonModule,
1232
+ MatTableModule,
1233
+ MatCheckboxModule,
1234
+ MatSortModule,
1235
+ BdbAlertErrorResponseComponent,
1236
+ DynamicPipe,
1237
+ BdbBooleanDisplayComponent,
1238
+ MatMenuModule,
1239
+ MatIconModule,
1240
+ ], template: "<div class=\"bdb-table-container\">\r\n <table\r\n mat-table\r\n class=\"bdb-table\"\r\n [class.is-clickable]=\"isClickable\"\r\n [dataSource]=\"dataSource\"\r\n matSort\r\n (matSortChange)=\"sortData($event)\"\r\n *ngIf=\"dataSource\"\r\n [trackBy]=\"trackById\">\r\n <ng-container matColumnDef=\"selection\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"anySelected() && !isAllSelected()\"\r\n color=\"primary\"\r\n *ngIf=\"selection\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"\r\n color=\"accent\"\r\n *ngIf=\"selection\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container [matColumnDef]=\"column.id\" *ngFor=\"let column of columns\">\r\n <ng-container>\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n mat-sort-header=\"{{ column.id }}\"\r\n [disabled]=\"column.sortDisabled\"\r\n [width]=\"column.width\"\r\n [ngClass]=\"{ 'text-end': column.textAlign && column.textAlign === 'end' }\"\r\n [arrowPosition]=\"column.textAlign && column.textAlign === 'end' ? 'before' : 'after'\">\r\n {{ column.title }}\r\n </th>\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let row\" [ngClass]=\"{ 'text-end': column.textAlign && column.textAlign === 'end' }\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n column.template ? column.template : cellTemplate;\r\n context: { $implicit: row, column: column }\r\n \"></ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns\"\r\n (click)=\"onRowClick(row)\"\r\n [ngClass]=\"rowClass(row)\"\r\n (contextmenu)=\"onContextMenu($event, row)\"></tr>\r\n\r\n <tr class=\"mat-row\" *matNoDataRow>\r\n <td class=\"mat-cell\" [colSpan]=\"displayedColumns.length\">\r\n <bdb-alert-error-response\r\n [value]=\"dataSource.error$ | async\"\r\n *ngIf=\"dataSource && (dataSource.error$ | async); else noData\"></bdb-alert-error-response>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n\r\n<ng-content></ng-content>\r\n\r\n<ng-template #cellTemplate let-row let-column=\"column\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n column.pipe ? pipedCellTemplate : defaultCellTemplate;\r\n context: { $implicit: row, column: column }\r\n \"></ng-container>\r\n</ng-template>\r\n\r\n<ng-template #pipedCellTemplate let-column=\"column\" let-row>\r\n {{ column.field(row) | dynamicPipe: column.pipe : null }}\r\n</ng-template>\r\n\r\n<ng-template #defaultCellTemplate let-row let-column=\"column\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"columnType.String\">{{ column.field(row) }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Number\">{{ column.field(row) | number: column.format }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Percentage\">{{\r\n column.field(row) | percent: column.digitsInfo : column.locale\r\n }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Currency\">{{\r\n column.field(row) | currency: column.currencyCode : column.display : column.digitsInfo : column.locale\r\n }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Date\"> {{ column.field(row) | date: column.format }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Boolean\">\r\n <bdb-boolean-display [value]=\"column.field(row)\"></bdb-boolean-display>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Enum\">{{ column.field(row) }}</ng-container>\r\n <ng-container *ngSwitchCase=\"columnType.Custom\">*?*</ng-container>\r\n <ng-container *ngSwitchDefault>{{ column.field(row) | json }}</ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #noData>\r\n <div class=\"no-data\"><em>Geen gegevens gevonden</em></div>\r\n</ng-template>\r\n\r\n<div\r\n style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"contextMenu\"></div>\r\n<mat-menu #contextMenu=\"matMenu\" #contextMenu2=\"matMenu\">\r\n <ng-template matMenuContent let-row=\"row\">\r\n <ng-container *ngFor=\"let action of contextActions\">\r\n <button\r\n mat-menu-item\r\n (click)=\"onContextMenuAction(action, row)\"\r\n *ngIf=\"action.condition === undefined || action.condition(row)\">\r\n <mat-icon [color]=\"action.color\">{{ action.icon }}</mat-icon> {{ action.label }}\r\n </button>\r\n </ng-container>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: [".bdb-table{width:100%}.bdb-table.is-clickable tr:hover{cursor:pointer}.bdb-table-container{height:100%;overflow:auto}.bdb-table-container::-webkit-scrollbar{width:4px}.bdb-table-container::-webkit-scrollbar-thumb{background-color:#0003}.bdb-table-container::-webkit-scrollbar-track{background-color:#0000001a}.text-end{text-align:end}.no-data{color:#00000080;padding:8px}.mat-mdc-header-row .mat-mdc-header-cell{padding-left:8px;padding-right:8px}.mat-mdc-header-row .mat-mdc-header-cell:first-of-type{padding-left:24px}.mat-mdc-header-row .mat-mdc-header-cell:last-of-type{padding-right:24px}.mat-mdc-row .mat-mdc-cell{padding-left:8px;padding-right:8px}.mat-mdc-row .mat-mdc-cell:first-of-type{padding-left:24px}.mat-mdc-row .mat-mdc-cell:last-of-type{padding-right:24px}.mat-column-selection{width:48px}\n"] }]
1241
+ }], propDecorators: { columns: [{
1242
+ type: Input
1243
+ }], dataSource: [{
1244
+ type: Input
1245
+ }], displayedColumns: [{
1246
+ type: Input
1247
+ }], contextActions: [{
1248
+ type: Input
1249
+ }], selection: [{
1250
+ type: Input
1251
+ }], selectOnRowClick: [{
1252
+ type: Input
1253
+ }], selectedRowClass: [{
1254
+ type: Input
1255
+ }], isClickable: [{
1256
+ type: Input
1257
+ }], rowClick: [{
1258
+ type: Output
1259
+ }], contextAction: [{
1260
+ type: Output
1261
+ }], contextMenu: [{
1262
+ type: ViewChild,
1263
+ args: [MatMenuTrigger]
1264
+ }], cellTemplates: [{
1265
+ type: ContentChildren,
1266
+ args: [BdbCellDirective, { descendants: true }]
1267
+ }], rowColor: [{
1268
+ type: Input
1269
+ }] } });
1270
+
1271
+ class ExceptionLogTableComponent {
1272
+ constructor(cb, router, activatedRoute) {
1273
+ this.cb = cb;
1274
+ this.router = router;
1275
+ this.activatedRoute = activatedRoute;
1276
+ this.displayedColumns = [];
1277
+ this.rowClick = new EventEmitter();
1278
+ this.columns = this.cb.build(this.cb.string(x => x.message, 'Message'));
1279
+ this.contextActions = [
1280
+ {
1281
+ icon: 'search',
1282
+ color: 'primary',
1283
+ label: 'Details',
1284
+ identifier: 'details',
1285
+ },
1286
+ ];
1287
+ }
1288
+ onRowClick(row) {
1289
+ this.rowClick.emit(row);
1290
+ }
1291
+ onContextAction(event) {
1292
+ switch (event.action.identifier) {
1293
+ case 'details':
1294
+ this.router.navigate([event.row.id], { relativeTo: this.activatedRoute });
1295
+ break;
1296
+ }
1297
+ }
1298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ExceptionLogTableComponent, deps: [{ token: BdbColumnBuilder }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
1299
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: ExceptionLogTableComponent, isStandalone: true, selector: "bdb-exception-log-table[dataSource]", inputs: { dataSource: "dataSource", displayedColumns: "displayedColumns", contextActions: "contextActions" }, outputs: { rowClick: "rowClick" }, ngImport: i0, template: "<bdb-table\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource\"\r\n [displayedColumns]=\"displayedColumns\"\r\n [contextActions]=\"contextActions\"\r\n (rowClick)=\"onRowClick($event)\"\r\n (contextAction)=\"onContextAction($event)\">\r\n</bdb-table>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BdbTableComponent, selector: "bdb-table[dataSource]", inputs: ["columns", "dataSource", "displayedColumns", "contextActions", "selection", "selectOnRowClick", "selectedRowClass", "isClickable", "rowColor"], outputs: ["rowClick", "contextAction"] }] }); }
1300
+ }
1301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ExceptionLogTableComponent, decorators: [{
1302
+ type: Component,
1303
+ args: [{ selector: 'bdb-exception-log-table[dataSource]', standalone: true, imports: [CommonModule, BdbTableComponent], template: "<bdb-table\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource\"\r\n [displayedColumns]=\"displayedColumns\"\r\n [contextActions]=\"contextActions\"\r\n (rowClick)=\"onRowClick($event)\"\r\n (contextAction)=\"onContextAction($event)\">\r\n</bdb-table>\r\n" }]
1304
+ }], ctorParameters: () => [{ type: BdbColumnBuilder }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }], propDecorators: { dataSource: [{
1305
+ type: Input
1306
+ }], displayedColumns: [{
1307
+ type: Input
1308
+ }], rowClick: [{
1309
+ type: Output
1310
+ }], contextActions: [{
1311
+ type: Input
1312
+ }] } });
1313
+
1314
+ var TaskLogStatus;
1315
+ (function (TaskLogStatus) {
1316
+ TaskLogStatus["New"] = "New";
1317
+ TaskLogStatus["Running"] = "Running";
1318
+ TaskLogStatus["Waiting"] = "Waiting";
1319
+ TaskLogStatus["Completed"] = "Completed";
1320
+ })(TaskLogStatus || (TaskLogStatus = {}));
1321
+
1322
+ class TaskLogStatusPipe {
1323
+ transform(value) {
1324
+ switch (value) {
1325
+ case TaskLogStatus.New:
1326
+ return 'Nieuw';
1327
+ case TaskLogStatus.Running:
1328
+ return 'Lopend';
1329
+ case TaskLogStatus.Waiting:
1330
+ return 'Wachtend';
1331
+ case TaskLogStatus.Completed:
1332
+ return 'Afgerond';
1333
+ default:
1334
+ return '';
1335
+ }
1336
+ }
1337
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogStatusPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1338
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: TaskLogStatusPipe, isStandalone: true, name: "taskLogStatus" }); }
1339
+ }
1340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogStatusPipe, decorators: [{
1341
+ type: Pipe,
1342
+ args: [{
1343
+ name: 'taskLogStatus',
1344
+ standalone: true,
1345
+ }]
1346
+ }] });
1347
+
1348
+ var TaskLogOutcome;
1349
+ (function (TaskLogOutcome) {
1350
+ TaskLogOutcome["Noop"] = "Noop";
1351
+ TaskLogOutcome["Success"] = "Success";
1352
+ TaskLogOutcome["Info"] = "Info";
1353
+ TaskLogOutcome["Warning"] = "Warning";
1354
+ TaskLogOutcome["Error"] = "Error";
1355
+ })(TaskLogOutcome || (TaskLogOutcome = {}));
1356
+
1357
+ class TaskLogOutcomePipe {
1358
+ transform(value) {
1359
+ switch (value) {
1360
+ case TaskLogOutcome.Noop:
1361
+ return 'Noop';
1362
+ case TaskLogOutcome.Info:
1363
+ return 'Informatie';
1364
+ case TaskLogOutcome.Warning:
1365
+ return 'Waarschuwing';
1366
+ case TaskLogOutcome.Error:
1367
+ return 'Foutmelding';
1368
+ case TaskLogOutcome.Success:
1369
+ return 'Succes';
1370
+ default:
1371
+ return '';
1372
+ }
1373
+ }
1374
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogOutcomePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1375
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: TaskLogOutcomePipe, isStandalone: true, name: "taskLogOutcome" }); }
1376
+ }
1377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogOutcomePipe, decorators: [{
1378
+ type: Pipe,
1379
+ args: [{
1380
+ name: 'taskLogOutcome',
1381
+ standalone: true,
1382
+ }]
1383
+ }] });
1384
+
1385
+ var TaskLogParameterType;
1386
+ (function (TaskLogParameterType) {
1387
+ TaskLogParameterType["String"] = "String";
1388
+ TaskLogParameterType["Int"] = "Int";
1389
+ TaskLogParameterType["Decimal"] = "Decimal";
1390
+ TaskLogParameterType["Bool"] = "Bool";
1391
+ })(TaskLogParameterType || (TaskLogParameterType = {}));
1392
+
1393
+ class TaskLogParameterValuePipe {
1394
+ constructor(locale) {
1395
+ this.locale = locale;
1396
+ }
1397
+ transform(value) {
1398
+ switch (value.type) {
1399
+ case TaskLogParameterType.String:
1400
+ return value.stringValue ?? '';
1401
+ case TaskLogParameterType.Int:
1402
+ return !value.intValue
1403
+ ? ''
1404
+ : value.intValue.toLocaleString(this.locale, {
1405
+ minimumIntegerDigits: 1,
1406
+ });
1407
+ case TaskLogParameterType.Decimal:
1408
+ return !value.decimalValue
1409
+ ? ''
1410
+ : value.decimalValue.toLocaleString(this.locale, {
1411
+ minimumIntegerDigits: 1,
1412
+ maximumFractionDigits: 6,
1413
+ });
1414
+ case TaskLogParameterType.Bool:
1415
+ switch (value.boolValue) {
1416
+ case true:
1417
+ return 'Ja';
1418
+ case false:
1419
+ return 'Nee';
1420
+ default:
1421
+ return '';
1422
+ }
1423
+ }
1424
+ }
1425
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogParameterValuePipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
1426
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: TaskLogParameterValuePipe, isStandalone: true, name: "taskLogParameterValue" }); }
1427
+ }
1428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogParameterValuePipe, decorators: [{
1429
+ type: Pipe,
1430
+ args: [{
1431
+ name: 'taskLogParameterValue',
1432
+ standalone: true,
1433
+ }]
1434
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1435
+ type: Inject,
1436
+ args: [LOCALE_ID]
1437
+ }] }] });
1438
+
1439
+ class UserTableComponent {
1440
+ constructor(matDialog, cb) {
1441
+ this.matDialog = matDialog;
1442
+ this.cb = cb;
1443
+ this.displayedColumns = [];
1444
+ this.rowClick = new EventEmitter();
1445
+ this.columns = this.cb.build(this.cb.number(x => x.id, 'ID', { width: 75 }), this.cb.string(x => x.email, 'E-mail', { width: 250 }), this.cb.custom('roles', 'Rollen'));
1446
+ this.contextActions = [
1447
+ {
1448
+ icon: 'search',
1449
+ color: 'primary',
1450
+ label: 'Details',
1451
+ identifier: 'details',
1452
+ },
1453
+ { icon: 'edit', color: 'primary', label: 'Wijzigen', identifier: 'edit' },
1454
+ {
1455
+ icon: 'delete',
1456
+ color: 'warn',
1457
+ label: 'Verwijderen',
1458
+ identifier: 'delete',
1459
+ },
1460
+ ];
1461
+ }
1462
+ onRowClick(user) {
1463
+ this.rowClick.emit(user);
1464
+ }
1465
+ onContextAction(event) {
1466
+ // switch (event.action.identifier) {
1467
+ // case 'delete':
1468
+ // this.matDialog
1469
+ // .open(UserDeleteDialogComponent, { data: event.row })
1470
+ // .afterClosed()
1471
+ // .pipe(filter(x => !!x))
1472
+ // .subscribe(() => this.dataSource.load());
1473
+ // break;
1474
+ // case 'edit':
1475
+ // this.matDialog
1476
+ // .open(UserUpdateDialogComponent, { data: event.row })
1477
+ // .afterClosed()
1478
+ // .pipe(filter(x => !!x))
1479
+ // .subscribe(() => this.dataSource.load());
1480
+ // break;
1481
+ // }
1482
+ }
1483
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserTableComponent, deps: [{ token: i1$2.MatDialog }, { token: BdbColumnBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1484
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: UserTableComponent, isStandalone: true, selector: "bdb-user-table[dataSource]", inputs: { dataSource: "dataSource", displayedColumns: "displayedColumns", contextActions: "contextActions" }, outputs: { rowClick: "rowClick" }, ngImport: i0, template: "<bdb-table\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource\"\r\n (rowClick)=\"onRowClick($event)\"\r\n [contextActions]=\"contextActions\"\r\n (contextAction)=\"onContextAction($event)\"\r\n [displayedColumns]=\"displayedColumns\">\r\n <ng-template bdbCellDef=\"roles\" let-row>\r\n {{ row.roles }}\r\n </ng-template>\r\n</bdb-table>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BdbTableComponent, selector: "bdb-table[dataSource]", inputs: ["columns", "dataSource", "displayedColumns", "contextActions", "selection", "selectOnRowClick", "selectedRowClass", "isClickable", "rowColor"], outputs: ["rowClick", "contextAction"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: BdbCellDirective, selector: "ng-template[bdbCellDef]", inputs: ["bdbCellDef"] }] }); }
1485
+ }
1486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserTableComponent, decorators: [{
1487
+ type: Component,
1488
+ args: [{ selector: 'bdb-user-table[dataSource]', standalone: true, imports: [CommonModule, BdbTableComponent, MatDialogModule, BdbCellDirective], template: "<bdb-table\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource\"\r\n (rowClick)=\"onRowClick($event)\"\r\n [contextActions]=\"contextActions\"\r\n (contextAction)=\"onContextAction($event)\"\r\n [displayedColumns]=\"displayedColumns\">\r\n <ng-template bdbCellDef=\"roles\" let-row>\r\n {{ row.roles }}\r\n </ng-template>\r\n</bdb-table>\r\n" }]
1489
+ }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: BdbColumnBuilder }], propDecorators: { dataSource: [{
1490
+ type: Input
1491
+ }], displayedColumns: [{
1492
+ type: Input
1493
+ }], rowClick: [{
1494
+ type: Output
1495
+ }], contextActions: [{
1496
+ type: Input
1497
+ }] } });
1498
+
1499
+ class LayoutError extends Error {
1500
+ constructor(message) {
1501
+ super(message);
1502
+ }
1503
+ }
1504
+
1505
+ const DEFAULT_FLEX_DIRECTION = 'row';
1506
+ const DEFAULT_FLEX_GAP = '';
1507
+ const DEFAULT_FLEX_SPACING = {
1508
+ justify: 'start',
1509
+ align: 'stretch',
1510
+ };
1511
+ class BdbFlexDirective {
1512
+ constructor(element, renderer) {
1513
+ this.element = element;
1514
+ this.renderer = renderer;
1515
+ this.bdbFlex = '';
1516
+ this.bdbFlexDirection = '';
1517
+ this.bdbFlexGap = '';
1518
+ this.bdbFlexSpacing = '';
1519
+ }
1520
+ ngOnInit() {
1521
+ this.renderer.setStyle(this.element.nativeElement, 'display', 'flex');
1522
+ const bdbFlexInputs = this.bdbFlex.split(' ').filter(x => !!x);
1523
+ this.setDirection(bdbFlexInputs[0]);
1524
+ this.setGap(bdbFlexInputs[1]);
1525
+ this.setSpacing({
1526
+ justify: bdbFlexInputs[2],
1527
+ align: bdbFlexInputs[3],
1528
+ });
1529
+ }
1530
+ setDirection(bdbFlexInput) {
1531
+ const direction = this.validateDirection(this.getDirection(bdbFlexInput));
1532
+ this.renderer.setStyle(this.element.nativeElement, 'flex-direction', direction);
1533
+ }
1534
+ getDirection(bdbFlexInput) {
1535
+ const trimmedBdbFlexDirection = this.bdbFlexDirection.trim();
1536
+ if (trimmedBdbFlexDirection) {
1537
+ return trimmedBdbFlexDirection;
1538
+ }
1539
+ if (bdbFlexInput) {
1540
+ return bdbFlexInput;
1541
+ }
1542
+ return DEFAULT_FLEX_DIRECTION;
1543
+ }
1544
+ validateDirection(direction) {
1545
+ switch (direction) {
1546
+ case 'row':
1547
+ return 'row';
1548
+ case 'col':
1549
+ return 'column';
1550
+ default:
1551
+ throw new LayoutError(`'${direction}' is not a valid value for flex direction`);
1552
+ }
1553
+ }
1554
+ setGap(bdbFlexInput) {
1555
+ const gap = this.validateGap(this.getGap(bdbFlexInput));
1556
+ this.renderer.setStyle(this.element.nativeElement, 'gap', gap);
1557
+ }
1558
+ getGap(bdbFlexInput) {
1559
+ const trimmedBdbFlexGap = this.bdbFlexGap.trim();
1560
+ if (trimmedBdbFlexGap) {
1561
+ return trimmedBdbFlexGap;
1562
+ }
1563
+ if (bdbFlexInput) {
1564
+ return bdbFlexInput;
1565
+ }
1566
+ return DEFAULT_FLEX_GAP;
1567
+ }
1568
+ validateGap(gap) {
1569
+ return gap;
1570
+ }
1571
+ setSpacing(bdbFlexInput) {
1572
+ const spacing = this.validateSpacing(this.getSpacing(bdbFlexInput));
1573
+ this.renderer.setStyle(this.element.nativeElement, 'align-items', spacing.align);
1574
+ this.renderer.setStyle(this.element.nativeElement, 'justify-content', spacing.justify);
1575
+ }
1576
+ getSpacing(bdbFlexInput) {
1577
+ const splitBdbFlexSpacing = this.bdbFlexSpacing.split(' ').filter(x => !!x);
1578
+ if (splitBdbFlexSpacing.length === 2) {
1579
+ return {
1580
+ align: splitBdbFlexSpacing[0],
1581
+ justify: splitBdbFlexSpacing[1],
1582
+ };
1583
+ }
1584
+ if (bdbFlexInput.align && bdbFlexInput.justify) {
1585
+ return {
1586
+ align: bdbFlexInput.align,
1587
+ justify: bdbFlexInput.justify,
1588
+ };
1589
+ }
1590
+ return DEFAULT_FLEX_SPACING;
1591
+ }
1592
+ validateSpacing(spacing) {
1593
+ return spacing;
1594
+ }
1595
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFlexDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1596
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: BdbFlexDirective, isStandalone: true, selector: "[bdbFlex], [bdbFlexDirection], [bdbFlexGap], [bdbFlexSpacing]", inputs: { bdbFlex: "bdbFlex", bdbFlexDirection: "bdbFlexDirection", bdbFlexGap: "bdbFlexGap", bdbFlexSpacing: "bdbFlexSpacing" }, ngImport: i0 }); }
1597
+ }
1598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFlexDirective, decorators: [{
1599
+ type: Directive,
1600
+ args: [{
1601
+ selector: '[bdbFlex], [bdbFlexDirection], [bdbFlexGap], [bdbFlexSpacing]',
1602
+ standalone: true,
1603
+ }]
1604
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { bdbFlex: [{
1605
+ type: Input
1606
+ }], bdbFlexDirection: [{
1607
+ type: Input
1608
+ }], bdbFlexGap: [{
1609
+ type: Input
1610
+ }], bdbFlexSpacing: [{
1611
+ type: Input
1612
+ }] } });
1613
+
1614
+ class BdbFlexChildDirective {
1615
+ constructor(element, renderer) {
1616
+ this.element = element;
1617
+ this.renderer = renderer;
1618
+ this.bdbFlexChild = '';
1619
+ }
1620
+ ngOnInit() {
1621
+ this.renderer.setStyle(this.element.nativeElement, 'flex', this.bdbFlexChild);
1622
+ }
1623
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFlexChildDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1624
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: BdbFlexChildDirective, isStandalone: true, selector: "[bdbFlexChild]", inputs: { bdbFlexChild: "bdbFlexChild" }, ngImport: i0 }); }
1625
+ }
1626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFlexChildDirective, decorators: [{
1627
+ type: Directive,
1628
+ args: [{
1629
+ selector: '[bdbFlexChild]',
1630
+ standalone: true,
1631
+ }]
1632
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { bdbFlexChild: [{
1633
+ type: Input
1634
+ }] } });
1635
+
1636
+ class LinkedList {
1637
+ constructor(data = []) {
1638
+ this.length = 0;
1639
+ data.forEach(x => this.push(x));
1640
+ }
1641
+ [Symbol.iterator]() {
1642
+ let node = this.head;
1643
+ return {
1644
+ next() {
1645
+ if (!node) {
1646
+ return { done: true, value: undefined };
1647
+ }
1648
+ const value = node.value;
1649
+ node = node.next;
1650
+ return { done: false, value: value };
1651
+ },
1652
+ };
1653
+ }
1654
+ push(value) {
1655
+ const newNode = new Node(value);
1656
+ if (!this.tail) {
1657
+ this.head = newNode;
1658
+ }
1659
+ else {
1660
+ this.tail.next = newNode;
1661
+ newNode.previous = this.tail;
1662
+ }
1663
+ this.tail = newNode;
1664
+ this.length++;
1665
+ }
1666
+ pop() {
1667
+ if (!this.tail) {
1668
+ return undefined;
1669
+ }
1670
+ const value = this.tail.value;
1671
+ if (!this.tail.previous) {
1672
+ this.head = undefined;
1673
+ this.tail = undefined;
1674
+ }
1675
+ else {
1676
+ this.tail = this.tail.previous;
1677
+ this.tail.next = undefined;
1678
+ }
1679
+ this.length--;
1680
+ return value;
1681
+ }
1682
+ }
1683
+ class Node {
1684
+ constructor(value) {
1685
+ this.value = value;
1686
+ }
1687
+ }
1688
+
1689
+ class BdbGridDirective {
1690
+ constructor(element, renderer) {
1691
+ this.element = element;
1692
+ this.renderer = renderer;
1693
+ this.bdbGrid = '';
1694
+ this.bdbGridColumns = '';
1695
+ this.bdbGridRows = '';
1696
+ this.bdbGridGap = '';
1697
+ }
1698
+ ngOnInit() {
1699
+ this.renderer.setStyle(this.element.nativeElement, 'display', 'grid');
1700
+ const inputs = this.parseBdbGridInput();
1701
+ const gap = !this.bdbGridGap ? inputs.gap : this.bdbGridGap;
1702
+ if (gap) {
1703
+ this.renderer.setStyle(this.element.nativeElement, 'gap', gap);
1704
+ }
1705
+ this.setAxis('columns', inputs.columns);
1706
+ this.setAxis('rows', inputs.rows);
1707
+ }
1708
+ parseBdbGridInput() {
1709
+ const result = {};
1710
+ const input = this.bdbGrid.split(' ').filter(x => !!x);
1711
+ const linkedList = new LinkedList(input);
1712
+ let node = linkedList.head;
1713
+ if (!node) {
1714
+ return result;
1715
+ }
1716
+ if (node.value !== 'template' && node.value !== 'auto') {
1717
+ result.gap = node.value;
1718
+ node = node.next;
1719
+ }
1720
+ if (!node) {
1721
+ return result;
1722
+ }
1723
+ const columns = {
1724
+ type: node.value === 'auto' ? 'auto' : 'template',
1725
+ input: '',
1726
+ };
1727
+ node = node.next;
1728
+ const columnsInput = [];
1729
+ while (node) {
1730
+ if (node.value === 'auto' || node.value === 'template') {
1731
+ break;
1732
+ }
1733
+ columnsInput.push(node.value);
1734
+ node = node.next;
1735
+ }
1736
+ columns.input = columnsInput.join(' ');
1737
+ result.columns = columns;
1738
+ if (!node) {
1739
+ return result;
1740
+ }
1741
+ const rows = {
1742
+ type: node.value === 'auto' ? 'auto' : 'template',
1743
+ input: '',
1744
+ };
1745
+ node = node.next;
1746
+ const rowsInput = [];
1747
+ while (node) {
1748
+ rowsInput.push(node.value);
1749
+ node = node.next;
1750
+ }
1751
+ rows.input = rowsInput.join(' ');
1752
+ result.rows = rows;
1753
+ return result;
1754
+ }
1755
+ setAxis(axis, gridInput) {
1756
+ let result = gridInput;
1757
+ const axisInput = axis === 'columns' ? this.bdbGridColumns : this.bdbGridRows;
1758
+ if (axisInput) {
1759
+ let input = axisInput.split(' ').filter(x => !!x);
1760
+ const type = input[0] === 'auto' ? 'auto' : 'template';
1761
+ if (input[0] === 'auto' || input[0] === 'template') {
1762
+ input = input.slice(1);
1763
+ }
1764
+ result = {
1765
+ type: type,
1766
+ input: input.join(' '),
1767
+ };
1768
+ }
1769
+ if (result) {
1770
+ const selector = result.type === 'auto' ? `grid-auto-${axis}` : `grid-template-${axis}`;
1771
+ this.renderer.setStyle(this.element.nativeElement, selector, result.input);
1772
+ }
1773
+ }
1774
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbGridDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1775
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: BdbGridDirective, isStandalone: true, selector: "[bdbGrid], [bdbGridColumns], [bdbGridRows], [bdbGridGap]", inputs: { bdbGrid: "bdbGrid", bdbGridColumns: "bdbGridColumns", bdbGridRows: "bdbGridRows", bdbGridGap: "bdbGridGap" }, ngImport: i0 }); }
1776
+ }
1777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbGridDirective, decorators: [{
1778
+ type: Directive,
1779
+ args: [{
1780
+ selector: '[bdbGrid], [bdbGridColumns], [bdbGridRows], [bdbGridGap]',
1781
+ standalone: true,
1782
+ }]
1783
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { bdbGrid: [{
1784
+ type: Input
1785
+ }], bdbGridColumns: [{
1786
+ type: Input
1787
+ }], bdbGridRows: [{
1788
+ type: Input
1789
+ }], bdbGridGap: [{
1790
+ type: Input
1791
+ }] } });
1792
+
1793
+ class BdbGridChildDirective {
1794
+ constructor(element, renderer) {
1795
+ this.element = element;
1796
+ this.renderer = renderer;
1797
+ this.bdbGridChild = '';
1798
+ this.bdbGridRow = '';
1799
+ this.bdbGridColumn = '';
1800
+ }
1801
+ ngOnInit() {
1802
+ const axes = this.splitAxes();
1803
+ let column = axes[0];
1804
+ let row = axes[1];
1805
+ if (this.bdbGridColumn) {
1806
+ column = this.bdbGridColumn;
1807
+ }
1808
+ if (this.bdbGridRow) {
1809
+ row = this.bdbGridRow;
1810
+ }
1811
+ if (column) {
1812
+ this.renderer.setStyle(this.element.nativeElement, 'grid-column', column);
1813
+ }
1814
+ if (row) {
1815
+ this.renderer.setStyle(this.element.nativeElement, 'grid-row', row);
1816
+ }
1817
+ }
1818
+ splitAxes() {
1819
+ const input = this.bdbGridChild.split(' ').filter(x => !!x);
1820
+ if (!input.length) {
1821
+ return [];
1822
+ }
1823
+ let sourceList = new LinkedList(input);
1824
+ let targetList = new LinkedList();
1825
+ let node = sourceList.head;
1826
+ while (node) {
1827
+ if (node.value === 'span' && node.next) {
1828
+ targetList.push(`span ${node.next.value}`);
1829
+ node = node.next;
1830
+ }
1831
+ else {
1832
+ targetList.push(node.value);
1833
+ }
1834
+ node = node.next;
1835
+ }
1836
+ sourceList = targetList;
1837
+ targetList = new LinkedList();
1838
+ node = sourceList.head;
1839
+ while (node) {
1840
+ if (node.next && node.next.value === '/' && node.next.next) {
1841
+ targetList.push(`${node.value} / ${node.next.next.value}`);
1842
+ node = node.next.next;
1843
+ }
1844
+ else {
1845
+ targetList.push(node.value);
1846
+ }
1847
+ node = node.next;
1848
+ }
1849
+ if (targetList.length !== 2 || !targetList.head || !targetList.tail) {
1850
+ return [];
1851
+ }
1852
+ return [targetList.head.value, targetList.tail.value];
1853
+ }
1854
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbGridChildDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1855
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: BdbGridChildDirective, isStandalone: true, selector: "[bdbGridChild], [bdbGridColumn], [bdbGridRow]", inputs: { bdbGridChild: "bdbGridChild", bdbGridRow: "bdbGridRow", bdbGridColumn: "bdbGridColumn" }, ngImport: i0 }); }
1856
+ }
1857
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbGridChildDirective, decorators: [{
1858
+ type: Directive,
1859
+ args: [{
1860
+ selector: '[bdbGridChild], [bdbGridColumn], [bdbGridRow]',
1861
+ standalone: true,
1862
+ }]
1863
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { bdbGridChild: [{
1864
+ type: Input
1865
+ }], bdbGridRow: [{
1866
+ type: Input
1867
+ }], bdbGridColumn: [{
1868
+ type: Input
1869
+ }] } });
1870
+
1871
+ class BdbFieldComponent {
1872
+ constructor() {
1873
+ this.label = '';
1874
+ }
1875
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1876
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: BdbFieldComponent, isStandalone: true, selector: "bdb-field", inputs: { label: "label" }, ngImport: i0, template: "<div class=\"field-label\">{{ label }}</div>\r\n<ng-content></ng-content>\r\n", styles: [":host{padding:8px;background-color:#00000005;box-sizing:border-box;min-height:56px;display:flex;flex-direction:column;gap:4px}.field-label{flex:0 0 12px;font-size:12px;line-height:12px;color:#00000061}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
1877
+ }
1878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: BdbFieldComponent, decorators: [{
1879
+ type: Component,
1880
+ args: [{ selector: 'bdb-field', standalone: true, imports: [CommonModule], template: "<div class=\"field-label\">{{ label }}</div>\r\n<ng-content></ng-content>\r\n", styles: [":host{padding:8px;background-color:#00000005;box-sizing:border-box;min-height:56px;display:flex;flex-direction:column;gap:4px}.field-label{flex:0 0 12px;font-size:12px;line-height:12px;color:#00000061}\n"] }]
1881
+ }], propDecorators: { label: [{
1882
+ type: Input
1883
+ }] } });
1884
+
1885
+ class BdbServiceR extends BdbService {
1886
+ read(request) {
1887
+ return this.httpClient.post(`${this.baseUrl}/read`, request);
1888
+ }
1889
+ get(id) {
1890
+ return this.httpClient.get(`${this.baseUrl}/${id}`);
1891
+ }
1892
+ }
1893
+
1894
+ class BdbServiceCR extends BdbServiceR {
1895
+ create(createModel) {
1896
+ return this.httpClient.post(this.baseUrl, createModel);
1897
+ }
1898
+ }
1899
+
1900
+ class BdbServiceRD extends BdbServiceR {
1901
+ delete(id) {
1902
+ return this.httpClient.delete(`${this.baseUrl}/${id}`);
1903
+ }
1904
+ }
1905
+
1906
+ class BdbServiceRU extends BdbServiceR {
1907
+ update(updateModel) {
1908
+ return this.httpClient.put(this.baseUrl, updateModel);
1909
+ }
1910
+ }
1911
+
1912
+ class BdbServiceCRD extends BdbServiceCR {
1913
+ delete(id) {
1914
+ return this.httpClient.delete(`${this.baseUrl}/${id}`);
1915
+ }
1916
+ }
1917
+
1918
+ class BdbServiceCRU extends BdbServiceCR {
1919
+ update(updateModel) {
1920
+ return this.httpClient.put(this.baseUrl, updateModel);
1921
+ }
1922
+ }
1923
+
1924
+ class BdbServiceRUD extends BdbServiceRU {
1925
+ delete(id) {
1926
+ return this.httpClient.delete(`${this.baseUrl}/${id}`);
1927
+ }
1928
+ }
1929
+
1930
+ class BdbServiceCRUD extends BdbServiceCRU {
1931
+ delete(id) {
1932
+ return this.httpClient.delete(`${this.baseUrl}/${id}`);
1933
+ }
1934
+ }
1935
+
1936
+ class ExceptionLogService extends BdbServiceR {
1937
+ constructor() {
1938
+ super('exception-log');
1939
+ }
1940
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ExceptionLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1941
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ExceptionLogService, providedIn: 'root' }); }
1942
+ }
1943
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ExceptionLogService, decorators: [{
1944
+ type: Injectable,
1945
+ args: [{
1946
+ providedIn: 'root',
1947
+ }]
1948
+ }], ctorParameters: () => [] });
1949
+
1950
+ class MediaService extends BdbServiceRD {
1951
+ constructor() {
1952
+ super('media');
1953
+ }
1954
+ upload(file) {
1955
+ const formData = new FormData();
1956
+ formData.append('file', file, file.name);
1957
+ return this.httpClient.post(`${this.baseUrl}/upload`, formData);
1958
+ }
1959
+ fromUrl(url) {
1960
+ return this.httpClient.post(`${this.baseUrl}/from-url`, {
1961
+ url: url,
1962
+ });
1963
+ }
1964
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: MediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1965
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: MediaService, providedIn: 'root' }); }
1966
+ }
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: MediaService, decorators: [{
1968
+ type: Injectable,
1969
+ args: [{
1970
+ providedIn: 'root',
1971
+ }]
1972
+ }], ctorParameters: () => [] });
1973
+
1974
+ class RoleService extends BdbServiceR {
1975
+ constructor() {
1976
+ super('role');
1977
+ }
1978
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: RoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1979
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: RoleService, providedIn: 'root' }); }
1980
+ }
1981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: RoleService, decorators: [{
1982
+ type: Injectable,
1983
+ args: [{
1984
+ providedIn: 'root',
1985
+ }]
1986
+ }], ctorParameters: () => [] });
1987
+
1988
+ class TaskLogService extends BdbServiceCR {
1989
+ constructor() {
1990
+ super('task-log');
1991
+ }
1992
+ start(id) {
1993
+ return this.httpClient.post(`${this.baseUrl}/start`, { id });
1994
+ }
1995
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1996
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogService, providedIn: 'root' }); }
1997
+ }
1998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogService, decorators: [{
1999
+ type: Injectable,
2000
+ args: [{
2001
+ providedIn: 'root',
2002
+ }]
2003
+ }], ctorParameters: () => [] });
2004
+
2005
+ class TaskLogParameterService extends BdbServiceR {
2006
+ constructor() {
2007
+ super('task-log-parameter');
2008
+ }
2009
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogParameterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2010
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogParameterService, providedIn: 'root' }); }
2011
+ }
2012
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogParameterService, decorators: [{
2013
+ type: Injectable,
2014
+ args: [{
2015
+ providedIn: 'root',
2016
+ }]
2017
+ }], ctorParameters: () => [] });
2018
+
2019
+ class TaskLogScheduleService extends BdbServiceCRUD {
2020
+ constructor() {
2021
+ super('task-log-schedule');
2022
+ }
2023
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogScheduleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2024
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogScheduleService, providedIn: 'root' }); }
2025
+ }
2026
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogScheduleService, decorators: [{
2027
+ type: Injectable,
2028
+ args: [{
2029
+ providedIn: 'root',
2030
+ }]
2031
+ }], ctorParameters: () => [] });
2032
+
2033
+ class UserService extends BdbServiceCRUD {
2034
+ constructor() {
2035
+ super('user');
2036
+ }
2037
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2038
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserService, providedIn: 'root' }); }
2039
+ }
2040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserService, decorators: [{
2041
+ type: Injectable,
2042
+ args: [{
2043
+ providedIn: 'root',
2044
+ }]
2045
+ }], ctorParameters: () => [] });
2046
+
2047
+ class UserRoleService extends BdbServiceCRD {
2048
+ constructor() {
2049
+ super('user-role');
2050
+ }
2051
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserRoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2052
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserRoleService, providedIn: 'root' }); }
2053
+ }
2054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: UserRoleService, decorators: [{
2055
+ type: Injectable,
2056
+ args: [{
2057
+ providedIn: 'root',
2058
+ }]
2059
+ }], ctorParameters: () => [] });
2060
+
2061
+ var MediaType;
2062
+ (function (MediaType) {
2063
+ MediaType["Image"] = "Image";
2064
+ MediaType["Video"] = "Video";
2065
+ MediaType["File"] = "File";
2066
+ })(MediaType || (MediaType = {}));
2067
+
2068
+ class TaskLogSchedulerService extends BdbService {
2069
+ constructor() {
2070
+ super('task-log-scheduler');
2071
+ }
2072
+ isRunning() {
2073
+ return this.httpClient.get(`${this.baseUrl}/is-running`);
2074
+ }
2075
+ startScheduler() {
2076
+ return this.httpClient.get(`${this.baseUrl}/start`);
2077
+ }
2078
+ stopScheduler() {
2079
+ return this.httpClient.get(`${this.baseUrl}/stop`);
2080
+ }
2081
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogSchedulerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2082
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogSchedulerService, providedIn: 'root' }); }
2083
+ }
2084
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogSchedulerService, decorators: [{
2085
+ type: Injectable,
2086
+ args: [{
2087
+ providedIn: 'root',
2088
+ }]
2089
+ }], ctorParameters: () => [] });
2090
+
2091
+ class TaskLogTypeService extends BdbService {
2092
+ constructor() {
2093
+ super('task-log-type');
2094
+ this.TaskLogTypes = new BehaviorSubject([]);
2095
+ this.getAllObservable = null;
2096
+ this.load();
2097
+ }
2098
+ load() {
2099
+ this.getAll().subscribe({
2100
+ next: x => this.TaskLogTypes.next(x),
2101
+ });
2102
+ }
2103
+ getAll() {
2104
+ if (this.getAllObservable) {
2105
+ return this.getAllObservable;
2106
+ }
2107
+ this.getAllObservable = this.httpClient.get(this.baseUrl).pipe(shareReplay(1), tap(() => (this.getAllObservable = null)));
2108
+ return this.getAllObservable;
2109
+ }
2110
+ get(identifier) {
2111
+ if (this.getAllObservable) {
2112
+ return this.getAllObservable.pipe(map$1(x => x.filter(y => y.identifier === identifier)[0]));
2113
+ }
2114
+ const types = this.TaskLogTypes.getValue();
2115
+ if (types && types.length) {
2116
+ return of(types.filter(x => x.identifier === identifier)[0]);
2117
+ }
2118
+ return of(null);
2119
+ }
2120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogTypeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2121
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogTypeService, providedIn: 'root' }); }
2122
+ }
2123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: TaskLogTypeService, decorators: [{
2124
+ type: Injectable,
2125
+ args: [{
2126
+ providedIn: 'root',
2127
+ }]
2128
+ }], ctorParameters: () => [] });
2129
+
2130
+ class AccessDeniedPageComponent {
2131
+ constructor(bdbOptions, authService) {
2132
+ this.authService = authService;
2133
+ this._onDestroy = new Subject();
2134
+ this.isLoggedIn = true;
2135
+ this.loginRoutePath = bdbOptions.authOptions?.loginPath;
2136
+ this.logoutRoutePath = bdbOptions.authOptions?.logoutPath;
2137
+ }
2138
+ ngOnInit() {
2139
+ this.authService.account$.pipe(takeUntil(this._onDestroy)).subscribe({
2140
+ next: x => (this.isLoggedIn = x !== null),
2141
+ });
2142
+ }
2143
+ ngOnDestroy() {
2144
+ this._onDestroy.next();
2145
+ this._onDestroy.complete();
2146
+ }
2147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AccessDeniedPageComponent, deps: [{ token: BDB_OPTIONS }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
2148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: AccessDeniedPageComponent, isStandalone: true, selector: "bdb-access-denied-page", ngImport: i0, template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Toegang geweigerd</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"access-denied-card-content\">\r\n <bdb-alert color=\"danger\" label=\"Geen toegang\" icon=\"block\">\r\n U heeft onvoldoende rechten voor de gevraagde toepassing\r\n </bdb-alert>\r\n </mat-card-content>\r\n <mat-card-actions bdbFlex=\"row 0 end center\">\r\n <a [routerLink]=\"['/', loginRoutePath]\" mat-button *ngIf=\"!isLoggedIn\">Inloggen</a>\r\n <a [routerLink]=\"['/', logoutRoutePath]\" mat-button *ngIf=\"isLoggedIn\">Uitloggen</a>\r\n </mat-card-actions>\r\n</mat-card>\r\n", styles: [":host{min-width:360px}.access-denied-card-content{padding:8px 16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: BdbAlertComponent, selector: "bdb-alert", inputs: ["color", "label", "icon", "inline"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "directive", type: BdbFlexDirective, selector: "[bdbFlex], [bdbFlexDirection], [bdbFlexGap], [bdbFlexSpacing]", inputs: ["bdbFlex", "bdbFlexDirection", "bdbFlexGap", "bdbFlexSpacing"] }] }); }
2149
+ }
2150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AccessDeniedPageComponent, decorators: [{
2151
+ type: Component,
2152
+ args: [{ selector: 'bdb-access-denied-page', standalone: true, imports: [
2153
+ CommonModule,
2154
+ MatCardModule,
2155
+ BdbAlertComponent,
2156
+ MatButtonModule,
2157
+ RouterLink,
2158
+ MatIconModule,
2159
+ BdbFlexDirective,
2160
+ ], template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Toegang geweigerd</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"access-denied-card-content\">\r\n <bdb-alert color=\"danger\" label=\"Geen toegang\" icon=\"block\">\r\n U heeft onvoldoende rechten voor de gevraagde toepassing\r\n </bdb-alert>\r\n </mat-card-content>\r\n <mat-card-actions bdbFlex=\"row 0 end center\">\r\n <a [routerLink]=\"['/', loginRoutePath]\" mat-button *ngIf=\"!isLoggedIn\">Inloggen</a>\r\n <a [routerLink]=\"['/', logoutRoutePath]\" mat-button *ngIf=\"isLoggedIn\">Uitloggen</a>\r\n </mat-card-actions>\r\n</mat-card>\r\n", styles: [":host{min-width:360px}.access-denied-card-content{padding:8px 16px}\n"] }]
2161
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2162
+ type: Inject,
2163
+ args: [BDB_OPTIONS]
2164
+ }] }, { type: AuthService }] });
2165
+
2166
+ var accessDeniedPage_component = /*#__PURE__*/Object.freeze({
2167
+ __proto__: null,
2168
+ AccessDeniedPageComponent: AccessDeniedPageComponent
2169
+ });
2170
+
2171
+ class ForgotPasswordPageComponent {
2172
+ constructor(authService, bdbOptions) {
2173
+ this.authService = authService;
2174
+ this.emailCtrl = new FormControl('', { validators: [Validators.required, Validators.email], nonNullable: true });
2175
+ this.isComplete = false;
2176
+ this.isPending = false;
2177
+ this.forgotPasswordForm = new FormGroup({
2178
+ email: this.emailCtrl,
2179
+ });
2180
+ this.loginRoutePath = bdbOptions.authOptions?.loginPath;
2181
+ }
2182
+ forgotPassword() {
2183
+ if (this.isPending || !this.forgotPasswordForm.valid) {
2184
+ return;
2185
+ }
2186
+ this.isPending = true;
2187
+ this.error = undefined;
2188
+ const formValue = this.forgotPasswordForm.getRawValue();
2189
+ this.forgotPasswordForm.disable();
2190
+ this.authService.forgotPassword(formValue).subscribe({
2191
+ next: () => {
2192
+ this.isComplete = true;
2193
+ this.isPending = false;
2194
+ this.forgotPasswordForm.enable();
2195
+ },
2196
+ error: e => {
2197
+ this.error = e;
2198
+ this.isPending = false;
2199
+ this.forgotPasswordForm.enable();
2200
+ },
2201
+ });
2202
+ }
2203
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ForgotPasswordPageComponent, deps: [{ token: AuthService }, { token: BDB_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
2204
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: ForgotPasswordPageComponent, isStandalone: true, selector: "bdb-forgot-password-page", ngImport: i0, template: "<form [formGroup]=\"forgotPasswordForm\" (ngSubmit)=\"forgotPassword()\" *ngIf=\"!isComplete; else isCompleteTemplate\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Wachtwoord vergeten</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"forgot-password-page-card-content\">\r\n <bdb-alert-error-response [value]=\"error\" class=\"login-page-error-response\"></bdb-alert-error-response>\r\n <mat-form-field>\r\n <mat-label>E-mailadres</mat-label>\r\n <input matInput type=\"email\" formControlName=\"email\" />\r\n <!-- <mat-error *ngIf=\"emailCtrl.errors\">{{ emailCtrl | bdbErrorMessage }}</mat-error> -->\r\n </mat-form-field>\r\n </mat-card-content>\r\n <mat-card-actions class=\"forgot-password-page-card-actions\">\r\n <a mat-button [routerLink]=\"['/', loginRoutePath]\" [disabled]=\"isPending\">\r\n <mat-icon>login</mat-icon>\r\n <span>Log in</span>\r\n </a>\r\n <button mat-flat-button color=\"primary\">\r\n <mat-icon>lock_reset</mat-icon>\r\n <span>Herstel wachtwoord</span>\r\n </button></mat-card-actions\r\n >\r\n </mat-card>\r\n</form>\r\n\r\n<ng-template #isCompleteTemplate>\r\n <bdb-alert color=\"success\" label=\"Wachtwoord herstel gestart\"> Controleer uw e-mail voor instructies </bdb-alert>\r\n</ng-template>\r\n", styles: [":host{width:360px}.forgot-password-page-card-content{display:flex;flex-direction:column;margin-top:16px}.forgot-password-page-card-actions{gap:8px;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: BdbAlertErrorResponseComponent, selector: "bdb-alert-error-response", inputs: ["value"] }, { kind: "component", type: BdbAlertComponent, selector: "bdb-alert", inputs: ["color", "label", "icon", "inline"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
2205
+ }
2206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ForgotPasswordPageComponent, decorators: [{
2207
+ type: Component,
2208
+ args: [{ selector: 'bdb-forgot-password-page', standalone: true, imports: [
2209
+ CommonModule,
2210
+ ReactiveFormsModule,
2211
+ MatCardModule,
2212
+ MatFormFieldModule,
2213
+ MatInputModule,
2214
+ MatIconModule,
2215
+ RouterLink,
2216
+ BdbAlertErrorResponseComponent,
2217
+ BdbAlertComponent,
2218
+ MatButtonModule,
2219
+ ], template: "<form [formGroup]=\"forgotPasswordForm\" (ngSubmit)=\"forgotPassword()\" *ngIf=\"!isComplete; else isCompleteTemplate\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Wachtwoord vergeten</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"forgot-password-page-card-content\">\r\n <bdb-alert-error-response [value]=\"error\" class=\"login-page-error-response\"></bdb-alert-error-response>\r\n <mat-form-field>\r\n <mat-label>E-mailadres</mat-label>\r\n <input matInput type=\"email\" formControlName=\"email\" />\r\n <!-- <mat-error *ngIf=\"emailCtrl.errors\">{{ emailCtrl | bdbErrorMessage }}</mat-error> -->\r\n </mat-form-field>\r\n </mat-card-content>\r\n <mat-card-actions class=\"forgot-password-page-card-actions\">\r\n <a mat-button [routerLink]=\"['/', loginRoutePath]\" [disabled]=\"isPending\">\r\n <mat-icon>login</mat-icon>\r\n <span>Log in</span>\r\n </a>\r\n <button mat-flat-button color=\"primary\">\r\n <mat-icon>lock_reset</mat-icon>\r\n <span>Herstel wachtwoord</span>\r\n </button></mat-card-actions\r\n >\r\n </mat-card>\r\n</form>\r\n\r\n<ng-template #isCompleteTemplate>\r\n <bdb-alert color=\"success\" label=\"Wachtwoord herstel gestart\"> Controleer uw e-mail voor instructies </bdb-alert>\r\n</ng-template>\r\n", styles: [":host{width:360px}.forgot-password-page-card-content{display:flex;flex-direction:column;margin-top:16px}.forgot-password-page-card-actions{gap:8px;justify-content:flex-end}\n"] }]
2220
+ }], ctorParameters: () => [{ type: AuthService }, { type: undefined, decorators: [{
2221
+ type: Inject,
2222
+ args: [BDB_OPTIONS]
2223
+ }] }] });
2224
+
2225
+ var forgotPasswordPage_component = /*#__PURE__*/Object.freeze({
2226
+ __proto__: null,
2227
+ ForgotPasswordPageComponent: ForgotPasswordPageComponent
2228
+ });
2229
+
2230
+ class InvalidTokenPageComponent {
2231
+ constructor(bdbOptions) {
2232
+ this.loginRoutePath = bdbOptions.authOptions?.loginPath;
2233
+ }
2234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: InvalidTokenPageComponent, deps: [{ token: BDB_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
2235
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: InvalidTokenPageComponent, isStandalone: true, selector: "bdb-invalid-token-page", ngImport: i0, template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Ongeldig token</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"access-denied-card-content\">\r\n <bdb-alert color=\"warn\" label=\"Verlopen\" icon=\"block\"> Uw wachtwoord herstel link is niet (meer) geldig </bdb-alert>\r\n </mat-card-content>\r\n <mat-card-actions bdbFlex=\"row 0 end center\">\r\n <a [routerLink]=\"['/', loginRoutePath]\" mat-button>Inloggen</a>\r\n </mat-card-actions>\r\n</mat-card>\r\n", styles: [":host{min-width:360px}.access-denied-card-content{padding:8px 16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: BdbAlertComponent, selector: "bdb-alert", inputs: ["color", "label", "icon", "inline"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: BdbFlexDirective, selector: "[bdbFlex], [bdbFlexDirection], [bdbFlexGap], [bdbFlexSpacing]", inputs: ["bdbFlex", "bdbFlexDirection", "bdbFlexGap", "bdbFlexSpacing"] }] }); }
2236
+ }
2237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: InvalidTokenPageComponent, decorators: [{
2238
+ type: Component,
2239
+ args: [{ selector: 'bdb-invalid-token-page', standalone: true, imports: [CommonModule, MatCardModule, BdbAlertComponent, MatButtonModule, RouterLink, BdbFlexDirective], template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Ongeldig token</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"access-denied-card-content\">\r\n <bdb-alert color=\"warn\" label=\"Verlopen\" icon=\"block\"> Uw wachtwoord herstel link is niet (meer) geldig </bdb-alert>\r\n </mat-card-content>\r\n <mat-card-actions bdbFlex=\"row 0 end center\">\r\n <a [routerLink]=\"['/', loginRoutePath]\" mat-button>Inloggen</a>\r\n </mat-card-actions>\r\n</mat-card>\r\n", styles: [":host{min-width:360px}.access-denied-card-content{padding:8px 16px}\n"] }]
2240
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2241
+ type: Inject,
2242
+ args: [BDB_OPTIONS]
2243
+ }] }] });
2244
+
2245
+ var invalidTokenPage_component = /*#__PURE__*/Object.freeze({
2246
+ __proto__: null,
2247
+ InvalidTokenPageComponent: InvalidTokenPageComponent
2248
+ });
2249
+
2250
+ class LoginPageComponent {
2251
+ constructor(router, authService, route, bdbOptions) {
2252
+ this.router = router;
2253
+ this.authService = authService;
2254
+ this.route = route;
2255
+ this.emailCtrl = new FormControl('', {
2256
+ validators: [Validators.required, Validators.email],
2257
+ nonNullable: true,
2258
+ });
2259
+ this.passwordCtrl = new FormControl('', { validators: [Validators.required], nonNullable: true });
2260
+ this.postLoginUrl = '/';
2261
+ this.isPending = false;
2262
+ this.loginForm = new FormGroup({
2263
+ email: this.emailCtrl,
2264
+ password: this.passwordCtrl,
2265
+ });
2266
+ this.forgotPasswordRoutePath = bdbOptions.authOptions?.forgotPasswordPath;
2267
+ }
2268
+ ngOnInit() {
2269
+ this.route.queryParams.subscribe({
2270
+ next: x => (this.postLoginUrl = x['returnUrl'] ?? '/'),
2271
+ });
2272
+ }
2273
+ login() {
2274
+ this.loginForm.markAllAsTouched();
2275
+ if (this.isPending || !this.loginForm.valid) {
2276
+ return;
2277
+ }
2278
+ this.isPending = true;
2279
+ this.error = undefined;
2280
+ const formValue = this.loginForm.getRawValue();
2281
+ this.loginForm.disable();
2282
+ this.authService.login(formValue).subscribe({
2283
+ next: () => {
2284
+ this.isPending = false;
2285
+ this.loginForm.enable();
2286
+ this.router.navigate([this.postLoginUrl]);
2287
+ },
2288
+ error: e => {
2289
+ this.error = e;
2290
+ this.isPending = false;
2291
+ this.loginForm.enable();
2292
+ },
2293
+ });
2294
+ }
2295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: LoginPageComponent, deps: [{ token: i2$1.Router }, { token: AuthService }, { token: i2$1.ActivatedRoute }, { token: BDB_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
2296
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: LoginPageComponent, isStandalone: true, selector: "bdb-login-page", ngImport: i0, template: "<form [formGroup]=\"loginForm\" (ngSubmit)=\"login()\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Inloggen</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content bdbFlex=\"col\">\r\n <bdb-alert-error-response [value]=\"error\" class=\"login-form-error-response\"></bdb-alert-error-response>\r\n <mat-form-field>\r\n <mat-label>Gebruikersnaam</mat-label>\r\n <input matInput type=\"email\" formControlName=\"email\" />\r\n <mat-error bdbFormError=\"email\"></mat-error>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Wachtwoord</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" />\r\n <mat-error bdbFormError=\"password\"></mat-error>\r\n </mat-form-field>\r\n </mat-card-content>\r\n <mat-card-actions bdbFlex=\"row 8px end center\">\r\n <a mat-button [routerLink]=\"['/', forgotPasswordRoutePath]\">\r\n <mat-icon>contact_support</mat-icon>\r\n <span>Wachtwoord vergeten</span>\r\n </a>\r\n <button mat-flat-button color=\"primary\">\r\n <mat-icon>login</mat-icon>\r\n <span>Inloggen</span>\r\n </button>\r\n </mat-card-actions>\r\n </mat-card>\r\n</form>\r\n", styles: [":host{width:360px}.login-form-error-response{margin:8px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: BdbAlertErrorResponseComponent, selector: "bdb-alert-error-response", inputs: ["value"] }, { kind: "directive", type: BdbFlexDirective, selector: "[bdbFlex], [bdbFlexDirection], [bdbFlexGap], [bdbFlexSpacing]", inputs: ["bdbFlex", "bdbFlexDirection", "bdbFlexGap", "bdbFlexSpacing"] }, { kind: "directive", type: BdbFormErrorDirective, selector: "[bdbFormError]", inputs: ["bdbFormError"] }] }); }
2297
+ }
2298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: LoginPageComponent, decorators: [{
2299
+ type: Component,
2300
+ args: [{ selector: 'bdb-login-page', standalone: true, imports: [
2301
+ CommonModule,
2302
+ ReactiveFormsModule,
2303
+ MatFormFieldModule,
2304
+ MatInputModule,
2305
+ MatIconModule,
2306
+ MatButtonModule,
2307
+ RouterLink,
2308
+ MatCardModule,
2309
+ BdbAlertErrorResponseComponent,
2310
+ BdbFlexDirective,
2311
+ BdbFormErrorDirective,
2312
+ ], template: "<form [formGroup]=\"loginForm\" (ngSubmit)=\"login()\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Inloggen</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content bdbFlex=\"col\">\r\n <bdb-alert-error-response [value]=\"error\" class=\"login-form-error-response\"></bdb-alert-error-response>\r\n <mat-form-field>\r\n <mat-label>Gebruikersnaam</mat-label>\r\n <input matInput type=\"email\" formControlName=\"email\" />\r\n <mat-error bdbFormError=\"email\"></mat-error>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Wachtwoord</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" />\r\n <mat-error bdbFormError=\"password\"></mat-error>\r\n </mat-form-field>\r\n </mat-card-content>\r\n <mat-card-actions bdbFlex=\"row 8px end center\">\r\n <a mat-button [routerLink]=\"['/', forgotPasswordRoutePath]\">\r\n <mat-icon>contact_support</mat-icon>\r\n <span>Wachtwoord vergeten</span>\r\n </a>\r\n <button mat-flat-button color=\"primary\">\r\n <mat-icon>login</mat-icon>\r\n <span>Inloggen</span>\r\n </button>\r\n </mat-card-actions>\r\n </mat-card>\r\n</form>\r\n", styles: [":host{width:360px}.login-form-error-response{margin:8px 0}\n"] }]
2313
+ }], ctorParameters: () => [{ type: i2$1.Router }, { type: AuthService }, { type: i2$1.ActivatedRoute }, { type: undefined, decorators: [{
2314
+ type: Inject,
2315
+ args: [BDB_OPTIONS]
2316
+ }] }] });
2317
+
2318
+ var loginPage_component = /*#__PURE__*/Object.freeze({
2319
+ __proto__: null,
2320
+ LoginPageComponent: LoginPageComponent
2321
+ });
2322
+
2323
+ class LogoutPageComponent {
2324
+ constructor(router, authService, bdbOptions) {
2325
+ this.router = router;
2326
+ this.authService = authService;
2327
+ this.bdbOptions = bdbOptions;
2328
+ }
2329
+ logout() {
2330
+ this.authService.logout();
2331
+ this.router.navigate(['/', this.bdbOptions.authOptions?.loginPath]);
2332
+ }
2333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: LogoutPageComponent, deps: [{ token: i2$1.Router }, { token: AuthService }, { token: BDB_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
2334
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: LogoutPageComponent, isStandalone: true, selector: "bdb-logout-page", ngImport: i0, template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Uitloggen</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"logout-page-card-content\"> Weet u zeker dat u wilt uitloggen? </mat-card-content>\r\n <mat-card-actions class=\"logout-page-card-actions\">\r\n <a mat-button routerLink=\"/\">\r\n <mat-icon>arrow_back</mat-icon>\r\n <span>Blijf ingelogd</span>\r\n </a>\r\n <button (click)=\"logout()\" mat-flat-button color=\"primary\">\r\n <mat-icon>logout</mat-icon>\r\n <span>Log uit</span>\r\n </button></mat-card-actions\r\n >\r\n</mat-card>\r\n", styles: [":host{width:360px}.logout-page-card-content{display:flex;flex-direction:column;padding:16px}.logout-page-card-actions{gap:8px;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
2335
+ }
2336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: LogoutPageComponent, decorators: [{
2337
+ type: Component,
2338
+ args: [{ selector: 'bdb-logout-page', standalone: true, imports: [MatCardModule, MatButtonModule, MatIconModule, RouterLink], template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Uitloggen</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"logout-page-card-content\"> Weet u zeker dat u wilt uitloggen? </mat-card-content>\r\n <mat-card-actions class=\"logout-page-card-actions\">\r\n <a mat-button routerLink=\"/\">\r\n <mat-icon>arrow_back</mat-icon>\r\n <span>Blijf ingelogd</span>\r\n </a>\r\n <button (click)=\"logout()\" mat-flat-button color=\"primary\">\r\n <mat-icon>logout</mat-icon>\r\n <span>Log uit</span>\r\n </button></mat-card-actions\r\n >\r\n</mat-card>\r\n", styles: [":host{width:360px}.logout-page-card-content{display:flex;flex-direction:column;padding:16px}.logout-page-card-actions{gap:8px;justify-content:flex-end}\n"] }]
2339
+ }], ctorParameters: () => [{ type: i2$1.Router }, { type: AuthService }, { type: undefined, decorators: [{
2340
+ type: Inject,
2341
+ args: [BDB_OPTIONS]
2342
+ }] }] });
2343
+
2344
+ var logoutPage_component = /*#__PURE__*/Object.freeze({
2345
+ __proto__: null,
2346
+ LogoutPageComponent: LogoutPageComponent
2347
+ });
2348
+
2349
+ function equalValueValidator(otherControl) {
2350
+ return (thisControl) => {
2351
+ const otherValue = otherControl.value;
2352
+ const thisValue = thisControl.value;
2353
+ return otherValue === thisValue ? null : { custom: 'Komt niet overeen' };
2354
+ };
2355
+ }
2356
+ class ResetPasswordPageComponent {
2357
+ constructor(authService, activatedRoute, router, bdbOptions) {
2358
+ this.authService = authService;
2359
+ this.activatedRoute = activatedRoute;
2360
+ this.router = router;
2361
+ this.isPending = false;
2362
+ this.passwordCtrl = new FormControl('', {
2363
+ validators: [
2364
+ Validators.required,
2365
+ Validators.pattern('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*()])[A-Za-z0-9!@#$%^&*()]{6,}$'),
2366
+ ],
2367
+ nonNullable: true,
2368
+ });
2369
+ this.confirmPasswordCtrl = new FormControl('', {
2370
+ validators: [Validators.required, equalValueValidator(this.passwordCtrl)],
2371
+ nonNullable: true,
2372
+ });
2373
+ this.resetPasswordForm = new FormGroup({
2374
+ email: new FormControl('', { validators: [Validators.required, Validators.email], nonNullable: true }),
2375
+ token: new FormControl('', { validators: [Validators.required], nonNullable: true }),
2376
+ password: this.passwordCtrl,
2377
+ confirmPassword: this.confirmPasswordCtrl,
2378
+ });
2379
+ this.loginRoutePath = bdbOptions.authOptions?.loginPath;
2380
+ }
2381
+ ngOnInit() {
2382
+ this.activatedRoute.data.subscribe({
2383
+ next: x => {
2384
+ this.resetPasswordToken = x['resetPasswordToken'];
2385
+ if (this.resetPasswordToken) {
2386
+ this.resetPasswordForm.patchValue(this.resetPasswordToken);
2387
+ }
2388
+ },
2389
+ });
2390
+ }
2391
+ resetPassword() {
2392
+ if (this.isPending || !this.resetPasswordForm.valid) {
2393
+ return;
2394
+ }
2395
+ this.isPending = true;
2396
+ this.error = undefined;
2397
+ const formValue = this.resetPasswordForm.getRawValue();
2398
+ this.resetPasswordForm.disable();
2399
+ this.authService.resetPassword(formValue).subscribe({
2400
+ next: () => {
2401
+ this.isPending = false;
2402
+ this.resetPasswordForm.enable();
2403
+ this.router.navigate(['/']);
2404
+ },
2405
+ error: e => {
2406
+ this.error = e;
2407
+ this.isPending = false;
2408
+ this.resetPasswordForm.enable();
2409
+ },
2410
+ });
2411
+ }
2412
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ResetPasswordPageComponent, deps: [{ token: AuthService }, { token: i2$1.ActivatedRoute }, { token: i2$1.Router }, { token: BDB_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
2413
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: ResetPasswordPageComponent, isStandalone: true, selector: "bdb-reset-password-page", ngImport: i0, template: "<form [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"resetPassword()\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Wachtwoord herstellen</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"reset-password-page-card-content\">\r\n <bdb-alert-error-response [value]=\"error\" class=\"login-page-error-response\"></bdb-alert-error-response>\r\n <p>{{ resetPasswordToken?.email }}</p>\r\n\r\n <mat-form-field>\r\n <mat-label>Nieuw wachtwoord</mat-label>\r\n <input matInput type=\"password\" [formControl]=\"passwordCtrl\" />\r\n <!-- <mat-error *ngIf=\"passwordCtrl.errors\">{{ passwordCtrl | bdbErrorMessage }}</mat-error> -->\r\n </mat-form-field>\r\n\r\n <mat-form-field>\r\n <mat-label>Bevestig wachtwoord</mat-label>\r\n <input matInput type=\"password\" [formControl]=\"confirmPasswordCtrl\" />\r\n <!-- <mat-error *ngIf=\"confirmPasswordCtrl.errors\">{{ confirmPasswordCtrl | bdbErrorMessage }}</mat-error> -->\r\n </mat-form-field>\r\n </mat-card-content>\r\n <mat-card-actions class=\"reset-password-page-card-actions\">\r\n <a mat-button [routerLink]=\"['/', loginRoutePath]\" [disabled]=\"isPending\">\r\n <mat-icon>login</mat-icon>\r\n <span>Log in</span>\r\n </a>\r\n <button mat-flat-button color=\"primary\">\r\n <mat-icon>sync_lock</mat-icon>\r\n <span>Stel wachtwoord in</span>\r\n </button></mat-card-actions\r\n >\r\n </mat-card>\r\n</form>\r\n", styles: [":host{width:360px}.reset-password-page-card-content{display:flex;flex-direction:column;margin-top:16px}.reset-password-page-card-actions{gap:8px;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: BdbAlertErrorResponseComponent, selector: "bdb-alert-error-response", inputs: ["value"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
2414
+ }
2415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ResetPasswordPageComponent, decorators: [{
2416
+ type: Component,
2417
+ args: [{ selector: 'bdb-reset-password-page', standalone: true, imports: [
2418
+ ReactiveFormsModule,
2419
+ MatCardModule,
2420
+ BdbAlertErrorResponseComponent,
2421
+ MatFormFieldModule,
2422
+ MatInputModule,
2423
+ MatIconModule,
2424
+ RouterLink,
2425
+ MatButtonModule,
2426
+ ], template: "<form [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"resetPassword()\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Wachtwoord herstellen</mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content class=\"reset-password-page-card-content\">\r\n <bdb-alert-error-response [value]=\"error\" class=\"login-page-error-response\"></bdb-alert-error-response>\r\n <p>{{ resetPasswordToken?.email }}</p>\r\n\r\n <mat-form-field>\r\n <mat-label>Nieuw wachtwoord</mat-label>\r\n <input matInput type=\"password\" [formControl]=\"passwordCtrl\" />\r\n <!-- <mat-error *ngIf=\"passwordCtrl.errors\">{{ passwordCtrl | bdbErrorMessage }}</mat-error> -->\r\n </mat-form-field>\r\n\r\n <mat-form-field>\r\n <mat-label>Bevestig wachtwoord</mat-label>\r\n <input matInput type=\"password\" [formControl]=\"confirmPasswordCtrl\" />\r\n <!-- <mat-error *ngIf=\"confirmPasswordCtrl.errors\">{{ confirmPasswordCtrl | bdbErrorMessage }}</mat-error> -->\r\n </mat-form-field>\r\n </mat-card-content>\r\n <mat-card-actions class=\"reset-password-page-card-actions\">\r\n <a mat-button [routerLink]=\"['/', loginRoutePath]\" [disabled]=\"isPending\">\r\n <mat-icon>login</mat-icon>\r\n <span>Log in</span>\r\n </a>\r\n <button mat-flat-button color=\"primary\">\r\n <mat-icon>sync_lock</mat-icon>\r\n <span>Stel wachtwoord in</span>\r\n </button></mat-card-actions\r\n >\r\n </mat-card>\r\n</form>\r\n", styles: [":host{width:360px}.reset-password-page-card-content{display:flex;flex-direction:column;margin-top:16px}.reset-password-page-card-actions{gap:8px;justify-content:flex-end}\n"] }]
2427
+ }], ctorParameters: () => [{ type: AuthService }, { type: i2$1.ActivatedRoute }, { type: i2$1.Router }, { type: undefined, decorators: [{
2428
+ type: Inject,
2429
+ args: [BDB_OPTIONS]
2430
+ }] }] });
2431
+
2432
+ var resetPasswordPage_component = /*#__PURE__*/Object.freeze({
2433
+ __proto__: null,
2434
+ ResetPasswordPageComponent: ResetPasswordPageComponent,
2435
+ equalValueValidator: equalValueValidator
2436
+ });
2437
+
2438
+ /**
2439
+ * Generated bundle index. Do not edit.
2440
+ */
2441
+
2442
+ export { AccessDeniedPageComponent, AuthContainerComponent, AuthService, BDB_OPTIONS, BdbAlertComponent, BdbAlertErrorResponseComponent, BdbBooleanDisplayComponent, BdbCellDirective, BdbColumnBuilder, BdbColumnType, BdbDataSource, BdbFieldComponent, BdbFlexChildDirective, BdbFlexDirective, BdbFormErrorDirective, BdbGridChildDirective, BdbGridDirective, BdbOptionsBuilder, BdbPaginatorComponent, BdbQueryInputComponent, BdbSearchComponent, BdbSearchWrapperBaseComponent, BdbService, BdbServiceCR, BdbServiceCRD, BdbServiceCRU, BdbServiceCRUD, BdbServiceR, BdbServiceRD, BdbServiceRU, BdbServiceRUD, BdbTableComponent, ExceptionLogService, ExceptionLogTableComponent, ForgotPasswordPageComponent, InvalidTokenPageComponent, LoginPageComponent, LogoutPageComponent, MediaService, MediaType, ResetPasswordPageComponent, RoleService, TaskLogOutcome, TaskLogOutcomePipe, TaskLogParameterService, TaskLogParameterType, TaskLogParameterValuePipe, TaskLogScheduleService, TaskLogSchedulerService, TaskLogService, TaskLogStatus, TaskLogStatusPipe, TaskLogTypeService, UserRoleService, UserService, UserTableComponent, equalValueValidator, getAuthorizationHeaderFromToken, getTokenFromAuthorizationHeader, loggedOutGuard, provideBaDaBoom, resetPasswordResolver, roleGuard, tokenExpiredInterceptor, tokenInterceptor };
2443
+ //# sourceMappingURL=devopmaat-badaboom.mjs.map