@bravobit/bb-foundation 0.26.3 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/auth/lib/directives/authenticated.directive.d.ts +1 -1
  2. package/collections/lib/components/collections-pager/collections-pager.component.d.ts +1 -1
  3. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +1 -1
  4. package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +1 -1
  5. package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +1 -1
  6. package/controls/lib/control-error/control-error/control-error.component.d.ts +1 -1
  7. package/controls/lib/form-control/form-control/form-control.component.d.ts +1 -1
  8. package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +1 -1
  9. package/controls/lib/form-control/form-control-input.directive.d.ts +1 -1
  10. package/controls/lib/radio/radio-button/radio-button.component.d.ts +1 -1
  11. package/controls/lib/radio/radio-group/radio-group.component.d.ts +1 -1
  12. package/controls/lib/toggle/toggle/toggle.component.d.ts +1 -1
  13. package/controls/lib/toggle/toggle-group/toggle-group.component.d.ts +1 -1
  14. package/dashboard/lib/dashboard/dashboard.component.d.ts +1 -1
  15. package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +1 -1
  16. package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +1 -1
  17. package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +1 -1
  18. package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +1 -1
  19. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +1 -1
  20. package/elements/lib/avatar/avatar.component.d.ts +1 -1
  21. package/elements/lib/button/button.component.d.ts +2 -2
  22. package/elements/lib/checkbox/checkbox.component.d.ts +1 -1
  23. package/elements/lib/date-picker/date-picker.component.d.ts +1 -1
  24. package/elements/lib/directives/input.directive.d.ts +2 -2
  25. package/elements/lib/dropdown/dropdown.component.d.ts +1 -1
  26. package/elements/lib/file-picker/file-picker.component.d.ts +2 -2
  27. package/elements/lib/form-control/form-control.component.d.ts +1 -1
  28. package/elements/lib/form-error/form-error.component.d.ts +1 -1
  29. package/elements/lib/form-group/form-group.component.d.ts +1 -1
  30. package/elements/lib/icon/icon.component.d.ts +1 -1
  31. package/elements/lib/image-picker/image-picker.component.d.ts +1 -1
  32. package/elements/lib/spinner/spinner.component.d.ts +1 -1
  33. package/esm2022/auth/lib/auth.interceptor.mjs +91 -0
  34. package/esm2022/auth/lib/auth.module.mjs +36 -0
  35. package/esm2022/auth/lib/auth.service.mjs +271 -0
  36. package/esm2022/auth/lib/directives/authenticated.directive.mjs +43 -0
  37. package/esm2022/auth/lib/guards/anonymous.guard.mjs +54 -0
  38. package/esm2022/auth/lib/guards/authenticated.guard.mjs +57 -0
  39. package/esm2022/collections/lib/collections.module.mjs +55 -0
  40. package/esm2022/collections/lib/components/collections-pager/collections-pager.component.mjs +124 -0
  41. package/esm2022/collections/lib/components/collections-viewer/collections-viewer.component.mjs +32 -0
  42. package/esm2022/collections/lib/components/collections.directive.mjs +47 -0
  43. package/esm2022/controls/lib/checkbox/checkbox/checkbox.component.mjs +179 -0
  44. package/esm2022/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +69 -0
  45. package/esm2022/controls/lib/checkbox/checkbox.module.mjs +21 -0
  46. package/esm2022/controls/lib/control-error/control-error/control-error.component.mjs +64 -0
  47. package/esm2022/controls/lib/control-error/control-error-submit.directive.mjs +48 -0
  48. package/esm2022/controls/lib/control-error/control-error.module.mjs +20 -0
  49. package/esm2022/controls/lib/controls.module.mjs +63 -0
  50. package/esm2022/controls/lib/form-control/form-control/form-control.component.mjs +80 -0
  51. package/esm2022/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +23 -0
  52. package/esm2022/controls/lib/form-control/form-control-input.directive.mjs +125 -0
  53. package/esm2022/controls/lib/form-control/form-control.module.mjs +35 -0
  54. package/esm2022/controls/lib/radio/radio-button/radio-button.component.mjs +76 -0
  55. package/esm2022/controls/lib/radio/radio-group/radio-group.component.mjs +169 -0
  56. package/esm2022/controls/lib/radio/radio.module.mjs +22 -0
  57. package/esm2022/controls/lib/toggle/toggle/toggle.component.mjs +154 -0
  58. package/esm2022/controls/lib/toggle/toggle-group/toggle-group.component.mjs +63 -0
  59. package/esm2022/controls/lib/toggle/toggle.module.mjs +21 -0
  60. package/esm2022/dashboard/lib/dashboard/dashboard.component.mjs +58 -0
  61. package/{esm2020 → esm2022}/dashboard/lib/dashboard-header/dashboard-header.component.mjs +6 -5
  62. package/esm2022/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +32 -0
  63. package/esm2022/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +30 -0
  64. package/esm2022/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +76 -0
  65. package/esm2022/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +100 -0
  66. package/esm2022/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +63 -0
  67. package/esm2022/dashboard/lib/dashboard.module.mjs +48 -0
  68. package/esm2022/dialog/lib/dialog-actions/dialog-actions.component.mjs +13 -0
  69. package/esm2022/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +47 -0
  70. package/esm2022/dialog/lib/dialog-container/dialog-container.component.mjs +78 -0
  71. package/esm2022/dialog/lib/dialog-header/dialog-header.component.mjs +19 -0
  72. package/esm2022/dialog/lib/dialog-link/dialog-link.component.mjs +12 -0
  73. package/esm2022/dialog/lib/dialog-modal/dialog-modal.component.mjs +68 -0
  74. package/esm2022/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +80 -0
  75. package/esm2022/dialog/lib/dialog.insertion.mjs +17 -0
  76. package/esm2022/dialog/lib/dialog.module.mjs +69 -0
  77. package/esm2022/dialog/lib/dialog.service.mjs +69 -0
  78. package/esm2022/elements/lib/avatar/avatar.component.mjs +150 -0
  79. package/esm2022/elements/lib/button/button.component.mjs +63 -0
  80. package/esm2022/elements/lib/checkbox/checkbox.component.mjs +74 -0
  81. package/esm2022/elements/lib/date-picker/date-picker.component.mjs +308 -0
  82. package/esm2022/elements/lib/directives/addon.directive.mjs +31 -0
  83. package/esm2022/elements/lib/directives/form-submit.directive.mjs +51 -0
  84. package/esm2022/elements/lib/directives/form-submitter.directive.mjs +26 -0
  85. package/esm2022/elements/lib/directives/input.directive.mjs +138 -0
  86. package/esm2022/elements/lib/dropdown/dropdown.component.mjs +102 -0
  87. package/esm2022/elements/lib/elements.module.mjs +178 -0
  88. package/esm2022/elements/lib/file-picker/file-picker.component.mjs +237 -0
  89. package/esm2022/elements/lib/form-control/form-control.component.mjs +50 -0
  90. package/esm2022/elements/lib/form-error/form-error.component.mjs +124 -0
  91. package/esm2022/elements/lib/form-group/form-group.component.mjs +19 -0
  92. package/esm2022/elements/lib/icon/icon.component.mjs +103 -0
  93. package/esm2022/elements/lib/image-picker/image-picker.component.mjs +107 -0
  94. package/esm2022/elements/lib/pipes/file-image.pipe.mjs +44 -0
  95. package/esm2022/elements/lib/pipes/file-size.pipe.mjs +29 -0
  96. package/esm2022/elements/lib/pipes/relative-time.pipe.mjs +97 -0
  97. package/esm2022/elements/lib/spinner/spinner.component.mjs +26 -0
  98. package/esm2022/elements/lib/tag/tag.component.mjs +19 -0
  99. package/esm2022/http/lib/http.module.mjs +44 -0
  100. package/esm2022/http/lib/interceptors/base-url.interceptor.mjs +51 -0
  101. package/esm2022/http/lib/interceptors/error.interceptor.mjs +33 -0
  102. package/esm2022/lib/core/services/clipboard.service.mjs +71 -0
  103. package/esm2022/lib/core/services/exif.service.mjs +164 -0
  104. package/esm2022/lib/core/services/file-loader.service.mjs +88 -0
  105. package/esm2022/lib/core/services/image-converter.service.mjs +124 -0
  106. package/esm2022/lib/core/services/languages.service.mjs +75 -0
  107. package/esm2022/lib/core/services/network.service.mjs +56 -0
  108. package/esm2022/lib/core/services/patch.service.mjs +64 -0
  109. package/esm2022/localize/lib/localize.module.mjs +82 -0
  110. package/esm2022/localize/lib/localize.pipe.mjs +47 -0
  111. package/esm2022/localize/lib/localize.service.mjs +186 -0
  112. package/{esm2020 → esm2022}/localize/lib/transforms/interpolate.transform.mjs +1 -1
  113. package/{esm2020 → esm2022}/localize/lib/transforms/reference.transform.mjs +1 -1
  114. package/esm2022/localize/lib/views/localize-string/localize-string.component.mjs +89 -0
  115. package/esm2022/localize/lib/views/localize-template.directive.mjs +22 -0
  116. package/esm2022/masking/lib/directives/currency-mask.directive.mjs +36 -0
  117. package/esm2022/masking/lib/directives/date-mask.directive.mjs +36 -0
  118. package/esm2022/masking/lib/directives/input-mask.directive.mjs +119 -0
  119. package/esm2022/masking/lib/masking.module.mjs +31 -0
  120. package/esm2022/masking/lib/masking.service.mjs +104 -0
  121. package/esm2022/notifications/lib/notifications-item/notifications-item.component.mjs +101 -0
  122. package/esm2022/notifications/lib/notifications-list/notifications-list.component.mjs +48 -0
  123. package/esm2022/notifications/lib/notifications.module.mjs +31 -0
  124. package/esm2022/notifications/lib/notifications.service.mjs +142 -0
  125. package/esm2022/permissions/lib/directives/permission.directive.mjs +89 -0
  126. package/esm2022/permissions/lib/guards/permission.guard.mjs +57 -0
  127. package/esm2022/permissions/lib/permissions.module.mjs +40 -0
  128. package/esm2022/permissions/lib/permissions.service.mjs +97 -0
  129. package/esm2022/recaptcha/lib/recaptcha/recaptcha.component.mjs +220 -0
  130. package/esm2022/recaptcha/lib/recaptcha-loader.service.mjs +96 -0
  131. package/esm2022/recaptcha/lib/recaptcha.module.mjs +28 -0
  132. package/esm2022/storage/lib/storage.service.mjs +110 -0
  133. package/esm2022/table/lib/components/table/table.component.mjs +194 -0
  134. package/esm2022/table/lib/components/table-cell/table-cell.component.mjs +12 -0
  135. package/esm2022/table/lib/components/table-header-cell/table-header-cell.component.mjs +132 -0
  136. package/esm2022/table/lib/components/table-pager/table-pager.component.mjs +137 -0
  137. package/esm2022/table/lib/table.module.mjs +43 -0
  138. package/esm2022/theming/lib/theming.directive.mjs +39 -0
  139. package/esm2022/theming/lib/theming.module.mjs +17 -0
  140. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +32 -0
  141. package/esm2022/tooltip/lib/tooltip.directive.mjs +141 -0
  142. package/esm2022/tooltip/lib/tooltip.module.mjs +32 -0
  143. package/esm2022/utils/lib/directives/autosize.directive.mjs +73 -0
  144. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +78 -0
  145. package/esm2022/utils/lib/directives/focus.directive.mjs +38 -0
  146. package/esm2022/utils/lib/directives/template.directive.mjs +29 -0
  147. package/esm2022/utils/lib/functions/parse-date.function.mjs +19 -0
  148. package/esm2022/utils/lib/utils.module.mjs +36 -0
  149. package/esm2022/utils/public_api.mjs +7 -0
  150. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-auth.mjs +19 -19
  151. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-auth.mjs.map +1 -1
  152. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-collections.mjs +38 -38
  153. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-collections.mjs.map +1 -1
  154. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-controls.mjs +83 -83
  155. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-controls.mjs.map +1 -1
  156. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dashboard.mjs +37 -37
  157. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  158. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dialog.mjs +46 -46
  159. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dialog.mjs.map +1 -1
  160. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-elements.mjs +185 -185
  161. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -0
  162. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-http.mjs +10 -10
  163. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-http.mjs.map +1 -1
  164. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-localize.mjs +20 -20
  165. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-localize.mjs.map +1 -1
  166. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-masking.mjs +20 -20
  167. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-masking.mjs.map +1 -1
  168. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-notifications.mjs +13 -13
  169. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-notifications.mjs.map +1 -1
  170. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-permissions.mjs +13 -13
  171. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-permissions.mjs.map +1 -1
  172. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-recaptcha.mjs +16 -16
  173. package/{fesm2015 → fesm2022}/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  174. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-storage.mjs +3 -3
  175. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-storage.mjs.map +1 -1
  176. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-table.mjs +34 -34
  177. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-table.mjs.map +1 -1
  178. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-theming.mjs +7 -7
  179. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-theming.mjs.map +1 -1
  180. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-tooltip.mjs +13 -13
  181. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-tooltip.mjs.map +1 -1
  182. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-utils.mjs +42 -23
  183. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -0
  184. package/{fesm2020 → fesm2022}/bravobit-bb-foundation.mjs +21 -21
  185. package/{fesm2020 → fesm2022}/bravobit-bb-foundation.mjs.map +1 -1
  186. package/localize/lib/views/localize-string/localize-string.component.d.ts +1 -1
  187. package/localize/lib/views/localize-template.directive.d.ts +1 -1
  188. package/masking/lib/directives/currency-mask.directive.d.ts +1 -1
  189. package/masking/lib/directives/date-mask.directive.d.ts +1 -1
  190. package/masking/lib/directives/input-mask.directive.d.ts +1 -1
  191. package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
  192. package/package.json +70 -112
  193. package/permissions/lib/directives/permission.directive.d.ts +1 -1
  194. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +1 -1
  195. package/table/lib/components/table/table.component.d.ts +1 -1
  196. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +1 -1
  197. package/table/lib/components/table-pager/table-pager.component.d.ts +1 -1
  198. package/theming/lib/theming.directive.d.ts +1 -1
  199. package/tooltip/lib/tooltip.directive.d.ts +1 -1
  200. package/utils/lib/directives/autosize.directive.d.ts +1 -1
  201. package/utils/lib/directives/template.directive.d.ts +1 -1
  202. package/utils/lib/functions/parse-date.function.d.ts +1 -0
  203. package/utils/public_api.d.ts +1 -0
  204. package/esm2020/auth/lib/auth.interceptor.mjs +0 -90
  205. package/esm2020/auth/lib/auth.module.mjs +0 -35
  206. package/esm2020/auth/lib/auth.service.mjs +0 -270
  207. package/esm2020/auth/lib/directives/authenticated.directive.mjs +0 -42
  208. package/esm2020/auth/lib/guards/anonymous.guard.mjs +0 -53
  209. package/esm2020/auth/lib/guards/authenticated.guard.mjs +0 -56
  210. package/esm2020/collections/lib/collections.module.mjs +0 -54
  211. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +0 -123
  212. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +0 -31
  213. package/esm2020/collections/lib/components/collections.directive.mjs +0 -43
  214. package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +0 -178
  215. package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +0 -68
  216. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +0 -20
  217. package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +0 -63
  218. package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +0 -47
  219. package/esm2020/controls/lib/control-error/control-error.module.mjs +0 -19
  220. package/esm2020/controls/lib/controls.module.mjs +0 -62
  221. package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +0 -79
  222. package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +0 -22
  223. package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +0 -124
  224. package/esm2020/controls/lib/form-control/form-control.module.mjs +0 -34
  225. package/esm2020/controls/lib/radio/radio-button/radio-button.component.mjs +0 -75
  226. package/esm2020/controls/lib/radio/radio-group/radio-group.component.mjs +0 -168
  227. package/esm2020/controls/lib/radio/radio.module.mjs +0 -21
  228. package/esm2020/controls/lib/toggle/toggle/toggle.component.mjs +0 -153
  229. package/esm2020/controls/lib/toggle/toggle-group/toggle-group.component.mjs +0 -62
  230. package/esm2020/controls/lib/toggle/toggle.module.mjs +0 -20
  231. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +0 -57
  232. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +0 -31
  233. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +0 -29
  234. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +0 -75
  235. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +0 -99
  236. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +0 -62
  237. package/esm2020/dashboard/lib/dashboard.module.mjs +0 -47
  238. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +0 -12
  239. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +0 -46
  240. package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +0 -77
  241. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +0 -18
  242. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +0 -11
  243. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +0 -67
  244. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +0 -79
  245. package/esm2020/dialog/lib/dialog.insertion.mjs +0 -16
  246. package/esm2020/dialog/lib/dialog.module.mjs +0 -68
  247. package/esm2020/dialog/lib/dialog.service.mjs +0 -68
  248. package/esm2020/elements/lib/avatar/avatar.component.mjs +0 -149
  249. package/esm2020/elements/lib/button/button.component.mjs +0 -61
  250. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +0 -73
  251. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +0 -307
  252. package/esm2020/elements/lib/directives/addon.directive.mjs +0 -29
  253. package/esm2020/elements/lib/directives/form-submit.directive.mjs +0 -50
  254. package/esm2020/elements/lib/directives/form-submitter.directive.mjs +0 -25
  255. package/esm2020/elements/lib/directives/input.directive.mjs +0 -136
  256. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +0 -100
  257. package/esm2020/elements/lib/elements.module.mjs +0 -177
  258. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +0 -236
  259. package/esm2020/elements/lib/form-control/form-control.component.mjs +0 -49
  260. package/esm2020/elements/lib/form-error/form-error.component.mjs +0 -123
  261. package/esm2020/elements/lib/form-group/form-group.component.mjs +0 -18
  262. package/esm2020/elements/lib/icon/icon.component.mjs +0 -102
  263. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +0 -106
  264. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +0 -43
  265. package/esm2020/elements/lib/pipes/file-size.pipe.mjs +0 -28
  266. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +0 -96
  267. package/esm2020/elements/lib/spinner/spinner.component.mjs +0 -25
  268. package/esm2020/elements/lib/tag/tag.component.mjs +0 -18
  269. package/esm2020/http/lib/http.module.mjs +0 -43
  270. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +0 -50
  271. package/esm2020/http/lib/interceptors/error.interceptor.mjs +0 -32
  272. package/esm2020/lib/core/services/clipboard.service.mjs +0 -70
  273. package/esm2020/lib/core/services/exif.service.mjs +0 -163
  274. package/esm2020/lib/core/services/file-loader.service.mjs +0 -87
  275. package/esm2020/lib/core/services/image-converter.service.mjs +0 -123
  276. package/esm2020/lib/core/services/languages.service.mjs +0 -74
  277. package/esm2020/lib/core/services/network.service.mjs +0 -55
  278. package/esm2020/lib/core/services/patch.service.mjs +0 -63
  279. package/esm2020/localize/lib/localize.module.mjs +0 -81
  280. package/esm2020/localize/lib/localize.pipe.mjs +0 -46
  281. package/esm2020/localize/lib/localize.service.mjs +0 -185
  282. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +0 -88
  283. package/esm2020/localize/lib/views/localize-template.directive.mjs +0 -21
  284. package/esm2020/masking/lib/directives/currency-mask.directive.mjs +0 -35
  285. package/esm2020/masking/lib/directives/date-mask.directive.mjs +0 -35
  286. package/esm2020/masking/lib/directives/input-mask.directive.mjs +0 -118
  287. package/esm2020/masking/lib/masking.module.mjs +0 -30
  288. package/esm2020/masking/lib/masking.service.mjs +0 -103
  289. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +0 -100
  290. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +0 -47
  291. package/esm2020/notifications/lib/notifications.module.mjs +0 -30
  292. package/esm2020/notifications/lib/notifications.service.mjs +0 -141
  293. package/esm2020/permissions/lib/directives/permission.directive.mjs +0 -88
  294. package/esm2020/permissions/lib/guards/permission.guard.mjs +0 -56
  295. package/esm2020/permissions/lib/permissions.module.mjs +0 -39
  296. package/esm2020/permissions/lib/permissions.service.mjs +0 -96
  297. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +0 -219
  298. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +0 -95
  299. package/esm2020/recaptcha/lib/recaptcha.module.mjs +0 -27
  300. package/esm2020/storage/lib/storage.service.mjs +0 -109
  301. package/esm2020/table/lib/components/table/table.component.mjs +0 -191
  302. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +0 -11
  303. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +0 -131
  304. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +0 -136
  305. package/esm2020/table/lib/table.module.mjs +0 -42
  306. package/esm2020/theming/lib/theming.directive.mjs +0 -38
  307. package/esm2020/theming/lib/theming.module.mjs +0 -16
  308. package/esm2020/tooltip/lib/tooltip-container/tooltip-container.component.mjs +0 -31
  309. package/esm2020/tooltip/lib/tooltip.directive.mjs +0 -140
  310. package/esm2020/tooltip/lib/tooltip.module.mjs +0 -31
  311. package/esm2020/utils/lib/directives/autosize.directive.mjs +0 -72
  312. package/esm2020/utils/lib/directives/focus-trap.directive.mjs +0 -77
  313. package/esm2020/utils/lib/directives/focus.directive.mjs +0 -37
  314. package/esm2020/utils/lib/directives/template.directive.mjs +0 -28
  315. package/esm2020/utils/lib/utils.module.mjs +0 -35
  316. package/esm2020/utils/public_api.mjs +0 -6
  317. package/fesm2015/bravobit-bb-foundation-auth.mjs +0 -851
  318. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +0 -1
  319. package/fesm2015/bravobit-bb-foundation-collections.mjs +0 -474
  320. package/fesm2015/bravobit-bb-foundation-collections.mjs.map +0 -1
  321. package/fesm2015/bravobit-bb-foundation-controls.mjs +0 -1217
  322. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +0 -1
  323. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +0 -417
  324. package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +0 -1
  325. package/fesm2015/bravobit-bb-foundation-dialog.mjs +0 -512
  326. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +0 -1
  327. package/fesm2015/bravobit-bb-foundation-elements.mjs +0 -1883
  328. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +0 -1
  329. package/fesm2015/bravobit-bb-foundation-http.mjs +0 -176
  330. package/fesm2015/bravobit-bb-foundation-http.mjs.map +0 -1
  331. package/fesm2015/bravobit-bb-foundation-localize.mjs +0 -835
  332. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +0 -1
  333. package/fesm2015/bravobit-bb-foundation-masking.mjs +0 -334
  334. package/fesm2015/bravobit-bb-foundation-masking.mjs.map +0 -1
  335. package/fesm2015/bravobit-bb-foundation-notifications.mjs +0 -357
  336. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +0 -1
  337. package/fesm2015/bravobit-bb-foundation-permissions.mjs +0 -310
  338. package/fesm2015/bravobit-bb-foundation-permissions.mjs.map +0 -1
  339. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +0 -349
  340. package/fesm2015/bravobit-bb-foundation-rxjs.mjs +0 -22
  341. package/fesm2015/bravobit-bb-foundation-rxjs.mjs.map +0 -1
  342. package/fesm2015/bravobit-bb-foundation-storage.mjs +0 -418
  343. package/fesm2015/bravobit-bb-foundation-storage.mjs.map +0 -1
  344. package/fesm2015/bravobit-bb-foundation-table.mjs +0 -613
  345. package/fesm2015/bravobit-bb-foundation-table.mjs.map +0 -1
  346. package/fesm2015/bravobit-bb-foundation-theming.mjs +0 -382
  347. package/fesm2015/bravobit-bb-foundation-theming.mjs.map +0 -1
  348. package/fesm2015/bravobit-bb-foundation-tooltip.mjs +0 -210
  349. package/fesm2015/bravobit-bb-foundation-tooltip.mjs.map +0 -1
  350. package/fesm2015/bravobit-bb-foundation-utils.mjs +0 -246
  351. package/fesm2015/bravobit-bb-foundation-utils.mjs.map +0 -1
  352. package/fesm2015/bravobit-bb-foundation.mjs +0 -929
  353. package/fesm2015/bravobit-bb-foundation.mjs.map +0 -1
  354. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +0 -1
  355. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +0 -1
  356. package/fesm2020/bravobit-bb-foundation-utils.mjs.map +0 -1
  357. /package/{esm2020 → esm2022}/auth/bravobit-bb-foundation-auth.mjs +0 -0
  358. /package/{esm2020 → esm2022}/auth/lib/auth.session.mjs +0 -0
  359. /package/{esm2020 → esm2022}/auth/lib/directives/abstract.directive.mjs +0 -0
  360. /package/{esm2020 → esm2022}/auth/lib/helpers/jwt.helper.mjs +0 -0
  361. /package/{esm2020 → esm2022}/auth/lib/interfaces/config.interface.mjs +0 -0
  362. /package/{esm2020 → esm2022}/auth/lib/interfaces/provider.interface.mjs +0 -0
  363. /package/{esm2020 → esm2022}/auth/lib/interfaces/token.interface.mjs +0 -0
  364. /package/{esm2020 → esm2022}/auth/lib/providers/email.provider.mjs +0 -0
  365. /package/{esm2020 → esm2022}/auth/lib/providers/verify.provider.mjs +0 -0
  366. /package/{esm2020 → esm2022}/auth/lib/tokens/use-authorization.token.mjs +0 -0
  367. /package/{esm2020 → esm2022}/auth/public_api.mjs +0 -0
  368. /package/{esm2020 → esm2022}/bravobit-bb-foundation.mjs +0 -0
  369. /package/{esm2020 → esm2022}/collections/bravobit-bb-foundation-collections.mjs +0 -0
  370. /package/{esm2020 → esm2022}/collections/lib/collection.mjs +0 -0
  371. /package/{esm2020 → esm2022}/collections/lib/interfaces/collection.interface.mjs +0 -0
  372. /package/{esm2020 → esm2022}/collections/lib/providers/api-collection.provider.mjs +0 -0
  373. /package/{esm2020 → esm2022}/collections/lib/providers/collection.provider.mjs +0 -0
  374. /package/{esm2020 → esm2022}/collections/lib/providers/local-collection.provider.mjs +0 -0
  375. /package/{esm2020 → esm2022}/collections/public_api.mjs +0 -0
  376. /package/{esm2020 → esm2022}/controls/bravobit-bb-foundation-controls.mjs +0 -0
  377. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error/control-error.animation.mjs +0 -0
  378. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.defaults.mjs +0 -0
  379. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.interface.mjs +0 -0
  380. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.utils.mjs +0 -0
  381. /package/{esm2020 → esm2022}/controls/lib/controls.interfaces.mjs +0 -0
  382. /package/{esm2020 → esm2022}/controls/public_api.mjs +0 -0
  383. /package/{esm2020 → esm2022}/dashboard/bravobit-bb-foundation-dashboard.mjs +0 -0
  384. /package/{esm2020 → esm2022}/dashboard/public_api.mjs +0 -0
  385. /package/{esm2020 → esm2022}/dialog/bravobit-bb-foundation-dialog.mjs +0 -0
  386. /package/{esm2020 → esm2022}/dialog/lib/dialog-container/dialog-container.animations.mjs +0 -0
  387. /package/{esm2020 → esm2022}/dialog/lib/dialog-overlay/dialog-overlay.animations.mjs +0 -0
  388. /package/{esm2020 → esm2022}/dialog/lib/dialog.interfaces.mjs +0 -0
  389. /package/{esm2020 → esm2022}/dialog/lib/dialog.ref.mjs +0 -0
  390. /package/{esm2020 → esm2022}/dialog/public_api.mjs +0 -0
  391. /package/{esm2020 → esm2022}/elements/bravobit-bb-foundation-elements.mjs +0 -0
  392. /package/{esm2020 → esm2022}/elements/lib/elements.interfaces.mjs +0 -0
  393. /package/{esm2020 → esm2022}/elements/public_api.mjs +0 -0
  394. /package/{esm2020 → esm2022}/http/bravobit-bb-foundation-http.mjs +0 -0
  395. /package/{esm2020 → esm2022}/http/lib/classes/http.config.mjs +0 -0
  396. /package/{esm2020 → esm2022}/http/lib/classes/http.error.mjs +0 -0
  397. /package/{esm2020 → esm2022}/http/lib/http.interfaces.mjs +0 -0
  398. /package/{esm2020 → esm2022}/http/public_api.mjs +0 -0
  399. /package/{esm2020 → esm2022}/lib/core/functions/date.utils.mjs +0 -0
  400. /package/{esm2020 → esm2022}/lib/core/functions/password.utils.mjs +0 -0
  401. /package/{esm2020 → esm2022}/lib/core/miscellaneous/regex.mjs +0 -0
  402. /package/{esm2020 → esm2022}/lib/core/miscellaneous/validator.mjs +0 -0
  403. /package/{esm2020 → esm2022}/lib/core/mixins/can-disable.mjs +0 -0
  404. /package/{esm2020 → esm2022}/lib/core/mixins/can-hide-errors.mjs +0 -0
  405. /package/{esm2020 → esm2022}/lib/core/mixins/can-load.mjs +0 -0
  406. /package/{esm2020 → esm2022}/lib/core/mixins/constructor.mjs +0 -0
  407. /package/{esm2020 → esm2022}/lib/core/mixins/has-error.mjs +0 -0
  408. /package/{esm2020 → esm2022}/lib/core/mixins/is-focused.mjs +0 -0
  409. /package/{esm2020 → esm2022}/lib/core/mixins/is-grouped.mjs +0 -0
  410. /package/{esm2020 → esm2022}/lib/core/mixins/is-readonly.mjs +0 -0
  411. /package/{esm2020 → esm2022}/lib/core/mixins/is-required.mjs +0 -0
  412. /package/{esm2020 → esm2022}/lib/core/tokens/accept-language.token.mjs +0 -0
  413. /package/{esm2020 → esm2022}/lib/core/tokens/base-url.token.mjs +0 -0
  414. /package/{esm2020 → esm2022}/lib/core/tokens/cookie.token.mjs +0 -0
  415. /package/{esm2020 → esm2022}/lib/core/tokens/location.token.mjs +0 -0
  416. /package/{esm2020 → esm2022}/lib/core/tokens/navigator.token.mjs +0 -0
  417. /package/{esm2020 → esm2022}/lib/core/tokens/window.token.mjs +0 -0
  418. /package/{esm2020 → esm2022}/localize/bravobit-bb-foundation-localize.mjs +0 -0
  419. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.class.mjs +0 -0
  420. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.context.mjs +0 -0
  421. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.data.mjs +0 -0
  422. /package/{esm2020 → esm2022}/localize/lib/functions/date.function.mjs +0 -0
  423. /package/{esm2020 → esm2022}/localize/lib/functions/lowercase.function.mjs +0 -0
  424. /package/{esm2020 → esm2022}/localize/lib/functions/uppercase.function.mjs +0 -0
  425. /package/{esm2020 → esm2022}/localize/lib/handlers/missing.handler.mjs +0 -0
  426. /package/{esm2020 → esm2022}/localize/lib/interfaces/config.interfaces.mjs +0 -0
  427. /package/{esm2020 → esm2022}/localize/lib/interfaces/functions.interfaces.mjs +0 -0
  428. /package/{esm2020 → esm2022}/localize/lib/interfaces/handlers.interfaces.mjs +0 -0
  429. /package/{esm2020 → esm2022}/localize/lib/interfaces/options.interfaces.mjs +0 -0
  430. /package/{esm2020 → esm2022}/localize/lib/interfaces/transforms.interfaces.mjs +0 -0
  431. /package/{esm2020 → esm2022}/localize/lib/locale.token.mjs +0 -0
  432. /package/{esm2020 → esm2022}/localize/lib/localizations/dutch.localization.mjs +0 -0
  433. /package/{esm2020 → esm2022}/localize/lib/localizations/english.localization.mjs +0 -0
  434. /package/{esm2020 → esm2022}/localize/lib/transforms/abstract.transform.mjs +0 -0
  435. /package/{esm2020 → esm2022}/localize/public_api.mjs +0 -0
  436. /package/{esm2020 → esm2022}/masking/bravobit-bb-foundation-masking.mjs +0 -0
  437. /package/{esm2020 → esm2022}/masking/lib/input-mask.interface.mjs +0 -0
  438. /package/{esm2020 → esm2022}/masking/public_api.mjs +0 -0
  439. /package/{esm2020 → esm2022}/notifications/bravobit-bb-foundation-notifications.mjs +0 -0
  440. /package/{esm2020 → esm2022}/notifications/lib/notifications.animations.mjs +0 -0
  441. /package/{esm2020 → esm2022}/notifications/lib/notifications.interfaces.mjs +0 -0
  442. /package/{esm2020 → esm2022}/notifications/public_api.mjs +0 -0
  443. /package/{esm2020 → esm2022}/permissions/bravobit-bb-foundation-permissions.mjs +0 -0
  444. /package/{esm2020 → esm2022}/permissions/lib/handlers/abstract.handler.mjs +0 -0
  445. /package/{esm2020 → esm2022}/permissions/lib/handlers/local.handler.mjs +0 -0
  446. /package/{esm2020 → esm2022}/permissions/lib/permissions.interface.mjs +0 -0
  447. /package/{esm2020 → esm2022}/permissions/public_api.mjs +0 -0
  448. /package/{esm2020 → esm2022}/public_api.mjs +0 -0
  449. /package/{esm2020 → esm2022}/recaptcha/bravobit-bb-foundation-recaptcha.mjs +0 -0
  450. /package/{esm2020 → esm2022}/recaptcha/lib/recaptcha.interface.mjs +0 -0
  451. /package/{esm2020 → esm2022}/recaptcha/public_api.mjs +0 -0
  452. /package/{esm2020 → esm2022}/rxjs/bravobit-bb-foundation-rxjs.mjs +0 -0
  453. /package/{esm2020 → esm2022}/rxjs/lib/observables/get-control-value.observable.mjs +0 -0
  454. /package/{esm2020 → esm2022}/rxjs/lib/operators/combine-latest-map.operator.mjs +0 -0
  455. /package/{esm2020 → esm2022}/rxjs/lib/operators/filter-nil.operator.mjs +0 -0
  456. /package/{esm2020 → esm2022}/rxjs/public_api.mjs +0 -0
  457. /package/{esm2020 → esm2022}/storage/bravobit-bb-foundation-storage.mjs +0 -0
  458. /package/{esm2020 → esm2022}/storage/lib/interfaces/attributes.interface.mjs +0 -0
  459. /package/{esm2020 → esm2022}/storage/lib/interfaces/memory.interface.mjs +0 -0
  460. /package/{esm2020 → esm2022}/storage/lib/interfaces/strategy.interface.mjs +0 -0
  461. /package/{esm2020 → esm2022}/storage/lib/strategies/cookie-storage.strategy.mjs +0 -0
  462. /package/{esm2020 → esm2022}/storage/lib/strategies/memory-storage.strategy.mjs +0 -0
  463. /package/{esm2020 → esm2022}/storage/lib/strategies/polyfill-storage.strategy.mjs +0 -0
  464. /package/{esm2020 → esm2022}/storage/public_api.mjs +0 -0
  465. /package/{esm2020 → esm2022}/table/bravobit-bb-foundation-table.mjs +0 -0
  466. /package/{esm2020 → esm2022}/table/lib/data/datasource.data.mjs +0 -0
  467. /package/{esm2020 → esm2022}/table/lib/data/generic.data.mjs +0 -0
  468. /package/{esm2020 → esm2022}/table/lib/interfaces/datasource.interface.mjs +0 -0
  469. /package/{esm2020 → esm2022}/table/lib/interfaces/table.interfaces.mjs +0 -0
  470. /package/{esm2020 → esm2022}/table/public_api.mjs +0 -0
  471. /package/{esm2020 → esm2022}/theming/bravobit-bb-foundation-theming.mjs +0 -0
  472. /package/{esm2020 → esm2022}/theming/lib/themes/checkbox-group.theme.mjs +0 -0
  473. /package/{esm2020 → esm2022}/theming/lib/themes/checkbox.theme.mjs +0 -0
  474. /package/{esm2020 → esm2022}/theming/lib/themes/control-error.theme.mjs +0 -0
  475. /package/{esm2020 → esm2022}/theming/lib/themes/form-control-addon.theme.mjs +0 -0
  476. /package/{esm2020 → esm2022}/theming/lib/themes/form-control.theme.mjs +0 -0
  477. /package/{esm2020 → esm2022}/theming/lib/themes/radio-button.theme.mjs +0 -0
  478. /package/{esm2020 → esm2022}/theming/lib/themes/radio-group.theme.mjs +0 -0
  479. /package/{esm2020 → esm2022}/theming/lib/themes/toggle-group.theme.mjs +0 -0
  480. /package/{esm2020 → esm2022}/theming/lib/themes/toggle.theme.mjs +0 -0
  481. /package/{esm2020 → esm2022}/theming/lib/theming.data.mjs +0 -0
  482. /package/{esm2020 → esm2022}/theming/lib/theming.interface.mjs +0 -0
  483. /package/{esm2020 → esm2022}/theming/lib/utils/theming.variable.mjs +0 -0
  484. /package/{esm2020 → esm2022}/theming/public_api.mjs +0 -0
  485. /package/{esm2020 → esm2022}/tooltip/bravobit-bb-foundation-tooltip.mjs +0 -0
  486. /package/{esm2020 → esm2022}/tooltip/lib/tooltip.interfaces.mjs +0 -0
  487. /package/{esm2020 → esm2022}/tooltip/public_api.mjs +0 -0
  488. /package/{esm2020 → esm2022}/utils/bravobit-bb-foundation-utils.mjs +0 -0
  489. /package/{fesm2020 → fesm2022}/bravobit-bb-foundation-rxjs.mjs +0 -0
  490. /package/{fesm2020 → fesm2022}/bravobit-bb-foundation-rxjs.mjs.map +0 -0
