@bravobit/bb-foundation 0.33.0 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) 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 +1 -1
  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 +20 -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 +8 -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 +6 -5
  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 +38 -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 +9 -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/miscellaneous/coercion.mjs +5 -0
  161. package/esm2022/lib/core/services/exif.service.mjs +3 -3
  162. package/esm2022/lib/core/services/file-loader.service.mjs +3 -3
  163. package/esm2022/lib/core/services/files.service.mjs +3 -3
  164. package/esm2022/lib/core/services/image-converter.service.mjs +3 -3
  165. package/esm2022/lib/core/services/languages.service.mjs +3 -3
  166. package/esm2022/lib/core/services/network.service.mjs +3 -3
  167. package/esm2022/lib/core/services/patch.service.mjs +3 -3
  168. package/esm2022/localize/lib/interfaces/config.interfaces.mjs +2 -7
  169. package/esm2022/localize/lib/interfaces/functions.interfaces.mjs +6 -6
  170. package/esm2022/localize/lib/localizations/dutch.localization.mjs +19 -1
  171. package/esm2022/localize/lib/localizations/english.localization.mjs +19 -1
  172. package/esm2022/localize/lib/localize.config.mjs +43 -0
  173. package/esm2022/localize/lib/localize.module.mjs +10 -54
  174. package/esm2022/localize/lib/localize.pipe.mjs +6 -5
  175. package/esm2022/localize/lib/localize.service.mjs +26 -13
  176. package/esm2022/localize/lib/localize.tokens.mjs +18 -0
  177. package/esm2022/localize/lib/transforms/interpolate.transform.mjs +3 -2
  178. package/esm2022/localize/lib/transforms/plural.transform.mjs +5 -3
  179. package/esm2022/localize/lib/transforms/reference.transform.mjs +5 -3
  180. package/esm2022/localize/lib/views/localize-string/localize-string.component.mjs +6 -10
  181. package/esm2022/localize/lib/views/localize-template.directive.mjs +6 -5
  182. package/esm2022/localize/public_api.mjs +3 -3
  183. package/esm2022/masking/lib/directives/currency-mask.directive.mjs +6 -5
  184. package/esm2022/masking/lib/directives/date-mask.directive.mjs +6 -5
  185. package/esm2022/masking/lib/directives/input-mask.directive.mjs +6 -5
  186. package/esm2022/masking/lib/masking.module.mjs +6 -6
  187. package/esm2022/masking/lib/masking.service.mjs +3 -3
  188. package/esm2022/notifications/lib/notifications-item/notifications-item.component.mjs +7 -9
  189. package/esm2022/notifications/lib/notifications-list/notifications-list.component.mjs +8 -8
  190. package/esm2022/notifications/lib/notifications.config.mjs +8 -0
  191. package/esm2022/notifications/lib/notifications.interfaces.mjs +3 -1
  192. package/esm2022/notifications/lib/notifications.module.mjs +8 -18
  193. package/esm2022/notifications/lib/notifications.service.mjs +14 -8
  194. package/esm2022/notifications/public_api.mjs +2 -1
  195. package/esm2022/permissions/lib/directives/permission.directive.mjs +6 -5
  196. package/esm2022/permissions/lib/guards/permission.guard.mjs +23 -54
  197. package/esm2022/permissions/lib/permissions.config.mjs +20 -0
  198. package/esm2022/permissions/lib/permissions.interface.mjs +3 -1
  199. package/esm2022/permissions/lib/permissions.module.mjs +9 -23
  200. package/esm2022/permissions/lib/permissions.service.mjs +8 -5
  201. package/esm2022/permissions/public_api.mjs +2 -1
  202. package/esm2022/public_api.mjs +2 -10
  203. package/esm2022/recaptcha/lib/recaptcha/recaptcha.component.mjs +12 -13
  204. package/esm2022/recaptcha/lib/recaptcha-loader.service.mjs +21 -36
  205. package/esm2022/recaptcha/lib/recaptcha.config.mjs +8 -0
  206. package/esm2022/recaptcha/lib/recaptcha.module.mjs +8 -8
  207. package/esm2022/recaptcha/public_api.mjs +2 -1
  208. package/esm2022/select/bravobit-bb-foundation-select.mjs +5 -0
  209. package/esm2022/select/lib/select/select.component.mjs +214 -0
  210. package/esm2022/select/lib/select-label.directive.mjs +17 -0
  211. package/esm2022/select/lib/select-option-group.directive.mjs +17 -0
  212. package/esm2022/select/lib/select-option.directive.mjs +17 -0
  213. package/esm2022/select/lib/select.module.mjs +35 -0
  214. package/esm2022/select/public_api.mjs +6 -0
  215. package/esm2022/storage/lib/storage.service.mjs +3 -3
  216. package/esm2022/storage/lib/strategies/polyfill-storage.strategy.mjs +2 -5
  217. package/esm2022/table/lib/components/table/table.component.mjs +21 -22
  218. package/esm2022/table/lib/components/table-cell/table-cell.component.mjs +5 -5
  219. package/esm2022/table/lib/components/table-header-cell/table-header-cell.component.mjs +14 -14
  220. package/esm2022/table/lib/components/table-pager/table-pager.component.mjs +15 -17
  221. package/esm2022/table/lib/table.module.mjs +23 -21
  222. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +11 -17
  223. package/esm2022/tooltip/lib/tooltip.directive.mjs +17 -27
  224. package/esm2022/tooltip/lib/tooltip.module.mjs +7 -22
  225. package/esm2022/tooltip/public_api.mjs +2 -2
  226. package/esm2022/utils/lib/directives/autosize.directive.mjs +9 -7
  227. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +6 -5
  228. package/esm2022/utils/lib/directives/focus.directive.mjs +6 -5
  229. package/esm2022/utils/lib/directives/template.directive.mjs +6 -5
  230. package/esm2022/utils/lib/utils.module.mjs +6 -6
  231. package/fesm2022/bravobit-bb-foundation-auth.mjs +140 -175
  232. package/fesm2022/bravobit-bb-foundation-auth.mjs.map +1 -1
  233. package/fesm2022/bravobit-bb-foundation-collections.mjs +451 -106
  234. package/fesm2022/bravobit-bb-foundation-collections.mjs.map +1 -1
  235. package/fesm2022/bravobit-bb-foundation-combobox.mjs +18 -18
  236. package/fesm2022/bravobit-bb-foundation-combobox.mjs.map +1 -1
  237. package/fesm2022/bravobit-bb-foundation-dashboard.mjs +106 -116
  238. package/fesm2022/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  239. package/fesm2022/bravobit-bb-foundation-dialog.mjs +125 -70
  240. package/fesm2022/bravobit-bb-foundation-dialog.mjs.map +1 -1
  241. package/fesm2022/bravobit-bb-foundation-elements.mjs +1652 -1378
  242. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -1
  243. package/fesm2022/bravobit-bb-foundation-http.mjs +38 -27
  244. package/fesm2022/bravobit-bb-foundation-http.mjs.map +1 -1
  245. package/fesm2022/bravobit-bb-foundation-localize.mjs +310 -264
  246. package/fesm2022/bravobit-bb-foundation-localize.mjs.map +1 -1
  247. package/fesm2022/bravobit-bb-foundation-masking.mjs +23 -20
  248. package/fesm2022/bravobit-bb-foundation-masking.mjs.map +1 -1
  249. package/fesm2022/bravobit-bb-foundation-notifications.mjs +67 -62
  250. package/fesm2022/bravobit-bb-foundation-notifications.mjs.map +1 -1
  251. package/fesm2022/bravobit-bb-foundation-permissions.mjs +54 -72
  252. package/fesm2022/bravobit-bb-foundation-permissions.mjs.map +1 -1
  253. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +44 -54
  254. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  255. package/fesm2022/bravobit-bb-foundation-select.mjs +292 -0
  256. package/fesm2022/bravobit-bb-foundation-select.mjs.map +1 -0
  257. package/fesm2022/bravobit-bb-foundation-storage.mjs +4 -7
  258. package/fesm2022/bravobit-bb-foundation-storage.mjs.map +1 -1
  259. package/fesm2022/bravobit-bb-foundation-table.mjs +67 -66
  260. package/fesm2022/bravobit-bb-foundation-table.mjs.map +1 -1
  261. package/fesm2022/bravobit-bb-foundation-tooltip.mjs +31 -61
  262. package/fesm2022/bravobit-bb-foundation-tooltip.mjs.map +1 -1
  263. package/fesm2022/bravobit-bb-foundation-utils.mjs +28 -23
  264. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -1
  265. package/fesm2022/bravobit-bb-foundation.mjs +27 -144
  266. package/fesm2022/bravobit-bb-foundation.mjs.map +1 -1
  267. package/http/lib/http.config.d.ts +5 -0
  268. package/http/lib/http.interfaces.d.ts +3 -0
  269. package/http/lib/http.module.d.ts +2 -6
  270. package/http/public_api.d.ts +1 -0
  271. package/lib/core/miscellaneous/coercion.d.ts +2 -0
  272. package/localize/lib/interfaces/config.interfaces.d.ts +1 -1
  273. package/localize/lib/interfaces/functions.interfaces.d.ts +0 -2
  274. package/localize/lib/localizations/dutch.localization.d.ts +18 -0
  275. package/localize/lib/localizations/english.localization.d.ts +18 -0
  276. package/localize/lib/localize.config.d.ts +6 -0
  277. package/localize/lib/localize.module.d.ts +2 -7
  278. package/localize/lib/localize.pipe.d.ts +1 -1
  279. package/localize/lib/localize.service.d.ts +4 -4
  280. package/localize/lib/localize.tokens.d.ts +11 -0
  281. package/localize/lib/views/localize-string/localize-string.component.d.ts +1 -1
  282. package/localize/lib/views/localize-template.directive.d.ts +1 -1
  283. package/localize/public_api.d.ts +2 -2
  284. package/masking/lib/directives/currency-mask.directive.d.ts +1 -1
  285. package/masking/lib/directives/date-mask.directive.d.ts +1 -1
  286. package/masking/lib/directives/input-mask.directive.d.ts +1 -1
  287. package/masking/lib/masking.module.d.ts +1 -1
  288. package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
  289. package/notifications/lib/notifications-list/notifications-list.component.d.ts +1 -1
  290. package/notifications/lib/notifications.config.d.ts +3 -0
  291. package/notifications/lib/notifications.interfaces.d.ts +2 -1
  292. package/notifications/lib/notifications.module.d.ts +1 -5
  293. package/notifications/public_api.d.ts +1 -0
  294. package/package.json +17 -22
  295. package/permissions/lib/directives/permission.directive.d.ts +1 -1
  296. package/permissions/lib/guards/permission.guard.d.ts +3 -15
  297. package/permissions/lib/permissions.config.d.ts +3 -0
  298. package/permissions/lib/permissions.interface.d.ts +2 -1
  299. package/permissions/lib/permissions.module.d.ts +1 -1
  300. package/permissions/public_api.d.ts +1 -0
  301. package/public_api.d.ts +1 -9
  302. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +4 -7
  303. package/recaptcha/lib/recaptcha-loader.service.d.ts +9 -13
  304. package/recaptcha/lib/recaptcha.config.d.ts +3 -0
  305. package/recaptcha/lib/recaptcha.module.d.ts +2 -2
  306. package/recaptcha/public_api.d.ts +1 -0
  307. package/{theming → select}/index.d.ts +1 -1
  308. package/select/lib/select/select.component.d.ts +77 -0
  309. package/select/lib/select-label.directive.d.ts +8 -0
  310. package/select/lib/select-option-group.directive.d.ts +8 -0
  311. package/select/lib/select-option.directive.d.ts +8 -0
  312. package/select/lib/select.module.d.ts +10 -0
  313. package/select/public_api.d.ts +5 -0
  314. package/styles/colors.scss +20 -0
  315. package/styles/grid.scss +98 -0
  316. package/styles/reset.scss +65 -0
  317. package/styles/theme.scss +88 -0
  318. package/table/lib/components/table/table.component.d.ts +4 -6
  319. package/table/lib/components/table-cell/table-cell.component.d.ts +1 -1
  320. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +4 -7
  321. package/table/lib/components/table-pager/table-pager.component.d.ts +4 -8
  322. package/table/lib/table.module.d.ts +1 -5
  323. package/tooltip/lib/tooltip-container/tooltip-container.component.d.ts +3 -4
  324. package/tooltip/lib/tooltip.directive.d.ts +8 -17
  325. package/tooltip/lib/tooltip.module.d.ts +2 -5
  326. package/tooltip/public_api.d.ts +1 -1
  327. package/utils/lib/directives/autosize.directive.d.ts +2 -1
  328. package/utils/lib/directives/focus-trap.directive.d.ts +1 -1
  329. package/utils/lib/directives/focus.directive.d.ts +1 -1
  330. package/utils/lib/directives/template.directive.d.ts +1 -1
  331. package/utils/lib/utils.module.d.ts +1 -1
  332. package/auth/lib/directives/abstract.directive.d.ts +0 -12
  333. package/collections/lib/components/collections.directive.d.ts +0 -17
  334. package/controls/index.d.ts +0 -5
  335. package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +0 -51
  336. package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +0 -23
  337. package/controls/lib/checkbox/checkbox.module.d.ts +0 -10
  338. package/controls/lib/control-error/control-error/control-error.animation.d.ts +0 -1
  339. package/controls/lib/control-error/control-error/control-error.component.d.ts +0 -17
  340. package/controls/lib/control-error/control-error-submit.directive.d.ts +0 -15
  341. package/controls/lib/control-error/control-error.defaults.d.ts +0 -2
  342. package/controls/lib/control-error/control-error.interface.d.ts +0 -12
  343. package/controls/lib/control-error/control-error.module.d.ts +0 -9
  344. package/controls/lib/control-error/control-error.utils.d.ts +0 -3
  345. package/controls/lib/controls.interfaces.d.ts +0 -4
  346. package/controls/lib/controls.module.d.ts +0 -14
  347. package/controls/lib/form-control/form-control/form-control.component.d.ts +0 -29
  348. package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +0 -6
  349. package/controls/lib/form-control/form-control-input.directive.d.ts +0 -35
  350. package/controls/lib/form-control/form-control.module.d.ts +0 -12
  351. package/controls/lib/radio/radio-button/radio-button.component.d.ts +0 -24
  352. package/controls/lib/radio/radio-group/radio-group.component.d.ts +0 -53
  353. package/controls/lib/radio/radio.module.d.ts +0 -11
  354. package/controls/lib/toggle/toggle/toggle.component.d.ts +0 -45
  355. package/controls/lib/toggle/toggle-group/toggle-group.component.d.ts +0 -23
  356. package/controls/lib/toggle/toggle.module.d.ts +0 -10
  357. package/controls/public_api.d.ts +0 -20
  358. package/elements/lib/dropdown/dropdown.component.d.ts +0 -21
  359. package/elements/lib/tag/tag.component.d.ts +0 -7
  360. package/esm2022/auth/lib/directives/abstract.directive.mjs +0 -40
  361. package/esm2022/collections/lib/components/collections.directive.mjs +0 -43
  362. package/esm2022/controls/bravobit-bb-foundation-controls.mjs +0 -5
  363. package/esm2022/controls/lib/checkbox/checkbox/checkbox.component.mjs +0 -178
  364. package/esm2022/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +0 -68
  365. package/esm2022/controls/lib/checkbox/checkbox.module.mjs +0 -20
  366. package/esm2022/controls/lib/control-error/control-error/control-error.animation.mjs +0 -14
  367. package/esm2022/controls/lib/control-error/control-error/control-error.component.mjs +0 -63
  368. package/esm2022/controls/lib/control-error/control-error-submit.directive.mjs +0 -47
  369. package/esm2022/controls/lib/control-error/control-error.defaults.mjs +0 -26
  370. package/esm2022/controls/lib/control-error/control-error.interface.mjs +0 -3
  371. package/esm2022/controls/lib/control-error/control-error.module.mjs +0 -19
  372. package/esm2022/controls/lib/control-error/control-error.utils.mjs +0 -20
  373. package/esm2022/controls/lib/controls.interfaces.mjs +0 -2
  374. package/esm2022/controls/lib/controls.module.mjs +0 -62
  375. package/esm2022/controls/lib/form-control/form-control/form-control.component.mjs +0 -79
  376. package/esm2022/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +0 -22
  377. package/esm2022/controls/lib/form-control/form-control-input.directive.mjs +0 -124
  378. package/esm2022/controls/lib/form-control/form-control.module.mjs +0 -34
  379. package/esm2022/controls/lib/radio/radio-button/radio-button.component.mjs +0 -75
  380. package/esm2022/controls/lib/radio/radio-group/radio-group.component.mjs +0 -168
  381. package/esm2022/controls/lib/radio/radio.module.mjs +0 -21
  382. package/esm2022/controls/lib/toggle/toggle/toggle.component.mjs +0 -153
  383. package/esm2022/controls/lib/toggle/toggle-group/toggle-group.component.mjs +0 -62
  384. package/esm2022/controls/lib/toggle/toggle.module.mjs +0 -20
  385. package/esm2022/controls/public_api.mjs +0 -21
  386. package/esm2022/elements/lib/dropdown/dropdown.component.mjs +0 -100
  387. package/esm2022/elements/lib/tag/tag.component.mjs +0 -18
  388. package/esm2022/lib/core/mixins/can-disable.mjs +0 -16
  389. package/esm2022/lib/core/mixins/can-hide-errors.mjs +0 -16
  390. package/esm2022/lib/core/mixins/can-load.mjs +0 -16
  391. package/esm2022/lib/core/mixins/constructor.mjs +0 -2
  392. package/esm2022/lib/core/mixins/has-error.mjs +0 -16
  393. package/esm2022/lib/core/mixins/is-focused.mjs +0 -16
  394. package/esm2022/lib/core/mixins/is-grouped.mjs +0 -16
  395. package/esm2022/lib/core/mixins/is-readonly.mjs +0 -16
  396. package/esm2022/lib/core/mixins/is-required.mjs +0 -16
  397. package/esm2022/localize/lib/interfaces/transforms.interfaces.mjs +0 -3
  398. package/esm2022/localize/lib/locale.token.mjs +0 -14
  399. package/esm2022/theming/bravobit-bb-foundation-theming.mjs +0 -5
  400. package/esm2022/theming/lib/themes/checkbox-group.theme.mjs +0 -17
  401. package/esm2022/theming/lib/themes/checkbox.theme.mjs +0 -35
  402. package/esm2022/theming/lib/themes/control-error.theme.mjs +0 -11
  403. package/esm2022/theming/lib/themes/form-control-addon.theme.mjs +0 -6
  404. package/esm2022/theming/lib/themes/form-control.theme.mjs +0 -45
  405. package/esm2022/theming/lib/themes/radio-button.theme.mjs +0 -29
  406. package/esm2022/theming/lib/themes/radio-group.theme.mjs +0 -20
  407. package/esm2022/theming/lib/themes/toggle-group.theme.mjs +0 -17
  408. package/esm2022/theming/lib/themes/toggle.theme.mjs +0 -28
  409. package/esm2022/theming/lib/theming.data.mjs +0 -90
  410. package/esm2022/theming/lib/theming.directive.mjs +0 -38
  411. package/esm2022/theming/lib/theming.interface.mjs +0 -2
  412. package/esm2022/theming/lib/theming.module.mjs +0 -16
  413. package/esm2022/theming/lib/utils/theming.variable.mjs +0 -41
  414. package/esm2022/theming/public_api.mjs +0 -10
  415. package/fesm2022/bravobit-bb-foundation-controls.mjs +0 -1191
  416. package/fesm2022/bravobit-bb-foundation-controls.mjs.map +0 -1
  417. package/fesm2022/bravobit-bb-foundation-theming.mjs +0 -381
  418. package/fesm2022/bravobit-bb-foundation-theming.mjs.map +0 -1
  419. package/lib/core/mixins/can-disable.d.ts +0 -6
  420. package/lib/core/mixins/can-hide-errors.d.ts +0 -6
  421. package/lib/core/mixins/can-load.d.ts +0 -6
  422. package/lib/core/mixins/constructor.d.ts +0 -1
  423. package/lib/core/mixins/has-error.d.ts +0 -6
  424. package/lib/core/mixins/is-focused.d.ts +0 -6
  425. package/lib/core/mixins/is-grouped.d.ts +0 -6
  426. package/lib/core/mixins/is-readonly.d.ts +0 -6
  427. package/lib/core/mixins/is-required.d.ts +0 -6
  428. package/localize/lib/interfaces/transforms.interfaces.d.ts +0 -3
  429. package/localize/lib/locale.token.d.ts +0 -3
  430. package/theming/lib/themes/checkbox-group.theme.d.ts +0 -16
  431. package/theming/lib/themes/checkbox.theme.d.ts +0 -32
  432. package/theming/lib/themes/control-error.theme.d.ts +0 -9
  433. package/theming/lib/themes/form-control-addon.theme.d.ts +0 -5
  434. package/theming/lib/themes/form-control.theme.d.ts +0 -32
  435. package/theming/lib/themes/radio-button.theme.d.ts +0 -26
  436. package/theming/lib/themes/radio-group.theme.d.ts +0 -17
  437. package/theming/lib/themes/toggle-group.theme.d.ts +0 -16
  438. package/theming/lib/themes/toggle.theme.d.ts +0 -25
  439. package/theming/lib/theming.data.d.ts +0 -17
  440. package/theming/lib/theming.directive.d.ts +0 -13
  441. package/theming/lib/theming.interface.d.ts +0 -34
  442. package/theming/lib/theming.module.d.ts +0 -7
  443. package/theming/lib/utils/theming.variable.d.ts +0 -16
  444. package/theming/public_api.d.ts +0 -9
