@bravobit/bb-foundation 0.14.3 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/README.md +47 -47
  2. package/auth/bravobit-bb-foundation-auth.d.ts +5 -5
  3. package/auth/lib/auth.interceptor.d.ts +21 -21
  4. package/auth/lib/auth.module.d.ts +15 -15
  5. package/auth/lib/auth.service.d.ts +59 -59
  6. package/auth/lib/auth.session.d.ts +34 -34
  7. package/auth/lib/directives/authenticated.directive.d.ts +14 -14
  8. package/auth/lib/directives/permission.directive.d.ts +24 -24
  9. package/auth/lib/directives/role.directive.d.ts +16 -16
  10. package/auth/lib/guards/anonymous.guard.d.ts +11 -11
  11. package/auth/lib/guards/authenticated.guard.d.ts +11 -11
  12. package/auth/lib/helpers/jwt.helper.d.ts +8 -8
  13. package/auth/lib/helpers/mapper.helper.d.ts +23 -23
  14. package/auth/lib/interfaces/config.interface.d.ts +12 -12
  15. package/auth/lib/interfaces/mapper.interface.d.ts +19 -19
  16. package/auth/lib/interfaces/provider.interface.d.ts +16 -16
  17. package/auth/lib/interfaces/token.interface.d.ts +11 -11
  18. package/auth/lib/permissions.service.d.ts +14 -14
  19. package/auth/lib/providers/email.provider.d.ts +15 -15
  20. package/auth/lib/providers/verify.provider.d.ts +13 -13
  21. package/auth/lib/tokens/use-authorization.token.d.ts +2 -2
  22. package/auth/public_api.d.ts +18 -18
  23. package/bravobit-bb-foundation.d.ts +5 -5
  24. package/bundles/bravobit-bb-foundation-auth.umd.js +1400 -1402
  25. package/bundles/bravobit-bb-foundation-auth.umd.js.map +1 -1
  26. package/bundles/bravobit-bb-foundation-collections.umd.js +868 -0
  27. package/bundles/bravobit-bb-foundation-collections.umd.js.map +1 -0
  28. package/bundles/bravobit-bb-foundation-dashboard.umd.js +817 -819
  29. package/bundles/bravobit-bb-foundation-dashboard.umd.js.map +1 -1
  30. package/bundles/bravobit-bb-foundation-dialog.umd.js +649 -651
  31. package/bundles/bravobit-bb-foundation-dialog.umd.js.map +1 -1
  32. package/bundles/bravobit-bb-foundation-elements.umd.js +2651 -2653
  33. package/bundles/bravobit-bb-foundation-elements.umd.js.map +1 -1
  34. package/bundles/bravobit-bb-foundation-http.umd.js +488 -490
  35. package/bundles/bravobit-bb-foundation-http.umd.js.map +1 -1
  36. package/bundles/bravobit-bb-foundation-localize.umd.js +1208 -1210
  37. package/bundles/bravobit-bb-foundation-localize.umd.js.map +1 -1
  38. package/bundles/bravobit-bb-foundation-notifications.umd.js +743 -745
  39. package/bundles/bravobit-bb-foundation-notifications.umd.js.map +1 -1
  40. package/bundles/bravobit-bb-foundation-recaptcha.umd.js +640 -642
  41. package/bundles/bravobit-bb-foundation-recaptcha.umd.js.map +1 -1
  42. package/bundles/bravobit-bb-foundation-rxjs.umd.js +13 -13
  43. package/bundles/bravobit-bb-foundation-rxjs.umd.js.map +1 -1
  44. package/bundles/bravobit-bb-foundation-storage.umd.js +756 -758
  45. package/bundles/bravobit-bb-foundation-storage.umd.js.map +1 -1
  46. package/bundles/bravobit-bb-foundation-table.umd.js +993 -995
  47. package/bundles/bravobit-bb-foundation-table.umd.js.map +1 -1
  48. package/bundles/bravobit-bb-foundation.umd.js +1332 -1334
  49. package/bundles/bravobit-bb-foundation.umd.js.map +1 -1
  50. package/collections/bravobit-bb-foundation-collections.d.ts +5 -0
  51. package/collections/lib/collection.d.ts +43 -0
  52. package/collections/lib/collections.module.d.ts +10 -0
  53. package/collections/lib/components/collections-pager/collections-pager.component.d.ts +34 -0
  54. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +12 -0
  55. package/collections/lib/components/collections.directive.d.ts +17 -0
  56. package/collections/lib/interfaces/collection.interface.d.ts +26 -0
  57. package/collections/lib/providers/api-collection.provider.d.ts +15 -0
  58. package/collections/lib/providers/collection.provider.d.ts +6 -0
  59. package/collections/lib/providers/local-collection.provider.d.ts +8 -0
  60. package/collections/package.json +10 -0
  61. package/collections/public_api.d.ts +9 -0
  62. package/dashboard/bravobit-bb-foundation-dashboard.d.ts +5 -5
  63. package/dashboard/lib/dashboard/dashboard.component.d.ts +19 -19
  64. package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +11 -11
  65. package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +9 -9
  66. package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +11 -11
  67. package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +21 -21
  68. package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +27 -27
  69. package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +16 -16
  70. package/dashboard/lib/dashboard.module.d.ts +16 -16
  71. package/dashboard/public_api.d.ts +8 -8
  72. package/dialog/bravobit-bb-foundation-dialog.d.ts +5 -5
  73. package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +5 -5
  74. package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +16 -16
  75. package/dialog/lib/dialog-container/dialog-container.component.d.ts +24 -24
  76. package/dialog/lib/dialog-header/dialog-header.component.d.ts +9 -9
  77. package/dialog/lib/dialog-link/dialog-link.component.d.ts +5 -5
  78. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +12 -12
  79. package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +22 -22
  80. package/dialog/lib/dialog.injector.d.ts +8 -8
  81. package/dialog/lib/dialog.insertion.d.ts +8 -8
  82. package/dialog/lib/dialog.interfaces.d.ts +3 -3
  83. package/dialog/lib/dialog.module.d.ts +19 -19
  84. package/dialog/lib/dialog.ref.d.ts +8 -8
  85. package/dialog/lib/dialog.service.d.ts +19 -19
  86. package/dialog/public_api.d.ts +9 -9
  87. package/elements/bravobit-bb-foundation-elements.d.ts +5 -5
  88. package/elements/lib/avatar/avatar.component.d.ts +25 -25
  89. package/elements/lib/button/button.component.d.ts +23 -23
  90. package/elements/lib/checkbox/checkbox.component.d.ts +27 -27
  91. package/elements/lib/date-picker/date-picker.component.d.ts +69 -69
  92. package/elements/lib/directives/addon.directive.d.ts +9 -9
  93. package/elements/lib/directives/autosize.directive.d.ts +18 -18
  94. package/elements/lib/directives/focus-trap.directive.d.ts +17 -17
  95. package/elements/lib/directives/focus.directive.d.ts +14 -14
  96. package/elements/lib/directives/form-submit.directive.d.ts +17 -17
  97. package/elements/lib/directives/input.directive.d.ts +38 -38
  98. package/elements/lib/directives/template.directive.d.ts +10 -10
  99. package/elements/lib/dropdown/dropdown.component.d.ts +21 -21
  100. package/elements/lib/elements.interfaces.d.ts +25 -25
  101. package/elements/lib/elements.module.d.ts +116 -116
  102. package/elements/lib/file-picker/file-picker.component.d.ts +49 -49
  103. package/elements/lib/form-control/form-control.component.d.ts +21 -21
  104. package/elements/lib/form-error/form-error.component.d.ts +29 -29
  105. package/elements/lib/form-group/form-group.component.d.ts +10 -10
  106. package/elements/lib/icon/icon.component.d.ts +22 -22
  107. package/elements/lib/image-picker/image-picker.component.d.ts +38 -38
  108. package/elements/lib/pipes/file-image.pipe.d.ts +13 -13
  109. package/elements/lib/pipes/file-size.pipe.d.ts +8 -8
  110. package/elements/lib/pipes/relative-time.pipe.d.ts +19 -19
  111. package/elements/lib/spinner/spinner.component.d.ts +12 -12
  112. package/elements/lib/tag/tag.component.d.ts +7 -7
  113. package/elements/public_api.d.ts +25 -25
  114. package/esm2015/auth/bravobit-bb-foundation-auth.js +4 -4
  115. package/esm2015/auth/lib/auth.interceptor.js +95 -95
  116. package/esm2015/auth/lib/auth.module.js +54 -54
  117. package/esm2015/auth/lib/auth.service.js +299 -299
  118. package/esm2015/auth/lib/auth.session.js +136 -136
  119. package/esm2015/auth/lib/directives/authenticated.directive.js +32 -32
  120. package/esm2015/auth/lib/directives/permission.directive.js +81 -81
  121. package/esm2015/auth/lib/directives/role.directive.js +38 -38
  122. package/esm2015/auth/lib/guards/anonymous.guard.js +35 -35
  123. package/esm2015/auth/lib/guards/authenticated.guard.js +36 -36
  124. package/esm2015/auth/lib/helpers/jwt.helper.js +69 -69
  125. package/esm2015/auth/lib/helpers/mapper.helper.js +35 -35
  126. package/esm2015/auth/lib/interfaces/config.interface.js +3 -3
  127. package/esm2015/auth/lib/interfaces/mapper.interface.js +2 -2
  128. package/esm2015/auth/lib/interfaces/provider.interface.js +2 -2
  129. package/esm2015/auth/lib/interfaces/token.interface.js +2 -2
  130. package/esm2015/auth/lib/permissions.service.js +58 -58
  131. package/esm2015/auth/lib/providers/email.provider.js +26 -26
  132. package/esm2015/auth/lib/providers/verify.provider.js +20 -20
  133. package/esm2015/auth/lib/tokens/use-authorization.token.js +3 -3
  134. package/esm2015/auth/public_api.js +19 -19
  135. package/esm2015/bravobit-bb-foundation.js +4 -4
  136. package/esm2015/collections/bravobit-bb-foundation-collections.js +5 -0
  137. package/esm2015/collections/lib/collection.js +104 -0
  138. package/esm2015/collections/lib/collections.module.js +54 -0
  139. package/esm2015/collections/lib/components/collections-pager/collections-pager.component.js +136 -0
  140. package/esm2015/collections/lib/components/collections-viewer/collections-viewer.component.js +39 -0
  141. package/esm2015/collections/lib/components/collections.directive.js +43 -0
  142. package/esm2015/collections/lib/interfaces/collection.interface.js +2 -0
  143. package/esm2015/collections/lib/providers/api-collection.provider.js +69 -0
  144. package/esm2015/collections/lib/providers/collection.provider.js +14 -0
  145. package/esm2015/collections/lib/providers/local-collection.provider.js +16 -0
  146. package/esm2015/collections/public_api.js +10 -0
  147. package/esm2015/dashboard/bravobit-bb-foundation-dashboard.js +4 -4
  148. package/esm2015/dashboard/lib/dashboard/dashboard.component.js +64 -64
  149. package/esm2015/dashboard/lib/dashboard-header/dashboard-header.component.js +41 -41
  150. package/esm2015/dashboard/lib/dashboard-menu/dashboard-menu.component.js +39 -39
  151. package/esm2015/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.js +38 -38
  152. package/esm2015/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.js +83 -83
  153. package/esm2015/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.js +110 -110
  154. package/esm2015/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.js +71 -71
  155. package/esm2015/dashboard/lib/dashboard.module.js +47 -47
  156. package/esm2015/dashboard/public_api.js +9 -9
  157. package/esm2015/dialog/bravobit-bb-foundation-dialog.js +4 -4
  158. package/esm2015/dialog/lib/dialog-actions/dialog-actions.component.js +20 -20
  159. package/esm2015/dialog/lib/dialog-confirm/dialog-confirm.component.js +45 -45
  160. package/esm2015/dialog/lib/dialog-container/dialog-container.component.js +162 -162
  161. package/esm2015/dialog/lib/dialog-header/dialog-header.component.js +33 -33
  162. package/esm2015/dialog/lib/dialog-link/dialog-link.component.js +19 -19
  163. package/esm2015/dialog/lib/dialog-modal/dialog-modal.component.js +54 -54
  164. package/esm2015/dialog/lib/dialog-overlay/dialog-overlay.component.js +143 -143
  165. package/esm2015/dialog/lib/dialog.injector.js +18 -18
  166. package/esm2015/dialog/lib/dialog.insertion.js +16 -16
  167. package/esm2015/dialog/lib/dialog.interfaces.js +3 -3
  168. package/esm2015/dialog/lib/dialog.module.js +74 -74
  169. package/esm2015/dialog/lib/dialog.ref.js +22 -22
  170. package/esm2015/dialog/lib/dialog.service.js +77 -77
  171. package/esm2015/dialog/public_api.js +10 -10
  172. package/esm2015/elements/bravobit-bb-foundation-elements.js +4 -4
  173. package/esm2015/elements/lib/avatar/avatar.component.js +151 -151
  174. package/esm2015/elements/lib/button/button.component.js +79 -79
  175. package/esm2015/elements/lib/checkbox/checkbox.component.js +83 -83
  176. package/esm2015/elements/lib/date-picker/date-picker.component.js +322 -322
  177. package/esm2015/elements/lib/directives/addon.directive.js +29 -29
  178. package/esm2015/elements/lib/directives/autosize.directive.js +74 -74
  179. package/esm2015/elements/lib/directives/focus-trap.directive.js +77 -77
  180. package/esm2015/elements/lib/directives/focus.directive.js +39 -39
  181. package/esm2015/elements/lib/directives/form-submit.directive.js +53 -53
  182. package/esm2015/elements/lib/directives/input.directive.js +139 -139
  183. package/esm2015/elements/lib/directives/template.directive.js +28 -28
  184. package/esm2015/elements/lib/dropdown/dropdown.component.js +111 -111
  185. package/esm2015/elements/lib/elements.interfaces.js +4 -4
  186. package/esm2015/elements/lib/elements.module.js +177 -177
  187. package/esm2015/elements/lib/file-picker/file-picker.component.js +247 -247
  188. package/esm2015/elements/lib/form-control/form-control.component.js +58 -58
  189. package/esm2015/elements/lib/form-error/form-error.component.js +116 -116
  190. package/esm2015/elements/lib/form-group/form-group.component.js +27 -27
  191. package/esm2015/elements/lib/icon/icon.component.js +110 -110
  192. package/esm2015/elements/lib/image-picker/image-picker.component.js +119 -119
  193. package/esm2015/elements/lib/pipes/file-image.pipe.js +45 -45
  194. package/esm2015/elements/lib/pipes/file-size.pipe.js +28 -28
  195. package/esm2015/elements/lib/pipes/relative-time.pipe.js +96 -96
  196. package/esm2015/elements/lib/spinner/spinner.component.js +34 -34
  197. package/esm2015/elements/lib/tag/tag.component.js +26 -26
  198. package/esm2015/elements/public_api.js +26 -26
  199. package/esm2015/http/bravobit-bb-foundation-http.js +4 -4
  200. package/esm2015/http/lib/classes/http.config.js +31 -31
  201. package/esm2015/http/lib/classes/http.error.js +21 -21
  202. package/esm2015/http/lib/http.interfaces.js +2 -2
  203. package/esm2015/http/lib/http.module.js +43 -43
  204. package/esm2015/http/lib/interceptors/base-url.interceptor.js +52 -52
  205. package/esm2015/http/lib/interceptors/error.interceptor.js +33 -33
  206. package/esm2015/http/public_api.js +7 -7
  207. package/esm2015/lib/core/coercions/boolean-coercion.js +4 -4
  208. package/esm2015/lib/core/miscellaneous/regex.js +5 -5
  209. package/esm2015/lib/core/miscellaneous/validator.js +86 -86
  210. package/esm2015/lib/core/mixins/can-disable.js +16 -16
  211. package/esm2015/lib/core/mixins/can-hide-errors.js +16 -16
  212. package/esm2015/lib/core/mixins/can-load.js +16 -16
  213. package/esm2015/lib/core/mixins/constructor.js +2 -2
  214. package/esm2015/lib/core/mixins/has-error.js +16 -16
  215. package/esm2015/lib/core/mixins/is-focused.js +16 -16
  216. package/esm2015/lib/core/mixins/is-grouped.js +16 -16
  217. package/esm2015/lib/core/mixins/is-readonly.js +16 -16
  218. package/esm2015/lib/core/mixins/is-required.js +16 -16
  219. package/esm2015/lib/core/services/clipboard.service.js +72 -72
  220. package/esm2015/lib/core/services/exif.service.js +168 -168
  221. package/esm2015/lib/core/services/file-loader.service.js +90 -90
  222. package/esm2015/lib/core/services/image-converter.service.js +130 -130
  223. package/esm2015/lib/core/services/languages.service.js +74 -74
  224. package/esm2015/lib/core/services/network.service.js +56 -56
  225. package/esm2015/lib/core/services/patch.service.js +65 -65
  226. package/esm2015/lib/core/services/platform.service.js +42 -42
  227. package/esm2015/lib/core/tokens/accept-language.token.js +3 -3
  228. package/esm2015/lib/core/tokens/base-url.token.js +3 -3
  229. package/esm2015/lib/core/tokens/cookie.token.js +3 -3
  230. package/esm2015/lib/core/tokens/location.token.js +6 -6
  231. package/esm2015/lib/core/tokens/navigator.token.js +6 -6
  232. package/esm2015/lib/core/tokens/window.token.js +12 -12
  233. package/esm2015/localize/bravobit-bb-foundation-localize.js +4 -4
  234. package/esm2015/localize/lib/functions/date.function.js +18 -18
  235. package/esm2015/localize/lib/functions/lowercase.function.js +13 -13
  236. package/esm2015/localize/lib/functions/uppercase.function.js +13 -13
  237. package/esm2015/localize/lib/handlers/missing.handler.js +17 -17
  238. package/esm2015/localize/lib/interfaces/config.interfaces.js +10 -10
  239. package/esm2015/localize/lib/interfaces/dictionary.interfaces.js +8 -8
  240. package/esm2015/localize/lib/interfaces/functions.interfaces.js +8 -8
  241. package/esm2015/localize/lib/interfaces/handlers.interfaces.js +2 -2
  242. package/esm2015/localize/lib/interfaces/options.interfaces.js +6 -6
  243. package/esm2015/localize/lib/localizations/dutch.localization.js +53 -53
  244. package/esm2015/localize/lib/localizations/english.localization.js +53 -53
  245. package/esm2015/localize/lib/localize.dictionary.js +137 -137
  246. package/esm2015/localize/lib/localize.module.js +69 -69
  247. package/esm2015/localize/lib/localize.pipe.js +49 -49
  248. package/esm2015/localize/lib/localize.service.js +282 -282
  249. package/esm2015/localize/lib/views/localize-string/localize-string.component.js +99 -99
  250. package/esm2015/localize/lib/views/localize-template-or-string.directive.js +28 -28
  251. package/esm2015/localize/lib/views/localize-template.directive.js +21 -21
  252. package/esm2015/localize/public_api.js +18 -18
  253. package/esm2015/notifications/bravobit-bb-foundation-notifications.js +4 -4
  254. package/esm2015/notifications/lib/notifications-item/notifications-item.component.js +108 -108
  255. package/esm2015/notifications/lib/notifications-list/notifications-list.component.js +56 -56
  256. package/esm2015/notifications/lib/notifications.animations.js +28 -28
  257. package/esm2015/notifications/lib/notifications.injector.js +18 -18
  258. package/esm2015/notifications/lib/notifications.interfaces.js +20 -20
  259. package/esm2015/notifications/lib/notifications.module.js +31 -31
  260. package/esm2015/notifications/lib/notifications.service.js +145 -145
  261. package/esm2015/notifications/public_api.js +4 -4
  262. package/esm2015/public_api.js +30 -30
  263. package/esm2015/recaptcha/bravobit-bb-foundation-recaptcha.js +4 -4
  264. package/esm2015/recaptcha/lib/recaptcha/recaptcha.component.js +199 -199
  265. package/esm2015/recaptcha/lib/recaptcha-loader.service.js +93 -93
  266. package/esm2015/recaptcha/lib/recaptcha.interface.js +3 -3
  267. package/esm2015/recaptcha/lib/recaptcha.module.js +27 -27
  268. package/esm2015/recaptcha/public_api.js +5 -5
  269. package/esm2015/rxjs/bravobit-bb-foundation-rxjs.js +4 -4
  270. package/esm2015/rxjs/lib/operators/combine-latest-map.operator.js +7 -7
  271. package/esm2015/rxjs/lib/operators/filter-nil.operator.js +5 -5
  272. package/esm2015/rxjs/public_api.js +3 -3
  273. package/esm2015/storage/bravobit-bb-foundation-storage.js +4 -4
  274. package/esm2015/storage/lib/interfaces/attributes.interface.js +2 -2
  275. package/esm2015/storage/lib/interfaces/memory.interface.js +2 -2
  276. package/esm2015/storage/lib/interfaces/strategy.interface.js +2 -2
  277. package/esm2015/storage/lib/storage.service.js +111 -111
  278. package/esm2015/storage/lib/strategies/cookie-storage.strategy.js +143 -143
  279. package/esm2015/storage/lib/strategies/memory-storage.strategy.js +56 -56
  280. package/esm2015/storage/lib/strategies/polyfill-storage.strategy.js +102 -102
  281. package/esm2015/storage/public_api.js +8 -8
  282. package/esm2015/table/bravobit-bb-foundation-table.js +4 -4
  283. package/esm2015/table/lib/components/table/table.component.js +183 -183
  284. package/esm2015/table/lib/components/table-cell/table-cell.component.js +19 -19
  285. package/esm2015/table/lib/components/table-header-cell/table-header-cell.component.js +141 -141
  286. package/esm2015/table/lib/components/table-pager/table-pager.component.js +146 -146
  287. package/esm2015/table/lib/data/datasource.data.js +32 -32
  288. package/esm2015/table/lib/data/generic.data.js +73 -73
  289. package/esm2015/table/lib/interfaces/datasource.interface.js +2 -2
  290. package/esm2015/table/lib/interfaces/table.interfaces.js +2 -2
  291. package/esm2015/table/lib/table.module.js +39 -39
  292. package/esm2015/table/public_api.js +10 -10
  293. package/fesm2015/bravobit-bb-foundation-auth.js +915 -915
  294. package/fesm2015/bravobit-bb-foundation-auth.js.map +1 -1
  295. package/fesm2015/bravobit-bb-foundation-collections.js +463 -0
  296. package/fesm2015/bravobit-bb-foundation-collections.js.map +1 -0
  297. package/fesm2015/bravobit-bb-foundation-dashboard.js +434 -434
  298. package/fesm2015/bravobit-bb-foundation-dashboard.js.map +1 -1
  299. package/fesm2015/bravobit-bb-foundation-dialog.js +603 -603
  300. package/fesm2015/bravobit-bb-foundation-dialog.js.map +1 -1
  301. package/fesm2015/bravobit-bb-foundation-elements.js +2076 -2076
  302. package/fesm2015/bravobit-bb-foundation-elements.js.map +1 -1
  303. package/fesm2015/bravobit-bb-foundation-http.js +154 -154
  304. package/fesm2015/bravobit-bb-foundation-http.js.map +1 -1
  305. package/fesm2015/bravobit-bb-foundation-localize.js +796 -796
  306. package/fesm2015/bravobit-bb-foundation-localize.js.map +1 -1
  307. package/fesm2015/bravobit-bb-foundation-notifications.js +364 -364
  308. package/fesm2015/bravobit-bb-foundation-notifications.js.map +1 -1
  309. package/fesm2015/bravobit-bb-foundation-recaptcha.js +297 -297
  310. package/fesm2015/bravobit-bb-foundation-recaptcha.js.map +1 -1
  311. package/fesm2015/bravobit-bb-foundation-rxjs.js +7 -7
  312. package/fesm2015/bravobit-bb-foundation-rxjs.js.map +1 -1
  313. package/fesm2015/bravobit-bb-foundation-storage.js +399 -399
  314. package/fesm2015/bravobit-bb-foundation-storage.js.map +1 -1
  315. package/fesm2015/bravobit-bb-foundation-table.js +578 -578
  316. package/fesm2015/bravobit-bb-foundation-table.js.map +1 -1
  317. package/fesm2015/bravobit-bb-foundation.js +851 -851
  318. package/fesm2015/bravobit-bb-foundation.js.map +1 -1
  319. package/http/bravobit-bb-foundation-http.d.ts +5 -5
  320. package/http/lib/classes/http.config.d.ts +9 -9
  321. package/http/lib/classes/http.error.d.ts +7 -7
  322. package/http/lib/http.interfaces.d.ts +12 -12
  323. package/http/lib/http.module.d.ts +15 -15
  324. package/http/lib/interceptors/base-url.interceptor.d.ts +15 -15
  325. package/http/lib/interceptors/error.interceptor.d.ts +11 -11
  326. package/http/public_api.d.ts +6 -6
  327. package/lib/core/coercions/boolean-coercion.d.ts +1 -1
  328. package/lib/core/miscellaneous/regex.d.ts +4 -4
  329. package/lib/core/miscellaneous/validator.d.ts +13 -13
  330. package/lib/core/mixins/can-disable.d.ts +6 -6
  331. package/lib/core/mixins/can-hide-errors.d.ts +6 -6
  332. package/lib/core/mixins/can-load.d.ts +6 -6
  333. package/lib/core/mixins/constructor.d.ts +1 -1
  334. package/lib/core/mixins/has-error.d.ts +6 -6
  335. package/lib/core/mixins/is-focused.d.ts +6 -6
  336. package/lib/core/mixins/is-grouped.d.ts +6 -6
  337. package/lib/core/mixins/is-readonly.d.ts +6 -6
  338. package/lib/core/mixins/is-required.d.ts +6 -6
  339. package/lib/core/services/clipboard.service.d.ts +18 -18
  340. package/lib/core/services/exif.service.d.ts +15 -15
  341. package/lib/core/services/file-loader.service.d.ts +13 -13
  342. package/lib/core/services/image-converter.service.d.ts +21 -21
  343. package/lib/core/services/languages.service.d.ts +16 -16
  344. package/lib/core/services/network.service.d.ts +14 -14
  345. package/lib/core/services/patch.service.d.ts +16 -16
  346. package/lib/core/services/platform.service.d.ts +18 -18
  347. package/lib/core/tokens/accept-language.token.d.ts +2 -2
  348. package/lib/core/tokens/base-url.token.d.ts +2 -2
  349. package/lib/core/tokens/cookie.token.d.ts +2 -2
  350. package/lib/core/tokens/location.token.d.ts +2 -2
  351. package/lib/core/tokens/navigator.token.d.ts +2 -2
  352. package/lib/core/tokens/window.token.d.ts +2 -2
  353. package/localize/bravobit-bb-foundation-localize.d.ts +5 -5
  354. package/localize/lib/functions/date.function.d.ts +5 -5
  355. package/localize/lib/functions/lowercase.function.d.ts +5 -5
  356. package/localize/lib/functions/uppercase.function.d.ts +5 -5
  357. package/localize/lib/handlers/missing.handler.d.ts +6 -6
  358. package/localize/lib/interfaces/config.interfaces.d.ts +8 -8
  359. package/localize/lib/interfaces/dictionary.interfaces.d.ts +12 -12
  360. package/localize/lib/interfaces/functions.interfaces.d.ts +9 -9
  361. package/localize/lib/interfaces/handlers.interfaces.d.ts +6 -6
  362. package/localize/lib/interfaces/options.interfaces.d.ts +10 -10
  363. package/localize/lib/localizations/dutch.localization.d.ts +51 -51
  364. package/localize/lib/localizations/english.localization.d.ts +51 -51
  365. package/localize/lib/localize.dictionary.d.ts +24 -24
  366. package/localize/lib/localize.module.d.ts +18 -18
  367. package/localize/lib/localize.pipe.d.ts +12 -12
  368. package/localize/lib/localize.service.d.ts +51 -51
  369. package/localize/lib/views/localize-string/localize-string.component.d.ts +23 -23
  370. package/localize/lib/views/localize-template-or-string.directive.d.ts +10 -10
  371. package/localize/lib/views/localize-template.directive.d.ts +9 -9
  372. package/localize/public_api.d.ts +17 -17
  373. package/notifications/bravobit-bb-foundation-notifications.d.ts +5 -5
  374. package/notifications/lib/notifications-item/notifications-item.component.d.ts +34 -34
  375. package/notifications/lib/notifications-list/notifications-list.component.d.ts +16 -16
  376. package/notifications/lib/notifications.animations.d.ts +1 -1
  377. package/notifications/lib/notifications.injector.d.ts +8 -8
  378. package/notifications/lib/notifications.interfaces.d.ts +49 -49
  379. package/notifications/lib/notifications.module.d.ts +13 -13
  380. package/notifications/lib/notifications.service.d.ts +34 -34
  381. package/notifications/public_api.d.ts +3 -3
  382. package/package.json +5 -5
  383. package/public_api.d.ts +26 -26
  384. package/recaptcha/bravobit-bb-foundation-recaptcha.d.ts +5 -5
  385. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +47 -47
  386. package/recaptcha/lib/recaptcha-loader.service.d.ts +22 -22
  387. package/recaptcha/lib/recaptcha.interface.d.ts +14 -14
  388. package/recaptcha/lib/recaptcha.module.d.ts +10 -16
  389. package/recaptcha/public_api.d.ts +4 -4
  390. package/rxjs/bravobit-bb-foundation-rxjs.d.ts +5 -5
  391. package/rxjs/lib/operators/combine-latest-map.operator.d.ts +8 -8
  392. package/rxjs/lib/operators/filter-nil.operator.d.ts +1 -1
  393. package/rxjs/public_api.d.ts +2 -2
  394. package/storage/bravobit-bb-foundation-storage.d.ts +5 -5
  395. package/storage/lib/interfaces/attributes.interface.d.ts +13 -13
  396. package/storage/lib/interfaces/memory.interface.d.ts +7 -7
  397. package/storage/lib/interfaces/strategy.interface.d.ts +17 -17
  398. package/storage/lib/storage.service.d.ts +26 -26
  399. package/storage/lib/strategies/cookie-storage.strategy.d.ts +20 -20
  400. package/storage/lib/strategies/memory-storage.strategy.d.ts +11 -11
  401. package/storage/lib/strategies/polyfill-storage.strategy.d.ts +15 -15
  402. package/storage/public_api.d.ts +7 -7
  403. package/table/bravobit-bb-foundation-table.d.ts +5 -5
  404. package/table/lib/components/table/table.component.d.ts +48 -48
  405. package/table/lib/components/table-cell/table-cell.component.d.ts +5 -5
  406. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +29 -29
  407. package/table/lib/components/table-pager/table-pager.component.d.ts +41 -41
  408. package/table/lib/data/datasource.data.d.ts +14 -14
  409. package/table/lib/data/generic.data.d.ts +23 -23
  410. package/table/lib/interfaces/datasource.interface.d.ts +17 -17
  411. package/table/lib/interfaces/table.interfaces.d.ts +1 -1
  412. package/table/lib/table.module.d.ts +14 -14
  413. package/table/public_api.d.ts +9 -9
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs/operators'), require('rxjs'), require('@angular/platform-browser'), require('@bravobit/bb-foundation/auth'), require('@angular/common/http'), require('@bravobit/bb-foundation'), require('@bravobit/bb-foundation/storage')) :
3
3
  typeof define === 'function' && define.amd ? define('@bravobit/bb-foundation/localize', ['exports', '@angular/core', '@angular/common', 'rxjs/operators', 'rxjs', '@angular/platform-browser', '@bravobit/bb-foundation/auth', '@angular/common/http', '@bravobit/bb-foundation', '@bravobit/bb-foundation/storage'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravobit = global.bravobit || {}, global.bravobit['bb-foundation'] = global.bravobit['bb-foundation'] || {}, global.bravobit['bb-foundation'].localize = {}), global.ng.core, global.ng.common, global.rxjs.operators, global.rxjs, global.ng.platformBrowser, global.bravobit['bb-foundation'].auth, global.ng.common.http, global.bravobit['bb-foundation'], global.bravobit['bb-foundation'].storage));
