@verisoft/ui-govcz 20.1.1 → 20.1.3

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 (246) hide show
  1. package/assets/i18n/cs.json +0 -2
  2. package/assets/i18n/en.json +0 -2
  3. package/fesm2022/verisoft-ui-govcz.mjs +3763 -0
  4. package/fesm2022/verisoft-ui-govcz.mjs.map +1 -0
  5. package/index.d.ts +1010 -0
  6. package/package.json +19 -7
  7. package/.eslintrc.json +0 -60
  8. package/jest.config.ts +0 -21
  9. package/ng-package.json +0 -28
  10. package/project.json +0 -49
  11. package/src/config.d.ts +0 -10
  12. package/src/index.ts +0 -1
  13. package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -25
  14. package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -0
  15. package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -21
  16. package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -28
  17. package/src/lib/components/breadcrumb/index.ts +0 -1
  18. package/src/lib/components/button/button.component.html +0 -28
  19. package/src/lib/components/button/button.component.scss +0 -21
  20. package/src/lib/components/button/button.component.ts +0 -77
  21. package/src/lib/components/button/index.ts +0 -1
  22. package/src/lib/components/calendar/calendar.component.html +0 -28
  23. package/src/lib/components/calendar/calendar.component.scss +0 -0
  24. package/src/lib/components/calendar/calendar.component.ts +0 -77
  25. package/src/lib/components/calendar/index.ts +0 -1
  26. package/src/lib/components/checkbox/checkbox.component.html +0 -23
  27. package/src/lib/components/checkbox/checkbox.component.scss +0 -0
  28. package/src/lib/components/checkbox/checkbox.component.ts +0 -61
  29. package/src/lib/components/checkbox/index.ts +0 -1
  30. package/src/lib/components/confirm-dialog/confirm-dialog.component.html +0 -50
  31. package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +0 -4
  32. package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +0 -79
  33. package/src/lib/components/confirm-dialog/index.ts +0 -1
  34. package/src/lib/components/dropdown/dropdown-item.component.html +0 -8
  35. package/src/lib/components/dropdown/dropdown-item.component.ts +0 -18
  36. package/src/lib/components/dropdown/dropdown.component.html +0 -91
  37. package/src/lib/components/dropdown/dropdown.component.scss +0 -108
  38. package/src/lib/components/dropdown/dropdown.component.spec.ts +0 -21
  39. package/src/lib/components/dropdown/dropdown.component.ts +0 -296
  40. package/src/lib/components/dropdown/dropdown.model.ts +0 -6
  41. package/src/lib/components/dropdown/index.ts +0 -1
  42. package/src/lib/components/dropdown-button/dropdown-button.component.html +0 -31
  43. package/src/lib/components/dropdown-button/dropdown-button.component.ts +0 -34
  44. package/src/lib/components/dropdown-button/index.ts +0 -1
  45. package/src/lib/components/errors/error.component.html +0 -11
  46. package/src/lib/components/errors/error.component.scss +0 -0
  47. package/src/lib/components/errors/error.component.spec.ts +0 -19
  48. package/src/lib/components/errors/error.component.ts +0 -29
  49. package/src/lib/components/errors/index.ts +0 -1
  50. package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +0 -32
  51. package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +0 -8
  52. package/src/lib/components/feature-list/feature-list-filter.pipe.ts +0 -20
  53. package/src/lib/components/feature-list/feature-list-page.component.ts +0 -30
  54. package/src/lib/components/feature-list/feature-list-page.model.ts +0 -42
  55. package/src/lib/components/feature-list/feature-list.component.html +0 -67
  56. package/src/lib/components/feature-list/feature-list.component.scss +0 -10
  57. package/src/lib/components/feature-list/feature-list.component.ts +0 -360
  58. package/src/lib/components/feature-list/index.ts +0 -5
  59. package/src/lib/components/filter/directives/filter-field.directive.ts +0 -35
  60. package/src/lib/components/filter/filter.component.html +0 -78
  61. package/src/lib/components/filter/filter.component.scss +0 -32
  62. package/src/lib/components/filter/filter.component.spec.ts +0 -21
  63. package/src/lib/components/filter/filter.component.stories.ts +0 -23
  64. package/src/lib/components/filter/filter.component.ts +0 -286
  65. package/src/lib/components/filter/filter.model.ts +0 -18
  66. package/src/lib/components/filter/index.ts +0 -2
  67. package/src/lib/components/form-field/form-field.component.html +0 -14
  68. package/src/lib/components/form-field/form-field.component.scss +0 -0
  69. package/src/lib/components/form-field/form-field.component.spec.ts +0 -21
  70. package/src/lib/components/form-field/form-field.component.ts +0 -76
  71. package/src/lib/components/form-field/index.ts +0 -1
  72. package/src/lib/components/header/header.component.html +0 -122
  73. package/src/lib/components/header/header.component.scss +0 -0
  74. package/src/lib/components/header/header.component.ts +0 -90
  75. package/src/lib/components/header/index.ts +0 -1
  76. package/src/lib/components/icon/icon.component.html +0 -11
  77. package/src/lib/components/icon/icon.component.scss +0 -20
  78. package/src/lib/components/icon/icon.component.ts +0 -110
  79. package/src/lib/components/icon/index.ts +0 -2
  80. package/src/lib/components/index.ts +0 -37
  81. package/src/lib/components/input-group/index.ts +0 -1
  82. package/src/lib/components/input-group/input-group.component.html +0 -41
  83. package/src/lib/components/input-group/input-group.component.scss +0 -0
  84. package/src/lib/components/input-group/input-group.component.ts +0 -75
  85. package/src/lib/components/loader/index.ts +0 -1
  86. package/src/lib/components/loader/loader.component.html +0 -7
  87. package/src/lib/components/loader/loader.component.scss +0 -0
  88. package/src/lib/components/loader/loader.component.spec.ts +0 -21
  89. package/src/lib/components/loader/loader.component.ts +0 -33
  90. package/src/lib/components/multiselect/index.ts +0 -1
  91. package/src/lib/components/multiselect/multiselect.component.html +0 -21
  92. package/src/lib/components/multiselect/multiselect.component.scss +0 -0
  93. package/src/lib/components/multiselect/multiselect.component.spec.ts +0 -21
  94. package/src/lib/components/multiselect/multiselect.component.ts +0 -117
  95. package/src/lib/components/number-input/index.ts +0 -1
  96. package/src/lib/components/number-input/number-input.component.html +0 -48
  97. package/src/lib/components/number-input/number-input.component.scss +0 -0
  98. package/src/lib/components/number-input/number-input.component.ts +0 -80
  99. package/src/lib/components/page-header/index.ts +0 -1
  100. package/src/lib/components/page-header/page-header.component.html +0 -3
  101. package/src/lib/components/page-header/page-header.component.scss +0 -11
  102. package/src/lib/components/page-header/page-header.component.spec.ts +0 -21
  103. package/src/lib/components/page-header/page-header.component.ts +0 -27
  104. package/src/lib/components/password/index.ts +0 -1
  105. package/src/lib/components/password/password.component.html +0 -31
  106. package/src/lib/components/password/password.component.scss +0 -0
  107. package/src/lib/components/password/password.component.spec.ts +0 -21
  108. package/src/lib/components/password/password.component.ts +0 -83
  109. package/src/lib/components/radiobutton/index.ts +0 -1
  110. package/src/lib/components/radiobutton/radiobutton.component.html +0 -23
  111. package/src/lib/components/radiobutton/radiobutton.component.scss +0 -0
  112. package/src/lib/components/radiobutton/radiobutton.component.ts +0 -61
  113. package/src/lib/components/search/index.ts +0 -1
  114. package/src/lib/components/search/search.component.html +0 -23
  115. package/src/lib/components/search/search.component.scss +0 -0
  116. package/src/lib/components/search/search.component.ts +0 -45
  117. package/src/lib/components/section/index.ts +0 -1
  118. package/src/lib/components/section/section.component.html +0 -26
  119. package/src/lib/components/section/section.component.scss +0 -0
  120. package/src/lib/components/section/section.component.ts +0 -55
  121. package/src/lib/components/shared-components/action-button-group/action-button-group.component.html +0 -25
  122. package/src/lib/components/shared-components/action-button-group/action-button-group.component.scss +0 -0
  123. package/src/lib/components/shared-components/action-button-group/action-button-group.component.spec.ts +0 -21
  124. package/src/lib/components/shared-components/action-button-group/action-button-group.component.ts +0 -111
  125. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.html +0 -10
  126. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.scss +0 -0
  127. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.spec.ts +0 -21
  128. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +0 -69
  129. package/src/lib/components/shared-components/action-button-group/index.ts +0 -2
  130. package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +0 -142
  131. package/src/lib/components/shared-components/dynamic-component/dynamic-component.component.ts +0 -56
  132. package/src/lib/components/shared-components/dynamic-component/index.ts +0 -2
  133. package/src/lib/components/shared-components/generic-field/generic-field.component.html +0 -98
  134. package/src/lib/components/shared-components/generic-field/generic-field.component.spec.ts +0 -21
  135. package/src/lib/components/shared-components/generic-field/generic-field.component.ts +0 -90
  136. package/src/lib/components/shared-components/generic-field/index.ts +0 -1
  137. package/src/lib/components/shared-components/generic-form/generic-form.component.html +0 -46
  138. package/src/lib/components/shared-components/generic-form/generic-form.component.spec.ts +0 -21
  139. package/src/lib/components/shared-components/generic-form/generic-form.component.ts +0 -56
  140. package/src/lib/components/shared-components/generic-form/generic-form.model.spec.ts +0 -82
  141. package/src/lib/components/shared-components/generic-form/generic-form.model.ts +0 -68
  142. package/src/lib/components/shared-components/generic-form/index.ts +0 -2
  143. package/src/lib/components/shared-components/index.ts +0 -4
  144. package/src/lib/components/side-menu/index.ts +0 -2
  145. package/src/lib/components/side-menu/side-menu.component.html +0 -22
  146. package/src/lib/components/side-menu/side-menu.component.scss +0 -17
  147. package/src/lib/components/side-menu/side-menu.component.ts +0 -42
  148. package/src/lib/components/side-menu/side-menu.module.ts +0 -56
  149. package/src/lib/components/snackbar/index.ts +0 -2
  150. package/src/lib/components/snackbar/services/snackbar.service.ts +0 -73
  151. package/src/lib/components/snackbar/snackbar.component.html +0 -14
  152. package/src/lib/components/snackbar/snackbar.component.scss +0 -0
  153. package/src/lib/components/snackbar/snackbar.component.spec.ts +0 -21
  154. package/src/lib/components/snackbar/snackbar.component.ts +0 -44
  155. package/src/lib/components/snackbar/snackbar.model.ts +0 -10
  156. package/src/lib/components/stepper/index.ts +0 -1
  157. package/src/lib/components/stepper/stepper.component.html +0 -35
  158. package/src/lib/components/stepper/stepper.component.scss +0 -9
  159. package/src/lib/components/stepper/stepper.component.ts +0 -60
  160. package/src/lib/components/switch/index.ts +0 -1
  161. package/src/lib/components/switch/switch.component.html +0 -16
  162. package/src/lib/components/switch/switch.component.scss +0 -0
  163. package/src/lib/components/switch/switch.component.ts +0 -39
  164. package/src/lib/components/tab-view/index.ts +0 -2
  165. package/src/lib/components/tab-view/tab-view-item.component.ts +0 -23
  166. package/src/lib/components/tab-view/tab-view.component.html +0 -51
  167. package/src/lib/components/tab-view/tab-view.component.scss +0 -43
  168. package/src/lib/components/tab-view/tab-view.component.ts +0 -64
  169. package/src/lib/components/tab-view/tab-view.module.ts +0 -25
  170. package/src/lib/components/table/index.ts +0 -1
  171. package/src/lib/components/table/table-pagination-info.component.html +0 -9
  172. package/src/lib/components/table/table-pagination-info.component.ts +0 -22
  173. package/src/lib/components/table/table.component.html +0 -199
  174. package/src/lib/components/table/table.component.scss +0 -192
  175. package/src/lib/components/table/table.component.ts +0 -390
  176. package/src/lib/components/table/table.model.ts +0 -17
  177. package/src/lib/components/table/table.models.ts +0 -12
  178. package/src/lib/components/tag/index.ts +0 -3
  179. package/src/lib/components/tag/tag.component.html +0 -12
  180. package/src/lib/components/tag/tag.component.scss +0 -4
  181. package/src/lib/components/tag/tag.component.ts +0 -44
  182. package/src/lib/components/tag/tag.model.ts +0 -7
  183. package/src/lib/components/textarea/index.ts +0 -1
  184. package/src/lib/components/textarea/textarea.component.html +0 -50
  185. package/src/lib/components/textarea/textarea.component.scss +0 -0
  186. package/src/lib/components/textarea/textarea.component.ts +0 -77
  187. package/src/lib/components/textfield/index.ts +0 -1
  188. package/src/lib/components/textfield/textfield.component.html +0 -34
  189. package/src/lib/components/textfield/textfield.component.scss +0 -0
  190. package/src/lib/components/textfield/textfield.component.ts +0 -112
  191. package/src/lib/components/tooltip/index.ts +0 -1
  192. package/src/lib/components/tooltip/tooltip.component.html +0 -9
  193. package/src/lib/components/tooltip/tooltip.component.ts +0 -19
  194. package/src/lib/icons.ts +0 -36
  195. package/src/lib/index.ts +0 -5
  196. package/src/lib/init.service.ts +0 -11
  197. package/src/lib/interceptors/http-error-message.interceptor.ts +0 -45
  198. package/src/lib/pages/bad-request-page/bad-request-page.component.html +0 -5
  199. package/src/lib/pages/bad-request-page/bad-request-page.component.scss +0 -0
  200. package/src/lib/pages/bad-request-page/bad-request-page.component.ts +0 -14
  201. package/src/lib/pages/error-page/error-page.component.html +0 -5
  202. package/src/lib/pages/error-page/error-page.component.scss +0 -0
  203. package/src/lib/pages/error-page/error-page.component.ts +0 -31
  204. package/src/lib/pages/error-page/error-page.constants.ts +0 -19
  205. package/src/lib/pages/index.ts +0 -3
  206. package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.html +0 -5
  207. package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.scss +0 -0
  208. package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.ts +0 -15
  209. package/src/lib/pages/not-authenticated/index.ts +0 -1
  210. package/src/lib/pages/not-authenticated/not-authenticated.component.html +0 -5
  211. package/src/lib/pages/not-authenticated/not-authenticated.component.ts +0 -13
  212. package/src/lib/pages/not-authorized/index.ts +0 -1
  213. package/src/lib/pages/not-authorized/not-authorized.component.html +0 -5
  214. package/src/lib/pages/not-authorized/not-authorized.component.ts +0 -17
  215. package/src/lib/pages/not-found/index.ts +0 -1
  216. package/src/lib/pages/not-found/not-found.component.html +0 -5
  217. package/src/lib/pages/not-found/not-found.component.ts +0 -17
  218. package/src/lib/pages/not-found-page/not-found-page.component.html +0 -6
  219. package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
  220. package/src/lib/pages/not-found-page/not-found-page.component.ts +0 -15
  221. package/src/lib/pipes/color/color.pipe.ts +0 -24
  222. package/src/lib/pipes/index.ts +0 -3
  223. package/src/lib/pipes/multiselect/multiselect-options.pipe.ts +0 -61
  224. package/src/lib/pipes/size/size.pipe.ts +0 -24
  225. package/src/test-setup.ts +0 -8
  226. package/tsconfig.json +0 -30
  227. package/tsconfig.lib.json +0 -17
  228. package/tsconfig.lib.prod.json +0 -9
  229. package/tsconfig.spec.json +0 -16
  230. /package/{src → styles}/sass/foundations/_colors.scss +0 -0
  231. /package/{src → styles}/sass/foundations/index.scss +0 -0
  232. /package/{src → styles}/sass/header.css +0 -0
  233. /package/{src → styles}/sass/header.scss +0 -0
  234. /package/{src → styles}/sass/integrations/_bootstrap.scss +0 -0
  235. /package/{src → styles}/sass/integrations/index.scss +0 -0
  236. /package/{src → styles}/sass/main.scss +0 -0
  237. /package/{src → styles}/sass/overrides/_gov.scss +0 -0
  238. /package/{src → styles}/sass/overrides/index.scss +0 -0
  239. /package/{src → styles}/sass/scrollbar.scss +0 -0
  240. /package/{src → styles}/sass/tokens/_theme-dark.scss +0 -0
  241. /package/{src → styles}/sass/tokens/_theme-light.scss +0 -0
  242. /package/{src → styles}/sass/tokens/index.scss +0 -0
  243. /package/{src → styles}/sass/utils/_table_filter.scss +0 -0
  244. /package/{src → styles}/sass/utils/_utils.scss +0 -0
  245. /package/{src → styles}/sass/utils/index.scss +0 -0
  246. /package/{src → styles}/sass/vendors/_bootstrap.scss +0 -0