@@ -1,11 +1,14 @@
1
- import { isObservable, of, combineLatest, BehaviorSubject } from 'rxjs';
2
- import { switchMap, map, delay, tap, catchError, startWith, shareReplay, debounceTime, distinctUntilChanged } from 'rxjs/operators';
1
+ import { isObservable, of, combineLatest, BehaviorSubject, Subscription } from 'rxjs';
2
+ import { switchMap, map, delay, shareReplay, distinctUntilChanged, tap, catchError, startWith, debounceTime } from 'rxjs/operators';
3
3
  import * as i0 from '@angular/core';
4
- import { Directive, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, Input, NgModule } from '@angular/core';
5
- import * as i1 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import { getControlValue } from '@bravobit/bb-foundation/rxjs';
8
- import { FormControl } from '@angular/forms';
4
+ import { Directive, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, Input, numberAttribute, booleanAttribute, Attribute, Optional, HostListener, NgModule } from '@angular/core';
5
+ import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
6
+ import { BbLocalizeString, BbLocalize, BbLocalizeTemplate } from '@bravobit/bb-foundation/localize';
7
+ import { combineLatestMap, getControlValue } from '@bravobit/bb-foundation/rxjs';
8
+ import { BbInput, BbIcon, BbFormControl, BbPrefix, BbSpinner, BbAvatar } from '@bravobit/bb-foundation/elements';
9
+ import * as i1 from '@angular/forms';
10
+ import { ReactiveFormsModule, FormControl } from '@angular/forms';
11
+ import { BbTemplate } from '@bravobit/bb-foundation/utils';
9
12
 
