@bravobit/bb-foundation 0.14.2 → 0.15.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 (413) hide show
  1. package/README.md +47 -47
  2. package/auth/bravobit-bb-foundation-auth.d.ts +5 -5
  3. package/auth/lib/auth.interceptor.d.ts +21 -21
  4. package/auth/lib/auth.module.d.ts +15 -15
  5. package/auth/lib/auth.service.d.ts +59 -59
  6. package/auth/lib/auth.session.d.ts +34 -34
  7. package/auth/lib/directives/authenticated.directive.d.ts +14 -14
  8. package/auth/lib/directives/permission.directive.d.ts +24 -24
  9. package/auth/lib/directives/role.directive.d.ts +16 -16
  10. package/auth/lib/guards/anonymous.guard.d.ts +11 -11
  11. package/auth/lib/guards/authenticated.guard.d.ts +11 -11
  12. package/auth/lib/helpers/jwt.helper.d.ts +8 -8
  13. package/auth/lib/helpers/mapper.helper.d.ts +23 -23
  14. package/auth/lib/interfaces/config.interface.d.ts +12 -12
  15. package/auth/lib/interfaces/mapper.interface.d.ts +19 -19
  16. package/auth/lib/interfaces/provider.interface.d.ts +16 -16
  17. package/auth/lib/interfaces/token.interface.d.ts +11 -11
  18. package/auth/lib/permissions.service.d.ts +14 -14
  19. package/auth/lib/providers/email.provider.d.ts +15 -15
  20. package/auth/lib/providers/verify.provider.d.ts +13 -13
  21. package/auth/lib/tokens/use-authorization.token.d.ts +2 -2
  22. package/auth/public_api.d.ts +18 -18
  23. package/bravobit-bb-foundation.d.ts +5 -5
  24. package/bundles/bravobit-bb-foundation-auth.umd.js +1400 -1402
  25. package/bundles/bravobit-bb-foundation-auth.umd.js.map +1 -1
  26. package/bundles/bravobit-bb-foundation-collections.umd.js +851 -0
  27. package/bundles/bravobit-bb-foundation-collections.umd.js.map +1 -0
  28. package/bundles/bravobit-bb-foundation-dashboard.umd.js +817 -819
  29. package/bundles/bravobit-bb-foundation-dashboard.umd.js.map +1 -1
  30. package/bundles/bravobit-bb-foundation-dialog.umd.js +649 -651
  31. package/bundles/bravobit-bb-foundation-dialog.umd.js.map +1 -1
  32. package/bundles/bravobit-bb-foundation-elements.umd.js +2651 -2653
  33. package/bundles/bravobit-bb-foundation-elements.umd.js.map +1 -1
  34. package/bundles/bravobit-bb-foundation-http.umd.js +488 -490
  35. package/bundles/bravobit-bb-foundation-http.umd.js.map +1 -1
  36. package/bundles/bravobit-bb-foundation-localize.umd.js +1208 -1210
  37. package/bundles/bravobit-bb-foundation-localize.umd.js.map +1 -1
  38. package/bundles/bravobit-bb-foundation-notifications.umd.js +743 -745
  39. package/bundles/bravobit-bb-foundation-notifications.umd.js.map +1 -1
  40. package/bundles/bravobit-bb-foundation-recaptcha.umd.js +640 -642
  41. package/bundles/bravobit-bb-foundation-recaptcha.umd.js.map +1 -1
  42. package/bundles/bravobit-bb-foundation-rxjs.umd.js +13 -13
  43. package/bundles/bravobit-bb-foundation-rxjs.umd.js.map +1 -1
  44. package/bundles/bravobit-bb-foundation-storage.umd.js +756 -758
  45. package/bundles/bravobit-bb-foundation-storage.umd.js.map +1 -1
  46. package/bundles/bravobit-bb-foundation-table.umd.js +993 -995
  47. package/bundles/bravobit-bb-foundation-table.umd.js.map +1 -1
  48. package/bundles/bravobit-bb-foundation.umd.js +1336 -1263
  49. package/bundles/bravobit-bb-foundation.umd.js.map +1 -1
  50. package/collections/bravobit-bb-foundation-collections.d.ts +5 -0
  51. package/collections/lib/collection.d.ts +40 -0
  52. package/collections/lib/collections.module.d.ts +10 -0
  53. package/collections/lib/components/collections-pager/collections-pager.component.d.ts +34 -0
  54. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +12 -0
  55. package/collections/lib/components/collections.directive.d.ts +17 -0
  56. package/collections/lib/interfaces/collection.interface.d.ts +26 -0
  57. package/collections/lib/providers/api-collection.provider.d.ts +15 -0
  58. package/collections/lib/providers/collection.provider.d.ts +6 -0
  59. package/collections/lib/providers/local-collection.provider.d.ts +8 -0
  60. package/collections/package.json +10 -0
  61. package/collections/public_api.d.ts +9 -0
  62. package/dashboard/bravobit-bb-foundation-dashboard.d.ts +5 -5
  63. package/dashboard/lib/dashboard/dashboard.component.d.ts +19 -19
  64. package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +11 -11
  65. package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +9 -9
  66. package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +11 -11
  67. package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +21 -21
  68. package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +27 -27
  69. package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +16 -16
  70. package/dashboard/lib/dashboard.module.d.ts +16 -16
  71. package/dashboard/public_api.d.ts +8 -8
  72. package/dialog/bravobit-bb-foundation-dialog.d.ts +5 -5
  73. package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +5 -5
  74. package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +16 -16
  75. package/dialog/lib/dialog-container/dialog-container.component.d.ts +24 -24
  76. package/dialog/lib/dialog-header/dialog-header.component.d.ts +9 -9
  77. package/dialog/lib/dialog-link/dialog-link.component.d.ts +5 -5
  78. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +12 -12
  79. package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +22 -22
  80. package/dialog/lib/dialog.injector.d.ts +8 -8
  81. package/dialog/lib/dialog.insertion.d.ts +8 -8
  82. package/dialog/lib/dialog.interfaces.d.ts +3 -3
  83. package/dialog/lib/dialog.module.d.ts +19 -19
  84. package/dialog/lib/dialog.ref.d.ts +8 -8
  85. package/dialog/lib/dialog.service.d.ts +19 -19
  86. package/dialog/public_api.d.ts +9 -9
  87. package/elements/bravobit-bb-foundation-elements.d.ts +5 -5
  88. package/elements/lib/avatar/avatar.component.d.ts +25 -25
  89. package/elements/lib/button/button.component.d.ts +23 -23
  90. package/elements/lib/checkbox/checkbox.component.d.ts +27 -27
  91. package/elements/lib/date-picker/date-picker.component.d.ts +69 -69
  92. package/elements/lib/directives/addon.directive.d.ts +9 -9
  93. package/elements/lib/directives/autosize.directive.d.ts +18 -18
  94. package/elements/lib/directives/focus-trap.directive.d.ts +17 -17
  95. package/elements/lib/directives/focus.directive.d.ts +14 -14
  96. package/elements/lib/directives/form-submit.directive.d.ts +17 -17
  97. package/elements/lib/directives/input.directive.d.ts +38 -38
  98. package/elements/lib/directives/template.directive.d.ts +10 -10
  99. package/elements/lib/dropdown/dropdown.component.d.ts +21 -21
  100. package/elements/lib/elements.interfaces.d.ts +25 -25
  101. package/elements/lib/elements.module.d.ts +116 -116
  102. package/elements/lib/file-picker/file-picker.component.d.ts +49 -49
  103. package/elements/lib/form-control/form-control.component.d.ts +21 -21
  104. package/elements/lib/form-error/form-error.component.d.ts +29 -29
  105. package/elements/lib/form-group/form-group.component.d.ts +10 -10
  106. package/elements/lib/icon/icon.component.d.ts +22 -22
  107. package/elements/lib/image-picker/image-picker.component.d.ts +38 -38
  108. package/elements/lib/pipes/file-image.pipe.d.ts +13 -13
  109. package/elements/lib/pipes/file-size.pipe.d.ts +8 -8
  110. package/elements/lib/pipes/relative-time.pipe.d.ts +19 -19
  111. package/elements/lib/spinner/spinner.component.d.ts +12 -12
  112. package/elements/lib/tag/tag.component.d.ts +7 -7
  113. package/elements/public_api.d.ts +25 -25
  114. package/esm2015/auth/bravobit-bb-foundation-auth.js +4 -4
  115. package/esm2015/auth/lib/auth.interceptor.js +95 -95
  116. package/esm2015/auth/lib/auth.module.js +54 -54
  117. package/esm2015/auth/lib/auth.service.js +299 -299
  118. package/esm2015/auth/lib/auth.session.js +136 -136
  119. package/esm2015/auth/lib/directives/authenticated.directive.js +32 -32
  120. package/esm2015/auth/lib/directives/permission.directive.js +81 -81
  121. package/esm2015/auth/lib/directives/role.directive.js +38 -38
  122. package/esm2015/auth/lib/guards/anonymous.guard.js +35 -35
  123. package/esm2015/auth/lib/guards/authenticated.guard.js +36 -36
  124. package/esm2015/auth/lib/helpers/jwt.helper.js +69 -69
  125. package/esm2015/auth/lib/helpers/mapper.helper.js +35 -35
  126. package/esm2015/auth/lib/interfaces/config.interface.js +3 -3
  127. package/esm2015/auth/lib/interfaces/mapper.interface.js +2 -2
  128. package/esm2015/auth/lib/interfaces/provider.interface.js +2 -2
  129. package/esm2015/auth/lib/interfaces/token.interface.js +2 -2
  130. package/esm2015/auth/lib/permissions.service.js +58 -58
  131. package/esm2015/auth/lib/providers/email.provider.js +26 -26
  132. package/esm2015/auth/lib/providers/verify.provider.js +20 -20
  133. package/esm2015/auth/lib/tokens/use-authorization.token.js +3 -3
  134. package/esm2015/auth/public_api.js +19 -19
  135. package/esm2015/bravobit-bb-foundation.js +4 -4
  136. package/esm2015/collections/bravobit-bb-foundation-collections.js +5 -0
  137. package/esm2015/collections/lib/collection.js +88 -0
  138. package/esm2015/collections/lib/collections.module.js +54 -0
  139. package/esm2015/collections/lib/components/collections-pager/collections-pager.component.js +136 -0
  140. package/esm2015/collections/lib/components/collections-viewer/collections-viewer.component.js +39 -0
  141. package/esm2015/collections/lib/components/collections.directive.js +43 -0
  142. package/esm2015/collections/lib/interfaces/collection.interface.js +2 -0
  143. package/esm2015/collections/lib/providers/api-collection.provider.js +69 -0
  144. package/esm2015/collections/lib/providers/collection.provider.js +14 -0
  145. package/esm2015/collections/lib/providers/local-collection.provider.js +16 -0
  146. package/esm2015/collections/public_api.js +10 -0
  147. package/esm2015/dashboard/bravobit-bb-foundation-dashboard.js +4 -4
  148. package/esm2015/dashboard/lib/dashboard/dashboard.component.js +64 -64
  149. package/esm2015/dashboard/lib/dashboard-header/dashboard-header.component.js +41 -41
  150. package/esm2015/dashboard/lib/dashboard-menu/dashboard-menu.component.js +39 -39
  151. package/esm2015/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.js +38 -38
  152. package/esm2015/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.js +83 -83
  153. package/esm2015/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.js +110 -110
  154. package/esm2015/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.js +71 -71
  155. package/esm2015/dashboard/lib/dashboard.module.js +47 -47
  156. package/esm2015/dashboard/public_api.js +9 -9
  157. package/esm2015/dialog/bravobit-bb-foundation-dialog.js +4 -4
  158. package/esm2015/dialog/lib/dialog-actions/dialog-actions.component.js +20 -20
  159. package/esm2015/dialog/lib/dialog-confirm/dialog-confirm.component.js +45 -45
  160. package/esm2015/dialog/lib/dialog-container/dialog-container.component.js +162 -162
  161. package/esm2015/dialog/lib/dialog-header/dialog-header.component.js +33 -33
  162. package/esm2015/dialog/lib/dialog-link/dialog-link.component.js +19 -19
  163. package/esm2015/dialog/lib/dialog-modal/dialog-modal.component.js +54 -54
  164. package/esm2015/dialog/lib/dialog-overlay/dialog-overlay.component.js +143 -143
  165. package/esm2015/dialog/lib/dialog.injector.js +18 -18
  166. package/esm2015/dialog/lib/dialog.insertion.js +16 -16
  167. package/esm2015/dialog/lib/dialog.interfaces.js +3 -3
  168. package/esm2015/dialog/lib/dialog.module.js +74 -74
  169. package/esm2015/dialog/lib/dialog.ref.js +22 -22
  170. package/esm2015/dialog/lib/dialog.service.js +77 -77
  171. package/esm2015/dialog/public_api.js +10 -10
  172. package/esm2015/elements/bravobit-bb-foundation-elements.js +4 -4
  173. package/esm2015/elements/lib/avatar/avatar.component.js +151 -151
  174. package/esm2015/elements/lib/button/button.component.js +79 -79
  175. package/esm2015/elements/lib/checkbox/checkbox.component.js +83 -83
  176. package/esm2015/elements/lib/date-picker/date-picker.component.js +322 -322
  177. package/esm2015/elements/lib/directives/addon.directive.js +29 -29
  178. package/esm2015/elements/lib/directives/autosize.directive.js +74 -74
  179. package/esm2015/elements/lib/directives/focus-trap.directive.js +77 -77
  180. package/esm2015/elements/lib/directives/focus.directive.js +39 -39
  181. package/esm2015/elements/lib/directives/form-submit.directive.js +53 -53
  182. package/esm2015/elements/lib/directives/input.directive.js +139 -139
  183. package/esm2015/elements/lib/directives/template.directive.js +28 -28
  184. package/esm2015/elements/lib/dropdown/dropdown.component.js +111 -111
  185. package/esm2015/elements/lib/elements.interfaces.js +4 -4
  186. package/esm2015/elements/lib/elements.module.js +177 -177
  187. package/esm2015/elements/lib/file-picker/file-picker.component.js +247 -247
  188. package/esm2015/elements/lib/form-control/form-control.component.js +58 -58
  189. package/esm2015/elements/lib/form-error/form-error.component.js +116 -116
  190. package/esm2015/elements/lib/form-group/form-group.component.js +27 -27
  191. package/esm2015/elements/lib/icon/icon.component.js +110 -110
  192. package/esm2015/elements/lib/image-picker/image-picker.component.js +119 -119
  193. package/esm2015/elements/lib/pipes/file-image.pipe.js +45 -45
  194. package/esm2015/elements/lib/pipes/file-size.pipe.js +28 -28
  195. package/esm2015/elements/lib/pipes/relative-time.pipe.js +96 -96
  196. package/esm2015/elements/lib/spinner/spinner.component.js +34 -34
  197. package/esm2015/elements/lib/tag/tag.component.js +26 -26
  198. package/esm2015/elements/public_api.js +26 -26
  199. package/esm2015/http/bravobit-bb-foundation-http.js +4 -4
  200. package/esm2015/http/lib/classes/http.config.js +31 -31
  201. package/esm2015/http/lib/classes/http.error.js +21 -21
  202. package/esm2015/http/lib/http.interfaces.js +2 -2
  203. package/esm2015/http/lib/http.module.js +43 -43
  204. package/esm2015/http/lib/interceptors/base-url.interceptor.js +52 -52
  205. package/esm2015/http/lib/interceptors/error.interceptor.js +33 -33
  206. package/esm2015/http/public_api.js +7 -7
  207. package/esm2015/lib/core/coercions/boolean-coercion.js +4 -4
  208. package/esm2015/lib/core/miscellaneous/regex.js +5 -5
  209. package/esm2015/lib/core/miscellaneous/validator.js +86 -86
  210. package/esm2015/lib/core/mixins/can-disable.js +16 -16
  211. package/esm2015/lib/core/mixins/can-hide-errors.js +16 -16
  212. package/esm2015/lib/core/mixins/can-load.js +16 -16
  213. package/esm2015/lib/core/mixins/constructor.js +2 -2
  214. package/esm2015/lib/core/mixins/has-error.js +16 -16
  215. package/esm2015/lib/core/mixins/is-focused.js +16 -16
  216. package/esm2015/lib/core/mixins/is-grouped.js +16 -16
  217. package/esm2015/lib/core/mixins/is-readonly.js +16 -16
  218. package/esm2015/lib/core/mixins/is-required.js +16 -16
  219. package/esm2015/lib/core/services/clipboard.service.js +72 -0
  220. package/esm2015/lib/core/services/exif.service.js +168 -168
  221. package/esm2015/lib/core/services/file-loader.service.js +90 -90
  222. package/esm2015/lib/core/services/image-converter.service.js +130 -130
  223. package/esm2015/lib/core/services/languages.service.js +74 -74
  224. package/esm2015/lib/core/services/network.service.js +56 -56
  225. package/esm2015/lib/core/services/patch.service.js +65 -65
  226. package/esm2015/lib/core/services/platform.service.js +42 -42
  227. package/esm2015/lib/core/tokens/accept-language.token.js +3 -3
  228. package/esm2015/lib/core/tokens/base-url.token.js +3 -3
  229. package/esm2015/lib/core/tokens/cookie.token.js +3 -3
  230. package/esm2015/lib/core/tokens/location.token.js +6 -6
  231. package/esm2015/lib/core/tokens/navigator.token.js +6 -6
  232. package/esm2015/lib/core/tokens/window.token.js +12 -12
  233. package/esm2015/localize/bravobit-bb-foundation-localize.js +4 -4
  234. package/esm2015/localize/lib/functions/date.function.js +18 -18
  235. package/esm2015/localize/lib/functions/lowercase.function.js +13 -13
  236. package/esm2015/localize/lib/functions/uppercase.function.js +13 -13
  237. package/esm2015/localize/lib/handlers/missing.handler.js +17 -17
  238. package/esm2015/localize/lib/interfaces/config.interfaces.js +10 -10
  239. package/esm2015/localize/lib/interfaces/dictionary.interfaces.js +8 -8
  240. package/esm2015/localize/lib/interfaces/functions.interfaces.js +8 -8
  241. package/esm2015/localize/lib/interfaces/handlers.interfaces.js +2 -2
  242. package/esm2015/localize/lib/interfaces/options.interfaces.js +6 -6
  243. package/esm2015/localize/lib/localizations/dutch.localization.js +53 -53
  244. package/esm2015/localize/lib/localizations/english.localization.js +53 -53
  245. package/esm2015/localize/lib/localize.dictionary.js +137 -137
  246. package/esm2015/localize/lib/localize.module.js +69 -69
  247. package/esm2015/localize/lib/localize.pipe.js +49 -49
  248. package/esm2015/localize/lib/localize.service.js +282 -282
  249. package/esm2015/localize/lib/views/localize-string/localize-string.component.js +99 -99
  250. package/esm2015/localize/lib/views/localize-template-or-string.directive.js +28 -28
  251. package/esm2015/localize/lib/views/localize-template.directive.js +21 -21
  252. package/esm2015/localize/public_api.js +18 -18
  253. package/esm2015/notifications/bravobit-bb-foundation-notifications.js +4 -4
  254. package/esm2015/notifications/lib/notifications-item/notifications-item.component.js +108 -108
  255. package/esm2015/notifications/lib/notifications-list/notifications-list.component.js +56 -56
  256. package/esm2015/notifications/lib/notifications.animations.js +28 -28
  257. package/esm2015/notifications/lib/notifications.injector.js +18 -18
  258. package/esm2015/notifications/lib/notifications.interfaces.js +20 -20
  259. package/esm2015/notifications/lib/notifications.module.js +31 -31
  260. package/esm2015/notifications/lib/notifications.service.js +145 -145
  261. package/esm2015/notifications/public_api.js +4 -4
  262. package/esm2015/public_api.js +30 -29
  263. package/esm2015/recaptcha/bravobit-bb-foundation-recaptcha.js +4 -4
  264. package/esm2015/recaptcha/lib/recaptcha/recaptcha.component.js +199 -199
  265. package/esm2015/recaptcha/lib/recaptcha-loader.service.js +93 -93
  266. package/esm2015/recaptcha/lib/recaptcha.interface.js +3 -3
  267. package/esm2015/recaptcha/lib/recaptcha.module.js +27 -27
  268. package/esm2015/recaptcha/public_api.js +5 -5
  269. package/esm2015/rxjs/bravobit-bb-foundation-rxjs.js +4 -4
  270. package/esm2015/rxjs/lib/operators/combine-latest-map.operator.js +7 -7
  271. package/esm2015/rxjs/lib/operators/filter-nil.operator.js +5 -5
  272. package/esm2015/rxjs/public_api.js +3 -3
  273. package/esm2015/storage/bravobit-bb-foundation-storage.js +4 -4
  274. package/esm2015/storage/lib/interfaces/attributes.interface.js +2 -2
  275. package/esm2015/storage/lib/interfaces/memory.interface.js +2 -2
  276. package/esm2015/storage/lib/interfaces/strategy.interface.js +2 -2
  277. package/esm2015/storage/lib/storage.service.js +111 -111
  278. package/esm2015/storage/lib/strategies/cookie-storage.strategy.js +143 -143
  279. package/esm2015/storage/lib/strategies/memory-storage.strategy.js +56 -56
  280. package/esm2015/storage/lib/strategies/polyfill-storage.strategy.js +102 -102
  281. package/esm2015/storage/public_api.js +8 -8
  282. package/esm2015/table/bravobit-bb-foundation-table.js +4 -4
  283. package/esm2015/table/lib/components/table/table.component.js +183 -183
  284. package/esm2015/table/lib/components/table-cell/table-cell.component.js +19 -19
  285. package/esm2015/table/lib/components/table-header-cell/table-header-cell.component.js +141 -141
  286. package/esm2015/table/lib/components/table-pager/table-pager.component.js +146 -146
  287. package/esm2015/table/lib/data/datasource.data.js +32 -32
  288. package/esm2015/table/lib/data/generic.data.js +73 -73
  289. package/esm2015/table/lib/interfaces/datasource.interface.js +2 -2
  290. package/esm2015/table/lib/interfaces/table.interfaces.js +2 -2
  291. package/esm2015/table/lib/table.module.js +39 -39
  292. package/esm2015/table/public_api.js +10 -10
  293. package/fesm2015/bravobit-bb-foundation-auth.js +915 -915
  294. package/fesm2015/bravobit-bb-foundation-auth.js.map +1 -1
  295. package/fesm2015/bravobit-bb-foundation-collections.js +447 -0
  296. package/fesm2015/bravobit-bb-foundation-collections.js.map +1 -0
  297. package/fesm2015/bravobit-bb-foundation-dashboard.js +434 -434
  298. package/fesm2015/bravobit-bb-foundation-dashboard.js.map +1 -1
  299. package/fesm2015/bravobit-bb-foundation-dialog.js +603 -603
  300. package/fesm2015/bravobit-bb-foundation-dialog.js.map +1 -1
  301. package/fesm2015/bravobit-bb-foundation-elements.js +2076 -2076
  302. package/fesm2015/bravobit-bb-foundation-elements.js.map +1 -1
  303. package/fesm2015/bravobit-bb-foundation-http.js +154 -154
  304. package/fesm2015/bravobit-bb-foundation-http.js.map +1 -1
  305. package/fesm2015/bravobit-bb-foundation-localize.js +796 -796
  306. package/fesm2015/bravobit-bb-foundation-localize.js.map +1 -1
  307. package/fesm2015/bravobit-bb-foundation-notifications.js +364 -364
  308. package/fesm2015/bravobit-bb-foundation-notifications.js.map +1 -1
  309. package/fesm2015/bravobit-bb-foundation-recaptcha.js +297 -297
  310. package/fesm2015/bravobit-bb-foundation-recaptcha.js.map +1 -1
  311. package/fesm2015/bravobit-bb-foundation-rxjs.js +7 -7
  312. package/fesm2015/bravobit-bb-foundation-rxjs.js.map +1 -1
  313. package/fesm2015/bravobit-bb-foundation-storage.js +399 -399
  314. package/fesm2015/bravobit-bb-foundation-storage.js.map +1 -1
  315. package/fesm2015/bravobit-bb-foundation-table.js +578 -578
  316. package/fesm2015/bravobit-bb-foundation-table.js.map +1 -1
  317. package/fesm2015/bravobit-bb-foundation.js +854 -785
  318. package/fesm2015/bravobit-bb-foundation.js.map +1 -1
  319. package/http/bravobit-bb-foundation-http.d.ts +5 -5
  320. package/http/lib/classes/http.config.d.ts +9 -9
  321. package/http/lib/classes/http.error.d.ts +7 -7
  322. package/http/lib/http.interfaces.d.ts +12 -12
  323. package/http/lib/http.module.d.ts +15 -15
  324. package/http/lib/interceptors/base-url.interceptor.d.ts +15 -15
  325. package/http/lib/interceptors/error.interceptor.d.ts +11 -11
  326. package/http/public_api.d.ts +6 -6
  327. package/lib/core/coercions/boolean-coercion.d.ts +1 -1
  328. package/lib/core/miscellaneous/regex.d.ts +4 -4
  329. package/lib/core/miscellaneous/validator.d.ts +13 -13
  330. package/lib/core/mixins/can-disable.d.ts +6 -6
  331. package/lib/core/mixins/can-hide-errors.d.ts +6 -6
  332. package/lib/core/mixins/can-load.d.ts +6 -6
  333. package/lib/core/mixins/constructor.d.ts +1 -1
  334. package/lib/core/mixins/has-error.d.ts +6 -6
  335. package/lib/core/mixins/is-focused.d.ts +6 -6
  336. package/lib/core/mixins/is-grouped.d.ts +6 -6
  337. package/lib/core/mixins/is-readonly.d.ts +6 -6
  338. package/lib/core/mixins/is-required.d.ts +6 -6
  339. package/lib/core/services/clipboard.service.d.ts +18 -0
  340. package/lib/core/services/exif.service.d.ts +15 -15
  341. package/lib/core/services/file-loader.service.d.ts +13 -13
  342. package/lib/core/services/image-converter.service.d.ts +21 -21
  343. package/lib/core/services/languages.service.d.ts +16 -16
  344. package/lib/core/services/network.service.d.ts +14 -14
  345. package/lib/core/services/patch.service.d.ts +16 -16
  346. package/lib/core/services/platform.service.d.ts +18 -18
  347. package/lib/core/tokens/accept-language.token.d.ts +2 -2
  348. package/lib/core/tokens/base-url.token.d.ts +2 -2
  349. package/lib/core/tokens/cookie.token.d.ts +2 -2
  350. package/lib/core/tokens/location.token.d.ts +2 -2
  351. package/lib/core/tokens/navigator.token.d.ts +2 -2
  352. package/lib/core/tokens/window.token.d.ts +2 -2
  353. package/localize/bravobit-bb-foundation-localize.d.ts +5 -5
  354. package/localize/lib/functions/date.function.d.ts +5 -5
  355. package/localize/lib/functions/lowercase.function.d.ts +5 -5
  356. package/localize/lib/functions/uppercase.function.d.ts +5 -5
  357. package/localize/lib/handlers/missing.handler.d.ts +6 -6
  358. package/localize/lib/interfaces/config.interfaces.d.ts +8 -8
  359. package/localize/lib/interfaces/dictionary.interfaces.d.ts +12 -12
  360. package/localize/lib/interfaces/functions.interfaces.d.ts +9 -9
  361. package/localize/lib/interfaces/handlers.interfaces.d.ts +6 -6
  362. package/localize/lib/interfaces/options.interfaces.d.ts +10 -10
  363. package/localize/lib/localizations/dutch.localization.d.ts +51 -51
  364. package/localize/lib/localizations/english.localization.d.ts +51 -51
  365. package/localize/lib/localize.dictionary.d.ts +24 -24
  366. package/localize/lib/localize.module.d.ts +18 -18
  367. package/localize/lib/localize.pipe.d.ts +12 -12
  368. package/localize/lib/localize.service.d.ts +51 -51
  369. package/localize/lib/views/localize-string/localize-string.component.d.ts +23 -23
  370. package/localize/lib/views/localize-template-or-string.directive.d.ts +10 -10
  371. package/localize/lib/views/localize-template.directive.d.ts +9 -9
  372. package/localize/public_api.d.ts +17 -17
  373. package/notifications/bravobit-bb-foundation-notifications.d.ts +5 -5
  374. package/notifications/lib/notifications-item/notifications-item.component.d.ts +34 -34
  375. package/notifications/lib/notifications-list/notifications-list.component.d.ts +16 -16
  376. package/notifications/lib/notifications.animations.d.ts +1 -1
  377. package/notifications/lib/notifications.injector.d.ts +8 -8
  378. package/notifications/lib/notifications.interfaces.d.ts +49 -49
  379. package/notifications/lib/notifications.module.d.ts +13 -13
  380. package/notifications/lib/notifications.service.d.ts +34 -34
  381. package/notifications/public_api.d.ts +3 -3
  382. package/package.json +5 -5
  383. package/public_api.d.ts +26 -25
  384. package/recaptcha/bravobit-bb-foundation-recaptcha.d.ts +5 -5
  385. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +47 -47
  386. package/recaptcha/lib/recaptcha-loader.service.d.ts +22 -22
  387. package/recaptcha/lib/recaptcha.interface.d.ts +14 -14
  388. package/recaptcha/lib/recaptcha.module.d.ts +10 -10
  389. package/recaptcha/public_api.d.ts +4 -4
  390. package/rxjs/bravobit-bb-foundation-rxjs.d.ts +5 -5
  391. package/rxjs/lib/operators/combine-latest-map.operator.d.ts +8 -8
  392. package/rxjs/lib/operators/filter-nil.operator.d.ts +1 -1
  393. package/rxjs/public_api.d.ts +2 -2
  394. package/storage/bravobit-bb-foundation-storage.d.ts +5 -5
  395. package/storage/lib/interfaces/attributes.interface.d.ts +13 -13
  396. package/storage/lib/interfaces/memory.interface.d.ts +7 -7
  397. package/storage/lib/interfaces/strategy.interface.d.ts +17 -17
  398. package/storage/lib/storage.service.d.ts +26 -26
  399. package/storage/lib/strategies/cookie-storage.strategy.d.ts +20 -20
  400. package/storage/lib/strategies/memory-storage.strategy.d.ts +11 -11
  401. package/storage/lib/strategies/polyfill-storage.strategy.d.ts +15 -15
  402. package/storage/public_api.d.ts +7 -7
  403. package/table/bravobit-bb-foundation-table.d.ts +5 -5
  404. package/table/lib/components/table/table.component.d.ts +48 -48
  405. package/table/lib/components/table-cell/table-cell.component.d.ts +5 -5
  406. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +29 -29
  407. package/table/lib/components/table-pager/table-pager.component.d.ts +41 -41
  408. package/table/lib/data/datasource.data.d.ts +14 -14
  409. package/table/lib/data/generic.data.d.ts +23 -23
  410. package/table/lib/interfaces/datasource.interface.d.ts +17 -17
  411. package/table/lib/interfaces/table.interfaces.d.ts +1 -1
  412. package/table/lib/table.module.d.ts +14 -14
  413. package/table/public_api.d.ts +9 -9