5
- }(this, (function (exports, i0, i1, operators, rxjs, i4, auth, i1$1, i3, i2) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravobit = global.bravobit || {}, global.bravobit["bb-foundation"] = global.bravobit["bb-foundation"] || {}, global.bravobit["bb-foundation"].localize = {}), global.ng.core, global.ng.common, global.rxjs.operators, global.rxjs, global.ng.platformBrowser, global.bravobit["bb-foundation"].auth, global.ng.common.http, global.bravobit["bb-foundation"], global.bravobit["bb-foundation"].storage));
5
+ })(this, (function (exports, i0, i1, operators, rxjs, i4, auth, i1$1, i3, i2) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -13,14 +13,12 @@
13
13
  var d = Object.getOwnPropertyDescriptor(e, k);
14
14
  Object.defineProperty(n, k, d.get ? d : {
15
15
  enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
16
+ get: function () { return e[k]; }
19
17
  });
20
18
  }
21
19
  });
22
20
  }
23
- n['default'] = e;
21
+ n["default"] = e;
24
22
  return Object.freeze(n);
25
23
  }
26
24
 
@@ -31,1243 +29,1243 @@
31
29
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
30
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
33
31
 
34
- //
35
- // The configuration that can be passed when
36
- // the user initializes the localize module.
37
- //
38
- var LocalizeConfig = /** @class */ (function () {
39
- function LocalizeConfig() {
40
- this.dictionary = [];
41
- }
42
- return LocalizeConfig;
32
+ //
33
+ // The configuration that can be passed when
34
+ // the user initializes the localize module.
35
+ //
36
+ var LocalizeConfig = /** @class */ (function () {
37
+ function LocalizeConfig() {
38
+ this.dictionary = [];
39
+ }
40
+ return LocalizeConfig;
43
41
  }());
44
42
 
45
- //
46
- // This is the injection token that will be injected
47
- // into the service so that the all localize functions
48
- // can retrieved and used.
49
- //
43
+ //
44
+ // This is the injection token that will be injected
45
+ // into the service so that the all localize functions
46
+ // can retrieved and used.
47
+ //
50
48
  var LOCALIZE_FUNCTION = new i0.InjectionToken('localize_function');
51
49
 
52
- //
53
- // This is the injection token that will be injected
54
- // into the service so that the all extra dictionaries
55
- // can retrieved and used.
56
- //
50
+ //
51
+ // This is the injection token that will be injected
52
+ // into the service so that the all extra dictionaries
53
+ // can retrieved and used.
54
+ //
57
55
  var LOCALIZE_EXTRA_DICTIONARY = new i0.InjectionToken('localize_extra_dictionary');
58
56
 
59
- //
60
- // This function transform the value
61
- // to a lowercase variant of the value.
62
- //
63
- var LocalizeLowercaseFunction = /** @class */ (function () {
64
- function LocalizeLowercaseFunction() {
65
- }
66
- LocalizeLowercaseFunction.prototype.keyword = function () {
67
- return 'lowercase';
68
- };
69
- LocalizeLowercaseFunction.prototype.transform = function (value) {
70
- return (value || '').toLowerCase();
71
- };
72
- return LocalizeLowercaseFunction;
57
+ //
58
+ // This function transform the value
59
+ // to a lowercase variant of the value.
60
+ //
61
+ var LocalizeLowercaseFunction = /** @class */ (function () {
62
+ function LocalizeLowercaseFunction() {
63
+ }
64
+ LocalizeLowercaseFunction.prototype.keyword = function () {
65
+ return 'lowercase';
66
+ };
67
+ LocalizeLowercaseFunction.prototype.transform = function (value) {
68
+ return (value || '').toLowerCase();
69
+ };
70
+ return LocalizeLowercaseFunction;
73
71
  }());
74
72
 
75
- //
76
- // This function transform the value
77
- // to a uppercase variant of the value.
78
- //
79
- var LocalizeUppercaseFunction = /** @class */ (function () {
80
- function LocalizeUppercaseFunction() {
81
- }
82
- LocalizeUppercaseFunction.prototype.keyword = function () {
83
- return 'uppercase';
84
- };
85
- LocalizeUppercaseFunction.prototype.transform = function (value) {
86
- return (value || '').toUpperCase();
87
- };
88
- return LocalizeUppercaseFunction;
73
+ //
74
+ // This function transform the value
75
+ // to a uppercase variant of the value.
76
+ //
77
+ var LocalizeUppercaseFunction = /** @class */ (function () {
78
+ function LocalizeUppercaseFunction() {
79
+ }
80
+ LocalizeUppercaseFunction.prototype.keyword = function () {
81
+ return 'uppercase';
82
+ };
83
+ LocalizeUppercaseFunction.prototype.transform = function (value) {
84
+ return (value || '').toUpperCase();
85
+ };
86
+ return LocalizeUppercaseFunction;
89
87
  }());
90
88
 
91
- //
92
- // This function transform the value
93
- // to a localized date.
94
- //
95
- var LocalizeDateFunction = /** @class */ (function () {
96
- function LocalizeDateFunction() {
97
- }
98
- LocalizeDateFunction.prototype.keyword = function () {
99
- return 'date';
100
- };
101
- LocalizeDateFunction.prototype.transform = function (value, locale) {
102
- var date = new Date(value);
103
- if (date.toString() === 'Invalid Date') {
104
- return '?';
105
- }
106
- return i1.formatDate(date, 'longDate', locale);
107
- };
108
- return LocalizeDateFunction;
89
+ //
90
+ // This function transform the value
91
+ // to a localized date.
92
+ //
93
+ var LocalizeDateFunction = /** @class */ (function () {
94
+ function LocalizeDateFunction() {
95
+ }
96
+ LocalizeDateFunction.prototype.keyword = function () {
97
+ return 'date';
98
+ };
99
+ LocalizeDateFunction.prototype.transform = function (value, locale) {
100
+ var date = new Date(value);
101
+ if (date.toString() === 'Invalid Date') {
102
+ return '?';
103
+ }
104
+ return i1.formatDate(date, 'longDate', locale);
105
+ };
106
+ return LocalizeDateFunction;
109
107
  }());
110
108
 
111
- var LOCALIZATION_EXTRA_ENGLISH = {
112
- provide: LOCALIZE_EXTRA_DICTIONARY,
113
- useValue: {
114
- locale: 'en-US',
115
- data: {
116
- 'form-control-errors': {
117
- 'unknown': 'The field has an unknown error.',
118
- 'required': 'This field is required.',
119
- 'pattern': 'Invalid format.',
120
- 'email': 'The field does not match a valid email address.',
121
- 'emailTaken': 'The e-mail is already taken.',
122
- 'passwordMatch': 'The passwords don\'t match.',
123
- 'confirm': 'The field does not match.',
124
- 'fullNumber': 'The field should be a full number.',
125
- 'min': 'Minimum amount should be {{min}}.',
126
- 'max': 'Maximum amount should be {{max}}.',
127
- 'invalidFileType': 'The file type is not allowed.',
128
- 'maxFileSize': 'The file has exceed the maximum amount of {{maxSize}}.',
129
- 'minDate': 'The first accepted date is {{date|date}}.',
130
- 'maxDate': 'The last accepted date is {{date|date}}.',
131
- 'invalidDate': 'The field contains an invalid date.',
132
- 'minlength': 'Expected a minimum of {{requiredLength}} characters but got {{actualLength}} characters.',
133
- 'maxlength': 'Expected a maximum of {{requiredLength}} characters but got {{actualLength}} characters.'
134
- },
135
- 'tables': {
136
- 'search': 'Search...',
137
- 'loading': 'Loading...',
138
- 'empty': 'There is nothing to find here.',
139
- 'page': 'page',
140
- 'error_datasource': 'No data source was provided.',
141
- 'error_unauthorized': 'You need to be authenticated to view this data.',
142
- 'error_forbidden': 'You do not have access to view this data.',
143
- 'error_not_found': 'The data was not found.',
144
- 'error_server': 'A server error occurred while fetching data from the server.',
145
- 'error_down': 'It looks like the server is down.',
146
- 'error_unknown': 'A unknown error occurred.'
147
- },
148
- 'file-picker': {
149
- 'choose': 'Choose file',
150
- 'remove': 'Remove file',
151
- 'drop': 'or drag and drop file here'
152
- },
153
- 'times': {
154
- 'tomorrow_at': 'Tomorrow at {{date}}',
155
- 'today_at': 'Today at {{date}}',
156
- 'yesterday_at': 'Yesterday at {{date}}'
157
- }
158
- }
159
- },
160
- multi: true
109
+ var LOCALIZATION_EXTRA_ENGLISH = {
110
+ provide: LOCALIZE_EXTRA_DICTIONARY,
111
+ useValue: {
112
+ locale: 'en-US',
113
+ data: {
114
+ 'form-control-errors': {
115
+ 'unknown': 'The field has an unknown error.',
116
+ 'required': 'This field is required.',
117
+ 'pattern': 'Invalid format.',
118
+ 'email': 'The field does not match a valid email address.',
119
+ 'emailTaken': 'The e-mail is already taken.',
120
+ 'passwordMatch': 'The passwords don\'t match.',
121
+ 'confirm': 'The field does not match.',
122
+ 'fullNumber': 'The field should be a full number.',
123
+ 'min': 'Minimum amount should be {{min}}.',
124
+ 'max': 'Maximum amount should be {{max}}.',
125
+ 'invalidFileType': 'The file type is not allowed.',
126
+ 'maxFileSize': 'The file has exceed the maximum amount of {{maxSize}}.',
127
+ 'minDate': 'The first accepted date is {{date|date}}.',
128
+ 'maxDate': 'The last accepted date is {{date|date}}.',
129
+ 'invalidDate': 'The field contains an invalid date.',
130
+ 'minlength': 'Expected a minimum of {{requiredLength}} characters but got {{actualLength}} characters.',
131
+ 'maxlength': 'Expected a maximum of {{requiredLength}} characters but got {{actualLength}} characters.'
132
+ },
133
+ 'tables': {
134
+ 'search': 'Search...',
135
+ 'loading': 'Loading...',
136
+ 'empty': 'There is nothing to find here.',
137
+ 'page': 'page',
138
+ 'error_datasource': 'No data source was provided.',
139
+ 'error_unauthorized': 'You need to be authenticated to view this data.',
140
+ 'error_forbidden': 'You do not have access to view this data.',
141
+ 'error_not_found': 'The data was not found.',
142
+ 'error_server': 'A server error occurred while fetching data from the server.',
143
+ 'error_down': 'It looks like the server is down.',
144
+ 'error_unknown': 'A unknown error occurred.'
145
+ },
146
+ 'file-picker': {
147
+ 'choose': 'Choose file',
148
+ 'remove': 'Remove file',
149
+ 'drop': 'or drag and drop file here'
150
+ },
151
+ 'times': {
152
+ 'tomorrow_at': 'Tomorrow at {{date}}',
153
+ 'today_at': 'Today at {{date}}',
154
+ 'yesterday_at': 'Yesterday at {{date}}'
155
+ }
156
+ }
157
+ },
158
+ multi: true
161
159
  };
162
160
 
163
- var LOCALIZATION_EXTRA_DUTCH = {
164
- provide: LOCALIZE_EXTRA_DICTIONARY,
165
- useValue: {
166
- locale: 'nl-NL',
167
- data: {
168
- 'form-control-errors': {
169
- 'unknown': 'Het veld heeft een onbekende fout.',
170
- 'required': 'Dit veld is verplicht.',
171
- 'pattern': 'Ongeldig formaat.',
172
- 'email': 'Het veld komt niet overeen met een geldig e-mailadres.',
173
- 'emailTaken': 'Het e-mailadres is al bezet.',
174
- 'passwordMatch': 'De wachtwoorden komen niet overeen.',
175
- 'confirm': 'Het veld komt niet overeen.',
176
- 'fullNumber': 'Het veld moet een volledig getal zijn.',
177
- 'min': 'Minimum hoeveelheid moet {{min}} zijn.',
178
- 'max': 'Maximum hoeveelheid moet {{max}} zijn.',
179
- 'invalidFileType': 'Het type bestand is niet toegestaan.',
180
- 'maxFileSize': 'Het bestand heeft de maximum hoeveelheid van {{maxSize}} overschreden.',
181
- 'minDate': 'De eerst mogelijke datum is {{date|date}}.',
182
- 'maxDate': 'De laatst mogelijke datum is {{date|date}}.',
183
- 'invalidDate': 'Het veld bevat een ongeldige datum.',
184
- 'minlength': 'Verwachtte minimaal {{requiredLength}} tekens, maar kreeg {{actualLength}} tekens.',
185
- 'maxlength': 'Verwachtte maximaal {{requiredLength}} tekens, maar kreeg {{actualLength}} tekens.'
186
- },
187
- 'tables': {
188
- 'search': 'Zoeken...',
189
- 'loading': 'Aan het laden...',
190
- 'empty': 'Er is hier niets te vinden.',
191
- 'page': 'pagina',
192
- 'error_datasource': 'Er is geen gegevensbron verstrekt.',
193
- 'error_unauthorized': 'U moet ingelogd zijn om deze gegevens te bekijken.',
194
- 'error_forbidden': 'U hebt geen toegang om deze gegevens te bekijken.',
195
- 'error_not_found': 'De gegevens zijn niet gevonden.',
196
- 'error_server': 'Er is een serverfout opgetreden bij het ophalen van gegevens van de server.',
197
- 'error_down': 'Het lijkt erop dat de server down is.',
198
- 'error_unknown': 'Er is een onbekende fout opgetreden bij het ophalen van gegevens van de server.'
199
- },
200
- 'file-picker': {
201
- 'choose': 'Kies bestand',
202
- 'remove': 'Verwijder bestand',
203
- 'drop': 'of sleep het bestand hiernaartoe'
204
- },
205
- 'times': {
206
- 'tomorrow_at': 'Morgen om {{date}}',
207
- 'today_at': 'Vandaag om {{date}}',
208
- 'yesterday_at': 'Gisteren om {{date}}'
209
- }
210
- }
211
- },
212
- multi: true
161
+ var LOCALIZATION_EXTRA_DUTCH = {
162
+ provide: LOCALIZE_EXTRA_DICTIONARY,
163
+ useValue: {
164
+ locale: 'nl-NL',
165
+ data: {
166
+ 'form-control-errors': {
167
+ 'unknown': 'Het veld heeft een onbekende fout.',
168
+ 'required': 'Dit veld is verplicht.',
169
+ 'pattern': 'Ongeldig formaat.',
170
+ 'email': 'Het veld komt niet overeen met een geldig e-mailadres.',
171
+ 'emailTaken': 'Het e-mailadres is al bezet.',
172
+ 'passwordMatch': 'De wachtwoorden komen niet overeen.',
173
+ 'confirm': 'Het veld komt niet overeen.',
174
+ 'fullNumber': 'Het veld moet een volledig getal zijn.',
175
+ 'min': 'Minimum hoeveelheid moet {{min}} zijn.',
176
+ 'max': 'Maximum hoeveelheid moet {{max}} zijn.',
177
+ 'invalidFileType': 'Het type bestand is niet toegestaan.',
178
+ 'maxFileSize': 'Het bestand heeft de maximum hoeveelheid van {{maxSize}} overschreden.',
179
+ 'minDate': 'De eerst mogelijke datum is {{date|date}}.',
180
+ 'maxDate': 'De laatst mogelijke datum is {{date|date}}.',
181
+ 'invalidDate': 'Het veld bevat een ongeldige datum.',
182
+ 'minlength': 'Verwachtte minimaal {{requiredLength}} tekens, maar kreeg {{actualLength}} tekens.',
183
+ 'maxlength': 'Verwachtte maximaal {{requiredLength}} tekens, maar kreeg {{actualLength}} tekens.'
184
+ },
185
+ 'tables': {
186
+ 'search': 'Zoeken...',
187
+ 'loading': 'Aan het laden...',
188
+ 'empty': 'Er is hier niets te vinden.',
189
+ 'page': 'pagina',
190
+ 'error_datasource': 'Er is geen gegevensbron verstrekt.',
191
+ 'error_unauthorized': 'U moet ingelogd zijn om deze gegevens te bekijken.',
192
+ 'error_forbidden': 'U hebt geen toegang om deze gegevens te bekijken.',
193
+ 'error_not_found': 'De gegevens zijn niet gevonden.',
194
+ 'error_server': 'Er is een serverfout opgetreden bij het ophalen van gegevens van de server.',
195
+ 'error_down': 'Het lijkt erop dat de server down is.',
196
+ 'error_unknown': 'Er is een onbekende fout opgetreden bij het ophalen van gegevens van de server.'
197
+ },
198
+ 'file-picker': {
199
+ 'choose': 'Kies bestand',
200
+ 'remove': 'Verwijder bestand',
201
+ 'drop': 'of sleep het bestand hiernaartoe'
202
+ },
203
+ 'times': {
204
+ 'tomorrow_at': 'Morgen om {{date}}',
205
+ 'today_at': 'Vandaag om {{date}}',
206
+ 'yesterday_at': 'Gisteren om {{date}}'
207
+ }
208
+ }
209
+ },
210
+ multi: true
213
211
  };
214
212
 
215
- var LocalizeMissingHandler = /** @class */ (function () {
216
- function LocalizeMissingHandler() {
217
- this.log = function (message) {
218
- console && console.warn && console.warn(message);
219
- };
220
- }
221
- LocalizeMissingHandler.prototype.handle = function (params) {
222
- // Log to the console when the token was not found
223
- // if the user did not mark it as optional.
224
- if (!params.optional) {
225
- this.log("Localize: The token with name: \"" + params.token + "\" was not found.");
226
- }
227
- // Return the default token back.
228
- return params.token;
229
- };
230
- return LocalizeMissingHandler;
213
+ var LocalizeMissingHandler = /** @class */ (function () {
214
+ function LocalizeMissingHandler() {
215
+ this.log = function (message) {
216
+ console && console.warn && console.warn(message);
217
+ };
218
+ }
219
+ LocalizeMissingHandler.prototype.handle = function (params) {
220
+ // Log to the console when the token was not found
221
+ // if the user did not mark it as optional.
222
+ if (!params.optional) {
223
+ this.log("Localize: The token with name: \"" + params.token + "\" was not found.");
224
+ }
225
+ // Return the default token back.
226
+ return params.token;
227
+ };
228
+ return LocalizeMissingHandler;
231
229
  }());
232
230
 
233
- /*! *****************************************************************************
234
- Copyright (c) Microsoft Corporation.
235
-
236
- Permission to use, copy, modify, and/or distribute this software for any
237
- purpose with or without fee is hereby granted.
238
-
239
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
240
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
241
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
242
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
243
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
244
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
245
- PERFORMANCE OF THIS SOFTWARE.
246
- ***************************************************************************** */
247
- /* global Reflect, Promise */
248
- var extendStatics = function (d, b) {
249
- extendStatics = Object.setPrototypeOf ||
250
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
251
- function (d, b) { for (var p in b)
252
- if (Object.prototype.hasOwnProperty.call(b, p))
253
- d[p] = b[p]; };
254
- return extendStatics(d, b);
255
- };
256
- function __extends(d, b) {
257
- if (typeof b !== "function" && b !== null)
258
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
259
- extendStatics(d, b);
260
- function __() { this.constructor = d; }
261
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
262
- }
263
- var __assign = function () {
264
- __assign = Object.assign || function __assign(t) {
265
- for (var s, i = 1, n = arguments.length; i < n; i++) {
266
- s = arguments[i];
267
- for (var p in s)
268
- if (Object.prototype.hasOwnProperty.call(s, p))
269
- t[p] = s[p];
270
- }
271
- return t;
272
- };
273
- return __assign.apply(this, arguments);
274
- };
275
- function __rest(s, e) {
276
- var t = {};
277
- for (var p in s)
278
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
279
- t[p] = s[p];
280
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
281
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
282
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
283
- t[p[i]] = s[p[i]];
284
- }
285
- return t;
286
- }
287
- function __decorate(decorators, target, key, desc) {
288
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
289
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
290
- r = Reflect.decorate(decorators, target, key, desc);
291
- else
292
- for (var i = decorators.length - 1; i >= 0; i--)
293
- if (d = decorators[i])
294
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
295
- return c > 3 && r && Object.defineProperty(target, key, r), r;
296
- }
297
- function __param(paramIndex, decorator) {
298
- return function (target, key) { decorator(target, key, paramIndex); };
299
- }
300
- function __metadata(metadataKey, metadataValue) {
301
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
302
- return Reflect.metadata(metadataKey, metadataValue);
303
- }
304
- function __awaiter(thisArg, _arguments, P, generator) {
305
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
306
- return new (P || (P = Promise))(function (resolve, reject) {
307
- function fulfilled(value) { try {
308
- step(generator.next(value));
309
- }
310
- catch (e) {
311
- reject(e);
312
- } }
313
- function rejected(value) { try {
314
- step(generator["throw"](value));
315
- }
316
- catch (e) {
317
- reject(e);
318
- } }
319
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
320
- step((generator = generator.apply(thisArg, _arguments || [])).next());
321
- });
322
- }
323
- function __generator(thisArg, body) {
324
- var _ = { label: 0, sent: function () { if (t[0] & 1)
325
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
326
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
327
- function verb(n) { return function (v) { return step([n, v]); }; }
328
- function step(op) {
329
- if (f)
330
- throw new TypeError("Generator is already executing.");
331
- while (_)
332
- try {
333
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
334
- return t;
335
- if (y = 0, t)
336
- op = [op[0] & 2, t.value];
337
- switch (op[0]) {
338
- case 0:
339
- case 1:
340
- t = op;
341
- break;
342
- case 4:
343
- _.label++;
344
- return { value: op[1], done: false };
345
- case 5:
346
- _.label++;
347
- y = op[1];
348
- op = [0];
349
- continue;
350
- case 7:
351
- op = _.ops.pop();
352
- _.trys.pop();
353
- continue;
354
- default:
355
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
356
- _ = 0;
357
- continue;
358
- }
359
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
360
- _.label = op[1];
361
- break;
362
- }
363
- if (op[0] === 6 && _.label < t[1]) {
364
- _.label = t[1];
365
- t = op;
366
- break;
367
- }
368
- if (t && _.label < t[2]) {
369
- _.label = t[2];
370
- _.ops.push(op);
371
- break;
372
- }
373
- if (t[2])
374
- _.ops.pop();
375
- _.trys.pop();
376
- continue;
377
- }
378
- op = body.call(thisArg, _);
379
- }
380
- catch (e) {
381
- op = [6, e];
382
- y = 0;
383
- }
384
- finally {
385
- f = t = 0;
386
- }
387
- if (op[0] & 5)
388
- throw op[1];
389
- return { value: op[0] ? op[1] : void 0, done: true };
390
- }
391
- }
392
- var __createBinding = Object.create ? (function (o, m, k, k2) {
393
- if (k2 === undefined)
394
- k2 = k;
395
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
396
- }) : (function (o, m, k, k2) {
397
- if (k2 === undefined)
398
- k2 = k;
399
- o[k2] = m[k];
400
- });
401
- function __exportStar(m, o) {
402
- for (var p in m)
403
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
404
- __createBinding(o, m, p);
405
- }
406
- function __values(o) {
407
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
408
- if (m)
409
- return m.call(o);
410
- if (o && typeof o.length === "number")
411
- return {
412
- next: function () {
413
- if (o && i >= o.length)
414
- o = void 0;
415
- return { value: o && o[i++], done: !o };
416
- }
417
- };
418
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
419
- }
420
- function __read(o, n) {
421
- var m = typeof Symbol === "function" && o[Symbol.iterator];
422
- if (!m)
423
- return o;
424
- var i = m.call(o), r, ar = [], e;
425
- try {
426
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
427
- ar.push(r.value);
428
- }
429
- catch (error) {
430
- e = { error: error };
431
- }
432
- finally {
433
- try {
434
- if (r && !r.done && (m = i["return"]))
435
- m.call(i);
436
- }
437
- finally {
438
- if (e)
439
- throw e.error;
440
- }
441
- }
442
- return ar;
443
- }
444
- /** @deprecated */
445
- function __spread() {
446
- for (var ar = [], i = 0; i < arguments.length; i++)
447
- ar = ar.concat(__read(arguments[i]));
448
- return ar;
449
- }
450
- /** @deprecated */
451
- function __spreadArrays() {
452
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
453
- s += arguments[i].length;
454
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
455
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
456
- r[k] = a[j];
457
- return r;
458
- }
459
- function __spreadArray(to, from, pack) {
460
- if (pack || arguments.length === 2)
461
- for (var i = 0, l = from.length, ar; i < l; i++) {
462
- if (ar || !(i in from)) {
463
- if (!ar)
464
- ar = Array.prototype.slice.call(from, 0, i);
465
- ar[i] = from[i];
466
- }
467
- }
468
- return to.concat(ar || from);
469
- }
470
- function __await(v) {
471
- return this instanceof __await ? (this.v = v, this) : new __await(v);
472
- }
473
- function __asyncGenerator(thisArg, _arguments, generator) {
474
- if (!Symbol.asyncIterator)
475
- throw new TypeError("Symbol.asyncIterator is not defined.");
476
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
477
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
478
- function verb(n) { if (g[n])
479
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
480
- function resume(n, v) { try {
481
- step(g[n](v));
482
- }
483
- catch (e) {
484
- settle(q[0][3], e);
485
- } }
486
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
487
- function fulfill(value) { resume("next", value); }
488
- function reject(value) { resume("throw", value); }
489
- function settle(f, v) { if (f(v), q.shift(), q.length)
490
- resume(q[0][0], q[0][1]); }
491
- }
492
- function __asyncDelegator(o) {
493
- var i, p;
494
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
495
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
496
- }
497
- function __asyncValues(o) {
498
- if (!Symbol.asyncIterator)
499
- throw new TypeError("Symbol.asyncIterator is not defined.");
500
- var m = o[Symbol.asyncIterator], i;
501
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
502
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
503
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
504
- }
505
- function __makeTemplateObject(cooked, raw) {
506
- if (Object.defineProperty) {
507
- Object.defineProperty(cooked, "raw", { value: raw });
508
- }
509
- else {
510
- cooked.raw = raw;
511
- }
512
- return cooked;
513
- }
514
- ;
515
- var __setModuleDefault = Object.create ? (function (o, v) {
516
- Object.defineProperty(o, "default", { enumerable: true, value: v });
517
- }) : function (o, v) {
518
- o["default"] = v;
519
- };
520
- function __importStar(mod) {
521
- if (mod && mod.__esModule)
522
- return mod;
523
- var result = {};
524
- if (mod != null)
525
- for (var k in mod)
526
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
527
- __createBinding(result, mod, k);
528
- __setModuleDefault(result, mod);
529
- return result;
530
- }
531
- function __importDefault(mod) {
532
- return (mod && mod.__esModule) ? mod : { default: mod };
533
- }
534
- function __classPrivateFieldGet(receiver, state, kind, f) {
535
- if (kind === "a" && !f)
536
- throw new TypeError("Private accessor was defined without a getter");
537
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
538
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
539
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
540
- }
541
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
542
- if (kind === "m")
543
- throw new TypeError("Private method is not writable");
544
- if (kind === "a" && !f)
545
- throw new TypeError("Private accessor was defined without a setter");
546
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
547
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
548
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
231
+ /*! *****************************************************************************
232
+ Copyright (c) Microsoft Corporation.
233
+
234
+ Permission to use, copy, modify, and/or distribute this software for any
235
+ purpose with or without fee is hereby granted.
236
+
237
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
238
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
239
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
240
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
241
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
242
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
243
+ PERFORMANCE OF THIS SOFTWARE.
244
+ ***************************************************************************** */
245
+ /* global Reflect, Promise */
246
+ var extendStatics = function (d, b) {
247
+ extendStatics = Object.setPrototypeOf ||
248
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
249
+ function (d, b) { for (var p in b)
250
+ if (Object.prototype.hasOwnProperty.call(b, p))
251
+ d[p] = b[p]; };
252
+ return extendStatics(d, b);
253
+ };
254
+ function __extends(d, b) {
255
+ if (typeof b !== "function" && b !== null)
256
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
257
+ extendStatics(d, b);
258
+ function __() { this.constructor = d; }
259
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
260
+ }
261
+ var __assign = function () {
262
+ __assign = Object.assign || function __assign(t) {
263
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
264
+ s = arguments[i];
265
+ for (var p in s)
266
+ if (Object.prototype.hasOwnProperty.call(s, p))
267
+ t[p] = s[p];
268
+ }
269
+ return t;
270
+ };
271
+ return __assign.apply(this, arguments);
272
+ };
273
+ function __rest(s, e) {
274
+ var t = {};
275
+ for (var p in s)
276
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
277
+ t[p] = s[p];
278
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
279
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
280
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
281
+ t[p[i]] = s[p[i]];
282
+ }
283
+ return t;
284
+ }
285
+ function __decorate(decorators, target, key, desc) {
286
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
287
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
288
+ r = Reflect.decorate(decorators, target, key, desc);
289
+ else
290
+ for (var i = decorators.length - 1; i >= 0; i--)
291
+ if (d = decorators[i])
292
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
293
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
294
+ }
295
+ function __param(paramIndex, decorator) {
296
+ return function (target, key) { decorator(target, key, paramIndex); };
297
+ }
298
+ function __metadata(metadataKey, metadataValue) {
299
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
300
+ return Reflect.metadata(metadataKey, metadataValue);
301
+ }
302
+ function __awaiter(thisArg, _arguments, P, generator) {
303
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
304
+ return new (P || (P = Promise))(function (resolve, reject) {
305
+ function fulfilled(value) { try {
306
+ step(generator.next(value));
307
+ }
308
+ catch (e) {
309
+ reject(e);
310
+ } }
311
+ function rejected(value) { try {
312
+ step(generator["throw"](value));
313
+ }
314
+ catch (e) {
315
+ reject(e);
316
+ } }
317
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
318
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
319
+ });
320
+ }
321
+ function __generator(thisArg, body) {
322
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
323
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
324
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
325
+ function verb(n) { return function (v) { return step([n, v]); }; }
326
+ function step(op) {
327
+ if (f)
328
+ throw new TypeError("Generator is already executing.");
329
+ while (_)
330
+ try {
331
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
332
+ return t;
333
+ if (y = 0, t)
334
+ op = [op[0] & 2, t.value];
335
+ switch (op[0]) {
336
+ case 0:
337
+ case 1:
338
+ t = op;
339
+ break;
340
+ case 4:
341
+ _.label++;
342
+ return { value: op[1], done: false };
343
+ case 5:
344
+ _.label++;
345
+ y = op[1];
346
+ op = [0];
347
+ continue;
348
+ case 7:
349
+ op = _.ops.pop();
350
+ _.trys.pop();
351
+ continue;
352
+ default:
353
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
354
+ _ = 0;
355
+ continue;
356
+ }
357
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
358
+ _.label = op[1];
359
+ break;
360
+ }
361
+ if (op[0] === 6 && _.label < t[1]) {
362
+ _.label = t[1];
363
+ t = op;
364
+ break;
365
+ }
366
+ if (t && _.label < t[2]) {
367
+ _.label = t[2];
368
+ _.ops.push(op);
369
+ break;
370
+ }
371
+ if (t[2])
372
+ _.ops.pop();
373
+ _.trys.pop();
374
+ continue;
375
+ }
376
+ op = body.call(thisArg, _);
377
+ }
378
+ catch (e) {
379
+ op = [6, e];
380
+ y = 0;
381
+ }
382
+ finally {
383
+ f = t = 0;
384
+ }
385
+ if (op[0] & 5)
386
+ throw op[1];
387
+ return { value: op[0] ? op[1] : void 0, done: true };
388
+ }
389
+ }
390
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
391
+ if (k2 === undefined)
392
+ k2 = k;
393
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
394
+ }) : (function (o, m, k, k2) {
395
+ if (k2 === undefined)
396
+ k2 = k;
397
+ o[k2] = m[k];
398
+ });
399
+ function __exportStar(m, o) {
400
+ for (var p in m)
401
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
402
+ __createBinding(o, m, p);
403
+ }
404
+ function __values(o) {
405
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
406
+ if (m)
407
+ return m.call(o);
408
+ if (o && typeof o.length === "number")
409
+ return {
410
+ next: function () {
411
+ if (o && i >= o.length)
412
+ o = void 0;
413
+ return { value: o && o[i++], done: !o };
414
+ }
415
+ };
416
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
417
+ }
418
+ function __read(o, n) {
419
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
420
+ if (!m)
421
+ return o;
422
+ var i = m.call(o), r, ar = [], e;
423
+ try {
424
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
425
+ ar.push(r.value);
426
+ }
427
+ catch (error) {
428
+ e = { error: error };
429
+ }
430
+ finally {
431
+ try {
432
+ if (r && !r.done && (m = i["return"]))
433
+ m.call(i);
434
+ }
435
+ finally {
436
+ if (e)
437
+ throw e.error;
438
+ }
439
+ }
440
+ return ar;
441
+ }
442
+ /** @deprecated */
443
+ function __spread() {
444
+ for (var ar = [], i = 0; i < arguments.length; i++)
445
+ ar = ar.concat(__read(arguments[i]));
446
+ return ar;
447
+ }
448
+ /** @deprecated */
449
+ function __spreadArrays() {
450
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
451
+ s += arguments[i].length;
452
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
453
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
454
+ r[k] = a[j];
455
+ return r;
456
+ }
457
+ function __spreadArray(to, from, pack) {
458
+ if (pack || arguments.length === 2)
459
+ for (var i = 0, l = from.length, ar; i < l; i++) {
460
+ if (ar || !(i in from)) {
461
+ if (!ar)
462
+ ar = Array.prototype.slice.call(from, 0, i);
463
+ ar[i] = from[i];
464
+ }
465
+ }
466
+ return to.concat(ar || Array.prototype.slice.call(from));
467
+ }
468
+ function __await(v) {
469
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
470
+ }
471
+ function __asyncGenerator(thisArg, _arguments, generator) {
472
+ if (!Symbol.asyncIterator)
473
+ throw new TypeError("Symbol.asyncIterator is not defined.");
474
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
475
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
476
+ function verb(n) { if (g[n])
477
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
478
+ function resume(n, v) { try {
479
+ step(g[n](v));
480
+ }
481
+ catch (e) {
482
+ settle(q[0][3], e);
483
+ } }
484
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
485
+ function fulfill(value) { resume("next", value); }
486
+ function reject(value) { resume("throw", value); }
487
+ function settle(f, v) { if (f(v), q.shift(), q.length)
488
+ resume(q[0][0], q[0][1]); }
489
+ }
490
+ function __asyncDelegator(o) {
491
+ var i, p;
492
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
493
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
494
+ }
495
+ function __asyncValues(o) {
496
+ if (!Symbol.asyncIterator)
497
+ throw new TypeError("Symbol.asyncIterator is not defined.");
498
+ var m = o[Symbol.asyncIterator], i;
499
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
500
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
501
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
502
+ }
503
+ function __makeTemplateObject(cooked, raw) {
504
+ if (Object.defineProperty) {
505
+ Object.defineProperty(cooked, "raw", { value: raw });
506
+ }
507
+ else {
508
+ cooked.raw = raw;
509
+ }
510
+ return cooked;
511
+ }
512
+ ;
513
+ var __setModuleDefault = Object.create ? (function (o, v) {
514
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
515
+ }) : function (o, v) {
516
+ o["default"] = v;
517
+ };
518
+ function __importStar(mod) {
519
+ if (mod && mod.__esModule)
520
+ return mod;
521
+ var result = {};
522
+ if (mod != null)
523
+ for (var k in mod)
524
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
525
+ __createBinding(result, mod, k);
526
+ __setModuleDefault(result, mod);
527
+ return result;
528
+ }
529
+ function __importDefault(mod) {
530
+ return (mod && mod.__esModule) ? mod : { default: mod };
531
+ }
532
+ function __classPrivateFieldGet(receiver, state, kind, f) {
533
+ if (kind === "a" && !f)
534
+ throw new TypeError("Private accessor was defined without a getter");
535
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
536
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
537
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
538
+ }
539
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
540
+ if (kind === "m")
541
+ throw new TypeError("Private method is not writable");
542
+ if (kind === "a" && !f)
543
+ throw new TypeError("Private accessor was defined without a setter");
544
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
545
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
546
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
549
547
  }
550
548
 
551
- var BbLocalizeTemplate = /** @class */ (function () {
552
- function BbLocalizeTemplate(templateRef) {
553
- this.templateRef = templateRef;
554
- // Inputs.
555
- this.name = null;
556
- }
557
- return BbLocalizeTemplate;
558
- }());
559
- BbLocalizeTemplate.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalizeTemplate, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
560
- BbLocalizeTemplate.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.1", type: BbLocalizeTemplate, selector: "[bbLocalizeTemplate]", inputs: { name: ["bbLocalizeTemplate", "name"] }, ngImport: i0__namespace });
561
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalizeTemplate, decorators: [{
562
- type: i0.Directive,
563
- args: [{
564
- selector: '[bbLocalizeTemplate]'
565
- }]
566
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; }, propDecorators: { name: [{
567
- type: i0.Input,
568
- args: ['bbLocalizeTemplate']
549
+ var BbLocalizeTemplate = /** @class */ (function () {
550
+ function BbLocalizeTemplate(templateRef) {
551
+ this.templateRef = templateRef;
552
+ // Inputs.
553
+ this.name = null;
554
+ }
555
+ return BbLocalizeTemplate;
556
+ }());
557
+ BbLocalizeTemplate.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalizeTemplate, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
558
+ BbLocalizeTemplate.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbLocalizeTemplate, selector: "[bbLocalizeTemplate]", inputs: { name: ["bbLocalizeTemplate", "name"] }, ngImport: i0__namespace });
559
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalizeTemplate, decorators: [{
560
+ type: i0.Directive,
561
+ args: [{
562
+ selector: '[bbLocalizeTemplate]'
563
+ }]
564
+ }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; }, propDecorators: { name: [{
565
+ type: i0.Input,
566
+ args: ['bbLocalizeTemplate']
569
567
  }] } });
570
568
 
571
- var BbLocalizeTemplateOrString = /** @class */ (function () {
572
- function BbLocalizeTemplateOrString(_templateRef, _viewContainerRef) {
573
- this._templateRef = _templateRef;
574
- this._viewContainerRef = _viewContainerRef;
575
- }
576
- Object.defineProperty(BbLocalizeTemplateOrString.prototype, "bbLocalizeTemplateOrString", {
577
- set: function (content) {
578
- // Get the template.
579
- var template = content instanceof i0.TemplateRef
580
- ? content
581
- : this._templateRef;
582
- // Clear the view container ref and create the view.
583
- this._viewContainerRef.clear();
584
- this._viewContainerRef.createEmbeddedView(template);
585
- },
586
- enumerable: false,
587
- configurable: true
588
- });
589
- return BbLocalizeTemplateOrString;
590
- }());
591
- BbLocalizeTemplateOrString.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalizeTemplateOrString, deps: [{ token: i0__namespace.TemplateRef }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
592
- BbLocalizeTemplateOrString.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.1", type: BbLocalizeTemplateOrString, selector: "[bbLocalizeTemplateOrString]", inputs: { bbLocalizeTemplateOrString: "bbLocalizeTemplateOrString" }, ngImport: i0__namespace });
593
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalizeTemplateOrString, decorators: [{
594
- type: i0.Directive,
595
- args: [{
596
- selector: '[bbLocalizeTemplateOrString]'
597
- }]
598
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { bbLocalizeTemplateOrString: [{
599
- type: i0.Input
569
+ var BbLocalizeTemplateOrString = /** @class */ (function () {
570
+ function BbLocalizeTemplateOrString(_templateRef, _viewContainerRef) {
571
+ this._templateRef = _templateRef;
572
+ this._viewContainerRef = _viewContainerRef;
573
+ }
574
+ Object.defineProperty(BbLocalizeTemplateOrString.prototype, "bbLocalizeTemplateOrString", {
575
+ set: function (content) {
576
+ // Get the template.
577
+ var template = content instanceof i0.TemplateRef
578
+ ? content
579
+ : this._templateRef;
580
+ // Clear the view container ref and create the view.
581
+ this._viewContainerRef.clear();
582
+ this._viewContainerRef.createEmbeddedView(template);
583
+ },
584
+ enumerable: false,
585
+ configurable: true
586
+ });
587
+ return BbLocalizeTemplateOrString;
588
+ }());
589
+ BbLocalizeTemplateOrString.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalizeTemplateOrString, deps: [{ token: i0__namespace.TemplateRef }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
590
+ BbLocalizeTemplateOrString.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbLocalizeTemplateOrString, selector: "[bbLocalizeTemplateOrString]", inputs: { bbLocalizeTemplateOrString: "bbLocalizeTemplateOrString" }, ngImport: i0__namespace });
591
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalizeTemplateOrString, decorators: [{
592
+ type: i0.Directive,
593
+ args: [{
594
+ selector: '[bbLocalizeTemplateOrString]'
595
+ }]
596
+ }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { bbLocalizeTemplateOrString: [{
597
+ type: i0.Input
600
598
  }] } });
601
599
 
602
- var BbLocalizeString = /** @class */ (function () {
603
- function BbLocalizeString(_changeDetection) {
604
- this._changeDetection = _changeDetection;
605
- // Inputs.
606
- this.substitutions = ['[', ']'];
607
- // Data.
608
- this.components = [];
609
- // Subscriptions.
610
- this._subscription = new rxjs.Subscription();
611
- // State.
612
- this._value = null;
613
- }
614
- Object.defineProperty(BbLocalizeString.prototype, "value", {
615
- get: function () {
616
- return this._value;
617
- },
618
- set: function (value) {
619
- this._value = value;
620
- this.revalidate();
621
- },
622
- enumerable: false,
623
- configurable: true
624
- });
625
- BbLocalizeString.prototype.ngAfterViewInit = function () {
626
- this.observeItemChanges();
627
- };
628
- BbLocalizeString.prototype.ngOnDestroy = function () {
629
- var _a;
630
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
631
- };
632
- BbLocalizeString.prototype.observeItemChanges = function () {
633
- var _this = this;
634
- var subscription = this.items.changes.pipe(operators.startWith(0)).subscribe(function () { return _this.revalidate(); });
635
- this._subscription.add(subscription);
636
- };
637
- BbLocalizeString.prototype.revalidate = function () {
638
- var _a, _b;
639
- var items = (_b = (_a = this.items) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
640
- if (items.length <= 0) {
641
- return;
642
- }
643
- this.setComponents(items);
644
- };
645
- BbLocalizeString.prototype.setComponents = function (items) {
646
- var _c = __read(this.substitutions, 2), start = _c[0], end = _c[1];
647
- var templates = items.reduce(function (previous, current) {
648
- var _c;
649
- var _a, _b;
650
- var template = (_a = current === null || current === void 0 ? void 0 : current.templateRef) !== null && _a !== void 0 ? _a : null;
651
- var name = (_b = current === null || current === void 0 ? void 0 : current.name) !== null && _b !== void 0 ? _b : null;
652
- if (!template || !name) {
653
- return previous;
654
- }
655
- return Object.assign(Object.assign({}, previous), (_c = {}, _c["" + start + name + end] = template, _c));
656
- }, {});
657
- this.components = this.getStringComponents(this._value)
658
- .map(function (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; })
659
- .filter(function (item) { return !!item; });
660
- this._changeDetection.detectChanges();
661
- };
662
- BbLocalizeString.prototype.getStringComponents = function (value) {
663
- var _c = __read(this.getSubstitutions(), 2), start = _c[0], end = _c[1];
664
- var regex = new RegExp("(" + start + "[a-zA-Z]+" + end + ")", 'g');
665
- return value.split(regex);
666
- };
667
- BbLocalizeString.prototype.getSubstitutions = function () {
668
- var _c = __read(this.substitutions, 2), start = _c[0], end = _c[1];
669
- var escape = /[.*+?^${}()|[\]\\]/g;
670
- return [
671
- start.replace(escape, '\\$&'),
672
- end.replace(escape, '\\$&')
673
- ];
674
- };
675
- return BbLocalizeString;
676
- }());
677
- BbLocalizeString.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalizeString, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
678
- BbLocalizeString.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.1", type: BbLocalizeString, selector: "bb-localize-string", inputs: { substitutions: "substitutions", value: "value" }, host: { classAttribute: "bb-localize-string" }, queries: [{ propertyName: "items", predicate: BbLocalizeTemplate }], ngImport: i0__namespace, template: "<ng-container *ngFor=\"let component of components\">\r\n <ng-template [bbLocalizeTemplateOrString]=\"component\">{{ component }}</ng-template>\r\n</ng-container>\r\n", styles: [".bb-localize-string{display:inline}"], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: BbLocalizeTemplateOrString, selector: "[bbLocalizeTemplateOrString]", inputs: ["bbLocalizeTemplateOrString"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
679
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalizeString, decorators: [{
680
- type: i0.Component,
681
- args: [{
682
- selector: 'bb-localize-string',
683
- templateUrl: './localize-string.component.html',
684
- styleUrls: ['./localize-string.component.scss'],
685
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
686
- encapsulation: i0.ViewEncapsulation.None,
687
- preserveWhitespaces: false,
688
- host: {
689
- 'class': 'bb-localize-string'
690
- }
691
- }]
692
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { items: [{
693
- type: i0.ContentChildren,
694
- args: [BbLocalizeTemplate]
695
- }], substitutions: [{
696
- type: i0.Input
697
- }], value: [{
698
- type: i0.Input
600
+ var BbLocalizeString = /** @class */ (function () {
601
+ function BbLocalizeString(_changeDetection) {
602
+ this._changeDetection = _changeDetection;
603
+ // Inputs.
604
+ this.substitutions = ['[', ']'];
605
+ // Data.
606
+ this.components = [];
607
+ // Subscriptions.
608
+ this._subscription = new rxjs.Subscription();
609
+ // State.
610
+ this._value = null;
611
+ }
612
+ Object.defineProperty(BbLocalizeString.prototype, "value", {
613
+ get: function () {
614
+ return this._value;
615
+ },
616
+ set: function (value) {
617
+ this._value = value;
618
+ this.revalidate();
619
+ },
620
+ enumerable: false,
621
+ configurable: true
622
+ });
623
+ BbLocalizeString.prototype.ngAfterViewInit = function () {
624
+ this.observeItemChanges();
625
+ };
626
+ BbLocalizeString.prototype.ngOnDestroy = function () {
627
+ var _a;
628
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
629
+ };
630
+ BbLocalizeString.prototype.observeItemChanges = function () {
631
+ var _this = this;
632
+ var subscription = this.items.changes.pipe(operators.startWith(0)).subscribe(function () { return _this.revalidate(); });
633
+ this._subscription.add(subscription);
634
+ };
635
+ BbLocalizeString.prototype.revalidate = function () {
636
+ var _a, _b;
637
+ var items = (_b = (_a = this.items) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
638
+ if (items.length <= 0) {
639
+ return;
640
+ }
641
+ this.setComponents(items);
642
+ };
643
+ BbLocalizeString.prototype.setComponents = function (items) {
644
+ var _c = __read(this.substitutions, 2), start = _c[0], end = _c[1];
645
+ var templates = items.reduce(function (previous, current) {
646
+ var _c;
647
+ var _a, _b;
648
+ var template = (_a = current === null || current === void 0 ? void 0 : current.templateRef) !== null && _a !== void 0 ? _a : null;
649
+ var name = (_b = current === null || current === void 0 ? void 0 : current.name) !== null && _b !== void 0 ? _b : null;
650
+ if (!template || !name) {
651
+ return previous;
652
+ }
653
+ return Object.assign(Object.assign({}, previous), (_c = {}, _c["" + start + name + end] = template, _c));
654
+ }, {});
655
+ this.components = this.getStringComponents(this._value)
656
+ .map(function (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; })
657
+ .filter(function (item) { return !!item; });
658
+ this._changeDetection.detectChanges();
659
+ };
660
+ BbLocalizeString.prototype.getStringComponents = function (value) {
661
+ var _c = __read(this.getSubstitutions(), 2), start = _c[0], end = _c[1];
662
+ var regex = new RegExp("(" + start + "[a-zA-Z]+" + end + ")", 'g');
663
+ return value.split(regex);
664
+ };
665
+ BbLocalizeString.prototype.getSubstitutions = function () {
666
+ var _c = __read(this.substitutions, 2), start = _c[0], end = _c[1];
667
+ var escape = /[.*+?^${}()|[\]\\]/g;
668
+ return [
669
+ start.replace(escape, '\\$&'),
670
+ end.replace(escape, '\\$&')
671
+ ];
672
+ };
673
+ return BbLocalizeString;
674
+ }());
675
+ BbLocalizeString.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalizeString, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
676
+ BbLocalizeString.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbLocalizeString, selector: "bb-localize-string", inputs: { substitutions: "substitutions", value: "value" }, host: { classAttribute: "bb-localize-string" }, queries: [{ propertyName: "items", predicate: BbLocalizeTemplate }], ngImport: i0__namespace, template: "<ng-container *ngFor=\"let component of components\">\n <ng-template [bbLocalizeTemplateOrString]=\"component\">{{ component }}</ng-template>\n</ng-container>\n", styles: [".bb-localize-string{display:inline}\n"], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: BbLocalizeTemplateOrString, selector: "[bbLocalizeTemplateOrString]", inputs: ["bbLocalizeTemplateOrString"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
677
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalizeString, decorators: [{
678
+ type: i0.Component,
679
+ args: [{
680
+ selector: 'bb-localize-string',
681
+ templateUrl: './localize-string.component.html',
682
+ styleUrls: ['./localize-string.component.scss'],
683
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
684
+ encapsulation: i0.ViewEncapsulation.None,
685
+ preserveWhitespaces: false,
686
+ host: {
687
+ 'class': 'bb-localize-string'
688
+ }
689
+ }]
690
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { items: [{
691
+ type: i0.ContentChildren,
692
+ args: [BbLocalizeTemplate]
693
+ }], substitutions: [{
694
+ type: i0.Input
695
+ }], value: [{
696
+ type: i0.Input
699
697
  }] } });
700
698
 
701
- var LocalizeDictionary = /** @class */ (function () {
702
- function LocalizeDictionary(_b, baseUrl, http) {
703
- var id = _b.id, data = _b.data, locale = _b.locale, supportedLanguages = _b.supportedLanguages;
704
- // Dictionary data.
705
- this._data = {};
706
- this._url = null;
707
- this.isAbsoluteUrl = function (url) {
708
- if (url.indexOf('//') === 0) {
709
- return true;
710
- }
711
- if (url.indexOf('://') === -1) {
712
- return false;
713
- }
714
- if (url.indexOf('.') === -1) {
715
- return false;
716
- }
717
- if (url.indexOf('/') === -1) {
718
- return false;
719
- }
720
- if (url.indexOf(':') > url.indexOf('/')) {
721
- return false;
722
- }
723
- return url.indexOf('://') < url.indexOf('.');
724
- };
725
- this.recursiveSearchValue = function (data, value) {
726
- if (typeof data === 'undefined' || typeof data === 'string') {
727
- return undefined;
728
- }
729
- return data[value];
730
- };
731
- this._id = id;
732
- this._locale = locale || 'en-US';
733
- this._supportedLanguages = supportedLanguages || [];
734
- this._http = http;
735
- this.stateKey = i4.makeStateKey("locale:" + this._id);
736
- // Set the correct variable to the url or data.
737
- if (typeof data === 'string') {
738
- this._url = this.getUrl(data, baseUrl);
739
- }
740
- else {
741
- this._data = data;
742
- }
743
- }
744
- Object.defineProperty(LocalizeDictionary.prototype, "id", {
745
- get: function () {
746
- return this._id;
747
- },
748
- enumerable: false,
749
- configurable: true
750
- });
751
- Object.defineProperty(LocalizeDictionary.prototype, "locale", {
752
- get: function () {
753
- return this._locale;
754
- },
755
- enumerable: false,
756
- configurable: true
757
- });
758
- Object.defineProperty(LocalizeDictionary.prototype, "supportedLanguages", {
759
- get: function () {
760
- return this._supportedLanguages;
761
- },
762
- enumerable: false,
763
- configurable: true
764
- });
765
- Object.defineProperty(LocalizeDictionary.prototype, "data", {
766
- get: function () {
767
- return this._data;
768
- },
769
- enumerable: false,
770
- configurable: true
771
- });
772
- LocalizeDictionary.prototype.load = function (data) {
773
- return __awaiter(this, void 0, void 0, function () {
774
- var context, result, _a_1;
775
- return __generator(this, function (_b) {
776
- switch (_b.label) {
777
- case 0:
778
- // Check if data was passed.
779
- if (data) {
780
- this.setData(data);
781
- return [2 /*return*/, true];
782
- }
783
- // If the url was not set the data was already loaded
784
- // return true because it was successful.
785
- if (!this._url) {
786
- return [2 /*return*/, true];
787
- }
788
- _b.label = 1;
789
- case 1:
790
- _b.trys.push([1, 3, , 4]);
791
- context = new i1$1.HttpContext().set(auth.USE_AUTHORIZATION, false);
792
- return [4 /*yield*/, this._http.get(this._url, { context: context })
793
- .toPromise()];
794
- case 2:
795
- result = _b.sent();
796
- // Set the data.
797
- this.setData(result);
798
- // Return true because it succeeded.
799
- return [2 /*return*/, true];
800
- case 3:
801
- _a_1 = _b.sent();
802
- // Return false because it failed.
803
- return [2 /*return*/, false];
804
- case 4: return [2 /*return*/];
805
- }
806
- });
807
- });
808
- };
809
- LocalizeDictionary.prototype.combine = function (extraDictionary, mode) {
810
- if (mode === void 0) { mode = 'prepend'; }
811
- // Validate that the locale matches.
812
- if (extraDictionary.locale !== this._locale) {
813
- return;
814
- }
815
- // Extract the extra data.
816
- var extraData = extraDictionary.data || {};
817
- // If the selected mode is prepend
818
- // add the data in front.
819
- if (mode === 'prepend') {
820
- this._data = Object.assign(Object.assign({}, extraData), this._data);
821
- return;
822
- }
823
- // If the selected mode is append
824
- // add the data in the back.
825
- this._data = Object.assign(Object.assign({}, this._data), extraData);
826
- };
827
- LocalizeDictionary.prototype.search = function (token) {
828
- // Check if the token is present in the
829
- // data, if so return it.
830
- if (this._data[token]) {
831
- return this._data[token];
832
- }
833
- // Values might be nested in objects this means we need
834
- // to split them on the dot and search them recursively
835
- // in the data.
836
- var value = (token || '')
837
- .split('.')
838
- .filter(function (value) { return !!value; })
839
- .reduce(this.recursiveSearchValue, this._data);
840
- // Check if the value is a string
841
- // if this is true it can be returned.
842
- if (typeof value === 'string') {
843
- return value;
844
- }
845
- // This means the translation was incorrect.
846
- return null;
847
- };
848
- LocalizeDictionary.prototype.setData = function (data) {
849
- this._data = data || {};
850
- this._url = null;
851
- };
852
- LocalizeDictionary.prototype.getUrl = function (value, baseUrl) {
853
- var isAbsolute = this.isAbsoluteUrl(value);
854
- if (isAbsolute || !baseUrl) {
855
- return value;
856
- }
857
- return [baseUrl, value].join('/');
858
- };
859
- return LocalizeDictionary;
699
+ var LocalizeDictionary = /** @class */ (function () {
700
+ function LocalizeDictionary(_b, baseUrl, http) {
701
+ var id = _b.id, data = _b.data, locale = _b.locale, supportedLanguages = _b.supportedLanguages;
702
+ // Dictionary data.
703
+ this._data = {};
704
+ this._url = null;
705
+ this.isAbsoluteUrl = function (url) {
706
+ if (url.indexOf('//') === 0) {
707
+ return true;
708
+ }
709
+ if (url.indexOf('://') === -1) {
710
+ return false;
711
+ }
712
+ if (url.indexOf('.') === -1) {
713
+ return false;
714
+ }
715
+ if (url.indexOf('/') === -1) {
716
+ return false;
717
+ }
718
+ if (url.indexOf(':') > url.indexOf('/')) {
719
+ return false;
720
+ }
721
+ return url.indexOf('://') < url.indexOf('.');
722
+ };
723
+ this.recursiveSearchValue = function (data, value) {
724
+ if (typeof data === 'undefined' || typeof data === 'string') {
725
+ return undefined;
726
+ }
727
+ return data[value];
728
+ };
729
+ this._id = id;
730
+ this._locale = locale || 'en-US';
731
+ this._supportedLanguages = supportedLanguages || [];
732
+ this._http = http;
733
+ this.stateKey = i4.makeStateKey("locale:" + this._id);
734
+ // Set the correct variable to the url or data.
735
+ if (typeof data === 'string') {
736
+ this._url = this.getUrl(data, baseUrl);
737
+ }
738
+ else {
739
+ this._data = data;
740
+ }
741
+ }
742
+ Object.defineProperty(LocalizeDictionary.prototype, "id", {
743
+ get: function () {
744
+ return this._id;
745
+ },
746
+ enumerable: false,
747
+ configurable: true
748
+ });
749
+ Object.defineProperty(LocalizeDictionary.prototype, "locale", {
750
+ get: function () {
751
+ return this._locale;
752
+ },
753
+ enumerable: false,
754
+ configurable: true
755
+ });
756
+ Object.defineProperty(LocalizeDictionary.prototype, "supportedLanguages", {
757
+ get: function () {
758
+ return this._supportedLanguages;
759
+ },
760
+ enumerable: false,
761
+ configurable: true
762
+ });
763
+ Object.defineProperty(LocalizeDictionary.prototype, "data", {
764
+ get: function () {
765
+ return this._data;
766
+ },
767
+ enumerable: false,
768
+ configurable: true
769
+ });
770
+ LocalizeDictionary.prototype.load = function (data) {
771
+ return __awaiter(this, void 0, void 0, function () {
772
+ var context, result, _a_1;
773
+ return __generator(this, function (_b) {
774
+ switch (_b.label) {
775
+ case 0:
776
+ // Check if data was passed.
777
+ if (data) {
778
+ this.setData(data);
779
+ return [2 /*return*/, true];
780
+ }
781
+ // If the url was not set the data was already loaded
782
+ // return true because it was successful.
783
+ if (!this._url) {
784
+ return [2 /*return*/, true];
785
+ }
786
+ _b.label = 1;
787
+ case 1:
788
+ _b.trys.push([1, 3, , 4]);
789
+ context = new i1$1.HttpContext().set(auth.USE_AUTHORIZATION, false);
790
+ return [4 /*yield*/, this._http.get(this._url, { context: context })
791
+ .toPromise()];
792
+ case 2:
793
+ result = _b.sent();
794
+ // Set the data.
795
+ this.setData(result);
796
+ // Return true because it succeeded.
797
+ return [2 /*return*/, true];
798
+ case 3:
799
+ _a_1 = _b.sent();
800
+ // Return false because it failed.
801
+ return [2 /*return*/, false];
802
+ case 4: return [2 /*return*/];
803
+ }
804
+ });
805
+ });
806
+ };
807
+ LocalizeDictionary.prototype.combine = function (extraDictionary, mode) {
808
+ if (mode === void 0) { mode = 'prepend'; }
809
+ // Validate that the locale matches.
810
+ if (extraDictionary.locale !== this._locale) {
811
+ return;
812
+ }
813
+ // Extract the extra data.
814
+ var extraData = extraDictionary.data || {};
815
+ // If the selected mode is prepend
816
+ // add the data in front.
817
+ if (mode === 'prepend') {
818
+ this._data = Object.assign(Object.assign({}, extraData), this._data);
819
+ return;
820
+ }
821
+ // If the selected mode is append
822
+ // add the data in the back.
823
+ this._data = Object.assign(Object.assign({}, this._data), extraData);
824
+ };
825
+ LocalizeDictionary.prototype.search = function (token) {
826
+ // Check if the token is present in the
827
+ // data, if so return it.
828
+ if (this._data[token]) {
829
+ return this._data[token];
830
+ }
831
+ // Values might be nested in objects this means we need
832
+ // to split them on the dot and search them recursively
833
+ // in the data.
834
+ var value = (token || '')
835
+ .split('.')
836
+ .filter(function (value) { return !!value; })
837
+ .reduce(this.recursiveSearchValue, this._data);
838
+ // Check if the value is a string
839
+ // if this is true it can be returned.
840
+ if (typeof value === 'string') {
841
+ return value;
842
+ }
843
+ // This means the translation was incorrect.
844
+ return null;
845
+ };
846
+ LocalizeDictionary.prototype.setData = function (data) {
847
+ this._data = data || {};
848
+ this._url = null;
849
+ };
850
+ LocalizeDictionary.prototype.getUrl = function (value, baseUrl) {
851
+ var isAbsolute = this.isAbsoluteUrl(value);
852
+ if (isAbsolute || !baseUrl) {
853
+ return value;
854
+ }
855
+ return [baseUrl, value].join('/');
856
+ };
857
+ return LocalizeDictionary;
860
858
  }());
861
859
 
862
- var Localize = /** @class */ (function () {
863
- function Localize(_http, _storage, _platform, _languages, _state, _config, _missingHandler, _document, _location, _baseUrl, _functions, _extras) {
864
- var _this = this;
865
- this._http = _http;
866
- this._storage = _storage;
867
- this._platform = _platform;
868
- this._languages = _languages;
869
- this._state = _state;
870
- this._config = _config;
871
- this._missingHandler = _missingHandler;
872
- this._document = _document;
873
- this._location = _location;
874
- this._baseUrl = _baseUrl;
875
- this._functions = _functions;
876
- this._extras = _extras;
877
- this._storageToken = 'bb-language-dictionary-id';
878
- this.convertToParams = function (tokenOrParams) {
879
- if (typeof tokenOrParams !== 'string') {
880
- // Destruct the params from the object.
881
- var token = tokenOrParams.token, optional = tokenOrParams.optional, data = tokenOrParams.data;
882
- // Make sure all parameters are valid
883
- // by type safe adding them.
884
- return { token: token, optional: optional || false, data: data || {} };
885
- }
886
- // If the parameter is a string fill in the blanks.
887
- return { token: tokenOrParams, optional: false, data: {} };
888
- };
889
- this.getMatches = function (value, substitutions) {
890
- // Get the matching substitutions.
891
- var start = substitutions.start, end = substitutions.end;
892
- // Compose a regex that will find the matches.
893
- var regex = new RegExp(start + "([^" + end + "]+)" + end, 'g');
894
- // Execute the regex to find matches.
895
- var match = regex.exec(value);
896
- var matches = [];
897
- while (match !== null) {
898
- // Push a new match.
899
- matches.push({
900
- match: match[0],
901
- token: match[1]
902
- });
903
- // Try to find more matches.
904
- match = regex.exec(value);
905
- }
906
- // Return the processed value.
907
- return matches.filter(function (item) { return !!item; });
908
- };
909
- this.reload = function () { var _a; return (_a = _this._location) === null || _a === void 0 ? void 0 : _a.reload(); };
910
- // Check if at least one language was passed in the config.
911
- if (this._config.dictionary.length < 1) {
912
- throw new Error('Localize: one or more languages should be supplied.');
913
- }
914
- // Gather the dictionaries.
915
- this._dictionaries = this._config.dictionary.map(function (item) {
916
- return new LocalizeDictionary(item, _this._baseUrl, _this._http);
917
- });
918
- // Save the best matching current dictionary.
919
- this._currentDictionary = this.retrieveBestMatchingDictionary();
920
- // Gather all the localize functions.
921
- this._functionMiddleware = this._functions.reduce(function (previous, current) {
922
- previous[current.keyword()] = current;
923
- return previous;
924
- }, {});
925
- this.renderDocumentLanguage();
926
- }
927
- Object.defineProperty(Localize.prototype, "dictionaries", {
928
- get: function () {
929
- return this._dictionaries;
930
- },
931
- enumerable: false,
932
- configurable: true
933
- });
934
- Object.defineProperty(Localize.prototype, "current", {
935
- get: function () {
936
- return this._currentDictionary;
937
- },
938
- enumerable: false,
939
- configurable: true
940
- });
941
- Object.defineProperty(Localize.prototype, "locale", {
942
- get: function () {
943
- return this._currentDictionary.locale;
944
- },
945
- enumerable: false,
946
- configurable: true
947
- });
948
- Localize.prototype.initialize = function () {
949
- var _this = this;
950
- return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_f) {
951
- return [2 /*return*/, this.load(this._currentDictionary)];
952
- }); }); };
953
- };
954
- Localize.prototype.change = function (id, reload) {
955
- if (reload === void 0) { reload = true; }
956
- // Try to fetch the dictionary.
957
- var dictionary = this._dictionaries.find(function (item) { return item.id === id; });
958
- // Validate the dictionary exists.
959
- if (!dictionary) {
960
- throw new Error("Localize: Could not find dictionary with id: \"" + id + "\"");
961
- }
962
- // Save the language in the storage.
963
- this._storage.cookie.set(this._storageToken, dictionary.id, {});
964
- // Just quit if we don't need to reload.
965
- if (!reload) {
966
- return;
967
- }
968
- // We need to reload the application for the translations.
969
- return this.reload();
970
- };
971
- Localize.prototype.clear = function (reload) {
972
- if (reload === void 0) { reload = true; }
973
- // Remove the language in the local storage.
974
- this._storage.cookie.remove(this._storageToken);
975
- // Just quit if we don't need to reload.
976
- if (!reload) {
977
- return;
978
- }
979
- // We need to reload the application for the translations.
980
- return this.reload();
981
- };
982
- Localize.prototype.translate = function (tokenOrParams) {
983
- // 1. Convert to the params.
984
- var params = this.convertToParams(tokenOrParams);
985
- // 2. Try to find the translation in the dictionary.
986
- var searchResult = this._currentDictionary.search(params.token);
987
- // 3. Verify the translation was found.
988
- if (!searchResult) {
989
- return this._missingHandler.handle(params);
990
- }
991
- // 4. Find references in the translation that need to be translated as well.
992
- var processResult = this.findReferencesInTranslation(searchResult);
993
- // 5. Parse the interpolation data.
994
- return this.parseInterpolationData(processResult, params.data);
995
- };
996
- Localize.prototype.parseInterpolationData = function (value, data) {
997
- var _this = this;
998
- // Get the interpolation substitutions.
999
- var substitutions = this.getSubstitutions('interpolation', ['{{', '}}']);
1000
- // Get all matches in the value.
1001
- var matches = this.getMatches(value, substitutions);
1002
- // Replace all matches with the parsed value.
1003
- return matches.reduce(function (previous, current) {
1004
- // Try to parse the token.
1005
- var interpolatedToken = _this.interpolateFunctionData(current.token, data);
1006
- // Replace the match with the parsed token.
1007
- return previous.replace(current.match, interpolatedToken);
1008
- }, "" + value);
1009
- };
1010
- Localize.prototype.interpolateFunctionData = function (value, interpolationData) {
1011
- var _this = this;
1012
- // Get the token and the methods by splitting
1013
- // on the pipe symbol.
1014
- var _f = __read(value.split('|').map(function (item) { return item.trim(); })), token = _f[0], methods = _f.slice(1);
1015
- // Get the value for the token from
1016
- // the interpolation data.
1017
- var interpolationValue = interpolationData[token] || token;
1018
- // Loop through all the middleware methods and try to
1019
- // conform the string to the given parameters.
1020
- return methods.reduce(function (string, middlewareName) {
1021
- // Try to retrieve the middleware from the collection.
1022
- var middleware = _this._functionMiddleware[middlewareName];
1023
- // If the middleware is missing return an error
1024
- // so that the user knows it was not found.
1025
- if (!middleware) {
1026
- return string;
1027
- }
1028
- // Execute the middleware function with the string.
1029
- return middleware.transform(string, _this.locale);
1030
- }, "" + interpolationValue);
1031
- };
1032
- Localize.prototype.findReferencesInTranslation = function (value) {
1033
- var _this = this;
1034
- // Get the reference substitutions.
1035
- var substitutions = this.getSubstitutions('references', ['#(', ')']);
1036
- // Get all matches in the value.
1037
- var matches = this.getMatches(value, substitutions);
1038
- // Replace all matches with the translated value.
1039
- return matches.reduce(function (previous, current) {
1040
- // Try to translate the token.
1041
- var translatedToken = _this.translate(current.token);
1042
- // Replace the match with the translated token.
1043
- return previous.replace(current.match, translatedToken);
1044
- }, value);
1045
- };
1046
- Localize.prototype.getSubstitutions = function (type, defaultValue) {
1047
- var substitutions = (this._config
1048
- && this._config.substitutions
1049
- && this._config.substitutions[type]);
1050
- // Get the substitutions.
1051
- var value = (!substitutions || substitutions.length !== 2)
1052
- ? defaultValue
1053
- : substitutions;
1054
- // Escape both substitutions so that they
1055
- // can be used.
1056
- var escape = /[.*+?^${}()|[\]\\]/g;
1057
- var start = value[0].replace(escape, '\\$&');
1058
- var end = value[1].replace(escape, '\\$&');
1059
- // Return the substitutions.
1060
- return { start: start, end: end };
1061
- };
1062
- Localize.prototype.retrieveBestMatchingDictionary = function () {
1063
- // Get the dictionary based on storage.
1064
- var storageDictionary = this.getDictionaryFromStorage();
1065
- // Get the dictionary based on the supported language.
1066
- var browserDictionary = this.getBestBrowserMatchDictionary();
1067
- // Get the dictionary based on the first index.
1068
- var firstDictionary = this._dictionaries[0];
1069
- // Return the best matching dictionary.
1070
- return storageDictionary || browserDictionary || firstDictionary;
1071
- };
1072
- Localize.prototype.getDictionaryFromStorage = function () {
1073
- // Get dictionary id from the storage..
1074
- var dictionaryId = this._storage.cookie.get(this._storageToken);
1075
- // Return the dictionary based on the storage dictionary id.
1076
- return this._dictionaries.find(function (item) { return item.id === dictionaryId; });
1077
- };
1078
- Localize.prototype.getBestBrowserMatchDictionary = function () {
1079
- var _this = this;
1080
- // Loop through all browser languages and return the
1081
- // best matching dictionary.
1082
- return this._languages.all.map(function (_f) {
1083
- var code = _f.code, region = _f.region;
1084
- var languageCode = [code, region].filter(function (data) { return !!data; }).join('-');
1085
- return _this._dictionaries.find(function (item) { return item.supportedLanguages.includes(languageCode); });
1086
- }).filter(function (item) { return !!item; }).find(function (_, index) { return index === 0; });
1087
- };
1088
- Localize.prototype.load = function (dictionary) {
1089
- var _a, _b, _c, _d;
1090
- return __awaiter(this, void 0, void 0, function () {
1091
- var data, loaded;
1092
- return __generator(this, function (_f) {
1093
- switch (_f.label) {
1094
- case 0:
1095
- data = ((_a = this._state) === null || _a === void 0 ? void 0 : _a.hasKey(dictionary.stateKey))
1096
- ? (_b = this._state) === null || _b === void 0 ? void 0 : _b.get(dictionary.stateKey, {})
1097
- : null;
1098
- return [4 /*yield*/, dictionary.load(data)];
1099
- case 1:
1100
- loaded = _f.sent();
1101
- // Verify the data was loaded.
1102
- if (!loaded) {
1103
- throw new Error("Localize: Could not correctly fetch the data from: \"" + dictionary.id + "\"");
1104
- }
1105
- if (!this._platform.isBrowser && this._state) {
1106
- (_c = this._state) === null || _c === void 0 ? void 0 : _c.set(dictionary === null || dictionary === void 0 ? void 0 : dictionary.stateKey, (_d = dictionary === null || dictionary === void 0 ? void 0 : dictionary.data) !== null && _d !== void 0 ? _d : {});
1107
- }
1108
- // Combine the extra dictionary data.
1109
- (this._extras || []).forEach(function (extraDictionary) { return dictionary.combine(extraDictionary); });
1110
- // Return the dictionary.
1111
- return [2 /*return*/, dictionary];
1112
- }
1113
- });
1114
- });
1115
- };
1116
- Localize.prototype.renderDocumentLanguage = function () {
1117
- var _a, _b, _c, _d, _e;
1118
- var element = (_a = this._document) === null || _a === void 0 ? void 0 : _a.documentElement;
1119
- if (!element) {
1120
- return;
1121
- }
1122
- element.lang = (_d = (_c = (_b = this._currentDictionary) === null || _b === void 0 ? void 0 : _b.supportedLanguages) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : (_e = this._currentDictionary) === null || _e === void 0 ? void 0 : _e.locale;
1123
- };
1124
- return Localize;
1125
- }());
1126
- Localize.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: Localize, deps: [{ token: i1__namespace$1.HttpClient }, { token: i2__namespace.Storage }, { token: i3__namespace.Platform }, { token: i3__namespace.Languages }, { token: i4__namespace.TransferState, optional: true }, { token: LocalizeConfig, optional: true }, { token: LocalizeMissingHandler }, { token: i1.DOCUMENT, optional: true }, { token: i3.LOCATION, optional: true }, { token: i3.BASE_URL, optional: true }, { token: LOCALIZE_FUNCTION, optional: true }, { token: LOCALIZE_EXTRA_DICTIONARY, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1127
- Localize.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: Localize });
1128
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: Localize, decorators: [{
1129
- type: i0.Injectable
1130
- }], ctorParameters: function () {
1131
- return [{ type: i1__namespace$1.HttpClient }, { type: i2__namespace.Storage }, { type: i3__namespace.Platform }, { type: i3__namespace.Languages }, { type: i4__namespace.TransferState, decorators: [{
1132
- type: i0.Optional
1133
- }] }, { type: LocalizeConfig, decorators: [{
1134
- type: i0.Optional
1135
- }] }, { type: LocalizeMissingHandler }, { type: undefined, decorators: [{
1136
- type: i0.Optional
1137
- }, {
1138
- type: i0.Inject,
1139
- args: [i1.DOCUMENT]
1140
- }] }, { type: undefined, decorators: [{
1141
- type: i0.Optional
1142
- }, {
1143
- type: i0.Inject,
1144
- args: [i3.LOCATION]
1145
- }] }, { type: undefined, decorators: [{
1146
- type: i0.Optional
1147
- }, {
1148
- type: i0.Inject,
1149
- args: [i3.BASE_URL]
1150
- }] }, { type: undefined, decorators: [{
1151
- type: i0.Optional
1152
- }, {
1153
- type: i0.Inject,
1154
- args: [LOCALIZE_FUNCTION]
1155
- }] }, { type: undefined, decorators: [{
1156
- type: i0.Optional
1157
- }, {
1158
- type: i0.Inject,
1159
- args: [LOCALIZE_EXTRA_DICTIONARY]
1160
- }] }];
860
+ var Localize = /** @class */ (function () {
861
+ function Localize(_http, _storage, _platform, _languages, _state, _config, _missingHandler, _document, _location, _baseUrl, _functions, _extras) {
862
+ var _this = this;
863
+ this._http = _http;
864
+ this._storage = _storage;
865
+ this._platform = _platform;
866
+ this._languages = _languages;
867
+ this._state = _state;
868
+ this._config = _config;
869
+ this._missingHandler = _missingHandler;
870
+ this._document = _document;
871
+ this._location = _location;
872
+ this._baseUrl = _baseUrl;
873
+ this._functions = _functions;
874
+ this._extras = _extras;
875
+ this._storageToken = 'bb-language-dictionary-id';
876
+ this.convertToParams = function (tokenOrParams) {
877
+ if (typeof tokenOrParams !== 'string') {
878
+ // Destruct the params from the object.
879
+ var token = tokenOrParams.token, optional = tokenOrParams.optional, data = tokenOrParams.data;
880
+ // Make sure all parameters are valid
881
+ // by type safe adding them.
882
+ return { token: token, optional: optional || false, data: data || {} };
883
+ }
884
+ // If the parameter is a string fill in the blanks.
885
+ return { token: tokenOrParams, optional: false, data: {} };
886
+ };
887
+ this.getMatches = function (value, substitutions) {
888
+ // Get the matching substitutions.
889
+ var start = substitutions.start, end = substitutions.end;
890
+ // Compose a regex that will find the matches.
891
+ var regex = new RegExp(start + "([^" + end + "]+)" + end, 'g');
892
+ // Execute the regex to find matches.
893
+ var match = regex.exec(value);
894
+ var matches = [];
895
+ while (match !== null) {
896
+ // Push a new match.
897
+ matches.push({
898
+ match: match[0],
899
+ token: match[1]
900
+ });
901
+ // Try to find more matches.
902
+ match = regex.exec(value);
903
+ }
904
+ // Return the processed value.
905
+ return matches.filter(function (item) { return !!item; });
906
+ };
907
+ this.reload = function () { var _a; return (_a = _this._location) === null || _a === void 0 ? void 0 : _a.reload(); };
908
+ // Check if at least one language was passed in the config.
909
+ if (this._config.dictionary.length < 1) {
910
+ throw new Error('Localize: one or more languages should be supplied.');
911
+ }
912
+ // Gather the dictionaries.
913
+ this._dictionaries = this._config.dictionary.map(function (item) {
914
+ return new LocalizeDictionary(item, _this._baseUrl, _this._http);
915
+ });
916
+ // Save the best matching current dictionary.
917
+ this._currentDictionary = this.retrieveBestMatchingDictionary();
918
+ // Gather all the localize functions.
919
+ this._functionMiddleware = this._functions.reduce(function (previous, current) {
920
+ previous[current.keyword()] = current;
921
+ return previous;
922
+ }, {});
923
+ this.renderDocumentLanguage();
924
+ }
925
+ Object.defineProperty(Localize.prototype, "dictionaries", {
926
+ get: function () {
927
+ return this._dictionaries;
928
+ },
929
+ enumerable: false,
930
+ configurable: true
931
+ });
932
+ Object.defineProperty(Localize.prototype, "current", {
933
+ get: function () {
934
+ return this._currentDictionary;
935
+ },
936
+ enumerable: false,
937
+ configurable: true
938
+ });
939
+ Object.defineProperty(Localize.prototype, "locale", {
940
+ get: function () {
941
+ return this._currentDictionary.locale;
942
+ },
943
+ enumerable: false,
944
+ configurable: true
945
+ });
946
+ Localize.prototype.initialize = function () {
947
+ var _this = this;
948
+ return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_f) {
949
+ return [2 /*return*/, this.load(this._currentDictionary)];
950
+ }); }); };
951
+ };
952
+ Localize.prototype.change = function (id, reload) {
953
+ if (reload === void 0) { reload = true; }
954
+ // Try to fetch the dictionary.
955
+ var dictionary = this._dictionaries.find(function (item) { return item.id === id; });
956
+ // Validate the dictionary exists.
957
+ if (!dictionary) {
958
+ throw new Error("Localize: Could not find dictionary with id: \"" + id + "\"");
959
+ }
960
+ // Save the language in the storage.
961
+ this._storage.cookie.set(this._storageToken, dictionary.id, {});
962
+ // Just quit if we don't need to reload.
963
+ if (!reload) {
964
+ return;
965
+ }
966
+ // We need to reload the application for the translations.
967
+ return this.reload();
968
+ };
969
+ Localize.prototype.clear = function (reload) {
970
+ if (reload === void 0) { reload = true; }
971
+ // Remove the language in the local storage.
972
+ this._storage.cookie.remove(this._storageToken);
973
+ // Just quit if we don't need to reload.
974
+ if (!reload) {
975
+ return;
976
+ }
977
+ // We need to reload the application for the translations.
978
+ return this.reload();
979
+ };
980
+ Localize.prototype.translate = function (tokenOrParams) {
981
+ // 1. Convert to the params.
982
+ var params = this.convertToParams(tokenOrParams);
983
+ // 2. Try to find the translation in the dictionary.
984
+ var searchResult = this._currentDictionary.search(params.token);
985
+ // 3. Verify the translation was found.
986
+ if (!searchResult) {
987
+ return this._missingHandler.handle(params);
988
+ }
989
+ // 4. Find references in the translation that need to be translated as well.
990
+ var processResult = this.findReferencesInTranslation(searchResult);
991
+ // 5. Parse the interpolation data.
992
+ return this.parseInterpolationData(processResult, params.data);
993
+ };
994
+ Localize.prototype.parseInterpolationData = function (value, data) {
995
+ var _this = this;
996
+ // Get the interpolation substitutions.
997
+ var substitutions = this.getSubstitutions('interpolation', ['{{', '}}']);
998
+ // Get all matches in the value.
999
+ var matches = this.getMatches(value, substitutions);
1000
+ // Replace all matches with the parsed value.
1001
+ return matches.reduce(function (previous, current) {
1002
+ // Try to parse the token.
1003
+ var interpolatedToken = _this.interpolateFunctionData(current.token, data);
1004
+ // Replace the match with the parsed token.
1005
+ return previous.replace(current.match, interpolatedToken);
1006
+ }, "" + value);
1007
+ };
1008
+ Localize.prototype.interpolateFunctionData = function (value, interpolationData) {
1009
+ var _this = this;
1010
+ // Get the token and the methods by splitting
1011
+ // on the pipe symbol.
1012
+ var _f = __read(value.split('|').map(function (item) { return item.trim(); })), token = _f[0], methods = _f.slice(1);
1013
+ // Get the value for the token from
1014
+ // the interpolation data.
1015
+ var interpolationValue = interpolationData[token] || token;
1016
+ // Loop through all the middleware methods and try to
1017
+ // conform the string to the given parameters.
1018
+ return methods.reduce(function (string, middlewareName) {
1019
+ // Try to retrieve the middleware from the collection.
1020
+ var middleware = _this._functionMiddleware[middlewareName];
1021
+ // If the middleware is missing return an error
1022
+ // so that the user knows it was not found.
1023
+ if (!middleware) {
1024
+ return string;
1025
+ }
1026
+ // Execute the middleware function with the string.
1027
+ return middleware.transform(string, _this.locale);
1028
+ }, "" + interpolationValue);
1029
+ };
1030
+ Localize.prototype.findReferencesInTranslation = function (value) {
1031
+ var _this = this;
1032
+ // Get the reference substitutions.
1033
+ var substitutions = this.getSubstitutions('references', ['#(', ')']);
1034
+ // Get all matches in the value.
1035
+ var matches = this.getMatches(value, substitutions);
1036
+ // Replace all matches with the translated value.
1037
+ return matches.reduce(function (previous, current) {
1038
+ // Try to translate the token.
1039
+ var translatedToken = _this.translate(current.token);
1040
+ // Replace the match with the translated token.
1041
+ return previous.replace(current.match, translatedToken);
1042
+ }, value);
1043
+ };
1044
+ Localize.prototype.getSubstitutions = function (type, defaultValue) {
1045
+ var substitutions = (this._config
1046
+ && this._config.substitutions
1047
+ && this._config.substitutions[type]);
1048
+ // Get the substitutions.
1049
+ var value = (!substitutions || substitutions.length !== 2)
1050
+ ? defaultValue
1051
+ : substitutions;
1052
+ // Escape both substitutions so that they
1053
+ // can be used.
1054
+ var escape = /[.*+?^${}()|[\]\\]/g;
1055
+ var start = value[0].replace(escape, '\\$&');
1056
+ var end = value[1].replace(escape, '\\$&');
1057
+ // Return the substitutions.
1058
+ return { start: start, end: end };
1059
+ };
1060
+ Localize.prototype.retrieveBestMatchingDictionary = function () {
1061
+ // Get the dictionary based on storage.
1062
+ var storageDictionary = this.getDictionaryFromStorage();
1063
+ // Get the dictionary based on the supported language.
1064
+ var browserDictionary = this.getBestBrowserMatchDictionary();
1065
+ // Get the dictionary based on the first index.
1066
+ var firstDictionary = this._dictionaries[0];
1067
+ // Return the best matching dictionary.
1068
+ return storageDictionary || browserDictionary || firstDictionary;
1069
+ };
1070
+ Localize.prototype.getDictionaryFromStorage = function () {
1071
+ // Get dictionary id from the storage..
1072
+ var dictionaryId = this._storage.cookie.get(this._storageToken);
1073
+ // Return the dictionary based on the storage dictionary id.
1074
+ return this._dictionaries.find(function (item) { return item.id === dictionaryId; });
1075
+ };
1076
+ Localize.prototype.getBestBrowserMatchDictionary = function () {
1077
+ var _this = this;
1078
+ // Loop through all browser languages and return the
1079
+ // best matching dictionary.
1080
+ return this._languages.all.map(function (_f) {
1081
+ var code = _f.code, region = _f.region;
1082
+ var languageCode = [code, region].filter(function (data) { return !!data; }).join('-');
1083
+ return _this._dictionaries.find(function (item) { return item.supportedLanguages.includes(languageCode); });
1084
+ }).filter(function (item) { return !!item; }).find(function (_, index) { return index === 0; });
1085
+ };
1086
+ Localize.prototype.load = function (dictionary) {
1087
+ var _a, _b, _c, _d;
1088
+ return __awaiter(this, void 0, void 0, function () {
1089
+ var data, loaded;
1090
+ return __generator(this, function (_f) {
1091
+ switch (_f.label) {
1092
+ case 0:
1093
+ data = ((_a = this._state) === null || _a === void 0 ? void 0 : _a.hasKey(dictionary.stateKey))
1094
+ ? (_b = this._state) === null || _b === void 0 ? void 0 : _b.get(dictionary.stateKey, {})
1095
+ : null;
1096
+ return [4 /*yield*/, dictionary.load(data)];
1097
+ case 1:
1098
+ loaded = _f.sent();
1099
+ // Verify the data was loaded.
1100
+ if (!loaded) {
1101
+ throw new Error("Localize: Could not correctly fetch the data from: \"" + dictionary.id + "\"");
1102
+ }
1103
+ if (!this._platform.isBrowser && this._state) {
1104
+ (_c = this._state) === null || _c === void 0 ? void 0 : _c.set(dictionary === null || dictionary === void 0 ? void 0 : dictionary.stateKey, (_d = dictionary === null || dictionary === void 0 ? void 0 : dictionary.data) !== null && _d !== void 0 ? _d : {});
1105
+ }
1106
+ // Combine the extra dictionary data.
1107
+ (this._extras || []).forEach(function (extraDictionary) { return dictionary.combine(extraDictionary); });
1108
+ // Return the dictionary.
1109
+ return [2 /*return*/, dictionary];
1110
+ }
1111
+ });
1112
+ });
1113
+ };
1114
+ Localize.prototype.renderDocumentLanguage = function () {
1115
+ var _a, _b, _c, _d, _e;
1116
+ var element = (_a = this._document) === null || _a === void 0 ? void 0 : _a.documentElement;
1117
+ if (!element) {
1118
+ return;
1119
+ }
1120
+ element.lang = (_d = (_c = (_b = this._currentDictionary) === null || _b === void 0 ? void 0 : _b.supportedLanguages) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : (_e = this._currentDictionary) === null || _e === void 0 ? void 0 : _e.locale;
1121
+ };
1122
+ return Localize;
1123
+ }());
1124
+ Localize.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: Localize, deps: [{ token: i1__namespace$1.HttpClient }, { token: i2__namespace.Storage }, { token: i3__namespace.Platform }, { token: i3__namespace.Languages }, { token: i4__namespace.TransferState, optional: true }, { token: LocalizeConfig, optional: true }, { token: LocalizeMissingHandler }, { token: i1.DOCUMENT, optional: true }, { token: i3.LOCATION, optional: true }, { token: i3.BASE_URL, optional: true }, { token: LOCALIZE_FUNCTION, optional: true }, { token: LOCALIZE_EXTRA_DICTIONARY, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1125
+ Localize.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: Localize });
1126
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: Localize, decorators: [{
1127
+ type: i0.Injectable
1128
+ }], ctorParameters: function () {
1129
+ return [{ type: i1__namespace$1.HttpClient }, { type: i2__namespace.Storage }, { type: i3__namespace.Platform }, { type: i3__namespace.Languages }, { type: i4__namespace.TransferState, decorators: [{
1130
+ type: i0.Optional
1131
+ }] }, { type: LocalizeConfig, decorators: [{
1132
+ type: i0.Optional
1133
+ }] }, { type: LocalizeMissingHandler }, { type: undefined, decorators: [{
1134
+ type: i0.Optional
1135
+ }, {
1136
+ type: i0.Inject,
1137
+ args: [i1.DOCUMENT]
1138
+ }] }, { type: undefined, decorators: [{
1139
+ type: i0.Optional
1140
+ }, {
1141
+ type: i0.Inject,
1142
+ args: [i3.LOCATION]
1143
+ }] }, { type: undefined, decorators: [{
1144
+ type: i0.Optional
1145
+ }, {
1146
+ type: i0.Inject,
1147
+ args: [i3.BASE_URL]
1148
+ }] }, { type: undefined, decorators: [{
1149
+ type: i0.Optional
1150
+ }, {
1151
+ type: i0.Inject,
1152
+ args: [LOCALIZE_FUNCTION]
1153
+ }] }, { type: undefined, decorators: [{
1154
+ type: i0.Optional
1155
+ }, {
1156
+ type: i0.Inject,
1157
+ args: [LOCALIZE_EXTRA_DICTIONARY]
1158
+ }] }];
1161
1159
  } });
1162
1160
 
1163
- var BbLocalize = /** @class */ (function () {
1164
- function BbLocalize(_localize) {
1165
- this._localize = _localize;
1166
- }
1167
- BbLocalize.prototype.transform = function (tokenOrParams, args) {
1168
- // Validate that the localize service
1169
- // exists in the pipe.
1170
- if (!this._localize) {
1171
- return tokenOrParams;
1172
- }
1173
- // Combine the params with the options
1174
- // to form the localize params.
1175
- var params = this.combineParamsWithOptions(tokenOrParams, args);
1176
- // Try to localize the value.
1177
- return this._localize.translate(params);
1178
- };
1179
- BbLocalize.prototype.combineParamsWithOptions = function (tokenOrParams, args) {
1180
- // Gather the extras.
1181
- var extras = args || {};
1182
- // Loop through all the keys to find the set options.
1183
- var options = Object.keys(extras).reduce(function (previous, current) {
1184
- if (typeof extras[current] === 'undefined') {
1185
- return previous;
1186
- }
1187
- previous[current] = extras[current];
1188
- return previous;
1189
- }, {});
1190
- // Convert the string token to a params object.
1191
- var params = typeof tokenOrParams === 'string'
1192
- ? { token: tokenOrParams, optional: false, data: {} }
1193
- : tokenOrParams;
1194
- // Return the combined params and options.
1195
- return Object.assign(Object.assign({}, params), options);
1196
- };
1197
- return BbLocalize;
1198
- }());
1199
- BbLocalize.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalize, deps: [{ token: Localize, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1200
- BbLocalize.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalize, name: "bbLocalize" });
1201
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: BbLocalize, decorators: [{
1202
- type: i0.Pipe,
1203
- args: [{
1204
- name: 'bbLocalize'
1205
- }]
1206
- }], ctorParameters: function () {
1207
- return [{ type: Localize, decorators: [{
1208
- type: i0.Optional
1209
- }] }];
1161
+ var BbLocalize = /** @class */ (function () {
1162
+ function BbLocalize(_localize) {
1163
+ this._localize = _localize;
1164
+ }
1165
+ BbLocalize.prototype.transform = function (tokenOrParams, args) {
1166
+ // Validate that the localize service
1167
+ // exists in the pipe.
1168
+ if (!this._localize) {
1169
+ return tokenOrParams;
1170
+ }
1171
+ // Combine the params with the options
1172
+ // to form the localize params.
1173
+ var params = this.combineParamsWithOptions(tokenOrParams, args);
1174
+ // Try to localize the value.
1175
+ return this._localize.translate(params);
1176
+ };
1177
+ BbLocalize.prototype.combineParamsWithOptions = function (tokenOrParams, args) {
1178
+ // Gather the extras.
1179
+ var extras = args || {};
1180
+ // Loop through all the keys to find the set options.
1181
+ var options = Object.keys(extras).reduce(function (previous, current) {
1182
+ if (typeof extras[current] === 'undefined') {
1183
+ return previous;
1184
+ }
1185
+ previous[current] = extras[current];
1186
+ return previous;
1187
+ }, {});
1188
+ // Convert the string token to a params object.
1189
+ var params = typeof tokenOrParams === 'string'
1190
+ ? { token: tokenOrParams, optional: false, data: {} }
1191
+ : tokenOrParams;
1192
+ // Return the combined params and options.
1193
+ return Object.assign(Object.assign({}, params), options);
1194
+ };
1195
+ return BbLocalize;
1196
+ }());
1197
+ BbLocalize.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalize, deps: [{ token: Localize, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1198
+ BbLocalize.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalize, name: "bbLocalize" });
1199
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbLocalize, decorators: [{
1200
+ type: i0.Pipe,
1201
+ args: [{
1202
+ name: 'bbLocalize'
1203
+ }]
1204
+ }], ctorParameters: function () {
1205
+ return [{ type: Localize, decorators: [{
1206
+ type: i0.Optional
1207
+ }] }];
1210
1208
  } });
1211
1209
 
1212
- var LocalizeModule = /** @class */ (function () {
1213
- function LocalizeModule() {
1214
- }
1215
- LocalizeModule.forRoot = function (config) {
1216
- return {
1217
- ngModule: LocalizeModule,
1218
- providers: [
1219
- // Angular providers.
1220
- { provide: i0.APP_INITIALIZER, deps: [Localize], useFactory: initializeLocale, multi: true },
1221
- { provide: i0.LOCALE_ID, deps: [Localize], useFactory: getLocale },
1222
- // Config provider.
1223
- { provide: LocalizeConfig, useValue: config },
1224
- // Function providers.
1225
- { provide: LOCALIZE_FUNCTION, useClass: LocalizeLowercaseFunction, multi: true },
1226
- { provide: LOCALIZE_FUNCTION, useClass: LocalizeUppercaseFunction, multi: true },
1227
- { provide: LOCALIZE_FUNCTION, useClass: LocalizeDateFunction, multi: true },
1228
- // Handler providers.
1229
- { provide: LocalizeMissingHandler, useClass: LocalizeMissingHandler },
1230
- // Service providers.
1231
- Localize
1232
- ]
1233
- };
1234
- };
1235
- return LocalizeModule;
1236
- }());
1237
- LocalizeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: LocalizeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1238
- LocalizeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: LocalizeModule, declarations: [BbLocalize,
1239
- BbLocalizeString,
1240
- BbLocalizeTemplate,
1241
- BbLocalizeTemplateOrString], imports: [i1.CommonModule, i1$1.HttpClientModule], exports: [BbLocalize,
1242
- BbLocalizeString,
1243
- BbLocalizeTemplate] });
1244
- LocalizeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: LocalizeModule, imports: [[i1.CommonModule, i1$1.HttpClientModule]] });
1245
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: LocalizeModule, decorators: [{
1246
- type: i0.NgModule,
1247
- args: [{
1248
- imports: [i1.CommonModule, i1$1.HttpClientModule],
1249
- declarations: [
1250
- BbLocalize,
1251
- BbLocalizeString,
1252
- BbLocalizeTemplate,
1253
- BbLocalizeTemplateOrString
1254
- ],
1255
- exports: [
1256
- BbLocalize,
1257
- BbLocalizeString,
1258
- BbLocalizeTemplate
1259
- ]
1260
- }]
1261
- }] });
1262
- function initializeLocale(localize) {
1263
- return localize.initialize();
1264
- }
1265
- function getLocale(localize) {
1266
- return localize.locale;
1210
+ var LocalizeModule = /** @class */ (function () {
1211
+ function LocalizeModule() {
1212
+ }
1213
+ LocalizeModule.forRoot = function (config) {
1214
+ return {
1215
+ ngModule: LocalizeModule,
1216
+ providers: [
1217
+ // Angular providers.
1218
+ { provide: i0.APP_INITIALIZER, deps: [Localize], useFactory: initializeLocale, multi: true },
1219
+ { provide: i0.LOCALE_ID, deps: [Localize], useFactory: getLocale },
1220
+ // Config provider.
1221
+ { provide: LocalizeConfig, useValue: config },
1222
+ // Function providers.
1223
+ { provide: LOCALIZE_FUNCTION, useClass: LocalizeLowercaseFunction, multi: true },
1224
+ { provide: LOCALIZE_FUNCTION, useClass: LocalizeUppercaseFunction, multi: true },
1225
+ { provide: LOCALIZE_FUNCTION, useClass: LocalizeDateFunction, multi: true },
1226
+ // Handler providers.
1227
+ { provide: LocalizeMissingHandler, useClass: LocalizeMissingHandler },
1228
+ // Service providers.
1229
+ Localize
1230
+ ]
1231
+ };
1232
+ };
1233
+ return LocalizeModule;
1234
+ }());
1235
+ LocalizeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: LocalizeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1236
+ LocalizeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: LocalizeModule, declarations: [BbLocalize,
1237
+ BbLocalizeString,
1238
+ BbLocalizeTemplate,
1239
+ BbLocalizeTemplateOrString], imports: [i1.CommonModule, i1$1.HttpClientModule], exports: [BbLocalize,
1240
+ BbLocalizeString,
1241
+ BbLocalizeTemplate] });
1242
+ LocalizeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: LocalizeModule, imports: [[i1.CommonModule, i1$1.HttpClientModule]] });
1243
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: LocalizeModule, decorators: [{
1244
+ type: i0.NgModule,
1245
+ args: [{
1246
+ imports: [i1.CommonModule, i1$1.HttpClientModule],
1247
+ declarations: [
1248
+ BbLocalize,
1249
+ BbLocalizeString,
1250
+ BbLocalizeTemplate,
1251
+ BbLocalizeTemplateOrString
1252
+ ],
1253
+ exports: [
1254
+ BbLocalize,
1255
+ BbLocalizeString,
1256
+ BbLocalizeTemplate
1257
+ ]
1258
+ }]
1259
+ }] });
1260
+ function initializeLocale(localize) {
1261
+ return localize.initialize();
1262
+ }
1263
+ function getLocale(localize) {
1264
+ return localize.locale;
1267
1265
  }
1268
1266
 
1269
- /**
1270
- * Generated bundle index. Do not edit.
1267
+ /**
1268
+ * Generated bundle index. Do not edit.
1271
1269
  */
1272
1270
 
1273
1271
  exports.BbLocalize = BbLocalize;
@@ -1290,5 +1288,5 @@
1290
1288
 
1291
1289
  Object.defineProperty(exports, '__esModule', { value: true });
1292
1290
 
1293
- })));
1291
+ }));
1294
1292
  //# sourceMappingURL=bravobit-bb-foundation-localize.umd.js.map