@bravobit/bb-foundation 0.26.2 → 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 (493) 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/data/generic.data.mjs +82 -0
  138. package/esm2022/table/lib/table.module.mjs +43 -0
  139. package/esm2022/theming/lib/theming.directive.mjs +39 -0
  140. package/esm2022/theming/lib/theming.module.mjs +17 -0
  141. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +32 -0
  142. package/esm2022/tooltip/lib/tooltip.directive.mjs +141 -0
  143. package/esm2022/tooltip/lib/tooltip.module.mjs +32 -0
  144. package/esm2022/utils/lib/directives/autosize.directive.mjs +73 -0
  145. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +78 -0
  146. package/esm2022/utils/lib/directives/focus.directive.mjs +38 -0
  147. package/esm2022/utils/lib/directives/template.directive.mjs +29 -0
  148. package/esm2022/utils/lib/functions/parse-date.function.mjs +19 -0
  149. package/esm2022/utils/lib/utils.module.mjs +36 -0
  150. package/esm2022/utils/public_api.mjs +7 -0
  151. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-auth.mjs +19 -19
  152. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-auth.mjs.map +1 -1
  153. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-collections.mjs +38 -38
  154. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-collections.mjs.map +1 -1
  155. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-controls.mjs +83 -83
  156. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-controls.mjs.map +1 -1
  157. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dashboard.mjs +37 -37
  158. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  159. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dialog.mjs +46 -46
  160. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dialog.mjs.map +1 -1
  161. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-elements.mjs +185 -185
  162. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -0
  163. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-http.mjs +10 -10
  164. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-http.mjs.map +1 -1
  165. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-localize.mjs +20 -20
  166. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-localize.mjs.map +1 -1
  167. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-masking.mjs +20 -20
  168. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-masking.mjs.map +1 -1
  169. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-notifications.mjs +13 -13
  170. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-notifications.mjs.map +1 -1
  171. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-permissions.mjs +13 -13
  172. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-permissions.mjs.map +1 -1
  173. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-recaptcha.mjs +16 -16
  174. package/{fesm2015 → fesm2022}/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  175. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-storage.mjs +3 -3
  176. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-storage.mjs.map +1 -1
  177. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-table.mjs +46 -36
  178. package/fesm2022/bravobit-bb-foundation-table.mjs.map +1 -0
  179. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-theming.mjs +7 -7
  180. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-theming.mjs.map +1 -1
  181. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-tooltip.mjs +13 -13
  182. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-tooltip.mjs.map +1 -1
  183. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-utils.mjs +42 -23
  184. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -0
  185. package/{fesm2020 → fesm2022}/bravobit-bb-foundation.mjs +21 -21
  186. package/{fesm2020 → fesm2022}/bravobit-bb-foundation.mjs.map +1 -1
  187. package/localize/lib/views/localize-string/localize-string.component.d.ts +1 -1
  188. package/localize/lib/views/localize-template.directive.d.ts +1 -1
  189. package/masking/lib/directives/currency-mask.directive.d.ts +1 -1
  190. package/masking/lib/directives/date-mask.directive.d.ts +1 -1
  191. package/masking/lib/directives/input-mask.directive.d.ts +1 -1
  192. package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
  193. package/package.json +70 -112
  194. package/permissions/lib/directives/permission.directive.d.ts +1 -1
  195. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +1 -1
  196. package/table/lib/components/table/table.component.d.ts +1 -1
  197. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +1 -1
  198. package/table/lib/components/table-pager/table-pager.component.d.ts +1 -1
  199. package/table/lib/data/generic.data.d.ts +2 -0
  200. package/theming/lib/theming.directive.d.ts +1 -1
  201. package/tooltip/lib/tooltip.directive.d.ts +1 -1
  202. package/utils/lib/directives/autosize.directive.d.ts +1 -1
  203. package/utils/lib/directives/template.directive.d.ts +1 -1
  204. package/utils/lib/functions/parse-date.function.d.ts +1 -0
  205. package/utils/public_api.d.ts +1 -0
  206. package/esm2020/auth/lib/auth.interceptor.mjs +0 -90
  207. package/esm2020/auth/lib/auth.module.mjs +0 -35
  208. package/esm2020/auth/lib/auth.service.mjs +0 -270
  209. package/esm2020/auth/lib/directives/authenticated.directive.mjs +0 -42
  210. package/esm2020/auth/lib/guards/anonymous.guard.mjs +0 -53
  211. package/esm2020/auth/lib/guards/authenticated.guard.mjs +0 -56
  212. package/esm2020/collections/lib/collections.module.mjs +0 -54
  213. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +0 -123
  214. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +0 -31
  215. package/esm2020/collections/lib/components/collections.directive.mjs +0 -43
  216. package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +0 -178
  217. package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +0 -68
  218. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +0 -20
  219. package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +0 -63
  220. package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +0 -47
  221. package/esm2020/controls/lib/control-error/control-error.module.mjs +0 -19
  222. package/esm2020/controls/lib/controls.module.mjs +0 -62
  223. package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +0 -79
  224. package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +0 -22
  225. package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +0 -124
  226. package/esm2020/controls/lib/form-control/form-control.module.mjs +0 -34
  227. package/esm2020/controls/lib/radio/radio-button/radio-button.component.mjs +0 -75
  228. package/esm2020/controls/lib/radio/radio-group/radio-group.component.mjs +0 -168
  229. package/esm2020/controls/lib/radio/radio.module.mjs +0 -21
  230. package/esm2020/controls/lib/toggle/toggle/toggle.component.mjs +0 -153
  231. package/esm2020/controls/lib/toggle/toggle-group/toggle-group.component.mjs +0 -62
  232. package/esm2020/controls/lib/toggle/toggle.module.mjs +0 -20
  233. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +0 -57
  234. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +0 -31
  235. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +0 -29
  236. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +0 -75
  237. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +0 -99
  238. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +0 -62
  239. package/esm2020/dashboard/lib/dashboard.module.mjs +0 -47
  240. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +0 -12
  241. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +0 -46
  242. package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +0 -77
  243. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +0 -18
  244. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +0 -11
  245. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +0 -67
  246. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +0 -79
  247. package/esm2020/dialog/lib/dialog.insertion.mjs +0 -16
  248. package/esm2020/dialog/lib/dialog.module.mjs +0 -68
  249. package/esm2020/dialog/lib/dialog.service.mjs +0 -68
  250. package/esm2020/elements/lib/avatar/avatar.component.mjs +0 -149
  251. package/esm2020/elements/lib/button/button.component.mjs +0 -61
  252. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +0 -73
  253. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +0 -307
  254. package/esm2020/elements/lib/directives/addon.directive.mjs +0 -29
  255. package/esm2020/elements/lib/directives/form-submit.directive.mjs +0 -50
  256. package/esm2020/elements/lib/directives/form-submitter.directive.mjs +0 -25
  257. package/esm2020/elements/lib/directives/input.directive.mjs +0 -136
  258. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +0 -100
  259. package/esm2020/elements/lib/elements.module.mjs +0 -177
  260. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +0 -236
  261. package/esm2020/elements/lib/form-control/form-control.component.mjs +0 -49
  262. package/esm2020/elements/lib/form-error/form-error.component.mjs +0 -123
  263. package/esm2020/elements/lib/form-group/form-group.component.mjs +0 -18
  264. package/esm2020/elements/lib/icon/icon.component.mjs +0 -102
  265. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +0 -106
  266. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +0 -43
  267. package/esm2020/elements/lib/pipes/file-size.pipe.mjs +0 -28
  268. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +0 -96
  269. package/esm2020/elements/lib/spinner/spinner.component.mjs +0 -25
  270. package/esm2020/elements/lib/tag/tag.component.mjs +0 -18
  271. package/esm2020/http/lib/http.module.mjs +0 -43
  272. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +0 -50
  273. package/esm2020/http/lib/interceptors/error.interceptor.mjs +0 -32
  274. package/esm2020/lib/core/services/clipboard.service.mjs +0 -70
  275. package/esm2020/lib/core/services/exif.service.mjs +0 -163
  276. package/esm2020/lib/core/services/file-loader.service.mjs +0 -87
  277. package/esm2020/lib/core/services/image-converter.service.mjs +0 -123
  278. package/esm2020/lib/core/services/languages.service.mjs +0 -74
  279. package/esm2020/lib/core/services/network.service.mjs +0 -55
  280. package/esm2020/lib/core/services/patch.service.mjs +0 -63
  281. package/esm2020/localize/lib/localize.module.mjs +0 -81
  282. package/esm2020/localize/lib/localize.pipe.mjs +0 -46
  283. package/esm2020/localize/lib/localize.service.mjs +0 -185
  284. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +0 -88
  285. package/esm2020/localize/lib/views/localize-template.directive.mjs +0 -21
  286. package/esm2020/masking/lib/directives/currency-mask.directive.mjs +0 -35
  287. package/esm2020/masking/lib/directives/date-mask.directive.mjs +0 -35
  288. package/esm2020/masking/lib/directives/input-mask.directive.mjs +0 -118
  289. package/esm2020/masking/lib/masking.module.mjs +0 -30
  290. package/esm2020/masking/lib/masking.service.mjs +0 -103
  291. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +0 -100
  292. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +0 -47
  293. package/esm2020/notifications/lib/notifications.module.mjs +0 -30
  294. package/esm2020/notifications/lib/notifications.service.mjs +0 -141
  295. package/esm2020/permissions/lib/directives/permission.directive.mjs +0 -88
  296. package/esm2020/permissions/lib/guards/permission.guard.mjs +0 -56
  297. package/esm2020/permissions/lib/permissions.module.mjs +0 -39
  298. package/esm2020/permissions/lib/permissions.service.mjs +0 -96
  299. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +0 -219
  300. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +0 -95
  301. package/esm2020/recaptcha/lib/recaptcha.module.mjs +0 -27
  302. package/esm2020/storage/lib/storage.service.mjs +0 -109
  303. package/esm2020/table/lib/components/table/table.component.mjs +0 -191
  304. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +0 -11
  305. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +0 -131
  306. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +0 -136
  307. package/esm2020/table/lib/data/generic.data.mjs +0 -72
  308. package/esm2020/table/lib/table.module.mjs +0 -42
  309. package/esm2020/theming/lib/theming.directive.mjs +0 -38
  310. package/esm2020/theming/lib/theming.module.mjs +0 -16
  311. package/esm2020/tooltip/lib/tooltip-container/tooltip-container.component.mjs +0 -31
  312. package/esm2020/tooltip/lib/tooltip.directive.mjs +0 -140
  313. package/esm2020/tooltip/lib/tooltip.module.mjs +0 -31
  314. package/esm2020/utils/lib/directives/autosize.directive.mjs +0 -72
  315. package/esm2020/utils/lib/directives/focus-trap.directive.mjs +0 -77
  316. package/esm2020/utils/lib/directives/focus.directive.mjs +0 -37
  317. package/esm2020/utils/lib/directives/template.directive.mjs +0 -28
  318. package/esm2020/utils/lib/utils.module.mjs +0 -35
  319. package/esm2020/utils/public_api.mjs +0 -6
  320. package/fesm2015/bravobit-bb-foundation-auth.mjs +0 -851
  321. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +0 -1
  322. package/fesm2015/bravobit-bb-foundation-collections.mjs +0 -474
  323. package/fesm2015/bravobit-bb-foundation-collections.mjs.map +0 -1
  324. package/fesm2015/bravobit-bb-foundation-controls.mjs +0 -1217
  325. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +0 -1
  326. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +0 -417
  327. package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +0 -1
  328. package/fesm2015/bravobit-bb-foundation-dialog.mjs +0 -512
  329. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +0 -1
  330. package/fesm2015/bravobit-bb-foundation-elements.mjs +0 -1883
  331. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +0 -1
  332. package/fesm2015/bravobit-bb-foundation-http.mjs +0 -176
  333. package/fesm2015/bravobit-bb-foundation-http.mjs.map +0 -1
  334. package/fesm2015/bravobit-bb-foundation-localize.mjs +0 -835
  335. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +0 -1
  336. package/fesm2015/bravobit-bb-foundation-masking.mjs +0 -334
  337. package/fesm2015/bravobit-bb-foundation-masking.mjs.map +0 -1
  338. package/fesm2015/bravobit-bb-foundation-notifications.mjs +0 -357
  339. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +0 -1
  340. package/fesm2015/bravobit-bb-foundation-permissions.mjs +0 -310
  341. package/fesm2015/bravobit-bb-foundation-permissions.mjs.map +0 -1
  342. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +0 -349
  343. package/fesm2015/bravobit-bb-foundation-rxjs.mjs +0 -22
  344. package/fesm2015/bravobit-bb-foundation-rxjs.mjs.map +0 -1
  345. package/fesm2015/bravobit-bb-foundation-storage.mjs +0 -418
  346. package/fesm2015/bravobit-bb-foundation-storage.mjs.map +0 -1
  347. package/fesm2015/bravobit-bb-foundation-table.mjs +0 -603
  348. package/fesm2015/bravobit-bb-foundation-table.mjs.map +0 -1
  349. package/fesm2015/bravobit-bb-foundation-theming.mjs +0 -382
  350. package/fesm2015/bravobit-bb-foundation-theming.mjs.map +0 -1
  351. package/fesm2015/bravobit-bb-foundation-tooltip.mjs +0 -210
  352. package/fesm2015/bravobit-bb-foundation-tooltip.mjs.map +0 -1
  353. package/fesm2015/bravobit-bb-foundation-utils.mjs +0 -246
  354. package/fesm2015/bravobit-bb-foundation-utils.mjs.map +0 -1
  355. package/fesm2015/bravobit-bb-foundation.mjs +0 -929
  356. package/fesm2015/bravobit-bb-foundation.mjs.map +0 -1
  357. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +0 -1
  358. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +0 -1
  359. package/fesm2020/bravobit-bb-foundation-table.mjs.map +0 -1
  360. package/fesm2020/bravobit-bb-foundation-utils.mjs.map +0 -1
  361. /package/{esm2020 → esm2022}/auth/bravobit-bb-foundation-auth.mjs +0 -0
  362. /package/{esm2020 → esm2022}/auth/lib/auth.session.mjs +0 -0
  363. /package/{esm2020 → esm2022}/auth/lib/directives/abstract.directive.mjs +0 -0
  364. /package/{esm2020 → esm2022}/auth/lib/helpers/jwt.helper.mjs +0 -0
  365. /package/{esm2020 → esm2022}/auth/lib/interfaces/config.interface.mjs +0 -0
  366. /package/{esm2020 → esm2022}/auth/lib/interfaces/provider.interface.mjs +0 -0
  367. /package/{esm2020 → esm2022}/auth/lib/interfaces/token.interface.mjs +0 -0
  368. /package/{esm2020 → esm2022}/auth/lib/providers/email.provider.mjs +0 -0
  369. /package/{esm2020 → esm2022}/auth/lib/providers/verify.provider.mjs +0 -0
  370. /package/{esm2020 → esm2022}/auth/lib/tokens/use-authorization.token.mjs +0 -0
  371. /package/{esm2020 → esm2022}/auth/public_api.mjs +0 -0
  372. /package/{esm2020 → esm2022}/bravobit-bb-foundation.mjs +0 -0
  373. /package/{esm2020 → esm2022}/collections/bravobit-bb-foundation-collections.mjs +0 -0
  374. /package/{esm2020 → esm2022}/collections/lib/collection.mjs +0 -0
  375. /package/{esm2020 → esm2022}/collections/lib/interfaces/collection.interface.mjs +0 -0
  376. /package/{esm2020 → esm2022}/collections/lib/providers/api-collection.provider.mjs +0 -0
  377. /package/{esm2020 → esm2022}/collections/lib/providers/collection.provider.mjs +0 -0
  378. /package/{esm2020 → esm2022}/collections/lib/providers/local-collection.provider.mjs +0 -0
  379. /package/{esm2020 → esm2022}/collections/public_api.mjs +0 -0
  380. /package/{esm2020 → esm2022}/controls/bravobit-bb-foundation-controls.mjs +0 -0
  381. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error/control-error.animation.mjs +0 -0
  382. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.defaults.mjs +0 -0
  383. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.interface.mjs +0 -0
  384. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.utils.mjs +0 -0
  385. /package/{esm2020 → esm2022}/controls/lib/controls.interfaces.mjs +0 -0
  386. /package/{esm2020 → esm2022}/controls/public_api.mjs +0 -0
  387. /package/{esm2020 → esm2022}/dashboard/bravobit-bb-foundation-dashboard.mjs +0 -0
  388. /package/{esm2020 → esm2022}/dashboard/public_api.mjs +0 -0
  389. /package/{esm2020 → esm2022}/dialog/bravobit-bb-foundation-dialog.mjs +0 -0
  390. /package/{esm2020 → esm2022}/dialog/lib/dialog-container/dialog-container.animations.mjs +0 -0
  391. /package/{esm2020 → esm2022}/dialog/lib/dialog-overlay/dialog-overlay.animations.mjs +0 -0
  392. /package/{esm2020 → esm2022}/dialog/lib/dialog.interfaces.mjs +0 -0
  393. /package/{esm2020 → esm2022}/dialog/lib/dialog.ref.mjs +0 -0
  394. /package/{esm2020 → esm2022}/dialog/public_api.mjs +0 -0
  395. /package/{esm2020 → esm2022}/elements/bravobit-bb-foundation-elements.mjs +0 -0
  396. /package/{esm2020 → esm2022}/elements/lib/elements.interfaces.mjs +0 -0
  397. /package/{esm2020 → esm2022}/elements/public_api.mjs +0 -0
  398. /package/{esm2020 → esm2022}/http/bravobit-bb-foundation-http.mjs +0 -0
  399. /package/{esm2020 → esm2022}/http/lib/classes/http.config.mjs +0 -0
  400. /package/{esm2020 → esm2022}/http/lib/classes/http.error.mjs +0 -0
  401. /package/{esm2020 → esm2022}/http/lib/http.interfaces.mjs +0 -0
  402. /package/{esm2020 → esm2022}/http/public_api.mjs +0 -0
  403. /package/{esm2020 → esm2022}/lib/core/functions/date.utils.mjs +0 -0
  404. /package/{esm2020 → esm2022}/lib/core/functions/password.utils.mjs +0 -0
  405. /package/{esm2020 → esm2022}/lib/core/miscellaneous/regex.mjs +0 -0
  406. /package/{esm2020 → esm2022}/lib/core/miscellaneous/validator.mjs +0 -0
  407. /package/{esm2020 → esm2022}/lib/core/mixins/can-disable.mjs +0 -0
  408. /package/{esm2020 → esm2022}/lib/core/mixins/can-hide-errors.mjs +0 -0
  409. /package/{esm2020 → esm2022}/lib/core/mixins/can-load.mjs +0 -0
  410. /package/{esm2020 → esm2022}/lib/core/mixins/constructor.mjs +0 -0
  411. /package/{esm2020 → esm2022}/lib/core/mixins/has-error.mjs +0 -0
  412. /package/{esm2020 → esm2022}/lib/core/mixins/is-focused.mjs +0 -0
  413. /package/{esm2020 → esm2022}/lib/core/mixins/is-grouped.mjs +0 -0
  414. /package/{esm2020 → esm2022}/lib/core/mixins/is-readonly.mjs +0 -0
  415. /package/{esm2020 → esm2022}/lib/core/mixins/is-required.mjs +0 -0
  416. /package/{esm2020 → esm2022}/lib/core/tokens/accept-language.token.mjs +0 -0
  417. /package/{esm2020 → esm2022}/lib/core/tokens/base-url.token.mjs +0 -0
  418. /package/{esm2020 → esm2022}/lib/core/tokens/cookie.token.mjs +0 -0
  419. /package/{esm2020 → esm2022}/lib/core/tokens/location.token.mjs +0 -0
  420. /package/{esm2020 → esm2022}/lib/core/tokens/navigator.token.mjs +0 -0
  421. /package/{esm2020 → esm2022}/lib/core/tokens/window.token.mjs +0 -0
  422. /package/{esm2020 → esm2022}/localize/bravobit-bb-foundation-localize.mjs +0 -0
  423. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.class.mjs +0 -0
  424. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.context.mjs +0 -0
  425. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.data.mjs +0 -0
  426. /package/{esm2020 → esm2022}/localize/lib/functions/date.function.mjs +0 -0
  427. /package/{esm2020 → esm2022}/localize/lib/functions/lowercase.function.mjs +0 -0
  428. /package/{esm2020 → esm2022}/localize/lib/functions/uppercase.function.mjs +0 -0
  429. /package/{esm2020 → esm2022}/localize/lib/handlers/missing.handler.mjs +0 -0
  430. /package/{esm2020 → esm2022}/localize/lib/interfaces/config.interfaces.mjs +0 -0
  431. /package/{esm2020 → esm2022}/localize/lib/interfaces/functions.interfaces.mjs +0 -0
  432. /package/{esm2020 → esm2022}/localize/lib/interfaces/handlers.interfaces.mjs +0 -0
  433. /package/{esm2020 → esm2022}/localize/lib/interfaces/options.interfaces.mjs +0 -0
  434. /package/{esm2020 → esm2022}/localize/lib/interfaces/transforms.interfaces.mjs +0 -0
  435. /package/{esm2020 → esm2022}/localize/lib/locale.token.mjs +0 -0
  436. /package/{esm2020 → esm2022}/localize/lib/localizations/dutch.localization.mjs +0 -0
  437. /package/{esm2020 → esm2022}/localize/lib/localizations/english.localization.mjs +0 -0
  438. /package/{esm2020 → esm2022}/localize/lib/transforms/abstract.transform.mjs +0 -0
  439. /package/{esm2020 → esm2022}/localize/public_api.mjs +0 -0
  440. /package/{esm2020 → esm2022}/masking/bravobit-bb-foundation-masking.mjs +0 -0
  441. /package/{esm2020 → esm2022}/masking/lib/input-mask.interface.mjs +0 -0
  442. /package/{esm2020 → esm2022}/masking/public_api.mjs +0 -0
  443. /package/{esm2020 → esm2022}/notifications/bravobit-bb-foundation-notifications.mjs +0 -0
  444. /package/{esm2020 → esm2022}/notifications/lib/notifications.animations.mjs +0 -0
  445. /package/{esm2020 → esm2022}/notifications/lib/notifications.interfaces.mjs +0 -0
  446. /package/{esm2020 → esm2022}/notifications/public_api.mjs +0 -0
  447. /package/{esm2020 → esm2022}/permissions/bravobit-bb-foundation-permissions.mjs +0 -0
  448. /package/{esm2020 → esm2022}/permissions/lib/handlers/abstract.handler.mjs +0 -0
  449. /package/{esm2020 → esm2022}/permissions/lib/handlers/local.handler.mjs +0 -0
  450. /package/{esm2020 → esm2022}/permissions/lib/permissions.interface.mjs +0 -0
  451. /package/{esm2020 → esm2022}/permissions/public_api.mjs +0 -0
  452. /package/{esm2020 → esm2022}/public_api.mjs +0 -0
  453. /package/{esm2020 → esm2022}/recaptcha/bravobit-bb-foundation-recaptcha.mjs +0 -0
  454. /package/{esm2020 → esm2022}/recaptcha/lib/recaptcha.interface.mjs +0 -0
  455. /package/{esm2020 → esm2022}/recaptcha/public_api.mjs +0 -0
  456. /package/{esm2020 → esm2022}/rxjs/bravobit-bb-foundation-rxjs.mjs +0 -0
  457. /package/{esm2020 → esm2022}/rxjs/lib/observables/get-control-value.observable.mjs +0 -0
  458. /package/{esm2020 → esm2022}/rxjs/lib/operators/combine-latest-map.operator.mjs +0 -0
  459. /package/{esm2020 → esm2022}/rxjs/lib/operators/filter-nil.operator.mjs +0 -0
  460. /package/{esm2020 → esm2022}/rxjs/public_api.mjs +0 -0
  461. /package/{esm2020 → esm2022}/storage/bravobit-bb-foundation-storage.mjs +0 -0
  462. /package/{esm2020 → esm2022}/storage/lib/interfaces/attributes.interface.mjs +0 -0
  463. /package/{esm2020 → esm2022}/storage/lib/interfaces/memory.interface.mjs +0 -0
  464. /package/{esm2020 → esm2022}/storage/lib/interfaces/strategy.interface.mjs +0 -0
  465. /package/{esm2020 → esm2022}/storage/lib/strategies/cookie-storage.strategy.mjs +0 -0
  466. /package/{esm2020 → esm2022}/storage/lib/strategies/memory-storage.strategy.mjs +0 -0
  467. /package/{esm2020 → esm2022}/storage/lib/strategies/polyfill-storage.strategy.mjs +0 -0
  468. /package/{esm2020 → esm2022}/storage/public_api.mjs +0 -0
  469. /package/{esm2020 → esm2022}/table/bravobit-bb-foundation-table.mjs +0 -0
  470. /package/{esm2020 → esm2022}/table/lib/data/datasource.data.mjs +0 -0
  471. /package/{esm2020 → esm2022}/table/lib/interfaces/datasource.interface.mjs +0 -0
  472. /package/{esm2020 → esm2022}/table/lib/interfaces/table.interfaces.mjs +0 -0
  473. /package/{esm2020 → esm2022}/table/public_api.mjs +0 -0
  474. /package/{esm2020 → esm2022}/theming/bravobit-bb-foundation-theming.mjs +0 -0
  475. /package/{esm2020 → esm2022}/theming/lib/themes/checkbox-group.theme.mjs +0 -0
  476. /package/{esm2020 → esm2022}/theming/lib/themes/checkbox.theme.mjs +0 -0
  477. /package/{esm2020 → esm2022}/theming/lib/themes/control-error.theme.mjs +0 -0
  478. /package/{esm2020 → esm2022}/theming/lib/themes/form-control-addon.theme.mjs +0 -0
  479. /package/{esm2020 → esm2022}/theming/lib/themes/form-control.theme.mjs +0 -0
  480. /package/{esm2020 → esm2022}/theming/lib/themes/radio-button.theme.mjs +0 -0
  481. /package/{esm2020 → esm2022}/theming/lib/themes/radio-group.theme.mjs +0 -0
  482. /package/{esm2020 → esm2022}/theming/lib/themes/toggle-group.theme.mjs +0 -0
  483. /package/{esm2020 → esm2022}/theming/lib/themes/toggle.theme.mjs +0 -0
  484. /package/{esm2020 → esm2022}/theming/lib/theming.data.mjs +0 -0
  485. /package/{esm2020 → esm2022}/theming/lib/theming.interface.mjs +0 -0
  486. /package/{esm2020 → esm2022}/theming/lib/utils/theming.variable.mjs +0 -0
  487. /package/{esm2020 → esm2022}/theming/public_api.mjs +0 -0
  488. /package/{esm2020 → esm2022}/tooltip/bravobit-bb-foundation-tooltip.mjs +0 -0
  489. /package/{esm2020 → esm2022}/tooltip/lib/tooltip.interfaces.mjs +0 -0
  490. /package/{esm2020 → esm2022}/tooltip/public_api.mjs +0 -0
  491. /package/{esm2020 → esm2022}/utils/bravobit-bb-foundation-utils.mjs +0 -0
  492. /package/{fesm2020 → fesm2022}/bravobit-bb-foundation-rxjs.mjs +0 -0
  493. /package/{fesm2020 → fesm2022}/bravobit-bb-foundation-rxjs.mjs.map +0 -0
