@bravobit/bb-foundation 0.32.1 → 0.40.0

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 (457) hide show
  1. package/auth/lib/auth.config.d.ts +5 -0
  2. package/auth/lib/auth.interceptor.d.ts +2 -2
  3. package/auth/lib/auth.module.d.ts +1 -4
  4. package/auth/lib/auth.service.d.ts +2 -2
  5. package/auth/lib/directives/authenticated.directive.d.ts +11 -4
  6. package/auth/lib/guards/anonymous.guard.d.ts +2 -15
  7. package/auth/lib/guards/authenticated.guard.d.ts +2 -15
  8. package/auth/lib/interfaces/config.interface.d.ts +2 -1
  9. package/auth/public_api.d.ts +1 -0
  10. package/collections/lib/collections.module.d.ts +12 -3
  11. package/collections/lib/components/collections-actions/collections-actions.component.d.ts +10 -0
  12. package/collections/lib/components/collections-grid/collections-grid.component.d.ts +18 -0
  13. package/collections/lib/components/collections-pager/collections-pager.component.d.ts +15 -14
  14. package/collections/lib/components/collections-table/collections-table.component.d.ts +24 -0
  15. package/collections/lib/components/collections-table-label/collections-table-label.component.d.ts +11 -0
  16. package/collections/lib/components/collections-table-sorting/collections-table-sorting.component.d.ts +18 -0
  17. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +9 -5
  18. package/collections/lib/directives/collections-data-row.directive.d.ts +14 -0
  19. package/collections/lib/directives/collections-data.directive.d.ts +14 -0
  20. package/collections/lib/directives/collections-empty.directive.d.ts +14 -0
  21. package/collections/lib/directives/collections-error.directive.d.ts +14 -0
  22. package/collections/lib/directives/collections-initial.directive.d.ts +11 -0
  23. package/collections/lib/directives/collections-item.directive.d.ts +14 -0
  24. package/collections/public_api.d.ts +11 -1
  25. package/dashboard/lib/dashboard/dashboard.component.d.ts +5 -8
  26. package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +3 -5
  27. package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +1 -1
  28. package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +4 -7
  29. package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +3 -5
  30. package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +6 -11
  31. package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +2 -2
  32. package/dashboard/lib/dashboard.module.d.ts +1 -4
  33. package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +1 -1
  34. package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +2 -2
  35. package/dialog/lib/dialog-container/dialog-container.component.d.ts +2 -2
  36. package/dialog/lib/dialog-header/dialog-header.component.d.ts +1 -1
  37. package/dialog/lib/dialog-link/dialog-link.component.d.ts +1 -1
  38. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +1 -1
  39. package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +2 -2
  40. package/dialog/lib/dialog.config.d.ts +3 -0
  41. package/dialog/lib/dialog.insertion.d.ts +1 -1
  42. package/dialog/lib/dialog.interfaces.d.ts +2 -0
  43. package/dialog/lib/dialog.module.d.ts +2 -4
  44. package/dialog/lib/directives/confirm.directive.d.ts +13 -0
  45. package/dialog/public_api.d.ts +2 -0
  46. package/elements/lib/avatar/avatar.component.d.ts +2 -1
  47. package/elements/lib/button/button.component.d.ts +12 -14
  48. package/elements/lib/checkbox/checkbox.component.d.ts +29 -22
  49. package/elements/lib/checkbox-group/checkbox-group.component.d.ts +13 -0
  50. package/elements/lib/date-picker/date-picker.component.d.ts +17 -10
  51. package/elements/lib/directives/addon.directive.d.ts +2 -2
  52. package/elements/lib/directives/extra-error-controls.directive.d.ts +13 -0
  53. package/elements/lib/directives/form-submit.directive.d.ts +1 -1
  54. package/elements/lib/directives/form-submitter.directive.d.ts +1 -1
  55. package/elements/lib/directives/image-upload.directive.d.ts +28 -0
  56. package/elements/lib/directives/input.directive.d.ts +9 -31
  57. package/elements/lib/elements.config.d.ts +84 -0
  58. package/elements/lib/elements.module.d.ts +21 -102
  59. package/elements/lib/file-picker/file-picker.component.d.ts +14 -10
  60. package/elements/lib/form-control/form-control.component.d.ts +8 -9
  61. package/elements/lib/form-error/form-error.component.d.ts +12 -9
  62. package/elements/lib/form-group/form-group.component.d.ts +4 -7
  63. package/elements/lib/icon/icon.component.d.ts +4 -4
  64. package/elements/lib/image-picker/image-picker.component.d.ts +9 -9
  65. package/elements/lib/multi-file-control/multi-file-control.component.d.ts +58 -0
  66. package/elements/lib/pipes/date.pipe.d.ts +9 -0
  67. package/elements/lib/pipes/file-image.pipe.d.ts +1 -1
  68. package/elements/lib/pipes/file-size.pipe.d.ts +1 -1
  69. package/elements/lib/pipes/relative-time.pipe.d.ts +1 -1
  70. package/elements/lib/radio-button/radio-button.component.d.ts +18 -0
  71. package/elements/lib/radio-group/radio-group.component.d.ts +38 -0
  72. package/elements/lib/spinner/spinner.component.d.ts +4 -7
  73. package/elements/public_api.d.ts +9 -3
  74. package/esm2022/auth/lib/auth.config.mjs +16 -0
  75. package/esm2022/auth/lib/auth.interceptor.mjs +10 -7
  76. package/esm2022/auth/lib/auth.module.mjs +9 -19
  77. package/esm2022/auth/lib/auth.service.mjs +22 -13
  78. package/esm2022/auth/lib/directives/authenticated.directive.mjs +45 -11
  79. package/esm2022/auth/lib/guards/anonymous.guard.mjs +27 -51
  80. package/esm2022/auth/lib/guards/authenticated.guard.mjs +30 -54
  81. package/esm2022/auth/lib/helpers/jwt.helper.mjs +2 -2
  82. package/esm2022/auth/lib/interfaces/config.interface.mjs +2 -3
  83. package/esm2022/auth/public_api.mjs +2 -1
  84. package/esm2022/collections/lib/collections.module.mjs +53 -23
  85. package/esm2022/collections/lib/components/collections-actions/collections-actions.component.mjs +39 -0
  86. package/esm2022/collections/lib/components/collections-grid/collections-grid.component.mjs +52 -0
  87. package/esm2022/collections/lib/components/collections-pager/collections-pager.component.mjs +51 -60
  88. package/esm2022/collections/lib/components/collections-table/collections-table.component.mjs +86 -0
  89. package/esm2022/collections/lib/components/collections-table-label/collections-table-label.component.mjs +33 -0
  90. package/esm2022/collections/lib/components/collections-table-sorting/collections-table-sorting.component.mjs +62 -0
  91. package/esm2022/collections/lib/components/collections-viewer/collections-viewer.component.mjs +10 -7
  92. package/esm2022/collections/lib/directives/collections-data-row.directive.mjs +26 -0
  93. package/esm2022/collections/lib/directives/collections-data.directive.mjs +26 -0
  94. package/esm2022/collections/lib/directives/collections-empty.directive.mjs +26 -0
  95. package/esm2022/collections/lib/directives/collections-error.directive.mjs +26 -0
  96. package/esm2022/collections/lib/directives/collections-initial.directive.mjs +22 -0
  97. package/esm2022/collections/lib/directives/collections-item.directive.mjs +26 -0
  98. package/esm2022/collections/public_api.mjs +12 -2
  99. package/esm2022/combobox/combobox/combobox-container.directive.mjs +3 -3
  100. package/esm2022/combobox/combobox/combobox.component.mjs +6 -6
  101. package/esm2022/combobox/combobox-label.directive.mjs +3 -3
  102. package/esm2022/combobox/combobox-option.directive.mjs +3 -3
  103. package/esm2022/combobox/combobox-panel/combobox-panel.component.mjs +5 -5
  104. package/esm2022/dashboard/lib/dashboard/dashboard.component.mjs +17 -24
  105. package/esm2022/dashboard/lib/dashboard-header/dashboard-header.component.mjs +12 -15
  106. package/esm2022/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +7 -8
  107. package/esm2022/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +20 -15
  108. package/esm2022/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +15 -14
  109. package/esm2022/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +20 -27
  110. package/esm2022/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +6 -10
  111. package/esm2022/dashboard/lib/dashboard.module.mjs +30 -27
  112. package/esm2022/dialog/lib/dialog-actions/dialog-actions.component.mjs +6 -6
  113. package/esm2022/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +12 -15
  114. package/esm2022/dialog/lib/dialog-container/dialog-container.component.mjs +10 -7
  115. package/esm2022/dialog/lib/dialog-header/dialog-header.component.mjs +5 -6
  116. package/esm2022/dialog/lib/dialog-link/dialog-link.component.mjs +5 -5
  117. package/esm2022/dialog/lib/dialog-modal/dialog-modal.component.mjs +7 -7
  118. package/esm2022/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +11 -7
  119. package/esm2022/dialog/lib/dialog.config.mjs +8 -0
  120. package/esm2022/dialog/lib/dialog.insertion.mjs +6 -5
  121. package/esm2022/dialog/lib/dialog.interfaces.mjs +3 -1
  122. package/esm2022/dialog/lib/dialog.module.mjs +17 -25
  123. package/esm2022/dialog/lib/dialog.service.mjs +8 -5
  124. package/esm2022/dialog/lib/directives/confirm.directive.mjs +50 -0
  125. package/esm2022/dialog/public_api.mjs +3 -1
  126. package/esm2022/elements/lib/avatar/avatar.component.mjs +15 -14
  127. package/esm2022/elements/lib/button/button.component.mjs +37 -32
  128. package/esm2022/elements/lib/checkbox/checkbox.component.mjs +86 -47
  129. package/esm2022/elements/lib/checkbox-group/checkbox-group.component.mjs +36 -0
  130. package/esm2022/elements/lib/date-picker/date-picker.component.mjs +64 -51
  131. package/esm2022/elements/lib/directives/addon.directive.mjs +11 -13
  132. package/esm2022/elements/lib/directives/extra-error-controls.directive.mjs +43 -0
  133. package/esm2022/elements/lib/directives/form-submit.directive.mjs +6 -5
  134. package/esm2022/elements/lib/directives/form-submitter.directive.mjs +6 -5
  135. package/esm2022/elements/lib/directives/image-upload.directive.mjs +140 -0
  136. package/esm2022/elements/lib/directives/input.directive.mjs +21 -110
  137. package/esm2022/elements/lib/elements.config.mjs +42 -0
  138. package/esm2022/elements/lib/elements.module.mjs +42 -77
  139. package/esm2022/elements/lib/file-picker/file-picker.component.mjs +36 -24
  140. package/esm2022/elements/lib/form-control/form-control.component.mjs +21 -24
  141. package/esm2022/elements/lib/form-error/form-error.component.mjs +35 -60
  142. package/esm2022/elements/lib/form-group/form-group.component.mjs +15 -12
  143. package/esm2022/elements/lib/icon/icon.component.mjs +19 -24
  144. package/esm2022/elements/lib/image-picker/image-picker.component.mjs +33 -19
  145. package/esm2022/elements/lib/multi-file-control/multi-file-control.component.mjs +165 -0
  146. package/esm2022/elements/lib/pipes/date.pipe.mjs +30 -0
  147. package/esm2022/elements/lib/pipes/file-image.pipe.mjs +6 -5
  148. package/esm2022/elements/lib/pipes/file-size.pipe.mjs +6 -5
  149. package/esm2022/elements/lib/pipes/relative-time.pipe.mjs +6 -5
  150. package/esm2022/elements/lib/radio-button/radio-button.component.mjs +59 -0
  151. package/esm2022/elements/lib/radio-group/radio-group.component.mjs +102 -0
  152. package/esm2022/elements/lib/spinner/spinner.component.mjs +12 -13
  153. package/esm2022/elements/public_api.mjs +10 -4
  154. package/esm2022/http/lib/http.config.mjs +18 -0
  155. package/esm2022/http/lib/http.interfaces.mjs +4 -2
  156. package/esm2022/http/lib/http.module.mjs +9 -22
  157. package/esm2022/http/lib/interceptors/base-url.interceptor.mjs +9 -5
  158. package/esm2022/http/lib/interceptors/error.interceptor.mjs +10 -6
  159. package/esm2022/http/public_api.mjs +2 -1
  160. package/esm2022/lib/core/functions/array.utils.mjs +7 -0
  161. package/esm2022/lib/core/miscellaneous/coercion.mjs +5 -0
  162. package/esm2022/lib/core/miscellaneous/regex.mjs +41 -2
  163. package/esm2022/lib/core/services/exif.service.mjs +3 -3
  164. package/esm2022/lib/core/services/file-loader.service.mjs +3 -3
  165. package/esm2022/lib/core/services/files.service.mjs +86 -0
  166. package/esm2022/lib/core/services/image-converter.service.mjs +3 -3
  167. package/esm2022/lib/core/services/languages.service.mjs +3 -3
  168. package/esm2022/lib/core/services/network.service.mjs +5 -5
  169. package/esm2022/lib/core/services/patch.service.mjs +3 -3
  170. package/esm2022/localize/lib/interfaces/config.interfaces.mjs +2 -7
  171. package/esm2022/localize/lib/interfaces/functions.interfaces.mjs +6 -6
  172. package/esm2022/localize/lib/localizations/dutch.localization.mjs +19 -1
  173. package/esm2022/localize/lib/localizations/english.localization.mjs +19 -1
  174. package/esm2022/localize/lib/localize.config.mjs +43 -0
  175. package/esm2022/localize/lib/localize.module.mjs +10 -54
  176. package/esm2022/localize/lib/localize.pipe.mjs +6 -5
  177. package/esm2022/localize/lib/localize.service.mjs +26 -13
  178. package/esm2022/localize/lib/localize.tokens.mjs +18 -0
  179. package/esm2022/localize/lib/transforms/interpolate.transform.mjs +3 -2
  180. package/esm2022/localize/lib/transforms/plural.transform.mjs +5 -3
  181. package/esm2022/localize/lib/transforms/reference.transform.mjs +5 -3
  182. package/esm2022/localize/lib/views/localize-string/localize-string.component.mjs +6 -10
  183. package/esm2022/localize/lib/views/localize-template.directive.mjs +6 -5
  184. package/esm2022/localize/public_api.mjs +3 -3
  185. package/esm2022/masking/lib/directives/currency-mask.directive.mjs +6 -5
  186. package/esm2022/masking/lib/directives/date-mask.directive.mjs +6 -5
  187. package/esm2022/masking/lib/directives/input-mask.directive.mjs +6 -5
  188. package/esm2022/masking/lib/masking.module.mjs +6 -6
  189. package/esm2022/masking/lib/masking.service.mjs +3 -3
  190. package/esm2022/notifications/lib/notifications-item/notifications-item.component.mjs +7 -9
  191. package/esm2022/notifications/lib/notifications-list/notifications-list.component.mjs +8 -8
  192. package/esm2022/notifications/lib/notifications.config.mjs +8 -0
  193. package/esm2022/notifications/lib/notifications.interfaces.mjs +3 -1
  194. package/esm2022/notifications/lib/notifications.module.mjs +8 -18
  195. package/esm2022/notifications/lib/notifications.service.mjs +14 -8
  196. package/esm2022/notifications/public_api.mjs +2 -1
  197. package/esm2022/permissions/lib/directives/permission.directive.mjs +6 -5
  198. package/esm2022/permissions/lib/guards/permission.guard.mjs +23 -54
  199. package/esm2022/permissions/lib/permissions.config.mjs +20 -0
  200. package/esm2022/permissions/lib/permissions.interface.mjs +3 -1
  201. package/esm2022/permissions/lib/permissions.module.mjs +9 -23
  202. package/esm2022/permissions/lib/permissions.service.mjs +8 -5
  203. package/esm2022/permissions/public_api.mjs +2 -1
  204. package/esm2022/public_api.mjs +4 -11
  205. package/esm2022/recaptcha/lib/recaptcha/recaptcha.component.mjs +12 -13
  206. package/esm2022/recaptcha/lib/recaptcha-loader.service.mjs +21 -36
  207. package/esm2022/recaptcha/lib/recaptcha.config.mjs +8 -0
  208. package/esm2022/recaptcha/lib/recaptcha.module.mjs +8 -8
  209. package/esm2022/recaptcha/public_api.mjs +2 -1
  210. package/esm2022/rxjs/lib/observables/get-route-param.observable.mjs +5 -0
  211. package/esm2022/rxjs/public_api.mjs +2 -1
  212. package/esm2022/select/bravobit-bb-foundation-select.mjs +5 -0
  213. package/esm2022/select/lib/select/select.component.mjs +210 -0
  214. package/esm2022/select/lib/select-label.directive.mjs +17 -0
  215. package/esm2022/select/lib/select-option-group.directive.mjs +17 -0
  216. package/esm2022/select/lib/select-option.directive.mjs +17 -0
  217. package/esm2022/select/lib/select.module.mjs +35 -0
  218. package/esm2022/select/public_api.mjs +6 -0
  219. package/esm2022/storage/lib/storage.service.mjs +3 -3
  220. package/esm2022/storage/lib/strategies/polyfill-storage.strategy.mjs +2 -5
  221. package/esm2022/table/lib/components/table/table.component.mjs +21 -22
  222. package/esm2022/table/lib/components/table-cell/table-cell.component.mjs +5 -5
  223. package/esm2022/table/lib/components/table-header-cell/table-header-cell.component.mjs +14 -14
  224. package/esm2022/table/lib/components/table-pager/table-pager.component.mjs +15 -17
  225. package/esm2022/table/lib/table.module.mjs +23 -21
  226. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +11 -17
  227. package/esm2022/tooltip/lib/tooltip.directive.mjs +17 -27
  228. package/esm2022/tooltip/lib/tooltip.module.mjs +7 -22
  229. package/esm2022/tooltip/public_api.mjs +2 -2
  230. package/esm2022/utils/lib/directives/autosize.directive.mjs +9 -7
  231. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +6 -5
  232. package/esm2022/utils/lib/directives/focus.directive.mjs +6 -5
  233. package/esm2022/utils/lib/directives/template.directive.mjs +6 -5
  234. package/esm2022/utils/lib/utils.module.mjs +6 -6
  235. package/fesm2022/bravobit-bb-foundation-auth.mjs +140 -175
  236. package/fesm2022/bravobit-bb-foundation-auth.mjs.map +1 -1
  237. package/fesm2022/bravobit-bb-foundation-collections.mjs +451 -106
  238. package/fesm2022/bravobit-bb-foundation-collections.mjs.map +1 -1
  239. package/fesm2022/bravobit-bb-foundation-combobox.mjs +18 -18
  240. package/fesm2022/bravobit-bb-foundation-combobox.mjs.map +1 -1
  241. package/fesm2022/bravobit-bb-foundation-dashboard.mjs +106 -116
  242. package/fesm2022/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  243. package/fesm2022/bravobit-bb-foundation-dialog.mjs +125 -70
  244. package/fesm2022/bravobit-bb-foundation-dialog.mjs.map +1 -1
  245. package/fesm2022/bravobit-bb-foundation-elements.mjs +1780 -1368
  246. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -1
  247. package/fesm2022/bravobit-bb-foundation-http.mjs +38 -27
  248. package/fesm2022/bravobit-bb-foundation-http.mjs.map +1 -1
  249. package/fesm2022/bravobit-bb-foundation-localize.mjs +310 -264
  250. package/fesm2022/bravobit-bb-foundation-localize.mjs.map +1 -1
  251. package/fesm2022/bravobit-bb-foundation-masking.mjs +23 -20
  252. package/fesm2022/bravobit-bb-foundation-masking.mjs.map +1 -1
  253. package/fesm2022/bravobit-bb-foundation-notifications.mjs +67 -62
  254. package/fesm2022/bravobit-bb-foundation-notifications.mjs.map +1 -1
  255. package/fesm2022/bravobit-bb-foundation-permissions.mjs +54 -72
  256. package/fesm2022/bravobit-bb-foundation-permissions.mjs.map +1 -1
  257. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +44 -54
  258. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  259. package/fesm2022/bravobit-bb-foundation-rxjs.mjs +5 -1
  260. package/fesm2022/bravobit-bb-foundation-rxjs.mjs.map +1 -1
  261. package/fesm2022/bravobit-bb-foundation-select.mjs +288 -0
  262. package/fesm2022/bravobit-bb-foundation-select.mjs.map +1 -0
  263. package/fesm2022/bravobit-bb-foundation-storage.mjs +4 -7
  264. package/fesm2022/bravobit-bb-foundation-storage.mjs.map +1 -1
  265. package/fesm2022/bravobit-bb-foundation-table.mjs +67 -66
  266. package/fesm2022/bravobit-bb-foundation-table.mjs.map +1 -1
  267. package/fesm2022/bravobit-bb-foundation-tooltip.mjs +31 -61
  268. package/fesm2022/bravobit-bb-foundation-tooltip.mjs.map +1 -1
  269. package/fesm2022/bravobit-bb-foundation-utils.mjs +28 -23
  270. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -1
  271. package/fesm2022/bravobit-bb-foundation.mjs +166 -222
  272. package/fesm2022/bravobit-bb-foundation.mjs.map +1 -1
  273. package/http/lib/http.config.d.ts +5 -0
  274. package/http/lib/http.interfaces.d.ts +3 -0
  275. package/http/lib/http.module.d.ts +2 -6
  276. package/http/public_api.d.ts +1 -0
  277. package/lib/core/functions/array.utils.d.ts +1 -0
  278. package/lib/core/miscellaneous/coercion.d.ts +2 -0
  279. package/lib/core/miscellaneous/regex.d.ts +1 -0
  280. package/lib/core/services/files.service.d.ts +19 -0
  281. package/localize/lib/interfaces/config.interfaces.d.ts +1 -1
  282. package/localize/lib/interfaces/functions.interfaces.d.ts +0 -2
  283. package/localize/lib/localizations/dutch.localization.d.ts +18 -0
  284. package/localize/lib/localizations/english.localization.d.ts +18 -0
  285. package/localize/lib/localize.config.d.ts +6 -0
  286. package/localize/lib/localize.module.d.ts +2 -7
  287. package/localize/lib/localize.pipe.d.ts +1 -1
  288. package/localize/lib/localize.service.d.ts +4 -4
  289. package/localize/lib/localize.tokens.d.ts +11 -0
  290. package/localize/lib/views/localize-string/localize-string.component.d.ts +1 -1
  291. package/localize/lib/views/localize-template.directive.d.ts +1 -1
  292. package/localize/public_api.d.ts +2 -2
  293. package/masking/lib/directives/currency-mask.directive.d.ts +1 -1
  294. package/masking/lib/directives/date-mask.directive.d.ts +1 -1
  295. package/masking/lib/directives/input-mask.directive.d.ts +1 -1
  296. package/masking/lib/masking.module.d.ts +1 -1
  297. package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
  298. package/notifications/lib/notifications-list/notifications-list.component.d.ts +1 -1
  299. package/notifications/lib/notifications.config.d.ts +3 -0
  300. package/notifications/lib/notifications.interfaces.d.ts +2 -1
  301. package/notifications/lib/notifications.module.d.ts +1 -5
  302. package/notifications/public_api.d.ts +1 -0
  303. package/package.json +31 -36
  304. package/permissions/lib/directives/permission.directive.d.ts +1 -1
  305. package/permissions/lib/guards/permission.guard.d.ts +3 -15
  306. package/permissions/lib/permissions.config.d.ts +3 -0
  307. package/permissions/lib/permissions.interface.d.ts +2 -1
  308. package/permissions/lib/permissions.module.d.ts +1 -1
  309. package/permissions/public_api.d.ts +1 -0
  310. package/public_api.d.ts +3 -10
  311. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +4 -7
  312. package/recaptcha/lib/recaptcha-loader.service.d.ts +9 -13
  313. package/recaptcha/lib/recaptcha.config.d.ts +3 -0
  314. package/recaptcha/lib/recaptcha.module.d.ts +2 -2
  315. package/recaptcha/public_api.d.ts +1 -0
  316. package/rxjs/lib/observables/get-route-param.observable.d.ts +3 -0
  317. package/rxjs/public_api.d.ts +1 -0
  318. package/{theming → select}/index.d.ts +1 -1
  319. package/select/lib/select/select.component.d.ts +75 -0
  320. package/select/lib/select-label.directive.d.ts +8 -0
  321. package/select/lib/select-option-group.directive.d.ts +8 -0
  322. package/select/lib/select-option.directive.d.ts +8 -0
  323. package/select/lib/select.module.d.ts +10 -0
  324. package/select/public_api.d.ts +5 -0
  325. package/styles/colors.scss +20 -0
  326. package/styles/grid.scss +98 -0
  327. package/styles/reset.scss +65 -0
  328. package/styles/theme.scss +88 -0
  329. package/table/lib/components/table/table.component.d.ts +4 -6
  330. package/table/lib/components/table-cell/table-cell.component.d.ts +1 -1
  331. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +4 -7
  332. package/table/lib/components/table-pager/table-pager.component.d.ts +4 -8
  333. package/table/lib/table.module.d.ts +1 -5
  334. package/tooltip/lib/tooltip-container/tooltip-container.component.d.ts +3 -4
  335. package/tooltip/lib/tooltip.directive.d.ts +8 -17
  336. package/tooltip/lib/tooltip.module.d.ts +2 -5
  337. package/tooltip/public_api.d.ts +1 -1
  338. package/utils/lib/directives/autosize.directive.d.ts +2 -1
  339. package/utils/lib/directives/focus-trap.directive.d.ts +1 -1
  340. package/utils/lib/directives/focus.directive.d.ts +1 -1
  341. package/utils/lib/directives/template.directive.d.ts +1 -1
  342. package/utils/lib/utils.module.d.ts +1 -1
  343. package/auth/lib/directives/abstract.directive.d.ts +0 -12
  344. package/collections/lib/components/collections.directive.d.ts +0 -17
  345. package/controls/index.d.ts +0 -5
  346. package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +0 -51
  347. package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +0 -23
  348. package/controls/lib/checkbox/checkbox.module.d.ts +0 -10
  349. package/controls/lib/control-error/control-error/control-error.animation.d.ts +0 -1
  350. package/controls/lib/control-error/control-error/control-error.component.d.ts +0 -17
  351. package/controls/lib/control-error/control-error-submit.directive.d.ts +0 -15
  352. package/controls/lib/control-error/control-error.defaults.d.ts +0 -2
  353. package/controls/lib/control-error/control-error.interface.d.ts +0 -12
  354. package/controls/lib/control-error/control-error.module.d.ts +0 -9
  355. package/controls/lib/control-error/control-error.utils.d.ts +0 -3
  356. package/controls/lib/controls.interfaces.d.ts +0 -4
  357. package/controls/lib/controls.module.d.ts +0 -14
  358. package/controls/lib/form-control/form-control/form-control.component.d.ts +0 -29
  359. package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +0 -6
  360. package/controls/lib/form-control/form-control-input.directive.d.ts +0 -35
  361. package/controls/lib/form-control/form-control.module.d.ts +0 -12
  362. package/controls/lib/radio/radio-button/radio-button.component.d.ts +0 -24
  363. package/controls/lib/radio/radio-group/radio-group.component.d.ts +0 -53
  364. package/controls/lib/radio/radio.module.d.ts +0 -11
  365. package/controls/lib/toggle/toggle/toggle.component.d.ts +0 -45
  366. package/controls/lib/toggle/toggle-group/toggle-group.component.d.ts +0 -23
  367. package/controls/lib/toggle/toggle.module.d.ts +0 -10
  368. package/controls/public_api.d.ts +0 -20
  369. package/elements/lib/dropdown/dropdown.component.d.ts +0 -21
  370. package/elements/lib/tag/tag.component.d.ts +0 -7
  371. package/esm2022/auth/lib/directives/abstract.directive.mjs +0 -40
  372. package/esm2022/collections/lib/components/collections.directive.mjs +0 -43
  373. package/esm2022/controls/bravobit-bb-foundation-controls.mjs +0 -5
  374. package/esm2022/controls/lib/checkbox/checkbox/checkbox.component.mjs +0 -178
  375. package/esm2022/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +0 -68
  376. package/esm2022/controls/lib/checkbox/checkbox.module.mjs +0 -20
  377. package/esm2022/controls/lib/control-error/control-error/control-error.animation.mjs +0 -14
  378. package/esm2022/controls/lib/control-error/control-error/control-error.component.mjs +0 -63
  379. package/esm2022/controls/lib/control-error/control-error-submit.directive.mjs +0 -47
  380. package/esm2022/controls/lib/control-error/control-error.defaults.mjs +0 -26
  381. package/esm2022/controls/lib/control-error/control-error.interface.mjs +0 -3
  382. package/esm2022/controls/lib/control-error/control-error.module.mjs +0 -19
  383. package/esm2022/controls/lib/control-error/control-error.utils.mjs +0 -20
  384. package/esm2022/controls/lib/controls.interfaces.mjs +0 -2
  385. package/esm2022/controls/lib/controls.module.mjs +0 -62
  386. package/esm2022/controls/lib/form-control/form-control/form-control.component.mjs +0 -79
  387. package/esm2022/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +0 -22
  388. package/esm2022/controls/lib/form-control/form-control-input.directive.mjs +0 -124
  389. package/esm2022/controls/lib/form-control/form-control.module.mjs +0 -34
  390. package/esm2022/controls/lib/radio/radio-button/radio-button.component.mjs +0 -75
  391. package/esm2022/controls/lib/radio/radio-group/radio-group.component.mjs +0 -168
  392. package/esm2022/controls/lib/radio/radio.module.mjs +0 -21
  393. package/esm2022/controls/lib/toggle/toggle/toggle.component.mjs +0 -153
  394. package/esm2022/controls/lib/toggle/toggle-group/toggle-group.component.mjs +0 -62
  395. package/esm2022/controls/lib/toggle/toggle.module.mjs +0 -20
  396. package/esm2022/controls/public_api.mjs +0 -21
  397. package/esm2022/elements/lib/dropdown/dropdown.component.mjs +0 -100
  398. package/esm2022/elements/lib/tag/tag.component.mjs +0 -18
  399. package/esm2022/lib/core/mixins/can-disable.mjs +0 -16
  400. package/esm2022/lib/core/mixins/can-hide-errors.mjs +0 -16
  401. package/esm2022/lib/core/mixins/can-load.mjs +0 -16
  402. package/esm2022/lib/core/mixins/constructor.mjs +0 -2
  403. package/esm2022/lib/core/mixins/has-error.mjs +0 -16
  404. package/esm2022/lib/core/mixins/is-focused.mjs +0 -16
  405. package/esm2022/lib/core/mixins/is-grouped.mjs +0 -16
  406. package/esm2022/lib/core/mixins/is-readonly.mjs +0 -16
  407. package/esm2022/lib/core/mixins/is-required.mjs +0 -16
  408. package/esm2022/lib/core/services/clipboard.service.mjs +0 -70
  409. package/esm2022/localize/lib/interfaces/transforms.interfaces.mjs +0 -3
  410. package/esm2022/localize/lib/locale.token.mjs +0 -14
  411. package/esm2022/theming/bravobit-bb-foundation-theming.mjs +0 -5
  412. package/esm2022/theming/lib/themes/checkbox-group.theme.mjs +0 -17
  413. package/esm2022/theming/lib/themes/checkbox.theme.mjs +0 -35
  414. package/esm2022/theming/lib/themes/control-error.theme.mjs +0 -11
  415. package/esm2022/theming/lib/themes/form-control-addon.theme.mjs +0 -6
  416. package/esm2022/theming/lib/themes/form-control.theme.mjs +0 -45
  417. package/esm2022/theming/lib/themes/radio-button.theme.mjs +0 -29
  418. package/esm2022/theming/lib/themes/radio-group.theme.mjs +0 -20
  419. package/esm2022/theming/lib/themes/toggle-group.theme.mjs +0 -17
  420. package/esm2022/theming/lib/themes/toggle.theme.mjs +0 -28
  421. package/esm2022/theming/lib/theming.data.mjs +0 -90
  422. package/esm2022/theming/lib/theming.directive.mjs +0 -38
  423. package/esm2022/theming/lib/theming.interface.mjs +0 -2
  424. package/esm2022/theming/lib/theming.module.mjs +0 -16
  425. package/esm2022/theming/lib/utils/theming.variable.mjs +0 -41
  426. package/esm2022/theming/public_api.mjs +0 -10
  427. package/fesm2022/bravobit-bb-foundation-controls.mjs +0 -1191
  428. package/fesm2022/bravobit-bb-foundation-controls.mjs.map +0 -1
  429. package/fesm2022/bravobit-bb-foundation-theming.mjs +0 -381
  430. package/fesm2022/bravobit-bb-foundation-theming.mjs.map +0 -1
  431. package/lib/core/mixins/can-disable.d.ts +0 -6
  432. package/lib/core/mixins/can-hide-errors.d.ts +0 -6
  433. package/lib/core/mixins/can-load.d.ts +0 -6
  434. package/lib/core/mixins/constructor.d.ts +0 -1
  435. package/lib/core/mixins/has-error.d.ts +0 -6
  436. package/lib/core/mixins/is-focused.d.ts +0 -6
  437. package/lib/core/mixins/is-grouped.d.ts +0 -6
  438. package/lib/core/mixins/is-readonly.d.ts +0 -6
  439. package/lib/core/mixins/is-required.d.ts +0 -6
  440. package/lib/core/services/clipboard.service.d.ts +0 -18
  441. package/localize/lib/interfaces/transforms.interfaces.d.ts +0 -3
  442. package/localize/lib/locale.token.d.ts +0 -3
  443. package/theming/lib/themes/checkbox-group.theme.d.ts +0 -16
  444. package/theming/lib/themes/checkbox.theme.d.ts +0 -32
  445. package/theming/lib/themes/control-error.theme.d.ts +0 -9
  446. package/theming/lib/themes/form-control-addon.theme.d.ts +0 -5
  447. package/theming/lib/themes/form-control.theme.d.ts +0 -32
  448. package/theming/lib/themes/radio-button.theme.d.ts +0 -26
  449. package/theming/lib/themes/radio-group.theme.d.ts +0 -17
  450. package/theming/lib/themes/toggle-group.theme.d.ts +0 -16
  451. package/theming/lib/themes/toggle.theme.d.ts +0 -25
  452. package/theming/lib/theming.data.d.ts +0 -17
  453. package/theming/lib/theming.directive.d.ts +0 -13
  454. package/theming/lib/theming.interface.d.ts +0 -34
  455. package/theming/lib/theming.module.d.ts +0 -7
  456. package/theming/lib/utils/theming.variable.d.ts +0 -16
  457. package/theming/public_api.d.ts +0 -9
