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