10
13
  class CollectionProvider {
11
14
  formatArrayToCollectionData(items) {
@@ -123,58 +126,157 @@ class LocalCollectionProvider extends CollectionProvider {
123
126
  }
124
127
  }
125
128
 
129
+ class BbCollectionsDataContext {
130
+ constructor(items, loading) {
131
+ this.items = items;
132
+ this.loading = loading;
133
+ }
134
+ }
126
135
  class BbCollectionsData {
127
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsData, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
128
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: BbCollectionsData, selector: "[bbCollectionsData]", ngImport: i0 }); }
136
+ constructor(template) {
137
+ this.template = template;
138
+ }
139
+ static ngTemplateContextGuard(dir, ctx) {
140
+ return true;
141
+ }
142
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsData, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
143
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsData, isStandalone: true, selector: "[bbCollectionsData]", ngImport: i0 }); }
129
144
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsData, decorators: [{
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsData, decorators: [{
131
146
  type: Directive,
132
147
  args: [{
133
- selector: '[bbCollectionsData]'
148
+ selector: '[bbCollectionsData]',
149
+ standalone: true
134
150
  }]
135
- }] });
151
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
152
+
153
+ class BbCollectionsDataRowContext {
154
+ constructor(item) {
155
+ this.item = item;
156
+ this.$implicit = item;
157
+ }
158
+ }
159
+ class BbCollectionsDataRow {
160
+ constructor(template) {
161
+ this.template = template;
162
+ }
163
+ static ngTemplateContextGuard(dir, ctx) {
164
+ return true;
165
+ }
166
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsDataRow, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
167
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsDataRow, isStandalone: true, selector: "[bbCollectionsDataRow]", ngImport: i0 }); }
168
+ }
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsDataRow, decorators: [{
170
+ type: Directive,
171
+ args: [{
172
+ selector: '[bbCollectionsDataRow]',
173
+ standalone: true
174
+ }]
175
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
176
+
177
+ class BbCollectionsEmptyContext {
178
+ constructor(query, loading) {
179
+ this.query = query;
180
+ this.loading = loading;
181
+ }
182
+ }
136
183
  class BbCollectionsEmpty {
137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsEmpty, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
138
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: BbCollectionsEmpty, selector: "[bbCollectionsEmpty]", ngImport: i0 }); }
184
+ constructor(template) {
185
+ this.template = template;
186
+ }
187
+ static ngTemplateContextGuard(dir, ctx) {
188
+ return true;
189
+ }
190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsEmpty, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
191
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsEmpty, isStandalone: true, selector: "[bbCollectionsEmpty]", ngImport: i0 }); }
139
192
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsEmpty, decorators: [{
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsEmpty, decorators: [{
141
194
  type: Directive,
142
195
  args: [{
143
- selector: '[bbCollectionsEmpty]'
196
+ selector: '[bbCollectionsEmpty]',
197
+ standalone: true
144
198
  }]
145
- }] });
199
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
200
+
201
+ class BbCollectionsErrorContext {
202
+ constructor(error, loading) {
203
+ this.error = error;
204
+ this.loading = loading;
205
+ }
206
+ }
146
207
  class BbCollectionsError {
147
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsError, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
148
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: BbCollectionsError, selector: "[bbCollectionsError]", ngImport: i0 }); }
208
+ constructor(template) {
209
+ this.template = template;
210
+ }
211
+ static ngTemplateContextGuard(dir, ctx) {
212
+ return true;
213
+ }
214
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsError, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
215
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsError, isStandalone: true, selector: "[bbCollectionsError]", ngImport: i0 }); }
149
216
  }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsError, decorators: [{
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsError, decorators: [{
151
218
  type: Directive,
152
219
  args: [{
153
- selector: '[bbCollectionsError]'
220
+ selector: '[bbCollectionsError]',
221
+ standalone: true
154
222
  }]
155
- }] });
223
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
224
+
225
+ class BbCollectionsInitialContext {
226
+ }
156
227
  class BbCollectionsInitial {
157
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsInitial, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
158
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: BbCollectionsInitial, selector: "[bbCollectionsInitial]", ngImport: i0 }); }
228
+ constructor(template) {
229
+ this.template = template;
230
+ }
231
+ static ngTemplateContextGuard(dir, ctx) {
232
+ return true;
233
+ }
234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsInitial, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
235
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsInitial, isStandalone: true, selector: "[bbCollectionsInitial]", ngImport: i0 }); }
159
236
  }
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsInitial, decorators: [{
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsInitial, decorators: [{
161
238
  type: Directive,
162
239
  args: [{
163
- selector: '[bbCollectionsInitial]'
240
+ selector: '[bbCollectionsInitial]',
241
+ standalone: true
164
242
  }]
165
- }] });
243
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
244
+
245
+ class BbCollectionsItemContext {
246
+ constructor(item) {
247
+ this.item = item;
248
+ this.$implicit = item;
249
+ }
250
+ }
251
+ class BbCollectionsItem {
252
+ constructor(template) {
253
+ this.template = template;
254
+ }
255
+ static ngTemplateContextGuard(dir, ctx) {
256
+ return true;
257
+ }
258
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsItem, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
259
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsItem, isStandalone: true, selector: "[bbCollectionsItem]", ngImport: i0 }); }
260
+ }
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsItem, decorators: [{
262
+ type: Directive,
263
+ args: [{
264
+ selector: '[bbCollectionsItem]',
265
+ standalone: true
266
+ }]
267
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
166
268
 
167
269
  class BbCollectionsViewer {
168
270
  constructor() {
169
271
  // Inputs.
170
272
  this.collection = null;
171
273
  }
172
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsViewer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
173
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: BbCollectionsViewer, selector: "[bb-collections-viewer]", inputs: { collection: "collection" }, host: { classAttribute: "bb-collections-viewer" }, queries: [{ propertyName: "dataTemplate", first: true, predicate: BbCollectionsData, descendants: true, read: TemplateRef }, { propertyName: "emptyTemplate", first: true, predicate: BbCollectionsEmpty, descendants: true, read: TemplateRef }, { propertyName: "errorTemplate", first: true, predicate: BbCollectionsError, descendants: true, read: TemplateRef }, { propertyName: "initialTemplate", first: true, predicate: BbCollectionsInitial, descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"collection?.data$ | async as data\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchDefault>\n <ng-container\n *ngTemplateOutlet=\"dataTemplate; context: {items: data?.response?.data, loading: data?.loading}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'initial'\">\n <ng-container *ngTemplateOutlet=\"initialTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container\n *ngTemplateOutlet=\"emptyTemplate; context: {query: data?.request?.query, loading: data?.loading}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'error'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: {error: data?.error, loading: data?.loading}\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".bb-collections-viewer{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsViewer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
275
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: BbCollectionsViewer, isStandalone: true, selector: "[bb-collections-viewer]", inputs: { collection: "collection" }, host: { classAttribute: "bb-collections-viewer" }, queries: [{ propertyName: "dataTemplate", first: true, predicate: BbCollectionsData, descendants: true, read: TemplateRef }, { propertyName: "emptyTemplate", first: true, predicate: BbCollectionsEmpty, descendants: true, read: TemplateRef }, { propertyName: "errorTemplate", first: true, predicate: BbCollectionsError, descendants: true, read: TemplateRef }, { propertyName: "initialTemplate", first: true, predicate: BbCollectionsInitial, descendants: true, read: TemplateRef }], ngImport: i0, template: "@if (collection?.data$ | async; as data) {\n @switch (data?.state) {\n @case ('initial') {\n <ng-container *ngTemplateOutlet=\"initialTemplate\"></ng-container>\n }\n @case ('empty') {\n <ng-container\n *ngTemplateOutlet=\"emptyTemplate; context: {query: data?.request?.query, loading: data?.loading}\"></ng-container>\n }\n @case ('error') {\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: {error: data?.error, loading: data?.loading}\"></ng-container>\n }\n @default {\n <ng-container\n *ngTemplateOutlet=\"dataTemplate; context: {items: data?.response?.data, loading: data?.loading}\"></ng-container>\n }\n }\n}\n", styles: [".bb-collections-viewer{display:block}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
174
276
  }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsViewer, decorators: [{
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsViewer, decorators: [{
176
278
  type: Component,
177
- args: [{ selector: '[bb-collections-viewer]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-collections-viewer' }, preserveWhitespaces: false, template: "<ng-container *ngIf=\"collection?.data$ | async as data\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchDefault>\n <ng-container\n *ngTemplateOutlet=\"dataTemplate; context: {items: data?.response?.data, loading: data?.loading}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'initial'\">\n <ng-container *ngTemplateOutlet=\"initialTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container\n *ngTemplateOutlet=\"emptyTemplate; context: {query: data?.request?.query, loading: data?.loading}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'error'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: {error: data?.error, loading: data?.loading}\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".bb-collections-viewer{display:block}\n"] }]
279
+ args: [{ selector: '[bb-collections-viewer]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-collections-viewer' }, preserveWhitespaces: false, standalone: true, imports: [AsyncPipe, NgTemplateOutlet], template: "@if (collection?.data$ | async; as data) {\n @switch (data?.state) {\n @case ('initial') {\n <ng-container *ngTemplateOutlet=\"initialTemplate\"></ng-container>\n }\n @case ('empty') {\n <ng-container\n *ngTemplateOutlet=\"emptyTemplate; context: {query: data?.request?.query, loading: data?.loading}\"></ng-container>\n }\n @case ('error') {\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: {error: data?.error, loading: data?.loading}\"></ng-container>\n }\n @default {\n <ng-container\n *ngTemplateOutlet=\"dataTemplate; context: {items: data?.response?.data, loading: data?.loading}\"></ng-container>\n }\n }\n}\n", styles: [".bb-collections-viewer{display:block}\n"] }]
178
280
  }], propDecorators: { dataTemplate: [{
179
281
  type: ContentChild,
180
282
  args: [BbCollectionsData, { read: TemplateRef, static: false }]
@@ -193,43 +295,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
193
295
 
194
296
  class BbCollectionsPager {
195
297
  constructor() {
196
- // Readonly data.
197
- this.maxAmountOfButtons = 5;
198
- this.cache$ = new BehaviorSubject({});
199
298
  // State and subscriptions.
200
- this._label = null;
201
299
  this._collection = null;
202
300
  this._subscription = null;
301
+ this._cache$ = new BehaviorSubject({});
302
+ this._maxAmountOfButtons$ = new BehaviorSubject(3);
303
+ }
304
+ set maxAmountOfButtons(value) {
305
+ this._maxAmountOfButtons$.next(Math.max(1, value));
203
306
  }
204
- // Inputs.
205
- set label(value) {
206
- this._label = value;
207
- this.cache$.next(this.cache$.getValue());
307
+ get maxAmountOfButtons() {
308
+ return this._maxAmountOfButtons$.getValue();
208
309
  }
209
310
  set collection(collection) {
210
311
  this._collection = collection;
211
312
  this.observeCollectionChanges();
212
313
  }
314
+ get collection() {
315
+ return this._collection;
316
+ }
213
317
  ngOnInit() {
214
- this.data$ = this.cache$.pipe(map(cache => {
215
- const pageSize = cache?.pageSize ?? 1;
216
- const pageNumber = cache?.pageNumber ?? 1;
217
- const totalPages = Math.max(0, cache?.totalPages ?? 1);
218
- const totalEntries = Math.max(0, cache?.totalEntries ?? 0);
219
- const fromStart = Math.max(0, Math.min((pageSize * (pageNumber - 1)) + 1, totalEntries));
220
- const fromEnd = Math.max(0, Math.min((fromStart - 1) + pageSize, totalEntries));
221
- const pages = this.filterActivePages(pageNumber, totalPages);
222
- const allowNext = pageNumber < totalPages;
223
- const allowPrevious = pageNumber > 1;
224
- return {
225
- totalPages,
226
- pages,
227
- pageNumber,
228
- allowNext,
229
- allowPrevious,
230
- label: this.calculateLabel(fromStart, fromEnd, totalEntries)
231
- };
232
- }));
318
+ this.setData();
233
319
  }
234
320
  ngOnDestroy() {
235
321
  this._subscription?.unsubscribe();
@@ -244,39 +330,42 @@ class BbCollectionsPager {
244
330
  }
245
331
  this._collection?.pageNumberControl?.setValue(pageNumber);
246
332
  }
333
+ setData() {
334
+ this.data$ = combineLatestMap({
335
+ cache: this._cache$,
336
+ maxAmountOfButtons: this._maxAmountOfButtons$
337
+ }).pipe(map(({ cache, maxAmountOfButtons }) => {
338
+ const pageSize = cache?.pageSize ?? 1;
339
+ const pageNumber = cache?.pageNumber ?? 1;
340
+ const totalEntries = Math.max(0, cache?.totalEntries ?? 0);
341
+ const start = Math.max(0, Math.min((pageSize * (pageNumber - 1)) + 1, totalEntries));
342
+ const end = Math.max(0, Math.min((start - 1) + pageSize, totalEntries));
343
+ const totalPages = Math.max(0, cache?.totalPages ?? 1);
344
+ const pages = this.filterActivePages(pageNumber, totalPages, maxAmountOfButtons);
345
+ return { start, end, totalEntries, totalPages, pages, pageNumber };
346
+ }), shareReplay({ refCount: true, bufferSize: 1 }));
347
+ }
247
348
  observeCollectionChanges() {
248
- if (!this._collection) {
249
- return;
250
- }
251
349
  if (this._subscription) {
252
350
  this._subscription?.unsubscribe();
253
351
  }
254
- const pageNumber = this._collection?.pageNumberControl?.value;
255
- const pageSize = this._collection?.pageSizeControl?.value;
256
- this.cache$.next({ pageNumber, pageSize });
352
+ if (!this._collection) {
353
+ return;
354
+ }
257
355
  this._subscription = this._collection.raw$.subscribe(data => {
258
356
  if (data) {
259
- this.cache$.next(data);
357
+ this._cache$.next(data);
260
358
  }
261
359
  });
262
360
  }
263
- calculateLabel(start, end, total) {
264
- const startPoint = '[start]';
265
- const endPoint = '[end]';
266
- const totalPoint = '[total]';
267
- const label = this._label ?? `Showing ${startPoint} to ${endPoint} of ${totalPoint} results`;
268
- return label
269
- .replace(startPoint, `<strong>${start}</strong>`)
270
- .replace(endPoint, `<strong>${end}</strong>`)
271
- .replace(totalPoint, `<strong>${total}</strong>`);
272
- }
273
- calculatePages(pageNumber, totalPages) {
361
+ calculatePages(pageNumber, totalPages, maxAmountOfButtons) {
274
362
  const min = 1;
275
363
  const max = totalPages;
276
- const amount = Math.max(1, this.maxAmountOfButtons);
364
+ const amount = Math.max(1, maxAmountOfButtons);
365
+ const start = Math.max(0, pageNumber - Math.floor(amount / 2));
277
366
  const data = Array(amount)
278
367
  .fill(0)
279
- .map((_, index) => pageNumber + (index - 1));
368
+ .map((_, index) => start + index);
280
369
  // Validate if the minimum value less than
281
370
  // the first value.
282
371
  if (data[0] < min) {
@@ -292,23 +381,258 @@ class BbCollectionsPager {
292
381
  // Just return the default data.
293
382
  return data;
294
383
  }
295
- filterActivePages(pageNumber, totalPages) {
296
- return this.calculatePages(pageNumber, totalPages)
384
+ filterActivePages(pageNumber, totalPages, maxAmountOfButtons) {
385
+ return this.calculatePages(pageNumber, totalPages, maxAmountOfButtons)
297
386
  .filter(page => page > 0 && page <= totalPages)
298
387
  .map(page => ({ page, active: pageNumber === page }));
299
388
  }
300
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsPager, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
301
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: BbCollectionsPager, selector: "bb-collections-pager", inputs: { label: "label", collection: "collection" }, host: { classAttribute: "bb-collections-pager" }, ngImport: i0, template: "<ng-container *ngIf=\"data$ | async as data\">\n <div [innerHTML]=\"data?.label\"\n class=\"bb-collections-pager-text\">\n </div>\n\n <div class=\"bb-collections-pager-container\">\n <ul class=\"bb-collections-pager-list\">\n <li class=\"bb-collections-pager-item\"\n title=\"Previous page\">\n <button [disabled]=\"!data?.allowPrevious\"\n (click)=\"setPage(data?.pageNumber - 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow first\"\n type=\"button\">\n &#8592;\n </button>\n </li>\n <li *ngFor=\"let item of data?.pages\"\n [title]=\"'Page ' + item?.page\"\n class=\"bb-collections-pager-item\">\n <button [class.active]=\"item?.active\"\n (click)=\"setPage(item?.page, data?.totalPages)\"\n class=\"bb-collections-pager-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n <li class=\"bb-collections-pager-item\"\n title=\"Next page\">\n <button [disabled]=\"!data?.allowNext\"\n (click)=\"setPage(data?.pageNumber + 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow last\"\n type=\"button\">\n &#8594;\n </button>\n </li>\n </ul>\n </div>\n</ng-container>\n", styles: [".bb-collections-pager{display:flex;align-items:center;flex-direction:column-reverse}.bb-collections-pager-text{display:block;margin-top:10px}.bb-collections-pager-text>strong{font-weight:500}.bb-collections-pager-container{width:100%;display:flex;overflow-x:auto;align-items:center;justify-content:center}.bb-collections-pager-list{display:flex;border-radius:6px;align-items:center;background-color:#fff;border:1px solid rgba(67,90,111,.3);box-shadow:#435a6f24 0 1px 2px inset}.bb-collections-pager-item:not(:last-child){border-right:1px solid #cccccc}.bb-collections-pager-button{height:34px;border:none;display:flex;padding:0 4px;min-width:40px;appearance:none;min-height:34px;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;background-color:transparent}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus,.bb-collections-pager-button:active,.bb-collections-pager-button.active{color:#1565c0;font-weight:500}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus{background-color:#1565c00d}.bb-collections-pager-button:active,.bb-collections-pager-button.active{background-color:#1565c033}.bb-collections-pager-button:not(.arrow):hover,.bb-collections-pager-button:not(.arrow):focus{outline:1px solid rgba(21,101,192,.5)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active{outline:1px solid #1565c0;box-shadow:#1565c066 0 0 0 3px}.bb-collections-pager-button:not(.arrow).active{outline:1px solid #1565c0}.bb-collections-pager-button.arrow{font-weight:500}.bb-collections-pager-button.arrow.first{border-top-left-radius:2px;border-bottom-left-radius:2px}.bb-collections-pager-button.arrow.last{border-top-right-radius:2px;border-bottom-right-radius:2px}.bb-collections-pager-button:disabled{color:#000;outline:none;opacity:.25;cursor:default;pointer-events:none;background-color:transparent}@media only screen and (min-width: 768px){.bb-collections-pager{flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:space-between}.bb-collections-pager-text{margin-top:0}.bb-collections-pager-container{width:auto;overflow-x:unset}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
389
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsPager, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
390
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: BbCollectionsPager, isStandalone: true, selector: "bb-collections-pager", inputs: { maxAmountOfButtons: ["maxAmountOfButtons", "maxAmountOfButtons", numberAttribute], collection: "collection" }, host: { classAttribute: "bb-collections-pager" }, ngImport: i0, template: "@if (data$ | async; as data) {\n <div [bb-localize-string]=\"'collection.showing_label' | bbLocalize\"\n class=\"bb-collections-pager-text\">\n <strong *bbLocalizeTemplate=\"'start'\">{{ data?.start }}</strong>\n <strong *bbLocalizeTemplate=\"'end'\">{{ data?.end }}</strong>\n <strong *bbLocalizeTemplate=\"'total'\">{{ data?.totalEntries }}</strong>\n </div>\n\n <div class=\"bb-collections-pager-container\">\n <ul class=\"bb-collections-pager-list\">\n <li class=\"bb-collections-pager-item\"\n title=\"Previous page\">\n <button [disabled]=\"data?.pageNumber <= 1\"\n (click)=\"setPage(data?.pageNumber - 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow first\"\n type=\"button\">\n &#8592;\n </button>\n </li>\n @for (item of data?.pages; track item?.page) {\n <li [title]=\"'Page ' + item?.page\"\n class=\"bb-collections-pager-item\">\n <button [class.active]=\"item?.active\"\n (click)=\"setPage(item?.page, data?.totalPages)\"\n class=\"bb-collections-pager-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n }\n <li class=\"bb-collections-pager-item\"\n title=\"Next page\">\n <button [disabled]=\"data?.pageNumber >= data?.totalPages\"\n (click)=\"setPage(data?.pageNumber + 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow last\"\n type=\"button\">\n &#8594;\n </button>\n </li>\n </ul>\n </div>\n}\n", styles: [".bb-collections-pager{display:flex;align-items:center;font-size:.875rem;flex-direction:column-reverse}.bb-collections-pager-text{display:block;margin-top:.75rem}.bb-collections-pager-text>strong{font-weight:500}.bb-collections-pager-container{width:100%;display:flex;overflow-x:auto;align-items:center;justify-content:center}.bb-collections-pager-list{display:flex;align-items:center;border-radius:.5rem;background-color:#fff;border:1px solid hsl(213,8%,74%);box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-collections-pager-item:not(:last-child){border-right:1px solid hsl(213,8%,74%)}.bb-collections-pager-button{height:2rem;border:none;display:flex;appearance:none;min-height:2rem;min-width:2.5rem;-webkit-user-select:none;user-select:none;padding:0 .25rem;align-items:center;justify-content:center;background-color:transparent}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus,.bb-collections-pager-button:active,.bb-collections-pager-button.active{font-weight:400;color:var(--bb-collections-pager-color)}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus{background-color:var(--bb-collections-pager-hover-background-color)}.bb-collections-pager-button:active,.bb-collections-pager-button.active{background-color:var(--bb-collections-pager-active-background-color)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active{box-shadow:var(--bb-collections-pager-focus-box-shadow)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active,.bb-collections-pager-button:not(.arrow).active{outline:1px solid var(--bb-collections-pager-outline-color)}.bb-collections-pager-button.arrow{font-weight:500}.bb-collections-pager-button.arrow.first{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.bb-collections-pager-button.arrow.last{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.bb-collections-pager-button:disabled{color:#111;outline:none;opacity:.25;cursor:default;pointer-events:none;background-color:transparent}@media only screen and (min-width: 768px){.bb-collections-pager{flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:space-between}.bb-collections-pager-text{margin-top:0}.bb-collections-pager-container{width:auto;overflow-x:unset}}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: BbLocalizeString, selector: "[bb-localize-string]", inputs: ["substitutions", "bb-localize-string"] }, { kind: "pipe", type: BbLocalize, name: "bbLocalize" }, { kind: "directive", type: BbLocalizeTemplate, selector: "[bbLocalizeTemplate]", inputs: ["bbLocalizeTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
391
+ }
392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsPager, decorators: [{
393
+ type: Component,
394
+ args: [{ selector: 'bb-collections-pager', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-collections-pager' }, preserveWhitespaces: false, standalone: true, imports: [AsyncPipe, BbLocalizeString, BbLocalize, BbLocalizeTemplate], template: "@if (data$ | async; as data) {\n <div [bb-localize-string]=\"'collection.showing_label' | bbLocalize\"\n class=\"bb-collections-pager-text\">\n <strong *bbLocalizeTemplate=\"'start'\">{{ data?.start }}</strong>\n <strong *bbLocalizeTemplate=\"'end'\">{{ data?.end }}</strong>\n <strong *bbLocalizeTemplate=\"'total'\">{{ data?.totalEntries }}</strong>\n </div>\n\n <div class=\"bb-collections-pager-container\">\n <ul class=\"bb-collections-pager-list\">\n <li class=\"bb-collections-pager-item\"\n title=\"Previous page\">\n <button [disabled]=\"data?.pageNumber <= 1\"\n (click)=\"setPage(data?.pageNumber - 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow first\"\n type=\"button\">\n &#8592;\n </button>\n </li>\n @for (item of data?.pages; track item?.page) {\n <li [title]=\"'Page ' + item?.page\"\n class=\"bb-collections-pager-item\">\n <button [class.active]=\"item?.active\"\n (click)=\"setPage(item?.page, data?.totalPages)\"\n class=\"bb-collections-pager-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n }\n <li class=\"bb-collections-pager-item\"\n title=\"Next page\">\n <button [disabled]=\"data?.pageNumber >= data?.totalPages\"\n (click)=\"setPage(data?.pageNumber + 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow last\"\n type=\"button\">\n &#8594;\n </button>\n </li>\n </ul>\n </div>\n}\n", styles: [".bb-collections-pager{display:flex;align-items:center;font-size:.875rem;flex-direction:column-reverse}.bb-collections-pager-text{display:block;margin-top:.75rem}.bb-collections-pager-text>strong{font-weight:500}.bb-collections-pager-container{width:100%;display:flex;overflow-x:auto;align-items:center;justify-content:center}.bb-collections-pager-list{display:flex;align-items:center;border-radius:.5rem;background-color:#fff;border:1px solid hsl(213,8%,74%);box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-collections-pager-item:not(:last-child){border-right:1px solid hsl(213,8%,74%)}.bb-collections-pager-button{height:2rem;border:none;display:flex;appearance:none;min-height:2rem;min-width:2.5rem;-webkit-user-select:none;user-select:none;padding:0 .25rem;align-items:center;justify-content:center;background-color:transparent}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus,.bb-collections-pager-button:active,.bb-collections-pager-button.active{font-weight:400;color:var(--bb-collections-pager-color)}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus{background-color:var(--bb-collections-pager-hover-background-color)}.bb-collections-pager-button:active,.bb-collections-pager-button.active{background-color:var(--bb-collections-pager-active-background-color)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active{box-shadow:var(--bb-collections-pager-focus-box-shadow)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active,.bb-collections-pager-button:not(.arrow).active{outline:1px solid var(--bb-collections-pager-outline-color)}.bb-collections-pager-button.arrow{font-weight:500}.bb-collections-pager-button.arrow.first{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.bb-collections-pager-button.arrow.last{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.bb-collections-pager-button:disabled{color:#111;outline:none;opacity:.25;cursor:default;pointer-events:none;background-color:transparent}@media only screen and (min-width: 768px){.bb-collections-pager{flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:space-between}.bb-collections-pager-text{margin-top:0}.bb-collections-pager-container{width:auto;overflow-x:unset}}\n"] }]
395
+ }], propDecorators: { maxAmountOfButtons: [{
396
+ type: Input,
397
+ args: [{ transform: numberAttribute }]
398
+ }], collection: [{
399
+ type: Input,
400
+ args: [{ required: true }]
401
+ }] } });
402
+
403
+ class BbCollectionsActions {
404
+ constructor() {
405
+ // Inputs.
406
+ this.collection = null;
407
+ this.queryPlaceholder = null;
408
+ this.standalone = false;
409
+ }
410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
411
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.0.5", type: BbCollectionsActions, isStandalone: true, selector: "bb-collections-actions", inputs: { collection: "collection", queryPlaceholder: "queryPlaceholder", standalone: ["standalone", "standalone", booleanAttribute] }, host: { properties: { "class.standalone": "standalone" }, classAttribute: "bb-collections-actions" }, ngImport: i0, template: "<div class=\"bb-collections-actions-row\">\n <bb-form-control class=\"bb-collections-actions-search\">\n <bb-icon bbPrefix\n src=\"material:search\"></bb-icon>\n <input [formControl]=\"collection?.queryControl\"\n [placeholder]=\"queryPlaceholder ?? ('collection.search_label' | bbLocalize)\"\n bbInput\n autocomplete=\"off\"\n type=\"search\">\n </bb-form-control>\n <ng-content select=\"[data-collections-action]\"></ng-content>\n</div>\n<ng-content></ng-content>\n", styles: [".bb-collections-actions{gap:.75rem;display:flex;color:#111;font-size:.875rem;padding:.75rem 1rem;flex-direction:column;border-bottom:1px solid hsl(213,8%,90%)}.bb-collections-actions.standalone{border-bottom:none;border-radius:.5rem;margin-bottom:1.5rem;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-collections-actions-row,[data-collections-row]{gap:.75rem;display:flex;flex-direction:column}.bb-collections-actions-search{flex:1}@media only screen and (min-width: 768px){.bb-collections-actions-row,[data-collections-row]{flex-direction:row}.bb-collections-actions-row.end,[data-collections-row].end{justify-content:flex-end}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: BbInput, selector: "input[bbInput],textarea[bbInput],select[bbInput]", inputs: ["required"] }, { kind: "pipe", type: BbLocalize, name: "bbLocalize" }, { kind: "component", type: BbIcon, selector: "bb-icon", inputs: ["alt", "size", "ariaHidden", "src"] }, { kind: "component", type: BbFormControl, selector: "bb-form-control", inputs: ["label", "hint", "grouped", "hideErrors"] }, { kind: "directive", type: BbPrefix, selector: "[bbPrefix]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
302
412
  }
303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: BbCollectionsPager, decorators: [{
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsActions, decorators: [{
304
414
  type: Component,
305
- args: [{ selector: 'bb-collections-pager', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-collections-pager' }, preserveWhitespaces: false, template: "<ng-container *ngIf=\"data$ | async as data\">\n <div [innerHTML]=\"data?.label\"\n class=\"bb-collections-pager-text\">\n </div>\n\n <div class=\"bb-collections-pager-container\">\n <ul class=\"bb-collections-pager-list\">\n <li class=\"bb-collections-pager-item\"\n title=\"Previous page\">\n <button [disabled]=\"!data?.allowPrevious\"\n (click)=\"setPage(data?.pageNumber - 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow first\"\n type=\"button\">\n &#8592;\n </button>\n </li>\n <li *ngFor=\"let item of data?.pages\"\n [title]=\"'Page ' + item?.page\"\n class=\"bb-collections-pager-item\">\n <button [class.active]=\"item?.active\"\n (click)=\"setPage(item?.page, data?.totalPages)\"\n class=\"bb-collections-pager-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n <li class=\"bb-collections-pager-item\"\n title=\"Next page\">\n <button [disabled]=\"!data?.allowNext\"\n (click)=\"setPage(data?.pageNumber + 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow last\"\n type=\"button\">\n &#8594;\n </button>\n </li>\n </ul>\n </div>\n</ng-container>\n", styles: [".bb-collections-pager{display:flex;align-items:center;flex-direction:column-reverse}.bb-collections-pager-text{display:block;margin-top:10px}.bb-collections-pager-text>strong{font-weight:500}.bb-collections-pager-container{width:100%;display:flex;overflow-x:auto;align-items:center;justify-content:center}.bb-collections-pager-list{display:flex;border-radius:6px;align-items:center;background-color:#fff;border:1px solid rgba(67,90,111,.3);box-shadow:#435a6f24 0 1px 2px inset}.bb-collections-pager-item:not(:last-child){border-right:1px solid #cccccc}.bb-collections-pager-button{height:34px;border:none;display:flex;padding:0 4px;min-width:40px;appearance:none;min-height:34px;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;background-color:transparent}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus,.bb-collections-pager-button:active,.bb-collections-pager-button.active{color:#1565c0;font-weight:500}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus{background-color:#1565c00d}.bb-collections-pager-button:active,.bb-collections-pager-button.active{background-color:#1565c033}.bb-collections-pager-button:not(.arrow):hover,.bb-collections-pager-button:not(.arrow):focus{outline:1px solid rgba(21,101,192,.5)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active{outline:1px solid #1565c0;box-shadow:#1565c066 0 0 0 3px}.bb-collections-pager-button:not(.arrow).active{outline:1px solid #1565c0}.bb-collections-pager-button.arrow{font-weight:500}.bb-collections-pager-button.arrow.first{border-top-left-radius:2px;border-bottom-left-radius:2px}.bb-collections-pager-button.arrow.last{border-top-right-radius:2px;border-bottom-right-radius:2px}.bb-collections-pager-button:disabled{color:#000;outline:none;opacity:.25;cursor:default;pointer-events:none;background-color:transparent}@media only screen and (min-width: 768px){.bb-collections-pager{flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:space-between}.bb-collections-pager-text{margin-top:0}.bb-collections-pager-container{width:auto;overflow-x:unset}}\n"] }]
306
- }], propDecorators: { label: [{
415
+ args: [{ selector: 'bb-collections-actions', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
416
+ 'class': 'bb-collections-actions',
417
+ '[class.standalone]': 'standalone'
418
+ }, preserveWhitespaces: false, standalone: true, imports: [
419
+ ReactiveFormsModule,
420
+ BbInput,
421
+ BbLocalize,
422
+ BbIcon,
423
+ BbFormControl,
424
+ BbPrefix
425
+ ], template: "<div class=\"bb-collections-actions-row\">\n <bb-form-control class=\"bb-collections-actions-search\">\n <bb-icon bbPrefix\n src=\"material:search\"></bb-icon>\n <input [formControl]=\"collection?.queryControl\"\n [placeholder]=\"queryPlaceholder ?? ('collection.search_label' | bbLocalize)\"\n bbInput\n autocomplete=\"off\"\n type=\"search\">\n </bb-form-control>\n <ng-content select=\"[data-collections-action]\"></ng-content>\n</div>\n<ng-content></ng-content>\n", styles: [".bb-collections-actions{gap:.75rem;display:flex;color:#111;font-size:.875rem;padding:.75rem 1rem;flex-direction:column;border-bottom:1px solid hsl(213,8%,90%)}.bb-collections-actions.standalone{border-bottom:none;border-radius:.5rem;margin-bottom:1.5rem;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-collections-actions-row,[data-collections-row]{gap:.75rem;display:flex;flex-direction:column}.bb-collections-actions-search{flex:1}@media only screen and (min-width: 768px){.bb-collections-actions-row,[data-collections-row]{flex-direction:row}.bb-collections-actions-row.end,[data-collections-row].end{justify-content:flex-end}}\n"] }]
426
+ }], propDecorators: { collection: [{
427
+ type: Input,
428
+ args: [{ required: true }]
429
+ }], queryPlaceholder: [{
307
430
  type: Input
431
+ }], standalone: [{
432
+ type: Input,
433
+ args: [{ transform: booleanAttribute }]
434
+ }] } });
435
+
436
+ class BbCollectionsTable {
437
+ constructor() {
438
+ // Readonly data.
439
+ this.collection$ = new BehaviorSubject(null);
440
+ // Inputs.
441
+ this.queryPlaceholder = null;
442
+ this.emptyContent = null;
443
+ this.noResultsContent = null;
444
+ this.errorContent = null;
445
+ this.trackByProperty = 'id';
446
+ this.includeVerticalLines = false;
447
+ this.hideActions = false;
448
+ this.hidePager = false;
449
+ }
450
+ set collection(collection) {
451
+ this.collection$.next(collection);
452
+ }
453
+ get collection() {
454
+ return this.collection$.getValue();
455
+ }
456
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
457
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: BbCollectionsTable, isStandalone: true, selector: "bb-collections-table", inputs: { queryPlaceholder: "queryPlaceholder", emptyContent: "emptyContent", noResultsContent: "noResultsContent", errorContent: "errorContent", trackByProperty: "trackByProperty", includeVerticalLines: ["includeVerticalLines", "includeVerticalLines", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute], hidePager: ["hidePager", "hidePager", booleanAttribute], collection: "collection" }, host: { properties: { "class.include-vertical-lines": "includeVerticalLines" }, classAttribute: "bb-collections-table" }, queries: [{ propertyName: "dataRowTemplate", first: true, predicate: BbCollectionsDataRow, descendants: true, read: TemplateRef }], ngImport: i0, template: "@if (!hideActions) {\n <bb-collections-actions [collection]=\"collection\"\n [queryPlaceholder]=\"queryPlaceholder\">\n <ng-content ngProjectAs=\"[data-collections-action]\"\n select=\"[data-collections-action]\"></ng-content>\n <ng-content ngProjectAs=\"[data-collections-row]\"\n select=\"[data-collections-row]\"></ng-content>\n </bb-collections-actions>\n}\n\n<div [collection]=\"collection\"\n [class.loading]=\"collection?.loading$ | async\"\n class=\"bb-collections-table-container\"\n bb-collections-viewer>\n <table *bbCollectionsData=\"let items = items; let loading = loading\">\n <ng-content select=\"thead\"></ng-content>\n <tbody>\n @for (item of items; track (trackByProperty === null ? $index : item[trackByProperty])) {\n <ng-container\n *ngTemplateOutlet=\"dataRowTemplate; context: {$implicit: item, item: item}\"></ng-container>\n }\n </tbody>\n <ng-content select=\"tfoot\"></ng-content>\n </table>\n <div *bbCollectionsEmpty=\"let query = query\"\n class=\"bb-collections-table-info\">\n <div class=\"bb-collections-table-image empty\"></div>\n @if (query?.length > 0) {\n <ng-template [bbTemplate]=\"noResultsContent\">\n <p [bb-localize-string]=\"$any(noResultsContent) ?? ('collection.no_results_label' | bbLocalize)\"\n class=\"bb-collections-table-info-text\">\n <strong *bbLocalizeTemplate=\"'query'\">{{ query ?? '...' }}</strong>\n </p>\n </ng-template>\n } @else {\n <ng-template [bbTemplate]=\"emptyContent\">\n <p class=\"bb-collections-table-info-text\">\n {{ $any(emptyContent) ?? ('collection.empty_label' | bbLocalize) }}\n </p>\n </ng-template>\n }\n </div>\n <div *bbCollectionsError=\"let error = error\"\n class=\"bb-collections-table-info\">\n <div class=\"bb-collections-table-image error\"></div>\n <ng-template [bbTemplate]=\"errorContent\">\n <p class=\"bb-collections-table-info-text\">\n {{ $any(errorContent) ?? ('collection.error_label' | bbLocalize) }}\n </p>\n </ng-template>\n </div>\n <div *bbCollectionsInitial\n class=\"bb-collections-table-info\">\n <bb-spinner class=\"block\"></bb-spinner>\n </div>\n</div>\n\n@if (!hidePager) {\n <footer class=\"bb-collections-table-footer\">\n <bb-collections-pager [collection]=\"collection\"></bb-collections-pager>\n </footer>\n}\n", styles: ["@charset \"UTF-8\";.bb-collections-table{color:#111;display:block;position:relative;font-size:.875rem;border-radius:.5rem;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-collections-table.include-vertical-lines td:not(:last-child),.bb-collections-table.include-vertical-lines th:not(:last-child){border-right:1px solid hsl(213,8%,90%)}.bb-collections-table-footer{padding:.75rem 1rem;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;background-color:#fbf9f9;border-top:1px solid hsl(213,8%,90%)}.bb-collections-table-container{overflow-x:auto;position:relative}.bb-collections-table-container.loading>table>tbody,.bb-collections-table-container.loading>.bb-collections-table-info{animation:collectionsBlink 1s linear infinite}.bb-collections-table-container.loading:after{top:0;left:0;right:0;z-index:1;opacity:0;content:\"\";height:.25rem;position:absolute;will-change:left,right;background-color:#1565c1;animation:collectionsFadeIn .12s cubic-bezier(.65,.815,.735,.395) .4s forwards,collectionsIndeterminate 2.1s cubic-bezier(.65,.815,.735,.395) .4s infinite}.bb-collections-table-container>table{width:100%}.bb-collections-table-container>table th,.bb-collections-table-container>table td{padding:1rem;text-align:left;font-weight:400;font-size:.875rem}.bb-collections-table-container>table th.fit,.bb-collections-table-container>table td.fit{width:1%;white-space:nowrap}.bb-collections-table-container>table th.left,.bb-collections-table-container>table td.left{text-align:left}.bb-collections-table-container>table th.right,.bb-collections-table-container>table td.right{text-align:right}.bb-collections-table-container>table>thead{background-color:#fbf9f9;border-bottom:1px solid hsl(213,8%,90%)}.bb-collections-table-container>table>thead>tr>th{padding:1rem;color:#525252}.bb-collections-table-container>table>tbody>tr>td{color:#111}.bb-collections-table-container>table>tbody>tr:not(:last-child){border-bottom:1px solid hsl(213,8%,90%)}.bb-collections-table-info{padding:3rem 1.5rem}.bb-collections-table-info-text{color:#525252;margin:0 auto;display:block;line-height:2;max-width:30rem;text-align:center;font-size:.875rem}.bb-collections-table-info-text>strong{font-weight:500}.bb-collections-table-info-text>strong:before{content:\"\\201c\"}.bb-collections-table-info-text>strong:after{content:\"\\201d\"}.bb-collections-table-image{width:100%;height:auto;display:flex;max-width:7.5rem;margin:0 auto 1.5rem;background-size:contain;background-repeat:no-repeat;background-position:center center}.bb-collections-table-image.empty{aspect-ratio:154/132;-webkit-mask-image:linear-gradient(to bottom,black 25%,transparent 100%);mask-image:linear-gradient(to bottom,black 25%,transparent 100%);background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 154 132\"%3E%3Cg fill=\"none\" fill-rule=\"evenodd\"%3E%3Crect width=\"154\" height=\"40\" fill=\"%23FFF\" fill-rule=\"nonzero\" rx=\"8\"/%3E%3Crect width=\"24\" height=\"24\" x=\"8\" y=\"8\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"4\"/%3E%3Crect width=\"60\" height=\"6\" x=\"40\" y=\"11\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"106\" height=\"6\" x=\"40\" y=\"23\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"153\" height=\"39\" x=\".5\" y=\".5\" stroke=\"%23E5E7EB\" rx=\"7.5\"/%3E%3Cg transform=\"translate(0 46)\"%3E%3Crect width=\"154\" height=\"40\" fill=\"%23FFF\" fill-rule=\"nonzero\" rx=\"8\"/%3E%3Crect width=\"24\" height=\"24\" x=\"8\" y=\"8\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"4\"/%3E%3Crect width=\"60\" height=\"6\" x=\"40\" y=\"11\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"106\" height=\"6\" x=\"40\" y=\"23\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"153\" height=\"39\" x=\".5\" y=\".5\" stroke=\"%23E5E7EB\" rx=\"7.5\"/%3E%3C/g%3E%3Cg transform=\"translate(0 92)\"%3E%3Crect width=\"154\" height=\"40\" fill=\"%23FFF\" fill-rule=\"nonzero\" rx=\"8\"/%3E%3Crect width=\"24\" height=\"24\" x=\"8\" y=\"8\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"4\"/%3E%3Crect width=\"60\" height=\"6\" x=\"40\" y=\"11\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"106\" height=\"6\" x=\"40\" y=\"23\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"153\" height=\"39\" x=\".5\" y=\".5\" stroke=\"%23E5E7EB\" rx=\"7.5\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E')}.bb-collections-table-image.error{max-width:4rem;aspect-ratio:1;background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 132 132\"%3E%3Cpath fill=\"%23C23934\" d=\"M65.958253 98.6024096c.8892771 0 1.6486747-.3008433 2.2781928-.9025301.6295181-.6016867.9442771-1.3471687.9442771-2.2364458 0-.8892771-.3008434-1.6486747-.9025301-2.2781927-.6016868-.6295181-1.3471687-.9442771-2.2364458-.9442771-.8892771 0-1.6486747.3008433-2.2781928.9025301-.6295181.6016867-.9442771 1.3471687-.9442771 2.2364458 0 .8892771.3008434 1.6486747.9025301 2.2781927.6016868.6295181 1.3471687.9442771 2.2364458.9442771Zm-1.9462048-21.4698795h3.9759036V29.4216867h-3.9759036v47.7108434ZM66.0894578 132c-9.0716867 0-17.6205421-1.715602-25.6465662-5.146807-8.0260241-3.431205-15.0547591-8.159217-21.0862049-14.184036-6.032771-6.02482-10.76674694-13.0416269-14.20192766-21.0504221C1.71825301 83.6086145 0 75.0504819 0 65.9443373 0 56.8368675 1.71560241 48.303253 5.14680723 40.343494c3.43120482-7.9597591 8.15921687-14.9553615 14.18403617-20.9868073 6.0248193-6.032771 13.0416265-10.76674694 21.0504217-14.20192766C48.3913855 1.71825301 56.9495181 0 66.0556627 0 75.1631325 0 83.696747 1.71560241 91.656506 5.14680723c7.9597591 3.43120482 14.955361 8.15921687 20.986807 14.18403617 6.032771 6.0248193 10.766747 13.0263855 14.201928 21.0046988C130.281747 48.3138554 132 56.8388554 132 65.9105422c0 9.0716867-1.715602 17.6205421-5.146807 25.6465662-3.431205 8.0260241-8.159217 15.0547586-14.184036 21.0862046-6.02482 6.032771-13.0263859 10.766747-21.0046992 14.201928C83.6861446 130.281747 75.1611446 132 66.0894578 132ZM66 128.024096c17.2289157 0 31.873494-6.03012 43.933735-18.090361C121.993976 97.873494 128.024096 83.2289157 128.024096 66c0-17.2289157-6.03012-31.873494-18.090361-43.9337349C97.873494 10.0060241 83.2289157 3.97590361 66 3.97590361c-17.2289157 0-31.873494 6.03012049-43.9337349 18.09036149C10.0060241 34.126506 3.97590361 48.7710843 3.97590361 66c0 17.2289157 6.03012049 31.873494 18.09036149 43.933735C34.126506 121.993976 48.7710843 128.024096 66 128.024096Z\"/%3E%3C/svg%3E')}@keyframes collectionsFadeIn{0%{opacity:0}to{opacity:1}}@keyframes collectionsIndeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes collectionsBlink{25%{opacity:.6}50%{opacity:.4}75%{opacity:.6}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BbCollectionsViewer, selector: "[bb-collections-viewer]", inputs: ["collection"] }, { kind: "directive", type: BbCollectionsData, selector: "[bbCollectionsData]" }, { kind: "directive", type: BbCollectionsEmpty, selector: "[bbCollectionsEmpty]" }, { kind: "directive", type: BbCollectionsError, selector: "[bbCollectionsError]" }, { kind: "directive", type: BbCollectionsInitial, selector: "[bbCollectionsInitial]" }, { kind: "component", type: BbCollectionsActions, selector: "bb-collections-actions", inputs: ["collection", "queryPlaceholder", "standalone"] }, { kind: "component", type: BbCollectionsPager, selector: "bb-collections-pager", inputs: ["maxAmountOfButtons", "collection"] }, { kind: "component", type: BbLocalizeString, selector: "[bb-localize-string]", inputs: ["substitutions", "bb-localize-string"] }, { kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { kind: "pipe", type: BbLocalize, name: "bbLocalize" }, { kind: "directive", type: BbLocalizeTemplate, selector: "[bbLocalizeTemplate]", inputs: ["bbLocalizeTemplate"] }, { kind: "component", type: BbSpinner, selector: "bb-spinner", inputs: ["color", "alt", "disabled"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
458
+ }
459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsTable, decorators: [{
460
+ type: Component,
461
+ args: [{ selector: 'bb-collections-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
462
+ 'class': 'bb-collections-table',
463
+ '[class.include-vertical-lines]': 'includeVerticalLines'
464
+ }, preserveWhitespaces: false, standalone: true, imports: [
465
+ NgTemplateOutlet,
466
+ BbCollectionsViewer,
467
+ BbCollectionsData,
468
+ BbCollectionsEmpty,
469
+ BbCollectionsError,
470
+ BbCollectionsInitial,
471
+ BbCollectionsActions,
472
+ BbCollectionsPager,
473
+ BbLocalizeString,
474
+ BbTemplate,
475
+ BbLocalize,
476
+ BbLocalizeTemplate,
477
+ BbSpinner,
478
+ AsyncPipe
479
+ ], template: "@if (!hideActions) {\n <bb-collections-actions [collection]=\"collection\"\n [queryPlaceholder]=\"queryPlaceholder\">\n <ng-content ngProjectAs=\"[data-collections-action]\"\n select=\"[data-collections-action]\"></ng-content>\n <ng-content ngProjectAs=\"[data-collections-row]\"\n select=\"[data-collections-row]\"></ng-content>\n </bb-collections-actions>\n}\n\n<div [collection]=\"collection\"\n [class.loading]=\"collection?.loading$ | async\"\n class=\"bb-collections-table-container\"\n bb-collections-viewer>\n <table *bbCollectionsData=\"let items = items; let loading = loading\">\n <ng-content select=\"thead\"></ng-content>\n <tbody>\n @for (item of items; track (trackByProperty === null ? $index : item[trackByProperty])) {\n <ng-container\n *ngTemplateOutlet=\"dataRowTemplate; context: {$implicit: item, item: item}\"></ng-container>\n }\n </tbody>\n <ng-content select=\"tfoot\"></ng-content>\n </table>\n <div *bbCollectionsEmpty=\"let query = query\"\n class=\"bb-collections-table-info\">\n <div class=\"bb-collections-table-image empty\"></div>\n @if (query?.length > 0) {\n <ng-template [bbTemplate]=\"noResultsContent\">\n <p [bb-localize-string]=\"$any(noResultsContent) ?? ('collection.no_results_label' | bbLocalize)\"\n class=\"bb-collections-table-info-text\">\n <strong *bbLocalizeTemplate=\"'query'\">{{ query ?? '...' }}</strong>\n </p>\n </ng-template>\n } @else {\n <ng-template [bbTemplate]=\"emptyContent\">\n <p class=\"bb-collections-table-info-text\">\n {{ $any(emptyContent) ?? ('collection.empty_label' | bbLocalize) }}\n </p>\n </ng-template>\n }\n </div>\n <div *bbCollectionsError=\"let error = error\"\n class=\"bb-collections-table-info\">\n <div class=\"bb-collections-table-image error\"></div>\n <ng-template [bbTemplate]=\"errorContent\">\n <p class=\"bb-collections-table-info-text\">\n {{ $any(errorContent) ?? ('collection.error_label' | bbLocalize) }}\n </p>\n </ng-template>\n </div>\n <div *bbCollectionsInitial\n class=\"bb-collections-table-info\">\n <bb-spinner class=\"block\"></bb-spinner>\n </div>\n</div>\n\n@if (!hidePager) {\n <footer class=\"bb-collections-table-footer\">\n <bb-collections-pager [collection]=\"collection\"></bb-collections-pager>\n </footer>\n}\n", styles: ["@charset \"UTF-8\";.bb-collections-table{color:#111;display:block;position:relative;font-size:.875rem;border-radius:.5rem;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-collections-table.include-vertical-lines td:not(:last-child),.bb-collections-table.include-vertical-lines th:not(:last-child){border-right:1px solid hsl(213,8%,90%)}.bb-collections-table-footer{padding:.75rem 1rem;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;background-color:#fbf9f9;border-top:1px solid hsl(213,8%,90%)}.bb-collections-table-container{overflow-x:auto;position:relative}.bb-collections-table-container.loading>table>tbody,.bb-collections-table-container.loading>.bb-collections-table-info{animation:collectionsBlink 1s linear infinite}.bb-collections-table-container.loading:after{top:0;left:0;right:0;z-index:1;opacity:0;content:\"\";height:.25rem;position:absolute;will-change:left,right;background-color:#1565c1;animation:collectionsFadeIn .12s cubic-bezier(.65,.815,.735,.395) .4s forwards,collectionsIndeterminate 2.1s cubic-bezier(.65,.815,.735,.395) .4s infinite}.bb-collections-table-container>table{width:100%}.bb-collections-table-container>table th,.bb-collections-table-container>table td{padding:1rem;text-align:left;font-weight:400;font-size:.875rem}.bb-collections-table-container>table th.fit,.bb-collections-table-container>table td.fit{width:1%;white-space:nowrap}.bb-collections-table-container>table th.left,.bb-collections-table-container>table td.left{text-align:left}.bb-collections-table-container>table th.right,.bb-collections-table-container>table td.right{text-align:right}.bb-collections-table-container>table>thead{background-color:#fbf9f9;border-bottom:1px solid hsl(213,8%,90%)}.bb-collections-table-container>table>thead>tr>th{padding:1rem;color:#525252}.bb-collections-table-container>table>tbody>tr>td{color:#111}.bb-collections-table-container>table>tbody>tr:not(:last-child){border-bottom:1px solid hsl(213,8%,90%)}.bb-collections-table-info{padding:3rem 1.5rem}.bb-collections-table-info-text{color:#525252;margin:0 auto;display:block;line-height:2;max-width:30rem;text-align:center;font-size:.875rem}.bb-collections-table-info-text>strong{font-weight:500}.bb-collections-table-info-text>strong:before{content:\"\\201c\"}.bb-collections-table-info-text>strong:after{content:\"\\201d\"}.bb-collections-table-image{width:100%;height:auto;display:flex;max-width:7.5rem;margin:0 auto 1.5rem;background-size:contain;background-repeat:no-repeat;background-position:center center}.bb-collections-table-image.empty{aspect-ratio:154/132;-webkit-mask-image:linear-gradient(to bottom,black 25%,transparent 100%);mask-image:linear-gradient(to bottom,black 25%,transparent 100%);background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 154 132\"%3E%3Cg fill=\"none\" fill-rule=\"evenodd\"%3E%3Crect width=\"154\" height=\"40\" fill=\"%23FFF\" fill-rule=\"nonzero\" rx=\"8\"/%3E%3Crect width=\"24\" height=\"24\" x=\"8\" y=\"8\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"4\"/%3E%3Crect width=\"60\" height=\"6\" x=\"40\" y=\"11\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"106\" height=\"6\" x=\"40\" y=\"23\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"153\" height=\"39\" x=\".5\" y=\".5\" stroke=\"%23E5E7EB\" rx=\"7.5\"/%3E%3Cg transform=\"translate(0 46)\"%3E%3Crect width=\"154\" height=\"40\" fill=\"%23FFF\" fill-rule=\"nonzero\" rx=\"8\"/%3E%3Crect width=\"24\" height=\"24\" x=\"8\" y=\"8\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"4\"/%3E%3Crect width=\"60\" height=\"6\" x=\"40\" y=\"11\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"106\" height=\"6\" x=\"40\" y=\"23\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"153\" height=\"39\" x=\".5\" y=\".5\" stroke=\"%23E5E7EB\" rx=\"7.5\"/%3E%3C/g%3E%3Cg transform=\"translate(0 92)\"%3E%3Crect width=\"154\" height=\"40\" fill=\"%23FFF\" fill-rule=\"nonzero\" rx=\"8\"/%3E%3Crect width=\"24\" height=\"24\" x=\"8\" y=\"8\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"4\"/%3E%3Crect width=\"60\" height=\"6\" x=\"40\" y=\"11\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"106\" height=\"6\" x=\"40\" y=\"23\" fill=\"%23E5E7EB\" fill-rule=\"nonzero\" rx=\"3\"/%3E%3Crect width=\"153\" height=\"39\" x=\".5\" y=\".5\" stroke=\"%23E5E7EB\" rx=\"7.5\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E')}.bb-collections-table-image.error{max-width:4rem;aspect-ratio:1;background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 132 132\"%3E%3Cpath fill=\"%23C23934\" d=\"M65.958253 98.6024096c.8892771 0 1.6486747-.3008433 2.2781928-.9025301.6295181-.6016867.9442771-1.3471687.9442771-2.2364458 0-.8892771-.3008434-1.6486747-.9025301-2.2781927-.6016868-.6295181-1.3471687-.9442771-2.2364458-.9442771-.8892771 0-1.6486747.3008433-2.2781928.9025301-.6295181.6016867-.9442771 1.3471687-.9442771 2.2364458 0 .8892771.3008434 1.6486747.9025301 2.2781927.6016868.6295181 1.3471687.9442771 2.2364458.9442771Zm-1.9462048-21.4698795h3.9759036V29.4216867h-3.9759036v47.7108434ZM66.0894578 132c-9.0716867 0-17.6205421-1.715602-25.6465662-5.146807-8.0260241-3.431205-15.0547591-8.159217-21.0862049-14.184036-6.032771-6.02482-10.76674694-13.0416269-14.20192766-21.0504221C1.71825301 83.6086145 0 75.0504819 0 65.9443373 0 56.8368675 1.71560241 48.303253 5.14680723 40.343494c3.43120482-7.9597591 8.15921687-14.9553615 14.18403617-20.9868073 6.0248193-6.032771 13.0416265-10.76674694 21.0504217-14.20192766C48.3913855 1.71825301 56.9495181 0 66.0556627 0 75.1631325 0 83.696747 1.71560241 91.656506 5.14680723c7.9597591 3.43120482 14.955361 8.15921687 20.986807 14.18403617 6.032771 6.0248193 10.766747 13.0263855 14.201928 21.0046988C130.281747 48.3138554 132 56.8388554 132 65.9105422c0 9.0716867-1.715602 17.6205421-5.146807 25.6465662-3.431205 8.0260241-8.159217 15.0547586-14.184036 21.0862046-6.02482 6.032771-13.0263859 10.766747-21.0046992 14.201928C83.6861446 130.281747 75.1611446 132 66.0894578 132ZM66 128.024096c17.2289157 0 31.873494-6.03012 43.933735-18.090361C121.993976 97.873494 128.024096 83.2289157 128.024096 66c0-17.2289157-6.03012-31.873494-18.090361-43.9337349C97.873494 10.0060241 83.2289157 3.97590361 66 3.97590361c-17.2289157 0-31.873494 6.03012049-43.9337349 18.09036149C10.0060241 34.126506 3.97590361 48.7710843 3.97590361 66c0 17.2289157 6.03012049 31.873494 18.09036149 43.933735C34.126506 121.993976 48.7710843 128.024096 66 128.024096Z\"/%3E%3C/svg%3E')}@keyframes collectionsFadeIn{0%{opacity:0}to{opacity:1}}@keyframes collectionsIndeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes collectionsBlink{25%{opacity:.6}50%{opacity:.4}75%{opacity:.6}}\n"] }]
480
+ }], propDecorators: { dataRowTemplate: [{
481
+ type: ContentChild,
482
+ args: [BbCollectionsDataRow, { read: TemplateRef, static: false }]
483
+ }], queryPlaceholder: [{
484
+ type: Input
485
+ }], emptyContent: [{
486
+ type: Input
487
+ }], noResultsContent: [{
488
+ type: Input
489
+ }], errorContent: [{
490
+ type: Input
491
+ }], trackByProperty: [{
492
+ type: Input
493
+ }], includeVerticalLines: [{
494
+ type: Input,
495
+ args: [{ transform: booleanAttribute }]
496
+ }], hideActions: [{
497
+ type: Input,
498
+ args: [{ transform: booleanAttribute }]
499
+ }], hidePager: [{
500
+ type: Input,
501
+ args: [{ transform: booleanAttribute }]
308
502
  }], collection: [{
503
+ type: Input,
504
+ args: [{ required: true }]
505
+ }] } });
506
+
507
+ class BbCollectionsTableSorting {
508
+ constructor(_name, _changeDetectorRef, _parent) {
509
+ this._name = _name;
510
+ this._changeDetectorRef = _changeDetectorRef;
511
+ this._parent = _parent;
512
+ // Readonly data.
513
+ this.orderedOptions = [null, 'asc', 'desc'];
514
+ // State.
515
+ this.direction = null;
516
+ // Subscription.
517
+ this._subscription = new Subscription();
518
+ }
519
+ ngOnInit() {
520
+ const direction$ = this._parent.collection$.pipe(switchMap(collection => getControlValue(collection.sortControl)), map(value => Array.isArray(value) ? value : [value]), map(value => value?.find(item => item?.name === this._name)), map(sorting => sorting?.direction ?? null), distinctUntilChanged());
521
+ const subscription = direction$.subscribe(direction => {
522
+ this.direction = direction;
523
+ this._changeDetectorRef.markForCheck();
524
+ });
525
+ this._subscription.add(subscription);
526
+ }
527
+ ngOnDestroy() {
528
+ this._subscription?.unsubscribe();
529
+ }
530
+ onClick() {
531
+ if (!this._name) {
532
+ return;
533
+ }
534
+ const nextDirection = this.getNextOption(this.direction);
535
+ const controlValue = nextDirection === null ? null : { name: this._name, direction: nextDirection };
536
+ this._parent?.collection?.sortControl?.setValue(controlValue);
537
+ }
538
+ getNextOption(direction) {
539
+ const index = this.orderedOptions.findIndex(item => item === direction);
540
+ const newIndex = (index + 1) % this.orderedOptions?.length;
541
+ return this.orderedOptions?.[newIndex] ?? null;
542
+ }
543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsTableSorting, deps: [{ token: 'bb-collections-table-sorting', attribute: true }, { token: i0.ChangeDetectorRef }, { token: BbCollectionsTable, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
544
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", type: BbCollectionsTableSorting, isStandalone: true, selector: "th[bb-collections-table-sorting]", host: { listeners: { "click": "onClick()" }, properties: { "class.asc": "direction === 'asc'", "class.desc": "direction === 'desc'" }, classAttribute: "bb-collections-table-sorting" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [".bb-collections-table-sorting{cursor:pointer;-webkit-user-select:none;user-select:none;background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E');background-repeat:no-repeat;padding-right:2.5rem!important;background-size:.5625rem .9375rem;background-position:center right 1rem;transition:background-color .12s cubic-bezier(0,0,.2,1)}.bb-collections-table-sorting:hover,.bb-collections-table-sorting:focus{background-color:#f4f0f0}.bb-collections-table-sorting:active{background-color:#f0ebeb}.bb-collections-table-sorting.asc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"black\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-collections-table-sorting.desc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"black\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
545
+ }
546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsTableSorting, decorators: [{
547
+ type: Component,
548
+ args: [{ selector: 'th[bb-collections-table-sorting]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
549
+ 'class': 'bb-collections-table-sorting',
550
+ '[class.asc]': 'direction === \'asc\'',
551
+ '[class.desc]': 'direction === \'desc\''
552
+ }, preserveWhitespaces: false, standalone: true, template: "<ng-content></ng-content>\n", styles: [".bb-collections-table-sorting{cursor:pointer;-webkit-user-select:none;user-select:none;background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E');background-repeat:no-repeat;padding-right:2.5rem!important;background-size:.5625rem .9375rem;background-position:center right 1rem;transition:background-color .12s cubic-bezier(0,0,.2,1)}.bb-collections-table-sorting:hover,.bb-collections-table-sorting:focus{background-color:#f4f0f0}.bb-collections-table-sorting:active{background-color:#f0ebeb}.bb-collections-table-sorting.asc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"black\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-collections-table-sorting.desc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"black\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}\n"] }]
553
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
554
+ type: Attribute,
555
+ args: ['bb-collections-table-sorting']
556
+ }] }, { type: i0.ChangeDetectorRef }, { type: BbCollectionsTable, decorators: [{
557
+ type: Optional
558
+ }] }], propDecorators: { onClick: [{
559
+ type: HostListener,
560
+ args: ['click']
561
+ }] } });
562
+
563
+ class BbCollectionsTableLabel {
564
+ constructor() {
565
+ // Inputs.
566
+ this.titleLabel = null;
567
+ this.descriptionLabel = null;
568
+ this.imageUrl = null;
569
+ this.alt = null;
570
+ this.type = 'image';
571
+ }
572
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsTableLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
573
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: BbCollectionsTableLabel, isStandalone: true, selector: "[bb-collections-table-label]", inputs: { titleLabel: "titleLabel", descriptionLabel: "descriptionLabel", imageUrl: "imageUrl", alt: "alt", type: "type" }, host: { classAttribute: "bb-collections-table-label" }, ngImport: i0, template: "@switch (type) {\n @case ('avatar') {\n <bb-avatar [title]=\"alt ?? '...'\"\n [src]=\"imageUrl\"\n [size]=\"2\"\n class=\"bb-collections-table-label-avatar\">\n </bb-avatar>\n }\n @case ('content') {\n <ng-content></ng-content>\n }\n @default {\n @if (imageUrl; as src) {\n <div [style.background-image]=\"'url(' + src + ')'\"\n class=\"bb-collections-table-label-image\"></div>\n }\n }\n}\n\n<div class=\"bb-collections-table-label-content\">\n <span class=\"bb-collections-table-label-title\">{{ titleLabel }}</span>\n @if (descriptionLabel) {\n <small class=\"bb-collections-table-label-description\">{{ descriptionLabel }}</small>\n }\n</div>\n", styles: [".bb-collections-table-label{align-items:center;display:inline-flex}a.bb-collections-table-label{text-decoration:none}a.bb-collections-table-label>.bb-collections-table-label-content>.bb-collections-table-label-title,a.bb-collections-table-label:visited>.bb-collections-table-label-content>.bb-collections-table-label-title{text-underline-offset:.25rem;text-decoration-thickness:1px;text-decoration:dotted underline;color:var(--bb-collections-table-label-color)}a.bb-collections-table-label>.bb-collections-table-label-content>.bb-collections-table-label-description,a.bb-collections-table-label:visited>.bb-collections-table-label-content>.bb-collections-table-label-description{color:#758795}a.bb-collections-table-label:hover>.bb-collections-table-label-content>.bb-collections-table-label-title,a.bb-collections-table-label:focus>.bb-collections-table-label-content>.bb-collections-table-label-title{text-decoration-style:solid}.bb-collections-table-label-image,.bb-collections-table-label-avatar{width:2rem;height:2rem;min-width:2rem;min-height:2rem;margin-right:.5rem}.bb-collections-table-label-image{background-size:contain;background-repeat:no-repeat;background-position:center center}.bb-collections-table-label-content{display:block}.bb-collections-table-label-title{display:block;color:#111;font-size:.875rem}.bb-collections-table-label-description{display:block;line-height:1.5;margin-top:.25rem;font-size:.8125rem;color:#758795}\n"], dependencies: [{ kind: "component", type: BbAvatar, selector: "bb-avatar", inputs: ["size", "src", "title", "tintColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
574
+ }
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsTableLabel, decorators: [{
576
+ type: Component,
577
+ args: [{ selector: '[bb-collections-table-label]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-collections-table-label' }, preserveWhitespaces: false, imports: [
578
+ BbAvatar
579
+ ], standalone: true, template: "@switch (type) {\n @case ('avatar') {\n <bb-avatar [title]=\"alt ?? '...'\"\n [src]=\"imageUrl\"\n [size]=\"2\"\n class=\"bb-collections-table-label-avatar\">\n </bb-avatar>\n }\n @case ('content') {\n <ng-content></ng-content>\n }\n @default {\n @if (imageUrl; as src) {\n <div [style.background-image]=\"'url(' + src + ')'\"\n class=\"bb-collections-table-label-image\"></div>\n }\n }\n}\n\n<div class=\"bb-collections-table-label-content\">\n <span class=\"bb-collections-table-label-title\">{{ titleLabel }}</span>\n @if (descriptionLabel) {\n <small class=\"bb-collections-table-label-description\">{{ descriptionLabel }}</small>\n }\n</div>\n", styles: [".bb-collections-table-label{align-items:center;display:inline-flex}a.bb-collections-table-label{text-decoration:none}a.bb-collections-table-label>.bb-collections-table-label-content>.bb-collections-table-label-title,a.bb-collections-table-label:visited>.bb-collections-table-label-content>.bb-collections-table-label-title{text-underline-offset:.25rem;text-decoration-thickness:1px;text-decoration:dotted underline;color:var(--bb-collections-table-label-color)}a.bb-collections-table-label>.bb-collections-table-label-content>.bb-collections-table-label-description,a.bb-collections-table-label:visited>.bb-collections-table-label-content>.bb-collections-table-label-description{color:#758795}a.bb-collections-table-label:hover>.bb-collections-table-label-content>.bb-collections-table-label-title,a.bb-collections-table-label:focus>.bb-collections-table-label-content>.bb-collections-table-label-title{text-decoration-style:solid}.bb-collections-table-label-image,.bb-collections-table-label-avatar{width:2rem;height:2rem;min-width:2rem;min-height:2rem;margin-right:.5rem}.bb-collections-table-label-image{background-size:contain;background-repeat:no-repeat;background-position:center center}.bb-collections-table-label-content{display:block}.bb-collections-table-label-title{display:block;color:#111;font-size:.875rem}.bb-collections-table-label-description{display:block;line-height:1.5;margin-top:.25rem;font-size:.8125rem;color:#758795}\n"] }]
580
+ }], propDecorators: { titleLabel: [{
581
+ type: Input,
582
+ args: [{ required: true }]
583
+ }], descriptionLabel: [{
584
+ type: Input
585
+ }], imageUrl: [{
586
+ type: Input
587
+ }], alt: [{
588
+ type: Input
589
+ }], type: [{
309
590
  type: Input
310
591
  }] } });
311
592
 
593
+ class BbCollectionsGrid {
594
+ constructor() {
595
+ // Readonly data.
596
+ this.collection$ = new BehaviorSubject(null);
597
+ // Inputs.
598
+ this.queryPlaceholder = null;
599
+ this.hideActions = false;
600
+ this.hidePager = false;
601
+ }
602
+ set collection(collection) {
603
+ this.collection$.next(collection);
604
+ }
605
+ get collection() {
606
+ return this.collection$.getValue();
607
+ }
608
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
609
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: BbCollectionsGrid, isStandalone: true, selector: "bb-collections-grid", inputs: { queryPlaceholder: "queryPlaceholder", hideActions: ["hideActions", "hideActions", booleanAttribute], hidePager: ["hidePager", "hidePager", booleanAttribute], collection: "collection" }, host: { classAttribute: "bb-collections-grid" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: BbCollectionsItem, descendants: true, read: TemplateRef }], ngImport: i0, template: "@if (!hideActions) {\n <bb-collections-actions [collection]=\"collection\"\n [queryPlaceholder]=\"queryPlaceholder\"\n standalone>\n <ng-content ngProjectAs=\"[data-collections-action]\"\n select=\"[data-collections-action]\"></ng-content>\n <ng-content ngProjectAs=\"[data-collections-row]\"\n select=\"[data-collections-row]\"></ng-content>\n </bb-collections-actions>\n}\n\n<div [collection]=\"collection\"\n class=\"bb-collections-grid-container\"\n bb-collections-viewer>\n <ul *bbCollectionsData=\"let items = items\"\n class=\"bb-collections-grid-list\">\n @for (item of items; track $index) {\n <li class=\"bb-collections-grid-item\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: item, item: item}\"></ng-container>\n </li>\n }\n </ul>\n</div>\n\n@if (!hidePager) {\n <footer class=\"bb-collections-grid-footer\">\n <bb-collections-pager [collection]=\"collection\"></bb-collections-pager>\n </footer>\n}\n", styles: [".bb-collections-grid{display:block}.bb-collections-grid-list{gap:1.5rem;display:flex;flex-wrap:wrap}.bb-collections-grid-item{width:100%;display:flex}.bb-collections-grid-footer{margin-top:1.5rem}\n"], dependencies: [{ kind: "directive", type: BbCollectionsData, selector: "[bbCollectionsData]" }, { kind: "component", type: BbCollectionsViewer, selector: "[bb-collections-viewer]", inputs: ["collection"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BbCollectionsActions, selector: "bb-collections-actions", inputs: ["collection", "queryPlaceholder", "standalone"] }, { kind: "component", type: BbCollectionsPager, selector: "bb-collections-pager", inputs: ["maxAmountOfButtons", "collection"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
610
+ }
611
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BbCollectionsGrid, decorators: [{
612
+ type: Component,
613
+ args: [{ selector: 'bb-collections-grid', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-collections-grid' }, preserveWhitespaces: false, standalone: true, imports: [
614
+ BbCollectionsData,
615
+ BbCollectionsViewer,
616
+ NgTemplateOutlet,
617
+ BbCollectionsActions,
618
+ BbCollectionsPager
619
+ ], template: "@if (!hideActions) {\n <bb-collections-actions [collection]=\"collection\"\n [queryPlaceholder]=\"queryPlaceholder\"\n standalone>\n <ng-content ngProjectAs=\"[data-collections-action]\"\n select=\"[data-collections-action]\"></ng-content>\n <ng-content ngProjectAs=\"[data-collections-row]\"\n select=\"[data-collections-row]\"></ng-content>\n </bb-collections-actions>\n}\n\n<div [collection]=\"collection\"\n class=\"bb-collections-grid-container\"\n bb-collections-viewer>\n <ul *bbCollectionsData=\"let items = items\"\n class=\"bb-collections-grid-list\">\n @for (item of items; track $index) {\n <li class=\"bb-collections-grid-item\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: item, item: item}\"></ng-container>\n </li>\n }\n </ul>\n</div>\n\n@if (!hidePager) {\n <footer class=\"bb-collections-grid-footer\">\n <bb-collections-pager [collection]=\"collection\"></bb-collections-pager>\n </footer>\n}\n", styles: [".bb-collections-grid{display:block}.bb-collections-grid-list{gap:1.5rem;display:flex;flex-wrap:wrap}.bb-collections-grid-item{width:100%;display:flex}.bb-collections-grid-footer{margin-top:1.5rem}\n"] }]
620
+ }], propDecorators: { itemTemplate: [{
621
+ type: ContentChild,
622
+ args: [BbCollectionsItem, { read: TemplateRef, static: false }]
623
+ }], queryPlaceholder: [{
624
+ type: Input
625
+ }], hideActions: [{
626
+ type: Input,
627
+ args: [{ transform: booleanAttribute }]
628
+ }], hidePager: [{
629
+ type: Input,
630
+ args: [{ transform: booleanAttribute }]
631
+ }], collection: [{
632
+ type: Input,
633
+ args: [{ required: true }]
634
+ }] } });
635
+
312
636
  class Collection {
313
637
  constructor(_provider, _initialValues = {}) {
314
638
  this._provider = _provider;
@@ -405,49 +729,70 @@ class Collection {
405
729
  }
406
730
 
407
731
  class CollectionsModule {
408
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CollectionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
409
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: CollectionsModule, declarations: [
410
- // Components.
411
- BbCollectionsViewer,
732
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CollectionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
733
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: CollectionsModule, imports: [BbCollectionsViewer,
412
734
  BbCollectionsPager,
413
- // Directives.
735
+ BbCollectionsTable,
736
+ BbCollectionsTableSorting,
737
+ BbCollectionsTableLabel,
738
+ BbCollectionsGrid,
739
+ BbCollectionsActions,
414
740
  BbCollectionsData,
741
+ BbCollectionsDataRow,
415
742
  BbCollectionsEmpty,
416
743
  BbCollectionsError,
417
- BbCollectionsInitial], imports: [CommonModule], exports: [
418
- // Components.
419
- BbCollectionsViewer,
744
+ BbCollectionsInitial,
745
+ BbCollectionsItem], exports: [BbCollectionsViewer,
420
746
  BbCollectionsPager,
421
- // Directives.
747
+ BbCollectionsTable,
748
+ BbCollectionsTableSorting,
749
+ BbCollectionsTableLabel,
750
+ BbCollectionsGrid,
751
+ BbCollectionsActions,
422
752
  BbCollectionsData,
753
+ BbCollectionsDataRow,
423
754
  BbCollectionsEmpty,
424
755
  BbCollectionsError,
425
- BbCollectionsInitial] }); }
426
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CollectionsModule, imports: [CommonModule] }); }
756
+ BbCollectionsInitial,
757
+ BbCollectionsItem] }); }
758
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CollectionsModule, imports: [BbCollectionsPager,
759
+ BbCollectionsTable,
760
+ BbCollectionsTableLabel,
761
+ BbCollectionsGrid,
762
+ BbCollectionsActions] }); }
427
763
  }
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CollectionsModule, decorators: [{
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CollectionsModule, decorators: [{
429
765
  type: NgModule,
430
766
  args: [{
431
- imports: [CommonModule],
432
- declarations: [
433
- // Components.
767
+ imports: [
434
768
  BbCollectionsViewer,
435
769
  BbCollectionsPager,
436
- // Directives.
770
+ BbCollectionsTable,
771
+ BbCollectionsTableSorting,
772
+ BbCollectionsTableLabel,
773
+ BbCollectionsGrid,
774
+ BbCollectionsActions,
437
775
  BbCollectionsData,
776
+ BbCollectionsDataRow,
438
777
  BbCollectionsEmpty,
439
778
  BbCollectionsError,
440
- BbCollectionsInitial
779
+ BbCollectionsInitial,
780
+ BbCollectionsItem
441
781
  ],
442
782
  exports: [
443
- // Components.
444
783
  BbCollectionsViewer,
445
784
  BbCollectionsPager,
446
- // Directives.
785
+ BbCollectionsTable,
786
+ BbCollectionsTableSorting,
787
+ BbCollectionsTableLabel,
788
+ BbCollectionsGrid,
789
+ BbCollectionsActions,
447
790
  BbCollectionsData,
791
+ BbCollectionsDataRow,
448
792
  BbCollectionsEmpty,
449
793
  BbCollectionsError,
450
- BbCollectionsInitial
794
+ BbCollectionsInitial,
795
+ BbCollectionsItem
451
796
  ]
452
797
  }]
453
798
  }] });
@@ -456,5 +801,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
456
801
  * Generated bundle index. Do not edit.
457
802
  */
458
803
 
459
- export { ApiCollectionProvider, BbCollectionsData, BbCollectionsEmpty, BbCollectionsError, BbCollectionsInitial, BbCollectionsPager, BbCollectionsViewer, Collection, CollectionProvider, CollectionsModule, LocalCollectionProvider };
804
+ export { ApiCollectionProvider, BbCollectionsActions, BbCollectionsData, BbCollectionsDataContext, BbCollectionsDataRow, BbCollectionsDataRowContext, BbCollectionsEmpty, BbCollectionsEmptyContext, BbCollectionsError, BbCollectionsErrorContext, BbCollectionsGrid, BbCollectionsInitial, BbCollectionsInitialContext, BbCollectionsItem, BbCollectionsItemContext, BbCollectionsPager, BbCollectionsTable, BbCollectionsTableLabel, BbCollectionsTableSorting, BbCollectionsViewer, Collection, CollectionProvider, CollectionsModule, LocalCollectionProvider };
460
805
  //# sourceMappingURL=bravobit-bb-foundation-collections.mjs.map