@@ -1,613 +0,0 @@
1
- import { BehaviorSubject, of, combineLatest } from 'rxjs';
2
- import { filter, switchMap, map, tap, share, catchError, debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators';
3
- import * as i0 from '@angular/core';
4
- import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Directive, TemplateRef, ContentChildren, ContentChild, Optional, Host, Attribute, HostListener, NgModule } from '@angular/core';
5
- import * as i2 from '@angular/forms';
6
- import { NG_VALUE_ACCESSOR, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
7
- import * as i1 from '@angular/common';
8
- import { CommonModule } from '@angular/common';
9
- import * as i3 from '@bravobit/bb-foundation/elements';
10
- import { ElementsModule } from '@bravobit/bb-foundation/elements';
11
- import { mixinDisabled } from '@bravobit/bb-foundation';
12
- import * as i5 from '@bravobit/bb-foundation/localize';
13
- import { LocalizeModule } from '@bravobit/bb-foundation/localize';
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 {
43
- }
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._rawFn = null;
52
- this.formatResponse = (data) => {
53
- return {
54
- pageSize: data === null || data === void 0 ? void 0 : data['page_size'],
55
- pageNumber: data === null || data === void 0 ? void 0 : data['page_number'],
56
- totalPages: data === null || data === void 0 ? void 0 : data['total_pages'],
57
- totalEntries: data === null || data === void 0 ? void 0 : data['total_entries'],
58
- data: data === null || data === void 0 ? void 0 : data['data']
59
- };
60
- };
61
- this.formatParams = (data) => {
62
- var _a, _b, _c, _d, _e, _f, _g;
63
- const params = {};
64
- params['page'] = `${(_a = data === null || data === void 0 ? void 0 : data.pageNumber) !== null && _a !== void 0 ? _a : 1}`;
65
- params['page_size'] = `${(_b = data === null || data === void 0 ? void 0 : data.pageSize) !== null && _b !== void 0 ? _b : 25}`;
66
- const sort = ((_c = data === null || data === void 0 ? void 0 : data.sort) !== null && _c !== void 0 ? _c : [])
67
- .map(({ name }) => name)
68
- .filter(name => !!name)
69
- .join(',');
70
- const sortDirection = ((_d = data === null || data === void 0 ? void 0 : data.sort) !== null && _d !== void 0 ? _d : [])
71
- .map(({ direction }) => direction)
72
- .filter(direction => !!direction)
73
- .join(',');
74
- if ((sort === null || sort === void 0 ? void 0 : sort.length) > 0 && (sortDirection === null || sortDirection === void 0 ? void 0 : sortDirection.length) > 0) {
75
- params['sort'] = sort;
76
- params['sort_direction'] = sortDirection;
77
- }
78
- 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) {
79
- params['query'] = data === null || data === void 0 ? void 0 : data.query;
80
- params['query_fields'] = (_g = data === null || data === void 0 ? void 0 : data.queryFields) === null || _g === void 0 ? void 0 : _g.join(',');
81
- }
82
- return params;
83
- };
84
- this._httpClient = httpClient;
85
- this._endpoint$ = typeof endpoint === 'string'
86
- ? of(endpoint)
87
- : endpoint;
88
- }
89
- append(item) {
90
- const currentValue = this._items$.getValue();
91
- const newValue = [...currentValue, item];
92
- this._items$.next(newValue);
93
- return this;
94
- }
95
- data(fn) {
96
- this._fn = fn;
97
- return this;
98
- }
99
- raw(fn) {
100
- this._rawFn = fn;
101
- return this;
102
- }
103
- handle(request) {
104
- 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 : {}))), {})));
105
- return combineLatest([request.when, this._endpoint$, extraParams$]).pipe(switchMap(([params, endpoint, extraParams]) => {
106
- // Start the loading.
107
- request.startLoading();
108
- const formattedParams = this.formatParams(params);
109
- const combinedParams = Object.assign(Object.assign({}, formattedParams), extraParams);
110
- return this._httpClient.get(endpoint, {
111
- params: combinedParams
112
- }).pipe(tap(data => {
113
- if (!this._rawFn) {
114
- return;
115
- }
116
- this._rawFn(data);
117
- }), map(data => this.formatResponse(data)), map(result => {
118
- var _a;
119
- return (Object.assign(Object.assign({}, result), { data: this._fn((_a = result === null || result === void 0 ? void 0 : result.data) !== null && _a !== void 0 ? _a : []) }));
120
- }));
121
- }), share());
122
- }
123
- }
124
-
125
- class BbTablePagerBase {
126
- }
127
- const BbTablePagerMixinBase = mixinDisabled(BbTablePagerBase);
128
- class BbTablePager extends BbTablePagerMixinBase {
129
- constructor() {
130
- super(...arguments);
131
- // Inputs.
132
- this.amountOfButtons = 5;
133
- this.showArrowButtons = true;
134
- // Methods.
135
- this.onChange = () => ({});
136
- this.onTouched = () => ({});
137
- this.trackByIndex = (_, item) => item.page;
138
- // Data.
139
- this._totalPages$ = new BehaviorSubject(1);
140
- this._pageNumber$ = new BehaviorSubject(1);
141
- }
142
- ngOnInit() {
143
- // Validate the previous button is disabled.
144
- this.isPreviousDisabled$ = this._pageNumber$.pipe(map(pageNumber => pageNumber === 1));
145
- // Validate the next button is disabled.
146
- this.isNextDisabled$ = combineLatest([this._pageNumber$, this._totalPages$]).pipe(map(([pageNumber, totalPages]) => pageNumber === totalPages));
147
- // Create the list with page numbers.
148
- this.list$ = combineLatest([this._pageNumber$, this._totalPages$]).pipe(map(([pageNumber, totalPages]) => this.filterActivePages(pageNumber, totalPages)), share());
149
- }
150
- get pageNumber() {
151
- return this._pageNumber$.getValue();
152
- }
153
- set pageNumber(newValue) {
154
- this.update(newValue);
155
- }
156
- get totalPages() {
157
- return this._totalPages$.getValue();
158
- }
159
- set totalPages(newValue) {
160
- const newTotalPages = Math.max(1, newValue);
161
- this._totalPages$.next(newTotalPages);
162
- }
163
- registerOnChange(fn) {
164
- this.onChange = fn;
165
- }
166
- registerOnTouched(fn) {
167
- this.onTouched = fn;
168
- }
169
- setDisabledState(isDisabled) {
170
- this.disabled = isDisabled;
171
- }
172
- writeValue(newValue) {
173
- this.update(newValue, false);
174
- }
175
- goToPrevious() {
176
- const newValue = this._pageNumber$.getValue() - 1;
177
- return this.update(newValue);
178
- }
179
- goToNext() {
180
- const newValue = this._pageNumber$.getValue() + 1;
181
- return this.update(newValue);
182
- }
183
- goToIndex(index) {
184
- return this.update(index);
185
- }
186
- update(pageNumber, notify = true) {
187
- // You can only update when not disabled.
188
- if (this.disabled) {
189
- return;
190
- }
191
- // Calculate the new value.
192
- const newValue = Math.min(this.totalPages, Math.max(1, pageNumber));
193
- // Don't do anything if the page number is the same.
194
- if (this._pageNumber$.getValue() === newValue) {
195
- return;
196
- }
197
- // Push the new value.
198
- this._pageNumber$.next(newValue);
199
- if (notify) {
200
- return this.onChange(pageNumber);
201
- }
202
- }
203
- calculatePages(pageNumber) {
204
- const min = 1;
205
- const max = this.totalPages;
206
- const amount = Math.max(1, this.amountOfButtons);
207
- const data = Array(amount)
208
- .fill(0)
209
- .map((_, index) => pageNumber + (index - 1));
210
- // Validate if the minimum value less than
211
- // the first value.
212
- if (data[0] < min) {
213
- return data.map(item => item + 1);
214
- }
215
- // Calculate the difference with the max
216
- // if this value is higher than 0 we should minus it.
217
- const lastValueInArray = data[data.length - 1];
218
- const differenceWithMax = lastValueInArray - max;
219
- if (differenceWithMax > 0) {
220
- return data.map(item => item - differenceWithMax);
221
- }
222
- // Just return the default data.
223
- return data;
224
- }
225
- filterActivePages(pageNumber, totalPages) {
226
- return this.calculatePages(pageNumber)
227
- .filter(page => page > 0 && page <= totalPages)
228
- .map(page => ({ page, active: pageNumber === page }));
229
- }
230
- }
231
- BbTablePager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTablePager, deps: null, target: i0.ɵɵFactoryTarget.Component });
232
- BbTablePager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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: [
233
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
234
- ], 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;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;appearance:none;font-weight:500;min-height:32px;-webkit-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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTablePager, decorators: [{
236
- type: Component,
237
- args: [{ selector: 'bb-table-pager', changeDetection: ChangeDetectionStrategy.OnPush, host: {
238
- 'class': 'bb-table-pager',
239
- '[class.disabled]': 'disabled'
240
- }, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, providers: [
241
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
242
- ], 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;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;appearance:none;font-weight:500;min-height:32px;-webkit-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"] }]
243
- }], propDecorators: { amountOfButtons: [{
244
- type: Input
245
- }], showArrowButtons: [{
246
- type: Input
247
- }], pageNumber: [{
248
- type: Input
249
- }], totalPages: [{
250
- type: Input
251
- }] } });
252
-
253
- class BbTableColumnDef {
254
- }
255
- BbTableColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
256
- BbTableColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: BbTableColumnDef, selector: "[bbTableColumnDef]", ngImport: i0 });
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableColumnDef, decorators: [{
258
- type: Directive,
259
- args: [{
260
- selector: '[bbTableColumnDef]'
261
- }]
262
- }] });
263
- class BbTableRowDef {
264
- }
265
- BbTableRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
266
- BbTableRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: BbTableRowDef, selector: "[bbTableRowDef]", ngImport: i0 });
267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableRowDef, decorators: [{
268
- type: Directive,
269
- args: [{
270
- selector: '[bbTableRowDef]'
271
- }]
272
- }] });
273
- class BbTable {
274
- constructor() {
275
- // Inputs.
276
- this.identifier = null;
277
- this.queryFields = [];
278
- this.sortingStrategy = 'single';
279
- this.header = true;
280
- this.footer = true;
281
- // Sizes.
282
- this._sizes = [25, 50, 75, 100];
283
- // Optimizations.
284
- this.trackByFn = (index, item) => this.identifier ? item[this.identifier] : index;
285
- this.trackByValue = (_, item) => item;
286
- this.queryControl = new FormControl('');
287
- // State.
288
- this._headerCount = 0;
289
- }
290
- get sizes() {
291
- return this._sizes;
292
- }
293
- set sizes(newValue) {
294
- this.updateSizes(newValue);
295
- }
296
- ngOnInit() {
297
- this.composeForm();
298
- this.watchDataChanges();
299
- }
300
- ngOnDestroy() {
301
- var _a;
302
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
303
- }
304
- get headerCount() {
305
- return this._headerCount;
306
- }
307
- get sortControl() {
308
- var _a;
309
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('sort');
310
- }
311
- get pageNumberControl() {
312
- var _a;
313
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('pageNumber');
314
- }
315
- get pageSizeControl() {
316
- var _a;
317
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('pageSize');
318
- }
319
- refresh() {
320
- return this.request.update();
321
- }
322
- setHeaderCount(amount) {
323
- this._headerCount += amount;
324
- }
325
- updateSizes(newValue) {
326
- // Validate the sizes has at least one value.
327
- if (newValue.length <= 0) {
328
- throw new Error('Cannot set an empty array as the sizes.');
329
- }
330
- // Set the new size.
331
- this._sizes = newValue;
332
- // Validate that the form exists already.
333
- if (!this.form) {
334
- return;
335
- }
336
- // Check if the current selected value is
337
- // in the new sizes array.
338
- const pageSizeControl = this.form.get('pageSize');
339
- if (this._sizes.includes(pageSizeControl.value)) {
340
- return;
341
- }
342
- // Set the first value in the array as
343
- // the new value.
344
- const firstValue = this._sizes[0];
345
- pageSizeControl.setValue(firstValue);
346
- }
347
- composeForm() {
348
- // Setup the form.
349
- this.form = new FormGroup({
350
- pageSize: new FormControl(this._sizes[0]),
351
- pageNumber: new FormControl(1),
352
- sort: new FormGroup({})
353
- });
354
- }
355
- watchDataChanges() {
356
- // Create a new request.
357
- this.request = new DataSourceRequest();
358
- this.isLoading$ = this.request.loading;
359
- if (!this.dataSource) {
360
- this.data$ = of({ state: 'error_datasource' }).pipe(tap(() => this.request.stopLoading()));
361
- return;
362
- }
363
- // Pass the request to the data source.
364
- this.data$ = this.dataSource.handle(this.request).pipe(tap(() => this.request.stopLoading()), map(result => {
365
- const count = (result && result.data && result.data.length) || 0;
366
- if (count <= 0) {
367
- return { state: 'empty', result };
368
- }
369
- return { state: 'success', result };
370
- }), catchError(error => {
371
- var _a, _b;
372
- this.request.stopLoading();
373
- const statusCode = (_a = error === null || error === void 0 ? void 0 : error.status) !== null && _a !== void 0 ? _a : null;
374
- const states = {
375
- 0: 'error_down',
376
- 401: 'error_unauthorized',
377
- 403: 'error_forbidden',
378
- 404: 'error_not_found',
379
- 500: 'error_server'
380
- };
381
- return of({ state: (_b = states === null || states === void 0 ? void 0 : states[statusCode]) !== null && _b !== void 0 ? _b : 'error_unknown', statusCode: statusCode });
382
- }));
383
- // Subscribe to the data changes.
384
- this.subscribeToChanges();
385
- }
386
- subscribeToChanges() {
387
- const form$ = this.getFormChanges();
388
- const query$ = this.getQueryChanges();
389
- this._subscription = combineLatest([form$, query$]).subscribe(([form, query]) => {
390
- const { pageNumber, pageSize } = form;
391
- const sort = Object.keys(form.sort)
392
- .map(name => ({ name, direction: form.sort[name] }))
393
- .filter(item => ['asc', 'desc'].includes(item.direction));
394
- this.request.startLoading();
395
- return this.request.update({
396
- sort,
397
- query,
398
- pageSize,
399
- pageNumber,
400
- queryFields: this.queryFields
401
- });
402
- });
403
- }
404
- getQueryChanges() {
405
- return this.queryControl.valueChanges.pipe(debounceTime(400), distinctUntilChanged(), startWith(this.queryControl.value));
406
- }
407
- getFormChanges() {
408
- return this.form.valueChanges.pipe(startWith(this.form.value));
409
- }
410
- }
411
- BbTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
412
- BbTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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: "tableRowTemplate", first: true, predicate: BbTableRowDef, descendants: true, read: TemplateRef }, { 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 <ng-container *ngIf=\"!!tableRowTemplate; else tableCellsTemplates\">\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data || []}\"></ng-container>\n </ng-container>\n\n <ng-template #tableCellsTemplates>\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-template>\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]=\"headerCount\"\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]=\"headerCount\"\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;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;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;animation-delay:1.15s;will-change:left,right;background-color:inherit;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}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: ["readonly"] }, { kind: "directive", type: i3.BbSelect, selector: "select[bbInput]", inputs: ["disabled", "required"] }, { kind: "directive", type: i3.BbSuffix, selector: "[bbSuffix]" }, { kind: "component", type: i3.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { kind: "component", type: i3.BbFormControl, selector: "bb-form-control", inputs: ["grouped", "hideErrors", "label", "hint"] }, { kind: "component", type: BbTablePager, selector: "bb-table-pager", inputs: ["disabled", "amountOfButtons", "showArrowButtons", "pageNumber", "totalPages"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTable, decorators: [{
414
- type: Component,
415
- args: [{ selector: 'bb-table', host: { 'class': 'bb-table' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, 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 <ng-container *ngIf=\"!!tableRowTemplate; else tableCellsTemplates\">\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data || []}\"></ng-container>\n </ng-container>\n\n <ng-template #tableCellsTemplates>\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-template>\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]=\"headerCount\"\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]=\"headerCount\"\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;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;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;animation-delay:1.15s;will-change:left,right;background-color:inherit;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}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@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"] }]
416
- }], propDecorators: { tableColumnTemplates: [{
417
- type: ContentChildren,
418
- args: [BbTableColumnDef, { read: TemplateRef }]
419
- }], tableRowTemplate: [{
420
- type: ContentChild,
421
- args: [BbTableRowDef, { read: TemplateRef, static: false }]
422
- }], identifier: [{
423
- type: Input
424
- }], dataSource: [{
425
- type: Input
426
- }], queryFields: [{
427
- type: Input
428
- }], sortingStrategy: [{
429
- type: Input
430
- }], header: [{
431
- type: Input
432
- }], footer: [{
433
- type: Input
434
- }], sizes: [{
435
- type: Input
436
- }] } });
437
-
438
- class BbTableCell {
439
- }
440
- BbTableCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
441
- BbTableCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableCell, decorators: [{
443
- type: Component,
444
- args: [{ selector: 'bb-table-cell', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'bb-table-cell' }, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, 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"] }]
445
- }] });
446
-
447
- class BbTableHeaderCellBase {
448
- }
449
- const BbTableHeaderCellMixinBase = mixinDisabled(BbTableHeaderCellBase);
450
- class BbTableHeaderCell extends BbTableHeaderCellMixinBase {
451
- // Sort.
452
- set sort(value) {
453
- // Check if the new value is a valid value.
454
- if (!this._sortDirections.includes(value)) {
455
- return;
456
- }
457
- // Set the value.
458
- this._control.setValue(value);
459
- }
460
- get sort() {
461
- return this._control.value;
462
- }
463
- constructor(_table, _name) {
464
- super();
465
- this._table = _table;
466
- this._name = _name;
467
- // Constants.
468
- this._sortDirections = ['none', 'asc', 'desc'];
469
- this._control = new FormControl(this._sortDirections[0]);
470
- this.logWarning = (message) => {
471
- console && console.warn && console.warn(message);
472
- };
473
- }
474
- ngOnInit() {
475
- var _a, _b, _c, _d;
476
- // Validate that the name and table are set.
477
- (_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.setHeaderCount) === null || _b === void 0 ? void 0 : _b.call(_a, 1);
478
- if (!this._table || !this._name) {
479
- return;
480
- }
481
- // Check if the control already exists in the table.
482
- if ((_c = this._table.sortControl) === null || _c === void 0 ? void 0 : _c.contains(this._name)) {
483
- this.disabled = true;
484
- return this.logWarning(`BbTableHeaderCell: The name "${this._name}" is not unique in the table; Control was not registered.`);
485
- }
486
- // Register the header cell with the table.
487
- (_d = this._table.sortControl) === null || _d === void 0 ? void 0 : _d.addControl(this._name, this._control);
488
- // Get all the value changes.
489
- this.valueChanges$ = this._control.valueChanges.pipe(startWith(this._control.value));
490
- }
491
- ngOnDestroy() {
492
- var _a, _b, _c, _d, _e, _f;
493
- (_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.setHeaderCount) === null || _b === void 0 ? void 0 : _b.call(_a, -1);
494
- // Validate that the name and table are set.
495
- if (!this._table || !this._name) {
496
- return;
497
- }
498
- // Un-register the header cell with the table.
499
- if ((_d = (_c = this._table) === null || _c === void 0 ? void 0 : _c.sortControl) === null || _d === void 0 ? void 0 : _d.contains(this._name)) {
500
- (_f = (_e = this._table) === null || _e === void 0 ? void 0 : _e.sortControl) === null || _f === void 0 ? void 0 : _f.removeControl(this._name);
501
- }
502
- }
503
- get isDisabled() {
504
- return this.disabled || !this._name;
505
- }
506
- onClick() {
507
- // Check if the header cell is disabled.
508
- if (this.isDisabled) {
509
- return;
510
- }
511
- // Find the index of the current sort and
512
- // create the new index.
513
- const index = this._sortDirections.findIndex(item => item === this._control.value);
514
- const newIndex = (index + 1) % this._sortDirections.length;
515
- const newSort = this._sortDirections[newIndex];
516
- // Set the new sort.
517
- return this.updateTableAndHeaderCell(newSort);
518
- }
519
- updateTableAndHeaderCell(value) {
520
- // Check if the new value is a valid value.
521
- if (!this._sortDirections.includes(value)) {
522
- return;
523
- }
524
- // Validate the table exists.
525
- if (!this._table) {
526
- return this._control.setValue(value);
527
- }
528
- // Handle the single sorting strategy.
529
- if (this._table.sortingStrategy === 'single') {
530
- return this.handleSingleSortingStrategy(value);
531
- }
532
- // Default case when no other strategy
533
- // is used.
534
- return this._control.setValue(value);
535
- }
536
- handleSingleSortingStrategy(value) {
537
- var _a, _b;
538
- // Get the sort control.
539
- const control = this._table.sortControl;
540
- // Set each value to false since we only want to
541
- // sort on one property at a time with this strategy.
542
- const newValue = Object.keys(control.controls).reduce((previous, current) => {
543
- previous[current] = current === this._name ? value : 'none';
544
- return previous;
545
- }, {});
546
- // Patch the entire sort value.
547
- (_b = (_a = this._table) === null || _a === void 0 ? void 0 : _a.sortControl) === null || _b === void 0 ? void 0 : _b.patchValue(newValue);
548
- }
549
- }
550
- BbTableHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableHeaderCell, deps: [{ token: BbTable, host: true, optional: true }, { token: 'name', attribute: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
551
- BbTableHeaderCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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;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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
552
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BbTableHeaderCell, decorators: [{
553
- type: Component,
554
- args: [{ selector: 'bb-table-header-cell', changeDetection: ChangeDetectionStrategy.OnPush, host: {
555
- 'class': 'bb-table-header-cell',
556
- '[class.disabled]': 'isDisabled'
557
- }, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, 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;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"] }]
558
- }], ctorParameters: function () {
559
- return [{ type: BbTable, decorators: [{
560
- type: Optional
561
- }, {
562
- type: Host
563
- }] }, { type: undefined, decorators: [{
564
- type: Optional
565
- }, {
566
- type: Attribute,
567
- args: ['name']
568
- }] }];
569
- }, propDecorators: { sort: [{
570
- type: Input
571
- }], onClick: [{
572
- type: HostListener,
573
- args: ['click']
574
- }] } });
575
-
576
- const DECLARATIONS_EXPORTS = [
577
- BbTable,
578
- BbTableColumnDef,
579
- BbTableRowDef,
580
- BbTableHeaderCell,
581
- BbTableCell,
582
- BbTablePager
583
- ];
584
- class TableModule {
585
- }
586
- TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
587
- TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: TableModule, declarations: [BbTable,
588
- BbTableColumnDef,
589
- BbTableRowDef,
590
- BbTableHeaderCell,
591
- BbTableCell,
592
- BbTablePager], imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule], exports: [BbTable,
593
- BbTableColumnDef,
594
- BbTableRowDef,
595
- BbTableHeaderCell,
596
- BbTableCell,
597
- BbTablePager] });
598
- TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableModule, imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule] });
599
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableModule, decorators: [{
600
- type: NgModule,
601
- args: [{
602
- imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule],
603
- declarations: [...DECLARATIONS_EXPORTS],
604
- exports: [...DECLARATIONS_EXPORTS]
605
- }]
606
- }] });
607
-
608
- /**
609
- * Generated bundle index. Do not edit.
610
- */
611
-
612
- export { BbTable, BbTableCell, BbTableColumnDef, BbTableHeaderCell, BbTablePager, BbTableRowDef, DataSource, DataSourceRequest, GenericDataSource, TableModule };
613
- //# sourceMappingURL=bravobit-bb-foundation-table.mjs.map