@@ -1,835 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Optional, Inject, Directive, Input, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, Injectable, inject, LOCALE_ID, Pipe, APP_INITIALIZER, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { formatDate, DOCUMENT, CommonModule } from '@angular/common';
5
- import { __awaiter, __decorate, __param } from 'tslib';
6
- import { startWith, map, distinctUntilChanged } from 'rxjs/operators';
7
- import { Subscription, BehaviorSubject, of } from 'rxjs';
8
- import * as i2 from '@bravobit/bb-foundation/utils';
9
- import { UtilsModule } from '@bravobit/bb-foundation/utils';
10
- import * as i2$1 from '@bravobit/bb-foundation';
11
- import { WINDOW } from '@bravobit/bb-foundation';
12
- import * as i1$1 from '@bravobit/bb-foundation/storage';
13
-
14
- //
15
- // The configuration that can be passed when
16
- // the user initializes the localize module.
17
- //
18
- class LocalizeConfig {
19
- }
20
-
21
- //
22
- // This is the injection token that will be injected
23
- // into the service so that the all localize functions
24
- // can retrieved and used.
25
- //
26
- const LOCALIZE_FUNCTION = new InjectionToken('localize_function');
27
-
28
- const LOCALIZE_TRANSFORM = new InjectionToken('localize_transform');
29
-
30
- //
31
- // This function transform the value
32
- // to a lowercase variant of the value.
33
- //
34
- class LocalizeLowercaseFunction {
35
- keyword() {
36
- return 'lowercase';
37
- }
38
- transform(value) {
39
- return (value !== null && value !== void 0 ? value : '').toLowerCase();
40
- }
41
- }
42
-
43
- //
44
- // This function transform the value
45
- // to a uppercase variant of the value.
46
- //
47
- class LocalizeUppercaseFunction {
48
- keyword() {
49
- return 'uppercase';
50
- }
51
- transform(value) {
52
- return (value !== null && value !== void 0 ? value : '').toUpperCase();
53
- }
54
- }
55
-
56
- //
57
- // This function transform the value
58
- // to a localized date.
59
- //
60
- class LocalizeDateFunction {
61
- keyword() {
62
- return 'date';
63
- }
64
- transform(value, locale) {
65
- const date = new Date(value);
66
- if (date.toString() === 'Invalid Date') {
67
- return '?';
68
- }
69
- return formatDate(date, 'longDate', locale);
70
- }
71
- }
72
-
73
- const extraEnglishDictionary = {
74
- 'form-control-errors': {
75
- 'unknown': 'The field has an unknown error.',
76
- 'required': 'This field is required.',
77
- 'pattern': 'Invalid format.',
78
- 'email': 'The field does not match a valid email address.',
79
- 'emailTaken': 'The e-mail is already taken.',
80
- 'passwordMatch': 'The passwords don\'t match.',
81
- 'confirm': 'The field does not match.',
82
- 'fullNumber': 'The field should be a full number.',
83
- 'min': 'Minimum amount should be {{min}}.',
84
- 'max': 'Maximum amount should be {{max}}.',
85
- 'invalidFileType': 'The file type is not allowed.',
86
- 'maxFileSize': 'The file has exceed the maximum amount of {{maxSize}}.',
87
- 'minDate': 'The first accepted date is {{date|date}}.',
88
- 'maxDate': 'The last accepted date is {{date|date}}.',
89
- 'invalidDate': 'The field contains an invalid date.',
90
- 'minlength': 'Expected a minimum of {{requiredLength}} characters but got {{actualLength}} characters.',
91
- 'maxlength': 'Expected a maximum of {{requiredLength}} characters but got {{actualLength}} characters.'
92
- },
93
- 'tables': {
94
- 'search': 'Search...',
95
- 'loading': 'Loading...',
96
- 'empty': 'There is nothing to find here.',
97
- 'page': 'page',
98
- 'error_datasource': 'No data source was provided.',
99
- 'error_unauthorized': 'You need to be authenticated to view this data.',
100
- 'error_forbidden': 'You do not have access to view this data.',
101
- 'error_not_found': 'The data was not found.',
102
- 'error_server': 'A server error occurred while fetching data from the server.',
103
- 'error_down': 'It looks like the server is down.',
104
- 'error_unknown': 'A unknown error occurred.'
105
- },
106
- 'file-picker': {
107
- 'choose': 'Choose file',
108
- 'remove': 'Remove file',
109
- 'drop': 'or drag and drop file here'
110
- },
111
- 'times': {
112
- 'tomorrow_at': 'Tomorrow at {{date}}',
113
- 'today_at': 'Today at {{date}}',
114
- 'yesterday_at': 'Yesterday at {{date}}'
115
- }
116
- };
117
-
118
- const extraDutchDictionary = {
119
- 'form-control-errors': {
120
- 'unknown': 'Het veld heeft een onbekende fout.',
121
- 'required': 'Dit veld is verplicht.',
122
- 'pattern': 'Ongeldig formaat.',
123
- 'email': 'Het veld komt niet overeen met een geldig e-mailadres.',
124
- 'emailTaken': 'Het e-mailadres is al bezet.',
125
- 'passwordMatch': 'De wachtwoorden komen niet overeen.',
126
- 'confirm': 'Het veld komt niet overeen.',
127
- 'fullNumber': 'Het veld moet een volledig getal zijn.',
128
- 'min': 'Minimum hoeveelheid moet {{min}} zijn.',
129
- 'max': 'Maximum hoeveelheid moet {{max}} zijn.',
130
- 'invalidFileType': 'Het type bestand is niet toegestaan.',
131
- 'maxFileSize': 'Het bestand heeft de maximum hoeveelheid van {{maxSize}} overschreden.',
132
- 'minDate': 'De eerst mogelijke datum is {{date|date}}.',
133
- 'maxDate': 'De laatst mogelijke datum is {{date|date}}.',
134
- 'invalidDate': 'Het veld bevat een ongeldige datum.',
135
- 'minlength': 'Verwachtte minimaal {{requiredLength}} tekens, maar kreeg {{actualLength}} tekens.',
136
- 'maxlength': 'Verwachtte maximaal {{requiredLength}} tekens, maar kreeg {{actualLength}} tekens.'
137
- },
138
- 'tables': {
139
- 'search': 'Zoeken...',
140
- 'loading': 'Aan het laden...',
141
- 'empty': 'Er is hier niets te vinden.',
142
- 'page': 'pagina',
143
- 'error_datasource': 'Er is geen gegevensbron verstrekt.',
144
- 'error_unauthorized': 'U moet ingelogd zijn om deze gegevens te bekijken.',
145
- 'error_forbidden': 'U hebt geen toegang om deze gegevens te bekijken.',
146
- 'error_not_found': 'De gegevens zijn niet gevonden.',
147
- 'error_server': 'Er is een serverfout opgetreden bij het ophalen van gegevens van de server.',
148
- 'error_down': 'Het lijkt erop dat de server down is.',
149
- 'error_unknown': 'Er is een onbekende fout opgetreden bij het ophalen van gegevens van de server.'
150
- },
151
- 'file-picker': {
152
- 'choose': 'Kies bestand',
153
- 'remove': 'Verwijder bestand',
154
- 'drop': 'of sleep het bestand hiernaartoe'
155
- },
156
- 'times': {
157
- 'tomorrow_at': 'Morgen om {{date}}',
158
- 'today_at': 'Vandaag om {{date}}',
159
- 'yesterday_at': 'Gisteren om {{date}}'
160
- }
161
- };
162
-
163
- class LocalizeMissingHandler {
164
- constructor() {
165
- this.log = (message) => { var _a; return (_a = console === null || console === void 0 ? void 0 : console.warn) === null || _a === void 0 ? void 0 : _a.call(console, message); };
166
- }
167
- handle(params) {
168
- var _a;
169
- // Log to the console when the token was not found
170
- // if the user did not mark it as optional.
171
- if (!(params === null || params === void 0 ? void 0 : params.optional)) {
172
- this.log(`The token with name: "${params === null || params === void 0 ? void 0 : params.token}" was not found.`);
173
- }
174
- // Return the default token back.
175
- return (_a = params === null || params === void 0 ? void 0 : params.token) !== null && _a !== void 0 ? _a : null;
176
- }
177
- }
178
-
179
- class LocalizeDictionaryData {
180
- constructor(data) {
181
- this.data = data;
182
- }
183
- }
184
-
185
- class LocalizeDictionaryContext {
186
- constructor() {
187
- this.regexp = /^.*$/;
188
- }
189
- pattern(regexp) {
190
- this.regexp = regexp;
191
- return this;
192
- }
193
- matches(value) {
194
- const formatted = this.formatValue(value);
195
- const regex = (formatted !== null && formatted !== void 0 ? formatted : '')
196
- .replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
197
- .replace(/\\\*/g, '.*');
198
- return this.pattern(new RegExp(`^${regex}$`));
199
- }
200
- group(value) {
201
- const formatted = this.formatValue(value);
202
- return this.matches([formatted, '*']);
203
- }
204
- formatValue(value) {
205
- return Array.isArray(value)
206
- ? value.filter(item => !!item).join('.')
207
- : value;
208
- }
209
- }
210
-
211
- class LocalizeDictionary {
212
- constructor(_id, _locale, _supported, _dataValues, _localize) {
213
- this._id = _id;
214
- this._locale = _locale;
215
- this._supported = _supported;
216
- this._dataValues = _dataValues;
217
- this._localize = _localize;
218
- this._data = this.formatData(this._dataValues);
219
- }
220
- get id() {
221
- var _a;
222
- return (_a = this._id) !== null && _a !== void 0 ? _a : null;
223
- }
224
- get locale() {
225
- var _a;
226
- return (_a = this._locale) !== null && _a !== void 0 ? _a : null;
227
- }
228
- get supported() {
229
- var _a;
230
- return (_a = this._supported) !== null && _a !== void 0 ? _a : [];
231
- }
232
- get(token) {
233
- var _a, _b;
234
- const key = Array.isArray(token) ? token.join('.') : token;
235
- return (_b = (_a = this._data) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : null;
236
- }
237
- has(token) {
238
- return !!this.get(token);
239
- }
240
- all() {
241
- return this.some(context => context);
242
- }
243
- some(callback) {
244
- var _a;
245
- const defaultContext = new LocalizeDictionaryContext();
246
- const context = !!callback ? callback(defaultContext) : defaultContext;
247
- return Object.keys((_a = this._data) !== null && _a !== void 0 ? _a : {})
248
- .filter(key => context.regexp.test(key))
249
- .reduce((previous, current) => ([
250
- ...previous,
251
- { token: current, value: this.get(current) }
252
- ]), []);
253
- }
254
- compare(to) {
255
- var _a, _b;
256
- return __awaiter(this, void 0, void 0, function* () {
257
- if ((typeof ngDevMode === 'undefined' || ngDevMode)) {
258
- const dictionaryIds = (Array.isArray(to) ? to : [to]);
259
- const dictionaries = [];
260
- for (const dictionaryId of dictionaryIds) {
261
- const dictionary = yield this._localize.load(dictionaryId);
262
- dictionaries.push(dictionary);
263
- }
264
- const warnings = [];
265
- const items = this.all();
266
- for (const item of items) {
267
- for (const dictionary of dictionaries) {
268
- if (!dictionary.has(item === null || item === void 0 ? void 0 : item.token)) {
269
- warnings.push({ dictionary: dictionary === null || dictionary === void 0 ? void 0 : dictionary.id, value: item === null || item === void 0 ? void 0 : item.token });
270
- }
271
- }
272
- }
273
- for (const dictionary of dictionaries) {
274
- const items = dictionary.all();
275
- for (const item of items) {
276
- if (!this.has(item === null || item === void 0 ? void 0 : item.token)) {
277
- warnings.push({ dictionary: this.id, value: item === null || item === void 0 ? void 0 : item.token });
278
- }
279
- }
280
- }
281
- const compareDictionaryIds = dictionaries.map(dictionary => dictionary === null || dictionary === void 0 ? void 0 : dictionary.id).join(', ');
282
- for (const warning of warnings) {
283
- (_a = console === null || console === void 0 ? void 0 : console.warn) === null || _a === void 0 ? void 0 : _a.call(console, `Dictionary "${warning.dictionary}" is missing token "${warning.value}"`);
284
- }
285
- (_b = console === null || console === void 0 ? void 0 : console.warn) === null || _b === void 0 ? void 0 : _b.call(console, `Total of ${warnings.length} warning(s) found while comparing "${this.id}" -> [${compareDictionaryIds}].`);
286
- }
287
- });
288
- }
289
- count() {
290
- var _a;
291
- return Object.keys((_a = this._data) !== null && _a !== void 0 ? _a : {}).length;
292
- }
293
- formatData(data, scope = null) {
294
- return Object.keys(data !== null && data !== void 0 ? data : {}).reduce((previous, current) => {
295
- var _a;
296
- const value = data === null || data === void 0 ? void 0 : data[current];
297
- if (typeof value === 'object' && value !== null) {
298
- const reformatted = this.formatData(value, current);
299
- return Object.assign(Object.assign({}, previous), reformatted);
300
- }
301
- const token = [scope, current].filter(item => !!item).join('.');
302
- if (previous[token] && (typeof ngDevMode === 'undefined' || ngDevMode)) {
303
- (_a = console === null || console === void 0 ? void 0 : console.warn) === null || _a === void 0 ? void 0 : _a.call(console, `Duplicate key "${token}" was found, please verify your translation files.`);
304
- }
305
- return Object.assign(Object.assign({}, previous), { [token]: value });
306
- }, {});
307
- }
308
- }
309
-
310
- class LocalizeTransform {
311
- getMatches(value, substitutions) {
312
- // Validate our value exists, else return zero matches.
313
- if (value === undefined || value === null) {
314
- return [];
315
- }
316
- // Get the matching substitutions.
317
- const { start, end } = this.getSubstitutions(substitutions);
318
- // Compose a regex that will find the matches.
319
- const regex = new RegExp(`${start}([^${end}]+)${end}`, 'g');
320
- // Execute the regex to find matches.
321
- let match = regex.exec(value);
322
- const matches = [];
323
- while (match !== null) {
324
- matches.push({ match: match[0], token: match[1] });
325
- match = regex.exec(value);
326
- }
327
- // Return the processed value.
328
- return matches.filter(item => !!item);
329
- }
330
- getSubstitutions(value) {
331
- // Escape both substitutions so that they can be used.
332
- const escape = /[.*+?^${}()|[\]\\]/g;
333
- const start = value[0].replace(escape, '\\$&');
334
- const end = value[1].replace(escape, '\\$&');
335
- // Return the substitutions.
336
- return { start, end };
337
- }
338
- }
339
-
340
- let LocalizeInterpolateTransform = class LocalizeInterpolateTransform extends LocalizeTransform {
341
- constructor(config, functions) {
342
- var _a, _b, _c, _d;
343
- super();
344
- this.config = config;
345
- this.functions = functions;
346
- this.substitutions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.substitutions) === null || _b === void 0 ? void 0 : _b.references) !== null && _c !== void 0 ? _c : ['{{', '}}'];
347
- this.functionsMap = ((_d = this.functions) !== null && _d !== void 0 ? _d : []).reduce((previous, current) => {
348
- previous[current === null || current === void 0 ? void 0 : current.keyword()] = current;
349
- return previous;
350
- }, {});
351
- }
352
- execute(value, data, localize) {
353
- const matches = this.getMatches(value, this.substitutions);
354
- // Replace all matches with the translated value.
355
- return matches.reduce((previous, current) => {
356
- // Try to parse the token.
357
- const interpolatedToken = this.parseInterpolationToken(current === null || current === void 0 ? void 0 : current.token, data, localize);
358
- // Replace the match with the translated token.
359
- return previous.replace(current === null || current === void 0 ? void 0 : current.match, interpolatedToken);
360
- }, value);
361
- }
362
- parseInterpolationToken(value, data, localize) {
363
- var _a;
364
- // Get the token and the methods by splitting
365
- // on the pipe symbol.
366
- const [token, ...methods] = (value !== null && value !== void 0 ? value : '').split('|').map(item => item.trim());
367
- // Get the value for the token from
368
- // the interpolation data.
369
- const interpolationValue = (_a = data === null || data === void 0 ? void 0 : data[token]) !== null && _a !== void 0 ? _a : 'null';
370
- // Loop through all the middleware methods and try to
371
- // conform the string to the given parameters.
372
- return methods.reduce((string, middlewareName) => {
373
- var _a, _b;
374
- // Try to retrieve the middleware from the collection.
375
- const middleware = (_a = this.functionsMap) === null || _a === void 0 ? void 0 : _a[middlewareName];
376
- // If the middleware is missing return an error
377
- // so that the user knows it was not found.
378
- if (!middleware) {
379
- return string;
380
- }
381
- // Execute the middleware function with the string.
382
- return middleware.transform(string, (_b = localize === null || localize === void 0 ? void 0 : localize.current) === null || _b === void 0 ? void 0 : _b.locale);
383
- }, `${interpolationValue}`);
384
- }
385
- };
386
- LocalizeInterpolateTransform = __decorate([
387
- __param(0, Optional()),
388
- __param(1, Optional()),
389
- __param(1, Inject(LOCALIZE_FUNCTION))
390
- ], LocalizeInterpolateTransform);
391
-
392
- let LocalizeReferenceTransform = class LocalizeReferenceTransform extends LocalizeTransform {
393
- constructor(config) {
394
- var _a, _b, _c;
395
- super();
396
- this.config = config;
397
- this.substitutions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.substitutions) === null || _b === void 0 ? void 0 : _b.references) !== null && _c !== void 0 ? _c : ['#(', ')'];
398
- }
399
- execute(value, _, localize) {
400
- const matches = this.getMatches(value, this.substitutions);
401
- // Replace all matches with the translated value.
402
- return matches.reduce((previous, current) => {
403
- // Try to translate the token.
404
- const translatedToken = localize.translate(current === null || current === void 0 ? void 0 : current.token);
405
- // Replace the match with the translated token.
406
- return previous.replace(current === null || current === void 0 ? void 0 : current.match, translatedToken);
407
- }, value);
408
- }
409
- };
410
- LocalizeReferenceTransform = __decorate([
411
- __param(0, Optional())
412
- ], LocalizeReferenceTransform);
413
-
414
- class BbLocalizeTemplate {
415
- constructor(templateRef) {
416
- this.templateRef = templateRef;
417
- // Inputs.
418
- this.name = null;
419
- }
420
- }
421
- BbLocalizeTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BbLocalizeTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
422
- BbLocalizeTemplate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: BbLocalizeTemplate, selector: "[bbLocalizeTemplate]", inputs: { name: ["bbLocalizeTemplate", "name"] }, ngImport: i0 });
423
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BbLocalizeTemplate, decorators: [{
424
- type: Directive,
425
- args: [{
426
- selector: '[bbLocalizeTemplate]'
427
- }]
428
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { name: [{
429
- type: Input,
430
- args: ['bbLocalizeTemplate']
431
- }] } });
432
-
433
- class BbLocalizeString {
434
- set value(value) {
435
- this._value = value;
436
- this.revalidate();
437
- }
438
- get value() {
439
- return this._value;
440
- }
441
- constructor(_changeDetection) {
442
- this._changeDetection = _changeDetection;
443
- // Inputs.
444
- this.substitutions = ['[', ']'];
445
- // Data.
446
- this.components = [];
447
- // Subscriptions.
448
- this._subscription = new Subscription();
449
- // State.
450
- this._value = null;
451
- }
452
- ngAfterViewInit() {
453
- this.observeItemChanges();
454
- }
455
- ngOnDestroy() {
456
- var _a;
457
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
458
- }
459
- observeItemChanges() {
460
- const subscription = this.items.changes.pipe(startWith(0)).subscribe(() => this.revalidate());
461
- this._subscription.add(subscription);
462
- }
463
- revalidate() {
464
- var _a, _b;
465
- const items = (_b = (_a = this.items) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
466
- if (items.length <= 0) {
467
- return;
468
- }
469
- this.setComponents(items);
470
- }
471
- setComponents(items) {
472
- const [start, end] = this.substitutions;
473
- const templates = items.reduce((previous, current) => {
474
- var _a, _b;
475
- const template = (_a = current === null || current === void 0 ? void 0 : current.templateRef) !== null && _a !== void 0 ? _a : null;
476
- const name = (_b = current === null || current === void 0 ? void 0 : current.name) !== null && _b !== void 0 ? _b : null;
477
- if (!template || !name) {
478
- return previous;
479
- }
480
- return Object.assign(Object.assign({}, previous), { [`${start}${name}${end}`]: template });
481
- }, {});
482
- this.components = this.getStringComponents(this._value)
483
- .map(component => { var _a, _b; return (_b = (_a = templates === null || templates === void 0 ? void 0 : templates[component]) !== null && _a !== void 0 ? _a : component) !== null && _b !== void 0 ? _b : null; })
484
- .filter(item => !!item);
485
- this._changeDetection.detectChanges();
486
- }
487
- getStringComponents(value) {
488
- const [start, end] = this.getSubstitutions();
489
- const regex = new RegExp(`(${start}[a-zA-Z]+${end})`, 'g');
490
- return value.split(regex);
491
- }
492
- getSubstitutions() {
493
- const [start, end] = this.substitutions;
494
- const escape = /[.*+?^${}()|[\]\\]/g;
495
- return [
496
- start.replace(escape, '\\$&'),
497
- end.replace(escape, '\\$&')
498
- ];
499
- }
500
- }
501
- BbLocalizeString.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BbLocalizeString, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
502
- BbLocalizeString.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: BbLocalizeString, selector: "bb-localize-string, [bb-localize-string]", inputs: { substitutions: "substitutions", value: "value" }, host: { classAttribute: "bb-localize-string" }, queries: [{ propertyName: "items", predicate: BbLocalizeTemplate }], ngImport: i0, template: "<ng-container *ngFor=\"let component of components\">\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n</ng-container>\n", styles: [".bb-localize-string{display:inline}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BbLocalizeString, decorators: [{
504
- type: Component,
505
- args: [{ selector: 'bb-localize-string, [bb-localize-string]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: {
506
- 'class': 'bb-localize-string'
507
- }, template: "<ng-container *ngFor=\"let component of components\">\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n</ng-container>\n", styles: [".bb-localize-string{display:inline}\n"] }]
508
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
509
- type: ContentChildren,
510
- args: [BbLocalizeTemplate]
511
- }], substitutions: [{
512
- type: Input
513
- }], value: [{
514
- type: Input
515
- }] } });
516
-
517
- class Localize {
518
- constructor(_storage, _languages, _missingHandler, _config, _window, _document, _transforms) {
519
- var _a, _b, _c, _d;
520
- this._storage = _storage;
521
- this._languages = _languages;
522
- this._missingHandler = _missingHandler;
523
- this._config = _config;
524
- this._window = _window;
525
- this._document = _document;
526
- this._transforms = _transforms;
527
- // Readonly data.
528
- this._storageToken = (_b = (_a = this._config) === null || _a === void 0 ? void 0 : _a.storageToken) !== null && _b !== void 0 ? _b : 'bb-language-dictionary-id';
529
- this._availableLanguages = (_d = (_c = this === null || this === void 0 ? void 0 : this._config) === null || _c === void 0 ? void 0 : _c.languages) !== null && _d !== void 0 ? _d : [];
530
- this._bestMatchingLanguage = this.retrieveBestMatchingLanguage();
531
- this._loadedDictionaries = new Map();
532
- // Current dictionary.
533
- this._current$ = new BehaviorSubject(null);
534
- // State changes.
535
- this.dictionaryChanges$ = this._current$.asObservable();
536
- this.convertToParams = (tokenOrParams) => {
537
- if (typeof tokenOrParams !== 'string') {
538
- // Destruct the params from the object.
539
- const { token, optional, dictionary, data } = tokenOrParams;
540
- // Make sure all parameters are valid
541
- // by type safe adding them.
542
- return { token: token, optional: optional !== null && optional !== void 0 ? optional : false, dictionary: dictionary !== null && dictionary !== void 0 ? dictionary : null, data: data !== null && data !== void 0 ? data : {} };
543
- }
544
- // If the parameter is a string fill in the blanks.
545
- return { token: tokenOrParams, optional: false, dictionary: null, data: {} };
546
- };
547
- this.renderDocumentLanguage();
548
- }
549
- get languages() {
550
- var _a;
551
- return (_a = this._availableLanguages) !== null && _a !== void 0 ? _a : [];
552
- }
553
- get current() {
554
- return this._current$.getValue();
555
- }
556
- load(id) {
557
- var _a, _b, _c, _d, _e, _f;
558
- return __awaiter(this, void 0, void 0, function* () {
559
- if (id === null || id === undefined) {
560
- throw new Error(`Cannot load language with id: "${id}".`);
561
- }
562
- if (this._loadedDictionaries.has(id)) {
563
- return this._loadedDictionaries.get(id);
564
- }
565
- const language = (_a = this.languages) === null || _a === void 0 ? void 0 : _a.find(language => (language === null || language === void 0 ? void 0 : language.id) === id);
566
- if (!language || !(language === null || language === void 0 ? void 0 : language.data)) {
567
- (_b = console === null || console === void 0 ? void 0 : console.warn) === null || _b === void 0 ? void 0 : _b.call(console, `No language was found with id: "${id}"; Defaulting to first available language.`);
568
- const languageId = (_e = (_d = (_c = this.languages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : null;
569
- return this.load(languageId);
570
- }
571
- const dictionaryDataValues = yield ((_f = language === null || language === void 0 ? void 0 : language.data) === null || _f === void 0 ? void 0 : _f.call(language));
572
- const dictionary = this.createDictionary(dictionaryDataValues, language);
573
- this._loadedDictionaries.set(id, dictionary);
574
- return dictionary;
575
- });
576
- }
577
- loadAllLanguages() {
578
- var _a;
579
- return __awaiter(this, void 0, void 0, function* () {
580
- for (const language of this.languages) {
581
- yield this.load((_a = this.current) === null || _a === void 0 ? void 0 : _a.id);
582
- }
583
- });
584
- }
585
- switch(id, options) {
586
- var _a, _b, _c, _d, _e;
587
- return __awaiter(this, void 0, void 0, function* () {
588
- const dictionary = yield this.load(id);
589
- this._current$.next(dictionary);
590
- const cache = (_a = options === null || options === void 0 ? void 0 : options.cache) !== null && _a !== void 0 ? _a : true;
591
- if (cache) {
592
- this._storage.cookie.set(this._storageToken, dictionary === null || dictionary === void 0 ? void 0 : dictionary.id, {});
593
- }
594
- const reload = (_b = options === null || options === void 0 ? void 0 : options.reload) !== null && _b !== void 0 ? _b : false;
595
- if (reload) {
596
- (_e = (_d = (_c = this._window) === null || _c === void 0 ? void 0 : _c.location) === null || _d === void 0 ? void 0 : _d.reload) === null || _e === void 0 ? void 0 : _e.call(_d);
597
- }
598
- return dictionary;
599
- });
600
- }
601
- select(id) {
602
- if (!this._loadedDictionaries.has(id)) {
603
- throw new Error(`Dictionary with id: "${id}" not loaded; Load dictionary first before using .select(:id).`);
604
- }
605
- return this._loadedDictionaries.get(id);
606
- }
607
- initialize() {
608
- return () => __awaiter(this, void 0, void 0, function* () {
609
- var _a;
610
- yield this.switch((_a = this._bestMatchingLanguage) === null || _a === void 0 ? void 0 : _a.id, { reload: false, cache: false });
611
- return this.compareDictionaries();
612
- });
613
- }
614
- clear() {
615
- this._storage.cookie.remove(this._storageToken);
616
- }
617
- transform(value, data = {}) {
618
- var _a;
619
- return ((_a = this._transforms) !== null && _a !== void 0 ? _a : []).reduce((previous, current) => {
620
- return current.execute(previous, data, this);
621
- }, value);
622
- }
623
- translate(tokenOrParams) {
624
- // 1. Convert to the params.
625
- const params = this.convertToParams(tokenOrParams);
626
- // 2. Try to find the translation in the dictionary.
627
- const dictionary = this.getDictionary(params === null || params === void 0 ? void 0 : params.dictionary);
628
- const searchResult = !!dictionary ? dictionary.get(params === null || params === void 0 ? void 0 : params.token) : null;
629
- // 3. Verify the translation was found.
630
- if (!searchResult) {
631
- return this._missingHandler.handle(params);
632
- }
633
- return this.transform(searchResult, params === null || params === void 0 ? void 0 : params.data);
634
- }
635
- retrieveBestMatchingLanguage() {
636
- var _a, _b, _c;
637
- return (_b = (_a = this.getLanguageFromStorage()) !== null && _a !== void 0 ? _a : this.getBestBrowserMatchLanguage()) !== null && _b !== void 0 ? _b : (_c = this._availableLanguages) === null || _c === void 0 ? void 0 : _c[0];
638
- }
639
- getLanguageFromStorage() {
640
- // Get id from the storage.
641
- const id = this._storage.cookie.get(this._storageToken);
642
- // Return the language based on the storage id.
643
- return this._availableLanguages.find(item => (item === null || item === void 0 ? void 0 : item.id) === id);
644
- }
645
- getBestBrowserMatchLanguage() {
646
- // Loop through all browser languages and return the
647
- // best matching language.
648
- return this._languages.all.map(({ code, region }) => {
649
- const languageCode = [code, region].filter(data => !!data).join('-');
650
- return this._availableLanguages.find(item => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.supported) === null || _a === void 0 ? void 0 : _a.includes(languageCode); });
651
- }).filter(item => !!item).find((_, index) => index === 0);
652
- }
653
- createDictionary(data, language) {
654
- return new LocalizeDictionary(language === null || language === void 0 ? void 0 : language.id, language === null || language === void 0 ? void 0 : language.locale, language === null || language === void 0 ? void 0 : language.supported, data === null || data === void 0 ? void 0 : data.data, this);
655
- }
656
- getDictionary(id) {
657
- if (id === null || id === undefined) {
658
- return this.current;
659
- }
660
- return this.select(id);
661
- }
662
- renderDocumentLanguage() {
663
- var _a, _b, _c, _d, _e;
664
- const element = (_a = this._document) === null || _a === void 0 ? void 0 : _a.documentElement;
665
- if (!element) {
666
- return;
667
- }
668
- element.lang = (_d = (_c = (_b = this._bestMatchingLanguage) === null || _b === void 0 ? void 0 : _b.supported) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : (_e = this._bestMatchingLanguage) === null || _e === void 0 ? void 0 : _e.locale;
669
- }
670
- compareDictionaries() {
671
- var _a, _b, _c, _d;
672
- return __awaiter(this, void 0, void 0, function* () {
673
- const compareDictionaries = (_a = this._config.compareDictionaries) !== null && _a !== void 0 ? _a : false;
674
- if (!compareDictionaries || !this.current) {
675
- return;
676
- }
677
- const languageIds = (_d = (_c = ((_b = this.languages) !== null && _b !== void 0 ? _b : [])) === null || _c === void 0 ? void 0 : _c.filter(language => { var _a; return (language === null || language === void 0 ? void 0 : language.id) !== ((_a = this.current) === null || _a === void 0 ? void 0 : _a.id); })) === null || _d === void 0 ? void 0 : _d.map(language => language === null || language === void 0 ? void 0 : language.id);
678
- return yield this.current.compare(languageIds);
679
- });
680
- }
681
- }
682
- Localize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: Localize, deps: [{ token: i1$1.Storage }, { token: i2$1.Languages }, { token: LocalizeMissingHandler }, { token: LocalizeConfig, optional: true }, { token: WINDOW, optional: true }, { token: DOCUMENT, optional: true }, { token: LOCALIZE_TRANSFORM, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
683
- Localize.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: Localize });
684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: Localize, decorators: [{
685
- type: Injectable
686
- }], ctorParameters: function () {
687
- return [{ type: i1$1.Storage }, { type: i2$1.Languages }, { type: LocalizeMissingHandler }, { type: LocalizeConfig, decorators: [{
688
- type: Optional
689
- }] }, { type: Window, decorators: [{
690
- type: Optional
691
- }, {
692
- type: Inject,
693
- args: [WINDOW]
694
- }] }, { type: Document, decorators: [{
695
- type: Optional
696
- }, {
697
- type: Inject,
698
- args: [DOCUMENT]
699
- }] }, { type: undefined, decorators: [{
700
- type: Optional
701
- }, {
702
- type: Inject,
703
- args: [LOCALIZE_TRANSFORM]
704
- }] }];
705
- } });
706
-
707
- const LOCALIZE_ID = new InjectionToken('An abstraction over locale changes', {
708
- factory: () => {
709
- var _a, _b;
710
- const localize = inject(Localize, { optional: true });
711
- if (!localize) {
712
- return of(inject(LOCALE_ID));
713
- }
714
- return localize.dictionaryChanges$.pipe(map(dictionary => { var _a; return (_a = dictionary === null || dictionary === void 0 ? void 0 : dictionary.locale) !== null && _a !== void 0 ? _a : null; }), distinctUntilChanged(), startWith((_b = (_a = localize === null || localize === void 0 ? void 0 : localize.current) === null || _a === void 0 ? void 0 : _a.locale) !== null && _b !== void 0 ? _b : null));
715
- }
716
- });
717
-
718
- class BbLocalize {
719
- constructor(_localize) {
720
- this._localize = _localize;
721
- }
722
- transform(tokenOrParams, args) {
723
- var _a;
724
- // Combine the params with the options to form the localize params.
725
- const params = this.combineParamsWithOptions(tokenOrParams, args);
726
- // Validate that the localize service exists in the pipe.
727
- if (!this._localize) {
728
- return (_a = params === null || params === void 0 ? void 0 : params.token) !== null && _a !== void 0 ? _a : null;
729
- }
730
- // Try to localize the value.
731
- return this._localize.translate(params);
732
- }
733
- combineParamsWithOptions(tokenOrParams, args) {
734
- // Gather the extras.
735
- const extras = args !== null && args !== void 0 ? args : {};
736
- // Loop through all the keys to find the set options.
737
- const options = Object.keys(extras).reduce((previous, current) => {
738
- if (typeof (extras === null || extras === void 0 ? void 0 : extras[current]) === 'undefined') {
739
- return previous;
740
- }
741
- return Object.assign(Object.assign({}, previous), { [current]: extras === null || extras === void 0 ? void 0 : extras[current] });
742
- }, {});
743
- // Convert the string token to a params object.
744
- const params = typeof tokenOrParams === 'string'
745
- ? { token: tokenOrParams, optional: false, data: {}, dictionary: null }
746
- : tokenOrParams;
747
- // Return the combined params and options.
748
- return Object.assign(Object.assign({}, params), options);
749
- }
750
- }
751
- BbLocalize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BbLocalize, deps: [{ token: Localize, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
752
- BbLocalize.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: BbLocalize, name: "bbLocalize" });
753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BbLocalize, decorators: [{
754
- type: Pipe,
755
- args: [{
756
- name: 'bbLocalize'
757
- }]
758
- }], ctorParameters: function () {
759
- return [{ type: Localize, decorators: [{
760
- type: Optional
761
- }] }];
762
- } });
763
-
764
- class LocalizeModule {
765
- static forRoot(config) {
766
- var _a, _b, _c;
767
- if (((_a = config === null || config === void 0 ? void 0 : config.languages) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
768
- throw new Error('One or more languages should be supplied.');
769
- }
770
- if ((config === null || config === void 0 ? void 0 : config.compareDictionaries) && (config === null || config === void 0 ? void 0 : config.mode) === 'manual') {
771
- (_b = console === null || console === void 0 ? void 0 : console.warn) === null || _b === void 0 ? void 0 : _b.call(console, 'You cannot enable "compareDictionaries" when having mode set to "manual"; This setting will be ignored.');
772
- }
773
- const mode = (_c = config === null || config === void 0 ? void 0 : config.mode) !== null && _c !== void 0 ? _c : 'automatic';
774
- return {
775
- ngModule: LocalizeModule,
776
- providers: [
777
- // Angular providers.
778
- ...(mode === 'automatic' ? [
779
- { provide: APP_INITIALIZER, deps: [Localize], useFactory: initializeLocale, multi: true },
780
- { provide: LOCALE_ID, deps: [Localize], useFactory: getLocale }
781
- ] : []),
782
- // Config provider.
783
- { provide: LocalizeConfig, useValue: config },
784
- // Function providers.
785
- { provide: LOCALIZE_FUNCTION, useClass: LocalizeLowercaseFunction, multi: true },
786
- { provide: LOCALIZE_FUNCTION, useClass: LocalizeUppercaseFunction, multi: true },
787
- { provide: LOCALIZE_FUNCTION, useClass: LocalizeDateFunction, multi: true },
788
- // Transform providers.
789
- { provide: LOCALIZE_TRANSFORM, useClass: LocalizeReferenceTransform, deps: [LocalizeConfig], multi: true },
790
- { provide: LOCALIZE_TRANSFORM, useClass: LocalizeInterpolateTransform, deps: [LocalizeConfig, LOCALIZE_FUNCTION], multi: true },
791
- // Handler providers.
792
- { provide: LocalizeMissingHandler, useClass: LocalizeMissingHandler },
793
- // Service providers.
794
- Localize
795
- ]
796
- };
797
- }
798
- }
799
- LocalizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LocalizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
800
- LocalizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: LocalizeModule, declarations: [BbLocalize,
801
- BbLocalizeString,
802
- BbLocalizeTemplate], imports: [CommonModule, UtilsModule], exports: [BbLocalize,
803
- BbLocalizeString,
804
- BbLocalizeTemplate] });
805
- LocalizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LocalizeModule, imports: [CommonModule, UtilsModule] });
806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LocalizeModule, decorators: [{
807
- type: NgModule,
808
- args: [{
809
- imports: [CommonModule, UtilsModule],
810
- declarations: [
811
- BbLocalize,
812
- BbLocalizeString,
813
- BbLocalizeTemplate
814
- ],
815
- exports: [
816
- BbLocalize,
817
- BbLocalizeString,
818
- BbLocalizeTemplate
819
- ]
820
- }]
821
- }] });
822
- function initializeLocale(localize) {
823
- return localize.initialize();
824
- }
825
- function getLocale(localize) {
826
- var _a, _b;
827
- return (_b = (_a = localize === null || localize === void 0 ? void 0 : localize.current) === null || _a === void 0 ? void 0 : _a.locale) !== null && _b !== void 0 ? _b : null;
828
- }
829
-
830
- /**
831
- * Generated bundle index. Do not edit.
832
- */
833
-
834
- export { BbLocalize, BbLocalizeString, BbLocalizeTemplate, LOCALIZE_FUNCTION, LOCALIZE_ID, LOCALIZE_TRANSFORM, Localize, LocalizeConfig, LocalizeDateFunction, LocalizeDictionary, LocalizeDictionaryContext, LocalizeDictionaryData, LocalizeInterpolateTransform, LocalizeLowercaseFunction, LocalizeMissingHandler, LocalizeModule, LocalizeReferenceTransform, LocalizeTransform, LocalizeUppercaseFunction, extraDutchDictionary, extraEnglishDictionary, getLocale, initializeLocale };
835
- //# sourceMappingURL=bravobit-bb-foundation-localize.mjs.map