@@ -1,1191 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, EventEmitter, forwardRef, ViewChild, Output, NgModule, Directive, InjectionToken, Optional, Inject, HostBinding, HostListener, Self, ContentChild } from '@angular/core';
3
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
- import * as i2 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
6
- import * as i2$1 from '@bravobit/bb-foundation/utils';
7
- import { UtilsModule } from '@bravobit/bb-foundation/utils';
8
- import * as i2$2 from '@angular/forms';
9
- import { NG_VALUE_ACCESSOR, NgControl, Validators } from '@angular/forms';
10
- import { BehaviorSubject, Subscription, fromEvent, merge, of } from 'rxjs';
11
- import { map, startWith, distinctUntilChanged, pairwise, switchMap, delay } from 'rxjs/operators';
12
- import { trigger, transition, style, animate } from '@angular/animations';
13
- import * as i1 from '@bravobit/bb-foundation/localize';
14
-
15
- class BbiCheckboxGroup {
16
- // Grouped.
17
- get grouped() {
18
- return this._grouped;
19
- }
20
- set grouped(value) {
21
- const newValue = coerceBooleanProperty(value);
22
- if (newValue !== this.grouped) {
23
- this._grouped = newValue;
24
- this._changeDetectorRef.markForCheck();
25
- }
26
- }
27
- // Required.
28
- get required() {
29
- return this._required;
30
- }
31
- set required(value) {
32
- const newValue = coerceBooleanProperty(value);
33
- if (newValue !== this.required) {
34
- this._required = newValue;
35
- this._changeDetectorRef.markForCheck();
36
- }
37
- }
38
- // Inline.
39
- get inline() {
40
- return this._inline;
41
- }
42
- set inline(value) {
43
- const newValue = coerceBooleanProperty(value);
44
- if (newValue !== this.inline) {
45
- this._inline = newValue;
46
- this._changeDetectorRef.markForCheck();
47
- }
48
- }
49
- constructor(_changeDetectorRef) {
50
- this._changeDetectorRef = _changeDetectorRef;
51
- // Inputs.
52
- this.label = null;
53
- this._grouped = false;
54
- this._required = false;
55
- this._inline = false;
56
- }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiCheckboxGroup, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
58
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiCheckboxGroup, selector: "bbi-checkbox-group", inputs: { label: "label", grouped: "grouped", required: "required", inline: "inline" }, host: { properties: { "class.grouped": "grouped", "class.required": "required", "class.inline": "inline" }, classAttribute: "bbi-checkbox-group" }, ngImport: i0, template: "<label *ngIf=\"label as labelContent\"\n class=\"bbi-checkbox-group-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-checkbox-group-items\">\n <ng-content select=\"bbi-checkbox\"></ng-content>\n</div>\n", styles: [".bbi-checkbox-group{display:block}.bbi-checkbox-group.grouped{margin-bottom:var(--checkbox-group-grouping, 20px)}.bbi-checkbox-group.required>.bbi-checkbox-group-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bbi-checkbox-group-label{border:0;padding:0;font-family:inherit;display:inline-block;box-sizing:border-box;vertical-align:initial;color:var(--checkbox-group-label-color, #525252);font-size:var(--checkbox-group-label-font-size, 14px);margin-bottom:var(--checkbox-group-label-offset, 4px);line-height:var(--checkbox-group-label-line-height, 1.33);font-weight:var(--checkbox-group-label-font-weight, 400)}.bbi-checkbox-group-items{display:flex;flex-direction:column}.bbi-checkbox-group-items:not(:empty){margin-bottom:-var(--checkbox-group-item-spacing-vertical,4px)}.bbi-checkbox-group-items>*{margin-bottom:var(--checkbox-group-item-spacing-vertical, 4px)}@media only screen and (min-width: 768px){.bbi-checkbox-group.inline>.bbi-checkbox-group-items{flex-wrap:wrap;flex-direction:row}.bbi-checkbox-group.inline>.bbi-checkbox-group-items>*:not(:last-child){margin-right:var(--checkbox-group-item-spacing-horizontal, 10px)}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
59
- }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiCheckboxGroup, decorators: [{
61
- type: Component,
62
- args: [{ selector: 'bbi-checkbox-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
63
- 'class': 'bbi-checkbox-group',
64
- '[class.grouped]': 'grouped',
65
- '[class.required]': 'required',
66
- '[class.inline]': 'inline'
67
- }, preserveWhitespaces: false, template: "<label *ngIf=\"label as labelContent\"\n class=\"bbi-checkbox-group-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-checkbox-group-items\">\n <ng-content select=\"bbi-checkbox\"></ng-content>\n</div>\n", styles: [".bbi-checkbox-group{display:block}.bbi-checkbox-group.grouped{margin-bottom:var(--checkbox-group-grouping, 20px)}.bbi-checkbox-group.required>.bbi-checkbox-group-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bbi-checkbox-group-label{border:0;padding:0;font-family:inherit;display:inline-block;box-sizing:border-box;vertical-align:initial;color:var(--checkbox-group-label-color, #525252);font-size:var(--checkbox-group-label-font-size, 14px);margin-bottom:var(--checkbox-group-label-offset, 4px);line-height:var(--checkbox-group-label-line-height, 1.33);font-weight:var(--checkbox-group-label-font-weight, 400)}.bbi-checkbox-group-items{display:flex;flex-direction:column}.bbi-checkbox-group-items:not(:empty){margin-bottom:-var(--checkbox-group-item-spacing-vertical,4px)}.bbi-checkbox-group-items>*{margin-bottom:var(--checkbox-group-item-spacing-vertical, 4px)}@media only screen and (min-width: 768px){.bbi-checkbox-group.inline>.bbi-checkbox-group-items{flex-wrap:wrap;flex-direction:row}.bbi-checkbox-group.inline>.bbi-checkbox-group-items>*:not(:last-child){margin-right:var(--checkbox-group-item-spacing-horizontal, 10px)}}\n"] }]
68
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { label: [{
69
- type: Input
70
- }], grouped: [{
71
- type: Input
72
- }], required: [{
73
- type: Input
74
- }], inline: [{
75
- type: Input
76
- }] } });
77
-
78
- let nextUniqueId$2 = 0;
79
- class BbiCheckbox {
80
- // Checked.
81
- get checked() {
82
- return this._checked;
83
- }
84
- set checked(value) {
85
- const newValue = coerceBooleanProperty(value);
86
- if (newValue !== this.checked) {
87
- this._checked = newValue;
88
- this._changeDetectorRef.markForCheck();
89
- }
90
- }
91
- // Disabled.
92
- get disabled() {
93
- return this._disabled;
94
- }
95
- set disabled(value) {
96
- const newValue = coerceBooleanProperty(value);
97
- if (newValue !== this.disabled) {
98
- this._disabled = newValue;
99
- this._changeDetectorRef.markForCheck();
100
- }
101
- }
102
- // Grouped.
103
- get grouped() {
104
- return this._grouped;
105
- }
106
- set grouped(value) {
107
- const newValue = coerceBooleanProperty(value);
108
- if (newValue !== this.grouped) {
109
- this._grouped = newValue;
110
- this._changeDetectorRef.markForCheck();
111
- }
112
- }
113
- // Indeterminate.
114
- get indeterminate() {
115
- return this._indeterminate;
116
- }
117
- set indeterminate(value) {
118
- this._indeterminate = coerceBooleanProperty(value);
119
- this.syncField('indeterminate', this._indeterminate);
120
- }
121
- // Required.
122
- get required() {
123
- return this._required;
124
- }
125
- set required(value) {
126
- const newValue = coerceBooleanProperty(value);
127
- if (newValue !== this.required) {
128
- this._required = newValue;
129
- this._changeDetectorRef.markForCheck();
130
- }
131
- }
132
- // Hide text.
133
- get hideText() {
134
- return this._hideText;
135
- }
136
- set hideText(value) {
137
- const newValue = coerceBooleanProperty(value);
138
- if (newValue !== this.hideText) {
139
- this._hideText = newValue;
140
- this._changeDetectorRef.markForCheck();
141
- }
142
- }
143
- constructor(_renderer, _changeDetectorRef) {
144
- this._renderer = _renderer;
145
- this._changeDetectorRef = _changeDetectorRef;
146
- // Readonly data.
147
- this.labelId = `bbi-checkbox-${nextUniqueId$2++}`;
148
- // Outputs.
149
- this.checkedChange = new EventEmitter();
150
- this.indeterminateChange = new EventEmitter();
151
- this._checked = false;
152
- this._disabled = false;
153
- this._grouped = false;
154
- this._indeterminate = false;
155
- this._required = false;
156
- this._hideText = false;
157
- // Methods.
158
- this.onChange = () => ({});
159
- this.onTouched = () => ({});
160
- }
161
- ngAfterViewInit() {
162
- this.syncField('indeterminate', this._indeterminate);
163
- }
164
- registerOnChange(fn) {
165
- this.onChange = fn;
166
- }
167
- registerOnTouched(fn) {
168
- this.onTouched = fn;
169
- }
170
- setDisabledState(isDisabled) {
171
- this.disabled = isDisabled;
172
- }
173
- writeValue(newValue) {
174
- this.checked = !!newValue;
175
- }
176
- toggle() {
177
- this.checked = !this.checked;
178
- }
179
- onClickEvent(event) {
180
- event.stopPropagation();
181
- if (this.disabled) {
182
- return;
183
- }
184
- // When user manually click on the checkbox, `indeterminate` is set to false.
185
- if (this.indeterminate) {
186
- Promise.resolve().then(() => {
187
- this._indeterminate = false;
188
- this.indeterminateChange.emit(this._indeterminate);
189
- });
190
- }
191
- this.toggle();
192
- // Emit our custom change event if the native input emitted one.
193
- // It is important to only emit it, if the native input triggered one, because
194
- // we don't want to trigger a change event, when the `checked` variable changes for example.
195
- this.emitChangeEvent();
196
- }
197
- onChangeEvent(event) {
198
- // We always have to stop propagation on the change event.
199
- // Otherwise the change event, from the input element, will bubble up and
200
- // emit its event object to the `change` output.
201
- event.stopPropagation();
202
- }
203
- emitChangeEvent() {
204
- this.onChange?.(this.checked);
205
- this.checkedChange.emit(this.checked);
206
- this.syncField('checked', this.checked);
207
- }
208
- syncField(field, value) {
209
- const element = this.inputElementRef?.nativeElement;
210
- if (!element) {
211
- return;
212
- }
213
- this._renderer.setProperty(element, field, value);
214
- }
215
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiCheckbox, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
216
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiCheckbox, selector: "bbi-checkbox", inputs: { checked: "checked", disabled: "disabled", grouped: "grouped", indeterminate: "indeterminate", required: "required", hideText: "hideText" }, outputs: { checkedChange: "checkedChange", indeterminateChange: "indeterminateChange" }, host: { properties: { "class.grouped": "grouped", "class.indeterminate": "indeterminate", "class.required": "required" }, classAttribute: "bbi-checkbox" }, providers: [
217
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbiCheckbox), multi: true }
218
- ], viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input #input\n [id]=\"labelId\"\n [disabled]=\"disabled\"\n [checked]=\"checked\"\n (change)=\"onChangeEvent($event)\"\n (click)=\"onClickEvent($event)\"\n (blur)=\"onTouched()\"\n class=\"bbi-checkbox-input\"\n type=\"checkbox\">\n<label [attr.for]=\"labelId\"\n class=\"bbi-checkbox-label\">\n <span *ngIf=\"!hideText\"\n class=\"bbi-checkbox-text\"><ng-content></ng-content></span>\n</label>\n", styles: [".bbi-checkbox{display:block}.bbi-checkbox.grouped{margin-bottom:var(--checkbox-grouping, 20px)}.bbi-checkbox.required>.bbi-checkbox-label>.bbi-checkbox-text:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5;margin-left:3px}.bbi-checkbox-input{border:0;width:1px;padding:0;height:1px;margin:-1px;overflow:hidden;position:absolute;visibility:inherit;white-space:nowrap;clip:rect(0,0,0,0)}.bbi-checkbox-input:checked+.bbi-checkbox-label:before,.bbi-checkbox-input:indeterminate+.bbi-checkbox-label:before{background-color:var(--checkbox-colors-accent, var(--accent-color, #1565c0));border:var(--checkbox-border-thickness, 1px) solid var(--checkbox-colors-accent, var(--accent-color, #1565c0))}.bbi-checkbox-input:checked+.bbi-checkbox-label:after,.bbi-checkbox-input:indeterminate+.bbi-checkbox-label:after{opacity:1;transform:scale(1) rotate(-45deg)}.bbi-checkbox-input:indeterminate+.bbi-checkbox-label:after{left:calc(var(--checkbox-size, 20px) / 4);width:calc(var(--checkbox-size, 20px) / 2);transform:scale(1) rotate(0);border-left:0 solid var(--checkbox-check-color, white);border-bottom:var(--checkbox-check-thickness, 2px) solid var(--checkbox-check-color, white)}.bbi-checkbox-input:focus+.bbi-checkbox-label:before{outline-color:var(--checkbox-outline-color, var(--accent-color, #1565c0))}.bbi-checkbox-input:disabled+.bbi-checkbox-label{cursor:not-allowed;color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-input:disabled+.bbi-checkbox-label:before{border-color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-input:disabled+.bbi-checkbox-label>.bbi-checkbox-text{color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-input:checked:disabled+.bbi-checkbox-label:before,.bbi-checkbox-input:indeterminate:disabled+.bbi-checkbox-label:before{background-color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-label{border:0;margin:0;display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;align-items:center;font-family:inherit;vertical-align:initial;min-height:var(--checkbox-size, 20px);padding-left:var(--checkbox-size, 20px)}.bbi-checkbox-label:before{left:0;content:\"\";position:absolute;width:var(--checkbox-size, 20px);height:var(--checkbox-size, 20px);background-color:initial;border-radius:var(--checkbox-border-radius, 4px);outline-offset:var(--checkbox-outline-offset, 1px);outline:var(--checkbox-outline-thickness, 2px) solid transparent;border:var(--checkbox-border-thickness, 1px) solid var(--checkbox-border-color, #111111);transition:outline-color .2s cubic-bezier(0,0,.2,1),background-color .18s cubic-bezier(0,0,.2,1),border-color .18s cubic-bezier(0,0,.2,1)}.bbi-checkbox-label:after{opacity:0;content:\"\";background:none;position:absolute;transform-origin:center;width:var(--checkbox-check-size, 12px);transform:scale(.85) rotate(-60deg);height:calc(var(--checkbox-check-size, 12px) / 2);top:calc(50% - var(--checkbox-check-size, 12px) / 2 * .75);left:calc((var(--checkbox-size, 20px) - var(--checkbox-check-size, 12px)) / 2);border-left:var(--checkbox-check-thickness, 2px) solid var(--checkbox-check-color, white);border-bottom:var(--checkbox-check-thickness, 2px) solid var(--checkbox-check-color, white);transition:opacity .12s cubic-bezier(0,0,.2,1),transform .18s cubic-bezier(0,0,.2,1)}.bbi-checkbox-text{color:var(--checkbox-label-color, #111111);padding-left:var(--checkbox-label-offset, 6px);font-size:var(--checkbox-label-font-size, 16px);font-weight:var(--checkbox-label-font-weight, 400);line-height:var(--checkbox-label-line-height, 1.28)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
219
- }
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiCheckbox, decorators: [{
221
- type: Component,
222
- args: [{ selector: 'bbi-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
223
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbiCheckbox), multi: true }
224
- ], host: {
225
- 'class': 'bbi-checkbox',
226
- '[class.grouped]': 'grouped',
227
- '[class.indeterminate]': 'indeterminate',
228
- '[class.required]': 'required'
229
- }, preserveWhitespaces: false, template: "<input #input\n [id]=\"labelId\"\n [disabled]=\"disabled\"\n [checked]=\"checked\"\n (change)=\"onChangeEvent($event)\"\n (click)=\"onClickEvent($event)\"\n (blur)=\"onTouched()\"\n class=\"bbi-checkbox-input\"\n type=\"checkbox\">\n<label [attr.for]=\"labelId\"\n class=\"bbi-checkbox-label\">\n <span *ngIf=\"!hideText\"\n class=\"bbi-checkbox-text\"><ng-content></ng-content></span>\n</label>\n", styles: [".bbi-checkbox{display:block}.bbi-checkbox.grouped{margin-bottom:var(--checkbox-grouping, 20px)}.bbi-checkbox.required>.bbi-checkbox-label>.bbi-checkbox-text:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5;margin-left:3px}.bbi-checkbox-input{border:0;width:1px;padding:0;height:1px;margin:-1px;overflow:hidden;position:absolute;visibility:inherit;white-space:nowrap;clip:rect(0,0,0,0)}.bbi-checkbox-input:checked+.bbi-checkbox-label:before,.bbi-checkbox-input:indeterminate+.bbi-checkbox-label:before{background-color:var(--checkbox-colors-accent, var(--accent-color, #1565c0));border:var(--checkbox-border-thickness, 1px) solid var(--checkbox-colors-accent, var(--accent-color, #1565c0))}.bbi-checkbox-input:checked+.bbi-checkbox-label:after,.bbi-checkbox-input:indeterminate+.bbi-checkbox-label:after{opacity:1;transform:scale(1) rotate(-45deg)}.bbi-checkbox-input:indeterminate+.bbi-checkbox-label:after{left:calc(var(--checkbox-size, 20px) / 4);width:calc(var(--checkbox-size, 20px) / 2);transform:scale(1) rotate(0);border-left:0 solid var(--checkbox-check-color, white);border-bottom:var(--checkbox-check-thickness, 2px) solid var(--checkbox-check-color, white)}.bbi-checkbox-input:focus+.bbi-checkbox-label:before{outline-color:var(--checkbox-outline-color, var(--accent-color, #1565c0))}.bbi-checkbox-input:disabled+.bbi-checkbox-label{cursor:not-allowed;color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-input:disabled+.bbi-checkbox-label:before{border-color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-input:disabled+.bbi-checkbox-label>.bbi-checkbox-text{color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-input:checked:disabled+.bbi-checkbox-label:before,.bbi-checkbox-input:indeterminate:disabled+.bbi-checkbox-label:before{background-color:var(--checkbox-colors-disabled, #c6c6c6)}.bbi-checkbox-label{border:0;margin:0;display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;align-items:center;font-family:inherit;vertical-align:initial;min-height:var(--checkbox-size, 20px);padding-left:var(--checkbox-size, 20px)}.bbi-checkbox-label:before{left:0;content:\"\";position:absolute;width:var(--checkbox-size, 20px);height:var(--checkbox-size, 20px);background-color:initial;border-radius:var(--checkbox-border-radius, 4px);outline-offset:var(--checkbox-outline-offset, 1px);outline:var(--checkbox-outline-thickness, 2px) solid transparent;border:var(--checkbox-border-thickness, 1px) solid var(--checkbox-border-color, #111111);transition:outline-color .2s cubic-bezier(0,0,.2,1),background-color .18s cubic-bezier(0,0,.2,1),border-color .18s cubic-bezier(0,0,.2,1)}.bbi-checkbox-label:after{opacity:0;content:\"\";background:none;position:absolute;transform-origin:center;width:var(--checkbox-check-size, 12px);transform:scale(.85) rotate(-60deg);height:calc(var(--checkbox-check-size, 12px) / 2);top:calc(50% - var(--checkbox-check-size, 12px) / 2 * .75);left:calc((var(--checkbox-size, 20px) - var(--checkbox-check-size, 12px)) / 2);border-left:var(--checkbox-check-thickness, 2px) solid var(--checkbox-check-color, white);border-bottom:var(--checkbox-check-thickness, 2px) solid var(--checkbox-check-color, white);transition:opacity .12s cubic-bezier(0,0,.2,1),transform .18s cubic-bezier(0,0,.2,1)}.bbi-checkbox-text{color:var(--checkbox-label-color, #111111);padding-left:var(--checkbox-label-offset, 6px);font-size:var(--checkbox-label-font-size, 16px);font-weight:var(--checkbox-label-font-weight, 400);line-height:var(--checkbox-label-line-height, 1.28)}\n"] }]
230
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { inputElementRef: [{
231
- type: ViewChild,
232
- args: ['input', { static: true }]
233
- }], checkedChange: [{
234
- type: Output
235
- }], indeterminateChange: [{
236
- type: Output
237
- }], checked: [{
238
- type: Input
239
- }], disabled: [{
240
- type: Input
241
- }], grouped: [{
242
- type: Input
243
- }], indeterminate: [{
244
- type: Input
245
- }], required: [{
246
- type: Input
247
- }], hideText: [{
248
- type: Input
249
- }] } });
250
-
251
- class CheckboxModule {
252
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: CheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
253
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: CheckboxModule, declarations: [BbiCheckbox, BbiCheckboxGroup], imports: [CommonModule, UtilsModule], exports: [BbiCheckbox, BbiCheckboxGroup] }); }
254
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: CheckboxModule, imports: [CommonModule, UtilsModule] }); }
255
- }
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: CheckboxModule, decorators: [{
257
- type: NgModule,
258
- args: [{
259
- imports: [CommonModule, UtilsModule],
260
- declarations: [BbiCheckbox, BbiCheckboxGroup],
261
- exports: [BbiCheckbox, BbiCheckboxGroup]
262
- }]
263
- }] });
264
-
265
- class BbiToggleGroup {
266
- // Grouped.
267
- get grouped() { return this._grouped; }
268
- set grouped(value) {
269
- const newValue = coerceBooleanProperty(value);
270
- if (newValue !== this.grouped) {
271
- this._grouped = newValue;
272
- this._changeDetectorRef.markForCheck();
273
- }
274
- }
275
- // Required.
276
- get required() { return this._required; }
277
- set required(value) {
278
- const newValue = coerceBooleanProperty(value);
279
- if (newValue !== this.required) {
280
- this._required = newValue;
281
- this._changeDetectorRef.markForCheck();
282
- }
283
- }
284
- // Inline.
285
- get inline() { return this._inline; }
286
- set inline(value) {
287
- const newValue = coerceBooleanProperty(value);
288
- if (newValue !== this.inline) {
289
- this._inline = newValue;
290
- this._changeDetectorRef.markForCheck();
291
- }
292
- }
293
- constructor(_changeDetectorRef) {
294
- this._changeDetectorRef = _changeDetectorRef;
295
- // Inputs.
296
- this.label = null;
297
- this._grouped = false;
298
- this._required = false;
299
- this._inline = false;
300
- }
301
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiToggleGroup, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
302
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiToggleGroup, selector: "bbi-toggle-group", inputs: { label: "label", grouped: "grouped", required: "required", inline: "inline" }, host: { properties: { "class.grouped": "grouped", "class.required": "required", "class.inline": "inline" }, classAttribute: "bbi-toggle-group" }, ngImport: i0, template: "<label *ngIf=\"label as labelContent\"\n class=\"bbi-toggle-group-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-toggle-group-items\">\n <ng-content select=\"bbi-toggle\"></ng-content>\n</div>\n", styles: [".bbi-toggle-group{display:block}.bbi-toggle-group.grouped{margin-bottom:var(--toggle-group-grouping, 20px)}.bbi-toggle-group.required>.bbi-toggle-group-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bbi-toggle-group-label{border:0;padding:0;font-family:inherit;display:inline-block;box-sizing:border-box;vertical-align:initial;color:var(--toggle-group-label-color, #525252);font-size:var(--toggle-group-label-font-size, 14px);margin-bottom:var(--toggle-group-label-offset, 4px);line-height:var(--toggle-group-label-line-height, 1.33);font-weight:var(--toggle-group-label-font-weight, 400)}.bbi-toggle-group-items{display:flex;flex-direction:column}.bbi-toggle-group-items:not(:empty){margin-bottom:-var(--toggle-group-item-spacing-vertical,4px)}.bbi-toggle-group-items>*{margin-bottom:var(--toggle-group-item-spacing-vertical, 4px)}@media only screen and (min-width: 768px){.bbi-toggle-group.inline>.bbi-toggle-group-items{flex-wrap:wrap;flex-direction:row}.bbi-toggle-group.inline>.bbi-toggle-group-items>*:not(:last-child){margin-right:var(--toggle-group-item-spacing-horizontal, 10px)}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
303
- }
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiToggleGroup, decorators: [{
305
- type: Component,
306
- args: [{ selector: 'bbi-toggle-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
307
- 'class': 'bbi-toggle-group',
308
- '[class.grouped]': 'grouped',
309
- '[class.required]': 'required',
310
- '[class.inline]': 'inline'
311
- }, preserveWhitespaces: false, template: "<label *ngIf=\"label as labelContent\"\n class=\"bbi-toggle-group-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-toggle-group-items\">\n <ng-content select=\"bbi-toggle\"></ng-content>\n</div>\n", styles: [".bbi-toggle-group{display:block}.bbi-toggle-group.grouped{margin-bottom:var(--toggle-group-grouping, 20px)}.bbi-toggle-group.required>.bbi-toggle-group-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bbi-toggle-group-label{border:0;padding:0;font-family:inherit;display:inline-block;box-sizing:border-box;vertical-align:initial;color:var(--toggle-group-label-color, #525252);font-size:var(--toggle-group-label-font-size, 14px);margin-bottom:var(--toggle-group-label-offset, 4px);line-height:var(--toggle-group-label-line-height, 1.33);font-weight:var(--toggle-group-label-font-weight, 400)}.bbi-toggle-group-items{display:flex;flex-direction:column}.bbi-toggle-group-items:not(:empty){margin-bottom:-var(--toggle-group-item-spacing-vertical,4px)}.bbi-toggle-group-items>*{margin-bottom:var(--toggle-group-item-spacing-vertical, 4px)}@media only screen and (min-width: 768px){.bbi-toggle-group.inline>.bbi-toggle-group-items{flex-wrap:wrap;flex-direction:row}.bbi-toggle-group.inline>.bbi-toggle-group-items>*:not(:last-child){margin-right:var(--toggle-group-item-spacing-horizontal, 10px)}}\n"] }]
312
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { label: [{
313
- type: Input
314
- }], grouped: [{
315
- type: Input
316
- }], required: [{
317
- type: Input
318
- }], inline: [{
319
- type: Input
320
- }] } });
321
-
322
- let nextUniqueId$1 = 0;
323
- class BbiToggle {
324
- // Checked.
325
- get checked() {
326
- return this._checked;
327
- }
328
- set checked(value) {
329
- const newValue = coerceBooleanProperty(value);
330
- if (newValue !== this.checked) {
331
- this._checked = newValue;
332
- this._changeDetectorRef.markForCheck();
333
- }
334
- }
335
- // Disabled.
336
- get disabled() {
337
- return this._disabled;
338
- }
339
- set disabled(value) {
340
- const newValue = coerceBooleanProperty(value);
341
- if (newValue !== this.disabled) {
342
- this._disabled = newValue;
343
- this._changeDetectorRef.markForCheck();
344
- }
345
- }
346
- // Grouped.
347
- get grouped() {
348
- return this._grouped;
349
- }
350
- set grouped(value) {
351
- const newValue = coerceBooleanProperty(value);
352
- if (newValue !== this.grouped) {
353
- this._grouped = newValue;
354
- this._changeDetectorRef.markForCheck();
355
- }
356
- }
357
- // Required.
358
- get required() {
359
- return this._required;
360
- }
361
- set required(value) {
362
- const newValue = coerceBooleanProperty(value);
363
- if (newValue !== this.required) {
364
- this._required = newValue;
365
- this._changeDetectorRef.markForCheck();
366
- }
367
- }
368
- // Hide text.
369
- get hideText() {
370
- return this._hideText;
371
- }
372
- set hideText(value) {
373
- const newValue = coerceBooleanProperty(value);
374
- if (newValue !== this.hideText) {
375
- this._hideText = newValue;
376
- this._changeDetectorRef.markForCheck();
377
- }
378
- }
379
- constructor(_renderer, _changeDetectorRef) {
380
- this._renderer = _renderer;
381
- this._changeDetectorRef = _changeDetectorRef;
382
- // Readonly data.
383
- this.labelId = `bbi-toggle-${nextUniqueId$1++}`;
384
- // Outputs.
385
- this.checkedChange = new EventEmitter();
386
- this._checked = false;
387
- this._disabled = false;
388
- this._grouped = false;
389
- this._required = false;
390
- this._hideText = false;
391
- // Methods.
392
- this.onChange = () => ({});
393
- this.onTouched = () => ({});
394
- }
395
- registerOnChange(fn) {
396
- this.onChange = fn;
397
- }
398
- registerOnTouched(fn) {
399
- this.onTouched = fn;
400
- }
401
- setDisabledState(isDisabled) {
402
- this.disabled = isDisabled;
403
- }
404
- writeValue(newValue) {
405
- this.checked = !!newValue;
406
- }
407
- toggle() {
408
- this.checked = !this.checked;
409
- }
410
- onClickEvent(event) {
411
- event.stopPropagation();
412
- if (this.disabled) {
413
- return;
414
- }
415
- this.toggle();
416
- // Emit our custom change event if the native input emitted one.
417
- // It is important to only emit it, if the native input triggered one, because
418
- // we don't want to trigger a change event, when the `checked` variable changes for example.
419
- this.emitChangeEvent();
420
- }
421
- onChangeEvent(event) {
422
- // We always have to stop propagation on the change event.
423
- // Otherwise the change event, from the input element, will bubble up and
424
- // emit its event object to the `change` output.
425
- event.stopPropagation();
426
- }
427
- emitChangeEvent() {
428
- this.onChange?.(this.checked);
429
- this.checkedChange.emit(this.checked);
430
- this.syncField('checked', this.checked);
431
- }
432
- syncField(field, value) {
433
- const element = this.inputElementRef?.nativeElement;
434
- if (!element) {
435
- return;
436
- }
437
- this._renderer.setProperty(element, field, value);
438
- }
439
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiToggle, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
440
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiToggle, selector: "bbi-toggle", inputs: { checked: "checked", disabled: "disabled", grouped: "grouped", required: "required", hideText: "hideText" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "class.grouped": "grouped", "class.required": "required" }, classAttribute: "bbi-toggle" }, providers: [
441
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbiToggle), multi: true }
442
- ], viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input #input\n [id]=\"labelId\"\n [disabled]=\"disabled\"\n [checked]=\"checked\"\n (change)=\"onChangeEvent($event)\"\n (click)=\"onClickEvent($event)\"\n (blur)=\"onTouched()\"\n class=\"bbi-toggle-input\"\n type=\"checkbox\">\n<label [attr.for]=\"labelId\"\n class=\"bbi-toggle-label\">\n <div class=\"bbi-toggle-switch\"></div>\n <span *ngIf=\"!hideText\"\n class=\"bbi-toggle-text\"><ng-content></ng-content></span>\n</label>\n", styles: [".bbi-toggle{display:block}.bbi-toggle.grouped{margin-bottom:var(--toggle-grouping, 20px)}.bbi-toggle-input{border:0;width:1px;padding:0;height:1px;margin:-1px;overflow:hidden;position:absolute;visibility:inherit;white-space:nowrap;clip:rect(0,0,0,0)}.bbi-toggle-switch{display:block;position:relative;width:var(--toggle-width, 40px);height:var(--toggle-height, 20px);min-width:var(--toggle-width, 40px);min-height:var(--toggle-height, 20px);outline-offset:var(--toggle-outline-offset, 1px);border-radius:calc(var(--toggle-height, 20px) / 2);background-color:var(--toggle-colors-background, #aeaeae);outline:var(--toggle-outline-thickness, 2px) solid transparent;transition:background-color 70ms cubic-bezier(.2,0,1,.9)}.bbi-toggle-switch:before{content:\"\";position:absolute;border-radius:50%;top:calc(.125 * var(--toggle-height, 20px));width:calc(.75 * var(--toggle-height, 20px));height:calc(.75 * var(--toggle-height, 20px));left:calc(.125 * var(--toggle-height, 20px));background-color:var(--toggle-colors-indicator, #ffffff);transition:transform 70ms cubic-bezier(.2,0,1,.9)}.bbi-toggle-input:checked+.bbi-toggle-label>.bbi-toggle-switch{background-color:var(--toggle-colors-accent, var(--accent-color, #1565c0))}.bbi-toggle-input:checked+.bbi-toggle-label>.bbi-toggle-switch:before{transform:translate(calc(var(--toggle-width, 40px) - .75 * var(--toggle-height, 20px) - .125 * var(--toggle-height, 20px) * 2))}.bbi-toggle-input:focus+.bbi-toggle-label>.bbi-toggle-switch{outline-color:var(--toggle-outline-color, var(--accent-color, #1565c0))}.bbi-toggle-input:disabled+.bbi-toggle-label{cursor:not-allowed}.bbi-toggle-input:disabled+.bbi-toggle-label>.bbi-toggle-text{color:var(--toggle-colors-disabled, #c6c6c6)}.bbi-toggle-label{display:flex;cursor:pointer;align-items:center}.bbi-toggle-text{color:var(--toggle-label-color, #111111);padding-left:var(--toggle-label-offset, 6px);font-size:var(--toggle-label-font-size, 16px);font-weight:var(--toggle-label-font-weight, 400);line-height:var(--toggle-label-line-height, 1.28)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
443
- }
444
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiToggle, decorators: [{
445
- type: Component,
446
- args: [{ selector: 'bbi-toggle', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
447
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbiToggle), multi: true }
448
- ], host: {
449
- 'class': 'bbi-toggle',
450
- '[class.grouped]': 'grouped',
451
- '[class.required]': 'required'
452
- }, preserveWhitespaces: false, template: "<input #input\n [id]=\"labelId\"\n [disabled]=\"disabled\"\n [checked]=\"checked\"\n (change)=\"onChangeEvent($event)\"\n (click)=\"onClickEvent($event)\"\n (blur)=\"onTouched()\"\n class=\"bbi-toggle-input\"\n type=\"checkbox\">\n<label [attr.for]=\"labelId\"\n class=\"bbi-toggle-label\">\n <div class=\"bbi-toggle-switch\"></div>\n <span *ngIf=\"!hideText\"\n class=\"bbi-toggle-text\"><ng-content></ng-content></span>\n</label>\n", styles: [".bbi-toggle{display:block}.bbi-toggle.grouped{margin-bottom:var(--toggle-grouping, 20px)}.bbi-toggle-input{border:0;width:1px;padding:0;height:1px;margin:-1px;overflow:hidden;position:absolute;visibility:inherit;white-space:nowrap;clip:rect(0,0,0,0)}.bbi-toggle-switch{display:block;position:relative;width:var(--toggle-width, 40px);height:var(--toggle-height, 20px);min-width:var(--toggle-width, 40px);min-height:var(--toggle-height, 20px);outline-offset:var(--toggle-outline-offset, 1px);border-radius:calc(var(--toggle-height, 20px) / 2);background-color:var(--toggle-colors-background, #aeaeae);outline:var(--toggle-outline-thickness, 2px) solid transparent;transition:background-color 70ms cubic-bezier(.2,0,1,.9)}.bbi-toggle-switch:before{content:\"\";position:absolute;border-radius:50%;top:calc(.125 * var(--toggle-height, 20px));width:calc(.75 * var(--toggle-height, 20px));height:calc(.75 * var(--toggle-height, 20px));left:calc(.125 * var(--toggle-height, 20px));background-color:var(--toggle-colors-indicator, #ffffff);transition:transform 70ms cubic-bezier(.2,0,1,.9)}.bbi-toggle-input:checked+.bbi-toggle-label>.bbi-toggle-switch{background-color:var(--toggle-colors-accent, var(--accent-color, #1565c0))}.bbi-toggle-input:checked+.bbi-toggle-label>.bbi-toggle-switch:before{transform:translate(calc(var(--toggle-width, 40px) - .75 * var(--toggle-height, 20px) - .125 * var(--toggle-height, 20px) * 2))}.bbi-toggle-input:focus+.bbi-toggle-label>.bbi-toggle-switch{outline-color:var(--toggle-outline-color, var(--accent-color, #1565c0))}.bbi-toggle-input:disabled+.bbi-toggle-label{cursor:not-allowed}.bbi-toggle-input:disabled+.bbi-toggle-label>.bbi-toggle-text{color:var(--toggle-colors-disabled, #c6c6c6)}.bbi-toggle-label{display:flex;cursor:pointer;align-items:center}.bbi-toggle-text{color:var(--toggle-label-color, #111111);padding-left:var(--toggle-label-offset, 6px);font-size:var(--toggle-label-font-size, 16px);font-weight:var(--toggle-label-font-weight, 400);line-height:var(--toggle-label-line-height, 1.28)}\n"] }]
453
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { inputElementRef: [{
454
- type: ViewChild,
455
- args: ['input', { static: true }]
456
- }], checkedChange: [{
457
- type: Output
458
- }], checked: [{
459
- type: Input
460
- }], disabled: [{
461
- type: Input
462
- }], grouped: [{
463
- type: Input
464
- }], required: [{
465
- type: Input
466
- }], hideText: [{
467
- type: Input
468
- }] } });
469
-
470
- class ToggleModule {
471
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
472
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: ToggleModule, declarations: [BbiToggle, BbiToggleGroup], imports: [CommonModule, UtilsModule], exports: [BbiToggle, BbiToggleGroup] }); }
473
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ToggleModule, imports: [CommonModule, UtilsModule] }); }
474
- }
475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ToggleModule, decorators: [{
476
- type: NgModule,
477
- args: [{
478
- imports: [CommonModule, UtilsModule],
479
- declarations: [BbiToggle, BbiToggleGroup],
480
- exports: [BbiToggle, BbiToggleGroup]
481
- }]
482
- }] });
483
-
484
- function shouldShowErrors(mode, control, submitted, focused, readonly) {
485
- if (mode === 'hidden' || readonly || control?.disabled) {
486
- return false;
487
- }
488
- // When submitted always show the errors.
489
- if (submitted && !focused) {
490
- return true;
491
- }
492
- // We want to show changes even when the user is focused.
493
- if (mode === 'changes') {
494
- return control?.dirty ?? false;
495
- }
496
- // On blur show the error.
497
- if (mode === 'blur' && !focused) {
498
- return control?.touched ?? false;
499
- }
500
- // Must not show the errors.
501
- return false;
502
- }
503
-
504
- class BbiControlErrorSubmit {
505
- constructor(_elementRef) {
506
- this._elementRef = _elementRef;
507
- // State.
508
- this._submitted$ = new BehaviorSubject(false);
509
- // Subscriptions.
510
- this._subscription = new Subscription();
511
- }
512
- ngOnInit() {
513
- this.handleNativeForm();
514
- }
515
- get submitted() {
516
- return this._submitted$.getValue();
517
- }
518
- submit() {
519
- this._submitted$.next(true);
520
- }
521
- reset() {
522
- this._submitted$.next(false);
523
- }
524
- handleNativeForm() {
525
- const element = this._elementRef?.nativeElement;
526
- if (!element) {
527
- return;
528
- }
529
- const formSubmit$ = fromEvent(element, 'submit').pipe(map(() => true));
530
- const formReset$ = fromEvent(element, 'reset').pipe(map(() => false));
531
- const subscription = merge(formSubmit$, formReset$).subscribe(submitted => {
532
- this._submitted$.next(submitted);
533
- });
534
- this._subscription.add(subscription);
535
- }
536
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiControlErrorSubmit, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
537
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: BbiControlErrorSubmit, selector: "form", exportAs: ["bbiControlErrorSubmit"], ngImport: i0 }); }
538
- }
539
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiControlErrorSubmit, decorators: [{
540
- type: Directive,
541
- args: [{
542
- selector: 'form',
543
- exportAs: 'bbiControlErrorSubmit'
544
- }]
545
- }], ctorParameters: () => [{ type: i0.ElementRef }] });
546
-
547
- const BBI_CONTROL_ERRORS = new InjectionToken('bbi_control_errors');
548
-
549
- const controlErrorAnimation = trigger('errorAnimation', [
550
- transition(':enter', [
551
- style({ height: 0, opacity: 0, overflow: 'hidden' }),
552
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ height: '*' })),
553
- animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1 }))
554
- ]),
555
- transition(':leave', [
556
- style({ overflow: 'hidden' }),
557
- animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 })),
558
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ height: 0 }))
559
- ])
560
- ]);
561
-
562
- class BbiControlError {
563
- // Inputs.
564
- set errors(errors) {
565
- this.error = this.parseError(errors);
566
- }
567
- constructor(_localize, _functions) {
568
- this._localize = _localize;
569
- this._functions = _functions;
570
- // Readonly data.
571
- this.errorFunctions = (this._functions ?? [])
572
- .reduce((previous, current) => ({ ...previous, ...current }), {});
573
- // Host bindings.
574
- this.animation = true;
575
- // State.
576
- this.error = null;
577
- }
578
- parseError(errors) {
579
- const errorName = Object.keys(errors ?? {})?.[0] ?? null;
580
- if (!errorName) {
581
- return null;
582
- }
583
- const errorFunction = this.errorFunctions?.[errorName] ?? this.errorFunctions?.['unknown'] ?? null;
584
- if (!errorFunction) {
585
- return null;
586
- }
587
- const errorData = errors?.[errorName] ?? {};
588
- const result = errorFunction(errorData);
589
- if (!result) {
590
- return null;
591
- }
592
- const resultObject = typeof result === 'string' ? { token: result } : result;
593
- return this.getErrorSentence(resultObject);
594
- }
595
- getErrorSentence(data) {
596
- return !!this._localize
597
- ? this._localize.translate(data)
598
- : data?.token;
599
- }
600
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiControlError, deps: [{ token: i1.Localize, optional: true }, { token: BBI_CONTROL_ERRORS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
601
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiControlError, selector: "bbi-control-error", inputs: { errors: "errors" }, host: { properties: { "@errorAnimation": "this.animation" }, classAttribute: "bbi-control-error" }, ngImport: i0, template: "{{ error ?? '...' }}\n", styles: [".bbi-control-error{color:var(--control-error-color, var(--error-color, #bd322a));display:block;margin-top:var(--control-error-spacing, 4px);font-size:var(--control-error-font-size, 13px);font-weight:var(--control-error-font-weight, 400);line-height:var(--control-error-line-height, 1.5)}\n"], animations: [controlErrorAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
602
- }
603
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiControlError, decorators: [{
604
- type: Component,
605
- args: [{ selector: 'bbi-control-error', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bbi-control-error' }, preserveWhitespaces: false, animations: [controlErrorAnimation], template: "{{ error ?? '...' }}\n", styles: [".bbi-control-error{color:var(--control-error-color, var(--error-color, #bd322a));display:block;margin-top:var(--control-error-spacing, 4px);font-size:var(--control-error-font-size, 13px);font-weight:var(--control-error-font-weight, 400);line-height:var(--control-error-line-height, 1.5)}\n"] }]
606
- }], ctorParameters: () => [{ type: i1.Localize, decorators: [{
607
- type: Optional
608
- }] }, { type: undefined, decorators: [{
609
- type: Optional
610
- }, {
611
- type: Inject,
612
- args: [BBI_CONTROL_ERRORS]
613
- }] }], propDecorators: { animation: [{
614
- type: HostBinding,
615
- args: ['@errorAnimation']
616
- }], errors: [{
617
- type: Input
618
- }] } });
619
-
620
- class BbiRadioGroup {
621
- // Value.
622
- get value() {
623
- return this._value;
624
- }
625
- set value(value) {
626
- this._value = value;
627
- this._changeDetectorRef.markForCheck();
628
- }
629
- // Disabled.
630
- get disabled() {
631
- return this._disabled;
632
- }
633
- set disabled(value) {
634
- const newValue = coerceBooleanProperty(value);
635
- if (newValue !== this.disabled) {
636
- this._disabled = newValue;
637
- this._changeDetectorRef.markForCheck();
638
- }
639
- }
640
- // Grouped.
641
- get grouped() {
642
- return this._grouped;
643
- }
644
- set grouped(value) {
645
- const newValue = coerceBooleanProperty(value);
646
- if (newValue !== this.grouped) {
647
- this._grouped = newValue;
648
- this._changeDetectorRef.markForCheck();
649
- }
650
- }
651
- // Readonly.
652
- get readonly() {
653
- return this._readonly;
654
- }
655
- set readonly(value) {
656
- const newValue = coerceBooleanProperty(value);
657
- if (newValue !== this.grouped) {
658
- this._readonly = newValue;
659
- this._changeDetectorRef.markForCheck();
660
- }
661
- }
662
- // Required.
663
- get required() {
664
- return this._required;
665
- }
666
- set required(value) {
667
- const newValue = coerceBooleanProperty(value);
668
- if (newValue !== this.required) {
669
- this._required = newValue;
670
- this._changeDetectorRef.markForCheck();
671
- }
672
- }
673
- // Inline.
674
- get inline() {
675
- return this._inline;
676
- }
677
- set inline(value) {
678
- const newValue = coerceBooleanProperty(value);
679
- if (newValue !== this.inline) {
680
- this._inline = newValue;
681
- this._changeDetectorRef.markForCheck();
682
- }
683
- }
684
- constructor(_injector, _changeDetectorRef, _errorSubmit) {
685
- this._injector = _injector;
686
- this._changeDetectorRef = _changeDetectorRef;
687
- this._errorSubmit = _errorSubmit;
688
- // Inputs.
689
- this.label = null;
690
- this.errorMode = 'blur';
691
- // Outputs.
692
- this.valueChange = new EventEmitter();
693
- // State.
694
- this.validationErrors$ = new BehaviorSubject(null);
695
- this._value = null;
696
- this._disabled = false;
697
- this._grouped = false;
698
- this._readonly = false;
699
- this._required = false;
700
- this._inline = false;
701
- // Methods.
702
- this.onChange = () => ({});
703
- this.onTouched = () => ({});
704
- }
705
- ngDoCheck() {
706
- const control = this._injector.get(NgControl);
707
- const submitted = this._errorSubmit?.submitted;
708
- const hasErrors = shouldShowErrors(this.errorMode, control, submitted, false, this.readonly);
709
- const errors = control?.errors ?? null;
710
- const newValue = hasErrors ? errors : null;
711
- const equal = JSON.stringify(newValue) === JSON.stringify(this.validationErrors$.getValue());
712
- if (equal) {
713
- return;
714
- }
715
- this.validationErrors$.next(newValue);
716
- }
717
- select(value) {
718
- if (this.value === value || this.disabled || this.readonly) {
719
- return;
720
- }
721
- this.value = value;
722
- this.onChange?.(this.value);
723
- this.valueChange.emit(this.value);
724
- this.onTouched?.();
725
- }
726
- registerOnChange(fn) {
727
- this.onChange = fn;
728
- }
729
- registerOnTouched(fn) {
730
- this.onTouched = fn;
731
- }
732
- setDisabledState(isDisabled) {
733
- this.disabled = isDisabled;
734
- }
735
- writeValue(newValue) {
736
- this.value = newValue;
737
- }
738
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiRadioGroup, deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: BbiControlErrorSubmit, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
739
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiRadioGroup, selector: "bbi-radio-group", inputs: { label: "label", errorMode: "errorMode", value: "value", disabled: "disabled", grouped: "grouped", readonly: "readonly", required: "required", inline: "inline" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.disabled": "disabled", "class.readonly": "readonly", "class.grouped": "grouped", "class.required": "required", "class.inline": "inline", "class.error": "validationErrors$?.getValue()" }, classAttribute: "bbi-radio-group" }, providers: [
740
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbiRadioGroup), multi: true }
741
- ], ngImport: i0, template: "<label *ngIf=\"label as labelContent\"\n class=\"bbi-radio-group-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-radio-group-items\">\n <ng-content select=\"bbi-radio-button\"></ng-content>\n</div>\n\n<bbi-control-error *ngIf=\"validationErrors$ | async as errors\"\n [errors]=\"errors\">\n</bbi-control-error>\n", styles: [".bbi-radio-group{display:block}.bbi-radio-group.grouped{margin-bottom:var(--radio-group-grouping, 20px)}.bbi-radio-group.readonly{pointer-events:none}.bbi-radio-group.error>.bbi-radio-group-label{color:var(--radio-group-error, var(--error-color, #bd322a))}.bbi-radio-group.required>.bbi-radio-group-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bbi-radio-group-label{border:0;padding:0;font-family:inherit;display:inline-block;box-sizing:border-box;vertical-align:initial;color:var(--radio-group-label-color, #525252);font-size:var(--radio-group-label-font-size, 14px);margin-bottom:var(--radio-group-label-offset, 4px);line-height:var(--radio-group-label-line-height, 1.33);font-weight:var(--radio-group-label-font-weight, 400)}.bbi-radio-group-items{display:flex;flex-direction:column}.bbi-radio-group-items:not(:empty){margin-bottom:-var(--radio-group-item-spacing-vertical,4px)}.bbi-radio-group-items>*{margin-bottom:var(--radio-group-item-spacing-vertical, 4px)}@media only screen and (min-width: 768px){.bbi-radio-group.inline>.bbi-radio-group-items{flex-wrap:wrap;flex-direction:row}.bbi-radio-group.inline>.bbi-radio-group-items>*:not(:last-child){margin-right:var(--radio-group-item-spacing-horizontal, 10px)}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BbiControlError, selector: "bbi-control-error", inputs: ["errors"] }, { kind: "directive", type: i2$1.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
742
- }
743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiRadioGroup, decorators: [{
744
- type: Component,
745
- args: [{ selector: 'bbi-radio-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
746
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbiRadioGroup), multi: true }
747
- ], host: {
748
- 'class': 'bbi-radio-group',
749
- '[class.disabled]': 'disabled',
750
- '[class.readonly]': 'readonly',
751
- '[class.grouped]': 'grouped',
752
- '[class.required]': 'required',
753
- '[class.inline]': 'inline',
754
- '[class.error]': 'validationErrors$?.getValue()'
755
- }, preserveWhitespaces: false, template: "<label *ngIf=\"label as labelContent\"\n class=\"bbi-radio-group-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-radio-group-items\">\n <ng-content select=\"bbi-radio-button\"></ng-content>\n</div>\n\n<bbi-control-error *ngIf=\"validationErrors$ | async as errors\"\n [errors]=\"errors\">\n</bbi-control-error>\n", styles: [".bbi-radio-group{display:block}.bbi-radio-group.grouped{margin-bottom:var(--radio-group-grouping, 20px)}.bbi-radio-group.readonly{pointer-events:none}.bbi-radio-group.error>.bbi-radio-group-label{color:var(--radio-group-error, var(--error-color, #bd322a))}.bbi-radio-group.required>.bbi-radio-group-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bbi-radio-group-label{border:0;padding:0;font-family:inherit;display:inline-block;box-sizing:border-box;vertical-align:initial;color:var(--radio-group-label-color, #525252);font-size:var(--radio-group-label-font-size, 14px);margin-bottom:var(--radio-group-label-offset, 4px);line-height:var(--radio-group-label-line-height, 1.33);font-weight:var(--radio-group-label-font-weight, 400)}.bbi-radio-group-items{display:flex;flex-direction:column}.bbi-radio-group-items:not(:empty){margin-bottom:-var(--radio-group-item-spacing-vertical,4px)}.bbi-radio-group-items>*{margin-bottom:var(--radio-group-item-spacing-vertical, 4px)}@media only screen and (min-width: 768px){.bbi-radio-group.inline>.bbi-radio-group-items{flex-wrap:wrap;flex-direction:row}.bbi-radio-group.inline>.bbi-radio-group-items>*:not(:last-child){margin-right:var(--radio-group-item-spacing-horizontal, 10px)}}\n"] }]
756
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: BbiControlErrorSubmit, decorators: [{
757
- type: Optional
758
- }] }], propDecorators: { label: [{
759
- type: Input
760
- }], errorMode: [{
761
- type: Input
762
- }], valueChange: [{
763
- type: Output
764
- }], value: [{
765
- type: Input
766
- }], disabled: [{
767
- type: Input
768
- }], grouped: [{
769
- type: Input
770
- }], readonly: [{
771
- type: Input
772
- }], required: [{
773
- type: Input
774
- }], inline: [{
775
- type: Input
776
- }] } });
777
-
778
- class BbiRadioButton {
779
- // Disabled.
780
- get disabled() {
781
- return this._radioGroup?.disabled || this._disabled;
782
- }
783
- set disabled(value) {
784
- const newValue = coerceBooleanProperty(value);
785
- if (newValue !== this.disabled) {
786
- this._disabled = newValue;
787
- this._changeDetectorRef.markForCheck();
788
- }
789
- }
790
- // Hide text.
791
- get hideText() {
792
- return this._hideText;
793
- }
794
- set hideText(value) {
795
- const newValue = coerceBooleanProperty(value);
796
- if (newValue !== this.hideText) {
797
- this._hideText = newValue;
798
- this._changeDetectorRef.markForCheck();
799
- }
800
- }
801
- onClick() {
802
- if (this.disabled) {
803
- return;
804
- }
805
- this._radioGroup.select(this.value);
806
- }
807
- onSpacePressed() {
808
- return this.onClick();
809
- }
810
- get selected() {
811
- return this._radioGroup?.value === this.value;
812
- }
813
- constructor(_radioGroup, _changeDetectorRef) {
814
- this._radioGroup = _radioGroup;
815
- this._changeDetectorRef = _changeDetectorRef;
816
- // Inputs.
817
- this.value = null;
818
- this._disabled = false;
819
- this._hideText = false;
820
- }
821
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiRadioButton, deps: [{ token: BbiRadioGroup }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
822
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiRadioButton, selector: "bbi-radio-button", inputs: { value: "value", disabled: "disabled", hideText: "hideText" }, host: { listeners: { "click": "onClick()", "keydown.space": "onSpacePressed()" }, properties: { "class.disabled": "disabled", "tabindex": "disabled ? -1 : 0", "class.selected": "this.selected" }, classAttribute: "bbi-radio-button" }, ngImport: i0, template: "<div class=\"bbi-radio-button-indicator\"></div>\n<span *ngIf=\"!hideText\"\n class=\"bbi-radio-button-text\"><ng-content></ng-content></span>\n", styles: [".bbi-radio-button{display:flex;cursor:pointer;align-items:center}.bbi-radio-button:not(.disabled):focus>.bbi-radio-button-indicator{outline-color:var(--radio-button-outline-color, var(--accent-color, #1565c0))}.bbi-radio-button.disabled{-webkit-user-select:none;user-select:none;cursor:not-allowed}.bbi-radio-button.disabled>.bbi-radio-button-indicator{border-color:var(--radio-button-colors-disabled, #c6c6c6)}.bbi-radio-button.disabled>.bbi-radio-button-text{color:var(--radio-button-colors-disabled, #c6c6c6)}.bbi-radio-button.selected>.bbi-radio-button-indicator{border-color:var(--radio-button-colors-accent, var(--accent-color, #1565c0))}.bbi-radio-button.selected>.bbi-radio-button-indicator:after{opacity:1;transform:none}.bbi-radio-button-indicator{display:flex;align-items:center;justify-content:center;width:var(--radio-button-size, 20px);height:var(--radio-button-size, 20px);min-width:var(--radio-button-size, 20px);min-height:var(--radio-button-size, 20px);border-radius:var(--radio-button-border-radius, 50%);outline-offset:var(--radio-button-outline-offset, 1px);outline:var(--radio-button-outline-thickness, 2px) solid transparent;border:var(--radio-button-border-thickness, 1px) solid var(--radio-button-border-color, #111111);transition:outline-color .2s cubic-bezier(0,0,.2,1),border-color .18s cubic-bezier(0,0,.2,1)}.bbi-radio-button-indicator:after{opacity:0;content:\"\";display:block;transform:scale(0);width:calc(var(--radio-button-size, 20px) / 2);height:calc(var(--radio-button-size, 20px) / 2);border-radius:var(--radio-button-border-radius, 50%);background-color:var(--radio-button-colors-accent, var(--accent-color, #1565c0));transition:transform .1s cubic-bezier(0,0,.2,1)}.bbi-radio-button-text{color:var(--radio-button-label-color, #111111);padding-left:var(--radio-button-label-offset, 6px);font-size:var(--radio-button-label-font-size, 16px);font-weight:var(--radio-button-label-font-weight, 400);line-height:var(--radio-button-label-line-height, 1.28)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
823
- }
824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiRadioButton, decorators: [{
825
- type: Component,
826
- args: [{ selector: 'bbi-radio-button', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
827
- 'class': 'bbi-radio-button',
828
- '[class.disabled]': 'disabled',
829
- '[tabindex]': 'disabled ? -1 : 0'
830
- }, preserveWhitespaces: false, template: "<div class=\"bbi-radio-button-indicator\"></div>\n<span *ngIf=\"!hideText\"\n class=\"bbi-radio-button-text\"><ng-content></ng-content></span>\n", styles: [".bbi-radio-button{display:flex;cursor:pointer;align-items:center}.bbi-radio-button:not(.disabled):focus>.bbi-radio-button-indicator{outline-color:var(--radio-button-outline-color, var(--accent-color, #1565c0))}.bbi-radio-button.disabled{-webkit-user-select:none;user-select:none;cursor:not-allowed}.bbi-radio-button.disabled>.bbi-radio-button-indicator{border-color:var(--radio-button-colors-disabled, #c6c6c6)}.bbi-radio-button.disabled>.bbi-radio-button-text{color:var(--radio-button-colors-disabled, #c6c6c6)}.bbi-radio-button.selected>.bbi-radio-button-indicator{border-color:var(--radio-button-colors-accent, var(--accent-color, #1565c0))}.bbi-radio-button.selected>.bbi-radio-button-indicator:after{opacity:1;transform:none}.bbi-radio-button-indicator{display:flex;align-items:center;justify-content:center;width:var(--radio-button-size, 20px);height:var(--radio-button-size, 20px);min-width:var(--radio-button-size, 20px);min-height:var(--radio-button-size, 20px);border-radius:var(--radio-button-border-radius, 50%);outline-offset:var(--radio-button-outline-offset, 1px);outline:var(--radio-button-outline-thickness, 2px) solid transparent;border:var(--radio-button-border-thickness, 1px) solid var(--radio-button-border-color, #111111);transition:outline-color .2s cubic-bezier(0,0,.2,1),border-color .18s cubic-bezier(0,0,.2,1)}.bbi-radio-button-indicator:after{opacity:0;content:\"\";display:block;transform:scale(0);width:calc(var(--radio-button-size, 20px) / 2);height:calc(var(--radio-button-size, 20px) / 2);border-radius:var(--radio-button-border-radius, 50%);background-color:var(--radio-button-colors-accent, var(--accent-color, #1565c0));transition:transform .1s cubic-bezier(0,0,.2,1)}.bbi-radio-button-text{color:var(--radio-button-label-color, #111111);padding-left:var(--radio-button-label-offset, 6px);font-size:var(--radio-button-label-font-size, 16px);font-weight:var(--radio-button-label-font-weight, 400);line-height:var(--radio-button-label-line-height, 1.28)}\n"] }]
831
- }], ctorParameters: () => [{ type: BbiRadioGroup }, { type: i0.ChangeDetectorRef }], propDecorators: { value: [{
832
- type: Input
833
- }], disabled: [{
834
- type: Input
835
- }], hideText: [{
836
- type: Input
837
- }], onClick: [{
838
- type: HostListener,
839
- args: ['click']
840
- }], onSpacePressed: [{
841
- type: HostListener,
842
- args: ['keydown.space']
843
- }], selected: [{
844
- type: HostBinding,
845
- args: ['class.selected']
846
- }] } });
847
-
848
- class ControlErrorModule {
849
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ControlErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
850
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: ControlErrorModule, declarations: [BbiControlError, BbiControlErrorSubmit], imports: [CommonModule], exports: [BbiControlError, BbiControlErrorSubmit] }); }
851
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ControlErrorModule, imports: [CommonModule] }); }
852
- }
853
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ControlErrorModule, decorators: [{
854
- type: NgModule,
855
- args: [{
856
- imports: [CommonModule],
857
- declarations: [BbiControlError, BbiControlErrorSubmit],
858
- exports: [BbiControlError, BbiControlErrorSubmit]
859
- }]
860
- }] });
861
-
862
- class RadioModule {
863
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
864
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: RadioModule, declarations: [BbiRadioGroup, BbiRadioButton], imports: [CommonModule, ControlErrorModule, UtilsModule], exports: [BbiRadioGroup, BbiRadioButton] }); }
865
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RadioModule, imports: [CommonModule, ControlErrorModule, UtilsModule] }); }
866
- }
867
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RadioModule, decorators: [{
868
- type: NgModule,
869
- args: [{
870
- imports: [CommonModule, ControlErrorModule, UtilsModule],
871
- declarations: [BbiRadioGroup, BbiRadioButton],
872
- exports: [BbiRadioGroup, BbiRadioButton]
873
- }]
874
- }] });
875
-
876
- class BbiFormControlInput {
877
- constructor(_elementRef, _formControl, _changeDetectorRef, _ngControl) {
878
- this._elementRef = _elementRef;
879
- this._formControl = _formControl;
880
- this._changeDetectorRef = _changeDetectorRef;
881
- this._ngControl = _ngControl;
882
- // Readonly data.
883
- this.labelId = this._formControl?.labelId ?? null;
884
- // State.
885
- this.errors = null;
886
- this.focused = false;
887
- // Subscriptions.
888
- this._subscription = new Subscription();
889
- this._disabled = false;
890
- this._readonly = false;
891
- this._required = false;
892
- }
893
- ngOnInit() {
894
- this.handleControlDisabledStatus();
895
- this.handleControlErrorStatus();
896
- this.handleFocusedState();
897
- }
898
- ngOnDestroy() {
899
- this._subscription?.unsubscribe();
900
- }
901
- get control() {
902
- return this._ngControl ?? null;
903
- }
904
- get disabled() { return this._disabled; }
905
- set disabled(value) {
906
- const newValue = coerceBooleanProperty(value);
907
- if (newValue !== this.disabled) {
908
- this._disabled = newValue;
909
- this._changeDetectorRef.markForCheck();
910
- }
911
- }
912
- get readonly() { return this._readonly; }
913
- set readonly(value) {
914
- const newValue = coerceBooleanProperty(value);
915
- if (newValue !== this.readonly) {
916
- this._readonly = newValue;
917
- this._changeDetectorRef.markForCheck();
918
- }
919
- }
920
- get required() {
921
- if (this._ngControl) {
922
- return this._ngControl?.control?.hasValidator(Validators.required);
923
- }
924
- return this._required;
925
- }
926
- set required(value) {
927
- const newValue = coerceBooleanProperty(value);
928
- if (newValue !== this.required) {
929
- this._required = newValue;
930
- this._changeDetectorRef.markForCheck();
931
- }
932
- }
933
- handleControlErrorStatus() {
934
- if (!this._ngControl) {
935
- return;
936
- }
937
- const errors$ = this._ngControl.statusChanges.pipe(startWith(this._ngControl.status), map(() => this._ngControl?.errors ?? null));
938
- const subscription = errors$.subscribe(errors => {
939
- this.errors = errors;
940
- this._changeDetectorRef.markForCheck();
941
- });
942
- this._subscription.add(subscription);
943
- }
944
- handleControlDisabledStatus() {
945
- if (!this._ngControl) {
946
- return;
947
- }
948
- const disabled$ = this._ngControl.statusChanges.pipe(startWith(this._ngControl.status), map(status => status === 'DISABLED'), distinctUntilChanged());
949
- const subscription = disabled$.subscribe(disabled => {
950
- this.disabled = disabled;
951
- });
952
- this._subscription.add(subscription);
953
- }
954
- handleFocusedState() {
955
- const focus$ = fromEvent(this._elementRef.nativeElement, 'focus').pipe(map(() => true));
956
- const blur$ = fromEvent(this._elementRef.nativeElement, 'blur').pipe(map(() => false));
957
- const focused$ = merge(focus$, blur$).pipe(startWith(false), pairwise(), switchMap(([oldValue, currentValue]) => {
958
- if (oldValue && !currentValue) {
959
- return of(currentValue).pipe(delay(100));
960
- }
961
- return of(currentValue);
962
- }), distinctUntilChanged());
963
- const subscription = focused$.subscribe(focused => this.focused = focused);
964
- this._subscription.add(subscription);
965
- }
966
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiFormControlInput, deps: [{ token: i0.ElementRef }, { token: BbiFormControl }, { token: i0.ChangeDetectorRef }, { token: i2$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
967
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: BbiFormControlInput, selector: "input[bbiFormControlInput]", inputs: { disabled: "disabled", readonly: "readonly", required: "required" }, host: { properties: { "attr.id": "this.labelId", "required": "this.required" } }, ngImport: i0 }); }
968
- }
969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiFormControlInput, decorators: [{
970
- type: Directive,
971
- args: [{
972
- selector: 'input[bbiFormControlInput]'
973
- }]
974
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: BbiFormControl }, { type: i0.ChangeDetectorRef }, { type: i2$2.NgControl, decorators: [{
975
- type: Optional
976
- }, {
977
- type: Self
978
- }] }], propDecorators: { labelId: [{
979
- type: HostBinding,
980
- args: ['attr.id']
981
- }], disabled: [{
982
- type: Input
983
- }], readonly: [{
984
- type: Input
985
- }], required: [{
986
- type: HostBinding,
987
- args: ['required']
988
- }, {
989
- type: Input
990
- }] } });
991
-
992
- let nextUniqueId = 0;
993
- class BbiFormControl {
994
- // Grouped.
995
- get grouped() {
996
- return this._grouped;
997
- }
998
- set grouped(value) {
999
- const newValue = coerceBooleanProperty(value);
1000
- if (newValue !== this.grouped) {
1001
- this._grouped = newValue;
1002
- this._changeDetectorRef.markForCheck();
1003
- }
1004
- }
1005
- constructor(_changeDetectorRef, _errorSubmit) {
1006
- this._changeDetectorRef = _changeDetectorRef;
1007
- this._errorSubmit = _errorSubmit;
1008
- // Readonly data.
1009
- this.labelId = `bbi-form-control-${nextUniqueId++}`;
1010
- // Inputs.
1011
- this.label = null;
1012
- this.hint = null;
1013
- this.errorMode = 'blur';
1014
- // State.
1015
- this.validationErrors$ = new BehaviorSubject(null);
1016
- this._grouped = false;
1017
- }
1018
- ngDoCheck() {
1019
- const control = this.formControlInput?.control;
1020
- const submitted = this._errorSubmit?.submitted;
1021
- const focused = this.formControlInput?.focused;
1022
- const readonly = this.formControlInput?.readonly;
1023
- const hasErrors = shouldShowErrors(this.errorMode, control, submitted, focused, readonly);
1024
- const errors = this.formControlInput?.errors ?? null;
1025
- const newValue = hasErrors ? errors : null;
1026
- const equal = JSON.stringify(newValue) === JSON.stringify(this.validationErrors$.getValue());
1027
- if (equal) {
1028
- return;
1029
- }
1030
- this.validationErrors$.next(newValue);
1031
- }
1032
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiFormControl, deps: [{ token: i0.ChangeDetectorRef }, { token: BbiControlErrorSubmit, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1033
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiFormControl, selector: "bbi-form-control", inputs: { label: "label", hint: "hint", errorMode: "errorMode", grouped: "grouped" }, host: { properties: { "class.grouped": "grouped", "class.disabled": "formControlInput?.disabled", "class.required": "formControlInput?.required", "class.readonly": "formControlInput?.readonly", "class.focused": "formControlInput?.focused", "class.error": "validationErrors$?.getValue()" }, classAttribute: "bbi-form-control" }, queries: [{ propertyName: "formControlInput", first: true, predicate: BbiFormControlInput, descendants: true }], ngImport: i0, template: "<!-- Label of the form control. -->\n<label *ngIf=\"label as labelContent\"\n [attr.for]=\"labelId\"\n class=\"bbi-form-control-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-form-control-container\">\n <ng-content select=\"[bbi-form-control-addon=prefix]\"></ng-content>\n <ng-content select=\"input[bbiFormControlInput]\"></ng-content>\n <ng-content select=\"[bbi-form-control-addon=suffix]\"></ng-content>\n</div>\n\n<bbi-control-error *ngIf=\"validationErrors$ | async as errors\"\n [errors]=\"errors\">\n</bbi-control-error>\n\n<div *ngIf=\"hint as hintContent\"\n class=\"bbi-form-control-hint\">\n <ng-template [bbTemplate]=\"hintContent\">{{ hintContent }}</ng-template>\n</div>\n", styles: [".bbi-form-control{display:block}.bbi-form-control.grouped{margin-bottom:var(--form-control-grouping, 20px)}.bbi-form-control.disabled{pointer-events:none;opacity:var(--form-control-disabled-opacity, .25)}.bbi-form-control.disabled>.bbi-form-control-container{color:var(--form-control-disabled-color, #111111);background:var(--form-control-disabled-background, white);border-radius:var(--form-control-disabled-border-radius, 6px);border:var(--form-control-disabled-border-width, 1px) var(--form-control-disabled-border-style, solid) var(--form-control-disabled-border-color, #212121)}.bbi-form-control.required:not([data-required-visually-hidden])>.bbi-form-control-label:after{content:\"*\";color:#bd322a;font-size:14px;vertical-align:text-top}.bbi-form-control:not(.readonly).focused>.bbi-form-control-container{color:var(--form-control-focused-color, #111111);box-shadow:var(--form-control-focused-shadow, 0 0 0 3px rgba(0, 123, 255, .2));background:var(--form-control-focused-background, white);border-radius:var(--form-control-focused-border-radius, 6px);border:var(--form-control-focused-border-width, 1px) var(--form-control-focused-border-style, solid) var(--form-control-focused-border-color, #212121)}.bbi-form-control:not(.readonly).error>.bbi-form-control-label{color:var(--form-control-error-color, var(--error-color, #bd322a))}.bbi-form-control:not(.readonly).error>.bbi-form-control-container{color:var(--form-control-error-color, var(--error-color, #bd322a));border-color:var(--form-control-error-color, var(--error-color, #bd322a));background:var(--form-control-error-background, rgba(189, 50, 42, .1))}.bbi-form-control:not(.readonly).error>.bbi-form-control-container>input::placeholder{color:var(--form-control-error-placeholder-color, rgba(189, 50, 42, .4))}.bbi-form-control-label{color:#525252;display:block;font-size:14px;font-weight:400;margin-bottom:4px}.bbi-form-control-container{display:flex;align-items:center;color:var(--form-control-color, #111111);border-radius:var(--form-control-border-radius, 6px);background-color:var(--form-control-background, white);border:var(--form-control-border-width, 1px) var(--form-control-border-style, solid) var(--form-control-border-color, rgba(67, 90, 111, .3))}.bbi-form-control-container>input{width:100%;border:none;height:40px;color:inherit;padding:0 10px;background-color:transparent}.bbi-form-control-container>input::placeholder{color:#d2d2d2}.bbi-form-control-hint{display:block;color:#525252;font-size:13px;margin-top:4px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BbiControlError, selector: "bbi-control-error", inputs: ["errors"] }, { kind: "directive", type: i2$1.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1034
- }
1035
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiFormControl, decorators: [{
1036
- type: Component,
1037
- args: [{ selector: 'bbi-form-control', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1038
- 'class': 'bbi-form-control',
1039
- '[class.grouped]': 'grouped',
1040
- '[class.disabled]': 'formControlInput?.disabled',
1041
- '[class.required]': 'formControlInput?.required',
1042
- '[class.readonly]': 'formControlInput?.readonly',
1043
- '[class.focused]': 'formControlInput?.focused',
1044
- '[class.error]': 'validationErrors$?.getValue()'
1045
- }, preserveWhitespaces: false, template: "<!-- Label of the form control. -->\n<label *ngIf=\"label as labelContent\"\n [attr.for]=\"labelId\"\n class=\"bbi-form-control-label\">\n <ng-template [bbTemplate]=\"labelContent\">{{ labelContent }}</ng-template>\n</label>\n\n<div class=\"bbi-form-control-container\">\n <ng-content select=\"[bbi-form-control-addon=prefix]\"></ng-content>\n <ng-content select=\"input[bbiFormControlInput]\"></ng-content>\n <ng-content select=\"[bbi-form-control-addon=suffix]\"></ng-content>\n</div>\n\n<bbi-control-error *ngIf=\"validationErrors$ | async as errors\"\n [errors]=\"errors\">\n</bbi-control-error>\n\n<div *ngIf=\"hint as hintContent\"\n class=\"bbi-form-control-hint\">\n <ng-template [bbTemplate]=\"hintContent\">{{ hintContent }}</ng-template>\n</div>\n", styles: [".bbi-form-control{display:block}.bbi-form-control.grouped{margin-bottom:var(--form-control-grouping, 20px)}.bbi-form-control.disabled{pointer-events:none;opacity:var(--form-control-disabled-opacity, .25)}.bbi-form-control.disabled>.bbi-form-control-container{color:var(--form-control-disabled-color, #111111);background:var(--form-control-disabled-background, white);border-radius:var(--form-control-disabled-border-radius, 6px);border:var(--form-control-disabled-border-width, 1px) var(--form-control-disabled-border-style, solid) var(--form-control-disabled-border-color, #212121)}.bbi-form-control.required:not([data-required-visually-hidden])>.bbi-form-control-label:after{content:\"*\";color:#bd322a;font-size:14px;vertical-align:text-top}.bbi-form-control:not(.readonly).focused>.bbi-form-control-container{color:var(--form-control-focused-color, #111111);box-shadow:var(--form-control-focused-shadow, 0 0 0 3px rgba(0, 123, 255, .2));background:var(--form-control-focused-background, white);border-radius:var(--form-control-focused-border-radius, 6px);border:var(--form-control-focused-border-width, 1px) var(--form-control-focused-border-style, solid) var(--form-control-focused-border-color, #212121)}.bbi-form-control:not(.readonly).error>.bbi-form-control-label{color:var(--form-control-error-color, var(--error-color, #bd322a))}.bbi-form-control:not(.readonly).error>.bbi-form-control-container{color:var(--form-control-error-color, var(--error-color, #bd322a));border-color:var(--form-control-error-color, var(--error-color, #bd322a));background:var(--form-control-error-background, rgba(189, 50, 42, .1))}.bbi-form-control:not(.readonly).error>.bbi-form-control-container>input::placeholder{color:var(--form-control-error-placeholder-color, rgba(189, 50, 42, .4))}.bbi-form-control-label{color:#525252;display:block;font-size:14px;font-weight:400;margin-bottom:4px}.bbi-form-control-container{display:flex;align-items:center;color:var(--form-control-color, #111111);border-radius:var(--form-control-border-radius, 6px);background-color:var(--form-control-background, white);border:var(--form-control-border-width, 1px) var(--form-control-border-style, solid) var(--form-control-border-color, rgba(67, 90, 111, .3))}.bbi-form-control-container>input{width:100%;border:none;height:40px;color:inherit;padding:0 10px;background-color:transparent}.bbi-form-control-container>input::placeholder{color:#d2d2d2}.bbi-form-control-hint{display:block;color:#525252;font-size:13px;margin-top:4px}\n"] }]
1046
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BbiControlErrorSubmit, decorators: [{
1047
- type: Optional
1048
- }] }], propDecorators: { formControlInput: [{
1049
- type: ContentChild,
1050
- args: [BbiFormControlInput, { static: false }]
1051
- }], label: [{
1052
- type: Input
1053
- }], hint: [{
1054
- type: Input
1055
- }], errorMode: [{
1056
- type: Input
1057
- }], grouped: [{
1058
- type: Input
1059
- }] } });
1060
-
1061
- class BbiFormControlAddon {
1062
- constructor() {
1063
- // Inputs.
1064
- this.type = null;
1065
- }
1066
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiFormControlAddon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1067
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: BbiFormControlAddon, selector: "[bbi-form-control-addon]", inputs: { type: ["bbi-form-control-addon", "type"] }, host: { properties: { "class.prefix": "type === 'prefix'", "class.suffix": "type === 'suffix'" }, classAttribute: "bbi-form-control-addon" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [".bbi-form-control-addon{margin:0 10px;color:inherit;display:block}.bbi-form-control-addon.suffix{margin-left:0}.bbi-form-control-addon.prefix{margin-right:0}a.bbi-form-control-addon,button.bbi-form-control-addon{width:32px;height:32px;border:none;display:flex;appearance:none;margin-right:4px;border-radius:6px;align-items:center;text-decoration:none;justify-content:center;background-color:transparent}a.bbi-form-control-addon,a.bbi-form-control-addon:visited,button.bbi-form-control-addon,button.bbi-form-control-addon:visited{color:inherit}a.bbi-form-control-addon:hover,button.bbi-form-control-addon:hover{background-color:#1565c014}a.bbi-form-control-addon:focus,button.bbi-form-control-addon:focus{background-color:#1565c01f}a.bbi-form-control-addon:active,button.bbi-form-control-addon:active{background-color:#1565c029}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1068
- }
1069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: BbiFormControlAddon, decorators: [{
1070
- type: Component,
1071
- args: [{ selector: '[bbi-form-control-addon]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1072
- 'class': 'bbi-form-control-addon',
1073
- '[class.prefix]': 'type === \'prefix\'',
1074
- '[class.suffix]': 'type === \'suffix\''
1075
- }, preserveWhitespaces: false, template: "<ng-content></ng-content>\n", styles: [".bbi-form-control-addon{margin:0 10px;color:inherit;display:block}.bbi-form-control-addon.suffix{margin-left:0}.bbi-form-control-addon.prefix{margin-right:0}a.bbi-form-control-addon,button.bbi-form-control-addon{width:32px;height:32px;border:none;display:flex;appearance:none;margin-right:4px;border-radius:6px;align-items:center;text-decoration:none;justify-content:center;background-color:transparent}a.bbi-form-control-addon,a.bbi-form-control-addon:visited,button.bbi-form-control-addon,button.bbi-form-control-addon:visited{color:inherit}a.bbi-form-control-addon:hover,button.bbi-form-control-addon:hover{background-color:#1565c014}a.bbi-form-control-addon:focus,button.bbi-form-control-addon:focus{background-color:#1565c01f}a.bbi-form-control-addon:active,button.bbi-form-control-addon:active{background-color:#1565c029}\n"] }]
1076
- }], propDecorators: { type: [{
1077
- type: Input,
1078
- args: ['bbi-form-control-addon']
1079
- }] } });
1080
-
1081
- class FormControlModule {
1082
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FormControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1083
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: FormControlModule, declarations: [BbiFormControl,
1084
- BbiFormControlInput,
1085
- BbiFormControlAddon], imports: [CommonModule, ControlErrorModule, UtilsModule], exports: [BbiFormControl,
1086
- BbiFormControlInput,
1087
- BbiFormControlAddon] }); }
1088
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FormControlModule, imports: [CommonModule, ControlErrorModule, UtilsModule] }); }
1089
- }
1090
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FormControlModule, decorators: [{
1091
- type: NgModule,
1092
- args: [{
1093
- imports: [CommonModule, ControlErrorModule, UtilsModule],
1094
- declarations: [
1095
- BbiFormControl,
1096
- BbiFormControlInput,
1097
- BbiFormControlAddon
1098
- ],
1099
- exports: [
1100
- BbiFormControl,
1101
- BbiFormControlInput,
1102
- BbiFormControlAddon
1103
- ]
1104
- }]
1105
- }] });
1106
-
1107
- const controlErrorDefaults = {
1108
- unknown: () => 'form-control-errors.unknown',
1109
- required: () => 'form-control-errors.required',
1110
- pattern: () => 'form-control-errors.pattern',
1111
- email: () => 'form-control-errors.email',
1112
- emailTaken: () => 'form-control-errors.emailTaken',
1113
- passwordMatch: () => 'form-control-errors.passwordMatch',
1114
- confirm: () => 'form-control-errors.confirm',
1115
- fullNumber: () => 'form-control-errors.fullNumber',
1116
- min: ({ min }) => ({ token: 'form-control-errors.min', data: { min } }),
1117
- max: ({ max }) => ({ token: 'form-control-errors.max', data: { max } }),
1118
- maxFileSize: ({ maxSize }) => ({ token: 'form-control-errors.maxFileSize', data: { maxSize } }),
1119
- minDate: ({ date }) => ({ token: 'form-control-errors.minDate', data: { date } }),
1120
- maxDate: ({ date }) => ({ token: 'form-control-errors.maxDate', data: { date } }),
1121
- invalidDate: () => 'form-control-errors.invalidDate',
1122
- invalidFileType: () => 'form-control-errors.invalidFileType',
1123
- minlength: ({ requiredLength, actualLength }) => ({
1124
- token: 'form-control-errors.minlength',
1125
- data: { requiredLength, actualLength }
1126
- }),
1127
- maxlength: ({ requiredLength, actualLength }) => ({
1128
- token: 'form-control-errors.maxlength',
1129
- data: { requiredLength, actualLength }
1130
- })
1131
- };
1132
-
1133
- class ControlsModule {
1134
- static forRoot(config) {
1135
- return {
1136
- ngModule: ControlsModule,
1137
- providers: [
1138
- {
1139
- provide: BBI_CONTROL_ERRORS,
1140
- useValue: { ...controlErrorDefaults, ...(config?.errors ?? {}) },
1141
- multi: true
1142
- }
1143
- ]
1144
- };
1145
- }
1146
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ControlsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1147
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: ControlsModule, imports: [FormControlModule,
1148
- CheckboxModule,
1149
- RadioModule,
1150
- ToggleModule,
1151
- ControlErrorModule], exports: [FormControlModule,
1152
- CheckboxModule,
1153
- RadioModule,
1154
- ToggleModule,
1155
- ControlErrorModule] }); }
1156
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ControlsModule, imports: [FormControlModule,
1157
- CheckboxModule,
1158
- RadioModule,
1159
- ToggleModule,
1160
- ControlErrorModule, FormControlModule,
1161
- CheckboxModule,
1162
- RadioModule,
1163
- ToggleModule,
1164
- ControlErrorModule] }); }
1165
- }
1166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ControlsModule, decorators: [{
1167
- type: NgModule,
1168
- args: [{
1169
- imports: [
1170
- FormControlModule,
1171
- CheckboxModule,
1172
- RadioModule,
1173
- ToggleModule,
1174
- ControlErrorModule
1175
- ],
1176
- exports: [
1177
- FormControlModule,
1178
- CheckboxModule,
1179
- RadioModule,
1180
- ToggleModule,
1181
- ControlErrorModule
1182
- ]
1183
- }]
1184
- }] });
1185
-
1186
- /**
1187
- * Generated bundle index. Do not edit.
1188
- */
1189
-
1190
- export { BBI_CONTROL_ERRORS, BbiCheckbox, BbiCheckboxGroup, BbiControlError, BbiControlErrorSubmit, BbiFormControl, BbiFormControlAddon, BbiFormControlInput, BbiRadioButton, BbiRadioGroup, BbiToggle, BbiToggleGroup, CheckboxModule, ControlErrorModule, ControlsModule, FormControlModule, RadioModule, ToggleModule, controlErrorDefaults, shouldShowErrors };
1191
- //# sourceMappingURL=bravobit-bb-foundation-controls.mjs.map