@@ -12,598 +12,598 @@ import { CommonModule } from '@angular/common';
12
12
  import * as i5 from '@bravobit/bb-foundation/localize';
13
13
  import { LocalizeModule } from '@bravobit/bb-foundation/localize';
14
14
 
15
- class DataSourceRequest {
16
- constructor() {
17
- // Data.
18
- this._request$ = new BehaviorSubject(null);
19
- this._loading$ = new BehaviorSubject(true);
20
- }
21
- get loading() {
22
- return this._loading$.asObservable();
23
- }
24
- get when() {
25
- return this._request$.pipe(filter(data => !!data));
26
- }
27
- startLoading() {
28
- this._loading$.next(true);
29
- }
30
- stopLoading() {
31
- this._loading$.next(false);
32
- }
33
- update(params = {}) {
34
- const currentValue = this._request$.getValue();
35
- // Set the page number to 1 if the query or page size was changed.
36
- if (currentValue && params && ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.query) !== (params === null || params === void 0 ? void 0 : params.query) || (currentValue === null || currentValue === void 0 ? void 0 : currentValue.pageSize) !== (params === null || params === void 0 ? void 0 : params.pageSize))) {
37
- params.pageNumber = 1;
38
- }
39
- this._request$.next(Object.assign(Object.assign({}, currentValue), params));
40
- }
41
- }
42
- class DataSource {
15
+ class DataSourceRequest {
16
+ constructor() {
17
+ // Data.
18
+ this._request$ = new BehaviorSubject(null);
19
+ this._loading$ = new BehaviorSubject(true);
20
+ }
21
+ get loading() {
22
+ return this._loading$.asObservable();
23
+ }
24
+ get when() {
25
+ return this._request$.pipe(filter(data => !!data));
26
+ }
27
+ startLoading() {
28
+ this._loading$.next(true);
29
+ }
30
+ stopLoading() {
31
+ this._loading$.next(false);
32
+ }
33
+ update(params = {}) {
34
+ const currentValue = this._request$.getValue();
35
+ // Set the page number to 1 if the query or page size was changed.
36
+ if (currentValue && params && ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.query) !== (params === null || params === void 0 ? void 0 : params.query) || (currentValue === null || currentValue === void 0 ? void 0 : currentValue.pageSize) !== (params === null || params === void 0 ? void 0 : params.pageSize))) {
37
+ params.pageNumber = 1;
38
+ }
39
+ this._request$.next(Object.assign(Object.assign({}, currentValue), params));
40
+ }
41
+ }
42
+ class DataSource {
43
43
  }