@@ -0,0 +1,3763 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Pipe, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, Output, Input, inject, Optional, Self, input, SimpleChange, Injectable, ChangeDetectorRef, Injector, ViewContainerRef, ViewChild, ViewEncapsulation, HostListener, NO_ERRORS_SCHEMA, output, Directive, forwardRef, ContentChildren, effect, ContentChild, InjectionToken, NgModule, Inject } from '@angular/core';
3
+ import * as i1 from '@angular/router';
4
+ import { RouterModule, Router, ActivatedRoute, RouterOutlet, RouterLink, RouterLinkActive } from '@angular/router';
5
+ import * as i2 from '@gov-design-system-ce/angular';
6
+ import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
7
+ import * as i1$3 from '@verisoft/ui-core';
8
+ import { BreadcrumbCoreComponent, BREADCRUMB_COMPONENT_TOKEN, ControlSeverity, GovControlSeverity, FieldSize, IconsComponent, IconPosition, GovButtonType, BUTTON_COMPONENT_TOKEN, SlotPosition, BaseFormInputComponent, FieldType, CALENDAR_COMPONENT_TOKEN, CHECKBOX_COMPONENT_TOKEN, UnsubscribeComponent, CONFIRM_DIALOG_COMPONENT_TOKEN, TEXTFIELD_COMPONENT_TOKEN, DROPDOWN_COMPONENT_TOKEN, DROPDOWN_BUTTON_COMPONENT_TOKEN, MULTISELECT_COMPONENT_TOKEN, GenericFieldType, DatasourceDirective, GENERIC_FIELD_COMPONENT_TOKEN, DEFAULT_DEBOUNCE_TIME, ScreenSizeService, DialogService, isFilterEmpty, ButtonShortCutDirective, FILTER_COMPONENT_TOKEN, ACTION_BUTTON_GROUP_COMPONENT_TOKEN, queryListChanged, LOADER_COMPONENT_TOKEN, MAX_COLUMN_CHAR_COUNT, TableService, DEFAULT_PAGINATION, ColumnModel, RowModel, TableSelectionMode, TABLE_COLUMN_PROVIDER, TABLE_COMPONENT_TOKEN, downloadFile, TableDatasourceDirective, TableFilterDirective, TableColumnDirective, FORM_FIELD_COMPONENT_TOKEN, SideMenuService, HEADER_COMPONENT_TOKEN, INPUT_GROUP_COMPONENT_TOKEN, NUMBER_INPUT_COMPONENT_TOKEN, PasswordStrength, PASSWORD_COMPONENT_TOKEN, RADIOBUTTON_COMPONENT_TOKEN, SECTION_COMPONENT_TOKEN, SIDE_MENU_COMPONENT_TOKEN, MENU_TOKEN, SideMenuProviderService, SNACKBAR_COMPONENT_TOKEN, LayoutType, STEPPER_COMPONENT_TOKEN, SWITCH_COMPONENT_TOKEN, TAG_COMPONENT_TOKEN, TEXTAREA_COMPONENT_TOKEN } from '@verisoft/ui-core';
9
+ import * as i3 from '@ngx-translate/core';
10
+ import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
11
+ import * as i1$1 from '@angular/common';
12
+ import { CommonModule, AsyncPipe, NgTemplateOutlet } from '@angular/common';
13
+ import * as i1$2 from '@angular/forms';
14
+ import { ReactiveFormsModule, Validators, FormControl, UntypedFormGroup, UntypedFormControl, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
15
+ import { ERROR_PROVIDER_TOKEN, DEFAULT_PAGE_SIZE, getValueByPath, SortDirection, DEFAULT_SEARCH_LIMIT, multiSort, BASE_URL_PATH, BaseHttpService, convertDatasource } from '@verisoft/core';
16
+ import { v4 } from 'uuid';
17
+ import { takeUntil, debounceTime, distinctUntilChanged, BehaviorSubject, startWith, map, combineLatestWith, Subject, take, switchMap, forkJoin, of } from 'rxjs';
18
+ import * as i4 from '@angular/cdk/scrolling';
19
+ import { ScrollingModule } from '@angular/cdk/scrolling';
20
+ import { HttpClient } from '@angular/common/http';
21
+ import { HasPermissionDirective } from '@verisoft/security-core';
22
+ import zxcvbn from 'zxcvbn';
23
+ import * as i1$4 from '@angular/cdk/overlay';
24
+ import * as portal from '@angular/cdk/portal';
25
+ import { defineCustomElements } from '@gov-design-system-ce/components/loader';
26
+
27
+ const Icons = {
28
+ add: 'plus-lg',
29
+ minus: 'dash',
30
+ delete: 'trash',
31
+ filter: 'filter',
32
+ download: 'upload',
33
+ save: 'download',
34
+ print: 'print-fill',
35
+ edit: 'pencil',
36
+ calendar: 'calendar',
37
+ settings: 'gear',
38
+ house: 'house-door-fill',
39
+ chevronRight: 'chevron-right',
40
+ chevronDown: 'chevron-down',
41
+ chevronLeft: 'chevron-left',
42
+ chevronUp: 'chevron-up',
43
+ checkbox: 'check-square',
44
+ warning: 'exclamation-triangle-fill',
45
+ search: 'search',
46
+ action: 'bars',
47
+ user: 'user',
48
+ logout: 'logout',
49
+ crossCircle: 'x-circle',
50
+ infoCircle: 'info-circle',
51
+ cross: 'x-lg',
52
+ arrowLeft: 'arrow-left',
53
+ arrowRight: 'arrow-right',
54
+ questionCircle: 'question-circle',
55
+ checkCircle: 'check-circle',
56
+ sitemap: 'diagram',
57
+ check: 'check-lg',
58
+ envelope: 'envelope',
59
+ loader: 'loader',
60
+ };
61
+
62
+ class BreadcrumbComponent extends BreadcrumbCoreComponent {
63
+ icons = Icons;
64
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
65
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: BreadcrumbComponent, isStandalone: true, selector: "v-breadcrumb", providers: [
66
+ {
67
+ provide: BREADCRUMB_COMPONENT_TOKEN,
68
+ useExisting: BreadcrumbComponent
69
+ },
70
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"gov-breadcrums mt-3 mb-3\">\n <gov-breadcrumbs accessible-label=\"gov-breadcrums\">\n <ul>\n @if (useHomeRoute) {\n <li>\n <gov-icon [name]=\"icons.house\" />\n <a [routerLink]=\"'/'\">Home</a>\n </li>\n }\n @if (items) { @for (item of items; track item; let index = $index) {\n <li>\n @if (index > 0 || useHomeRoute) {\n <gov-icon [name]=\"icons.chevronRight\" />\n }\n @if (item.icon) {\n <gov-icon [name]=\"item.icon\" />\n }\n <a [routerLink]=\"item.routerLink\">\n {{ item.label }}\n </a>\n </li>\n } }\n </ul>\n </gov-breadcrumbs>\n </div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovBreadcrumbs, selector: "gov-breadcrumbs", inputs: ["accessibleLabel", "accessibleLabelledBy", "accessibleToggleLabel", "collapsible", "isExpanded"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
71
+ }
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbComponent, decorators: [{
73
+ type: Component,
74
+ args: [{ selector: 'v-breadcrumb', imports: [
75
+ GovDesignSystemModule,
76
+ RouterModule
77
+ ], providers: [
78
+ {
79
+ provide: BREADCRUMB_COMPONENT_TOKEN,
80
+ useExisting: BreadcrumbComponent
81
+ },
82
+ ], template: "<div class=\"gov-breadcrums mt-3 mb-3\">\n <gov-breadcrumbs accessible-label=\"gov-breadcrums\">\n <ul>\n @if (useHomeRoute) {\n <li>\n <gov-icon [name]=\"icons.house\" />\n <a [routerLink]=\"'/'\">Home</a>\n </li>\n }\n @if (items) { @for (item of items; track item; let index = $index) {\n <li>\n @if (index > 0 || useHomeRoute) {\n <gov-icon [name]=\"icons.chevronRight\" />\n }\n @if (item.icon) {\n <gov-icon [name]=\"item.icon\" />\n }\n <a [routerLink]=\"item.routerLink\">\n {{ item.label }}\n </a>\n </li>\n } }\n </ul>\n </gov-breadcrumbs>\n </div>\n" }]
83
+ }] });
84
+
85
+ class GovColorPipe {
86
+ transform(color) {
87
+ switch (color) {
88
+ case ControlSeverity.danger:
89
+ return GovControlSeverity.error;
90
+ case ControlSeverity.info:
91
+ return GovControlSeverity.neutral;
92
+ case ControlSeverity.help:
93
+ case ControlSeverity.contrast:
94
+ return GovControlSeverity.primary;
95
+ }
96
+ return color;
97
+ }
98
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
99
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: GovColorPipe, isStandalone: true, name: "govColor" });
100
+ }
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovColorPipe, decorators: [{
102
+ type: Pipe,
103
+ args: [{
104
+ name: 'govColor',
105
+ standalone: true,
106
+ }]
107
+ }] });
108
+
109
+ class GovMultiselectOptionsPipe {
110
+ transform(options, optionLabel, optionValue, addEmptyOption = false) {
111
+ if (!options?.length)
112
+ return [];
113
+ return this.convertToGovOption(options, addEmptyOption, optionLabel, optionValue);
114
+ }
115
+ convertToGovOption(options, addEmptyOption, optionLabel, optionValue) {
116
+ const convertedOptions = [];
117
+ options.forEach((obj) => {
118
+ let stringKey = '';
119
+ let numberKey = '';
120
+ if (optionLabel && optionValue) {
121
+ stringKey = optionLabel;
122
+ numberKey = optionValue;
123
+ }
124
+ else {
125
+ const keys = Object.keys(obj);
126
+ keys.forEach((key) => {
127
+ if (typeof obj[key] === 'string') {
128
+ stringKey = key;
129
+ }
130
+ else if (typeof obj[key] === 'number') {
131
+ numberKey = key;
132
+ }
133
+ });
134
+ }
135
+ convertedOptions.push({
136
+ label: obj[stringKey],
137
+ value: obj[numberKey]?.toString() ?? 'VALUE NOT SET',
138
+ });
139
+ });
140
+ if (addEmptyOption) {
141
+ convertedOptions.unshift({
142
+ label: '',
143
+ value: 'null',
144
+ });
145
+ }
146
+ return convertedOptions;
147
+ }
148
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovMultiselectOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
149
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: GovMultiselectOptionsPipe, isStandalone: true, name: "govMultiselectOptions" });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovMultiselectOptionsPipe, decorators: [{
152
+ type: Pipe,
153
+ args: [{
154
+ name: 'govMultiselectOptions',
155
+ standalone: true,
156
+ }]
157
+ }] });
158
+
159
+ class GovSizePipe {
160
+ transform(size) {
161
+ switch (size) {
162
+ case FieldSize.small:
163
+ return 's';
164
+ case FieldSize.medium:
165
+ case undefined:
166
+ return 'm';
167
+ case FieldSize.large:
168
+ return 'l';
169
+ case FieldSize.xl:
170
+ return 'xl';
171
+ default:
172
+ return size;
173
+ }
174
+ }
175
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
176
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: GovSizePipe, isStandalone: true, name: "govSize" });
177
+ }
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovSizePipe, decorators: [{
179
+ type: Pipe,
180
+ args: [{
181
+ name: 'govSize',
182
+ standalone: true,
183
+ }]
184
+ }] });
185
+
186
+ class IconComponent extends IconsComponent {
187
+ get govSize() {
188
+ switch (this.size()) {
189
+ case 'small':
190
+ return 's';
191
+ case 'large':
192
+ return 'l';
193
+ case 'medium':
194
+ default:
195
+ return 'm';
196
+ }
197
+ }
198
+ get govColorClass() {
199
+ const severity = this.mapSeverityToGovColor(this.severity());
200
+ return severity ? `text-${severity}` : '';
201
+ }
202
+ get govClasses() {
203
+ const colorClass = this.govColorClass;
204
+ const customClass = this.class() || '';
205
+ return `${colorClass} ${customClass}`.trim();
206
+ }
207
+ get bootstrapSizeClass() {
208
+ switch (this.size()) {
209
+ case 'small':
210
+ return 'fs-6';
211
+ case 'medium':
212
+ return 'fs-4';
213
+ case 'large':
214
+ return 'fs-2';
215
+ case 'xl':
216
+ return 'fs-1';
217
+ default:
218
+ return '';
219
+ }
220
+ }
221
+ get bootstrapClasses() {
222
+ const baseClass = `bi bi-${this.name()}`;
223
+ const sizeClass = this.bootstrapSizeClass;
224
+ const colorClass = this.mapSeverityToBootstrapClass(this.severity());
225
+ const customClass = this.class() || '';
226
+ return `${baseClass} ${sizeClass} ${colorClass} ${customClass}`.trim();
227
+ }
228
+ mapSeverityToGovColor(severity) {
229
+ if (!severity) {
230
+ return undefined;
231
+ }
232
+ switch (severity) {
233
+ case ControlSeverity.danger:
234
+ return 'error';
235
+ case ControlSeverity.warning:
236
+ return 'warning';
237
+ case ControlSeverity.success:
238
+ return 'success';
239
+ case ControlSeverity.secondary:
240
+ return 'secondary';
241
+ case ControlSeverity.info:
242
+ return 'neutral';
243
+ case ControlSeverity.help:
244
+ case ControlSeverity.primary:
245
+ case ControlSeverity.contrast:
246
+ return 'primary';
247
+ default:
248
+ return severity;
249
+ }
250
+ }
251
+ mapSeverityToBootstrapClass(severity) {
252
+ if (!severity) {
253
+ return '';
254
+ }
255
+ switch (severity) {
256
+ case ControlSeverity.success:
257
+ return 'text-success';
258
+ case ControlSeverity.danger:
259
+ return 'text-danger';
260
+ case ControlSeverity.warning:
261
+ return 'text-warning';
262
+ case ControlSeverity.info:
263
+ return 'text-info';
264
+ case ControlSeverity.secondary:
265
+ return 'text-secondary';
266
+ case ControlSeverity.help:
267
+ case ControlSeverity.primary:
268
+ case ControlSeverity.contrast:
269
+ return 'text-primary';
270
+ default:
271
+ return `text-${severity}`;
272
+ }
273
+ }
274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: IconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
275
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: IconComponent, isStandalone: true, selector: "v-icon", usesInheritance: true, ngImport: i0, template: "@if (library() === 'native') {\n <gov-icon \n [name]=\"name()\" \n [size]=\"govSize\"\n [class]=\"govClasses\"\n />\n} @else if (library() === 'bootstrap') {\n <i [class]=\"bootstrapClasses\"></i>\n}\n\n\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}.icon-small{font-size:.875rem}.icon-medium{font-size:1rem}.icon-large{font-size:1.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
276
+ }
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: IconComponent, decorators: [{
278
+ type: Component,
279
+ args: [{ selector: 'v-icon', imports: [CommonModule], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (library() === 'native') {\n <gov-icon \n [name]=\"name()\" \n [size]=\"govSize\"\n [class]=\"govClasses\"\n />\n} @else if (library() === 'bootstrap') {\n <i [class]=\"bootstrapClasses\"></i>\n}\n\n\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}.icon-small{font-size:.875rem}.icon-medium{font-size:1rem}.icon-large{font-size:1.5rem}\n"] }]
280
+ }] });
281
+
282
+ class ButtonComponent {
283
+ label;
284
+ icon;
285
+ library = 'native';
286
+ badge;
287
+ iconPos = IconPosition.left;
288
+ disabled = false;
289
+ rounded;
290
+ outlined;
291
+ raised;
292
+ routerLink;
293
+ size = FieldSize.medium;
294
+ queryParams;
295
+ severity = ControlSeverity.primary;
296
+ type = GovButtonType.solid;
297
+ expanded = false;
298
+ name;
299
+ // eslint-disable-next-line @angular-eslint/no-output-native
300
+ click = new EventEmitter();
301
+ handleClick(event) {
302
+ if (this.disabled) {
303
+ event.stopPropagation();
304
+ return;
305
+ }
306
+ this.click.emit(event);
307
+ }
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
309
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ButtonComponent, isStandalone: true, selector: "v-button", inputs: { label: "label", icon: "icon", library: "library", badge: "badge", iconPos: "iconPos", disabled: "disabled", rounded: "rounded", outlined: "outlined", raised: "raised", routerLink: "routerLink", size: "size", queryParams: "queryParams", severity: "severity", type: "type", expanded: "expanded", name: "name" }, outputs: { click: "click" }, host: { properties: { "class.v-button--expanded": "expanded" } }, providers: [
310
+ {
311
+ provide: BUTTON_COMPONENT_TOKEN,
312
+ useExisting: ButtonComponent,
313
+ }
314
+ ], ngImport: i0, template: "<div class=\"v-button\" [class.v-button--expanded]=\"expanded\">\n <a\n [routerLink]=\"routerLink ? routerLink : undefined\"\n [queryParams]=\"queryParams ? queryParams : undefined\"\n >\n <gov-button\n [type]=\"outlined === true ? 'outlined' : type\"\n [class.v-button--rounded]=\"rounded\"\n [color]=\"severity | govColor\"\n [disabled]=\"disabled\"\n [size]=\"size | govSize\"\n [name]=\"name\"\n [expanded]=\"expanded\"\n (gov-click)=\"handleClick($event)\"\n (click)=\"handleClick($event)\"\n >\n @if (icon) {\n <v-icon \n [name]=\"icon\"\n [library]=\"library\"\n [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\"\n />\n } @if (label) {\n {{ label | translate }}\n }\n </gov-button>\n </a>\n</div>\n", styles: [":host{display:inline-block}.v-button{display:inline-block}:host.v-button--expanded{display:block;width:100%}.v-button--expanded{display:block;width:100%}.v-button--rounded{border-radius:5rem}\n"], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovButton, selector: "gov-button", inputs: ["color", "disabled", "download", "expanded", "expandedMobile", "focusable", "href", "hreflang", "identifier", "loading", "name", "nativeType", "referrerpolicy", "rel", "size", "target", "type"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "v-icon" }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: GovColorPipe, name: "govColor" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
315
+ }
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonComponent, decorators: [{
317
+ type: Component,
318
+ args: [{ selector: "v-button", imports: [
319
+ GovDesignSystemModule, RouterModule, GovSizePipe, GovColorPipe, TranslateModule, IconComponent
320
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
321
+ '[class.v-button--expanded]': 'expanded'
322
+ }, providers: [
323
+ {
324
+ provide: BUTTON_COMPONENT_TOKEN,
325
+ useExisting: ButtonComponent,
326
+ }
327
+ ], template: "<div class=\"v-button\" [class.v-button--expanded]=\"expanded\">\n <a\n [routerLink]=\"routerLink ? routerLink : undefined\"\n [queryParams]=\"queryParams ? queryParams : undefined\"\n >\n <gov-button\n [type]=\"outlined === true ? 'outlined' : type\"\n [class.v-button--rounded]=\"rounded\"\n [color]=\"severity | govColor\"\n [disabled]=\"disabled\"\n [size]=\"size | govSize\"\n [name]=\"name\"\n [expanded]=\"expanded\"\n (gov-click)=\"handleClick($event)\"\n (click)=\"handleClick($event)\"\n >\n @if (icon) {\n <v-icon \n [name]=\"icon\"\n [library]=\"library\"\n [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\"\n />\n } @if (label) {\n {{ label | translate }}\n }\n </gov-button>\n </a>\n</div>\n", styles: [":host{display:inline-block}.v-button{display:inline-block}:host.v-button--expanded{display:block;width:100%}.v-button--expanded{display:block;width:100%}.v-button--rounded{border-radius:5rem}\n"] }]
328
+ }], propDecorators: { label: [{
329
+ type: Input
330
+ }], icon: [{
331
+ type: Input
332
+ }], library: [{
333
+ type: Input
334
+ }], badge: [{
335
+ type: Input
336
+ }], iconPos: [{
337
+ type: Input
338
+ }], disabled: [{
339
+ type: Input
340
+ }], rounded: [{
341
+ type: Input
342
+ }], outlined: [{
343
+ type: Input
344
+ }], raised: [{
345
+ type: Input
346
+ }], routerLink: [{
347
+ type: Input
348
+ }], size: [{
349
+ type: Input
350
+ }], queryParams: [{
351
+ type: Input
352
+ }], severity: [{
353
+ type: Input
354
+ }], type: [{
355
+ type: Input
356
+ }], expanded: [{
357
+ type: Input
358
+ }], name: [{
359
+ type: Input
360
+ }], click: [{
361
+ type: Output
362
+ }] } });
363
+
364
+ class ErrorComponent {
365
+ ngControl;
366
+ errorSlot = SlotPosition.bottom;
367
+ messageSlot = SlotPosition.bottom;
368
+ errorService = inject(ERROR_PROVIDER_TOKEN);
369
+ icons = Icons;
370
+ getErrorMessage(errors) {
371
+ return this.errorService.mapError(errors);
372
+ }
373
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
374
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ErrorComponent, isStandalone: true, selector: "v-validation-message", inputs: { ngControl: "ngControl", errorSlot: "errorSlot", messageSlot: "messageSlot" }, ngImport: i0, template: "@if (ngControl && ngControl.errors) {\n<gov-form-message \n [slot]=\"errorSlot\" \n color=\"error\"\n>\n {{ getErrorMessage(ngControl.errors) | async }}\n <gov-icon \n [name]=\"icons.warning\" \n slot=\"validation-icon\" />\n</gov-form-message>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
375
+ }
376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ErrorComponent, decorators: [{
377
+ type: Component,
378
+ args: [{ selector: "v-validation-message", imports: [CommonModule, GovDesignSystemModule], template: "@if (ngControl && ngControl.errors) {\n<gov-form-message \n [slot]=\"errorSlot\" \n color=\"error\"\n>\n {{ getErrorMessage(ngControl.errors) | async }}\n <gov-icon \n [name]=\"icons.warning\" \n slot=\"validation-icon\" />\n</gov-form-message>\n}\n" }]
379
+ }], propDecorators: { ngControl: [{
380
+ type: Input,
381
+ args: [{ required: true }]
382
+ }], errorSlot: [{
383
+ type: Input
384
+ }], messageSlot: [{
385
+ type: Input
386
+ }] } });
387
+
388
+ class CalendarComponent extends BaseFormInputComponent {
389
+ icon;
390
+ floatLabel;
391
+ maxDate;
392
+ minDate;
393
+ header;
394
+ footer;
395
+ selectionMode;
396
+ size = FieldSize.medium;
397
+ errorSlot = SlotPosition.bottom;
398
+ labelSlot = SlotPosition.top;
399
+ messageSlot = SlotPosition.bottom;
400
+ message;
401
+ name;
402
+ type = FieldType.date;
403
+ icons = Icons;
404
+ constructor(ngControl) {
405
+ super(ngControl);
406
+ }
407
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CalendarComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
408
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: CalendarComponent, isStandalone: true, selector: "v-calendar", inputs: { icon: "icon", floatLabel: "floatLabel", maxDate: "maxDate", minDate: "minDate", header: "header", footer: "footer", selectionMode: "selectionMode", size: "size", errorSlot: "errorSlot", labelSlot: "labelSlot", messageSlot: "messageSlot", message: "message", name: "name" }, providers: [
409
+ {
410
+ provide: CALENDAR_COMPONENT_TOKEN,
411
+ useExisting: CalendarComponent
412
+ }
413
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control class=\"mb-3\">\n @if (label) {\n <gov-form-label [slot]=\"labelSlot\" [size]=\"size | govSize\">\n {{ label | translate}}\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input\n [formControl]=\"formControl\"\n [attr.input-type]=\"type\"\n [invalid]=\"ngControl?.errors ? true : false\"\n [size]=\"size | govSize\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [attr.disabled]=\"readonly ? 'true' : 'false'\"\n [name]=\"name\"\n />\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n</gov-form-control>", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
414
+ }
415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CalendarComponent, decorators: [{
416
+ type: Component,
417
+ args: [{ selector: 'v-calendar', imports: [
418
+ ReactiveFormsModule,
419
+ GovDesignSystemModule,
420
+ GovSizePipe,
421
+ ErrorComponent,
422
+ TranslateModule
423
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
424
+ {
425
+ provide: CALENDAR_COMPONENT_TOKEN,
426
+ useExisting: CalendarComponent
427
+ }
428
+ ], template: "<gov-form-control class=\"mb-3\">\n @if (label) {\n <gov-form-label [slot]=\"labelSlot\" [size]=\"size | govSize\">\n {{ label | translate}}\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input\n [formControl]=\"formControl\"\n [attr.input-type]=\"type\"\n [invalid]=\"ngControl?.errors ? true : false\"\n [size]=\"size | govSize\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [attr.disabled]=\"readonly ? 'true' : 'false'\"\n [name]=\"name\"\n />\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n</gov-form-control>" }]
429
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
430
+ type: Optional
431
+ }, {
432
+ type: Self
433
+ }] }], propDecorators: { icon: [{
434
+ type: Input
435
+ }], floatLabel: [{
436
+ type: Input
437
+ }], maxDate: [{
438
+ type: Input
439
+ }], minDate: [{
440
+ type: Input
441
+ }], header: [{
442
+ type: Input
443
+ }], footer: [{
444
+ type: Input
445
+ }], selectionMode: [{
446
+ type: Input
447
+ }], size: [{
448
+ type: Input
449
+ }], errorSlot: [{
450
+ type: Input
451
+ }], labelSlot: [{
452
+ type: Input
453
+ }], messageSlot: [{
454
+ type: Input
455
+ }], message: [{
456
+ type: Input
457
+ }], name: [{
458
+ type: Input
459
+ }] } });
460
+
461
+ class CheckboxComponent extends BaseFormInputComponent {
462
+ size = FieldSize.medium;
463
+ value;
464
+ name;
465
+ indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
466
+ noLabel = false;
467
+ icons = Icons;
468
+ constructor(ngControl) {
469
+ super(ngControl);
470
+ }
471
+ id = v4();
472
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckboxComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
473
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.1", type: CheckboxComponent, isStandalone: true, selector: "v-checkbox", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, noLabel: { classPropertyName: "noLabel", publicName: "noLabel", isSignal: false, isRequired: false, transformFunction: null } }, providers: [{
474
+ provide: CHECKBOX_COMPONENT_TOKEN,
475
+ useExisting: CheckboxComponent,
476
+ }], usesInheritance: true, ngImport: i0, template: "<gov-form-control class=\"mt-3\">\n <gov-form-checkbox \n [formControl]=\"formControl\"\n [size]=\"size | govSize\"\n [value]=\"value\"\n [required]=\"required\"\n [attr.disabled]=\"disabled ? 'true' : 'false'\"\n [identifier]=\"id\"\n [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [invalid]=\"ngControl?.errors\"\n [noLabel]=\"noLabel\"\n [disabled]=\"disabled\"\n > \n <gov-form-label\n [size]=\"size\"\n slot=\"label\"\n >\n {{ label ?? '' | translate }}\n </gov-form-label>\n </gov-form-checkbox>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormCheckbox, selector: "gov-form-checkbox", inputs: ["checked", "disabled", "identifier", "indeterminate", "invalid", "name", "noLabel", "required", "size", "value"] }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "directive", type: i2.BooleanValueAccessor, selector: "gov-form-checkbox,gov-form-switch" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
477
+ }
478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckboxComponent, decorators: [{
479
+ type: Component,
480
+ args: [{ selector: "v-checkbox", imports: [
481
+ GovDesignSystemModule,
482
+ RouterModule,
483
+ ReactiveFormsModule,
484
+ GovSizePipe,
485
+ ErrorComponent,
486
+ TranslateModule
487
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
488
+ provide: CHECKBOX_COMPONENT_TOKEN,
489
+ useExisting: CheckboxComponent,
490
+ }], template: "<gov-form-control class=\"mt-3\">\n <gov-form-checkbox \n [formControl]=\"formControl\"\n [size]=\"size | govSize\"\n [value]=\"value\"\n [required]=\"required\"\n [attr.disabled]=\"disabled ? 'true' : 'false'\"\n [identifier]=\"id\"\n [indeterminate]=\"indeterminate\"\n [name]=\"name\"\n [invalid]=\"ngControl?.errors\"\n [noLabel]=\"noLabel\"\n [disabled]=\"disabled\"\n > \n <gov-form-label\n [size]=\"size\"\n slot=\"label\"\n >\n {{ label ?? '' | translate }}\n </gov-form-label>\n </gov-form-checkbox>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n" }]
491
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
492
+ type: Optional
493
+ }, {
494
+ type: Self
495
+ }] }], propDecorators: { size: [{
496
+ type: Input
497
+ }], value: [{
498
+ type: Input
499
+ }], name: [{
500
+ type: Input
501
+ }], noLabel: [{
502
+ type: Input
503
+ }] } });
504
+
505
+ /* eslint-disable @typescript-eslint/no-explicit-any */
506
+ class DynamicComponentFactoryService {
507
+ componentFactoryResolver;
508
+ constructor(componentFactoryResolver) {
509
+ this.componentFactoryResolver = componentFactoryResolver;
510
+ }
511
+ ngOnDestroy() {
512
+ this.unsubscribeComponentEvents(this);
513
+ }
514
+ async createDynamicComponent(componentType, viewContainerRef, inputs, injector = undefined) {
515
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);
516
+ viewContainerRef.clear();
517
+ const component = viewContainerRef.createComponent(componentFactory, undefined, injector);
518
+ this.setComponentDataInt(componentFactory, component, inputs);
519
+ this.fireComponentEvents(component.instance, inputs);
520
+ return component;
521
+ }
522
+ setComponentData(component, inputs) {
523
+ const factory = this.componentFactoryResolver.resolveComponentFactory(component.componentType);
524
+ this.setComponentDataInt(factory, component, inputs);
525
+ }
526
+ unsubscribeComponentEvents(instance) {
527
+ const subscriptionStoreKey = '__outputSubscriptions__';
528
+ const subscriptions = instance[subscriptionStoreKey];
529
+ if (subscriptions) {
530
+ subscriptions.forEach((sub) => sub.unsubscribe());
531
+ subscriptions.clear();
532
+ }
533
+ }
534
+ fireComponentEvents(instance, inputs) {
535
+ if (!instance || typeof instance !== 'object')
536
+ return;
537
+ this.fireInputComponentEvents(instance, inputs);
538
+ this.fireOutputComponentEvents(instance, inputs);
539
+ }
540
+ setComponentDataInt(factory, component, inputs) {
541
+ if (inputs) {
542
+ const propertyNames = factory.inputs.map((x) => x.propName);
543
+ const inputsHash = new Set(propertyNames);
544
+ Object.keys(inputs)
545
+ .filter((x) => inputsHash.has(x))
546
+ .forEach((x) => {
547
+ component.instance[x] = inputs[x];
548
+ });
549
+ }
550
+ }
551
+ fireInputComponentEvents(instance, inputs) {
552
+ const onChangeComponent = instance;
553
+ if (onChangeComponent.ngOnChanges && inputs) {
554
+ const changeEventArgs = Object.keys(inputs).reduce((changes, key) => {
555
+ const inputValue = inputs[key];
556
+ changes[key] = new SimpleChange(undefined, inputValue, true);
557
+ return changes;
558
+ }, {});
559
+ onChangeComponent.ngOnChanges(changeEventArgs);
560
+ }
561
+ }
562
+ fireOutputComponentEvents(instance, inputs) {
563
+ const outputs = Object.keys(inputs).filter((key) => {
564
+ const emitter = instance[key];
565
+ return emitter instanceof EventEmitter;
566
+ });
567
+ const subscriptionStoreKey = '__outputSubscriptions__';
568
+ if (!(subscriptionStoreKey in instance)) {
569
+ instance[subscriptionStoreKey] = new Map();
570
+ }
571
+ const subscriptions = instance[subscriptionStoreKey];
572
+ for (const outputKey of outputs) {
573
+ const eventEmitter = instance[outputKey];
574
+ const callback = inputs[outputKey];
575
+ if (eventEmitter && typeof callback === 'function') {
576
+ if (subscriptions.has(outputKey)) {
577
+ subscriptions.get(outputKey).unsubscribe();
578
+ }
579
+ const subscription = eventEmitter.subscribe((value) => callback(value));
580
+ subscriptions.set(outputKey, subscription);
581
+ }
582
+ }
583
+ }
584
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponentFactoryService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
585
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponentFactoryService, providedIn: 'root' });
586
+ }
587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponentFactoryService, decorators: [{
588
+ type: Injectable,
589
+ args: [{
590
+ providedIn: 'root',
591
+ }]
592
+ }], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }] });
593
+
594
+ class DynamicComponent {
595
+ componentType;
596
+ data;
597
+ container;
598
+ factoryServices = inject(DynamicComponentFactoryService);
599
+ changeDetectorRef = inject(ChangeDetectorRef);
600
+ injector = inject(Injector);
601
+ ngOnChanges() {
602
+ this.createComponent();
603
+ }
604
+ ngAfterViewInit() {
605
+ this.createComponent();
606
+ this.changeDetectorRef.detectChanges();
607
+ }
608
+ createComponent() {
609
+ if (this.container) {
610
+ this.factoryServices.createDynamicComponent(this.componentType, this.container, this.data, this.injector);
611
+ }
612
+ }
613
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
614
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: DynamicComponent, isStandalone: true, selector: "v-dynamic-component", inputs: { componentType: "componentType", data: "data" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<ng-container #dynamicContainer></ng-container>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
615
+ }
616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponent, decorators: [{
617
+ type: Component,
618
+ args: [{
619
+ selector: 'v-dynamic-component',
620
+ standalone: true,
621
+ changeDetection: ChangeDetectionStrategy.OnPush,
622
+ template: `<ng-container #dynamicContainer></ng-container>`,
623
+ }]
624
+ }], propDecorators: { componentType: [{
625
+ type: Input
626
+ }], data: [{
627
+ type: Input
628
+ }], container: [{
629
+ type: ViewChild,
630
+ args: ['dynamicContainer', { read: ViewContainerRef, static: true }]
631
+ }] } });
632
+
633
+ class ConfirmDialogComponent extends UnsubscribeComponent {
634
+ dialogService;
635
+ cdr;
636
+ constructor(dialogService, cdr) {
637
+ super();
638
+ this.dialogService = dialogService;
639
+ this.cdr = cdr;
640
+ }
641
+ visible = false;
642
+ closable = false;
643
+ data = { severity: 'primary', headerIcon: 'info-circle' };
644
+ ngOnInit() {
645
+ this.dialogService.showEvent
646
+ .pipe(takeUntil(this.destroyed$))
647
+ .subscribe((x) => {
648
+ this.data = x;
649
+ this.visible = true;
650
+ this.cdr.detectChanges();
651
+ });
652
+ this.dialogService.closeEvent
653
+ .pipe(takeUntil(this.destroyed$))
654
+ .subscribe(() => {
655
+ this.data = {};
656
+ this.visible = false;
657
+ this.cdr.detectChanges();
658
+ });
659
+ }
660
+ dialogClick(confirm) {
661
+ const { confirmButtonFn, cancelButtonFn } = this.data;
662
+ if (confirm && confirmButtonFn) {
663
+ confirmButtonFn();
664
+ }
665
+ if (!confirm && cancelButtonFn) {
666
+ cancelButtonFn();
667
+ }
668
+ this.visible = false;
669
+ this.cdr.detectChanges();
670
+ }
671
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: i1$3.DialogService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
672
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ConfirmDialogComponent, isStandalone: true, selector: "v-confirm-dialog", providers: [
673
+ {
674
+ provide: CONFIRM_DIALOG_COMPONENT_TOKEN,
675
+ useExisting: ConfirmDialogComponent,
676
+ },
677
+ ], usesInheritance: true, ngImport: i0, template: "<gov-dialog\n [open]=\"visible\"\n [attr.block-close]=\"data.closable !== undefined ? !data.closable : false\"\n [attr.block-backdrop-close]=\"data.closable !== undefined ? !data.closable : false\" \n [style.--dialog-max-width]=\"data.width\"\n [style.--dialog-max-height]=\"data.height\"\n role=\"dialog\"\n accessible-close-label=\"Close dialog box with more information\"\n (gov-close)=\"data.cancelButtonFn ? dialogClick(false) : (visible = false)\"\n>\n <gov-icon\n type=\"components\"\n [name]=\"data.headerIcon\"\n slot=\"icon\"\n [color]=\"data.severity | govColor\"\n />\n \n <h2 slot=\"title\">{{ data.title ?? 'Title' }}</h2>\n\n @if (data && data.innerHTML) {\n <div [innerHTML]=\"data.innerHTML\"></div>\n } @else if (data.componentType) {\n <v-dynamic-component\n [componentType]=\"data.componentType\"\n [data]=\"$any(data.data)\"\n ></v-dynamic-component>\n }\n\n <gov-button\n color=\"primary\"\n size=\"m\"\n type=\"solid\"\n slot=\"footer\"\n (gov-click)=\"data.confirmButtonFn ? dialogClick(true) : (visible = false)\"\n >\n {{ data.confirmButtonText ?? 'Yes'}}\n </gov-button>\n \n <gov-button\n [ngClass]=\"!data.showCancelButton ? 'd-none' : ''\"\n color=\"primary\"\n size=\"m\"\n type=\"outlined\"\n slot=\"footer\"\n [disabled]=\"!data.showCancelButton\"\n (gov-click)=\"data.cancelButtonFn ? dialogClick(false) : (visible = false)\"\n >\n {{ data.cancelButtonText ?? 'No' }}\n </gov-button>\n</gov-dialog>\n", styles: [":host ::ng-deep dialog{max-width:var(--dialog-max-width, 95%);max-height:var(--dialog-max-height, 95%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovButton, selector: "gov-button", inputs: ["color", "disabled", "download", "expanded", "expandedMobile", "focusable", "href", "hreflang", "identifier", "loading", "name", "nativeType", "referrerpolicy", "rel", "size", "target", "type"] }, { kind: "component", type: i2.GovDialog, selector: "gov-dialog", inputs: ["accessibleCloseLabel", "accessibleCloseLabelledBy", "accessibleDescribedBy", "accessibleLabelledBy", "blockBackdropClose", "blockClose", "labelTag", "open", "role"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: DynamicComponent, selector: "v-dynamic-component", inputs: ["componentType", "data"] }, { kind: "pipe", type: GovColorPipe, name: "govColor" }] });
678
+ }
679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
680
+ type: Component,
681
+ args: [{ selector: 'v-confirm-dialog', imports: [
682
+ CommonModule,
683
+ GovDesignSystemModule,
684
+ GovColorPipe,
685
+ DynamicComponent,
686
+ ], providers: [
687
+ {
688
+ provide: CONFIRM_DIALOG_COMPONENT_TOKEN,
689
+ useExisting: ConfirmDialogComponent,
690
+ },
691
+ ], template: "<gov-dialog\n [open]=\"visible\"\n [attr.block-close]=\"data.closable !== undefined ? !data.closable : false\"\n [attr.block-backdrop-close]=\"data.closable !== undefined ? !data.closable : false\" \n [style.--dialog-max-width]=\"data.width\"\n [style.--dialog-max-height]=\"data.height\"\n role=\"dialog\"\n accessible-close-label=\"Close dialog box with more information\"\n (gov-close)=\"data.cancelButtonFn ? dialogClick(false) : (visible = false)\"\n>\n <gov-icon\n type=\"components\"\n [name]=\"data.headerIcon\"\n slot=\"icon\"\n [color]=\"data.severity | govColor\"\n />\n \n <h2 slot=\"title\">{{ data.title ?? 'Title' }}</h2>\n\n @if (data && data.innerHTML) {\n <div [innerHTML]=\"data.innerHTML\"></div>\n } @else if (data.componentType) {\n <v-dynamic-component\n [componentType]=\"data.componentType\"\n [data]=\"$any(data.data)\"\n ></v-dynamic-component>\n }\n\n <gov-button\n color=\"primary\"\n size=\"m\"\n type=\"solid\"\n slot=\"footer\"\n (gov-click)=\"data.confirmButtonFn ? dialogClick(true) : (visible = false)\"\n >\n {{ data.confirmButtonText ?? 'Yes'}}\n </gov-button>\n \n <gov-button\n [ngClass]=\"!data.showCancelButton ? 'd-none' : ''\"\n color=\"primary\"\n size=\"m\"\n type=\"outlined\"\n slot=\"footer\"\n [disabled]=\"!data.showCancelButton\"\n (gov-click)=\"data.cancelButtonFn ? dialogClick(false) : (visible = false)\"\n >\n {{ data.cancelButtonText ?? 'No' }}\n </gov-button>\n</gov-dialog>\n", styles: [":host ::ng-deep dialog{max-width:var(--dialog-max-width, 95%);max-height:var(--dialog-max-height, 95%)}\n"] }]
692
+ }], ctorParameters: () => [{ type: i1$3.DialogService }, { type: i0.ChangeDetectorRef }] });
693
+
694
+ class TooltipComponent {
695
+ color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : []));
696
+ position = input(undefined, ...(ngDevMode ? [{ debugName: "position" }] : []));
697
+ size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : []));
698
+ tooltipText = input(undefined, ...(ngDevMode ? [{ debugName: "tooltipText" }] : []));
699
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
700
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.1", type: TooltipComponent, isStandalone: true, selector: "v-tooltip", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<gov-tooltip\n class=\"ms-2\"\n [color]=\"color\"\n [size]=\"size() | govSize\"\n [position]=\"position()\"\n [message]=\"tooltipText()\"\n>\n <ng-content></ng-content>\n</gov-tooltip>", dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovTooltip, selector: "gov-tooltip", inputs: ["color", "icon", "identifier", "message", "position", "size"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }] });
701
+ }
702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TooltipComponent, decorators: [{
703
+ type: Component,
704
+ args: [{ selector: "v-tooltip", imports: [
705
+ GovDesignSystemModule,
706
+ GovSizePipe
707
+ ], template: "<gov-tooltip\n class=\"ms-2\"\n [color]=\"color\"\n [size]=\"size() | govSize\"\n [position]=\"position()\"\n [message]=\"tooltipText()\"\n>\n <ng-content></ng-content>\n</gov-tooltip>" }]
708
+ }] });
709
+
710
+ class TextfieldComponent extends BaseFormInputComponent {
711
+ floatLabel;
712
+ type = FieldType.text;
713
+ minlength = 0;
714
+ maxlength = 524288;
715
+ min = -2147483648;
716
+ max = 2147483647;
717
+ prefix;
718
+ sufix;
719
+ message;
720
+ name;
721
+ role;
722
+ size = FieldSize.medium;
723
+ icon;
724
+ iconPos = IconPosition.right;
725
+ labelSlot = SlotPosition.top;
726
+ errorSlot = SlotPosition.bottom;
727
+ messageSlot = SlotPosition.bottom;
728
+ constructor(ngControl) {
729
+ super(ngControl);
730
+ if (ngControl) {
731
+ ngControl.valueAccessor = this;
732
+ }
733
+ }
734
+ ngOnInit() {
735
+ super.ngOnInit();
736
+ if (!this.formControl && this.ngControl) {
737
+ this.formControl = this.ngControl.control;
738
+ }
739
+ if (this.formControl && this.type === FieldType.number) {
740
+ this.setMinMaxNumberInputValidators();
741
+ }
742
+ }
743
+ setMinMaxNumberInputValidators() {
744
+ if (!this.formControl) {
745
+ return;
746
+ }
747
+ const validators = [];
748
+ if (this.min !== undefined && this.min !== null) {
749
+ validators.push(Validators.min(this.min));
750
+ }
751
+ if (this.max !== undefined && this.max !== null) {
752
+ validators.push(Validators.max(this.max));
753
+ }
754
+ this.formControl.addValidators(validators);
755
+ this.formControl.updateValueAndValidity({ onlySelf: true, emitEvent: true });
756
+ }
757
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextfieldComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
758
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TextfieldComponent, isStandalone: true, selector: "v-textfield", inputs: { floatLabel: "floatLabel", type: "type", minlength: "minlength", maxlength: "maxlength", min: "min", max: "max", prefix: "prefix", sufix: "sufix", message: "message", name: "name", role: "role", size: "size", icon: "icon", iconPos: "iconPos", labelSlot: "labelSlot", errorSlot: "errorSlot", messageSlot: "messageSlot" }, providers: [
759
+ {
760
+ provide: TEXTFIELD_COMPONENT_TOKEN,
761
+ useExisting: TextfieldComponent,
762
+ },
763
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control>\n @if (label) {\n <gov-form-label [slot]=\"labelSlot\" [size]=\"size | govSize\">\n {{ label | translate }}\n @if (tooltip) {\n <v-tooltip [tooltipText]=\"tooltip | translate\" />\n }\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input [inputType]=\"type\" [formControl]=\"formControl\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\n [min]=\"min\" [max]=\"max\" [size]='size | govSize' [name]='name' [role]='role' [required]=\"required\"\n [attr.disabled]=\"disabled ? 'true' : 'false'\" [invalid]=\"ngControl?.errors ? true : false\"\n [placeholder]=\"placeholder\">\n @if (icon) {\n <gov-icon [name]=\"icon\" [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\" />\n } @if (prefix) {\n <p slot=\"prefix\">\n {{ prefix }}\n </p>\n } @if (sufix) {\n <p slot=\"sufix\">\n {{ sufix }}\n </p>\n }\n </gov-form-input>\n <v-validation-message [ngControl]=\"ngControl\" />\n @if (message) {\n <gov-form-message [slot]=\"messageSlot\" color=\"neutral\">\n {{ message }}\n </gov-form-message>\n }\n </gov-form-group>\n</gov-form-control>", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "component", type: TooltipComponent, selector: "v-tooltip", inputs: ["color", "position", "size", "tooltipText"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
764
+ }
765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextfieldComponent, decorators: [{
766
+ type: Component,
767
+ args: [{ selector: 'v-textfield', imports: [
768
+ ReactiveFormsModule,
769
+ GovDesignSystemModule,
770
+ TooltipComponent,
771
+ GovSizePipe,
772
+ TranslateModule,
773
+ ErrorComponent
774
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
775
+ {
776
+ provide: TEXTFIELD_COMPONENT_TOKEN,
777
+ useExisting: TextfieldComponent,
778
+ },
779
+ ], template: "<gov-form-control>\n @if (label) {\n <gov-form-label [slot]=\"labelSlot\" [size]=\"size | govSize\">\n {{ label | translate }}\n @if (tooltip) {\n <v-tooltip [tooltipText]=\"tooltip | translate\" />\n }\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input [inputType]=\"type\" [formControl]=\"formControl\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\n [min]=\"min\" [max]=\"max\" [size]='size | govSize' [name]='name' [role]='role' [required]=\"required\"\n [attr.disabled]=\"disabled ? 'true' : 'false'\" [invalid]=\"ngControl?.errors ? true : false\"\n [placeholder]=\"placeholder\">\n @if (icon) {\n <gov-icon [name]=\"icon\" [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\" />\n } @if (prefix) {\n <p slot=\"prefix\">\n {{ prefix }}\n </p>\n } @if (sufix) {\n <p slot=\"sufix\">\n {{ sufix }}\n </p>\n }\n </gov-form-input>\n <v-validation-message [ngControl]=\"ngControl\" />\n @if (message) {\n <gov-form-message [slot]=\"messageSlot\" color=\"neutral\">\n {{ message }}\n </gov-form-message>\n }\n </gov-form-group>\n</gov-form-control>" }]
780
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
781
+ type: Optional
782
+ }, {
783
+ type: Self
784
+ }] }], propDecorators: { floatLabel: [{
785
+ type: Input
786
+ }], type: [{
787
+ type: Input
788
+ }], minlength: [{
789
+ type: Input
790
+ }], maxlength: [{
791
+ type: Input
792
+ }], min: [{
793
+ type: Input
794
+ }], max: [{
795
+ type: Input
796
+ }], prefix: [{
797
+ type: Input
798
+ }], sufix: [{
799
+ type: Input
800
+ }], message: [{
801
+ type: Input
802
+ }], name: [{
803
+ type: Input
804
+ }], role: [{
805
+ type: Input
806
+ }], size: [{
807
+ type: Input
808
+ }], icon: [{
809
+ type: Input
810
+ }], iconPos: [{
811
+ type: Input
812
+ }], labelSlot: [{
813
+ type: Input
814
+ }], errorSlot: [{
815
+ type: Input
816
+ }], messageSlot: [{
817
+ type: Input
818
+ }] } });
819
+
820
+ class DropdownItemComponent {
821
+ item;
822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: DropdownItemComponent, isStandalone: true, selector: "v-dropdown-item", inputs: { item: "item" }, ngImport: i0, template: "<li\r\n role=\"option\"\r\n class=\"v-dropdown__item\"\r\n [attr.aria-selected]=\"item?.selected\"\r\n [class.is-active]=\"item?.selected\"\r\n>\r\n {{item?.label}}\r\n</li>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
824
+ }
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownItemComponent, decorators: [{
826
+ type: Component,
827
+ args: [{ selector: 'v-dropdown-item', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<li\r\n role=\"option\"\r\n class=\"v-dropdown__item\"\r\n [attr.aria-selected]=\"item?.selected\"\r\n [class.is-active]=\"item?.selected\"\r\n>\r\n {{item?.label}}\r\n</li>" }]
828
+ }], propDecorators: { item: [{
829
+ type: Input
830
+ }] } });
831
+
832
+ class DropdownComponent extends BaseFormInputComponent {
833
+ changeDetectorRef;
834
+ filterTextField;
835
+ options = [];
836
+ optionLabel;
837
+ optionValue;
838
+ dropdownIcon;
839
+ floatLabel;
840
+ lazy;
841
+ filter;
842
+ editable;
843
+ loading;
844
+ size = FieldSize.medium;
845
+ showFilter = true;
846
+ localSearch = true;
847
+ forceMinWidth = false;
848
+ changed = new EventEmitter();
849
+ showed = new EventEmitter();
850
+ cleared = new EventEmitter();
851
+ lazyLoad = new EventEmitter();
852
+ filtered = new EventEmitter();
853
+ opened = false;
854
+ icons = Icons;
855
+ selectedItem;
856
+ filterControl = new FormControl('');
857
+ filterSub;
858
+ dropdownOptions;
859
+ pageSize = DEFAULT_PAGE_SIZE;
860
+ lastPage;
861
+ get labelClasses() {
862
+ return {
863
+ disabled: this.ngControl?.disabled,
864
+ error: this.ngControl?.invalid
865
+ };
866
+ }
867
+ get inputClasses() {
868
+ return {
869
+ 'disabled-input': this.ngControl?.disabled,
870
+ 'error-input': this.ngControl?.invalid
871
+ };
872
+ }
873
+ constructor(ngControl, changeDetectorRef) {
874
+ super(ngControl);
875
+ this.changeDetectorRef = changeDetectorRef;
876
+ }
877
+ ngOnInit() {
878
+ super.ngOnInit();
879
+ this.filterSub = this.filterControl.valueChanges.pipe(debounceTime(300), distinctUntilChanged()).subscribe((value) => {
880
+ this.filterOptions(value);
881
+ });
882
+ }
883
+ writeValue(value) {
884
+ const selectedItem = (value == undefined || value === "") ? undefined : (this.dropdownOptions?.find(x => x.value === value)
885
+ ?? { value, label: '', option: undefined, selected: false });
886
+ this.selectItem(selectedItem, false);
887
+ this.changeDetectorRef.detectChanges();
888
+ }
889
+ ngOnChanges(changes) {
890
+ if (changes['options'] || changes['loading']) {
891
+ this.dropdownOptions = this.convertToOptions();
892
+ if (this.selectedItem && !this.selectedItem?.item) {
893
+ const item = this.dropdownOptions?.find(x => this.selectedItem?.value === x.value);
894
+ if (item) {
895
+ this.selectItem(item, false);
896
+ }
897
+ }
898
+ }
899
+ this.changeDetectorRef.detectChanges();
900
+ }
901
+ convertToOptions() {
902
+ return this.options?.map((option) => ({
903
+ label: (this.optionLabel ? getValueByPath(option, this.optionLabel) : option),
904
+ value: this.optionValue ? getValueByPath(option, this.optionValue) : option,
905
+ item: option,
906
+ selected: false,
907
+ }));
908
+ }
909
+ ngOnDestroy() {
910
+ this.filterSub?.unsubscribe();
911
+ }
912
+ toggleDropdown() {
913
+ if (this.ngControl?.disabled) {
914
+ return;
915
+ }
916
+ if (!this.opened) {
917
+ this.openDropdown();
918
+ }
919
+ else {
920
+ this.closeDropdown();
921
+ }
922
+ }
923
+ clearSelection(event) {
924
+ event.stopPropagation();
925
+ this.changed.emit(null);
926
+ this.dropdownOptions = this.dropdownOptions?.map(x => ({ ...x, selected: false })) ?? [];
927
+ this.ngControl?.control?.setValue(null);
928
+ }
929
+ openDropdown() {
930
+ this.opened = true;
931
+ this.setFilterFocus();
932
+ this.showed.emit();
933
+ }
934
+ selectItem(option, emitChange) {
935
+ if (option == undefined) {
936
+ this.selectedItem = undefined;
937
+ this.closeDropdown();
938
+ return;
939
+ }
940
+ if (this.selectedItem && this.selectedItem != option) {
941
+ this.selectedItem.selected = false;
942
+ }
943
+ option.selected = true;
944
+ this.selectedItem = option;
945
+ if (emitChange) {
946
+ if (this.ngControl?.control?.value !== option.value) {
947
+ this.changed.emit(option.value);
948
+ this.ngControl?.control?.setValue(option?.value);
949
+ }
950
+ }
951
+ this.closeDropdown();
952
+ }
953
+ onDocumentClick(event) {
954
+ const target = event.target;
955
+ if (!target.closest('v-dropdown')) {
956
+ this.opened = false;
957
+ }
958
+ }
959
+ onScroll(index) {
960
+ this.loadDataForIndex(index);
961
+ }
962
+ onKeyDown(event) {
963
+ if (this.formControl.disabled || this.readonly || this.loading || !this.opened) {
964
+ return;
965
+ }
966
+ switch (event.code) {
967
+ case 'ArrowDown':
968
+ break;
969
+ case 'ArrowUp':
970
+ break;
971
+ case 'ArrowLeft':
972
+ case 'ArrowRight':
973
+ break;
974
+ }
975
+ }
976
+ loadDataForIndex(index) {
977
+ if (this.lazy) {
978
+ const currentPage = Math.floor(index / this.pageSize);
979
+ const shouldLazyLoad = currentPage !== this.lastPage;
980
+ if (shouldLazyLoad) {
981
+ this.lastPage = currentPage;
982
+ this.lazyLoad.emit({
983
+ filter: this.createFilterObject(this.filterControl.value),
984
+ offset: currentPage * this.pageSize,
985
+ limit: this.pageSize,
986
+ });
987
+ }
988
+ }
989
+ }
990
+ setFilterFocus() {
991
+ setTimeout(() => {
992
+ this.filterTextField?.nativeElement?.querySelector("input").focus();
993
+ }, 200);
994
+ }
995
+ closeDropdown() {
996
+ this.opened = false;
997
+ }
998
+ filterOptions(value) {
999
+ if (!this.localSearch) {
1000
+ this.filtered.emit({
1001
+ filter: !value ? undefined : value,
1002
+ });
1003
+ }
1004
+ if (this.lazy) {
1005
+ this.loadDataForIndex(0);
1006
+ }
1007
+ else {
1008
+ const loweredFilterValue = value?.toLocaleLowerCase();
1009
+ this.dropdownOptions = !loweredFilterValue ?
1010
+ this.convertToOptions()
1011
+ : this.convertToOptions()?.filter(x => x.label?.toLocaleLowerCase()?.indexOf(loweredFilterValue) !== -1);
1012
+ this.changeDetectorRef.detectChanges();
1013
+ }
1014
+ }
1015
+ createFilterObject(filterValue) {
1016
+ return (this.optionLabel ? { [this.optionLabel]: filterValue } : filterValue);
1017
+ }
1018
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1019
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: DropdownComponent, isStandalone: true, selector: "v-dropdown", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", dropdownIcon: "dropdownIcon", floatLabel: "floatLabel", lazy: "lazy", filter: "filter", editable: "editable", loading: "loading", size: "size", showFilter: "showFilter", localSearch: "localSearch", forceMinWidth: "forceMinWidth" }, outputs: { changed: "changed", showed: "showed", cleared: "cleared", lazyLoad: "lazyLoad", filtered: "filtered" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [
1020
+ {
1021
+ provide: DROPDOWN_COMPONENT_TOKEN,
1022
+ useExisting: DropdownComponent,
1023
+ },
1024
+ ], viewQueries: [{ propertyName: "filterTextField", first: true, predicate: ["filterTextField"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"v-dropdown mb-3\"\n (keydown)=\"onKeyDown($event)\"\n>\n <gov-form-control [disabled]=\"this.ngControl?.disabled\">\n @if (label && !floatLabel) {\n <gov-form-label\n slot=\"top\"\n [ngClass]=\"labelClasses\"\n >\n <span [ngClass]=\"labelClasses\">\n {{ label | translate }}\n @if (tooltip) {\n <v-tooltip [message]=\"tooltip | translate\" />\n }\n </span>\n </gov-form-label>\n }\n <div\n class=\"gov-form-input\"\n [ngStyle]=\"forceMinWidth ? {'min-width': '16rem'} : {}\"\n [ngClass]=\"inputClasses\"\n >\n <div\n class=\"element d-flex gov-form-input-child\"\n [ngClass]=\"labelClasses\"\n (click)=\"toggleDropdown()\"\n >\n <div class=\"v-dropdown__value flex-grow-1 me-1\">{{ selectedItem?.label ?? placeholder }}</div>\n @if (clearable && ngControl?.enabled && selectedItem !== undefined && selectedItem !== null) {\n <gov-icon\n [name]=\"icons.cross\"\n size=\"m\"\n class=\"v-dropdown__clear me-1\"\n color=\"error\"\n (click)=\"clearSelection($event)\"\n />\n }\n @if (loading) {\n <div class=\"v-dropdown__loader\">\n <gov-icon [name]=\"icons.loader\" />\n </div>\n }\n <div class=\"v-dropdown__trigger\">\n <gov-icon [name]=\"opened ? icons.chevronUp : icons.chevronDown\" />\n </div>\n </div>\n </div>\n <div class=\"position-relative\">\n @if (opened) {\n <div class=\"v-dropdown__container\">\n @if (showFilter) {\n <div\n class=\"v-dropdown__filter\"\n #filterTextField\n (keydown)=\"onKeyDown($event)\"\n >\n <v-textfield\n placeholder=\"Search\"\n [formControl]=\"filterControl\"\n iconPos=\"right\"\n [icon]=\"icons.search\"\n />\n </div>\n }\n @if (!dropdownOptions?.length) {\n <div class=\"v-dropdown__no-item\">No option was found.</div>\n } @else {\n <ul\n role=\"listbox\"\n class=\"v-dropdown__list\"\n >\n <cdk-virtual-scroll-viewport\n [itemSize]=\"30\"\n class=\"v-dropdown__scroll\"\n (scrolledIndexChange)=\"onScroll($event)\"\n >\n <v-dropdown-item\n *cdkVirtualFor=\"let option of dropdownOptions;\"\n [item]=\"option\"\n (click)=\"selectItem(option, true)\"\n />\n </cdk-virtual-scroll-viewport>\n </ul>\n }\n </div>\n }\n </div>\n <v-validation-message [ngControl]=\"ngControl\" />\n </gov-form-control>\n</div>\n", styles: [".v-dropdown__container{position:absolute;z-index:100;background-color:var(--button-outlined-primary-hover);min-width:100%;border-radius:var(--border-radius, var(--corner-radius-s));border:var(--border-width, .0625rem) solid var(--form-border-color, var(--border-neutral))}.v-dropdown__trigger{min-height:1.5rem;display:flex}.disabled{color:var(--form-state-value-disabled, var(--text-disabled));cursor:default!important;pointer-events:none}.disabled-input{border-color:var(--form-state-border-disabled, var(--border-subtlest))!important;background:var(--form-state-bg-disabled, transparent)}.error{color:var(--form-state-label-error, var(--text-status-error))}.error-input{border-color:var(--form-state-border-error, var(--status-error))!important}.gov-form-input-child{padding:.5rem .75rem;border:0px!important}.v-dropdown__no-item{padding:.5rem}.v-dropdown__list{margin:0;padding:0;list-style-type:none;display:flex;flex-direction:column;overflow:auto}.v-dropdown__scroll{height:10rem}.v-dropdown__filter{padding:.5rem}.v-dropdown__item{padding:.25rem .5rem;cursor:pointer}.v-dropdown__item.is-active{background-color:var(--background-primary);color:var(--text-white)}.v-dropdown__item.is-active:hover{opacity:.8}.v-dropdown__item:hover{background-color:var(--background-primary);color:var(--text-white)}.v-dropdown__loader{width:1.5rem;height:1.5rem;margin-right:1rem;animation:rotate 1s linear infinite;display:inline-block;transform-origin:center;color:var(--color-neutral-300)}.v-dropdown__clear{z-index:99;cursor:pointer}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}::ng-deep .cdk-virtual-scrollable{contain:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "component", type: DropdownItemComponent, selector: "v-dropdown-item", inputs: ["item"] }, { kind: "component", type: TextfieldComponent, selector: "v-textfield", inputs: ["floatLabel", "type", "minlength", "maxlength", "min", "max", "prefix", "sufix", "message", "name", "role", "size", "icon", "iconPos", "labelSlot", "errorSlot", "messageSlot"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i4.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1025
+ }
1026
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownComponent, decorators: [{
1027
+ type: Component,
1028
+ args: [{ selector: 'v-dropdown', imports: [
1029
+ CommonModule,
1030
+ ReactiveFormsModule,
1031
+ GovDesignSystemModule,
1032
+ ErrorComponent,
1033
+ DropdownItemComponent,
1034
+ TextfieldComponent,
1035
+ ScrollingModule,
1036
+ TranslateModule,
1037
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
1038
+ {
1039
+ provide: DROPDOWN_COMPONENT_TOKEN,
1040
+ useExisting: DropdownComponent,
1041
+ },
1042
+ ], schemas: [
1043
+ NO_ERRORS_SCHEMA
1044
+ ], template: "<div\n class=\"v-dropdown mb-3\"\n (keydown)=\"onKeyDown($event)\"\n>\n <gov-form-control [disabled]=\"this.ngControl?.disabled\">\n @if (label && !floatLabel) {\n <gov-form-label\n slot=\"top\"\n [ngClass]=\"labelClasses\"\n >\n <span [ngClass]=\"labelClasses\">\n {{ label | translate }}\n @if (tooltip) {\n <v-tooltip [message]=\"tooltip | translate\" />\n }\n </span>\n </gov-form-label>\n }\n <div\n class=\"gov-form-input\"\n [ngStyle]=\"forceMinWidth ? {'min-width': '16rem'} : {}\"\n [ngClass]=\"inputClasses\"\n >\n <div\n class=\"element d-flex gov-form-input-child\"\n [ngClass]=\"labelClasses\"\n (click)=\"toggleDropdown()\"\n >\n <div class=\"v-dropdown__value flex-grow-1 me-1\">{{ selectedItem?.label ?? placeholder }}</div>\n @if (clearable && ngControl?.enabled && selectedItem !== undefined && selectedItem !== null) {\n <gov-icon\n [name]=\"icons.cross\"\n size=\"m\"\n class=\"v-dropdown__clear me-1\"\n color=\"error\"\n (click)=\"clearSelection($event)\"\n />\n }\n @if (loading) {\n <div class=\"v-dropdown__loader\">\n <gov-icon [name]=\"icons.loader\" />\n </div>\n }\n <div class=\"v-dropdown__trigger\">\n <gov-icon [name]=\"opened ? icons.chevronUp : icons.chevronDown\" />\n </div>\n </div>\n </div>\n <div class=\"position-relative\">\n @if (opened) {\n <div class=\"v-dropdown__container\">\n @if (showFilter) {\n <div\n class=\"v-dropdown__filter\"\n #filterTextField\n (keydown)=\"onKeyDown($event)\"\n >\n <v-textfield\n placeholder=\"Search\"\n [formControl]=\"filterControl\"\n iconPos=\"right\"\n [icon]=\"icons.search\"\n />\n </div>\n }\n @if (!dropdownOptions?.length) {\n <div class=\"v-dropdown__no-item\">No option was found.</div>\n } @else {\n <ul\n role=\"listbox\"\n class=\"v-dropdown__list\"\n >\n <cdk-virtual-scroll-viewport\n [itemSize]=\"30\"\n class=\"v-dropdown__scroll\"\n (scrolledIndexChange)=\"onScroll($event)\"\n >\n <v-dropdown-item\n *cdkVirtualFor=\"let option of dropdownOptions;\"\n [item]=\"option\"\n (click)=\"selectItem(option, true)\"\n />\n </cdk-virtual-scroll-viewport>\n </ul>\n }\n </div>\n }\n </div>\n <v-validation-message [ngControl]=\"ngControl\" />\n </gov-form-control>\n</div>\n", styles: [".v-dropdown__container{position:absolute;z-index:100;background-color:var(--button-outlined-primary-hover);min-width:100%;border-radius:var(--border-radius, var(--corner-radius-s));border:var(--border-width, .0625rem) solid var(--form-border-color, var(--border-neutral))}.v-dropdown__trigger{min-height:1.5rem;display:flex}.disabled{color:var(--form-state-value-disabled, var(--text-disabled));cursor:default!important;pointer-events:none}.disabled-input{border-color:var(--form-state-border-disabled, var(--border-subtlest))!important;background:var(--form-state-bg-disabled, transparent)}.error{color:var(--form-state-label-error, var(--text-status-error))}.error-input{border-color:var(--form-state-border-error, var(--status-error))!important}.gov-form-input-child{padding:.5rem .75rem;border:0px!important}.v-dropdown__no-item{padding:.5rem}.v-dropdown__list{margin:0;padding:0;list-style-type:none;display:flex;flex-direction:column;overflow:auto}.v-dropdown__scroll{height:10rem}.v-dropdown__filter{padding:.5rem}.v-dropdown__item{padding:.25rem .5rem;cursor:pointer}.v-dropdown__item.is-active{background-color:var(--background-primary);color:var(--text-white)}.v-dropdown__item.is-active:hover{opacity:.8}.v-dropdown__item:hover{background-color:var(--background-primary);color:var(--text-white)}.v-dropdown__loader{width:1.5rem;height:1.5rem;margin-right:1rem;animation:rotate 1s linear infinite;display:inline-block;transform-origin:center;color:var(--color-neutral-300)}.v-dropdown__clear{z-index:99;cursor:pointer}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}::ng-deep .cdk-virtual-scrollable{contain:none}\n"] }]
1045
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
1046
+ type: Optional
1047
+ }, {
1048
+ type: Self
1049
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { filterTextField: [{
1050
+ type: ViewChild,
1051
+ args: ['filterTextField', { static: false }]
1052
+ }], options: [{
1053
+ type: Input
1054
+ }], optionLabel: [{
1055
+ type: Input
1056
+ }], optionValue: [{
1057
+ type: Input
1058
+ }], dropdownIcon: [{
1059
+ type: Input
1060
+ }], floatLabel: [{
1061
+ type: Input
1062
+ }], lazy: [{
1063
+ type: Input
1064
+ }], filter: [{
1065
+ type: Input
1066
+ }], editable: [{
1067
+ type: Input
1068
+ }], loading: [{
1069
+ type: Input
1070
+ }], size: [{
1071
+ type: Input
1072
+ }], showFilter: [{
1073
+ type: Input
1074
+ }], localSearch: [{
1075
+ type: Input
1076
+ }], forceMinWidth: [{
1077
+ type: Input
1078
+ }], changed: [{
1079
+ type: Output
1080
+ }], showed: [{
1081
+ type: Output
1082
+ }], cleared: [{
1083
+ type: Output
1084
+ }], lazyLoad: [{
1085
+ type: Output
1086
+ }], filtered: [{
1087
+ type: Output
1088
+ }], onDocumentClick: [{
1089
+ type: HostListener,
1090
+ args: ['document:click', ['$event']]
1091
+ }] } });
1092
+
1093
+ class DropdownButtonComponent {
1094
+ label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
1095
+ icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : []));
1096
+ rounded = input(false, ...(ngDevMode ? [{ debugName: "rounded" }] : []));
1097
+ raised = input(false, ...(ngDevMode ? [{ debugName: "raised" }] : []));
1098
+ outlined = input(false, ...(ngDevMode ? [{ debugName: "outlined" }] : []));
1099
+ severity = input(ControlSeverity.primary, ...(ngDevMode ? [{ debugName: "severity" }] : []));
1100
+ size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
1101
+ type = input(GovButtonType.solid, ...(ngDevMode ? [{ debugName: "type" }] : []));
1102
+ items = input(undefined, ...(ngDevMode ? [{ debugName: "items" }] : []));
1103
+ fireClick = output();
1104
+ fireClickItem(item) {
1105
+ if (item.command) {
1106
+ item.command();
1107
+ }
1108
+ else {
1109
+ this.fireClick.emit(item);
1110
+ }
1111
+ }
1112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1113
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: DropdownButtonComponent, isStandalone: true, selector: "v-dropdown-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fireClick: "fireClick" }, providers: [
1114
+ { provide: DROPDOWN_BUTTON_COMPONENT_TOKEN, useExisting: DropdownButtonComponent }
1115
+ ], ngImport: i0, template: "<gov-dropdown position=\"left\">\r\n <v-button\r\n [label]=\"label()\"\r\n [icon]=\"icon()\"\r\n [rounded]=\"rounded() ?? false\"\r\n [outlined]=\"outlined() ?? false\"\r\n [raised]=\"raised() ?? false\"\r\n [severity]=\"severity()\"\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n />\r\n \r\n @if (items()?.length) {\r\n <ul slot=\"list\">\r\n @for (item of items(); track item.id) {\r\n <li>\r\n <v-button\r\n class=\"w-100\"\r\n [label]=\"item.label\"\r\n [icon]=\"item.icon\"\r\n [severity]=\"$any('normal')\"\r\n [size]=\"'medium'\"\r\n [type]=\"type()\"\r\n (click)=\"fireClickItem(item)\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </gov-dropdown>\r\n ", dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovDropdown, selector: "gov-dropdown", inputs: ["identifier", "open", "position"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }] });
1116
+ }
1117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownButtonComponent, decorators: [{
1118
+ type: Component,
1119
+ args: [{ selector: 'v-dropdown-button', imports: [GovDesignSystemModule, ButtonComponent], providers: [
1120
+ { provide: DROPDOWN_BUTTON_COMPONENT_TOKEN, useExisting: DropdownButtonComponent }
1121
+ ], template: "<gov-dropdown position=\"left\">\r\n <v-button\r\n [label]=\"label()\"\r\n [icon]=\"icon()\"\r\n [rounded]=\"rounded() ?? false\"\r\n [outlined]=\"outlined() ?? false\"\r\n [raised]=\"raised() ?? false\"\r\n [severity]=\"severity()\"\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n />\r\n \r\n @if (items()?.length) {\r\n <ul slot=\"list\">\r\n @for (item of items(); track item.id) {\r\n <li>\r\n <v-button\r\n class=\"w-100\"\r\n [label]=\"item.label\"\r\n [icon]=\"item.icon\"\r\n [severity]=\"$any('normal')\"\r\n [size]=\"'medium'\"\r\n [type]=\"type()\"\r\n (click)=\"fireClickItem(item)\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </gov-dropdown>\r\n " }]
1122
+ }] });
1123
+
1124
+ class MultiselectComponent extends BaseFormInputComponent {
1125
+ constructor(ngControl) {
1126
+ super(ngControl);
1127
+ }
1128
+ options = [];
1129
+ optionLabel;
1130
+ optionValue;
1131
+ dropdownIcon;
1132
+ floatLabel;
1133
+ editable = true;
1134
+ display;
1135
+ errorSlot = SlotPosition.bottom;
1136
+ lazy;
1137
+ filter;
1138
+ loading = false;
1139
+ size = FieldSize.medium;
1140
+ changed = new EventEmitter();
1141
+ showed = new EventEmitter();
1142
+ cleared = new EventEmitter();
1143
+ lazyLoad = new EventEmitter();
1144
+ filtered = new EventEmitter();
1145
+ icons = Icons;
1146
+ lazyLoadOptions = {
1147
+ limit: 50,
1148
+ offset: 0,
1149
+ };
1150
+ cdRef = inject(ChangeDetectorRef);
1151
+ ngOnChanges(changes) {
1152
+ if (changes['options'] && !changes['options'].firstChange) {
1153
+ this.cdRef.detectChanges();
1154
+ }
1155
+ }
1156
+ onLazyLoad(event) {
1157
+ if (this.options && this.options.length - event.last <= 0) {
1158
+ this.lazyLoadOptions.offset = event.last;
1159
+ this.lazyLoad.emit(this.lazyLoadOptions);
1160
+ }
1161
+ }
1162
+ selectionChange(event) {
1163
+ this.cleared.emit(event);
1164
+ }
1165
+ onDropdownShow() {
1166
+ this.showed.emit();
1167
+ }
1168
+ onDropdownClear() {
1169
+ this.cleared.emit();
1170
+ }
1171
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MultiselectComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1172
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: MultiselectComponent, isStandalone: true, selector: "v-multiselect", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", dropdownIcon: "dropdownIcon", floatLabel: "floatLabel", editable: "editable", display: "display", errorSlot: "errorSlot", lazy: "lazy", filter: "filter", loading: "loading", size: "size" }, outputs: { changed: "changed", showed: "showed", cleared: "cleared", lazyLoad: "lazyLoad", filtered: "filtered" }, providers: [
1173
+ {
1174
+ provide: MULTISELECT_COMPONENT_TOKEN,
1175
+ useExisting: MultiselectComponent,
1176
+ },
1177
+ ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<gov-form-control>\n <gov-form-label \n [slot]=\"label\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n <gov-form-multi-select\n [size]=\"size | govSize\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [invalid]=\"ngControl && ngControl.errors\"\n [options]=\"options | govMultiselectOptions : optionLabel : optionValue\"\n [placeholder]=\"placeholder ?? ''\"\n (gov-focus)=\"onDropdownShow()\"\n (gov-remove)=\"onDropdownClear()\"\n (gov-change)=\"selectionChange($event)\"\n (lazyLoadEvent)=\"onLazyLoad($any($event))\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMultiSelect, selector: "gov-form-multi-select", inputs: ["disabled", "hideSelectedList", "identifier", "invalid", "messageEmpty", "messageLoading", "name", "options", "placeholder", "required", "size", "success", "value"] }, { kind: "directive", type: i2.SelectValueAccessor, selector: "gov-form-select, gov-form-multi-select" }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: GovMultiselectOptionsPipe, name: "govMultiselectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1178
+ }
1179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MultiselectComponent, decorators: [{
1180
+ type: Component,
1181
+ args: [{ selector: 'v-multiselect', imports: [
1182
+ ReactiveFormsModule,
1183
+ GovDesignSystemModule,
1184
+ GovSizePipe,
1185
+ GovMultiselectOptionsPipe,
1186
+ ErrorComponent
1187
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1188
+ {
1189
+ provide: MULTISELECT_COMPONENT_TOKEN,
1190
+ useExisting: MultiselectComponent,
1191
+ },
1192
+ ], template: "<gov-form-control>\n <gov-form-label \n [slot]=\"label\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n <gov-form-multi-select\n [size]=\"size | govSize\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [invalid]=\"ngControl && ngControl.errors\"\n [options]=\"options | govMultiselectOptions : optionLabel : optionValue\"\n [placeholder]=\"placeholder ?? ''\"\n (gov-focus)=\"onDropdownShow()\"\n (gov-remove)=\"onDropdownClear()\"\n (gov-change)=\"selectionChange($event)\"\n (lazyLoadEvent)=\"onLazyLoad($any($event))\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n" }]
1193
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
1194
+ type: Optional
1195
+ }, {
1196
+ type: Self
1197
+ }] }], propDecorators: { options: [{
1198
+ type: Input
1199
+ }], optionLabel: [{
1200
+ type: Input
1201
+ }], optionValue: [{
1202
+ type: Input
1203
+ }], dropdownIcon: [{
1204
+ type: Input
1205
+ }], floatLabel: [{
1206
+ type: Input
1207
+ }], editable: [{
1208
+ type: Input
1209
+ }], display: [{
1210
+ type: Input
1211
+ }], errorSlot: [{
1212
+ type: Input
1213
+ }], lazy: [{
1214
+ type: Input
1215
+ }], filter: [{
1216
+ type: Input
1217
+ }], loading: [{
1218
+ type: Input
1219
+ }], size: [{
1220
+ type: Input
1221
+ }], changed: [{
1222
+ type: Output
1223
+ }], showed: [{
1224
+ type: Output
1225
+ }], cleared: [{
1226
+ type: Output
1227
+ }], lazyLoad: [{
1228
+ type: Output
1229
+ }], filtered: [{
1230
+ type: Output
1231
+ }] } });
1232
+
1233
+ class GenericFieldComponent extends BaseFormInputComponent {
1234
+ type = GenericFieldType.text;
1235
+ floatLabel;
1236
+ optionLabel;
1237
+ optionValue;
1238
+ options;
1239
+ size = FieldSize.medium;
1240
+ loading = false;
1241
+ lazy = false;
1242
+ filter = true;
1243
+ datasource;
1244
+ filterField;
1245
+ showFilter;
1246
+ localSearch;
1247
+ changed = new EventEmitter();
1248
+ showed = new EventEmitter();
1249
+ cleared = new EventEmitter();
1250
+ lazyLoad = new EventEmitter();
1251
+ filtered = new EventEmitter();
1252
+ fieldTypes = GenericFieldType;
1253
+ icons = Icons;
1254
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1255
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: GenericFieldComponent, isStandalone: true, selector: "v-generic-field", inputs: { type: "type", floatLabel: "floatLabel", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", size: "size", loading: "loading", lazy: "lazy", filter: "filter", datasource: "datasource", filterField: "filterField", showFilter: "showFilter", localSearch: "localSearch" }, outputs: { changed: "changed", showed: "showed", cleared: "cleared", lazyLoad: "lazyLoad", filtered: "filtered" }, providers: [
1256
+ {
1257
+ provide: GENERIC_FIELD_COMPONENT_TOKEN,
1258
+ useExisting: GenericFieldComponent,
1259
+ },
1260
+ ], usesInheritance: true, ngImport: i0, template: "@if (!type || type === fieldTypes.text) {\n<v-textfield\n [label]=\"label\"\n [floatLabel]=\"floatLabel === true\"\n [size]=\"size\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.dropdown && !datasource) {\n<v-dropdown\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [forceMinWidth]=\"true\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/> \n} @else if (type === fieldTypes.dropdown && datasource) {\n <v-dropdown\n useDatasource\n [forceMinWidth]=\"true\"\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [filterField]=\"filterField ?? 'fulltext'\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n />\n} @else if (type === fieldTypes.multiselect && !datasource) {\n<v-multiselect\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.multiselect && datasource) {\n<v-multiselect\n useDatasource\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.checkbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [indeterminate]=\"true\"\n/>\n} @else if (type === fieldTypes.simplecheckbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.calendar) {\n<v-calendar\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [icon]=\"icons.calendar\"\n/>\n}\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "v-dropdown", inputs: ["options", "optionLabel", "optionValue", "dropdownIcon", "floatLabel", "lazy", "filter", "editable", "loading", "size", "showFilter", "localSearch", "forceMinWidth"], outputs: ["changed", "showed", "cleared", "lazyLoad", "filtered"] }, { kind: "component", type: CalendarComponent, selector: "v-calendar", inputs: ["icon", "floatLabel", "maxDate", "minDate", "header", "footer", "selectionMode", "size", "errorSlot", "labelSlot", "messageSlot", "message", "name"] }, { kind: "component", type: MultiselectComponent, selector: "v-multiselect", inputs: ["options", "optionLabel", "optionValue", "dropdownIcon", "floatLabel", "editable", "display", "errorSlot", "lazy", "filter", "loading", "size"], outputs: ["changed", "showed", "cleared", "lazyLoad", "filtered"] }, { kind: "component", type: TextfieldComponent, selector: "v-textfield", inputs: ["floatLabel", "type", "minlength", "maxlength", "min", "max", "prefix", "sufix", "message", "name", "role", "size", "icon", "iconPos", "labelSlot", "errorSlot", "messageSlot"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CheckboxComponent, selector: "v-checkbox", inputs: ["size", "value", "name", "indeterminate", "noLabel"] }, { kind: "directive", type: DatasourceDirective, selector: "v-dropdown[useDatasource], v-multiselect[useDatasource], v-generic-field[useDatasource]", inputs: ["datasource", "autoBind", "loadingText", "filterField", "transformFn", "extraFilter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1261
+ }
1262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFieldComponent, decorators: [{
1263
+ type: Component,
1264
+ args: [{ selector: 'v-generic-field', imports: [
1265
+ DropdownComponent,
1266
+ CalendarComponent,
1267
+ MultiselectComponent,
1268
+ TextfieldComponent,
1269
+ ReactiveFormsModule,
1270
+ CheckboxComponent,
1271
+ DatasourceDirective
1272
+ ], providers: [
1273
+ {
1274
+ provide: GENERIC_FIELD_COMPONENT_TOKEN,
1275
+ useExisting: GenericFieldComponent,
1276
+ },
1277
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!type || type === fieldTypes.text) {\n<v-textfield\n [label]=\"label\"\n [floatLabel]=\"floatLabel === true\"\n [size]=\"size\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.dropdown && !datasource) {\n<v-dropdown\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [forceMinWidth]=\"true\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/> \n} @else if (type === fieldTypes.dropdown && datasource) {\n <v-dropdown\n useDatasource\n [forceMinWidth]=\"true\"\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [filterField]=\"filterField ?? 'fulltext'\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n />\n} @else if (type === fieldTypes.multiselect && !datasource) {\n<v-multiselect\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.multiselect && datasource) {\n<v-multiselect\n useDatasource\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.checkbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [indeterminate]=\"true\"\n/>\n} @else if (type === fieldTypes.simplecheckbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.calendar) {\n<v-calendar\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [icon]=\"icons.calendar\"\n/>\n}\n" }]
1278
+ }], propDecorators: { type: [{
1279
+ type: Input
1280
+ }], floatLabel: [{
1281
+ type: Input
1282
+ }], optionLabel: [{
1283
+ type: Input
1284
+ }], optionValue: [{
1285
+ type: Input
1286
+ }], options: [{
1287
+ type: Input
1288
+ }], size: [{
1289
+ type: Input
1290
+ }], loading: [{
1291
+ type: Input
1292
+ }], lazy: [{
1293
+ type: Input
1294
+ }], filter: [{
1295
+ type: Input
1296
+ }], datasource: [{
1297
+ type: Input
1298
+ }], filterField: [{
1299
+ type: Input
1300
+ }], showFilter: [{
1301
+ type: Input
1302
+ }], localSearch: [{
1303
+ type: Input
1304
+ }], changed: [{
1305
+ type: Output
1306
+ }], showed: [{
1307
+ type: Output
1308
+ }], cleared: [{
1309
+ type: Output
1310
+ }], lazyLoad: [{
1311
+ type: Output
1312
+ }], filtered: [{
1313
+ type: Output
1314
+ }] } });
1315
+
1316
+ function generateFormGroup(fields, lastGroupValue, inputGroup, inputGroupChanged = false) {
1317
+ const formGroup = (inputGroupChanged
1318
+ ? inputGroup ?? lastGroupValue
1319
+ : lastGroupValue ?? inputGroup) ?? new UntypedFormGroup({});
1320
+ fields?.forEach((field) => {
1321
+ const control = formGroup.get(field.name);
1322
+ if (!control) {
1323
+ formGroup.addControl(field.name, new UntypedFormControl(field.value, field.validator));
1324
+ }
1325
+ else if (control && control.value !== field.value) {
1326
+ if ('value' in field) {
1327
+ control.setValue(field.value);
1328
+ }
1329
+ control.setValidators(field.validator ?? null);
1330
+ }
1331
+ else {
1332
+ control.setValidators(field.validator ?? null);
1333
+ }
1334
+ if (field.readonly && (control || formGroup.get(field.name))) {
1335
+ formGroup.get(field.name)?.disable();
1336
+ }
1337
+ });
1338
+ if (!inputGroupChanged) {
1339
+ for (const field in formGroup.controls) {
1340
+ const control = fields?.find((x) => x.name == field);
1341
+ if (!control) {
1342
+ formGroup.removeControl(field);
1343
+ }
1344
+ }
1345
+ }
1346
+ return formGroup;
1347
+ }
1348
+ function getColumnClass(value) {
1349
+ if (!value) {
1350
+ return undefined;
1351
+ }
1352
+ switch (value) {
1353
+ case 1:
1354
+ return 'col-12';
1355
+ case 2:
1356
+ return 'col-12 col-md-6';
1357
+ case 3:
1358
+ return 'col-12 col-md-4';
1359
+ case 4:
1360
+ return 'col-12 col-md-3';
1361
+ case 6:
1362
+ return 'col-12 col-md-2';
1363
+ }
1364
+ return 'col-12 col-md-1';
1365
+ }
1366
+
1367
+ class GenericFormComponent {
1368
+ formGroup;
1369
+ fields;
1370
+ columns;
1371
+ showAsRow;
1372
+ formGroupComputed;
1373
+ columnClass;
1374
+ ngOnChanges(changes) {
1375
+ if (changes['fields'] || changes['formGroup']) {
1376
+ this.formGroupComputed = generateFormGroup(this.fields, this.formGroupComputed, this.formGroup, !!changes['formGroup']);
1377
+ }
1378
+ if (changes['columns']) {
1379
+ this.columnClass = getColumnClass(this.columns);
1380
+ }
1381
+ }
1382
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1383
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: GenericFormComponent, isStandalone: true, selector: "v-generic-form", inputs: { formGroup: "formGroup", fields: "fields", columns: "columns", showAsRow: "showAsRow" }, usesOnChanges: true, ngImport: i0, template: "@if (formGroupComputed) {\r\n <div\r\n class=\"v-generic-form\"\r\n [ngClass]=\"showAsRow ? 'd-flex flex-row' : 'row'\"\r\n [formGroup]=\"formGroupComputed\"\r\n >\r\n @for(field of fields; track field) { @if (columnClass) {\r\n <div class=\"v-generic-form__column {{ columnClass }}\">\r\n <v-generic-field\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n </div>\r\n } @else {\r\n <v-generic-field\r\n class=\"me-4\"\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n } }\r\n </div>\r\n }\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: GenericFieldComponent, selector: "v-generic-field", inputs: ["type", "floatLabel", "optionLabel", "optionValue", "options", "size", "loading", "lazy", "filter", "datasource", "filterField", "showFilter", "localSearch"], outputs: ["changed", "showed", "cleared", "lazyLoad", "filtered"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1384
+ }
1385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFormComponent, decorators: [{
1386
+ type: Component,
1387
+ args: [{ selector: 'v-generic-form', imports: [
1388
+ CommonModule,
1389
+ GenericFieldComponent,
1390
+ ReactiveFormsModule,
1391
+ TranslateModule,
1392
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (formGroupComputed) {\r\n <div\r\n class=\"v-generic-form\"\r\n [ngClass]=\"showAsRow ? 'd-flex flex-row' : 'row'\"\r\n [formGroup]=\"formGroupComputed\"\r\n >\r\n @for(field of fields; track field) { @if (columnClass) {\r\n <div class=\"v-generic-form__column {{ columnClass }}\">\r\n <v-generic-field\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n </div>\r\n } @else {\r\n <v-generic-field\r\n class=\"me-4\"\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n } }\r\n </div>\r\n }\r\n" }]
1393
+ }], propDecorators: { formGroup: [{
1394
+ type: Input
1395
+ }], fields: [{
1396
+ type: Input
1397
+ }], columns: [{
1398
+ type: Input
1399
+ }], showAsRow: [{
1400
+ type: Input
1401
+ }] } });
1402
+
1403
+ class FilterFieldDirective {
1404
+ name;
1405
+ type = GenericFieldType.text;
1406
+ label;
1407
+ optionLabel;
1408
+ optionValue;
1409
+ options;
1410
+ value;
1411
+ validator;
1412
+ datasource;
1413
+ filterField;
1414
+ showFilter;
1415
+ localSearch;
1416
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1417
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FilterFieldDirective, isStandalone: true, selector: "v-filter-field", inputs: { name: "name", type: "type", label: "label", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", value: "value", validator: "validator", datasource: "datasource", filterField: "filterField", showFilter: "showFilter", localSearch: "localSearch" }, ngImport: i0 });
1418
+ }
1419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterFieldDirective, decorators: [{
1420
+ type: Directive,
1421
+ args: [{
1422
+ // eslint-disable-next-line @angular-eslint/directive-selector
1423
+ selector: 'v-filter-field',
1424
+ standalone: true,
1425
+ }]
1426
+ }], propDecorators: { name: [{
1427
+ type: Input,
1428
+ args: [{ required: true }]
1429
+ }], type: [{
1430
+ type: Input
1431
+ }], label: [{
1432
+ type: Input
1433
+ }], optionLabel: [{
1434
+ type: Input
1435
+ }], optionValue: [{
1436
+ type: Input
1437
+ }], options: [{
1438
+ type: Input
1439
+ }], value: [{
1440
+ type: Input
1441
+ }], validator: [{
1442
+ type: Input
1443
+ }], datasource: [{
1444
+ type: Input
1445
+ }], filterField: [{
1446
+ type: Input
1447
+ }], showFilter: [{
1448
+ type: Input
1449
+ }], localSearch: [{
1450
+ type: Input
1451
+ }] } });
1452
+
1453
+ function getFilledControlCount(formGroup) {
1454
+ let count = 0;
1455
+ Object.keys(formGroup.controls).forEach((key) => {
1456
+ const control = formGroup.get(key);
1457
+ if (control?.value) {
1458
+ if (typeof control.value === 'boolean') {
1459
+ count++;
1460
+ }
1461
+ if (typeof control.value === 'string' && control.value.trim() !== '') {
1462
+ count++;
1463
+ }
1464
+ }
1465
+ });
1466
+ return count;
1467
+ }
1468
+
1469
+ class FilterComponent extends UnsubscribeComponent {
1470
+ fieldDeclarations;
1471
+ fields = [];
1472
+ filters = [];
1473
+ title;
1474
+ total;
1475
+ fulltextFieldName = 'searchField';
1476
+ showFulltext = true;
1477
+ showFilters = true;
1478
+ autoBind = true;
1479
+ applyLabel = 'Apply';
1480
+ clearLabel = 'Clear';
1481
+ buttonType = GovButtonType.solid;
1482
+ buttonOutlined = false;
1483
+ debounceTime = DEFAULT_DEBOUNCE_TIME;
1484
+ defaultExpanded = false;
1485
+ icons = Icons;
1486
+ isExpanded = false;
1487
+ fieldDefinitios$;
1488
+ formGroup$;
1489
+ simpleFormFieldDefinitions$;
1490
+ get searchField() {
1491
+ return {
1492
+ name: this.fulltextFieldName,
1493
+ };
1494
+ }
1495
+ onTouch;
1496
+ onChange;
1497
+ inputFields$ = new BehaviorSubject([...this.fields ?? [], ...this.filters ?? []]);
1498
+ FieldSize = FieldSize;
1499
+ screenSizeService = inject(ScreenSizeService);
1500
+ changeDetectorRef = inject(ChangeDetectorRef);
1501
+ dialogService = inject(DialogService);
1502
+ service;
1503
+ formGroup = new FormGroup({});
1504
+ filledFiltersCount$ = this.formGroup.valueChanges.pipe(startWith(this.formGroup), map(() => getFilledControlCount(this.formGroup).toString()));
1505
+ lastFormFields = [];
1506
+ ngOnInit() {
1507
+ this.isExpanded = this.defaultExpanded;
1508
+ this.formGroup.valueChanges
1509
+ .pipe(takeUntil(this.destroyed$), debounceTime(this.debounceTime ?? DEFAULT_DEBOUNCE_TIME), map((x) => this.convertFilter(x)), distinctUntilChanged())
1510
+ .subscribe((value) => {
1511
+ this.onChange?.(value);
1512
+ });
1513
+ }
1514
+ ngOnChanges(changes) {
1515
+ if (changes['total']) {
1516
+ this.changeDetectorRef.markForCheck();
1517
+ }
1518
+ if (changes['fields'] || changes['filters']) {
1519
+ this.inputFields$.next([...this.fields ?? [], ...this.filters ?? []]);
1520
+ }
1521
+ }
1522
+ ngAfterContentInit() {
1523
+ const fieldDeclaratios$ = this.fieldDeclarations.changes.pipe(startWith({}), map(() => this.fieldDeclarations.toArray()));
1524
+ this.fieldDefinitios$ = this.inputFields$.pipe(combineLatestWith(fieldDeclaratios$), map(([inputs, views]) => {
1525
+ this.lastFormFields = [this.searchField, ...(inputs ?? []), ...views];
1526
+ return this.lastFormFields;
1527
+ }));
1528
+ this.simpleFormFieldDefinitions$ = this.fieldDefinitios$.pipe(map((fields) => {
1529
+ return fields
1530
+ .filter((x) => x.name !== this.fulltextFieldName)
1531
+ .map((x) => ({ ...x, floatLabel: false, size: x.size ?? FieldSize.medium }));
1532
+ }));
1533
+ this.formGroup$ = this.fieldDefinitios$.pipe(map((fields) => {
1534
+ const group = generateFormGroup(fields, this.formGroup, undefined, false);
1535
+ if (!group.get(this.fulltextFieldName) && this.showFulltext) {
1536
+ group.addControl(this.fulltextFieldName, new FormControl(''));
1537
+ }
1538
+ return group;
1539
+ }));
1540
+ this.changeDetectorRef.detectChanges();
1541
+ }
1542
+ toggleFilters() {
1543
+ this.isExpanded = !this.isExpanded;
1544
+ }
1545
+ openSearch() {
1546
+ this.dialogService.showDialog({
1547
+ headerIcon: 'pi pi-search',
1548
+ severity: 'primary',
1549
+ innerHTML: '<p>Search</p>',
1550
+ confirmButtonFn: () => this.submitValue(),
1551
+ confirmButtonText: 'Apply',
1552
+ cancelButtonFn: () => this.clear(),
1553
+ cancelButtonText: 'Clear all',
1554
+ showCancelButton: true,
1555
+ closable: false,
1556
+ });
1557
+ }
1558
+ writeValue(data) {
1559
+ this.formGroup.patchValue(data);
1560
+ }
1561
+ registerOnChange(fn) {
1562
+ this.onChange = fn;
1563
+ }
1564
+ registerOnTouched(fn) {
1565
+ this.onTouch = fn;
1566
+ }
1567
+ setDisabledState(isDisabled) {
1568
+ isDisabled ? this.formGroup.disable() : this.formGroup.enable();
1569
+ }
1570
+ submitValue() {
1571
+ if (!this.autoBind) {
1572
+ this.onChange?.(this.formGroup.value);
1573
+ }
1574
+ }
1575
+ setFilterValues(dialogFormGroup) {
1576
+ this.formGroup.setValue(dialogFormGroup.value);
1577
+ this.submitValue();
1578
+ }
1579
+ clear() {
1580
+ this.formGroup.reset();
1581
+ this.submitValue();
1582
+ }
1583
+ convertFilter(value) {
1584
+ if (value == undefined) {
1585
+ return undefined;
1586
+ }
1587
+ const isEmpty = isFilterEmpty(value);
1588
+ if (isEmpty) {
1589
+ return undefined;
1590
+ }
1591
+ return value;
1592
+ }
1593
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1594
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: FilterComponent, isStandalone: true, selector: "v-filter", inputs: { fields: "fields", filters: "filters", title: "title", total: "total", fulltextFieldName: "fulltextFieldName", showFulltext: "showFulltext", showFilters: "showFilters", autoBind: "autoBind", applyLabel: "applyLabel", clearLabel: "clearLabel", buttonType: "buttonType", buttonOutlined: "buttonOutlined", debounceTime: "debounceTime", defaultExpanded: "defaultExpanded" }, providers: [
1595
+ {
1596
+ provide: NG_VALUE_ACCESSOR,
1597
+ useExisting: forwardRef(() => FilterComponent),
1598
+ multi: true,
1599
+ },
1600
+ {
1601
+ provide: FILTER_COMPONENT_TOKEN,
1602
+ useExisting: FilterComponent,
1603
+ },
1604
+ ], queries: [{ propertyName: "fieldDeclarations", predicate: FilterFieldDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"v-filter w-100\">\n @if (formGroup$ | async; as formGroup){\n <form [formGroup]=\"formGroup\">\n <div class=\"v-filter__header d-flex align-items-center p-3\">\n @if (title) {\n <div class=\"v-filter_title pe-4\">\n <h2 class=\"m-0\">{{ title }}</h2>\n </div>\n }\n <div class=\"v-filter__fulltext flex-grow-1 pe-4\">\n @if (showFulltext){\n <v-textfield\n placeholder=\"Search\"\n size=\"large\"\n [formControlName]=\"fulltextFieldName\"\n type=\"search\"\n [clearable]=\"true\"\n />\n }\n </div>\n <div class=\"v-filter_action-buttons d-flex align-items-center gap-2\">\n @if (!autoBind) {\n <v-button\n useShortCut\n [shortCutFn]=\"submitValue.bind(this)\"\n shortCutKey=\"Enter\"\n [type]=\"buttonType\"\n [outlined]=\"buttonOutlined\"\n size=\"small\"\n [label]=\"applyLabel\"\n (click)=\"submitValue()\"\n />\n }\n @if (isExpanded) {\n <v-button\n useShortCut\n [shortCutFn]=\"clear.bind(this)\"\n shortCutKey=\"Escape\"\n size=\"small\"\n [type]=\"buttonType\"\n [outlined]=\"buttonOutlined\"\n [label]=\"clearLabel\"\n (click)=\"clear()\"\n />\n }\n @if (simpleFormFieldDefinitions$ | async; as declaration){ @if\n (declaration.length) {\n <v-button\n size=\"small\"\n [type]=\"buttonType\"\n [outlined]=\"buttonOutlined\"\n [icon]=\"icons.filter\"\n [label]=\"$any(filledFiltersCount$ | async)\"\n (click)=\"toggleFilters()\"\n />\n } }\n\n <ng-content select=\"v-action-button-group\"></ng-content>\n </div>\n </div>\n @if (simpleFormFieldDefinitions$ | async; as declaration){ @if (isExpanded\n && declaration.length) {\n <div class=\"v-filter__expanded p-3\">\n <v-generic-form\n [fields]=\"declaration\"\n [formGroup]=\"formGroup\"\n [columns]=\"2\"\n />\n </div>\n } }\n </form>\n }\n</div>\n", styles: [":host{display:block}.v-filter{background:var(--v-filter-background);border-radius:.5rem}.v-filter__header{border-bottom:1px solid var(--v-filter-border);background-color:var(--v-filter-header-background)}.v-filter_records-text{color:var(--v-filter-records-text-color)}.v-filter__expanded{animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: TextfieldComponent, selector: "v-textfield", inputs: ["floatLabel", "type", "minlength", "maxlength", "min", "max", "prefix", "sufix", "message", "name", "role", "size", "icon", "iconPos", "labelSlot", "errorSlot", "messageSlot"] }, { kind: "component", type: GenericFormComponent, selector: "v-generic-form", inputs: ["formGroup", "fields", "columns", "showAsRow"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }, { kind: "directive", type: ButtonShortCutDirective, selector: "v-button[useShortCut]", inputs: ["shortCutFn", "shortCutKey"], exportAs: ["useShortCut"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1605
+ }
1606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterComponent, decorators: [{
1607
+ type: Component,
1608
+ args: [{ selector: 'v-filter', imports: [
1609
+ AsyncPipe,
1610
+ ReactiveFormsModule,
1611
+ TranslateModule,
1612
+ TextfieldComponent,
1613
+ GenericFormComponent,
1614
+ ButtonComponent,
1615
+ ButtonShortCutDirective,
1616
+ ], providers: [
1617
+ {
1618
+ provide: NG_VALUE_ACCESSOR,
1619
+ useExisting: forwardRef(() => FilterComponent),
1620
+ multi: true,
1621
+ },
1622
+ {
1623
+ provide: FILTER_COMPONENT_TOKEN,
1624
+ useExisting: FilterComponent,
1625
+ },
1626
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"v-filter w-100\">\n @if (formGroup$ | async; as formGroup){\n <form [formGroup]=\"formGroup\">\n <div class=\"v-filter__header d-flex align-items-center p-3\">\n @if (title) {\n <div class=\"v-filter_title pe-4\">\n <h2 class=\"m-0\">{{ title }}</h2>\n </div>\n }\n <div class=\"v-filter__fulltext flex-grow-1 pe-4\">\n @if (showFulltext){\n <v-textfield\n placeholder=\"Search\"\n size=\"large\"\n [formControlName]=\"fulltextFieldName\"\n type=\"search\"\n [clearable]=\"true\"\n />\n }\n </div>\n <div class=\"v-filter_action-buttons d-flex align-items-center gap-2\">\n @if (!autoBind) {\n <v-button\n useShortCut\n [shortCutFn]=\"submitValue.bind(this)\"\n shortCutKey=\"Enter\"\n [type]=\"buttonType\"\n [outlined]=\"buttonOutlined\"\n size=\"small\"\n [label]=\"applyLabel\"\n (click)=\"submitValue()\"\n />\n }\n @if (isExpanded) {\n <v-button\n useShortCut\n [shortCutFn]=\"clear.bind(this)\"\n shortCutKey=\"Escape\"\n size=\"small\"\n [type]=\"buttonType\"\n [outlined]=\"buttonOutlined\"\n [label]=\"clearLabel\"\n (click)=\"clear()\"\n />\n }\n @if (simpleFormFieldDefinitions$ | async; as declaration){ @if\n (declaration.length) {\n <v-button\n size=\"small\"\n [type]=\"buttonType\"\n [outlined]=\"buttonOutlined\"\n [icon]=\"icons.filter\"\n [label]=\"$any(filledFiltersCount$ | async)\"\n (click)=\"toggleFilters()\"\n />\n } }\n\n <ng-content select=\"v-action-button-group\"></ng-content>\n </div>\n </div>\n @if (simpleFormFieldDefinitions$ | async; as declaration){ @if (isExpanded\n && declaration.length) {\n <div class=\"v-filter__expanded p-3\">\n <v-generic-form\n [fields]=\"declaration\"\n [formGroup]=\"formGroup\"\n [columns]=\"2\"\n />\n </div>\n } }\n </form>\n }\n</div>\n", styles: [":host{display:block}.v-filter{background:var(--v-filter-background);border-radius:.5rem}.v-filter__header{border-bottom:1px solid var(--v-filter-border);background-color:var(--v-filter-header-background)}.v-filter_records-text{color:var(--v-filter-records-text-color)}.v-filter__expanded{animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}\n"] }]
1627
+ }], propDecorators: { fieldDeclarations: [{
1628
+ type: ContentChildren,
1629
+ args: [FilterFieldDirective]
1630
+ }], fields: [{
1631
+ type: Input
1632
+ }], filters: [{
1633
+ type: Input
1634
+ }], title: [{
1635
+ type: Input
1636
+ }], total: [{
1637
+ type: Input
1638
+ }], fulltextFieldName: [{
1639
+ type: Input
1640
+ }], showFulltext: [{
1641
+ type: Input
1642
+ }], showFilters: [{
1643
+ type: Input
1644
+ }], autoBind: [{
1645
+ type: Input
1646
+ }], applyLabel: [{
1647
+ type: Input
1648
+ }], clearLabel: [{
1649
+ type: Input
1650
+ }], buttonType: [{
1651
+ type: Input
1652
+ }], buttonOutlined: [{
1653
+ type: Input
1654
+ }], debounceTime: [{
1655
+ type: Input
1656
+ }], defaultExpanded: [{
1657
+ type: Input
1658
+ }] } });
1659
+
1660
+ class ActionButtonComponent {
1661
+ disabled = false;
1662
+ toolTip;
1663
+ id;
1664
+ icon;
1665
+ outlined = false;
1666
+ raised = false;
1667
+ severity;
1668
+ label;
1669
+ size;
1670
+ // eslint-disable-next-line @angular-eslint/no-output-native
1671
+ click = new EventEmitter();
1672
+ icons = Icons;
1673
+ propertyChangeSubject = new Subject();
1674
+ propertyChanged = this.propertyChangeSubject.asObservable();
1675
+ buttonGroup = inject(ACTION_BUTTON_GROUP_COMPONENT_TOKEN, {
1676
+ optional: true,
1677
+ });
1678
+ ngOnChanges(changes) {
1679
+ const isValueChange = Object.keys(changes).some((x) => !changes[x].firstChange);
1680
+ if (isValueChange) {
1681
+ this.propertyChangeSubject.next(null);
1682
+ }
1683
+ }
1684
+ handleClick(event) {
1685
+ event.stopPropagation();
1686
+ this.click.emit(event);
1687
+ }
1688
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1689
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: ActionButtonComponent, isStandalone: true, selector: "v-action-button", inputs: { disabled: "disabled", toolTip: "toolTip", id: "id", icon: "icon", outlined: "outlined", raised: "raised", severity: "severity", label: "label", size: "size" }, outputs: { click: "click" }, usesOnChanges: true, ngImport: i0, template: "<v-button\n [label]=\"label\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [outlined]=\"outlined\"\n tooltipPosition=\"bottom\"\n [size]=\"size\"\n [severity]=\"severity\"\n (click)=\"handleClick($event)\"\n/>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1690
+ }
1691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonComponent, decorators: [{
1692
+ type: Component,
1693
+ args: [{ selector: 'v-action-button', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<v-button\n [label]=\"label\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [outlined]=\"outlined\"\n tooltipPosition=\"bottom\"\n [size]=\"size\"\n [severity]=\"severity\"\n (click)=\"handleClick($event)\"\n/>\n" }]
1694
+ }], propDecorators: { disabled: [{
1695
+ type: Input
1696
+ }], toolTip: [{
1697
+ type: Input
1698
+ }], id: [{
1699
+ type: Input
1700
+ }], icon: [{
1701
+ type: Input
1702
+ }], outlined: [{
1703
+ type: Input
1704
+ }], raised: [{
1705
+ type: Input
1706
+ }], severity: [{
1707
+ type: Input
1708
+ }], label: [{
1709
+ type: Input
1710
+ }], size: [{
1711
+ type: Input
1712
+ }], click: [{
1713
+ type: Output
1714
+ }] } });
1715
+
1716
+ class ActionButtonGroupComponent extends UnsubscribeComponent {
1717
+ changeDetectorRef;
1718
+ screenSizeService;
1719
+ actions;
1720
+ maxItems = 3;
1721
+ maxItemsMobile = 0;
1722
+ items = [];
1723
+ menuIconPos = 'right';
1724
+ menuIcon = Icons.action;
1725
+ label;
1726
+ icon;
1727
+ icons = Icons;
1728
+ allItems = [];
1729
+ visibleActions = [];
1730
+ menuItems = [];
1731
+ constructor(changeDetectorRef, screenSizeService) {
1732
+ super();
1733
+ this.changeDetectorRef = changeDetectorRef;
1734
+ this.screenSizeService = screenSizeService;
1735
+ }
1736
+ ngAfterContentInit() {
1737
+ this.subscribeItemChange();
1738
+ }
1739
+ fireClick(item, event) {
1740
+ event.stopPropagation();
1741
+ item.click.emit();
1742
+ }
1743
+ subscribeItemChange() {
1744
+ const screenResize$ = this.screenSizeService.isMobileBlock;
1745
+ const actions$ = queryListChanged(this.actions);
1746
+ screenResize$
1747
+ .pipe(takeUntil(this.destroyed$), combineLatestWith(actions$))
1748
+ .subscribe(([isMobile, actions]) => {
1749
+ this.computeItems(actions, isMobile);
1750
+ });
1751
+ }
1752
+ computeItems(actions, isMobile) {
1753
+ const allItems = [...(this.items ?? []), ...actions];
1754
+ const maxItems = isMobile ? this.maxItemsMobile : this.maxItems;
1755
+ this.visibleActions = allItems.slice(0, maxItems);
1756
+ this.menuItems = allItems.slice(maxItems).map(this.convertToMenuItem);
1757
+ this.changeDetectorRef.detectChanges();
1758
+ }
1759
+ convertToMenuItem(item) {
1760
+ return {
1761
+ label: item.label,
1762
+ icon: item.icon,
1763
+ command: () => {
1764
+ item.click.emit();
1765
+ },
1766
+ };
1767
+ }
1768
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.ScreenSizeService }], target: i0.ɵɵFactoryTarget.Component });
1769
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ActionButtonGroupComponent, isStandalone: true, selector: "v-action-button-group", inputs: { maxItems: "maxItems", maxItemsMobile: "maxItemsMobile", items: "items", menuIconPos: "menuIconPos", menuIcon: "menuIcon", label: "label", icon: "icon" }, providers: [
1770
+ {
1771
+ provide: ACTION_BUTTON_GROUP_COMPONENT_TOKEN,
1772
+ useExisting: ActionButtonGroupComponent,
1773
+ },
1774
+ ], queries: [{ propertyName: "actions", predicate: ActionButtonComponent }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"v-action-button-group align-items-center justify-content-center justify-content-md-end\"\n>\n <div class=\"v-action-button-group__actions d-flex gap-2\">\n @for (action of visibleActions; track action) {\n <v-action-button\n [disabled]=\"action.disabled\"\n [icon]=\"action.icon\"\n [id]=\"action.id\"\n [outlined]=\"action.outlined\"\n [raised]=\"action.raised\"\n [toolTip]=\"action.toolTip || action.label\"\n [severity]=\"action.severity\"\n [size]=\"action.size\"\n (click)=\"fireClick(action, $event)\"\n ></v-action-button>\n } @if (actions.length > visibleActions.length) {\n <v-dropdown-button\n [label]=\"label\"\n [icon]=\"menuIcon\"\n [items]=\"menuItems\"\n />\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ActionButtonComponent, selector: "v-action-button", inputs: ["disabled", "toolTip", "id", "icon", "outlined", "raised", "severity", "label", "size"], outputs: ["click"] }, { kind: "component", type: DropdownButtonComponent, selector: "v-dropdown-button", inputs: ["label", "icon", "rounded", "raised", "outlined", "severity", "size", "type", "items"], outputs: ["fireClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1775
+ }
1776
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonGroupComponent, decorators: [{
1777
+ type: Component,
1778
+ args: [{ selector: 'v-action-button-group', imports: [ActionButtonComponent, DropdownButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1779
+ {
1780
+ provide: ACTION_BUTTON_GROUP_COMPONENT_TOKEN,
1781
+ useExisting: ActionButtonGroupComponent,
1782
+ },
1783
+ ], template: "<div\n class=\"v-action-button-group align-items-center justify-content-center justify-content-md-end\"\n>\n <div class=\"v-action-button-group__actions d-flex gap-2\">\n @for (action of visibleActions; track action) {\n <v-action-button\n [disabled]=\"action.disabled\"\n [icon]=\"action.icon\"\n [id]=\"action.id\"\n [outlined]=\"action.outlined\"\n [raised]=\"action.raised\"\n [toolTip]=\"action.toolTip || action.label\"\n [severity]=\"action.severity\"\n [size]=\"action.size\"\n (click)=\"fireClick(action, $event)\"\n ></v-action-button>\n } @if (actions.length > visibleActions.length) {\n <v-dropdown-button\n [label]=\"label\"\n [icon]=\"menuIcon\"\n [items]=\"menuItems\"\n />\n }\n </div>\n</div>\n" }]
1784
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$3.ScreenSizeService }], propDecorators: { actions: [{
1785
+ type: ContentChildren,
1786
+ args: [ActionButtonComponent]
1787
+ }], maxItems: [{
1788
+ type: Input
1789
+ }], maxItemsMobile: [{
1790
+ type: Input
1791
+ }], items: [{
1792
+ type: Input
1793
+ }], menuIconPos: [{
1794
+ type: Input
1795
+ }], menuIcon: [{
1796
+ type: Input
1797
+ }], label: [{
1798
+ type: Input
1799
+ }], icon: [{
1800
+ type: Input
1801
+ }] } });
1802
+
1803
+ class LoaderComponent {
1804
+ size = FieldSize.medium;
1805
+ message;
1806
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1807
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: LoaderComponent, isStandalone: true, selector: "v-loader", inputs: { size: "size", message: "message" }, providers: [
1808
+ {
1809
+ provide: LOADER_COMPONENT_TOKEN,
1810
+ useExisting: LoaderComponent,
1811
+ }
1812
+ ], ngImport: i0, template: "<div style=\"min-height: 300px;\">\n <gov-loading\n [size]=\"size | govSize\"\n >\n {{ message }}\n </gov-loading>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovLoading, selector: "gov-loading", inputs: ["size"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1813
+ }
1814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: LoaderComponent, decorators: [{
1815
+ type: Component,
1816
+ args: [{ selector: 'v-loader', imports: [
1817
+ GovDesignSystemModule,
1818
+ GovSizePipe
1819
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1820
+ {
1821
+ provide: LOADER_COMPONENT_TOKEN,
1822
+ useExisting: LoaderComponent,
1823
+ }
1824
+ ], template: "<div style=\"min-height: 300px;\">\n <gov-loading\n [size]=\"size | govSize\"\n >\n {{ message }}\n </gov-loading>\n</div>" }]
1825
+ }], propDecorators: { size: [{
1826
+ type: Input
1827
+ }], message: [{
1828
+ type: Input
1829
+ }] } });
1830
+
1831
+ class TablePaginationInfoComponent {
1832
+ showingText = 'Showing';
1833
+ toText = 'to';
1834
+ ofText = 'of';
1835
+ entriesText = 'entries';
1836
+ currentPage = 0;
1837
+ pageSize = 0;
1838
+ total = 0;
1839
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TablePaginationInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1840
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: TablePaginationInfoComponent, isStandalone: true, selector: "v-table-pagination-info", inputs: { showingText: "showingText", toText: "toText", ofText: "ofText", entriesText: "entriesText", currentPage: "currentPage", pageSize: "pageSize", total: "total" }, ngImport: i0, template: "<span>\n {{ showingText }} {{ (currentPage - 1) * pageSize + 1 }} {{ toText }}\n {{\n currentPage * pageSize < total\n ? currentPage * pageSize\n : total\n }}\n {{ ofText }} {{ total }} {{ entriesText }}\n</span>" });
1841
+ }
1842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TablePaginationInfoComponent, decorators: [{
1843
+ type: Component,
1844
+ args: [{ standalone: true, selector: "v-table-pagination-info", template: "<span>\n {{ showingText }} {{ (currentPage - 1) * pageSize + 1 }} {{ toText }}\n {{\n currentPage * pageSize < total\n ? currentPage * pageSize\n : total\n }}\n {{ ofText }} {{ total }} {{ entriesText }}\n</span>" }]
1845
+ }], propDecorators: { showingText: [{
1846
+ type: Input
1847
+ }], toText: [{
1848
+ type: Input
1849
+ }], ofText: [{
1850
+ type: Input
1851
+ }], entriesText: [{
1852
+ type: Input
1853
+ }], currentPage: [{
1854
+ type: Input
1855
+ }], pageSize: [{
1856
+ type: Input
1857
+ }], total: [{
1858
+ type: Input
1859
+ }] } });
1860
+
1861
+ function getNextSortDirection(sortDirection, isNullable = false) {
1862
+ return isNullable && sortDirection === SortDirection.desc
1863
+ ? undefined
1864
+ : !sortDirection || sortDirection === SortDirection.desc
1865
+ ? SortDirection.asc
1866
+ : SortDirection.desc;
1867
+ }
1868
+ function createCustomRoute(row, entityKey, customRoute) {
1869
+ return customRoute && entityKey
1870
+ ? customRoute + row[entityKey]
1871
+ : undefined;
1872
+ }
1873
+
1874
+ class TableComponent {
1875
+ viewColumns;
1876
+ rowDetailTemplate;
1877
+ rowDetailButtonTemplate;
1878
+ sorters;
1879
+ data;
1880
+ total = 0;
1881
+ filter;
1882
+ extraFilter;
1883
+ loading = false;
1884
+ scrollable = true;
1885
+ pageSize = DEFAULT_SEARCH_LIMIT;
1886
+ currentPage = 1;
1887
+ showPaginator = true;
1888
+ userTableWrapper = true;
1889
+ sortMultiple = false;
1890
+ lazy = false;
1891
+ selectionMode;
1892
+ selection = [];
1893
+ showPageSizePicker = true;
1894
+ entityKey;
1895
+ customRoute;
1896
+ disableCustomClicks = false;
1897
+ tableName;
1898
+ size = FieldSize.medium;
1899
+ showActionButtons = false;
1900
+ maximumColumnLength = MAX_COLUMN_CHAR_COUNT;
1901
+ set columns(value) {
1902
+ this._columns = value;
1903
+ this.updateColumnModels();
1904
+ }
1905
+ get columns() {
1906
+ return this._columns;
1907
+ }
1908
+ selectionChange = new EventEmitter();
1909
+ lazyLoad = new EventEmitter();
1910
+ download = new EventEmitter();
1911
+ delete = new EventEmitter();
1912
+ save = new EventEmitter();
1913
+ cdRef = inject(ChangeDetectorRef);
1914
+ router = inject(Router);
1915
+ route = inject(ActivatedRoute);
1916
+ service = inject(TableService);
1917
+ _columns = [];
1918
+ tableColumns = [];
1919
+ tableRows = [];
1920
+ pageSizeOptions = DEFAULT_PAGINATION.map((x) => ({ value: x.toString() }));
1921
+ allSelected = false;
1922
+ icons = Icons;
1923
+ get govPageSize() {
1924
+ return this.pageSize.toString();
1925
+ }
1926
+ get tableRowView() {
1927
+ if (this.lazy) {
1928
+ return this.tableRows;
1929
+ }
1930
+ else {
1931
+ const start = (this.currentPage - 1) * this.pageSize;
1932
+ const end = start + this.pageSize;
1933
+ return this.tableRows.slice(start, end);
1934
+ }
1935
+ }
1936
+ get selected() {
1937
+ return this.tableRows.filter(r => r.selected);
1938
+ }
1939
+ get selectedCount() {
1940
+ return this.selected.length;
1941
+ }
1942
+ constructor() {
1943
+ effect(() => {
1944
+ this.reactToSignals();
1945
+ });
1946
+ }
1947
+ ngOnChanges(changes) {
1948
+ if (changes['data']) {
1949
+ this.updateRowModels();
1950
+ if (!this.lazy && this.data) {
1951
+ this.total = this.data.length;
1952
+ }
1953
+ }
1954
+ if (changes['total']) {
1955
+ this.cdRef.markForCheck();
1956
+ }
1957
+ if (changes['selection']) {
1958
+ this.selectSelected();
1959
+ }
1960
+ if (changes['filter']) {
1961
+ this.updateFilter();
1962
+ }
1963
+ }
1964
+ ngAfterViewInit() {
1965
+ if (this.viewColumns?.length) {
1966
+ this.updateColumnModels();
1967
+ this.cdRef.detectChanges();
1968
+ }
1969
+ }
1970
+ sortColumn(column) {
1971
+ if (column.sortable) {
1972
+ column.sortDirection = getNextSortDirection(column.sortDirection, this.sortMultiple);
1973
+ if (!this.sortMultiple) {
1974
+ this.tableColumns
1975
+ .filter((x) => x !== column)
1976
+ .forEach((x) => {
1977
+ x.sortDirection = undefined;
1978
+ });
1979
+ }
1980
+ const sorts = this.getSorts().map((x) => ({
1981
+ field: 'row.' + x.field,
1982
+ direction: x.direction,
1983
+ }));
1984
+ if (!this.lazy) {
1985
+ this.tableRows = multiSort(this.tableRows, sorts);
1986
+ }
1987
+ else {
1988
+ this.fireLazyLoad();
1989
+ }
1990
+ }
1991
+ }
1992
+ changePage(event) {
1993
+ this.currentPage = event.detail.pagination.currentPage;
1994
+ this.fireLazyLoad();
1995
+ }
1996
+ changePageSize(event) {
1997
+ this.pageSize = parseInt(event.detail.value);
1998
+ this.currentPage = 1;
1999
+ this.fireLazyLoad();
2000
+ }
2001
+ selectRow(row, event) {
2002
+ if (event.ctrlKey || event.metaKey) {
2003
+ this.navigate(row, event);
2004
+ return;
2005
+ }
2006
+ if (this.selectionMode === 'single') {
2007
+ row.selected = !row.selected;
2008
+ this.tableRows.forEach((x) => (x !== row ? (x.selected = false) : null));
2009
+ this.fireSelectionChange();
2010
+ }
2011
+ else if (this.selectionMode === 'multiple') {
2012
+ row.selected = !row.selected;
2013
+ this.fireSelectionChange();
2014
+ }
2015
+ }
2016
+ navigate(row, event) {
2017
+ if (this.disableCustomClicks) {
2018
+ return;
2019
+ }
2020
+ event.preventDefault();
2021
+ const targetUrl = this.createUrl(row);
2022
+ if (event.ctrlKey || event.metaKey) {
2023
+ setTimeout(() => {
2024
+ window.open(this.router.serializeUrl(this.router.createUrlTree([targetUrl], { relativeTo: this.route })), '_blank');
2025
+ }, 0);
2026
+ }
2027
+ else {
2028
+ this.router.navigate([targetUrl], { relativeTo: this.route });
2029
+ }
2030
+ }
2031
+ navigateNewWindow(row, event) {
2032
+ if (this.disableCustomClicks || event.button !== 1) {
2033
+ return;
2034
+ }
2035
+ event.preventDefault();
2036
+ const targetUrl = this.createUrl(row);
2037
+ window.open(this.router.serializeUrl(this.router.createUrlTree([targetUrl], { relativeTo: this.route })), '_blank');
2038
+ }
2039
+ toggleAll(event) {
2040
+ this.allSelected = event.detail.checked;
2041
+ this.tableRows.forEach((x) => (x.selected = this.allSelected));
2042
+ this.fireSelectionChange();
2043
+ }
2044
+ toggleDetail(row) {
2045
+ row.expanded = !row.expanded;
2046
+ this.cdRef.detectChanges();
2047
+ }
2048
+ selectRowCheckbox(row, event) {
2049
+ row.selected = event.detail.checked;
2050
+ this.allSelected = this.tableRows.every((x) => x.selected);
2051
+ this.fireSelectionChange();
2052
+ }
2053
+ truncate(text) {
2054
+ return text.length > this.maximumColumnLength
2055
+ ? text.slice(0, this.maximumColumnLength) + '...'
2056
+ : text;
2057
+ }
2058
+ deselectAll() {
2059
+ this.allSelected = false;
2060
+ this.tableRows.forEach(x => (x.selected = this.allSelected));
2061
+ }
2062
+ createUrl(row) {
2063
+ if (row.customRoute) {
2064
+ return row.customRoute;
2065
+ }
2066
+ return row.id.toString();
2067
+ }
2068
+ reactToSignals() {
2069
+ const reload = this.service.reload();
2070
+ if (typeof reload === 'symbol') {
2071
+ this.fireLazyLoad();
2072
+ }
2073
+ else if (reload.name === this.tableName) {
2074
+ this.fireLazyLoad();
2075
+ }
2076
+ this.deselectAll();
2077
+ }
2078
+ updateColumnModels() {
2079
+ const viewColumns = this.viewColumns
2080
+ ?.toArray()
2081
+ .map((x) => x.getDefinition());
2082
+ this.tableColumns = [...(this._columns ?? []), ...(viewColumns ?? [])].map((x) => new ColumnModel(x));
2083
+ }
2084
+ updateRowModels() {
2085
+ this.tableRows = (this.data ?? []).map((x) => new RowModel(x, false, false, undefined, undefined, undefined, this.customRoute, this.entityKey));
2086
+ }
2087
+ fireSelectionChange() {
2088
+ const selectedRows = this.tableRows
2089
+ .filter((x) => x.selected)
2090
+ .map((x) => x.row);
2091
+ this.selectionChange.emit(selectedRows);
2092
+ }
2093
+ selectSelected() {
2094
+ if (this.selection?.length && this.selectionMode) {
2095
+ const selection = this.selectionMode === TableSelectionMode.single
2096
+ ? [this.selection[0]]
2097
+ : this.selection;
2098
+ const selectionSet = new Set(selection);
2099
+ this.tableRows.forEach((item) => {
2100
+ item.selected = selectionSet.has(item.row);
2101
+ });
2102
+ this.allSelected = this.tableRows.every((x) => x.selected);
2103
+ }
2104
+ }
2105
+ fireLazyLoad() {
2106
+ const lazyLoadEvent = {
2107
+ sort: this.getSorts(),
2108
+ offset: (this.currentPage - 1) * this.pageSize,
2109
+ limit: this.pageSize,
2110
+ filter: this.filter,
2111
+ };
2112
+ this.lazyLoad.emit(lazyLoadEvent);
2113
+ }
2114
+ updateFilter() {
2115
+ this.fireLazyLoad();
2116
+ }
2117
+ getSorts() {
2118
+ return this.tableColumns
2119
+ .filter((x) => x.sortable && x.sortDirection)
2120
+ .map((x) => ({
2121
+ field: x.id,
2122
+ direction: x.sortDirection,
2123
+ }));
2124
+ }
2125
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2126
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TableComponent, isStandalone: true, selector: "v-table", inputs: { sorters: "sorters", data: "data", total: "total", filter: "filter", extraFilter: "extraFilter", loading: "loading", scrollable: "scrollable", pageSize: "pageSize", currentPage: "currentPage", showPaginator: "showPaginator", userTableWrapper: "userTableWrapper", sortMultiple: "sortMultiple", lazy: "lazy", selectionMode: "selectionMode", selection: "selection", showPageSizePicker: "showPageSizePicker", entityKey: "entityKey", customRoute: "customRoute", disableCustomClicks: "disableCustomClicks", tableName: "tableName", size: "size", showActionButtons: "showActionButtons", maximumColumnLength: "maximumColumnLength", columns: "columns" }, outputs: { selectionChange: "selectionChange", lazyLoad: "lazyLoad", download: "download", delete: "delete", save: "save" }, providers: [
2127
+ {
2128
+ provide: TABLE_COMPONENT_TOKEN,
2129
+ useExisting: TableComponent,
2130
+ },
2131
+ ], queries: [{ propertyName: "rowDetailTemplate", first: true, predicate: ["rowDetail"], descendants: true }, { propertyName: "rowDetailButtonTemplate", first: true, predicate: ["rowDetailButton"], descendants: true }, { propertyName: "viewColumns", predicate: TABLE_COLUMN_PROVIDER }], usesOnChanges: true, ngImport: i0, template: "@if (selectionMode === 'multiple' && showActionButtons) {\n<gov-flex\n class=\"gov-table-complex__actions mt-2\"\n justify-content=\"space-between\"\n align-items=\"center\"\n>\n <div class=\"gov-table-complex__records-selected\">\n {{ selectedCount }} {{ ('TABLES.CHOSEN_RECORDS' | translate) ?? 'chosen records'}}\n </div>\n <div>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"delete.emit(selected)\">\n {{ ('BUTTONS.DELETE' | translate) ?? 'Delete'}}\n </gov-button>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"save.emit(selected)\">\n {{ ('BUTTONS.SAVE' | translate) ?? 'Save'}}\n </gov-button>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"download.emit(selected)\">\n {{ ('BUTTONS.DOWNLOAD' | translate) ?? 'Download'}}\n </gov-button>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"deselectAll()\">\n {{ ('BUTTONS.CANCEL' | translate) ?? 'Cancel'}}\n </gov-button>\n </div>\n</gov-flex>\n}\n\n<div\n class=\" v-table gov-table\"\n [attr.size]=\"size | govSize\"\n>\n <table class=\"v-table__table\">\n <thead class=\"v-table__head\">\n <tr class=\"v-table__header\">\n @if (this.rowDetailTemplate) {\n <th></th>\n } @if (selectionMode === 'multiple') {\n <th scope=\"col\">\n <gov-form-checkbox\n [checked]=\"allSelected\"\n (gov-change)=\"toggleAll($event)\"\n />\n </th>\n }\n @for (column of tableColumns; track column; let index = $index) {\n @if (column.visible && column.forceVisibility !== 'hidden') {\n <th\n scope=\"col\"\n [style]=\"{'text-align': column.textAlign}\"\n [class]=\"column.columnClass\"\n >\n <span\n class=\"gov-table--fit-width\"\n [class.v-table__sortable]=\"column.sortable\"\n [class.v-table__sortable--desc]=\"column.sortable && column.sortDirection === 'desc'\"\n [class.v-table__sortable--asc]=\"column.sortable && column.sortDirection === 'asc'\"\n (click)=\"sortColumn(column)\"\n >\n {{ column.headerGetter(column.id, index) | translate }}\n </span>\n </th>\n } @if (this.rowDetailButtonTemplate) {\n <th></th>\n }}\n </tr>\n </thead>\n @if (loading) {\n <v-loader />\n } @else {\n <tbody class=\"v-table__body\">\n @for (data of tableRowView; track data.id; let rowIndex = $index) {\n <tr\n class=\"v-table__row\"\n [class.gov-table--highlight]=\"data.selected && selectionMode\"\n (click)=\"selectRow(data, $event)\"\n (dblclick)=\"navigate(data, $event)\"\n (mousedown)=\"navigateNewWindow(data, $event)\"\n >\n @if (this.rowDetailTemplate) {\n <td>\n <gov-button\n [size]=\"size | govSize\"\n color=\"primary\"\n type=\"solid\"\n (gov-click)=\"toggleDetail(data)\"\n >\n <gov-icon\n [name]=\"data.expanded ? 'chevron-up' : 'chevron-down'\"\n [size]=\"size | govSize\"\n slot=\"icon-start\"\n ></gov-icon>\n </gov-button>\n </td>\n } @if (selectionMode === 'multiple') {\n <td class=\"gov-table--fit-content gov-table--border-right\">\n <gov-form-checkbox\n no-label\n [checked]=\"data.selected\"\n [size]=\"size | govSize\"\n (gov-change)=\"selectRowCheckbox(data, $event)\"\n />\n </td>\n }\n @for (column of tableColumns; track column; let columnIndex = $index) {\n @if (column.visible && column.forceVisibility !== 'hidden') {\n <td\n [style]=\"{'text-align': column.textAlign}\"\n [class]=\"column.columnClass!\"\n [class.v-auto-cell]=\"column.template\"\n >\n @if (column.template) {\n <ng-container\n *ngTemplateOutlet=\"\n column.template;\n context: { $implicit: data.row }\n \"\n ></ng-container>\n } @else {\n <span\n [queryParams]=\"column.queryParams ? column.queryParams : undefined\"\n [routerLink]=\"column.routerLink ? column.routerLink(data.row) : undefined\"\n [innerHTML]=\"truncate(column.valueGetter(data.row, rowIndex))\"\n [attr.title]=\"\n column.valueGetter(data.row, rowIndex).length > maximumColumnLength\n ? column.valueGetter(data.row, rowIndex)\n : null\n \"\n ></span>\n }\n </td>\n @if (this.rowDetailButtonTemplate) {\n <td scope=\"\">\n <ng-container\n *ngTemplateOutlet=\"\n this.rowDetailButtonTemplate;\n context: { $implicit: data.row }\n \"\n ></ng-container>\n </td>\n }}}\n </tr>\n @if (this.rowDetailTemplate && data.expanded) {\n <tr>\n <td [attr.colspan]=\"tableColumns.length + 1\">\n <ng-container\n class=\"w-100\"\n *ngTemplateOutlet=\"\n this.rowDetailTemplate;\n context: { $implicit: data.row }\n \"\n ></ng-container>\n </td>\n </tr>\n } } @if (!tableRows.length && !loading){\n <td [attr.colspan]=\"tableColumns.length\">\n <gov-empty align=\"center\" [size]=\"size | govSize\">\n <gov-icon slot=\"icon\" name=\"empty-file\" type=\"colored\"/>\n <p slot=\"headline\">\n {{ ('TABLES.EMPTY' | translate) ?? 'No records were found!' }}\n </p>\n </gov-empty>\n </td>\n }\n </tbody>\n }\n </table>\n @if(showPaginator) {\n <div class=\"v-table__paginator d-flex pt-3 pb-3\">\n @if (tableRows.length) {\n <div class=\"mt-2\">\n <v-table-pagination-info\n [showingText]=\"'TABLES.PAGINATION.SHOWING' | translate\"\n [toText]=\"'TABLES.PAGINATION.TO' | translate\"\n [ofText]=\"'TABLES.PAGINATION.OF' | translate\"\n [entriesText]=\"'TABLES.PAGINATION.ENTRIES' | translate\"\n [currentPage]=\"currentPage\"\n [pageSize]=\"pageSize\"\n [total]=\"total\"\n />\n </div>\n <div class=\"ms-4\">\n <gov-form-select\n [options]=\"pageSizeOptions\"\n [value]=\"govPageSize\"\n (gov-change)=\"changePageSize($event)\"\n />\n </div>\n }\n <div class=\"ms-4\">\n <gov-pagination\n [current]=\"currentPage\"\n [pageSize]=\"pageSize\"\n [total]=\"total\"\n [type]=\"'button'\"\n (gov-page)=\"changePage($event)\"\n />\n </div>\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";.v-table{position:relative;height:100%;display:flex;flex-direction:column}.v-table__sortable{transition:color .15s ease-in-out;cursor:pointer}.v-table__sortable:after{content:\"\\2191\\2193\";margin-left:.5rem;text-decoration:none;display:inline-block}.v-table__sortable--asc:after{content:\"\\2191\"}.v-table__sortable--desc:after{content:\"\\2193\"}.v-table__header{background-color:var(--background-block-primary);position:sticky;top:0;z-index:2}.v-table__table{width:100%}.v-table__paginator{background-color:var(--background-neutral-white);justify-content:end;position:sticky;bottom:0;z-index:3}.gov-table{width:100%;overflow-x:auto}.gov-table table{table-layout:auto;min-width:100%;border-collapse:collapse}.gov-table table tr.gov-table--highlight td{background-color:var(--background-primary-subtle)}.gov-table table th,.gov-table table td{border-bottom:1px solid var(--border-subtlest);text-align:left}.gov-table table th.gov-table--align-right,.gov-table table td.gov-table--align-right{text-align:right}.gov-table table th.gov-table--vertical-align-top,.gov-table table td.gov-table--vertical-align-top{vertical-align:top}.gov-table table th.gov-table--border-right,.gov-table table td.gov-table--border-right{border-right:1px solid var(--border-subtlest)}.gov-table table th.gov-table--border-left,.gov-table table td.gov-table--border-left{border-left:1px solid var(--border-subtlest)}.gov-table table th.gov-table--border-bottom-none,.gov-table table td.gov-table--border-bottom-none{border-bottom:none}.gov-table table th.gov-table--nowrap,.gov-table table td.gov-table--nowrap{white-space:nowrap}.gov-table table th.gov-table--fit-width,.gov-table table td.gov-table--fit-width{width:1px}.gov-table table th{color:var(--text-primary);background-color:var(--background-neutral-subtlest)}.gov-table table td{background-color:var(--background-neutral-white)}.gov-table table tr.open td{padding:var(--spacing-s) var(--spacing-m)}.gov-table summary::-webkit-details-marker{display:none}.gov-table[size=s] table{border-bottom-left-radius:var(--corner-radius-s);border-bottom-right-radius:var(--corner-radius-s)}.gov-table[size=s] table th,.gov-table[size=s] table td{height:var(--height-2xl);padding:0 var(--spacing-s);font-size:var(--font-size-body-s);line-height:150%;font-weight:400}.gov-table[size=s] table th{font-weight:700}.gov-table[size=m] table{border-bottom-left-radius:var(--corner-radius-m);border-bottom-right-radius:var(--corner-radius-m)}.gov-table[size=m] table th,.gov-table[size=m] table td{height:var(--height-3xl);padding:0 var(--spacing-m);font-size:var(--font-size-body-m);line-height:150%;font-weight:400}.gov-table[size=m] table th{font-weight:700}.gov-table[size=l] table{border-bottom-left-radius:var(--corner-radius-l);border-bottom-right-radius:var(--corner-radius-l)}.gov-table[size=l] table th,.gov-table[size=l] table td{height:var(--height-4xl);padding:0 var(--spacing-l);font-size:var(--font-size-body-l);line-height:150%;font-weight:400}.gov-table[size=l] table th{font-weight:700}.gov-table-complex__name,.gov-table-complex__description{margin:0;color:var(--text-primary)}.gov-table-complex__actions{color:var(--text-white-fixed);background-color:var(--background-primary);padding:var(--spacing-xs) var(--spacing-s)}.gov-table-complex__per-page{width:185px;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovButton, selector: "gov-button", inputs: ["color", "disabled", "download", "expanded", "expandedMobile", "focusable", "href", "hreflang", "identifier", "loading", "name", "nativeType", "referrerpolicy", "rel", "size", "target", "type"] }, { kind: "component", type: i2.GovEmpty, selector: "gov-empty", inputs: ["direction", "size"] }, { kind: "component", type: i2.GovFlex, selector: "gov-flex", inputs: ["alignContent", "alignItems", "alignSelf", "direction", "gap", "justifyContent", "responsive", "wrap"] }, { kind: "component", type: i2.GovFormCheckbox, selector: "gov-form-checkbox", inputs: ["checked", "disabled", "identifier", "indeterminate", "invalid", "name", "noLabel", "required", "size", "value"] }, { kind: "component", type: i2.GovFormSelect, selector: "gov-form-select", inputs: ["disabled", "identifier", "invalid", "name", "options", "required", "size", "success", "value"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: i2.GovPagination, selector: "gov-pagination", inputs: ["accessiblePageLabel", "accessibleSelectLabel", "color", "current", "labelEnd", "labelNext", "labelPrev", "labelStart", "link", "maxPages", "pageSize", "selectIdentifier", "size", "total", "type"] }, { kind: "directive", type: i2.BooleanValueAccessor, selector: "gov-form-checkbox,gov-form-switch" }, { kind: "directive", type: i2.SelectValueAccessor, selector: "gov-form-select, gov-form-multi-select" }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: LoaderComponent, selector: "v-loader", inputs: ["size", "message"] }, { kind: "component", type: TablePaginationInfoComponent, selector: "v-table-pagination-info", inputs: ["showingText", "toText", "ofText", "entriesText", "currentPage", "pageSize", "total"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2132
+ }
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableComponent, decorators: [{
2134
+ type: Component,
2135
+ args: [{ selector: 'v-table', imports: [
2136
+ CommonModule,
2137
+ RouterModule,
2138
+ GovDesignSystemModule,
2139
+ NgTemplateOutlet,
2140
+ TranslateModule,
2141
+ GovSizePipe,
2142
+ LoaderComponent,
2143
+ TablePaginationInfoComponent,
2144
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2145
+ {
2146
+ provide: TABLE_COMPONENT_TOKEN,
2147
+ useExisting: TableComponent,
2148
+ },
2149
+ ], template: "@if (selectionMode === 'multiple' && showActionButtons) {\n<gov-flex\n class=\"gov-table-complex__actions mt-2\"\n justify-content=\"space-between\"\n align-items=\"center\"\n>\n <div class=\"gov-table-complex__records-selected\">\n {{ selectedCount }} {{ ('TABLES.CHOSEN_RECORDS' | translate) ?? 'chosen records'}}\n </div>\n <div>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"delete.emit(selected)\">\n {{ ('BUTTONS.DELETE' | translate) ?? 'Delete'}}\n </gov-button>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"save.emit(selected)\">\n {{ ('BUTTONS.SAVE' | translate) ?? 'Save'}}\n </gov-button>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"download.emit(selected)\">\n {{ ('BUTTONS.DOWNLOAD' | translate) ?? 'Download'}}\n </gov-button>\n <gov-button color=\"primary\" size=\"s\" type=\"solid\" (gov-click)=\"deselectAll()\">\n {{ ('BUTTONS.CANCEL' | translate) ?? 'Cancel'}}\n </gov-button>\n </div>\n</gov-flex>\n}\n\n<div\n class=\" v-table gov-table\"\n [attr.size]=\"size | govSize\"\n>\n <table class=\"v-table__table\">\n <thead class=\"v-table__head\">\n <tr class=\"v-table__header\">\n @if (this.rowDetailTemplate) {\n <th></th>\n } @if (selectionMode === 'multiple') {\n <th scope=\"col\">\n <gov-form-checkbox\n [checked]=\"allSelected\"\n (gov-change)=\"toggleAll($event)\"\n />\n </th>\n }\n @for (column of tableColumns; track column; let index = $index) {\n @if (column.visible && column.forceVisibility !== 'hidden') {\n <th\n scope=\"col\"\n [style]=\"{'text-align': column.textAlign}\"\n [class]=\"column.columnClass\"\n >\n <span\n class=\"gov-table--fit-width\"\n [class.v-table__sortable]=\"column.sortable\"\n [class.v-table__sortable--desc]=\"column.sortable && column.sortDirection === 'desc'\"\n [class.v-table__sortable--asc]=\"column.sortable && column.sortDirection === 'asc'\"\n (click)=\"sortColumn(column)\"\n >\n {{ column.headerGetter(column.id, index) | translate }}\n </span>\n </th>\n } @if (this.rowDetailButtonTemplate) {\n <th></th>\n }}\n </tr>\n </thead>\n @if (loading) {\n <v-loader />\n } @else {\n <tbody class=\"v-table__body\">\n @for (data of tableRowView; track data.id; let rowIndex = $index) {\n <tr\n class=\"v-table__row\"\n [class.gov-table--highlight]=\"data.selected && selectionMode\"\n (click)=\"selectRow(data, $event)\"\n (dblclick)=\"navigate(data, $event)\"\n (mousedown)=\"navigateNewWindow(data, $event)\"\n >\n @if (this.rowDetailTemplate) {\n <td>\n <gov-button\n [size]=\"size | govSize\"\n color=\"primary\"\n type=\"solid\"\n (gov-click)=\"toggleDetail(data)\"\n >\n <gov-icon\n [name]=\"data.expanded ? 'chevron-up' : 'chevron-down'\"\n [size]=\"size | govSize\"\n slot=\"icon-start\"\n ></gov-icon>\n </gov-button>\n </td>\n } @if (selectionMode === 'multiple') {\n <td class=\"gov-table--fit-content gov-table--border-right\">\n <gov-form-checkbox\n no-label\n [checked]=\"data.selected\"\n [size]=\"size | govSize\"\n (gov-change)=\"selectRowCheckbox(data, $event)\"\n />\n </td>\n }\n @for (column of tableColumns; track column; let columnIndex = $index) {\n @if (column.visible && column.forceVisibility !== 'hidden') {\n <td\n [style]=\"{'text-align': column.textAlign}\"\n [class]=\"column.columnClass!\"\n [class.v-auto-cell]=\"column.template\"\n >\n @if (column.template) {\n <ng-container\n *ngTemplateOutlet=\"\n column.template;\n context: { $implicit: data.row }\n \"\n ></ng-container>\n } @else {\n <span\n [queryParams]=\"column.queryParams ? column.queryParams : undefined\"\n [routerLink]=\"column.routerLink ? column.routerLink(data.row) : undefined\"\n [innerHTML]=\"truncate(column.valueGetter(data.row, rowIndex))\"\n [attr.title]=\"\n column.valueGetter(data.row, rowIndex).length > maximumColumnLength\n ? column.valueGetter(data.row, rowIndex)\n : null\n \"\n ></span>\n }\n </td>\n @if (this.rowDetailButtonTemplate) {\n <td scope=\"\">\n <ng-container\n *ngTemplateOutlet=\"\n this.rowDetailButtonTemplate;\n context: { $implicit: data.row }\n \"\n ></ng-container>\n </td>\n }}}\n </tr>\n @if (this.rowDetailTemplate && data.expanded) {\n <tr>\n <td [attr.colspan]=\"tableColumns.length + 1\">\n <ng-container\n class=\"w-100\"\n *ngTemplateOutlet=\"\n this.rowDetailTemplate;\n context: { $implicit: data.row }\n \"\n ></ng-container>\n </td>\n </tr>\n } } @if (!tableRows.length && !loading){\n <td [attr.colspan]=\"tableColumns.length\">\n <gov-empty align=\"center\" [size]=\"size | govSize\">\n <gov-icon slot=\"icon\" name=\"empty-file\" type=\"colored\"/>\n <p slot=\"headline\">\n {{ ('TABLES.EMPTY' | translate) ?? 'No records were found!' }}\n </p>\n </gov-empty>\n </td>\n }\n </tbody>\n }\n </table>\n @if(showPaginator) {\n <div class=\"v-table__paginator d-flex pt-3 pb-3\">\n @if (tableRows.length) {\n <div class=\"mt-2\">\n <v-table-pagination-info\n [showingText]=\"'TABLES.PAGINATION.SHOWING' | translate\"\n [toText]=\"'TABLES.PAGINATION.TO' | translate\"\n [ofText]=\"'TABLES.PAGINATION.OF' | translate\"\n [entriesText]=\"'TABLES.PAGINATION.ENTRIES' | translate\"\n [currentPage]=\"currentPage\"\n [pageSize]=\"pageSize\"\n [total]=\"total\"\n />\n </div>\n <div class=\"ms-4\">\n <gov-form-select\n [options]=\"pageSizeOptions\"\n [value]=\"govPageSize\"\n (gov-change)=\"changePageSize($event)\"\n />\n </div>\n }\n <div class=\"ms-4\">\n <gov-pagination\n [current]=\"currentPage\"\n [pageSize]=\"pageSize\"\n [total]=\"total\"\n [type]=\"'button'\"\n (gov-page)=\"changePage($event)\"\n />\n </div>\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";.v-table{position:relative;height:100%;display:flex;flex-direction:column}.v-table__sortable{transition:color .15s ease-in-out;cursor:pointer}.v-table__sortable:after{content:\"\\2191\\2193\";margin-left:.5rem;text-decoration:none;display:inline-block}.v-table__sortable--asc:after{content:\"\\2191\"}.v-table__sortable--desc:after{content:\"\\2193\"}.v-table__header{background-color:var(--background-block-primary);position:sticky;top:0;z-index:2}.v-table__table{width:100%}.v-table__paginator{background-color:var(--background-neutral-white);justify-content:end;position:sticky;bottom:0;z-index:3}.gov-table{width:100%;overflow-x:auto}.gov-table table{table-layout:auto;min-width:100%;border-collapse:collapse}.gov-table table tr.gov-table--highlight td{background-color:var(--background-primary-subtle)}.gov-table table th,.gov-table table td{border-bottom:1px solid var(--border-subtlest);text-align:left}.gov-table table th.gov-table--align-right,.gov-table table td.gov-table--align-right{text-align:right}.gov-table table th.gov-table--vertical-align-top,.gov-table table td.gov-table--vertical-align-top{vertical-align:top}.gov-table table th.gov-table--border-right,.gov-table table td.gov-table--border-right{border-right:1px solid var(--border-subtlest)}.gov-table table th.gov-table--border-left,.gov-table table td.gov-table--border-left{border-left:1px solid var(--border-subtlest)}.gov-table table th.gov-table--border-bottom-none,.gov-table table td.gov-table--border-bottom-none{border-bottom:none}.gov-table table th.gov-table--nowrap,.gov-table table td.gov-table--nowrap{white-space:nowrap}.gov-table table th.gov-table--fit-width,.gov-table table td.gov-table--fit-width{width:1px}.gov-table table th{color:var(--text-primary);background-color:var(--background-neutral-subtlest)}.gov-table table td{background-color:var(--background-neutral-white)}.gov-table table tr.open td{padding:var(--spacing-s) var(--spacing-m)}.gov-table summary::-webkit-details-marker{display:none}.gov-table[size=s] table{border-bottom-left-radius:var(--corner-radius-s);border-bottom-right-radius:var(--corner-radius-s)}.gov-table[size=s] table th,.gov-table[size=s] table td{height:var(--height-2xl);padding:0 var(--spacing-s);font-size:var(--font-size-body-s);line-height:150%;font-weight:400}.gov-table[size=s] table th{font-weight:700}.gov-table[size=m] table{border-bottom-left-radius:var(--corner-radius-m);border-bottom-right-radius:var(--corner-radius-m)}.gov-table[size=m] table th,.gov-table[size=m] table td{height:var(--height-3xl);padding:0 var(--spacing-m);font-size:var(--font-size-body-m);line-height:150%;font-weight:400}.gov-table[size=m] table th{font-weight:700}.gov-table[size=l] table{border-bottom-left-radius:var(--corner-radius-l);border-bottom-right-radius:var(--corner-radius-l)}.gov-table[size=l] table th,.gov-table[size=l] table td{height:var(--height-4xl);padding:0 var(--spacing-l);font-size:var(--font-size-body-l);line-height:150%;font-weight:400}.gov-table[size=l] table th{font-weight:700}.gov-table-complex__name,.gov-table-complex__description{margin:0;color:var(--text-primary)}.gov-table-complex__actions{color:var(--text-white-fixed);background-color:var(--background-primary);padding:var(--spacing-xs) var(--spacing-s)}.gov-table-complex__per-page{width:185px;white-space:nowrap}\n"] }]
2150
+ }], ctorParameters: () => [], propDecorators: { viewColumns: [{
2151
+ type: ContentChildren,
2152
+ args: [TABLE_COLUMN_PROVIDER]
2153
+ }], rowDetailTemplate: [{
2154
+ type: ContentChild,
2155
+ args: ['rowDetail', { static: false }]
2156
+ }], rowDetailButtonTemplate: [{
2157
+ type: ContentChild,
2158
+ args: ['rowDetailButton', { static: false }]
2159
+ }], sorters: [{
2160
+ type: Input
2161
+ }], data: [{
2162
+ type: Input
2163
+ }], total: [{
2164
+ type: Input
2165
+ }], filter: [{
2166
+ type: Input
2167
+ }], extraFilter: [{
2168
+ type: Input
2169
+ }], loading: [{
2170
+ type: Input
2171
+ }], scrollable: [{
2172
+ type: Input
2173
+ }], pageSize: [{
2174
+ type: Input
2175
+ }], currentPage: [{
2176
+ type: Input
2177
+ }], showPaginator: [{
2178
+ type: Input
2179
+ }], userTableWrapper: [{
2180
+ type: Input
2181
+ }], sortMultiple: [{
2182
+ type: Input
2183
+ }], lazy: [{
2184
+ type: Input
2185
+ }], selectionMode: [{
2186
+ type: Input
2187
+ }], selection: [{
2188
+ type: Input
2189
+ }], showPageSizePicker: [{
2190
+ type: Input
2191
+ }], entityKey: [{
2192
+ type: Input
2193
+ }], customRoute: [{
2194
+ type: Input
2195
+ }], disableCustomClicks: [{
2196
+ type: Input
2197
+ }], tableName: [{
2198
+ type: Input
2199
+ }], size: [{
2200
+ type: Input
2201
+ }], showActionButtons: [{
2202
+ type: Input
2203
+ }], maximumColumnLength: [{
2204
+ type: Input
2205
+ }], columns: [{
2206
+ type: Input
2207
+ }], selectionChange: [{
2208
+ type: Output
2209
+ }], lazyLoad: [{
2210
+ type: Output
2211
+ }], download: [{
2212
+ type: Output
2213
+ }], delete: [{
2214
+ type: Output
2215
+ }], save: [{
2216
+ type: Output
2217
+ }] } });
2218
+
2219
+ class FeatureListFilterFieldDirective extends FilterFieldDirective {
2220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2221
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FeatureListFilterFieldDirective, isStandalone: true, selector: "v-feature-list-filter-field", usesInheritance: true, ngImport: i0 });
2222
+ }
2223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterFieldDirective, decorators: [{
2224
+ type: Directive,
2225
+ args: [{
2226
+ // eslint-disable-next-line @angular-eslint/directive-selector
2227
+ selector: 'v-feature-list-filter-field',
2228
+ }]
2229
+ }] });
2230
+
2231
+ class FeatureListFilterPipe {
2232
+ transform(value) {
2233
+ if (!value) {
2234
+ return undefined;
2235
+ }
2236
+ return value.filter(x => x.filter).map((x, index) => ({
2237
+ name: x.id,
2238
+ label: typeof x.headerName === 'function' ? x.headerName(x.id, index) : x.headerName ?? '',
2239
+ type: x.type,
2240
+ }));
2241
+ }
2242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2243
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterPipe, isStandalone: true, name: "featureListColumn" });
2244
+ }
2245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterPipe, decorators: [{
2246
+ type: Pipe,
2247
+ args: [{
2248
+ name: 'featureListColumn',
2249
+ }]
2250
+ }] });
2251
+
2252
+ class FeatureListPageComponent {
2253
+ config;
2254
+ constructor(activatedRoute) {
2255
+ this.config =
2256
+ activatedRoute.snapshot.data[FEATURE_LIST_PAGE_CONFIG_PROPERTY];
2257
+ }
2258
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListPageComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2259
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: FeatureListPageComponent, isStandalone: true, selector: "v-feature-list-page", ngImport: i0, template: `
2260
+ <v-feature-list
2261
+ [title]="config.title"
2262
+ [tableName]="config.tableName"
2263
+ [showAdd]="config.showAdd ?? true"
2264
+ [showDownload]="config.showDownload ?? true"
2265
+ [showDelete]="config.showDelete ?? true"
2266
+ >
2267
+ </v-feature-list>
2268
+ `, isInline: true, dependencies: [{ kind: "component", type: FeatureListComponent, selector: "v-feature-list", inputs: ["autoBind", "title", "columns", "filters", "maxVisibleActions", "tableName", "ngrxFeatureKey", "maxVisibleMobileActions", "showExtendedFilter", "showDownload", "showDelete", "showAdd", "canDownload", "canDelete", "canAdd", "useRouterFilter", "fulltextFieldName", "showFulltext", "applyLabel", "clearLabel", "buttonType", "buttonOutlined", "deleteConfirmMessage", "autoDeleteEnabled", "autoDownloadEnabled", "downloadFileName", "datasource", "extraFilter", "disableCustomClicks", "maximumColumnLength", "selectionMode"], outputs: ["addClick", "downloadClick", "deleteClick", "selectionChange"] }] });
2269
+ }
2270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListPageComponent, decorators: [{
2271
+ type: Component,
2272
+ args: [{
2273
+ selector: 'v-feature-list-page',
2274
+ imports: [FeatureListComponent],
2275
+ template: `
2276
+ <v-feature-list
2277
+ [title]="config.title"
2278
+ [tableName]="config.tableName"
2279
+ [showAdd]="config.showAdd ?? true"
2280
+ [showDownload]="config.showDownload ?? true"
2281
+ [showDelete]="config.showDelete ?? true"
2282
+ >
2283
+ </v-feature-list>
2284
+ `
2285
+ }]
2286
+ }], ctorParameters: () => [{ type: i1.ActivatedRoute }] });
2287
+
2288
+ const FEATURE_LIST_PAGE_CONFIG_PROPERTY = 'feature_list_config';
2289
+ function addFeatureListPage(value) {
2290
+ const { config, ...route } = value;
2291
+ return {
2292
+ component: FeatureListPageComponent,
2293
+ ...route,
2294
+ data: {
2295
+ [FEATURE_LIST_PAGE_CONFIG_PROPERTY]: config,
2296
+ ...(route.data ?? {}),
2297
+ },
2298
+ };
2299
+ }
2300
+ const FEATURE_LIST_COLUMN_PROVIDER = new InjectionToken('FEATURE_LIST_COLUMN_PROVIDER');
2301
+
2302
+ class FeatureListComponent {
2303
+ viewColumns;
2304
+ fieldDeclarations;
2305
+ tableDatasourceDirective;
2306
+ tableComponent;
2307
+ autoBind = true;
2308
+ title;
2309
+ columns;
2310
+ filters;
2311
+ maxVisibleActions = 2;
2312
+ tableName;
2313
+ ngrxFeatureKey;
2314
+ maxVisibleMobileActions = 0;
2315
+ showExtendedFilter = false;
2316
+ showDownload = false;
2317
+ showDelete = false;
2318
+ showAdd = false;
2319
+ canDownload = true;
2320
+ canDelete = true;
2321
+ canAdd = true;
2322
+ useRouterFilter = true;
2323
+ fulltextFieldName = 'searchField';
2324
+ showFulltext = true;
2325
+ applyLabel = 'Apply';
2326
+ clearLabel = 'Clear';
2327
+ buttonType = GovButtonType.solid;
2328
+ buttonOutlined = false;
2329
+ deleteConfirmMessage;
2330
+ autoDeleteEnabled = true;
2331
+ autoDownloadEnabled = true;
2332
+ downloadFileName = 'export.csv';
2333
+ datasource;
2334
+ extraFilter;
2335
+ disableCustomClicks = false;
2336
+ maximumColumnLength = MAX_COLUMN_CHAR_COUNT;
2337
+ addClick = new EventEmitter();
2338
+ downloadClick = new EventEmitter();
2339
+ deleteClick = new EventEmitter();
2340
+ selectionChange = new EventEmitter();
2341
+ set selectionMode(mode) {
2342
+ this._selectionMode = mode;
2343
+ }
2344
+ get selectionMode() {
2345
+ return this.canDelete
2346
+ ? TableSelectionMode.single
2347
+ : this._selectionMode;
2348
+ }
2349
+ icons = Icons;
2350
+ httpClient = inject(HttpClient);
2351
+ baseUrl = inject(BASE_URL_PATH);
2352
+ _selectionMode;
2353
+ cdRef = inject(ChangeDetectorRef);
2354
+ dialogService = inject(DialogService);
2355
+ selection = [];
2356
+ get tableTotal() {
2357
+ return this.tableComponent?.total;
2358
+ }
2359
+ ngAfterViewInit() {
2360
+ if (this.viewColumns?.length) {
2361
+ const vewColumns = this.viewColumns
2362
+ ?.toArray()
2363
+ .map((x) => x.getDefinition());
2364
+ this.columns = [...(this.columns ?? []), ...(vewColumns ?? [])];
2365
+ this.cdRef.detectChanges();
2366
+ }
2367
+ if (this.fieldDeclarations?.length) {
2368
+ this.filters = this.fieldDeclarations?.toArray();
2369
+ }
2370
+ this.cdRef.detectChanges();
2371
+ }
2372
+ selectItems(items) {
2373
+ this.selection = items ?? [];
2374
+ if (this.selectionMode !== undefined) {
2375
+ this.selectionChange.emit(this.selectionMode === 'multiple'
2376
+ ? this.selection
2377
+ : this.selection[0]);
2378
+ }
2379
+ }
2380
+ startDeleteItems() {
2381
+ if (!this.selection.length) {
2382
+ return;
2383
+ }
2384
+ if (this.deleteConfirmMessage) {
2385
+ const message = this.deleteConfirmMessage;
2386
+ this.dialogService.showDialog({
2387
+ innerHTML: message,
2388
+ confirmButtonFn: () => this.deleteItems(this.selection),
2389
+ });
2390
+ }
2391
+ else {
2392
+ this.deleteItems(this.selection);
2393
+ }
2394
+ }
2395
+ startDownload() {
2396
+ this.downloadClick.emit();
2397
+ if (!this.autoDownloadEnabled) {
2398
+ return;
2399
+ }
2400
+ const dowloadFn = this.createDownloadFn(this.datasource);
2401
+ if (dowloadFn) {
2402
+ this.tableDatasourceDirective.params$
2403
+ .pipe(take(1), switchMap((params) => dowloadFn(params)))
2404
+ .subscribe((blob) => {
2405
+ downloadFile(this.downloadFileName, blob);
2406
+ });
2407
+ }
2408
+ }
2409
+ deleteItems(items) {
2410
+ if (!this.autoDeleteEnabled) {
2411
+ this.deleteClick.emit(items);
2412
+ }
2413
+ else {
2414
+ this.forceDelete(items);
2415
+ }
2416
+ }
2417
+ forceDelete(items) {
2418
+ const deleteFn = this.createDeleteFn(this.datasource);
2419
+ if (deleteFn) {
2420
+ const deleteMethods = items.map((x) => deleteFn(x));
2421
+ forkJoin(deleteMethods)
2422
+ .pipe(take(1))
2423
+ .subscribe(() => this.finishDeletion(items));
2424
+ }
2425
+ else {
2426
+ this.finishDeletion(items);
2427
+ }
2428
+ }
2429
+ createDeleteFn(datasource) {
2430
+ if (!datasource) {
2431
+ return undefined;
2432
+ }
2433
+ if (typeof datasource === 'string') {
2434
+ const service = new BaseHttpService(this.httpClient, this.baseUrl, datasource);
2435
+ return (item) => service.delete(item.id);
2436
+ }
2437
+ if (datasource instanceof BaseHttpService) {
2438
+ return (item) => datasource.delete(item.id);
2439
+ }
2440
+ return undefined;
2441
+ }
2442
+ createDownloadFn(datasource) {
2443
+ if (!datasource) {
2444
+ return undefined;
2445
+ }
2446
+ if (typeof datasource === 'string') {
2447
+ const service = new BaseHttpService(this.httpClient, this.baseUrl, datasource);
2448
+ return (request) => service.export(request);
2449
+ }
2450
+ if (datasource instanceof BaseHttpService) {
2451
+ return (request) => datasource.export(request);
2452
+ }
2453
+ const fetchFunction = convertDatasource(datasource, this.baseUrl, this.httpClient);
2454
+ return (request) => {
2455
+ const allData = [];
2456
+ let offset = 0;
2457
+ const fetchAllData = () => {
2458
+ return fetchFunction({
2459
+ ...request,
2460
+ offset,
2461
+ limit: DEFAULT_PAGE_SIZE,
2462
+ }).pipe(take(1), switchMap((response) => {
2463
+ allData.push(...response.data);
2464
+ if (allData.length < response.total) {
2465
+ offset = offset + DEFAULT_PAGE_SIZE;
2466
+ return fetchAllData();
2467
+ }
2468
+ else {
2469
+ return of(this.convertToBlob(allData));
2470
+ }
2471
+ }));
2472
+ };
2473
+ return fetchAllData();
2474
+ };
2475
+ }
2476
+ finishDeletion(items) {
2477
+ if (this.datasource && Array.isArray(this.datasource)) {
2478
+ this.datasource = this.datasource.filter((x) => !items.includes(x));
2479
+ }
2480
+ else {
2481
+ this.tableDatasourceDirective.reload();
2482
+ }
2483
+ this.deleteClick.emit(items);
2484
+ }
2485
+ convertToBlob(data) {
2486
+ const columnModel = this.columns.map((x) => new ColumnModel(x));
2487
+ const headers = columnModel.map((x, index) => x.headerGetter(x.id, index));
2488
+ const dataValues = data.map((row, rowIndex) => columnModel.map((column) => column.valueGetter(row, rowIndex)));
2489
+ const csvData = [headers, ...dataValues]
2490
+ .map((row) => row.join(','))
2491
+ .join('\n');
2492
+ return new Blob([csvData], { type: 'text/csv' });
2493
+ }
2494
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2495
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: FeatureListComponent, isStandalone: true, selector: "v-feature-list", inputs: { autoBind: "autoBind", title: "title", columns: "columns", filters: "filters", maxVisibleActions: "maxVisibleActions", tableName: "tableName", ngrxFeatureKey: "ngrxFeatureKey", maxVisibleMobileActions: "maxVisibleMobileActions", showExtendedFilter: "showExtendedFilter", showDownload: "showDownload", showDelete: "showDelete", showAdd: "showAdd", canDownload: "canDownload", canDelete: "canDelete", canAdd: "canAdd", useRouterFilter: "useRouterFilter", fulltextFieldName: "fulltextFieldName", showFulltext: "showFulltext", applyLabel: "applyLabel", clearLabel: "clearLabel", buttonType: "buttonType", buttonOutlined: "buttonOutlined", deleteConfirmMessage: "deleteConfirmMessage", autoDeleteEnabled: "autoDeleteEnabled", autoDownloadEnabled: "autoDownloadEnabled", downloadFileName: "downloadFileName", datasource: "datasource", extraFilter: "extraFilter", disableCustomClicks: "disableCustomClicks", maximumColumnLength: "maximumColumnLength", selectionMode: "selectionMode" }, outputs: { addClick: "addClick", downloadClick: "downloadClick", deleteClick: "deleteClick", selectionChange: "selectionChange" }, queries: [{ propertyName: "viewColumns", predicate: FEATURE_LIST_COLUMN_PROVIDER }, { propertyName: "fieldDeclarations", predicate: FeatureListFilterFieldDirective }], viewQueries: [{ propertyName: "tableDatasourceDirective", first: true, predicate: TableDatasourceDirective, descendants: true }, { propertyName: "tableComponent", first: true, predicate: ["table"], descendants: true }], ngImport: i0, template: "<div class=\"feature-list__container full-height-container\">\n <v-filter\n #filter\n [title]=\"title\"\n [total]=\"tableTotal\"\n [fields]=\"columns | featureListColumn\"\n [filters]=\"filters\"\n [fulltextFieldName]=\"fulltextFieldName\"\n [showFulltext]=\"showFulltext\"\n [showFilters]=\"showExtendedFilter\"\n [applyLabel]=\"applyLabel\"\n [clearLabel]=\"clearLabel\"\n [buttonType]=\"buttonType\"\n [buttonOutlined]=\"buttonOutlined\"\n >\n <v-action-button-group\n [maxItems]=\"maxVisibleActions\"\n [maxItemsMobile]=\"maxVisibleMobileActions\"\n >\n @if (showAdd) {\n <v-action-button\n [icon]=\"icons.add\"\n label=\"Add\"\n [disabled]=\"!canAdd\"\n (click)=\"addClick.emit()\"\n />\n } @if (showDelete){\n <v-action-button\n [icon]=\"icons.delete\"\n label=\"Delete\"\n [disabled]=\"!canDelete || !selection.length\"\n (click)=\"startDeleteItems()\"\n />\n } @if (showDownload){\n <v-action-button\n [icon]=\"icons.download\"\n label=\"Download\"\n [disabled]=\"!canDownload\"\n (click)=\"startDownload()\"\n />\n }\n </v-action-button-group>\n </v-filter>\n <div class=\"feature-list__table-container full-height-container\">\n <div class=\"full-height-container\">\n <v-table\n #table\n useDatasource\n useFilter\n [filterComponent]=\"filter\"\n class=\"full-height-container\"\n [selectionMode]=\"selectionMode\"\n [tableName]=\"tableName\"\n [autoBind]=\"true\"\n [datasource]=\"datasource\"\n [columns]=\"columns\"\n [extraFilter]=\"extraFilter\"\n [maximumColumnLength]=\"maximumColumnLength\"\n [disableCustomClicks]=\"disableCustomClicks\"\n (selectionChange)=\"selectItems($event)\"\n >\n <ng-content />\n </v-table>\n </div>\n </div>\n</div>\n", styles: [".full-height-container,:host{display:flex;flex-direction:column;flex-grow:1;height:100%}\n"], dependencies: [{ kind: "component", type: TableComponent, selector: "v-table", inputs: ["sorters", "data", "total", "filter", "extraFilter", "loading", "scrollable", "pageSize", "currentPage", "showPaginator", "userTableWrapper", "sortMultiple", "lazy", "selectionMode", "selection", "showPageSizePicker", "entityKey", "customRoute", "disableCustomClicks", "tableName", "size", "showActionButtons", "maximumColumnLength", "columns"], outputs: ["selectionChange", "lazyLoad", "download", "delete", "save"] }, { kind: "directive", type: TableDatasourceDirective, selector: "v-table[useDatasource]", inputs: ["autoBind", "tableName", "debounceTime", "datasource", "extraFilter", "transformFn"], exportAs: ["useDatasource"] }, { kind: "component", type: FilterComponent, selector: "v-filter", inputs: ["fields", "filters", "title", "total", "fulltextFieldName", "showFulltext", "showFilters", "autoBind", "applyLabel", "clearLabel", "buttonType", "buttonOutlined", "debounceTime", "defaultExpanded"] }, { kind: "directive", type: TableFilterDirective, selector: "v-table[useFilter]", inputs: ["filterComponent"], exportAs: ["tableFilterDirective"] }, { kind: "component", type: ActionButtonGroupComponent, selector: "v-action-button-group", inputs: ["maxItems", "maxItemsMobile", "items", "menuIconPos", "menuIcon", "label", "icon"] }, { kind: "component", type: ActionButtonComponent, selector: "v-action-button", inputs: ["disabled", "toolTip", "id", "icon", "outlined", "raised", "severity", "label", "size"], outputs: ["click"] }, { kind: "pipe", type: FeatureListFilterPipe, name: "featureListColumn" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2496
+ }
2497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListComponent, decorators: [{
2498
+ type: Component,
2499
+ args: [{ selector: 'v-feature-list', imports: [
2500
+ TableComponent,
2501
+ TableDatasourceDirective,
2502
+ FilterComponent,
2503
+ TableFilterDirective,
2504
+ ActionButtonGroupComponent,
2505
+ ActionButtonComponent,
2506
+ FeatureListFilterPipe,
2507
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"feature-list__container full-height-container\">\n <v-filter\n #filter\n [title]=\"title\"\n [total]=\"tableTotal\"\n [fields]=\"columns | featureListColumn\"\n [filters]=\"filters\"\n [fulltextFieldName]=\"fulltextFieldName\"\n [showFulltext]=\"showFulltext\"\n [showFilters]=\"showExtendedFilter\"\n [applyLabel]=\"applyLabel\"\n [clearLabel]=\"clearLabel\"\n [buttonType]=\"buttonType\"\n [buttonOutlined]=\"buttonOutlined\"\n >\n <v-action-button-group\n [maxItems]=\"maxVisibleActions\"\n [maxItemsMobile]=\"maxVisibleMobileActions\"\n >\n @if (showAdd) {\n <v-action-button\n [icon]=\"icons.add\"\n label=\"Add\"\n [disabled]=\"!canAdd\"\n (click)=\"addClick.emit()\"\n />\n } @if (showDelete){\n <v-action-button\n [icon]=\"icons.delete\"\n label=\"Delete\"\n [disabled]=\"!canDelete || !selection.length\"\n (click)=\"startDeleteItems()\"\n />\n } @if (showDownload){\n <v-action-button\n [icon]=\"icons.download\"\n label=\"Download\"\n [disabled]=\"!canDownload\"\n (click)=\"startDownload()\"\n />\n }\n </v-action-button-group>\n </v-filter>\n <div class=\"feature-list__table-container full-height-container\">\n <div class=\"full-height-container\">\n <v-table\n #table\n useDatasource\n useFilter\n [filterComponent]=\"filter\"\n class=\"full-height-container\"\n [selectionMode]=\"selectionMode\"\n [tableName]=\"tableName\"\n [autoBind]=\"true\"\n [datasource]=\"datasource\"\n [columns]=\"columns\"\n [extraFilter]=\"extraFilter\"\n [maximumColumnLength]=\"maximumColumnLength\"\n [disableCustomClicks]=\"disableCustomClicks\"\n (selectionChange)=\"selectItems($event)\"\n >\n <ng-content />\n </v-table>\n </div>\n </div>\n</div>\n", styles: [".full-height-container,:host{display:flex;flex-direction:column;flex-grow:1;height:100%}\n"] }]
2508
+ }], propDecorators: { viewColumns: [{
2509
+ type: ContentChildren,
2510
+ args: [FEATURE_LIST_COLUMN_PROVIDER]
2511
+ }], fieldDeclarations: [{
2512
+ type: ContentChildren,
2513
+ args: [FeatureListFilterFieldDirective]
2514
+ }], tableDatasourceDirective: [{
2515
+ type: ViewChild,
2516
+ args: [TableDatasourceDirective]
2517
+ }], tableComponent: [{
2518
+ type: ViewChild,
2519
+ args: ['table']
2520
+ }], autoBind: [{
2521
+ type: Input
2522
+ }], title: [{
2523
+ type: Input
2524
+ }], columns: [{
2525
+ type: Input
2526
+ }], filters: [{
2527
+ type: Input
2528
+ }], maxVisibleActions: [{
2529
+ type: Input
2530
+ }], tableName: [{
2531
+ type: Input,
2532
+ args: [{ required: true }]
2533
+ }], ngrxFeatureKey: [{
2534
+ type: Input
2535
+ }], maxVisibleMobileActions: [{
2536
+ type: Input
2537
+ }], showExtendedFilter: [{
2538
+ type: Input
2539
+ }], showDownload: [{
2540
+ type: Input
2541
+ }], showDelete: [{
2542
+ type: Input
2543
+ }], showAdd: [{
2544
+ type: Input
2545
+ }], canDownload: [{
2546
+ type: Input
2547
+ }], canDelete: [{
2548
+ type: Input
2549
+ }], canAdd: [{
2550
+ type: Input
2551
+ }], useRouterFilter: [{
2552
+ type: Input
2553
+ }], fulltextFieldName: [{
2554
+ type: Input
2555
+ }], showFulltext: [{
2556
+ type: Input
2557
+ }], applyLabel: [{
2558
+ type: Input
2559
+ }], clearLabel: [{
2560
+ type: Input
2561
+ }], buttonType: [{
2562
+ type: Input
2563
+ }], buttonOutlined: [{
2564
+ type: Input
2565
+ }], deleteConfirmMessage: [{
2566
+ type: Input
2567
+ }], autoDeleteEnabled: [{
2568
+ type: Input
2569
+ }], autoDownloadEnabled: [{
2570
+ type: Input
2571
+ }], downloadFileName: [{
2572
+ type: Input
2573
+ }], datasource: [{
2574
+ type: Input
2575
+ }], extraFilter: [{
2576
+ type: Input
2577
+ }], disableCustomClicks: [{
2578
+ type: Input
2579
+ }], maximumColumnLength: [{
2580
+ type: Input
2581
+ }], addClick: [{
2582
+ type: Output
2583
+ }], downloadClick: [{
2584
+ type: Output
2585
+ }], deleteClick: [{
2586
+ type: Output
2587
+ }], selectionChange: [{
2588
+ type: Output
2589
+ }], selectionMode: [{
2590
+ type: Input
2591
+ }] } });
2592
+
2593
+ class FeatureListColumnDirective extends TableColumnDirective {
2594
+ filter = false;
2595
+ type = GenericFieldType.text;
2596
+ getDefinition() {
2597
+ const definition = super.getDefinition();
2598
+ definition.filter = this.filter;
2599
+ definition.type = this.type;
2600
+ definition.format = this.format;
2601
+ return definition;
2602
+ }
2603
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListColumnDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2604
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FeatureListColumnDirective, isStandalone: true, selector: "v-feature-list-column", inputs: { filter: "filter", type: "type" }, providers: [
2605
+ {
2606
+ provide: FEATURE_LIST_COLUMN_PROVIDER,
2607
+ useExisting: FeatureListColumnDirective,
2608
+ multi: true,
2609
+ },
2610
+ ], usesInheritance: true, ngImport: i0 });
2611
+ }
2612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListColumnDirective, decorators: [{
2613
+ type: Directive,
2614
+ args: [{
2615
+ // eslint-disable-next-line @angular-eslint/directive-selector
2616
+ selector: 'v-feature-list-column',
2617
+ standalone: true,
2618
+ providers: [
2619
+ {
2620
+ provide: FEATURE_LIST_COLUMN_PROVIDER,
2621
+ useExisting: FeatureListColumnDirective,
2622
+ multi: true,
2623
+ },
2624
+ ],
2625
+ }]
2626
+ }], propDecorators: { filter: [{
2627
+ type: Input
2628
+ }], type: [{
2629
+ type: Input
2630
+ }] } });
2631
+
2632
+ class FormFieldComponent extends BaseFormInputComponent {
2633
+ constructor(ngControl) {
2634
+ super(ngControl);
2635
+ }
2636
+ floatLabel;
2637
+ type = FieldType.text;
2638
+ minlength = 0;
2639
+ maxlength = 524288;
2640
+ prefix;
2641
+ sufix;
2642
+ message;
2643
+ name;
2644
+ role;
2645
+ autocorrect = 'on';
2646
+ size = FieldSize.medium;
2647
+ icon;
2648
+ iconPos = IconPosition.right;
2649
+ display;
2650
+ labelSlot = SlotPosition.top;
2651
+ messageSlot = SlotPosition.bottom;
2652
+ icons = Icons;
2653
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2654
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: FormFieldComponent, isStandalone: true, selector: "v-form-field", inputs: { floatLabel: "floatLabel", type: "type", minlength: "minlength", maxlength: "maxlength", prefix: "prefix", sufix: "sufix", message: "message", name: "name", role: "role", autocorrect: "autocorrect", size: "size", icon: "icon", iconPos: "iconPos", display: "display", labelSlot: "labelSlot", messageSlot: "messageSlot" }, providers: [
2655
+ {
2656
+ provide: FORM_FIELD_COMPONENT_TOKEN,
2657
+ useExisting: FormFieldComponent,
2658
+ },
2659
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control>\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n <gov-form-group>\n <ng-content />\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2660
+ }
2661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldComponent, decorators: [{
2662
+ type: Component,
2663
+ args: [{ selector: 'v-form-field', imports: [
2664
+ ReactiveFormsModule,
2665
+ GovDesignSystemModule,
2666
+ GovSizePipe,
2667
+ ErrorComponent
2668
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2669
+ {
2670
+ provide: FORM_FIELD_COMPONENT_TOKEN,
2671
+ useExisting: FormFieldComponent,
2672
+ },
2673
+ ], template: "<gov-form-control>\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n <gov-form-group>\n <ng-content />\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>" }]
2674
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
2675
+ type: Optional
2676
+ }, {
2677
+ type: Self
2678
+ }] }], propDecorators: { floatLabel: [{
2679
+ type: Input
2680
+ }], type: [{
2681
+ type: Input
2682
+ }], minlength: [{
2683
+ type: Input
2684
+ }], maxlength: [{
2685
+ type: Input
2686
+ }], prefix: [{
2687
+ type: Input
2688
+ }], sufix: [{
2689
+ type: Input
2690
+ }], message: [{
2691
+ type: Input
2692
+ }], name: [{
2693
+ type: Input
2694
+ }], role: [{
2695
+ type: Input
2696
+ }], autocorrect: [{
2697
+ type: Input
2698
+ }], size: [{
2699
+ type: Input
2700
+ }], icon: [{
2701
+ type: Input
2702
+ }], iconPos: [{
2703
+ type: Input
2704
+ }], display: [{
2705
+ type: Input
2706
+ }], labelSlot: [{
2707
+ type: Input
2708
+ }], messageSlot: [{
2709
+ type: Input
2710
+ }] } });
2711
+
2712
+ class HeaderComponent {
2713
+ title;
2714
+ userName;
2715
+ logoUrl;
2716
+ userRole;
2717
+ menuRef;
2718
+ items = [];
2719
+ actionTemplate;
2720
+ icons = Icons;
2721
+ menuVisible = false;
2722
+ openedIndexes = [];
2723
+ tabsService = inject(SideMenuService);
2724
+ router = inject(Router);
2725
+ toggleMenu() {
2726
+ this.menuVisible = !this.menuVisible;
2727
+ }
2728
+ canRedirect(url, canRedirect) {
2729
+ if (url && canRedirect) {
2730
+ this.router.navigateByUrl(url);
2731
+ }
2732
+ }
2733
+ showOrHide(index, children) {
2734
+ if (children === 0) {
2735
+ return;
2736
+ }
2737
+ if (!this.openedIndexes.includes(index)) {
2738
+ this.openedIndexes = [...[], index];
2739
+ }
2740
+ else if (this.openedIndexes.includes(index)) {
2741
+ this.openedIndexes = this.openedIndexes.filter(x => x !== index);
2742
+ }
2743
+ }
2744
+ canBeShown(index) {
2745
+ return this.openedIndexes.includes(index);
2746
+ }
2747
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2748
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: HeaderComponent, isStandalone: true, selector: "v-header", inputs: { title: "title", userName: "userName", logoUrl: "logoUrl", userRole: "userRole", menuRef: "menuRef", items: "items" }, providers: [
2749
+ {
2750
+ provide: HEADER_COMPONENT_TOKEN,
2751
+ useExisting: HeaderComponent
2752
+ }
2753
+ ], queries: [{ propertyName: "actionTemplate", first: true, predicate: ["action"], descendants: true }], ngImport: i0, template: "<header class=\"gov-header\">\n <div class=\"gov-header__divider\">\n <div class=\"gov-header__content\">\n <gov-flex\n justify-content=\"space-between\"\n align-items=\"center\"\n responsive=\"false\"\n >\n <a\n href=\"/\"\n class=\"gov-header__logo\"\n aria-label=\"Zp\u011Bt na \u00FAvodn\u00ED str\u00E1nku\"\n >\n <gov-flex\n align-items=\"center\"\n gap=\"s\"\n responsive=\"false\"\n >\n @if (logoUrl) {\n <img\n class=\"gov-header__logo-img\"\n src=\"{{ logoUrl }}\"\n width=\"125px\"\n height=\"43px\"\n alt=\"GA\u010CR Logo\"\n >\n }\n </gov-flex>\n </a>\n </gov-flex>\n <gov-flex\n class=\"gov-header__action\"\n justify-content=\"space-between\"\n align-items=\"center\"\n gap=\"s\"\n >\n <gov-button\n color=\"primary\"\n size=\"m\"\n type=\"base\"\n >{{ userName }}</gov-button>\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"\n this.actionTemplate;\n \"></ng-container>\n </gov-flex>\n </div>\n </div>\n <div class=\"gov-header__navigation\">\n <nav\n class=\"gov-navigation\"\n aria-label=\"Main navigation\"\n id=\"main-navigation\"\n >\n <ul>\n @for (tab of tabsService.menuItems$ | async; track tab; let index = $index) {\n <li\n *hasPermission=\"tab.data?.permissions ?? []\"\n class=\"gov-navigation--has-megamenu\"\n >\n <gov-button\n type=\"base\"\n color=\"primary\"\n size=\"l\"\n [attr.aria-label]=\"tab.label\"\n (gov-click)=\"\n showOrHide(index, tab.children?.length ?? 0);\n canRedirect(tab.url, !tab.children?.length)\n \"\n >\n {{ tab.label }}\n @if (tab.children?.length) {\n <gov-icon\n slot=\"icon-end\"\n size=\"s\"\n [name]=\"canBeShown(index) ? 'chevron-up' : 'chevron-down'\"\n ></gov-icon>\n }\n </gov-button>\n @if (canBeShown(index)) {\n <ul\n id=\"megamenu{{index}}\"\n class=\"gov-mega-menu gov-header__submenu\"\n [attr.aria-hidden]=\"canBeShown(index)\"\n >\n @for (child of tab.children; track child) {\n <li\n *hasPermission=\"child.data?.permissions ?? []\"\n class=\"gov-mega-menu__heading\"\n >\n <a\n [routerLink]=\"child.url\"\n (click)=\"showOrHide(index)\"\n >\n @if (child.icon) {\n <gov-icon\n [name]=\"child.icon\"\n size=\"m\"\n ></gov-icon>\n }\n <span>{{ child.label }}</span>\n </a>\n @if (child.children) { @for(miniChild of child.children; track miniChild) {\n <ul>\n <li *hasPermission=\"miniChild.data?.permissions ?? []\">\n <a\n [routerLink]=\"miniChild.url\"\n (click)=\"showOrHide(index)\"\n >{{ miniChild.label }}</a>\n </li>\n </ul>\n } }\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n </nav>\n </div>\n</header>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovButton, selector: "gov-button", inputs: ["color", "disabled", "download", "expanded", "expandedMobile", "focusable", "href", "hreflang", "identifier", "loading", "name", "nativeType", "referrerpolicy", "rel", "size", "target", "type"] }, { kind: "component", type: i2.GovFlex, selector: "gov-flex", inputs: ["alignContent", "alignItems", "alignSelf", "direction", "gap", "justifyContent", "responsive", "wrap"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2754
+ }
2755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderComponent, decorators: [{
2756
+ type: Component,
2757
+ args: [{ selector: "v-header", imports: [
2758
+ CommonModule,
2759
+ GovDesignSystemModule,
2760
+ AsyncPipe,
2761
+ RouterModule,
2762
+ HasPermissionDirective,
2763
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2764
+ {
2765
+ provide: HEADER_COMPONENT_TOKEN,
2766
+ useExisting: HeaderComponent
2767
+ }
2768
+ ], template: "<header class=\"gov-header\">\n <div class=\"gov-header__divider\">\n <div class=\"gov-header__content\">\n <gov-flex\n justify-content=\"space-between\"\n align-items=\"center\"\n responsive=\"false\"\n >\n <a\n href=\"/\"\n class=\"gov-header__logo\"\n aria-label=\"Zp\u011Bt na \u00FAvodn\u00ED str\u00E1nku\"\n >\n <gov-flex\n align-items=\"center\"\n gap=\"s\"\n responsive=\"false\"\n >\n @if (logoUrl) {\n <img\n class=\"gov-header__logo-img\"\n src=\"{{ logoUrl }}\"\n width=\"125px\"\n height=\"43px\"\n alt=\"GA\u010CR Logo\"\n >\n }\n </gov-flex>\n </a>\n </gov-flex>\n <gov-flex\n class=\"gov-header__action\"\n justify-content=\"space-between\"\n align-items=\"center\"\n gap=\"s\"\n >\n <gov-button\n color=\"primary\"\n size=\"m\"\n type=\"base\"\n >{{ userName }}</gov-button>\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"\n this.actionTemplate;\n \"></ng-container>\n </gov-flex>\n </div>\n </div>\n <div class=\"gov-header__navigation\">\n <nav\n class=\"gov-navigation\"\n aria-label=\"Main navigation\"\n id=\"main-navigation\"\n >\n <ul>\n @for (tab of tabsService.menuItems$ | async; track tab; let index = $index) {\n <li\n *hasPermission=\"tab.data?.permissions ?? []\"\n class=\"gov-navigation--has-megamenu\"\n >\n <gov-button\n type=\"base\"\n color=\"primary\"\n size=\"l\"\n [attr.aria-label]=\"tab.label\"\n (gov-click)=\"\n showOrHide(index, tab.children?.length ?? 0);\n canRedirect(tab.url, !tab.children?.length)\n \"\n >\n {{ tab.label }}\n @if (tab.children?.length) {\n <gov-icon\n slot=\"icon-end\"\n size=\"s\"\n [name]=\"canBeShown(index) ? 'chevron-up' : 'chevron-down'\"\n ></gov-icon>\n }\n </gov-button>\n @if (canBeShown(index)) {\n <ul\n id=\"megamenu{{index}}\"\n class=\"gov-mega-menu gov-header__submenu\"\n [attr.aria-hidden]=\"canBeShown(index)\"\n >\n @for (child of tab.children; track child) {\n <li\n *hasPermission=\"child.data?.permissions ?? []\"\n class=\"gov-mega-menu__heading\"\n >\n <a\n [routerLink]=\"child.url\"\n (click)=\"showOrHide(index)\"\n >\n @if (child.icon) {\n <gov-icon\n [name]=\"child.icon\"\n size=\"m\"\n ></gov-icon>\n }\n <span>{{ child.label }}</span>\n </a>\n @if (child.children) { @for(miniChild of child.children; track miniChild) {\n <ul>\n <li *hasPermission=\"miniChild.data?.permissions ?? []\">\n <a\n [routerLink]=\"miniChild.url\"\n (click)=\"showOrHide(index)\"\n >{{ miniChild.label }}</a>\n </li>\n </ul>\n } }\n </li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n </nav>\n </div>\n</header>" }]
2769
+ }], propDecorators: { title: [{
2770
+ type: Input
2771
+ }], userName: [{
2772
+ type: Input
2773
+ }], logoUrl: [{
2774
+ type: Input
2775
+ }], userRole: [{
2776
+ type: Input
2777
+ }], menuRef: [{
2778
+ type: Input
2779
+ }], items: [{
2780
+ type: Input
2781
+ }], actionTemplate: [{
2782
+ type: ContentChild,
2783
+ args: ['action', { static: false }]
2784
+ }] } });
2785
+
2786
+ class InputGroupComponent extends BaseFormInputComponent {
2787
+ floatLabel;
2788
+ type = FieldType.text;
2789
+ minlength = 0;
2790
+ items;
2791
+ prefix;
2792
+ sufix;
2793
+ maxlength = 524288;
2794
+ name;
2795
+ role;
2796
+ message;
2797
+ size = FieldSize.medium;
2798
+ icon;
2799
+ iconPos = IconPosition.right;
2800
+ labelSlot = SlotPosition.top;
2801
+ messageSlot = SlotPosition.bottom;
2802
+ icons = Icons;
2803
+ constructor(ngControl) {
2804
+ super(ngControl);
2805
+ }
2806
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputGroupComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2807
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: InputGroupComponent, isStandalone: true, selector: "v-input-group", inputs: { floatLabel: "floatLabel", type: "type", minlength: "minlength", items: "items", prefix: "prefix", sufix: "sufix", maxlength: "maxlength", name: "name", role: "role", message: "message", size: "size", icon: "icon", iconPos: "iconPos", labelSlot: "labelSlot", messageSlot: "messageSlot" }, providers: [
2808
+ {
2809
+ provide: INPUT_GROUP_COMPONENT_TOKEN,
2810
+ useExisting: InputGroupComponent,
2811
+ },
2812
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control>\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n @if(prefix) {\n <gov-icon\n [name]=\"name\"\n />\n }\n <gov-form-input \n input-type=\"input-type\"\n [formControl]=\"formControl\"\n [minlength]=\"minlength\" \n [maxlength]=\"maxlength\" \n [size]='size | govSize' \n [name]='name' \n [role]='role'\n [required]=\"required\"\n [readonly]=\"readonly\"\n [invalid]=\"ngControl?.errors ? true : false\"\n />\n @if(sufix) {\n <gov-icon\n [name]=\"name\"\n />\n }\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n</gov-form-control>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2813
+ }
2814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputGroupComponent, decorators: [{
2815
+ type: Component,
2816
+ args: [{ selector: 'v-input-group', imports: [
2817
+ ReactiveFormsModule,
2818
+ GovDesignSystemModule,
2819
+ GovSizePipe,
2820
+ ErrorComponent
2821
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2822
+ {
2823
+ provide: INPUT_GROUP_COMPONENT_TOKEN,
2824
+ useExisting: InputGroupComponent,
2825
+ },
2826
+ ], template: "<gov-form-control>\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n @if(prefix) {\n <gov-icon\n [name]=\"name\"\n />\n }\n <gov-form-input \n input-type=\"input-type\"\n [formControl]=\"formControl\"\n [minlength]=\"minlength\" \n [maxlength]=\"maxlength\" \n [size]='size | govSize' \n [name]='name' \n [role]='role'\n [required]=\"required\"\n [readonly]=\"readonly\"\n [invalid]=\"ngControl?.errors ? true : false\"\n />\n @if(sufix) {\n <gov-icon\n [name]=\"name\"\n />\n }\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n</gov-form-control>\n" }]
2827
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
2828
+ type: Optional
2829
+ }, {
2830
+ type: Self
2831
+ }] }], propDecorators: { floatLabel: [{
2832
+ type: Input
2833
+ }], type: [{
2834
+ type: Input
2835
+ }], minlength: [{
2836
+ type: Input
2837
+ }], items: [{
2838
+ type: Input
2839
+ }], prefix: [{
2840
+ type: Input
2841
+ }], sufix: [{
2842
+ type: Input
2843
+ }], maxlength: [{
2844
+ type: Input
2845
+ }], name: [{
2846
+ type: Input
2847
+ }], role: [{
2848
+ type: Input
2849
+ }], message: [{
2850
+ type: Input
2851
+ }], size: [{
2852
+ type: Input
2853
+ }], icon: [{
2854
+ type: Input
2855
+ }], iconPos: [{
2856
+ type: Input
2857
+ }], labelSlot: [{
2858
+ type: Input
2859
+ }], messageSlot: [{
2860
+ type: Input
2861
+ }] } });
2862
+
2863
+ class NumberInputComponent extends BaseFormInputComponent {
2864
+ mode;
2865
+ currency;
2866
+ min;
2867
+ max;
2868
+ step = 1;
2869
+ floatLabel;
2870
+ type = FieldType.number;
2871
+ minlength = 0;
2872
+ maxlength = 524288;
2873
+ prefix;
2874
+ sufix;
2875
+ message;
2876
+ name;
2877
+ role;
2878
+ size = FieldSize.medium;
2879
+ icon;
2880
+ iconPos = IconPosition.right;
2881
+ labelSlot = SlotPosition.top;
2882
+ errorSlot = SlotPosition.bottom;
2883
+ messageSlot = SlotPosition.bottom;
2884
+ icons = Icons;
2885
+ constructor(ngControl) {
2886
+ super(ngControl);
2887
+ }
2888
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NumberInputComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2889
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: NumberInputComponent, isStandalone: true, selector: "v-number-input", inputs: { mode: "mode", currency: "currency", min: "min", max: "max", step: "step", floatLabel: "floatLabel", type: "type", minlength: "minlength", maxlength: "maxlength", prefix: "prefix", sufix: "sufix", message: "message", name: "name", role: "role", size: "size", icon: "icon", iconPos: "iconPos", labelSlot: "labelSlot", errorSlot: "errorSlot", messageSlot: "messageSlot" }, providers: [
2890
+ {
2891
+ provide: NUMBER_INPUT_COMPONENT_TOKEN,
2892
+ useExisting: NumberInputComponent,
2893
+ },
2894
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control>\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input \n [attr.input-type]=\"type\"\n [formControl]=\"formControl\"\n [minlength]=\"minlength\" \n [maxlength]=\"maxlength\" \n [size]='size | govSize' \n [name]='name' \n [role]='role'\n [required]=\"required\"\n [readonly]=\"readonly\"\n [invalid]=\"ngControl?.errors ? true : false\"\n >\n @if (icon) {\n <gov-icon\n [name]=\"icon\"\n [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\"\n />\n } @if (prefix) {\n <p slot=\"prefix\">\n {{ prefix }}\n </p>\n } @if (sufix) {\n <p slot=\"sufix\">\n {{ sufix }}\n </p>\n }\n </gov-form-input>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n </gov-form-group>\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2895
+ }
2896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NumberInputComponent, decorators: [{
2897
+ type: Component,
2898
+ args: [{ selector: 'v-number-input', imports: [
2899
+ ReactiveFormsModule,
2900
+ GovDesignSystemModule,
2901
+ GovSizePipe,
2902
+ ErrorComponent
2903
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2904
+ {
2905
+ provide: NUMBER_INPUT_COMPONENT_TOKEN,
2906
+ useExisting: NumberInputComponent,
2907
+ },
2908
+ ], template: "<gov-form-control>\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input \n [attr.input-type]=\"type\"\n [formControl]=\"formControl\"\n [minlength]=\"minlength\" \n [maxlength]=\"maxlength\" \n [size]='size | govSize' \n [name]='name' \n [role]='role'\n [required]=\"required\"\n [readonly]=\"readonly\"\n [invalid]=\"ngControl?.errors ? true : false\"\n >\n @if (icon) {\n <gov-icon\n [name]=\"icon\"\n [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\"\n />\n } @if (prefix) {\n <p slot=\"prefix\">\n {{ prefix }}\n </p>\n } @if (sufix) {\n <p slot=\"sufix\">\n {{ sufix }}\n </p>\n }\n </gov-form-input>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n </gov-form-group>\n</gov-form-control>\n" }]
2909
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
2910
+ type: Optional
2911
+ }, {
2912
+ type: Self
2913
+ }] }], propDecorators: { mode: [{
2914
+ type: Input
2915
+ }], currency: [{
2916
+ type: Input
2917
+ }], min: [{
2918
+ type: Input
2919
+ }], max: [{
2920
+ type: Input
2921
+ }], step: [{
2922
+ type: Input
2923
+ }], floatLabel: [{
2924
+ type: Input
2925
+ }], type: [{
2926
+ type: Input
2927
+ }], minlength: [{
2928
+ type: Input
2929
+ }], maxlength: [{
2930
+ type: Input
2931
+ }], prefix: [{
2932
+ type: Input
2933
+ }], sufix: [{
2934
+ type: Input
2935
+ }], message: [{
2936
+ type: Input
2937
+ }], name: [{
2938
+ type: Input
2939
+ }], role: [{
2940
+ type: Input
2941
+ }], size: [{
2942
+ type: Input
2943
+ }], icon: [{
2944
+ type: Input
2945
+ }], iconPos: [{
2946
+ type: Input
2947
+ }], labelSlot: [{
2948
+ type: Input
2949
+ }], errorSlot: [{
2950
+ type: Input
2951
+ }], messageSlot: [{
2952
+ type: Input
2953
+ }] } });
2954
+
2955
+ class PageHeaderComponent {
2956
+ title = '';
2957
+ subtitle;
2958
+ showBackButton;
2959
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2960
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: PageHeaderComponent, isStandalone: true, selector: "v-page-header", inputs: { title: "title", subtitle: "subtitle", showBackButton: "showBackButton" }, ngImport: i0, template: "<div class=\"d-flex gap-3 align-items-center\">\n <h2>{{ title | translate }}</h2>\n</div>", styles: ["h2{font-size:1.5rem;color:var(--color-neutral-700);margin:0}.d-flex{display:flex;align-items:center;gap:1rem}\n"], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2961
+ }
2962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderComponent, decorators: [{
2963
+ type: Component,
2964
+ args: [{ selector: 'v-page-header', imports: [
2965
+ GovDesignSystemModule,
2966
+ TranslateModule
2967
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex gap-3 align-items-center\">\n <h2>{{ title | translate }}</h2>\n</div>", styles: ["h2{font-size:1.5rem;color:var(--color-neutral-700);margin:0}.d-flex{display:flex;align-items:center;gap:1rem}\n"] }]
2968
+ }], propDecorators: { title: [{
2969
+ type: Input
2970
+ }], subtitle: [{
2971
+ type: Input
2972
+ }], showBackButton: [{
2973
+ type: Input
2974
+ }] } });
2975
+
2976
+ class PasswordComponent extends BaseFormInputComponent {
2977
+ toggleMask = true;
2978
+ feedback = false;
2979
+ labelSlot = SlotPosition.top;
2980
+ requiredStrength = PasswordStrength.None;
2981
+ message;
2982
+ name;
2983
+ role;
2984
+ icon;
2985
+ iconPos = IconPosition.right;
2986
+ size = FieldSize.medium;
2987
+ messageSlot = SlotPosition.bottom;
2988
+ icons = Icons;
2989
+ passwordStrength = PasswordStrength.None;
2990
+ type = FieldType.password;
2991
+ constructor(ngControl) {
2992
+ super(ngControl);
2993
+ }
2994
+ valueChange(value) {
2995
+ if (!value) {
2996
+ this.passwordStrength = 0;
2997
+ return;
2998
+ }
2999
+ const result = zxcvbn(value);
3000
+ this.passwordStrength = result.score;
3001
+ if (!this.formControl) {
3002
+ return;
3003
+ }
3004
+ if (result.score < this.requiredStrength) {
3005
+ this.formControl.setErrors({ passwordLowStrength: true }, { emitEvent: false });
3006
+ }
3007
+ }
3008
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PasswordComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
3009
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: PasswordComponent, isStandalone: true, selector: "v-password", inputs: { toggleMask: "toggleMask", feedback: "feedback", labelSlot: "labelSlot", requiredStrength: "requiredStrength", message: "message", name: "name", role: "role", icon: "icon", iconPos: "iconPos", size: "size", messageSlot: "messageSlot" }, providers: [
3010
+ {
3011
+ provide: PASSWORD_COMPONENT_TOKEN,
3012
+ useExisting: PasswordComponent
3013
+ }
3014
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control class=\"mb-3\">\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n <gov-form-group>\n @if (feedback) {\n <gov-form-password-power [power]=\"passwordStrength - 1\" />\n }\n <gov-form-input\n [formControl]=\"formControl\"\n [attr.input-type]=\"type\"\n [placeholder]=\"placeholder\"\n [invalid]=\"ngControl?.errors\"\n (ngModelChange)=\"valueChange($event)\"\n />\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "component", type: i2.GovFormPasswordPower, selector: "gov-form-password-power", inputs: ["power"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3015
+ }
3016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PasswordComponent, decorators: [{
3017
+ type: Component,
3018
+ args: [{ selector: 'v-password', imports: [
3019
+ ReactiveFormsModule,
3020
+ GovDesignSystemModule,
3021
+ GovSizePipe,
3022
+ ErrorComponent
3023
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3024
+ {
3025
+ provide: PASSWORD_COMPONENT_TOKEN,
3026
+ useExisting: PasswordComponent
3027
+ }
3028
+ ], template: "<gov-form-control class=\"mb-3\">\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label }}\n </gov-form-label>\n }\n <gov-form-group>\n @if (feedback) {\n <gov-form-password-power [power]=\"passwordStrength - 1\" />\n }\n <gov-form-input\n [formControl]=\"formControl\"\n [attr.input-type]=\"type\"\n [placeholder]=\"placeholder\"\n [invalid]=\"ngControl?.errors\"\n (ngModelChange)=\"valueChange($event)\"\n />\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message }}\n </gov-form-message>\n }\n</gov-form-control>\n" }]
3029
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
3030
+ type: Optional
3031
+ }, {
3032
+ type: Self
3033
+ }] }], propDecorators: { toggleMask: [{
3034
+ type: Input
3035
+ }], feedback: [{
3036
+ type: Input
3037
+ }], labelSlot: [{
3038
+ type: Input
3039
+ }], requiredStrength: [{
3040
+ type: Input
3041
+ }], message: [{
3042
+ type: Input
3043
+ }], name: [{
3044
+ type: Input
3045
+ }], role: [{
3046
+ type: Input
3047
+ }], icon: [{
3048
+ type: Input
3049
+ }], iconPos: [{
3050
+ type: Input
3051
+ }], size: [{
3052
+ type: Input
3053
+ }], messageSlot: [{
3054
+ type: Input
3055
+ }] } });
3056
+
3057
+ class RadioButtonComponent extends BaseFormInputComponent {
3058
+ radioGroupName = Math.random().toString();
3059
+ items = [];
3060
+ size = FieldSize.medium;
3061
+ icons = Icons;
3062
+ constructor(ngControl) {
3063
+ super(ngControl);
3064
+ }
3065
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RadioButtonComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
3066
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RadioButtonComponent, isStandalone: true, selector: "v-radiobutton", inputs: { radioGroupName: "radioGroupName", items: "items", size: "size" }, providers: [
3067
+ {
3068
+ provide: RADIOBUTTON_COMPONENT_TOKEN,
3069
+ useExisting: RadioButtonComponent,
3070
+ },
3071
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control>\n <gov-form-radio-group [formControl]=\"formControl\">\n @if (items) { @for(item of items; track item) {\n <gov-form-radio\n [size]=\"size | govSize\"\n [value]=\"item.value\"\n [required]=\"required\"\n [identifier]=\"item.id\"\n [name]=\"radioGroupName\"\n [invalid]=\"ngControl?.errors\"\n [disabled]=\"formControl.disabled\"\n >\n <gov-form-label\n [size]=\"size | govSize\"\n slot=\"label\"\n >\n {{ label }}\n </gov-form-label>\n </gov-form-radio>\n } }\n </gov-form-radio-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormRadio, selector: "gov-form-radio", inputs: ["checked", "disabled", "identifier", "invalid", "name", "noLabel", "required", "size", "value"] }, { kind: "component", type: i2.GovFormRadioGroup, selector: "gov-form-radio-group", inputs: ["gap", "orientation", "value"] }, { kind: "directive", type: i2.RadioValueAccessor, selector: "gov-form-radio" }, { kind: "directive", type: i2.GroupValueAccessor, selector: "gov-form-radio-group,gov-form-checkbox-group" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3072
+ }
3073
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RadioButtonComponent, decorators: [{
3074
+ type: Component,
3075
+ args: [{ selector: "v-radiobutton", imports: [
3076
+ GovDesignSystemModule,
3077
+ RouterModule,
3078
+ ReactiveFormsModule,
3079
+ GovSizePipe,
3080
+ ErrorComponent
3081
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3082
+ {
3083
+ provide: RADIOBUTTON_COMPONENT_TOKEN,
3084
+ useExisting: RadioButtonComponent,
3085
+ },
3086
+ ], template: "<gov-form-control>\n <gov-form-radio-group [formControl]=\"formControl\">\n @if (items) { @for(item of items; track item) {\n <gov-form-radio\n [size]=\"size | govSize\"\n [value]=\"item.value\"\n [required]=\"required\"\n [identifier]=\"item.id\"\n [name]=\"radioGroupName\"\n [invalid]=\"ngControl?.errors\"\n [disabled]=\"formControl.disabled\"\n >\n <gov-form-label\n [size]=\"size | govSize\"\n slot=\"label\"\n >\n {{ label }}\n </gov-form-label>\n </gov-form-radio>\n } }\n </gov-form-radio-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n" }]
3087
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
3088
+ type: Optional
3089
+ }, {
3090
+ type: Self
3091
+ }] }], propDecorators: { radioGroupName: [{
3092
+ type: Input
3093
+ }], items: [{
3094
+ type: Input
3095
+ }], size: [{
3096
+ type: Input
3097
+ }] } });
3098
+
3099
+ class SearchComponent {
3100
+ placeholder;
3101
+ size = FieldSize.medium;
3102
+ searchTerm = new EventEmitter();
3103
+ value;
3104
+ icons = Icons;
3105
+ setValue(event) {
3106
+ this.value = event.detail.value;
3107
+ }
3108
+ search() {
3109
+ this.searchTerm.emit(this.value);
3110
+ }
3111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3112
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: SearchComponent, isStandalone: true, selector: "v-search", inputs: { placeholder: "placeholder", size: "size" }, outputs: { searchTerm: "searchTerm" }, ngImport: i0, template: "<gov-form-control>\n <gov-form-group>\n <gov-form-search color=\"neutral\">\n <gov-form-input \n [placeholder]=\"placeholder\"\n [size]=\"size | govSize\"\n slot=\"input\"\n (gov-input)=\"setValue($event)\"\n />\n <gov-button\n [size]=\"size | govSize\"\n color=\"primary\"\n type=\"solid\"\n slot=\"button\"\n (gov-click)=\"search()\"\n >\n <gov-icon\n [name]=\"icons.search\"\n />\n </gov-button>\n </gov-form-search>\n </gov-form-group>\n</gov-form-control>", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovButton, selector: "gov-button", inputs: ["color", "disabled", "download", "expanded", "expandedMobile", "focusable", "href", "hreflang", "identifier", "loading", "name", "nativeType", "referrerpolicy", "rel", "size", "target", "type"] }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormSearch, selector: "gov-form-search", inputs: ["color", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3113
+ }
3114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SearchComponent, decorators: [{
3115
+ type: Component,
3116
+ args: [{ selector: 'v-search', imports: [
3117
+ GovDesignSystemModule,
3118
+ GovSizePipe,
3119
+ ReactiveFormsModule
3120
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gov-form-control>\n <gov-form-group>\n <gov-form-search color=\"neutral\">\n <gov-form-input \n [placeholder]=\"placeholder\"\n [size]=\"size | govSize\"\n slot=\"input\"\n (gov-input)=\"setValue($event)\"\n />\n <gov-button\n [size]=\"size | govSize\"\n color=\"primary\"\n type=\"solid\"\n slot=\"button\"\n (gov-click)=\"search()\"\n >\n <gov-icon\n [name]=\"icons.search\"\n />\n </gov-button>\n </gov-form-search>\n </gov-form-group>\n</gov-form-control>" }]
3121
+ }], propDecorators: { placeholder: [{
3122
+ type: Input
3123
+ }], size: [{
3124
+ type: Input
3125
+ }], searchTerm: [{
3126
+ type: Output
3127
+ }] } });
3128
+
3129
+ class SectionComponent {
3130
+ title;
3131
+ badge;
3132
+ showContent = false;
3133
+ backgroundColor;
3134
+ annotation;
3135
+ identifier;
3136
+ icon;
3137
+ iconType;
3138
+ size = FieldSize.medium;
3139
+ badgeSlot = 'sufix';
3140
+ open = false;
3141
+ icons = Icons;
3142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3143
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: SectionComponent, isStandalone: true, selector: "v-section", inputs: { title: "title", badge: "badge", showContent: "showContent", backgroundColor: "backgroundColor", annotation: "annotation", identifier: "identifier", icon: "icon", iconType: "iconType", size: "size", badgeSlot: "badgeSlot", open: "open" }, providers: [
3144
+ {
3145
+ provide: SECTION_COMPONENT_TOKEN,
3146
+ useExisting: SectionComponent,
3147
+ },
3148
+ ], ngImport: i0, template: "<gov-accordion>\n <gov-accordion-item \n [size]=\"size | govSize\"\n [identifier]=\"identifier\"\n [open]=\"open\"\n >\n @if (icon) {\n <gov-icon\n [name]=\"icons.chevronDown\"\n />\n } @if (title) {\n <h2 slot=\"label\">{{ title | translate }}</h2>\n } @if (badge) {\n <gov-badge \n inverse=\"true\"\n size=\"s\"\n [slot]=\"badgeSlot\"\n >\n {{ badge }}\n </gov-badge>\n } @if (annotation) {\n <p slot=\"annotation\">{{ annotation | translate }}</p>\n }\n <ng-content></ng-content>\n </gov-accordion-item>\n</gov-accordion>", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovAccordion, selector: "gov-accordion", inputs: ["noBorder", "size"] }, { kind: "component", type: i2.GovAccordionItem, selector: "gov-accordion-item", inputs: ["disabled", "identifier", "open", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3149
+ }
3150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SectionComponent, decorators: [{
3151
+ type: Component,
3152
+ args: [{ selector: 'v-section', imports: [
3153
+ GovDesignSystemModule,
3154
+ GovSizePipe,
3155
+ TranslateModule
3156
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3157
+ {
3158
+ provide: SECTION_COMPONENT_TOKEN,
3159
+ useExisting: SectionComponent,
3160
+ },
3161
+ ], schemas: [
3162
+ NO_ERRORS_SCHEMA
3163
+ ], template: "<gov-accordion>\n <gov-accordion-item \n [size]=\"size | govSize\"\n [identifier]=\"identifier\"\n [open]=\"open\"\n >\n @if (icon) {\n <gov-icon\n [name]=\"icons.chevronDown\"\n />\n } @if (title) {\n <h2 slot=\"label\">{{ title | translate }}</h2>\n } @if (badge) {\n <gov-badge \n inverse=\"true\"\n size=\"s\"\n [slot]=\"badgeSlot\"\n >\n {{ badge }}\n </gov-badge>\n } @if (annotation) {\n <p slot=\"annotation\">{{ annotation | translate }}</p>\n }\n <ng-content></ng-content>\n </gov-accordion-item>\n</gov-accordion>" }]
3164
+ }], propDecorators: { title: [{
3165
+ type: Input
3166
+ }], badge: [{
3167
+ type: Input
3168
+ }], showContent: [{
3169
+ type: Input
3170
+ }], backgroundColor: [{
3171
+ type: Input
3172
+ }], annotation: [{
3173
+ type: Input
3174
+ }], identifier: [{
3175
+ type: Input
3176
+ }], icon: [{
3177
+ type: Input
3178
+ }], iconType: [{
3179
+ type: Input
3180
+ }], size: [{
3181
+ type: Input
3182
+ }], badgeSlot: [{
3183
+ type: Input
3184
+ }], open: [{
3185
+ type: Input
3186
+ }] } });
3187
+
3188
+ class SideMenuComponent {
3189
+ menuService = inject(SideMenuService);
3190
+ items = [];
3191
+ logoUrl = '';
3192
+ userName;
3193
+ userRole;
3194
+ minimalized = new EventEmitter();
3195
+ itemSelected = new EventEmitter();
3196
+ icons = Icons;
3197
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3198
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: SideMenuComponent, isStandalone: true, selector: "v-side-menu", inputs: { items: "items", logoUrl: "logoUrl", userName: "userName", userRole: "userRole" }, outputs: { minimalized: "minimalized", itemSelected: "itemSelected" }, providers: [
3199
+ {
3200
+ provide: SIDE_MENU_COMPONENT_TOKEN,
3201
+ useExisting: SideMenuComponent,
3202
+ },
3203
+ ], ngImport: i0, template: "<div class=\"v-side-menu\">\n <div class=\"gov-category-list__col gov-category-list__categories\">\n <div class=\"gov-category-list__col-inner\">\n <ul class=\"main-nav gov-list--plain gov-category-list__nav\">\n @for (item of items; track item) {\n @for (child of item.children; track child) {\n <li class=\"gov-category-list__nav\">\n <a class=\"gov-category-list__nav-link p-2 d-flex align-items-center\" [routerLink]=\"child.url\"\n routerLinkActive=\"is-active\" title=\"{{child.label}}\">\n <p class=\"gov-text--body-s\">{{child.label}}\n @if (child.children) {\n <gov-icon [name]=\"icons.chevronDown\" />\n }\n </p>\n </a>\n </li>\n }\n }\n </ul>\n </div>\n </div>\n</div>", styles: [".v-side-menu a:hover{background-color:var(--background-primary-subtle);text-decoration:underline}.v-side-menu a.is-active{background-color:var(--background-primary);color:var(--text-white)}.v-side-menu a.is-active>*{color:var(--text-white)}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }], encapsulation: i0.ViewEncapsulation.None });
3204
+ }
3205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuComponent, decorators: [{
3206
+ type: Component,
3207
+ args: [{ selector: 'v-side-menu', imports: [RouterModule, GovDesignSystemModule], providers: [
3208
+ {
3209
+ provide: SIDE_MENU_COMPONENT_TOKEN,
3210
+ useExisting: SideMenuComponent,
3211
+ },
3212
+ ], encapsulation: ViewEncapsulation.None, template: "<div class=\"v-side-menu\">\n <div class=\"gov-category-list__col gov-category-list__categories\">\n <div class=\"gov-category-list__col-inner\">\n <ul class=\"main-nav gov-list--plain gov-category-list__nav\">\n @for (item of items; track item) {\n @for (child of item.children; track child) {\n <li class=\"gov-category-list__nav\">\n <a class=\"gov-category-list__nav-link p-2 d-flex align-items-center\" [routerLink]=\"child.url\"\n routerLinkActive=\"is-active\" title=\"{{child.label}}\">\n <p class=\"gov-text--body-s\">{{child.label}}\n @if (child.children) {\n <gov-icon [name]=\"icons.chevronDown\" />\n }\n </p>\n </a>\n </li>\n }\n }\n </ul>\n </div>\n </div>\n</div>", styles: [".v-side-menu a:hover{background-color:var(--background-primary-subtle);text-decoration:underline}.v-side-menu a.is-active{background-color:var(--background-primary);color:var(--text-white)}.v-side-menu a.is-active>*{color:var(--text-white)}\n"] }]
3213
+ }], propDecorators: { items: [{
3214
+ type: Input
3215
+ }], logoUrl: [{
3216
+ type: Input
3217
+ }], userName: [{
3218
+ type: Input
3219
+ }], userRole: [{
3220
+ type: Input
3221
+ }], minimalized: [{
3222
+ type: Output
3223
+ }], itemSelected: [{
3224
+ type: Output
3225
+ }] } });
3226
+
3227
+ class SideMenuModule extends UnsubscribeComponent {
3228
+ service;
3229
+ constructor(service) {
3230
+ super();
3231
+ this.service = service;
3232
+ }
3233
+ static forRoot(config) {
3234
+ const moduleWithProvider = {
3235
+ ngModule: SideMenuModule,
3236
+ };
3237
+ if (config?.items) {
3238
+ moduleWithProvider.providers = [
3239
+ {
3240
+ provide: MENU_TOKEN,
3241
+ useValue: config.items,
3242
+ },
3243
+ ];
3244
+ }
3245
+ return moduleWithProvider;
3246
+ }
3247
+ static forChild(menu) {
3248
+ return {
3249
+ ngModule: SideMenuModule,
3250
+ providers: [
3251
+ {
3252
+ provide: MENU_TOKEN,
3253
+ useValue: menu,
3254
+ },
3255
+ ],
3256
+ };
3257
+ }
3258
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, deps: [{ token: i1$3.SideMenuProviderService }], target: i0.ɵɵFactoryTarget.NgModule });
3259
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule });
3260
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, providers: [
3261
+ SideMenuProviderService,
3262
+ {
3263
+ provide: SIDE_MENU_COMPONENT_TOKEN,
3264
+ useExisting: SideMenuComponent,
3265
+ }
3266
+ ] });
3267
+ }
3268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, decorators: [{
3269
+ type: NgModule,
3270
+ args: [{
3271
+ providers: [
3272
+ SideMenuProviderService,
3273
+ {
3274
+ provide: SIDE_MENU_COMPONENT_TOKEN,
3275
+ useExisting: SideMenuComponent,
3276
+ }
3277
+ ],
3278
+ }]
3279
+ }], ctorParameters: () => [{ type: i1$3.SideMenuProviderService }] });
3280
+
3281
+ class SnackbarComponent {
3282
+ config;
3283
+ message;
3284
+ icon;
3285
+ closeLabel;
3286
+ color = "primary";
3287
+ gravity = "top";
3288
+ position = "right";
3289
+ time = 4000;
3290
+ type = "subtle";
3291
+ icons = Icons;
3292
+ constructor(config) {
3293
+ this.config = config;
3294
+ }
3295
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarComponent, deps: [{ token: 'TOAST_CONFIG', optional: true }], target: i0.ɵɵFactoryTarget.Component });
3296
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: SnackbarComponent, isStandalone: true, selector: "v-snackbar", inputs: { message: "message", icon: "icon", closeLabel: "closeLabel", color: "color", gravity: "gravity", position: "position", time: "time", type: "type" }, providers: [
3297
+ {
3298
+ provide: SNACKBAR_COMPONENT_TOKEN,
3299
+ useExisting: SnackbarComponent,
3300
+ },
3301
+ ], ngImport: i0, template: "<gov-toast\n [closeLabel]=\"config.closeLabel ?? closeLabel\"\n [color]=\"config.color || color\"\n [gravity]=\"config.gravity || gravity\"\n [position]=\"config.position || position\"\n [time]=\"config.time ?? time\"\n [type]=\"config.type || type\"\n>\n @if (config.icon || icon) {\n <gov-icon\n [name]=\"config.icon || icon\"\n />\n } {{ config.message || message }}\n</gov-toast>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: i2.GovToast, selector: "gov-toast", inputs: ["accessibleCloseLabel", "closeLabel", "color", "gravity", "position", "time", "type"] }] });
3302
+ }
3303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarComponent, decorators: [{
3304
+ type: Component,
3305
+ args: [{ selector: 'v-snackbar', imports: [GovDesignSystemModule], providers: [
3306
+ {
3307
+ provide: SNACKBAR_COMPONENT_TOKEN,
3308
+ useExisting: SnackbarComponent,
3309
+ },
3310
+ ], template: "<gov-toast\n [closeLabel]=\"config.closeLabel ?? closeLabel\"\n [color]=\"config.color || color\"\n [gravity]=\"config.gravity || gravity\"\n [position]=\"config.position || position\"\n [time]=\"config.time ?? time\"\n [type]=\"config.type || type\"\n>\n @if (config.icon || icon) {\n <gov-icon\n [name]=\"config.icon || icon\"\n />\n } {{ config.message || message }}\n</gov-toast>\n" }]
3311
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
3312
+ type: Optional
3313
+ }, {
3314
+ type: Inject,
3315
+ args: ['TOAST_CONFIG']
3316
+ }] }], propDecorators: { message: [{
3317
+ type: Input,
3318
+ args: [{ required: true }]
3319
+ }], icon: [{
3320
+ type: Input
3321
+ }], closeLabel: [{
3322
+ type: Input
3323
+ }], color: [{
3324
+ type: Input
3325
+ }], gravity: [{
3326
+ type: Input
3327
+ }], position: [{
3328
+ type: Input
3329
+ }], time: [{
3330
+ type: Input
3331
+ }], type: [{
3332
+ type: Input
3333
+ }] } });
3334
+
3335
+ class SnackbarService {
3336
+ overlay;
3337
+ translate;
3338
+ injector;
3339
+ constructor(overlay, translate, injector) {
3340
+ this.overlay = overlay;
3341
+ this.translate = translate;
3342
+ this.injector = injector;
3343
+ }
3344
+ showSuccess(message, icon) {
3345
+ this.showToast({
3346
+ message: this.translate.instant(message),
3347
+ icon: icon,
3348
+ color: 'success',
3349
+ });
3350
+ }
3351
+ showInfo(message, icon) {
3352
+ this.showToast({
3353
+ message: this.translate.instant(message),
3354
+ icon: icon,
3355
+ color: 'primary',
3356
+ });
3357
+ }
3358
+ showWarn(message, icon) {
3359
+ this.showToast({
3360
+ message: this.translate.instant(message),
3361
+ icon: icon,
3362
+ color: 'warning',
3363
+ });
3364
+ }
3365
+ showError(message, icon) {
3366
+ this.showToast({
3367
+ message: this.translate.instant(message),
3368
+ icon: icon,
3369
+ color: 'error',
3370
+ });
3371
+ }
3372
+ showToast(config) {
3373
+ const positionStrategy = this.overlay
3374
+ .position()
3375
+ .global();
3376
+ const overlayRef = this.overlay.create({
3377
+ positionStrategy,
3378
+ hasBackdrop: false,
3379
+ scrollStrategy: this.overlay.scrollStrategies.noop(),
3380
+ });
3381
+ const toastPortal = new portal.ComponentPortal(SnackbarComponent, null, this.createInjector(config));
3382
+ overlayRef.attach(toastPortal);
3383
+ }
3384
+ createInjector(config) {
3385
+ return Injector.create({
3386
+ providers: [
3387
+ { provide: 'TOAST_CONFIG', useValue: config },
3388
+ ],
3389
+ parent: this.injector,
3390
+ });
3391
+ }
3392
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarService, deps: [{ token: i1$4.Overlay }, { token: i3.TranslateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
3393
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarService, providedIn: 'root' });
3394
+ }
3395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarService, decorators: [{
3396
+ type: Injectable,
3397
+ args: [{
3398
+ providedIn: 'root',
3399
+ }]
3400
+ }], ctorParameters: () => [{ type: i1$4.Overlay }, { type: i3.TranslateService }, { type: i0.Injector }] });
3401
+
3402
+ class StepperComponent {
3403
+ items = [];
3404
+ size = FieldSize.medium;
3405
+ icon;
3406
+ prefix;
3407
+ annotation;
3408
+ label;
3409
+ layout = LayoutType.horizontal;
3410
+ activeIndexChange = new EventEmitter();
3411
+ steps = 0;
3412
+ currentStep = 0;
3413
+ ngOnInit() {
3414
+ this.steps = this.items.length;
3415
+ }
3416
+ previousStep() {
3417
+ if (this.currentStep > 0) {
3418
+ this.currentStep--;
3419
+ }
3420
+ }
3421
+ nextStep() {
3422
+ if (this.currentStep < this.items.length - 1) {
3423
+ this.currentStep++;
3424
+ }
3425
+ }
3426
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3427
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: StepperComponent, isStandalone: true, selector: "v-stepper", inputs: { items: "items", size: "size", icon: "icon", prefix: "prefix", annotation: "annotation", label: "label", layout: "layout" }, outputs: { activeIndexChange: "activeIndexChange" }, providers: [
3428
+ { provide: STEPPER_COMPONENT_TOKEN, useExisting: StepperComponent },
3429
+ ], ngImport: i0, template: "<gov-stepper \n [ngClass]=\"layout === 'vertical' ? 'd-block' : 'd-flex justify-content-between'\"\n [size]=\"size | govSize\"\n>\n @for (item of items; track item; let index = $index) {\n <gov-stepper-item\n [ngClass]=\"{ 'active-step': index === currentStep }\"\n >\n <span \n slot=\"prefix\"\n [ngStyle]=\"{ 'background-color': index === currentStep ? 'var(--color-primary-300)' : 'var(--color-primary-600)' }\"\n >\n {{ item.prefix }}\n </span>\n <p slot=\"headline\">{{ item.header }}</p>\n <p slot=\"annotation\">{{ item.annotation }}</p>\n </gov-stepper-item>\n }\n</gov-stepper>\n<div class=\"d-flex pt-4 justify-content-between\">\n @if (currentStep > 0) {\n <v-button\n [label]=\"'Back'\"\n [size]=\"size\"\n (click)=\"previousStep()\"\n />\n }\n @if (currentStep < steps - 1) {\n <v-button\n [label]=\"'Next'\"\n [size]=\"size\"\n (click)=\"nextStep()\"\n />\n }\n</div>", styles: ["gov-stepper-item,.gov-stepper-item{width:auto!important}.active-step{background-color:var(--color-primary-300);border:1px solid var(--color-primary-600);border-radius:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovStepper, selector: "gov-stepper", inputs: ["size"] }, { kind: "component", type: i2.GovStepperItem, selector: "gov-stepper-item", inputs: ["color", "identifier", "size"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3430
+ }
3431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StepperComponent, decorators: [{
3432
+ type: Component,
3433
+ args: [{ selector: 'v-stepper', imports: [
3434
+ CommonModule,
3435
+ ButtonComponent,
3436
+ GovDesignSystemModule,
3437
+ GovSizePipe,
3438
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3439
+ { provide: STEPPER_COMPONENT_TOKEN, useExisting: StepperComponent },
3440
+ ], template: "<gov-stepper \n [ngClass]=\"layout === 'vertical' ? 'd-block' : 'd-flex justify-content-between'\"\n [size]=\"size | govSize\"\n>\n @for (item of items; track item; let index = $index) {\n <gov-stepper-item\n [ngClass]=\"{ 'active-step': index === currentStep }\"\n >\n <span \n slot=\"prefix\"\n [ngStyle]=\"{ 'background-color': index === currentStep ? 'var(--color-primary-300)' : 'var(--color-primary-600)' }\"\n >\n {{ item.prefix }}\n </span>\n <p slot=\"headline\">{{ item.header }}</p>\n <p slot=\"annotation\">{{ item.annotation }}</p>\n </gov-stepper-item>\n }\n</gov-stepper>\n<div class=\"d-flex pt-4 justify-content-between\">\n @if (currentStep > 0) {\n <v-button\n [label]=\"'Back'\"\n [size]=\"size\"\n (click)=\"previousStep()\"\n />\n }\n @if (currentStep < steps - 1) {\n <v-button\n [label]=\"'Next'\"\n [size]=\"size\"\n (click)=\"nextStep()\"\n />\n }\n</div>", styles: ["gov-stepper-item,.gov-stepper-item{width:auto!important}.active-step{background-color:var(--color-primary-300);border:1px solid var(--color-primary-600);border-radius:.5rem}\n"] }]
3441
+ }], propDecorators: { items: [{
3442
+ type: Input
3443
+ }], size: [{
3444
+ type: Input
3445
+ }], icon: [{
3446
+ type: Input
3447
+ }], prefix: [{
3448
+ type: Input
3449
+ }], annotation: [{
3450
+ type: Input
3451
+ }], label: [{
3452
+ type: Input
3453
+ }], layout: [{
3454
+ type: Input
3455
+ }], activeIndexChange: [{
3456
+ type: Output
3457
+ }] } });
3458
+
3459
+ class SwitchComponent extends BaseFormInputComponent {
3460
+ size = FieldSize.medium;
3461
+ noLabel = false;
3462
+ name;
3463
+ icons = Icons;
3464
+ constructor(ngControl) {
3465
+ super(ngControl);
3466
+ }
3467
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SwitchComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
3468
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: SwitchComponent, isStandalone: true, selector: "v-switch", inputs: { size: "size", noLabel: "noLabel", name: "name" }, providers: [{
3469
+ provide: SWITCH_COMPONENT_TOKEN,
3470
+ useExisting: SwitchComponent,
3471
+ }], usesInheritance: true, ngImport: i0, template: "<gov-form-control>\n <gov-form-switch\n [formControl]=\"formControl\"\n [size]=\"size | govSize\"\n [required]=\"required\"\n [name]=\"name\"\n [invalid]=\"ngControl?.errors\"\n >\n @if (label && !noLabel) {\n <gov-form-label [size]=\"size\" slot=\"label\">\n {{ label }}\n </gov-form-label>\n }\n </gov-form-switch>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormSwitch, selector: "gov-form-switch", inputs: ["checked", "disabled", "identifier", "invalid", "name", "noLabel", "required", "size", "value"] }, { kind: "directive", type: i2.BooleanValueAccessor, selector: "gov-form-checkbox,gov-form-switch" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "pipe", type: GovSizePipe, name: "govSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3472
+ }
3473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SwitchComponent, decorators: [{
3474
+ type: Component,
3475
+ args: [{ selector: "v-switch", imports: [
3476
+ GovDesignSystemModule,
3477
+ ReactiveFormsModule,
3478
+ GovSizePipe,
3479
+ ErrorComponent
3480
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
3481
+ provide: SWITCH_COMPONENT_TOKEN,
3482
+ useExisting: SwitchComponent,
3483
+ }], template: "<gov-form-control>\n <gov-form-switch\n [formControl]=\"formControl\"\n [size]=\"size | govSize\"\n [required]=\"required\"\n [name]=\"name\"\n [invalid]=\"ngControl?.errors\"\n >\n @if (label && !noLabel) {\n <gov-form-label [size]=\"size\" slot=\"label\">\n {{ label }}\n </gov-form-label>\n }\n </gov-form-switch>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n</gov-form-control>\n" }]
3484
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
3485
+ type: Optional
3486
+ }, {
3487
+ type: Self
3488
+ }] }], propDecorators: { size: [{
3489
+ type: Input
3490
+ }], noLabel: [{
3491
+ type: Input
3492
+ }], name: [{
3493
+ type: Input
3494
+ }] } });
3495
+
3496
+ class TabViewItemComponent {
3497
+ id;
3498
+ index;
3499
+ disabled = false;
3500
+ title;
3501
+ content;
3502
+ url;
3503
+ contentTemplate;
3504
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3505
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: TabViewItemComponent, isStandalone: true, selector: "v-tab-view-item", inputs: { id: "id", index: "index", disabled: "disabled", title: "title", content: "content", url: "url" }, viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], ngImport: i0, template: `<ng-template #contentTemplate>
3506
+ <ng-content></ng-content>
3507
+ </ng-template>`, isInline: true });
3508
+ }
3509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewItemComponent, decorators: [{
3510
+ type: Component,
3511
+ args: [{
3512
+ selector: 'v-tab-view-item',
3513
+ template: `<ng-template #contentTemplate>
3514
+ <ng-content></ng-content>
3515
+ </ng-template>`
3516
+ }]
3517
+ }], propDecorators: { id: [{
3518
+ type: Input
3519
+ }], index: [{
3520
+ type: Input
3521
+ }], disabled: [{
3522
+ type: Input
3523
+ }], title: [{
3524
+ type: Input
3525
+ }], content: [{
3526
+ type: Input
3527
+ }], url: [{
3528
+ type: Input
3529
+ }], contentTemplate: [{
3530
+ type: ViewChild,
3531
+ args: ['contentTemplate', { static: true }]
3532
+ }] } });
3533
+
3534
+ class TabViewComponent {
3535
+ tabs;
3536
+ highlight = false;
3537
+ useRouting = false;
3538
+ items = [];
3539
+ activeIndex = 0;
3540
+ activeIndexChange = new EventEmitter();
3541
+ cd = inject(ChangeDetectorRef);
3542
+ ngAfterContentInit() {
3543
+ this.initTabs();
3544
+ }
3545
+ initTabs() {
3546
+ this.items = [...this.tabs.toArray(), ...this.items];
3547
+ this.cd.detectChanges();
3548
+ }
3549
+ changeTabIndex(index) {
3550
+ if (this.activeIndex !== index) {
3551
+ this.activeIndex = index;
3552
+ this.activeIndexChange.emit(this.activeIndex);
3553
+ }
3554
+ this.activeIndexChange.emit(index);
3555
+ this.cd.detectChanges();
3556
+ }
3557
+ setTabActive(options) {
3558
+ options.forEach((_, index) => {
3559
+ index === this.activeIndex;
3560
+ });
3561
+ this.cd.detectChanges();
3562
+ }
3563
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3564
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TabViewComponent, isStandalone: true, selector: "v-tab-view", inputs: { highlight: "highlight", useRouting: "useRouting", items: "items", activeIndex: "activeIndex" }, outputs: { activeIndexChange: "activeIndexChange" }, queries: [{ propertyName: "tabs", predicate: TabViewItemComponent }], ngImport: i0, template: "<div class=\"gov-tabs\">\n <div class=\"gov-tabs__tabs\" role=\"tablist\">\n @for (item of items; track item; let index = $index) {\n @if (useRouting) {\n <button\n [attr.index]=\"index\"\n class=\"gov-tabs__btn\"\n [routerLink]=\"item.url\"\n [routerLinkActive]=\"'active'\"\n #rls=\"routerLinkActive\"\n [attr.aria-selected]=\"rls.isActive\"\n [disabled]=\"item.disabled\"\n role=\"tab\"\n [attr.activeIndex]=\"activeIndex\"\n (click)=\"changeTabIndex(index)\"\n >\n {{ item.title | translate }}\n </button>\n } @else {\n <button\n [attr.index]=\"index\"\n class=\"gov-tabs__btn\"\n [attr.aria-selected]=\"activeIndex === index\"\n [disabled]=\"item.disabled\"\n role=\"tab\"\n [attr.activeIndex]=\"activeIndex\"\n (click)=\"changeTabIndex(index)\"\n >\n {{ item.title | translate }}\n </button>}\n }\n </div>\n <div class=\"gov-tabs__tabs\">\n @for (item of items; track item; let index = $index) {\n <div class=\"gov-tabs__tab\" [class.active]=\"activeIndex === index\" >\n <div class=\"gov-tabs__list\">\n <div class=\"gov-tabs__content\">\n @if (item.contentTemplate) {\n <ng-container *ngTemplateOutlet=\"item.contentTemplate\"></ng-container>\n } @else if (item.content) {\n {{ item.content }}\n }\n </div>\n </div>\n </div>\n }\n @if (useRouting) {\n <router-outlet class=\"gov-tabs__content\"></router-outlet>\n }\n </div>\n</div>", styles: [".gov-tabs__tabs{position:relative;width:100%;margin-bottom:0%;overflow-x:clip}.gov-tabs__tab{display:none;opacity:0;transform:translateY(10px);transition:opacity .3s ease,transform .3s ease}.gov-tabs__tab.active{display:block;opacity:1;transform:translateY(0)}.gov-tabs__btn{font-size:medium;padding:10px 20px;border:none;border-bottom:2px solid transparent;font-weight:700}.gov-tabs__btn[aria-selected=true]:after{display:block;width:100%;height:2px;background-color:var(--border-primary);position:absolute;bottom:-2px;left:0}.gov-tabs__content{margin-top:var(--spacing-m-nudge);flex-wrap:wrap;width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
3565
+ }
3566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewComponent, decorators: [{
3567
+ type: Component,
3568
+ args: [{ selector: 'v-tab-view', imports: [NgTemplateOutlet, RouterOutlet, RouterLink, RouterLinkActive, TranslatePipe], encapsulation: ViewEncapsulation.None, template: "<div class=\"gov-tabs\">\n <div class=\"gov-tabs__tabs\" role=\"tablist\">\n @for (item of items; track item; let index = $index) {\n @if (useRouting) {\n <button\n [attr.index]=\"index\"\n class=\"gov-tabs__btn\"\n [routerLink]=\"item.url\"\n [routerLinkActive]=\"'active'\"\n #rls=\"routerLinkActive\"\n [attr.aria-selected]=\"rls.isActive\"\n [disabled]=\"item.disabled\"\n role=\"tab\"\n [attr.activeIndex]=\"activeIndex\"\n (click)=\"changeTabIndex(index)\"\n >\n {{ item.title | translate }}\n </button>\n } @else {\n <button\n [attr.index]=\"index\"\n class=\"gov-tabs__btn\"\n [attr.aria-selected]=\"activeIndex === index\"\n [disabled]=\"item.disabled\"\n role=\"tab\"\n [attr.activeIndex]=\"activeIndex\"\n (click)=\"changeTabIndex(index)\"\n >\n {{ item.title | translate }}\n </button>}\n }\n </div>\n <div class=\"gov-tabs__tabs\">\n @for (item of items; track item; let index = $index) {\n <div class=\"gov-tabs__tab\" [class.active]=\"activeIndex === index\" >\n <div class=\"gov-tabs__list\">\n <div class=\"gov-tabs__content\">\n @if (item.contentTemplate) {\n <ng-container *ngTemplateOutlet=\"item.contentTemplate\"></ng-container>\n } @else if (item.content) {\n {{ item.content }}\n }\n </div>\n </div>\n </div>\n }\n @if (useRouting) {\n <router-outlet class=\"gov-tabs__content\"></router-outlet>\n }\n </div>\n</div>", styles: [".gov-tabs__tabs{position:relative;width:100%;margin-bottom:0%;overflow-x:clip}.gov-tabs__tab{display:none;opacity:0;transform:translateY(10px);transition:opacity .3s ease,transform .3s ease}.gov-tabs__tab.active{display:block;opacity:1;transform:translateY(0)}.gov-tabs__btn{font-size:medium;padding:10px 20px;border:none;border-bottom:2px solid transparent;font-weight:700}.gov-tabs__btn[aria-selected=true]:after{display:block;width:100%;height:2px;background-color:var(--border-primary);position:absolute;bottom:-2px;left:0}.gov-tabs__content{margin-top:var(--spacing-m-nudge);flex-wrap:wrap;width:100%}\n"] }]
3569
+ }], propDecorators: { tabs: [{
3570
+ type: ContentChildren,
3571
+ args: [TabViewItemComponent]
3572
+ }], highlight: [{
3573
+ type: Input
3574
+ }], useRouting: [{
3575
+ type: Input
3576
+ }], items: [{
3577
+ type: Input
3578
+ }], activeIndex: [{
3579
+ type: Input
3580
+ }], activeIndexChange: [{
3581
+ type: Output
3582
+ }] } });
3583
+
3584
+ var GovTagType;
3585
+ (function (GovTagType) {
3586
+ GovTagType["bold"] = "bold";
3587
+ GovTagType["subtle"] = "subtle";
3588
+ })(GovTagType || (GovTagType = {}));
3589
+
3590
+ class TagComponent {
3591
+ label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
3592
+ severity = input(ControlSeverity.primary, ...(ngDevMode ? [{ debugName: "severity" }] : []));
3593
+ variant = input(GovTagType.bold, ...(ngDevMode ? [{ debugName: "variant" }] : []));
3594
+ size = input(FieldSize.medium, ...(ngDevMode ? [{ debugName: "size" }] : []));
3595
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3596
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TagComponent, isStandalone: true, selector: "v-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
3597
+ {
3598
+ provide: TAG_COMPONENT_TOKEN,
3599
+ useExisting: TagComponent,
3600
+ }
3601
+ ], ngImport: i0, template: "<gov-tag\n [color]=\"severity() | govColor\"\n [type]=\"variant()\"\n [size]=\"size() | govSize\"\n>\n @if (label()) {\n {{ label() | translate }}\n } @else {\n <ng-content></ng-content>\n }\n</gov-tag>\n\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovTag, selector: "gov-tag", inputs: ["color", "expanded", "iconEnd", "iconStart", "size", "type"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: GovColorPipe, name: "govColor" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3602
+ }
3603
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TagComponent, decorators: [{
3604
+ type: Component,
3605
+ args: [{ selector: "v-tag", imports: [
3606
+ GovDesignSystemModule,
3607
+ GovSizePipe,
3608
+ GovColorPipe,
3609
+ TranslateModule
3610
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3611
+ {
3612
+ provide: TAG_COMPONENT_TOKEN,
3613
+ useExisting: TagComponent,
3614
+ }
3615
+ ], template: "<gov-tag\n [color]=\"severity() | govColor\"\n [type]=\"variant()\"\n [size]=\"size() | govSize\"\n>\n @if (label()) {\n {{ label() | translate }}\n } @else {\n <ng-content></ng-content>\n }\n</gov-tag>\n\n", styles: [":host{display:inline-block}\n"] }]
3616
+ }] });
3617
+
3618
+ class TextareaComponent extends BaseFormInputComponent {
3619
+ floatLabel;
3620
+ type = FieldType.text;
3621
+ minlength = 0;
3622
+ maxlength = 524288;
3623
+ prefix;
3624
+ sufix;
3625
+ message;
3626
+ name;
3627
+ role;
3628
+ size = FieldSize.medium;
3629
+ icon;
3630
+ iconPos = IconPosition.right;
3631
+ labelSlot = SlotPosition.top;
3632
+ messageSlot = SlotPosition.bottom;
3633
+ rows = 0;
3634
+ cols = 0;
3635
+ autoResize = false;
3636
+ icons = Icons;
3637
+ constructor(ngControl) {
3638
+ super(ngControl);
3639
+ }
3640
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextareaComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
3641
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TextareaComponent, isStandalone: true, selector: "v-textarea", inputs: { floatLabel: "floatLabel", type: "type", minlength: "minlength", maxlength: "maxlength", prefix: "prefix", sufix: "sufix", message: "message", name: "name", role: "role", size: "size", icon: "icon", iconPos: "iconPos", labelSlot: "labelSlot", messageSlot: "messageSlot", rows: "rows", cols: "cols", autoResize: "autoResize" }, providers: [
3642
+ {
3643
+ provide: TEXTAREA_COMPONENT_TOKEN,
3644
+ useExisting: TextareaComponent,
3645
+ },
3646
+ ], usesInheritance: true, ngImport: i0, template: "<gov-form-control class=\"mb-3\">\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label | translate }}\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input [type]=\"type\"\n [formControl]=\"formControl\"\n [minlength]=\"minlength\" \n [maxlength]=\"maxlength\" \n [size]='size | govSize' \n [name]='name' \n [role]='role'\n [required]=\"required\"\n [readonly]=\"readonly\"\n [invalid]=\"ngControl?.errors ? true : false\"\n [multiline]=\"true\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n @if (icon) {\n <gov-icon\n [name]=\"icon\"\n [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\"\n />\n } @if (prefix) {\n <p slot=\"prefix\">\n {{ prefix }}\n </p>\n } @if (sufix) {\n <p slot=\"sufix\">\n {{ sufix }}\n </p>\n }\n </gov-form-input>\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message | translate }}\n </gov-form-message>\n }\n</gov-form-control>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovFormControl, selector: "gov-form-control", inputs: ["disabled", "fieldset", "identifier", "invalid", "size", "success"] }, { kind: "component", type: i2.GovFormGroup, selector: "gov-form-group", inputs: ["gap", "orientation"] }, { kind: "component", type: i2.GovFormInput, selector: "gov-form-input", inputs: ["accessibleHidePasswordLabel", "accessibleShowPasswordLabel", "autocomplete", "autocorrect", "cols", "disabled", "identifier", "inputLang", "inputType", "invalid", "max", "maxlength", "min", "minlength", "multiline", "name", "placeholder", "readonly", "required", "role", "rows", "size", "spellcheck", "success", "type", "value"] }, { kind: "component", type: i2.GovFormLabel, selector: "gov-form-label", inputs: ["identifier", "legend", "required", "size"] }, { kind: "component", type: i2.GovFormMessage, selector: "gov-form-message", inputs: ["color", "size"] }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "gov-form-input:not([input-type=number]),gov-form-autocomplete" }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: GovSizePipe, name: "govSize" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3647
+ }
3648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextareaComponent, decorators: [{
3649
+ type: Component,
3650
+ args: [{ selector: 'v-textarea', imports: [
3651
+ ReactiveFormsModule,
3652
+ GovDesignSystemModule,
3653
+ GovSizePipe,
3654
+ ErrorComponent,
3655
+ TranslateModule
3656
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3657
+ {
3658
+ provide: TEXTAREA_COMPONENT_TOKEN,
3659
+ useExisting: TextareaComponent,
3660
+ },
3661
+ ], template: "<gov-form-control class=\"mb-3\">\n @if (label) {\n <gov-form-label \n [slot]=\"labelSlot\"\n [size]=\"size | govSize\"\n >\n {{ label | translate }}\n </gov-form-label>\n }\n <gov-form-group>\n <gov-form-input [type]=\"type\"\n [formControl]=\"formControl\"\n [minlength]=\"minlength\" \n [maxlength]=\"maxlength\" \n [size]='size | govSize' \n [name]='name' \n [role]='role'\n [required]=\"required\"\n [readonly]=\"readonly\"\n [invalid]=\"ngControl?.errors ? true : false\"\n [multiline]=\"true\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n @if (icon) {\n <gov-icon\n [name]=\"icon\"\n [slot]=\"iconPos === 'left' ? 'icon-start' : 'icon-end'\"\n />\n } @if (prefix) {\n <p slot=\"prefix\">\n {{ prefix }}\n </p>\n } @if (sufix) {\n <p slot=\"sufix\">\n {{ sufix }}\n </p>\n }\n </gov-form-input>\n </gov-form-group>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n @if (message) {\n <gov-form-message \n [slot]=\"messageSlot\" \n color=\"neutral\"\n >\n {{ message | translate }}\n </gov-form-message>\n }\n</gov-form-control>\n" }]
3662
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
3663
+ type: Optional
3664
+ }, {
3665
+ type: Self
3666
+ }] }], propDecorators: { floatLabel: [{
3667
+ type: Input
3668
+ }], type: [{
3669
+ type: Input
3670
+ }], minlength: [{
3671
+ type: Input
3672
+ }], maxlength: [{
3673
+ type: Input
3674
+ }], prefix: [{
3675
+ type: Input
3676
+ }], sufix: [{
3677
+ type: Input
3678
+ }], message: [{
3679
+ type: Input
3680
+ }], name: [{
3681
+ type: Input
3682
+ }], role: [{
3683
+ type: Input
3684
+ }], size: [{
3685
+ type: Input
3686
+ }], icon: [{
3687
+ type: Input
3688
+ }], iconPos: [{
3689
+ type: Input
3690
+ }], labelSlot: [{
3691
+ type: Input
3692
+ }], messageSlot: [{
3693
+ type: Input
3694
+ }], rows: [{
3695
+ type: Input
3696
+ }], cols: [{
3697
+ type: Input
3698
+ }], autoResize: [{
3699
+ type: Input
3700
+ }] } });
3701
+
3702
+ class GovInitService {
3703
+ constructor() {
3704
+ defineCustomElements(window);
3705
+ }
3706
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovInitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3707
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovInitService, providedIn: 'root' });
3708
+ }
3709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GovInitService, decorators: [{
3710
+ type: Injectable,
3711
+ args: [{
3712
+ providedIn: 'root',
3713
+ }]
3714
+ }], ctorParameters: () => [] });
3715
+
3716
+ class NotAuthenticatedComponent {
3717
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NotAuthenticatedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3718
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NotAuthenticatedComponent, isStandalone: true, selector: "v-not-authenticated", ngImport: i0, template: "<gov-error-code>\n <gov-icon type=\"complex\" name=\"card-401\" slot=\"icon\"></gov-icon>\n <p>You are not logged in, please do so.</p>\n <v-button color=\"primary\" size=\"medium\" type=\"solid\" label=\"Login\" [routerLink]=\"['/login']\" />\n</gov-error-code>\n", dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovErrorCode, selector: "gov-error-code" }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }] });
3719
+ }
3720
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NotAuthenticatedComponent, decorators: [{
3721
+ type: Component,
3722
+ args: [{ selector: 'v-not-authenticated', imports: [
3723
+ GovDesignSystemModule,
3724
+ ButtonComponent,
3725
+ ], template: "<gov-error-code>\n <gov-icon type=\"complex\" name=\"card-401\" slot=\"icon\"></gov-icon>\n <p>You are not logged in, please do so.</p>\n <v-button color=\"primary\" size=\"medium\" type=\"solid\" label=\"Login\" [routerLink]=\"['/login']\" />\n</gov-error-code>\n" }]
3726
+ }] });
3727
+
3728
+ class NotAuthorizedComponent {
3729
+ goBack() {
3730
+ history.back();
3731
+ }
3732
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NotAuthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3733
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NotAuthorizedComponent, isStandalone: true, selector: "v-not-authorized", ngImport: i0, template: "<gov-error-code>\n <gov-icon type=\"complex\" name=\"card-403\" slot=\"icon\"></gov-icon>\n <p>You are not authorized to view this content.</p>\n <v-button color=\"primary\" size=\"medium\" type=\"solid\" label=\"Go back\" (click)=\"goBack()\" />\n</gov-error-code>\n", dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovErrorCode, selector: "gov-error-code" }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }] });
3734
+ }
3735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NotAuthorizedComponent, decorators: [{
3736
+ type: Component,
3737
+ args: [{ selector: 'v-not-authorized', imports: [
3738
+ GovDesignSystemModule,
3739
+ ButtonComponent,
3740
+ ], template: "<gov-error-code>\n <gov-icon type=\"complex\" name=\"card-403\" slot=\"icon\"></gov-icon>\n <p>You are not authorized to view this content.</p>\n <v-button color=\"primary\" size=\"medium\" type=\"solid\" label=\"Go back\" (click)=\"goBack()\" />\n</gov-error-code>\n" }]
3741
+ }] });
3742
+
3743
+ class NotFoundComponent {
3744
+ goBack() {
3745
+ history.back();
3746
+ }
3747
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3748
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NotFoundComponent, isStandalone: true, selector: "v-not-found", ngImport: i0, template: "<gov-error-code>\n <gov-icon type=\"complex\" name=\"card-404\" slot=\"icon\"></gov-icon>\n <p>The item you are looking for does not exist.</p>\n <v-button color=\"primary\" size=\"medium\" type=\"solid\" label=\"Go back\" (click)=\"goBack()\" />\n</gov-error-code>\n", dependencies: [{ kind: "ngmodule", type: GovDesignSystemModule }, { kind: "component", type: i2.GovErrorCode, selector: "gov-error-code" }, { kind: "component", type: i2.GovIcon, selector: "gov-icon", inputs: ["color", "name", "size", "type"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "library", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "routerLink", "size", "queryParams", "severity", "type", "expanded", "name"], outputs: ["click"] }] });
3749
+ }
3750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NotFoundComponent, decorators: [{
3751
+ type: Component,
3752
+ args: [{ selector: 'v-not-found', imports: [
3753
+ GovDesignSystemModule,
3754
+ ButtonComponent
3755
+ ], template: "<gov-error-code>\n <gov-icon type=\"complex\" name=\"card-404\" slot=\"icon\"></gov-icon>\n <p>The item you are looking for does not exist.</p>\n <v-button color=\"primary\" size=\"medium\" type=\"solid\" label=\"Go back\" (click)=\"goBack()\" />\n</gov-error-code>\n" }]
3756
+ }] });
3757
+
3758
+ /**
3759
+ * Generated bundle index. Do not edit.
3760
+ */
3761
+
3762
+ export { ActionButtonComponent, ActionButtonGroupComponent, BreadcrumbComponent, ButtonComponent, CalendarComponent, CheckboxComponent, ConfirmDialogComponent, DropdownButtonComponent, DropdownComponent, DynamicComponent, DynamicComponentFactoryService, ErrorComponent, FEATURE_LIST_COLUMN_PROVIDER, FEATURE_LIST_PAGE_CONFIG_PROPERTY, FeatureListColumnDirective, FeatureListComponent, FeatureListFilterFieldDirective, FeatureListFilterPipe, FilterComponent, FilterFieldDirective, FormFieldComponent, GenericFieldComponent, GenericFormComponent, GovColorPipe, GovInitService, GovMultiselectOptionsPipe, GovSizePipe, GovTagType, HeaderComponent, IconComponent, Icons, InputGroupComponent, LoaderComponent, MultiselectComponent, NotAuthenticatedComponent, NotAuthorizedComponent, NotFoundComponent, NumberInputComponent, PageHeaderComponent, PasswordComponent, RadioButtonComponent, SearchComponent, SectionComponent, SideMenuComponent, SideMenuModule, SnackbarComponent, SnackbarService, StepperComponent, SwitchComponent, TabViewComponent, TabViewItemComponent, TableComponent, TagComponent, TextareaComponent, TextfieldComponent, TooltipComponent, addFeatureListPage, generateFormGroup, getColumnClass };
3763
+ //# sourceMappingURL=verisoft-ui-govcz.mjs.map