44
44
 
45
- class GenericDataSource extends DataSource {
46
- constructor(httpClient, endpoint) {
47
- super();
48
- // Data.
49
- this._items$ = new BehaviorSubject([]);
50
- this._fn = data => data;
51
- this.formatResponse = (data) => {
52
- return {
53
- pageSize: data === null || data === void 0 ? void 0 : data['page_size'],
54
- pageNumber: data === null || data === void 0 ? void 0 : data['page_number'],
55
- totalPages: data === null || data === void 0 ? void 0 : data['total_pages'],
56
- totalEntries: data === null || data === void 0 ? void 0 : data['total_entries'],
57
- data: data === null || data === void 0 ? void 0 : data['data']
58
- };
59
- };
60
- this.formatParams = (data) => {
61
- var _a, _b, _c, _d, _e, _f, _g;
62
- const params = {};
63
- params['page'] = `${(_a = data === null || data === void 0 ? void 0 : data.pageNumber) !== null && _a !== void 0 ? _a : 1}`;
64
- params['page_size'] = `${(_b = data === null || data === void 0 ? void 0 : data.pageSize) !== null && _b !== void 0 ? _b : 25}`;
65
- const sort = ((_c = data === null || data === void 0 ? void 0 : data.sort) !== null && _c !== void 0 ? _c : [])
66
- .map(({ name }) => name)
67
- .filter(name => !!name)
68
- .join(',');
69
- const sortDirection = ((_d = data === null || data === void 0 ? void 0 : data.sort) !== null && _d !== void 0 ? _d : [])
70
- .map(({ direction }) => direction)
71
- .filter(direction => !!direction)
72
- .join(',');
73
- if ((sort === null || sort === void 0 ? void 0 : sort.length) > 0 && (sortDirection === null || sortDirection === void 0 ? void 0 : sortDirection.length) > 0) {
74
- params['sort'] = sort;
75
- params['sort_direction'] = sortDirection;
76
- }
77
- if ((data === null || data === void 0 ? void 0 : data.query) && ((_e = data === null || data === void 0 ? void 0 : data.query) === null || _e === void 0 ? void 0 : _e.length) > 0 && (data === null || data === void 0 ? void 0 : data.queryFields) && ((_f = data === null || data === void 0 ? void 0 : data.queryFields) === null || _f === void 0 ? void 0 : _f.length) > 0) {
78
- params['query'] = data === null || data === void 0 ? void 0 : data.query;
79
- params['query_fields'] = (_g = data === null || data === void 0 ? void 0 : data.queryFields) === null || _g === void 0 ? void 0 : _g.join(',');
80
- }
81
- return params;
82
- };
83
- this._httpClient = httpClient;
84
- this._endpoint$ = typeof endpoint === 'string'
85
- ? of(endpoint)
86
- : endpoint;
87
- }
88
- append(item) {
89
- const currentValue = this._items$.getValue();
90
- const newValue = [...currentValue, item];
91
- this._items$.next(newValue);
92
- return this;
93
- }
94
- data(fn) {
95
- this._fn = fn;
96
- return this;
97
- }
98
- handle(request) {
99
- const extraParams$ = this._items$.pipe(switchMap(items => (items === null || items === void 0 ? void 0 : items.length) <= 0 ? of([]) : combineLatest(items)), map(items => items.reduce((previous, current) => (Object.assign(Object.assign({}, previous), (current !== null && current !== void 0 ? current : {}))), {})));
100
- return combineLatest([request.when, this._endpoint$, extraParams$]).pipe(switchMap(([params, endpoint, extraParams]) => {
101
- // Start the loading.
102
- request.startLoading();
103
- const formattedParams = this.formatParams(params);
104
- const combinedParams = Object.assign(Object.assign({}, formattedParams), extraParams);
105
- return this._httpClient.get(endpoint, {
106
- params: combinedParams
107
- }).pipe(map(data => this.formatResponse(data)), map(result => {
108
- var _a;
109
- return (Object.assign(Object.assign({}, result), { data: this._fn((_a = result === null || result === void 0 ? void 0 : result.data) !== null && _a !== void 0 ? _a : []) }));
110
- }));
111
- }), share());
112
- }
45
+ class GenericDataSource extends DataSource {
46
+ constructor(httpClient, endpoint) {
47
+ super();
48
+ // Data.
49
+ this._items$ = new BehaviorSubject([]);
50
+ this._fn = data => data;
51
+ this.formatResponse = (data) => {
52
+ return {
53
+ pageSize: data === null || data === void 0 ? void 0 : data['page_size'],
54
+ pageNumber: data === null || data === void 0 ? void 0 : data['page_number'],
55
+ totalPages: data === null || data === void 0 ? void 0 : data['total_pages'],
56
+ totalEntries: data === null || data === void 0 ? void 0 : data['total_entries'],
57
+ data: data === null || data === void 0 ? void 0 : data['data']
58
+ };
59
+ };
60
+ this.formatParams = (data) => {
61
+ var _a, _b, _c, _d, _e, _f, _g;
62
+ const params = {};
63
+ params['page'] = `${(_a = data === null || data === void 0 ? void 0 : data.pageNumber) !== null && _a !== void 0 ? _a : 1}`;
64
+ params['page_size'] = `${(_b = data === null || data === void 0 ? void 0 : data.pageSize) !== null && _b !== void 0 ? _b : 25}`;
65
+ const sort = ((_c = data === null || data === void 0 ? void 0 : data.sort) !== null && _c !== void 0 ? _c : [])
66
+ .map(({ name }) => name)
67
+ .filter(name => !!name)
68
+ .join(',');
69
+ const sortDirection = ((_d = data === null || data === void 0 ? void 0 : data.sort) !== null && _d !== void 0 ? _d : [])
70
+ .map(({ direction }) => direction)
71
+ .filter(direction => !!direction)
72
+ .join(',');
73
+ if ((sort === null || sort === void 0 ? void 0 : sort.length) > 0 && (sortDirection === null || sortDirection === void 0 ? void 0 : sortDirection.length) > 0) {
74
+ params['sort'] = sort;
75
+ params['sort_direction'] = sortDirection;
76
+ }
77
+ if ((data === null || data === void 0 ? void 0 : data.query) && ((_e = data === null || data === void 0 ? void 0 : data.query) === null || _e === void 0 ? void 0 : _e.length) > 0 && (data === null || data === void 0 ? void 0 : data.queryFields) && ((_f = data === null || data === void 0 ? void 0 : data.queryFields) === null || _f === void 0 ? void 0 : _f.length) > 0) {
78
+ params['query'] = data === null || data === void 0 ? void 0 : data.query;
79
+ params['query_fields'] = (_g = data === null || data === void 0 ? void 0 : data.queryFields) === null || _g === void 0 ? void 0 : _g.join(',');
80
+ }
81
+ return params;
82
+ };
83
+ this._httpClient = httpClient;
84
+ this._endpoint$ = typeof endpoint === 'string'
85
+ ? of(endpoint)
86
+ : endpoint;
87
+ }
88
+ append(item) {
89
+ const currentValue = this._items$.getValue();
90
+ const newValue = [...currentValue, item];
91
+ this._items$.next(newValue);
92
+ return this;
93
+ }
94
+ data(fn) {
95
+ this._fn = fn;
96
+ return this;
97
+ }
98
+ handle(request) {
99
+ const extraParams$ = this._items$.pipe(switchMap(items => (items === null || items === void 0 ? void 0 : items.length) <= 0 ? of([]) : combineLatest(items)), map(items => items.reduce((previous, current) => (Object.assign(Object.assign({}, previous), (current !== null && current !== void 0 ? current : {}))), {})));
100
+ return combineLatest([request.when, this._endpoint$, extraParams$]).pipe(switchMap(([params, endpoint, extraParams]) => {
101
+ // Start the loading.
102
+ request.startLoading();
103
+ const formattedParams = this.formatParams(params);
104
+ const combinedParams = Object.assign(Object.assign({}, formattedParams), extraParams);
105
+ return this._httpClient.get(endpoint, {
106
+ params: combinedParams
107
+ }).pipe(map(data => this.formatResponse(data)), map(result => {
108
+ var _a;
109
+ return (Object.assign(Object.assign({}, result), { data: this._fn((_a = result === null || result === void 0 ? void 0 : result.data) !== null && _a !== void 0 ? _a : []) }));
110
+ }));
111
+ }), share());
112
+ }
113
113
  }
114
114
 
115
- class BbTablePagerBase {
116
- }
117
- const BbTablePagerMixinBase = mixinDisabled(BbTablePagerBase);
118
- class BbTablePager extends BbTablePagerMixinBase {
119
- constructor() {
120
- super(...arguments);
121
- // Inputs.
122
- this.amountOfButtons = 5;
123
- this.showArrowButtons = true;
124
- // Methods.
125
- this.onChange = () => ({});
126
- this.onTouched = () => ({});
127
- this.trackByIndex = (_, item) => item.page;
128
- // Data.
129
- this._totalPages$ = new BehaviorSubject(1);
130
- this._pageNumber$ = new BehaviorSubject(1);
131
- }
132
- ngOnInit() {
133
- // Validate the previous button is disabled.
134
- this.isPreviousDisabled$ = this._pageNumber$.pipe(map(pageNumber => pageNumber === 1));
135
- // Validate the next button is disabled.
136
- this.isNextDisabled$ = combineLatest([this._pageNumber$, this._totalPages$]).pipe(map(([pageNumber, totalPages]) => pageNumber === totalPages));
137
- // Create the list with page numbers.
138
- this.list$ = combineLatest([this._pageNumber$, this._totalPages$]).pipe(map(([pageNumber, totalPages]) => this.filterActivePages(pageNumber, totalPages)), share());
139
- }
140
- get pageNumber() {
141
- return this._pageNumber$.getValue();
142
- }
143
- set pageNumber(newValue) {
144
- this.update(newValue);
145
- }
146
- get totalPages() {
147
- return this._totalPages$.getValue();
148
- }
149
- set totalPages(newValue) {
150
- const newTotalPages = Math.max(1, newValue);
151
- this._totalPages$.next(newTotalPages);
152
- }
153
- registerOnChange(fn) {
154
- this.onChange = fn;
155
- }
156
- registerOnTouched(fn) {
157
- this.onTouched = fn;
158
- }
159
- setDisabledState(isDisabled) {
160
- this.disabled = isDisabled;
161
- }
162
- writeValue(newValue) {
163
- this.update(newValue, false);
164
- }
165
- goToPrevious() {
166
- const newValue = this._pageNumber$.getValue() - 1;
167
- return this.update(newValue);
168
- }
169
- goToNext() {
170
- const newValue = this._pageNumber$.getValue() + 1;
171
- return this.update(newValue);
172
- }
173
- goToIndex(index) {
174
- return this.update(index);
175
- }
176
- update(pageNumber, notify = true) {
177
- // You can only update when not disabled.
178
- if (this.disabled) {
179
- return;
180
- }
181
- // Calculate the new value.
182
- const newValue = Math.min(this.totalPages, Math.max(1, pageNumber));
183
- // Don't do anything if the page number is the same.
184
- if (this._pageNumber$.getValue() === newValue) {
185
- return;
186
- }
187
- // Push the new value.
188
- this._pageNumber$.next(newValue);
189
- if (notify) {
190
- return this.onChange(pageNumber);
191
- }
192
- }
193
- calculatePages(pageNumber) {
194
- const min = 1;
195
- const max = this.totalPages;
196
- const amount = Math.max(1, this.amountOfButtons);
197
- const data = Array(amount)
198
- .fill(0)
199
- .map((_, index) => pageNumber + (index - 1));
200
- // Validate if the minimum value less than
201
- // the first value.
202
- if (data[0] < min) {
203
- return data.map(item => item + 1);
204
- }
205
- // Calculate the difference with the max
206
- // if this value is higher than 0 we should minus it.
207
- const lastValueInArray = data[data.length - 1];
208
- const differenceWithMax = lastValueInArray - max;
209
- if (differenceWithMax > 0) {
210
- return data.map(item => item - differenceWithMax);
211
- }
212
- // Just return the default data.
213
- return data;
214
- }
215
- filterActivePages(pageNumber, totalPages) {
216
- return this.calculatePages(pageNumber)
217
- .filter(page => page > 0 && page <= totalPages)
218
- .map(page => ({ page, active: pageNumber === page }));
219
- }
220
- }
221
- BbTablePager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTablePager, deps: null, target: i0.ɵɵFactoryTarget.Component });
222
- BbTablePager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: BbTablePager, selector: "bb-table-pager", inputs: { disabled: "disabled", amountOfButtons: "amountOfButtons", showArrowButtons: "showArrowButtons", pageNumber: "pageNumber", totalPages: "totalPages" }, host: { properties: { "class.disabled": "disabled" }, classAttribute: "bb-table-pager" }, providers: [
223
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
224
- ], usesInheritance: true, ngImport: i0, template: "<ul class=\"bb-pager-list\">\r\n <!-- The previous page arrow button. -->\r\n <li *ngIf=\"showArrowButtons\"\r\n class=\"bb-pager-list-item\"\r\n title=\"Previous page\">\r\n <button [disabled]=\"isPreviousDisabled$ | async\"\r\n (click)=\"goToPrevious()\"\r\n class=\"bb-pager-list-button\"\r\n type=\"button\">\r\n <bb-icon src=\"material:keyboard_arrow_left\"></bb-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- The list of number buttons to navigate through the list. -->\r\n <ng-container *ngIf=\"list$ | async as list\">\r\n <li *ngFor=\"let item of list; trackBy: trackByIndex\"\r\n [title]=\"'Page ' + item?.page\"\r\n class=\"bb-pager-list-item\">\r\n <button (click)=\"goToIndex(item?.page)\"\r\n [class.active]=\"item?.active\"\r\n class=\"bb-pager-list-button\"\r\n type=\"button\">\r\n {{ item?.page }}\r\n </button>\r\n </li>\r\n </ng-container>\r\n\r\n <!-- The next page arrow button. -->\r\n <li *ngIf=\"showArrowButtons\"\r\n class=\"bb-pager-list-item\"\r\n title=\"Next page\">\r\n <button [disabled]=\"isNextDisabled$ | async\"\r\n (click)=\"goToNext()\"\r\n class=\"bb-pager-list-button\"\r\n type=\"button\">\r\n <bb-icon src=\"material:keyboard_arrow_right\"></bb-icon>\r\n </button>\r\n </li>\r\n</ul>\r\n", styles: [".bb-table-pager{flex:1;display:flex;align-items:center;justify-content:flex-end}.bb-table-pager.disabled{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.bb-pager-list{display:flex}.bb-pager-list-item{margin-left:8px}.bb-pager-list-button{padding:0;color:#3d464d;line-height:1;min-width:32px;font-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:500;min-height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:4px;align-items:center;display:inline-flex;justify-content:center;border:1px solid #b6bbc1;transition-duration:.2s;background-color:transparent;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:color,border-color,opacity,background-color;box-shadow:inset 0 3px 0 0 hsla(213,8%,74%,.2),0 6px 6px -6px rgba(0,0,0,.1)}.bb-pager-list-button:focus,.bb-pager-list-button:hover{background-color:rgba(0,0,0,.04)}.bb-pager-list-button.active,.bb-pager-list-button.active:hover{color:#2196f3;cursor:default;border-color:#2196f3;background-color:transparent}.bb-pager-list-button:disabled{opacity:.35;cursor:default;pointer-events:none}"], components: [{ type: i1.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTablePager, decorators: [{
226
- type: Component,
227
- args: [{
228
- selector: 'bb-table-pager',
229
- templateUrl: './table-pager.component.html',
230
- styleUrls: ['./table-pager.component.scss'],
231
- changeDetection: ChangeDetectionStrategy.OnPush,
232
- host: {
233
- 'class': 'bb-table-pager',
234
- '[class.disabled]': 'disabled'
235
- },
236
- inputs: ['disabled'],
237
- encapsulation: ViewEncapsulation.None,
238
- preserveWhitespaces: false,
239
- providers: [
240
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
241
- ]
242
- }]
243
- }], propDecorators: { amountOfButtons: [{
244
- type: Input
245
- }], showArrowButtons: [{
246
- type: Input
247
- }], pageNumber: [{
248
- type: Input
249
- }], totalPages: [{
250
- type: Input
115
+ class BbTablePagerBase {
116
+ }
117
+ const BbTablePagerMixinBase = mixinDisabled(BbTablePagerBase);
118
+ class BbTablePager extends BbTablePagerMixinBase {
119
+ constructor() {
120
+ super(...arguments);
121
+ // Inputs.
122
+ this.amountOfButtons = 5;
123
+ this.showArrowButtons = true;
124
+ // Methods.
125
+ this.onChange = () => ({});
126
+ this.onTouched = () => ({});
127
+ this.trackByIndex = (_, item) => item.page;
128
+ // Data.
129
+ this._totalPages$ = new BehaviorSubject(1);
130
+ this._pageNumber$ = new BehaviorSubject(1);
131
+ }
132
+ ngOnInit() {
133
+ // Validate the previous button is disabled.
134
+ this.isPreviousDisabled$ = this._pageNumber$.pipe(map(pageNumber => pageNumber === 1));
135
+ // Validate the next button is disabled.
136
+ this.isNextDisabled$ = combineLatest([this._pageNumber$, this._totalPages$]).pipe(map(([pageNumber, totalPages]) => pageNumber === totalPages));
137
+ // Create the list with page numbers.
138
+ this.list$ = combineLatest([this._pageNumber$, this._totalPages$]).pipe(map(([pageNumber, totalPages]) => this.filterActivePages(pageNumber, totalPages)), share());
139
+ }
140
+ get pageNumber() {
141
+ return this._pageNumber$.getValue();
142
+ }
143
+ set pageNumber(newValue) {
144
+ this.update(newValue);
145
+ }
146
+ get totalPages() {
147
+ return this._totalPages$.getValue();
148
+ }
149
+ set totalPages(newValue) {
150
+ const newTotalPages = Math.max(1, newValue);
151
+ this._totalPages$.next(newTotalPages);
152
+ }
153
+ registerOnChange(fn) {
154
+ this.onChange = fn;
155
+ }
156
+ registerOnTouched(fn) {
157
+ this.onTouched = fn;
158
+ }
159
+ setDisabledState(isDisabled) {
160
+ this.disabled = isDisabled;
161
+ }
162
+ writeValue(newValue) {
163
+ this.update(newValue, false);
164
+ }
165
+ goToPrevious() {
166
+ const newValue = this._pageNumber$.getValue() - 1;
167
+ return this.update(newValue);
168
+ }
169
+ goToNext() {
170
+ const newValue = this._pageNumber$.getValue() + 1;
171
+ return this.update(newValue);
172
+ }
173
+ goToIndex(index) {
174
+ return this.update(index);
175
+ }
176
+ update(pageNumber, notify = true) {
177
+ // You can only update when not disabled.
178
+ if (this.disabled) {
179
+ return;
180
+ }
181
+ // Calculate the new value.
182
+ const newValue = Math.min(this.totalPages, Math.max(1, pageNumber));
183
+ // Don't do anything if the page number is the same.
184
+ if (this._pageNumber$.getValue() === newValue) {
185
+ return;
186
+ }
187
+ // Push the new value.
188
+ this._pageNumber$.next(newValue);
189
+ if (notify) {
190
+ return this.onChange(pageNumber);
191
+ }
192
+ }
193
+ calculatePages(pageNumber) {
194
+ const min = 1;
195
+ const max = this.totalPages;
196
+ const amount = Math.max(1, this.amountOfButtons);
197
+ const data = Array(amount)
198
+ .fill(0)
199
+ .map((_, index) => pageNumber + (index - 1));
200
+ // Validate if the minimum value less than
201
+ // the first value.
202
+ if (data[0] < min) {
203
+ return data.map(item => item + 1);
204
+ }
205
+ // Calculate the difference with the max
206
+ // if this value is higher than 0 we should minus it.
207
+ const lastValueInArray = data[data.length - 1];
208
+ const differenceWithMax = lastValueInArray - max;
209
+ if (differenceWithMax > 0) {
210
+ return data.map(item => item - differenceWithMax);
211
+ }
212
+ // Just return the default data.
213
+ return data;
214
+ }
215
+ filterActivePages(pageNumber, totalPages) {
216
+ return this.calculatePages(pageNumber)
217
+ .filter(page => page > 0 && page <= totalPages)
218
+ .map(page => ({ page, active: pageNumber === page }));
219
+ }
220
+ }
221
+ BbTablePager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTablePager, deps: null, target: i0.ɵɵFactoryTarget.Component });
222
+ BbTablePager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbTablePager, selector: "bb-table-pager", inputs: { disabled: "disabled", amountOfButtons: "amountOfButtons", showArrowButtons: "showArrowButtons", pageNumber: "pageNumber", totalPages: "totalPages" }, host: { properties: { "class.disabled": "disabled" }, classAttribute: "bb-table-pager" }, providers: [
223
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
224
+ ], usesInheritance: true, ngImport: i0, template: "<ul class=\"bb-pager-list\">\n <!-- The previous page arrow button. -->\n <li *ngIf=\"showArrowButtons\"\n class=\"bb-pager-list-item\"\n title=\"Previous page\">\n <button [disabled]=\"isPreviousDisabled$ | async\"\n (click)=\"goToPrevious()\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n <bb-icon src=\"material:keyboard_arrow_left\"></bb-icon>\n </button>\n </li>\n\n <!-- The list of number buttons to navigate through the list. -->\n <ng-container *ngIf=\"list$ | async as list\">\n <li *ngFor=\"let item of list; trackBy: trackByIndex\"\n [title]=\"'Page ' + item?.page\"\n class=\"bb-pager-list-item\">\n <button (click)=\"goToIndex(item?.page)\"\n [class.active]=\"item?.active\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n </ng-container>\n\n <!-- The next page arrow button. -->\n <li *ngIf=\"showArrowButtons\"\n class=\"bb-pager-list-item\"\n title=\"Next page\">\n <button [disabled]=\"isNextDisabled$ | async\"\n (click)=\"goToNext()\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n <bb-icon src=\"material:keyboard_arrow_right\"></bb-icon>\n </button>\n </li>\n</ul>\n", styles: [".bb-table-pager{flex:1;display:flex;align-items:center;justify-content:flex-end}.bb-table-pager.disabled{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.bb-pager-list{display:flex}.bb-pager-list-item{margin-left:8px}.bb-pager-list-button{padding:0;color:#3d464d;line-height:1;min-width:32px;font-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:500;min-height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:4px;align-items:center;display:inline-flex;justify-content:center;border:1px solid #b6bbc1;transition-duration:.2s;background-color:transparent;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:color,border-color,opacity,background-color;box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a}.bb-pager-list-button:hover,.bb-pager-list-button:focus{background-color:#0000000a}.bb-pager-list-button.active,.bb-pager-list-button.active:hover{color:#2196f3;cursor:default;border-color:#2196f3;background-color:transparent}.bb-pager-list-button:disabled{opacity:.35;cursor:default;pointer-events:none}\n"], components: [{ type: i1.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTablePager, decorators: [{
226
+ type: Component,
227
+ args: [{
228
+ selector: 'bb-table-pager',
229
+ templateUrl: './table-pager.component.html',
230
+ styleUrls: ['./table-pager.component.scss'],
231
+ changeDetection: ChangeDetectionStrategy.OnPush,
232
+ host: {
233
+ 'class': 'bb-table-pager',
234
+ '[class.disabled]': 'disabled'
235
+ },
236
+ inputs: ['disabled'],
237
+ encapsulation: ViewEncapsulation.None,
238
+ preserveWhitespaces: false,
239
+ providers: [
240
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
241
+ ]
242
+ }]
243
+ }], propDecorators: { amountOfButtons: [{
244
+ type: Input
245
+ }], showArrowButtons: [{
246
+ type: Input
247
+ }], pageNumber: [{
248
+ type: Input
249
+ }], totalPages: [{
250
+ type: Input
251
251
  }] } });
252
252
 
253
- class BbTableColumnDef {
254
- }
255
- BbTableColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTableColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
256
- BbTableColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.4", type: BbTableColumnDef, selector: "[bbTableColumnDef]", ngImport: i0 });
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTableColumnDef, decorators: [{
258
- type: Directive,
259
- args: [{
260
- selector: '[bbTableColumnDef]'
261
- }]
262
- }] });
263
- class BbTable {
264
- constructor() {
265
- // Inputs.
266
- this.identifier = null;
267
- this.queryFields = [];
268
- this.sortingStrategy = 'single';
269
- this.header = true;
270
- this.footer = true;
271
- // Sizes.
272
- this._sizes = [25, 50, 75, 100];
273
- // Optimizations.
274
- this.trackByFn = (index, item) => this.identifier ? item[this.identifier] : index;
275
- this.trackByValue = (_, item) => item;
276
- this.queryControl = new FormControl('');
277
- }
278
- get sizes() {
279
- return this._sizes;
280
- }
281
- set sizes(newValue) {
282
- this.updateSizes(newValue);
283
- }
284
- ngOnInit() {
285
- this.composeForm();
286
- this.watchDataChanges();
287
- }
288
- ngOnDestroy() {
289
- var _a;
290
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
291
- }
292
- get sortControl() {
293
- var _a;
294
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('sort');
295
- }
296
- get pageNumberControl() {
297
- var _a;
298
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('pageNumber');
299
- }
300
- get pageSizeControl() {
301
- var _a;
302
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('pageSize');
303
- }
304
- refresh() {
305
- return this.request.update();
306
- }
307
- updateSizes(newValue) {
308
- // Validate the sizes has at least one value.
309
- if (newValue.length <= 0) {
310
- throw new Error('Cannot set an empty array as the sizes.');
311
- }
312
- // Set the new size.
313
- this._sizes = newValue;
314
- // Validate that the form exists already.
315
- if (!this.form) {
316
- return;
317
- }
318
- // Check if the current selected value is
319
- // in the new sizes array.
320
- const pageSizeControl = this.form.get('pageSize');
321
- if (this._sizes.includes(pageSizeControl.value)) {
322
- return;
323
- }
324
- // Set the first value in the array as
325
- // the new value.
326
- const firstValue = this._sizes[0];
327
- pageSizeControl.setValue(firstValue);
328
- }
329
- composeForm() {
330
- // Setup the form.
331
- this.form = new FormGroup({
332
- pageSize: new FormControl(this._sizes[0]),
333
- pageNumber: new FormControl(1),
334
- sort: new FormGroup({})
335
- });
336
- }
337
- watchDataChanges() {
338
- // Create a new request.
339
- this.request = new DataSourceRequest();
340
- this.isLoading$ = this.request.loading;
341
- if (!this.dataSource) {
342
- this.data$ = of({ state: 'error_datasource' }).pipe(tap(() => this.request.stopLoading()));
343
- return;
344
- }
345
- // Pass the request to the data source.
346
- this.data$ = this.dataSource.handle(this.request).pipe(tap(() => this.request.stopLoading()), map(result => {
347
- const count = (result && result.data && result.data.length) || 0;
348
- if (count <= 0) {
349
- return { state: 'empty', result };
350
- }
351
- return { state: 'success', result };
352
- }), catchError(error => {
353
- var _a, _b;
354
- this.request.stopLoading();
355
- const statusCode = (_a = error === null || error === void 0 ? void 0 : error.status) !== null && _a !== void 0 ? _a : null;
356
- const states = {
357
- 0: 'error_down',
358
- 401: 'error_unauthorized',
359
- 403: 'error_forbidden',
360
- 404: 'error_not_found',
361
- 500: 'error_server'
362
- };
363
- return of({ state: (_b = states === null || states === void 0 ? void 0 : states[statusCode]) !== null && _b !== void 0 ? _b : 'error_unknown', statusCode: statusCode });
364
- }));
365
- // Subscribe to the data changes.
366
- this.subscribeToChanges();
367
- }
368
- subscribeToChanges() {
369
- const form$ = this.getFormChanges();
370
- const query$ = this.getQueryChanges();
371
- this._subscription = combineLatest([form$, query$]).subscribe(([form, query]) => {
372
- const { pageNumber, pageSize } = form;
373
- const sort = Object.keys(form.sort)
374
- .map(name => ({ name, direction: form.sort[name] }))
375
- .filter(item => ['asc', 'desc'].includes(item.direction));
376
- this.request.startLoading();
377
- return this.request.update({
378
- sort,
379
- query,
380
- pageSize,
381
- pageNumber,
382
- queryFields: this.queryFields
383
- });
384
- });
385
- }
386
- getQueryChanges() {
387
- return this.queryControl.valueChanges.pipe(debounceTime(400), distinctUntilChanged(), startWith(this.queryControl.value));
388
- }
389
- getFormChanges() {
390
- return this.form.valueChanges.pipe(startWith(this.form.value));
391
- }
392
- }
393
- BbTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
394
- BbTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: BbTable, selector: "bb-table", inputs: { identifier: "identifier", dataSource: "dataSource", queryFields: "queryFields", sortingStrategy: "sortingStrategy", header: "header", footer: "footer", sizes: "sizes" }, host: { classAttribute: "bb-table" }, queries: [{ propertyName: "tableColumnTemplates", predicate: BbTableColumnDef, read: TemplateRef }], ngImport: i0, template: "<!--\r\n This is the header of the table. It can be a user\r\n defined custom header or just the default header.\r\n-->\r\n\r\n<header *ngIf=\"(header === true ? headerTemplate : header) as template\"\r\n class=\"bb-table-top-actions\">\r\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\r\n</header>\r\n\r\n<!--\r\n This is the table that contains the\r\n rows and columns.\r\n-->\r\n\r\n<div class=\"bb-table-wrapper\">\r\n <div *ngIf=\"isLoading$ | async\"\r\n class=\"bb-table-progress\">\r\n <div class=\"bb-table-indeterminate\"></div>\r\n </div>\r\n <table class=\"bb-table-container\">\r\n <thead>\r\n <tr>\r\n <ng-content select=\"bb-table-header-cell\"></ng-content>\r\n </tr>\r\n </thead>\r\n <tbody *ngIf=\"data$ | async as data; else isLoadingTemplate\"\r\n [ngSwitch]=\"data?.state\">\r\n <ng-container *ngSwitchCase=\"'success'\">\r\n <tr *ngFor=\"let item of data?.result?.data; trackBy: trackByFn\">\r\n <ng-container *ngFor=\"let template of tableColumnTemplates\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'empty'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'error_datasource'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'error_not_found'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'error_server'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'error_down'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<footer *ngIf=\"(footer === true ? footerTemplate : footer) as template\"\r\n class=\"bb-table-bottom-actions\">\r\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\r\n</footer>\r\n\r\n<ng-template #isLoadingTemplate>\r\n <tr>\r\n <td [attr.colspan]=\"tableColumnTemplates?.length\"\r\n class=\"bb-table-template\">\r\n <div class=\"bb-table-template-content\">\r\n {{ 'tables.loading' | bbLocalize }}\r\n </div>\r\n </td>\r\n </tr>\r\n</ng-template>\r\n\r\n<!--\r\n This is the template that will be used when the user has not\r\n supplied a custom header template.\r\n-->\r\n\r\n<ng-template #headerTemplate>\r\n <ng-content></ng-content>\r\n <bb-form-control>\r\n <input [formControl]=\"queryControl\"\r\n [placeholder]=\"'tables.search' | bbLocalize\"\r\n bbInput\r\n autocomplete=\"off\">\r\n <bb-icon *ngIf=\"queryControl?.value?.length <= 0; else closeButtonTemplate\"\r\n bbSuffix\r\n src=\"material:search\">\r\n </bb-icon>\r\n </bb-form-control>\r\n</ng-template>\r\n\r\n<!--\r\n This is the template that will be used when the user has not\r\n supplied a custom footer template.\r\n-->\r\n\r\n<ng-template #footerTemplate>\r\n <bb-form-control *ngIf=\"sizes?.length > 1\">\r\n <select [formControl]=\"pageSizeControl\"\r\n bbInput\r\n title=\"Sizes\">\r\n <option *ngFor=\"let item of sizes; trackBy: trackByValue\"\r\n [ngValue]=\"item\">\r\n {{ item }} / {{ 'tables.page' | bbLocalize }}\r\n </option>\r\n </select>\r\n </bb-form-control>\r\n\r\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\r\n [formControl]=\"pageNumberControl\">\r\n </bb-table-pager>\r\n</ng-template>\r\n\r\n<!--\r\n This the template that will be used when the user\r\n has filled in some data in the query control.\r\n-->\r\n\r\n<ng-template #closeButtonTemplate>\r\n <button bbSuffix\r\n (click)=\"queryControl?.patchValue('')\"\r\n type=\"button\"\r\n class=\"bb-table-progress-close-query\">\r\n <bb-icon src=\"material:close\"></bb-icon>\r\n </button>\r\n</ng-template>\r\n\r\n<ng-template #errorTemplate let-state=\"state\" let-status=\"statusCode\">\r\n <tr>\r\n <td [attr.colspan]=\"tableColumnTemplates?.length\"\r\n class=\"bb-table-template\">\r\n <div class=\"bb-table-template-content\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"41\">\r\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\r\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\r\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\r\n <path\r\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\r\n <path fill=\"#FAFAFA\"\r\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\r\n </g>\r\n </g>\r\n </svg>\r\n <span *ngIf=\"state as stateLabel\">{{ ('tables.' + stateLabel) | bbLocalize }}</span>\r\n <span *ngIf=\"status as statusCode\"\r\n class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\r\n </div>\r\n </td>\r\n </tr>\r\n</ng-template>\r\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 6px 6px -6px rgba(0,0,0,.1)}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;padding:20px 20px 10px;background-color:#fff;justify-content:flex-end;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-table-top-actions>*{margin-left:0;margin-bottom:10px}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:60px;display:flex;padding:0 20px;overflow-x:auto;align-items:center;background-color:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.bb-table-template{background-color:#f5f5f5;border:none;border-bottom:1px solid #d8d8d8}.bb-table-template-content{padding:20px;display:flex;color:#3d464d;font-size:14px;line-height:1.2;font-weight:400;min-height:140px;text-align:center;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:12px}.bb-table-template-content-code{opacity:.5;margin-top:5px;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;height:4px;display:block;overflow:hidden;position:absolute;background-color:rgba(47,64,139,.3);-webkit-animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;-webkit-animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;-webkit-animation-delay:1.15s;animation-delay:1.15s;will-change:left,right;background-color:inherit;-webkit-animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:4px;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:rgba(0,0,0,.08)}.bb-table-progress-close-query:focus{background-color:rgba(0,0,0,.12)}.bb-table-progress-close-query:active{background-color:rgba(0,0,0,.16)}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@-webkit-keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width:768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>:not(:first-child){margin-left:10px;margin-bottom:10px}}"], components: [{ type: i1.BbFormControl, selector: "bb-form-control", inputs: ["grouped", "hideErrors", "label", "hint"] }, { type: i1.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { type: BbTablePager, selector: "bb-table-pager", inputs: ["disabled", "amountOfButtons", "showArrowButtons", "pageNumber", "totalPages"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1.BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: ["readonly"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.BbSuffix, selector: "[bbSuffix]" }, { type: i1.BbSelect, selector: "select[bbInput]", inputs: ["disabled", "required"] }, { type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "async": i3.AsyncPipe, "bbLocalize": i5.BbLocalize }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
395
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTable, decorators: [{
396
- type: Component,
397
- args: [{
398
- selector: 'bb-table',
399
- templateUrl: './table.component.html',
400
- styleUrls: ['./table.component.scss'],
401
- host: { 'class': 'bb-table' },
402
- changeDetection: ChangeDetectionStrategy.OnPush,
403
- encapsulation: ViewEncapsulation.None,
404
- preserveWhitespaces: false
405
- }]
406
- }], propDecorators: { tableColumnTemplates: [{
407
- type: ContentChildren,
408
- args: [BbTableColumnDef, { read: TemplateRef }]
409
- }], identifier: [{
410
- type: Input
411
- }], dataSource: [{
412
- type: Input
413
- }], queryFields: [{
414
- type: Input
415
- }], sortingStrategy: [{
416
- type: Input
417
- }], header: [{
418
- type: Input
419
- }], footer: [{
420
- type: Input
421
- }], sizes: [{
422
- type: Input
253
+ class BbTableColumnDef {
254
+ }
255
+ BbTableColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTableColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
256
+ BbTableColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbTableColumnDef, selector: "[bbTableColumnDef]", ngImport: i0 });
257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTableColumnDef, decorators: [{
258
+ type: Directive,
259
+ args: [{
260
+ selector: '[bbTableColumnDef]'
261
+ }]
262
+ }] });
263
+ class BbTable {
264
+ constructor() {
265
+ // Inputs.
266
+ this.identifier = null;
267
+ this.queryFields = [];
268
+ this.sortingStrategy = 'single';
269
+ this.header = true;
270
+ this.footer = true;
271
+ // Sizes.
272
+ this._sizes = [25, 50, 75, 100];
273
+ // Optimizations.
274
+ this.trackByFn = (index, item) => this.identifier ? item[this.identifier] : index;
275
+ this.trackByValue = (_, item) => item;
276
+ this.queryControl = new FormControl('');
277
+ }
278
+ get sizes() {
279
+ return this._sizes;
280
+ }
281
+ set sizes(newValue) {
282
+ this.updateSizes(newValue);
283
+ }
284
+ ngOnInit() {
285
+ this.composeForm();
286
+ this.watchDataChanges();
287
+ }
288
+ ngOnDestroy() {
289
+ var _a;
290
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
291
+ }
292
+ get sortControl() {
293
+ var _a;
294
+ return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('sort');
295
+ }
296
+ get pageNumberControl() {
297
+ var _a;
298
+ return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('pageNumber');
299
+ }
300
+ get pageSizeControl() {
301
+ var _a;
302
+ return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('pageSize');
303
+ }
304
+ refresh() {
305
+ return this.request.update();
306
+ }
307
+ updateSizes(newValue) {
308
+ // Validate the sizes has at least one value.
309
+ if (newValue.length <= 0) {
310
+ throw new Error('Cannot set an empty array as the sizes.');
311
+ }
312
+ // Set the new size.
313
+ this._sizes = newValue;
314
+ // Validate that the form exists already.
315
+ if (!this.form) {
316
+ return;
317
+ }
318
+ // Check if the current selected value is
319
+ // in the new sizes array.
320
+ const pageSizeControl = this.form.get('pageSize');
321
+ if (this._sizes.includes(pageSizeControl.value)) {
322
+ return;
323
+ }
324
+ // Set the first value in the array as
325
+ // the new value.
326
+ const firstValue = this._sizes[0];
327
+ pageSizeControl.setValue(firstValue);
328
+ }
329
+ composeForm() {
330
+ // Setup the form.
331
+ this.form = new FormGroup({
332
+ pageSize: new FormControl(this._sizes[0]),
333
+ pageNumber: new FormControl(1),
334
+ sort: new FormGroup({})
335
+ });
336
+ }
337
+ watchDataChanges() {
338
+ // Create a new request.
339
+ this.request = new DataSourceRequest();
340
+ this.isLoading$ = this.request.loading;
341
+ if (!this.dataSource) {
342
+ this.data$ = of({ state: 'error_datasource' }).pipe(tap(() => this.request.stopLoading()));
343
+ return;
344
+ }
345
+ // Pass the request to the data source.
346
+ this.data$ = this.dataSource.handle(this.request).pipe(tap(() => this.request.stopLoading()), map(result => {
347
+ const count = (result && result.data && result.data.length) || 0;
348
+ if (count <= 0) {
349
+ return { state: 'empty', result };
350
+ }
351
+ return { state: 'success', result };
352
+ }), catchError(error => {
353
+ var _a, _b;
354
+ this.request.stopLoading();
355
+ const statusCode = (_a = error === null || error === void 0 ? void 0 : error.status) !== null && _a !== void 0 ? _a : null;
356
+ const states = {
357
+ 0: 'error_down',
358
+ 401: 'error_unauthorized',
359
+ 403: 'error_forbidden',
360
+ 404: 'error_not_found',
361
+ 500: 'error_server'
362
+ };
363
+ return of({ state: (_b = states === null || states === void 0 ? void 0 : states[statusCode]) !== null && _b !== void 0 ? _b : 'error_unknown', statusCode: statusCode });
364
+ }));
365
+ // Subscribe to the data changes.
366
+ this.subscribeToChanges();
367
+ }
368
+ subscribeToChanges() {
369
+ const form$ = this.getFormChanges();
370
+ const query$ = this.getQueryChanges();
371
+ this._subscription = combineLatest([form$, query$]).subscribe(([form, query]) => {
372
+ const { pageNumber, pageSize } = form;
373
+ const sort = Object.keys(form.sort)
374
+ .map(name => ({ name, direction: form.sort[name] }))
375
+ .filter(item => ['asc', 'desc'].includes(item.direction));
376
+ this.request.startLoading();
377
+ return this.request.update({
378
+ sort,
379
+ query,
380
+ pageSize,
381
+ pageNumber,
382
+ queryFields: this.queryFields
383
+ });
384
+ });
385
+ }
386
+ getQueryChanges() {
387
+ return this.queryControl.valueChanges.pipe(debounceTime(400), distinctUntilChanged(), startWith(this.queryControl.value));
388
+ }
389
+ getFormChanges() {
390
+ return this.form.valueChanges.pipe(startWith(this.form.value));
391
+ }
392
+ }
393
+ BbTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
394
+ BbTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbTable, selector: "bb-table", inputs: { identifier: "identifier", dataSource: "dataSource", queryFields: "queryFields", sortingStrategy: "sortingStrategy", header: "header", footer: "footer", sizes: "sizes" }, host: { classAttribute: "bb-table" }, queries: [{ propertyName: "tableColumnTemplates", predicate: BbTableColumnDef, read: TemplateRef }], ngImport: i0, template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n<header *ngIf=\"(header === true ? headerTemplate : header) as template\"\n class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</header>\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n <div *ngIf=\"isLoading$ | async\"\n class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody *ngIf=\"data$ | async as data; else isLoadingTemplate\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchCase=\"'success'\">\n <tr *ngFor=\"let item of data?.result?.data; trackBy: trackByFn\">\n <ng-container *ngFor=\"let template of tableColumnTemplates\">\n <ng-container *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n </ng-container>\n </tr>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_datasource'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_not_found'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_server'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_down'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n\n<footer *ngIf=\"(footer === true ? footerTemplate : footer) as template\"\n class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</footer>\n\n<ng-template #isLoadingTemplate>\n <tr>\n <td [attr.colspan]=\"tableColumnTemplates?.length\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n <bb-icon *ngIf=\"queryControl?.value?.length <= 0; else closeButtonTemplate\"\n bbSuffix\n src=\"material:search\">\n </bb-icon>\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n <bb-form-control *ngIf=\"sizes?.length > 1\">\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n <option *ngFor=\"let item of sizes; trackBy: trackByValue\"\n [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n </select>\n </bb-form-control>\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<!--\n This the template that will be used when the user\n has filled in some data in the query control.\n-->\n\n<ng-template #closeButtonTemplate>\n <button bbSuffix\n (click)=\"queryControl?.patchValue('')\"\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n</ng-template>\n\n<ng-template #errorTemplate let-state=\"state\" let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"tableColumnTemplates?.length\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"41\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n <span *ngIf=\"state as stateLabel\">{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n <span *ngIf=\"status as statusCode\"\n class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 6px 6px -6px #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;padding:20px 20px 10px;background-color:#fff;justify-content:flex-end;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-table-top-actions>*{margin-left:0;margin-bottom:10px}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:60px;display:flex;padding:0 20px;overflow-x:auto;align-items:center;background-color:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{padding:20px;display:flex;color:#3d464d;font-size:14px;line-height:1.2;font-weight:400;min-height:140px;text-align:center;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:12px}.bb-table-template-content-code{opacity:.5;margin-top:5px;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;height:4px;display:block;overflow:hidden;position:absolute;background-color:#2f408b4d;-webkit-animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;-webkit-animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;-webkit-animation-delay:1.15s;animation-delay:1.15s;will-change:left,right;background-color:inherit;-webkit-animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:4px;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@-webkit-keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:10px;margin-bottom:10px}}\n"], components: [{ type: i1.BbFormControl, selector: "bb-form-control", inputs: ["grouped", "hideErrors", "label", "hint"] }, { type: i1.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { type: BbTablePager, selector: "bb-table-pager", inputs: ["disabled", "amountOfButtons", "showArrowButtons", "pageNumber", "totalPages"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1.BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: ["readonly"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.BbSuffix, selector: "[bbSuffix]" }, { type: i1.BbSelect, selector: "select[bbInput]", inputs: ["disabled", "required"] }, { type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "async": i3.AsyncPipe, "bbLocalize": i5.BbLocalize }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTable, decorators: [{
396
+ type: Component,
397
+ args: [{
398
+ selector: 'bb-table',
399
+ templateUrl: './table.component.html',
400
+ styleUrls: ['./table.component.scss'],
401
+ host: { 'class': 'bb-table' },
402
+ changeDetection: ChangeDetectionStrategy.OnPush,
403
+ encapsulation: ViewEncapsulation.None,
404
+ preserveWhitespaces: false
405
+ }]
406
+ }], propDecorators: { tableColumnTemplates: [{
407
+ type: ContentChildren,
408
+ args: [BbTableColumnDef, { read: TemplateRef }]
409
+ }], identifier: [{
410
+ type: Input
411
+ }], dataSource: [{
412
+ type: Input
413
+ }], queryFields: [{
414
+ type: Input
415
+ }], sortingStrategy: [{
416
+ type: Input
417
+ }], header: [{
418
+ type: Input
419
+ }], footer: [{
420
+ type: Input
421
+ }], sizes: [{
422
+ type: Input
423
423
  }] } });
424
424
 
425
- class BbTableCell {
426
- }
427
- BbTableCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
428
- BbTableCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: BbTableCell, selector: "bb-table-cell", host: { classAttribute: "bb-table-cell" }, ngImport: i0, template: "<div>\r\n <ng-content></ng-content>\r\n</div>", styles: [".bb-table-cell{color:#848f99;font-size:14px;text-align:left;line-height:1.2;font-weight:400;padding:12px 20px;display:table-cell;word-wrap:break-word;vertical-align:middle;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTableCell, decorators: [{
430
- type: Component,
431
- args: [{
432
- selector: 'bb-table-cell',
433
- templateUrl: './table-cell.component.html',
434
- styleUrls: ['./table-cell.component.scss'],
435
- changeDetection: ChangeDetectionStrategy.OnPush,
436
- host: { 'class': 'bb-table-cell' },
437
- encapsulation: ViewEncapsulation.None,
438
- preserveWhitespaces: false
439
- }]
425
+ class BbTableCell {
426
+ }
427
+ BbTableCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
428
+ BbTableCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbTableCell, selector: "bb-table-cell", host: { classAttribute: "bb-table-cell" }, ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".bb-table-cell{color:#848f99;font-size:14px;text-align:left;line-height:1.2;font-weight:400;padding:12px 20px;display:table-cell;word-wrap:break-word;vertical-align:middle;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTableCell, decorators: [{
430
+ type: Component,
431
+ args: [{
432
+ selector: 'bb-table-cell',
433
+ templateUrl: './table-cell.component.html',
434
+ styleUrls: ['./table-cell.component.scss'],
435
+ changeDetection: ChangeDetectionStrategy.OnPush,
436
+ host: { 'class': 'bb-table-cell' },
437
+ encapsulation: ViewEncapsulation.None,
438
+ preserveWhitespaces: false
439
+ }]
440
440
  }] });
441
441
 
442
- class BbTableHeaderCellBase {
443
- }
444
- const BbTableHeaderCellMixinBase = mixinDisabled(BbTableHeaderCellBase);
445
- class BbTableHeaderCell extends BbTableHeaderCellMixinBase {
446
- constructor(_table, _name) {
447
- super();
448
- this._table = _table;
449
- this._name = _name;
450
- // Constants.
451
- this._sortDirections = ['none', 'asc', 'desc'];
452
- this._control = new FormControl(this._sortDirections[0]);
453
- this.logWarning = (message) => {
454
- console && console.warn && console.warn(message);
455
- };
456
- }
457
- // Sort.
458
- set sort(value) {
459
- // Check if the new value is a valid value.
460
- if (!this._sortDirections.includes(value)) {
461
- return;
462
- }
463
- // Set the value.
464
- this._control.setValue(value);
465
- }
466
- get sort() {
467
- return this._control.value;
468
- }
469
- ngOnInit() {
470
- var _a, _b;
471
- // Validate that the name and table are set.
472
- if (!this._table || !this._name) {
473
- return;
474
- }
475
- // Check if the control already exists in the table.
476
- if ((_a = this._table.sortControl) === null || _a === void 0 ? void 0 : _a.contains(this._name)) {
477
- this.disabled = true;
478
- return this.logWarning(`BbTableHeaderCell: The name "${this._name}" is not unique in the table; Control was not registered.`);
479
- }
480
- // Register the header cell with the table.
481
- (_b = this._table.sortControl) === null || _b === void 0 ? void 0 : _b.addControl(this._name, this._control);
482
- // Get all the value changes.
483
- this.valueChanges$ = this._control.valueChanges.pipe(startWith(this._control.value));
484
- }
485
- ngOnDestroy() {
486
- var _a, _b, _c, _d;
487
- // Validate that the name and table are set.
488
- if (!this._table || !this._name) {
489
- return;
490
- }
491
- // Un-register the header cell with the table.
492
- if ((_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.sortControl) === null || _b === void 0 ? void 0 : _b.contains(this._name)) {
493
- (_d = (_c = this._table) === null || _c === void 0 ? void 0 : _c.sortControl) === null || _d === void 0 ? void 0 : _d.removeControl(this._name);
494
- }
495
- }
496
- get isDisabled() {
497
- return this.disabled || !this._name;
498
- }
499
- onClick() {
500
- // Check if the header cell is disabled.
501
- if (this.isDisabled) {
502
- return;
503
- }
504
- // Find the index of the current sort and
505
- // create the new index.
506
- const index = this._sortDirections.findIndex(item => item === this._control.value);
507
- const newIndex = (index + 1) % this._sortDirections.length;
508
- const newSort = this._sortDirections[newIndex];
509
- // Set the new sort.
510
- return this.updateTableAndHeaderCell(newSort);
511
- }
512
- updateTableAndHeaderCell(value) {
513
- // Check if the new value is a valid value.
514
- if (!this._sortDirections.includes(value)) {
515
- return;
516
- }
517
- // Validate the table exists.
518
- if (!this._table) {
519
- return this._control.setValue(value);
520
- }
521
- // Handle the single sorting strategy.
522
- if (this._table.sortingStrategy === 'single') {
523
- return this.handleSingleSortingStrategy(value);
524
- }
525
- // Default case when no other strategy
526
- // is used.
527
- return this._control.setValue(value);
528
- }
529
- handleSingleSortingStrategy(value) {
530
- var _a, _b;
531
- // Get the sort control.
532
- const control = this._table.sortControl;
533
- // Set each value to false since we only want to
534
- // sort on one property at a time with this strategy.
535
- const newValue = Object.keys(control.controls).reduce((previous, current) => {
536
- previous[current] = current === this._name ? value : 'none';
537
- return previous;
538
- }, {});
539
- // Patch the entire sort value.
540
- (_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.sortControl) === null || _b === void 0 ? void 0 : _b.patchValue(newValue);
541
- }
542
- }
543
- BbTableHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTableHeaderCell, deps: [{ token: BbTable, host: true, optional: true }, { token: 'name', attribute: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
544
- BbTableHeaderCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: BbTableHeaderCell, selector: "bb-table-header-cell", inputs: { disabled: "disabled", sort: "sort" }, host: { listeners: { "click": "onClick()" }, properties: { "class.disabled": "isDisabled" }, classAttribute: "bb-table-header-cell" }, usesInheritance: true, ngImport: i0, template: "<!-- The content. -->\r\n<ng-content></ng-content>\r\n\r\n<!-- The indicator for the sort direction. -->\r\n<ng-container *ngIf=\"valueChanges$ | async as value\">\r\n <button *ngIf=\"!isDisabled\"\r\n [class.asc]=\"value === 'asc'\"\r\n [class.desc]=\"value === 'desc'\"\r\n class=\"bb-table-header-cell-toggle\"\r\n type=\"button\"></button>\r\n</ng-container>\r\n", styles: [".bb-table-header-cell{height:50px;color:#212529;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:10px 20px;position:relative;display:table-cell;vertical-align:middle;border-bottom:1px solid #d8d8d8}.bb-table-header-cell:active>.bb-table-header-cell-toggle{background-color:rgba(0,0,0,.08)}.bb-table-header-cell:not(.disabled){padding-right:52px}.bb-table-header-cell.fit{width:1%;white-space:nowrap}.bb-table-header-cell.left{text-align:left}.bb-table-header-cell.center{text-align:center}.bb-table-header-cell.right{text-align:right}.bb-table-header-cell.disabled{cursor:default;pointer-events:none}.bb-table-header-cell-toggle{top:50%;right:14px;width:22px;border:none;height:22px;margin-left:auto;position:absolute;border-radius:4px;transform:translateY(-50%);background-position:50%;background-repeat:no-repeat;background-color:transparent;transition:background-color .2s cubic-bezier(0,0,.2,1);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')}.bb-table-header-cell-toggle.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')}.bb-table-header-cell-toggle.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')}"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: BbTableHeaderCell, decorators: [{
546
- type: Component,
547
- args: [{
548
- selector: 'bb-table-header-cell',
549
- templateUrl: './table-header-cell.component.html',
550
- styleUrls: ['./table-header-cell.component.scss'],
551
- changeDetection: ChangeDetectionStrategy.OnPush,
552
- host: {
553
- 'class': 'bb-table-header-cell',
554
- '[class.disabled]': 'isDisabled'
555
- },
556
- inputs: ['disabled'],
557
- encapsulation: ViewEncapsulation.None,
558
- preserveWhitespaces: false
559
- }]
560
- }], ctorParameters: function () { return [{ type: BbTable, decorators: [{
561
- type: Optional
562
- }, {
563
- type: Host
564
- }] }, { type: undefined, decorators: [{
565
- type: Optional
566
- }, {
567
- type: Attribute,
568
- args: ['name']
569
- }] }]; }, propDecorators: { sort: [{
570
- type: Input
571
- }], onClick: [{
572
- type: HostListener,
573
- args: ['click']
442
+ class BbTableHeaderCellBase {
443
+ }
444
+ const BbTableHeaderCellMixinBase = mixinDisabled(BbTableHeaderCellBase);
445
+ class BbTableHeaderCell extends BbTableHeaderCellMixinBase {
446
+ constructor(_table, _name) {
447
+ super();
448
+ this._table = _table;
449
+ this._name = _name;
450
+ // Constants.
451
+ this._sortDirections = ['none', 'asc', 'desc'];
452
+ this._control = new FormControl(this._sortDirections[0]);
453
+ this.logWarning = (message) => {
454
+ console && console.warn && console.warn(message);
455
+ };
456
+ }
457
+ // Sort.
458
+ set sort(value) {
459
+ // Check if the new value is a valid value.
460
+ if (!this._sortDirections.includes(value)) {
461
+ return;
462
+ }
463
+ // Set the value.
464
+ this._control.setValue(value);
465
+ }
466
+ get sort() {
467
+ return this._control.value;
468
+ }
469
+ ngOnInit() {
470
+ var _a, _b;
471
+ // Validate that the name and table are set.
472
+ if (!this._table || !this._name) {
473
+ return;
474
+ }
475
+ // Check if the control already exists in the table.
476
+ if ((_a = this._table.sortControl) === null || _a === void 0 ? void 0 : _a.contains(this._name)) {
477
+ this.disabled = true;
478
+ return this.logWarning(`BbTableHeaderCell: The name "${this._name}" is not unique in the table; Control was not registered.`);
479
+ }
480
+ // Register the header cell with the table.
481
+ (_b = this._table.sortControl) === null || _b === void 0 ? void 0 : _b.addControl(this._name, this._control);
482
+ // Get all the value changes.
483
+ this.valueChanges$ = this._control.valueChanges.pipe(startWith(this._control.value));
484
+ }
485
+ ngOnDestroy() {
486
+ var _a, _b, _c, _d;
487
+ // Validate that the name and table are set.
488
+ if (!this._table || !this._name) {
489
+ return;
490
+ }
491
+ // Un-register the header cell with the table.
492
+ if ((_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.sortControl) === null || _b === void 0 ? void 0 : _b.contains(this._name)) {
493
+ (_d = (_c = this._table) === null || _c === void 0 ? void 0 : _c.sortControl) === null || _d === void 0 ? void 0 : _d.removeControl(this._name);
494
+ }
495
+ }
496
+ get isDisabled() {
497
+ return this.disabled || !this._name;
498
+ }
499
+ onClick() {
500
+ // Check if the header cell is disabled.
501
+ if (this.isDisabled) {
502
+ return;
503
+ }
504
+ // Find the index of the current sort and
505
+ // create the new index.
506
+ const index = this._sortDirections.findIndex(item => item === this._control.value);
507
+ const newIndex = (index + 1) % this._sortDirections.length;
508
+ const newSort = this._sortDirections[newIndex];
509
+ // Set the new sort.
510
+ return this.updateTableAndHeaderCell(newSort);
511
+ }
512
+ updateTableAndHeaderCell(value) {
513
+ // Check if the new value is a valid value.
514
+ if (!this._sortDirections.includes(value)) {
515
+ return;
516
+ }
517
+ // Validate the table exists.
518
+ if (!this._table) {
519
+ return this._control.setValue(value);
520
+ }
521
+ // Handle the single sorting strategy.
522
+ if (this._table.sortingStrategy === 'single') {
523
+ return this.handleSingleSortingStrategy(value);
524
+ }
525
+ // Default case when no other strategy
526
+ // is used.
527
+ return this._control.setValue(value);
528
+ }
529
+ handleSingleSortingStrategy(value) {
530
+ var _a, _b;
531
+ // Get the sort control.
532
+ const control = this._table.sortControl;
533
+ // Set each value to false since we only want to
534
+ // sort on one property at a time with this strategy.
535
+ const newValue = Object.keys(control.controls).reduce((previous, current) => {
536
+ previous[current] = current === this._name ? value : 'none';
537
+ return previous;
538
+ }, {});
539
+ // Patch the entire sort value.
540
+ (_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.sortControl) === null || _b === void 0 ? void 0 : _b.patchValue(newValue);
541
+ }
542
+ }
543
+ BbTableHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTableHeaderCell, deps: [{ token: BbTable, host: true, optional: true }, { token: 'name', attribute: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
544
+ BbTableHeaderCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbTableHeaderCell, selector: "bb-table-header-cell", inputs: { disabled: "disabled", sort: "sort" }, host: { listeners: { "click": "onClick()" }, properties: { "class.disabled": "isDisabled" }, classAttribute: "bb-table-header-cell" }, usesInheritance: true, ngImport: i0, template: "<!-- The content. -->\n<ng-content></ng-content>\n\n<!-- The indicator for the sort direction. -->\n<ng-container *ngIf=\"valueChanges$ | async as value\">\n <button *ngIf=\"!isDisabled\"\n [class.asc]=\"value === 'asc'\"\n [class.desc]=\"value === 'desc'\"\n class=\"bb-table-header-cell-toggle\"\n type=\"button\"></button>\n</ng-container>\n", styles: [".bb-table-header-cell{height:50px;color:#212529;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:10px 20px;position:relative;display:table-cell;vertical-align:middle;border-bottom:1px solid #d8d8d8}.bb-table-header-cell:active>.bb-table-header-cell-toggle{background-color:#00000014}.bb-table-header-cell:not(.disabled){padding-right:52px}.bb-table-header-cell.fit{width:1%;white-space:nowrap}.bb-table-header-cell.left{text-align:left}.bb-table-header-cell.center{text-align:center}.bb-table-header-cell.right{text-align:right}.bb-table-header-cell.disabled{cursor:default;pointer-events:none}.bb-table-header-cell-toggle{top:50%;right:14px;width:22px;border:none;height:22px;margin-left:auto;position:absolute;border-radius:4px;transform:translateY(-50%);background-position:center;background-repeat:no-repeat;background-color:transparent;transition:background-color .2s cubic-bezier(0,0,.2,1);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')}.bb-table-header-cell-toggle.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')}.bb-table-header-cell-toggle.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')}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: BbTableHeaderCell, decorators: [{
546
+ type: Component,
547
+ args: [{
548
+ selector: 'bb-table-header-cell',
549
+ templateUrl: './table-header-cell.component.html',
550
+ styleUrls: ['./table-header-cell.component.scss'],
551
+ changeDetection: ChangeDetectionStrategy.OnPush,
552
+ host: {
553
+ 'class': 'bb-table-header-cell',
554
+ '[class.disabled]': 'isDisabled'
555
+ },
556
+ inputs: ['disabled'],
557
+ encapsulation: ViewEncapsulation.None,
558
+ preserveWhitespaces: false
559
+ }]
560
+ }], ctorParameters: function () { return [{ type: BbTable, decorators: [{
561
+ type: Optional
562
+ }, {
563
+ type: Host
564
+ }] }, { type: undefined, decorators: [{
565
+ type: Optional
566
+ }, {
567
+ type: Attribute,
568
+ args: ['name']
569
+ }] }]; }, propDecorators: { sort: [{
570
+ type: Input
571
+ }], onClick: [{
572
+ type: HostListener,
573
+ args: ['click']
574
574
  }] } });
575
575
 
576
- const DECLARATIONS_EXPORTS = [
577
- BbTable,
578
- BbTableColumnDef,
579
- BbTableHeaderCell,
580
- BbTableCell,
581
- BbTablePager
582
- ];
583
- class TableModule {
584
- }
585
- TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
586
- TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: TableModule, declarations: [BbTable,
587
- BbTableColumnDef,
588
- BbTableHeaderCell,
589
- BbTableCell,
590
- BbTablePager], imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule], exports: [BbTable,
591
- BbTableColumnDef,
592
- BbTableHeaderCell,
593
- BbTableCell,
594
- BbTablePager] });
595
- TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: TableModule, imports: [[CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule]] });
596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0, type: TableModule, decorators: [{
597
- type: NgModule,
598
- args: [{
599
- imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule],
600
- declarations: [...DECLARATIONS_EXPORTS],
601
- exports: [...DECLARATIONS_EXPORTS]
602
- }]
576
+ const DECLARATIONS_EXPORTS = [
577
+ BbTable,
578
+ BbTableColumnDef,
579
+ BbTableHeaderCell,
580
+ BbTableCell,
581
+ BbTablePager
582
+ ];
583
+ class TableModule {
584
+ }
585
+ TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
586
+ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: TableModule, declarations: [BbTable,
587
+ BbTableColumnDef,
588
+ BbTableHeaderCell,
589
+ BbTableCell,
590
+ BbTablePager], imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule], exports: [BbTable,
591
+ BbTableColumnDef,
592
+ BbTableHeaderCell,
593
+ BbTableCell,
594
+ BbTablePager] });
595
+ TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: TableModule, imports: [[CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule]] });
596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0, type: TableModule, decorators: [{
597
+ type: NgModule,
598
+ args: [{
599
+ imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule],
600
+ declarations: [...DECLARATIONS_EXPORTS],
601
+ exports: [...DECLARATIONS_EXPORTS]
602
+ }]
603
603
  }] });
604
604
 
605
- /**
606
- * Generated bundle index. Do not edit.
605
+ /**
606
+ * Generated bundle index. Do not edit.
607
607
  */
608
608
 
609
609
  export { BbTable, BbTableCell, BbTableColumnDef, BbTableHeaderCell, BbTablePager, DataSource, DataSourceRequest, GenericDataSource, TableModule };