@bravobit/bb-foundation 0.45.3 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/auth/lib/auth.config.d.ts +0 -2
  2. package/auth/lib/auth.service.d.ts +1 -1
  3. package/auth/lib/directives/authenticated.directive.d.ts +1 -1
  4. package/collections/lib/directives/collections-data-row.directive.d.ts +1 -1
  5. package/collections/lib/directives/collections-data.directive.d.ts +1 -1
  6. package/collections/lib/directives/collections-empty.directive.d.ts +1 -1
  7. package/collections/lib/directives/collections-error.directive.d.ts +1 -1
  8. package/collections/lib/directives/collections-initial.directive.d.ts +1 -1
  9. package/collections/lib/directives/collections-item.directive.d.ts +1 -1
  10. package/dialog/lib/dialog-container/dialog-container.component.d.ts +1 -0
  11. package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +1 -0
  12. package/fesm2022/bravobit-bb-foundation-auth.mjs +44 -50
  13. package/fesm2022/bravobit-bb-foundation-auth.mjs.map +1 -1
  14. package/fesm2022/bravobit-bb-foundation-collections.mjs +69 -75
  15. package/fesm2022/bravobit-bb-foundation-collections.mjs.map +1 -1
  16. package/fesm2022/bravobit-bb-foundation-combobox.mjs +21 -24
  17. package/fesm2022/bravobit-bb-foundation-combobox.mjs.map +1 -1
  18. package/fesm2022/bravobit-bb-foundation-dashboard.mjs +35 -35
  19. package/fesm2022/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  20. package/fesm2022/bravobit-bb-foundation-dialog.mjs +63 -47
  21. package/fesm2022/bravobit-bb-foundation-dialog.mjs.map +1 -1
  22. package/fesm2022/bravobit-bb-foundation-elements.mjs +119 -131
  23. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -1
  24. package/fesm2022/bravobit-bb-foundation-http.mjs +10 -10
  25. package/fesm2022/bravobit-bb-foundation-http.mjs.map +1 -1
  26. package/fesm2022/bravobit-bb-foundation-localize.mjs +25 -32
  27. package/fesm2022/bravobit-bb-foundation-localize.mjs.map +1 -1
  28. package/fesm2022/bravobit-bb-foundation-masking.mjs +19 -22
  29. package/fesm2022/bravobit-bb-foundation-masking.mjs.map +1 -1
  30. package/fesm2022/bravobit-bb-foundation-notifications.mjs +15 -17
  31. package/fesm2022/bravobit-bb-foundation-notifications.mjs.map +1 -1
  32. package/fesm2022/bravobit-bb-foundation-permissions.mjs +11 -12
  33. package/fesm2022/bravobit-bb-foundation-permissions.mjs.map +1 -1
  34. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +11 -11
  35. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  36. package/fesm2022/bravobit-bb-foundation-rxjs.mjs.map +1 -1
  37. package/fesm2022/bravobit-bb-foundation-select.mjs +33 -36
  38. package/fesm2022/bravobit-bb-foundation-select.mjs.map +1 -1
  39. package/fesm2022/bravobit-bb-foundation-storage.mjs +16 -8
  40. package/fesm2022/bravobit-bb-foundation-storage.mjs.map +1 -1
  41. package/fesm2022/bravobit-bb-foundation-table.mjs +29 -31
  42. package/fesm2022/bravobit-bb-foundation-table.mjs.map +1 -1
  43. package/fesm2022/bravobit-bb-foundation-tooltip.mjs +12 -13
  44. package/fesm2022/bravobit-bb-foundation-tooltip.mjs.map +1 -1
  45. package/fesm2022/bravobit-bb-foundation-utils.mjs +20 -24
  46. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -1
  47. package/fesm2022/bravobit-bb-foundation.mjs +21 -21
  48. package/fesm2022/bravobit-bb-foundation.mjs.map +1 -1
  49. package/localize/lib/localize.config.d.ts +0 -1
  50. package/localize/lib/localize.service.d.ts +1 -1
  51. package/localize/lib/views/localize-template.directive.d.ts +1 -1
  52. package/masking/lib/masking.service.d.ts +2 -2
  53. package/notifications/lib/notifications-list/notifications-list.component.d.ts +1 -2
  54. package/package.json +7 -45
  55. package/permissions/lib/directives/permission.directive.d.ts +1 -1
  56. package/select/lib/select/select.component.d.ts +1 -0
  57. package/storage/lib/interfaces/strategy.interface.d.ts +1 -1
  58. package/table/lib/components/table/table.component.d.ts +2 -2
  59. package/esm2022/auth/bravobit-bb-foundation-auth.mjs +0 -5
  60. package/esm2022/auth/lib/auth.config.mjs +0 -16
  61. package/esm2022/auth/lib/auth.interceptor.mjs +0 -87
  62. package/esm2022/auth/lib/auth.module.mjs +0 -25
  63. package/esm2022/auth/lib/auth.service.mjs +0 -261
  64. package/esm2022/auth/lib/auth.session.mjs +0 -142
  65. package/esm2022/auth/lib/directives/authenticated.directive.mjs +0 -78
  66. package/esm2022/auth/lib/guards/anonymous.guard.mjs +0 -29
  67. package/esm2022/auth/lib/guards/authenticated.guard.mjs +0 -32
  68. package/esm2022/auth/lib/helpers/jwt.helper.mjs +0 -67
  69. package/esm2022/auth/lib/interfaces/config.interface.mjs +0 -4
  70. package/esm2022/auth/lib/interfaces/provider.interface.mjs +0 -2
  71. package/esm2022/auth/lib/interfaces/token.interface.mjs +0 -2
  72. package/esm2022/auth/lib/providers/email.provider.mjs +0 -27
  73. package/esm2022/auth/lib/providers/verify.provider.mjs +0 -25
  74. package/esm2022/auth/lib/tokens/use-authorization.token.mjs +0 -3
  75. package/esm2022/auth/public_api.mjs +0 -15
  76. package/esm2022/bravobit-bb-foundation.mjs +0 -5
  77. package/esm2022/collections/bravobit-bb-foundation-collections.mjs +0 -5
  78. package/esm2022/collections/lib/classes/array.collection.mjs +0 -85
  79. package/esm2022/collections/lib/collection.mjs +0 -98
  80. package/esm2022/collections/lib/collections.module.mjs +0 -84
  81. package/esm2022/collections/lib/components/collections-actions/collections-actions.component.mjs +0 -37
  82. package/esm2022/collections/lib/components/collections-grid/collections-grid.component.mjs +0 -52
  83. package/esm2022/collections/lib/components/collections-pager/collections-pager.component.mjs +0 -114
  84. package/esm2022/collections/lib/components/collections-table/collections-table.component.mjs +0 -86
  85. package/esm2022/collections/lib/components/collections-table-label/collections-table-label.component.mjs +0 -30
  86. package/esm2022/collections/lib/components/collections-table-sorting/collections-table-sorting.component.mjs +0 -65
  87. package/esm2022/collections/lib/components/collections-viewer/collections-viewer.component.mjs +0 -37
  88. package/esm2022/collections/lib/directives/collections-data-row.directive.mjs +0 -29
  89. package/esm2022/collections/lib/directives/collections-data.directive.mjs +0 -29
  90. package/esm2022/collections/lib/directives/collections-empty.directive.mjs +0 -29
  91. package/esm2022/collections/lib/directives/collections-error.directive.mjs +0 -29
  92. package/esm2022/collections/lib/directives/collections-initial.directive.mjs +0 -23
  93. package/esm2022/collections/lib/directives/collections-item.directive.mjs +0 -29
  94. package/esm2022/collections/lib/interfaces/array-collection.interface.mjs +0 -2
  95. package/esm2022/collections/lib/interfaces/collection.interface.mjs +0 -2
  96. package/esm2022/collections/lib/providers/api-collection.provider.mjs +0 -103
  97. package/esm2022/collections/lib/providers/collection.provider.mjs +0 -39
  98. package/esm2022/collections/lib/providers/local-collection.provider.mjs +0 -25
  99. package/esm2022/collections/public_api.mjs +0 -22
  100. package/esm2022/combobox/bravobit-bb-foundation-combobox.mjs +0 -5
  101. package/esm2022/combobox/combobox/combobox-container.directive.mjs +0 -137
  102. package/esm2022/combobox/combobox/combobox.component.mjs +0 -118
  103. package/esm2022/combobox/combobox-label.directive.mjs +0 -14
  104. package/esm2022/combobox/combobox-option.directive.mjs +0 -17
  105. package/esm2022/combobox/combobox-panel/combobox-panel.animation.mjs +0 -11
  106. package/esm2022/combobox/combobox-panel/combobox-panel.component.mjs +0 -42
  107. package/esm2022/combobox/combobox.interface.mjs +0 -2
  108. package/esm2022/combobox/public_api.mjs +0 -4
  109. package/esm2022/dashboard/bravobit-bb-foundation-dashboard.mjs +0 -5
  110. package/esm2022/dashboard/lib/dashboard/dashboard.component.mjs +0 -50
  111. package/esm2022/dashboard/lib/dashboard-header/dashboard-header.component.mjs +0 -25
  112. package/esm2022/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +0 -28
  113. package/esm2022/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +0 -32
  114. package/esm2022/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +0 -75
  115. package/esm2022/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +0 -93
  116. package/esm2022/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +0 -60
  117. package/esm2022/dashboard/lib/dashboard.module.mjs +0 -50
  118. package/esm2022/dashboard/public_api.mjs +0 -9
  119. package/esm2022/dialog/bravobit-bb-foundation-dialog.mjs +0 -5
  120. package/esm2022/dialog/lib/dialog-actions/dialog-actions.component.mjs +0 -12
  121. package/esm2022/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +0 -44
  122. package/esm2022/dialog/lib/dialog-container/dialog-container.component.mjs +0 -58
  123. package/esm2022/dialog/lib/dialog-header/dialog-header.component.mjs +0 -15
  124. package/esm2022/dialog/lib/dialog-link/dialog-link.component.mjs +0 -11
  125. package/esm2022/dialog/lib/dialog-modal/dialog-modal.component.mjs +0 -57
  126. package/esm2022/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +0 -53
  127. package/esm2022/dialog/lib/dialog.config.mjs +0 -8
  128. package/esm2022/dialog/lib/dialog.insertion.mjs +0 -18
  129. package/esm2022/dialog/lib/dialog.interfaces.mjs +0 -9
  130. package/esm2022/dialog/lib/dialog.module.mjs +0 -64
  131. package/esm2022/dialog/lib/dialog.ref.mjs +0 -16
  132. package/esm2022/dialog/lib/dialog.service.mjs +0 -75
  133. package/esm2022/dialog/lib/directives/confirm.directive.mjs +0 -48
  134. package/esm2022/dialog/public_api.mjs +0 -12
  135. package/esm2022/elements/bravobit-bb-foundation-elements.mjs +0 -5
  136. package/esm2022/elements/lib/avatar/avatar.component.mjs +0 -175
  137. package/esm2022/elements/lib/button/button.component.mjs +0 -68
  138. package/esm2022/elements/lib/checkbox/checkbox.component.mjs +0 -116
  139. package/esm2022/elements/lib/checkbox-group/checkbox-group.component.mjs +0 -34
  140. package/esm2022/elements/lib/date-picker/date-picker.component.mjs +0 -323
  141. package/esm2022/elements/lib/directives/addon.directive.mjs +0 -27
  142. package/esm2022/elements/lib/directives/extra-error-controls.directive.mjs +0 -41
  143. package/esm2022/elements/lib/directives/file-drop.directive.mjs +0 -62
  144. package/esm2022/elements/lib/directives/form-submit.directive.mjs +0 -54
  145. package/esm2022/elements/lib/directives/form-submitter.directive.mjs +0 -24
  146. package/esm2022/elements/lib/directives/image-upload.directive.mjs +0 -143
  147. package/esm2022/elements/lib/directives/input.directive.mjs +0 -49
  148. package/esm2022/elements/lib/elements.config.mjs +0 -54
  149. package/esm2022/elements/lib/elements.interfaces.mjs +0 -5
  150. package/esm2022/elements/lib/elements.module.mjs +0 -146
  151. package/esm2022/elements/lib/file-picker/file-picker.component.mjs +0 -196
  152. package/esm2022/elements/lib/form-control/form-control.component.mjs +0 -46
  153. package/esm2022/elements/lib/form-error/form-error.component.mjs +0 -106
  154. package/esm2022/elements/lib/form-group/form-group.component.mjs +0 -19
  155. package/esm2022/elements/lib/icon/icon.component.mjs +0 -122
  156. package/esm2022/elements/lib/image-picker/image-picker.component.mjs +0 -126
  157. package/esm2022/elements/lib/multi-file-control/multi-file-control.component.mjs +0 -149
  158. package/esm2022/elements/lib/pipes/date.pipe.mjs +0 -28
  159. package/esm2022/elements/lib/pipes/file-image.pipe.mjs +0 -48
  160. package/esm2022/elements/lib/pipes/file-size.pipe.mjs +0 -27
  161. package/esm2022/elements/lib/pipes/relative-time.pipe.mjs +0 -99
  162. package/esm2022/elements/lib/radio-button/radio-button.component.mjs +0 -60
  163. package/esm2022/elements/lib/radio-group/radio-group.component.mjs +0 -103
  164. package/esm2022/elements/lib/spinner/spinner.component.mjs +0 -22
  165. package/esm2022/elements/public_api.mjs +0 -30
  166. package/esm2022/http/bravobit-bb-foundation-http.mjs +0 -5
  167. package/esm2022/http/lib/classes/http.config.mjs +0 -32
  168. package/esm2022/http/lib/classes/http.error.mjs +0 -20
  169. package/esm2022/http/lib/http.config.mjs +0 -18
  170. package/esm2022/http/lib/http.interfaces.mjs +0 -4
  171. package/esm2022/http/lib/http.module.mjs +0 -31
  172. package/esm2022/http/lib/interceptors/base-url.interceptor.mjs +0 -60
  173. package/esm2022/http/lib/interceptors/error.interceptor.mjs +0 -31
  174. package/esm2022/http/public_api.mjs +0 -8
  175. package/esm2022/lib/core/functions/array.utils.mjs +0 -7
  176. package/esm2022/lib/core/functions/date.utils.mjs +0 -31
  177. package/esm2022/lib/core/functions/password.utils.mjs +0 -17
  178. package/esm2022/lib/core/functions/route-cache.utils.mjs +0 -23
  179. package/esm2022/lib/core/miscellaneous/coercion.mjs +0 -5
  180. package/esm2022/lib/core/miscellaneous/regex.mjs +0 -44
  181. package/esm2022/lib/core/miscellaneous/validator.mjs +0 -85
  182. package/esm2022/lib/core/services/exif.service.mjs +0 -165
  183. package/esm2022/lib/core/services/file-loader.service.mjs +0 -85
  184. package/esm2022/lib/core/services/files.service.mjs +0 -78
  185. package/esm2022/lib/core/services/image-converter.service.mjs +0 -126
  186. package/esm2022/lib/core/services/languages.service.mjs +0 -75
  187. package/esm2022/lib/core/services/network.service.mjs +0 -58
  188. package/esm2022/lib/core/services/patch.service.mjs +0 -66
  189. package/esm2022/lib/core/tokens/accept-language.token.mjs +0 -3
  190. package/esm2022/lib/core/tokens/base-url.token.mjs +0 -3
  191. package/esm2022/lib/core/tokens/cookie.token.mjs +0 -3
  192. package/esm2022/lib/core/tokens/global-focus-mode.token.mjs +0 -10
  193. package/esm2022/lib/core/tokens/location.token.mjs +0 -6
  194. package/esm2022/lib/core/tokens/navigator.token.mjs +0 -6
  195. package/esm2022/lib/core/tokens/window.token.mjs +0 -12
  196. package/esm2022/localize/bravobit-bb-foundation-localize.mjs +0 -5
  197. package/esm2022/localize/lib/dictionary/dictionary.class.mjs +0 -96
  198. package/esm2022/localize/lib/dictionary/dictionary.context.mjs +0 -24
  199. package/esm2022/localize/lib/dictionary/dictionary.data.mjs +0 -7
  200. package/esm2022/localize/lib/functions/date.function.mjs +0 -18
  201. package/esm2022/localize/lib/functions/lowercase.function.mjs +0 -13
  202. package/esm2022/localize/lib/functions/uppercase.function.mjs +0 -13
  203. package/esm2022/localize/lib/handlers/missing.handler.mjs +0 -13
  204. package/esm2022/localize/lib/interfaces/config.interfaces.mjs +0 -2
  205. package/esm2022/localize/lib/interfaces/functions.interfaces.mjs +0 -8
  206. package/esm2022/localize/lib/interfaces/handlers.interfaces.mjs +0 -2
  207. package/esm2022/localize/lib/interfaces/options.interfaces.mjs +0 -6
  208. package/esm2022/localize/lib/localizations/dutch.localization.mjs +0 -64
  209. package/esm2022/localize/lib/localizations/english.localization.mjs +0 -64
  210. package/esm2022/localize/lib/localizations/papiamento.localization.mjs +0 -64
  211. package/esm2022/localize/lib/localizations/spanish.localization.mjs +0 -64
  212. package/esm2022/localize/lib/localize.config.mjs +0 -43
  213. package/esm2022/localize/lib/localize.module.mjs +0 -39
  214. package/esm2022/localize/lib/localize.pipe.mjs +0 -48
  215. package/esm2022/localize/lib/localize.service.mjs +0 -172
  216. package/esm2022/localize/lib/localize.tokens.mjs +0 -18
  217. package/esm2022/localize/lib/transforms/abstract.transform.mjs +0 -30
  218. package/esm2022/localize/lib/transforms/interpolate.transform.mjs +0 -45
  219. package/esm2022/localize/lib/transforms/plural.transform.mjs +0 -49
  220. package/esm2022/localize/lib/transforms/reference.transform.mjs +0 -19
  221. package/esm2022/localize/lib/views/localize-string/localize-string.component.mjs +0 -89
  222. package/esm2022/localize/lib/views/localize-template.directive.mjs +0 -23
  223. package/esm2022/localize/public_api.mjs +0 -27
  224. package/esm2022/masking/bravobit-bb-foundation-masking.mjs +0 -5
  225. package/esm2022/masking/lib/directives/currency-mask.directive.mjs +0 -41
  226. package/esm2022/masking/lib/directives/date-mask.directive.mjs +0 -41
  227. package/esm2022/masking/lib/directives/input-mask.directive.mjs +0 -126
  228. package/esm2022/masking/lib/input-mask.interface.mjs +0 -2
  229. package/esm2022/masking/lib/masking.module.mjs +0 -30
  230. package/esm2022/masking/lib/masking.service.mjs +0 -104
  231. package/esm2022/masking/public_api.mjs +0 -7
  232. package/esm2022/notifications/bravobit-bb-foundation-notifications.mjs +0 -5
  233. package/esm2022/notifications/lib/notifications-item/notifications-item.component.mjs +0 -112
  234. package/esm2022/notifications/lib/notifications-list/notifications-list.component.mjs +0 -48
  235. package/esm2022/notifications/lib/notifications.animations.mjs +0 -28
  236. package/esm2022/notifications/lib/notifications.config.mjs +0 -8
  237. package/esm2022/notifications/lib/notifications.interfaces.mjs +0 -31
  238. package/esm2022/notifications/lib/notifications.module.mjs +0 -20
  239. package/esm2022/notifications/lib/notifications.service.mjs +0 -161
  240. package/esm2022/notifications/public_api.mjs +0 -5
  241. package/esm2022/permissions/bravobit-bb-foundation-permissions.mjs +0 -5
  242. package/esm2022/permissions/lib/directives/permission.directive.mjs +0 -95
  243. package/esm2022/permissions/lib/guards/permission.guard.mjs +0 -25
  244. package/esm2022/permissions/lib/handlers/abstract.handler.mjs +0 -3
  245. package/esm2022/permissions/lib/handlers/local.handler.mjs +0 -29
  246. package/esm2022/permissions/lib/permissions.config.mjs +0 -20
  247. package/esm2022/permissions/lib/permissions.interface.mjs +0 -8
  248. package/esm2022/permissions/lib/permissions.module.mjs +0 -25
  249. package/esm2022/permissions/lib/permissions.service.mjs +0 -100
  250. package/esm2022/permissions/public_api.mjs +0 -9
  251. package/esm2022/public_api.mjs +0 -25
  252. package/esm2022/recaptcha/bravobit-bb-foundation-recaptcha.mjs +0 -5
  253. package/esm2022/recaptcha/lib/recaptcha/recaptcha.component.mjs +0 -225
  254. package/esm2022/recaptcha/lib/recaptcha-loader.service.mjs +0 -80
  255. package/esm2022/recaptcha/lib/recaptcha.config.mjs +0 -8
  256. package/esm2022/recaptcha/lib/recaptcha.interface.mjs +0 -3
  257. package/esm2022/recaptcha/lib/recaptcha.module.mjs +0 -27
  258. package/esm2022/recaptcha/public_api.mjs +0 -6
  259. package/esm2022/rxjs/bravobit-bb-foundation-rxjs.mjs +0 -5
  260. package/esm2022/rxjs/lib/observables/get-control-value.observable.mjs +0 -6
  261. package/esm2022/rxjs/lib/observables/get-route-param.observable.mjs +0 -5
  262. package/esm2022/rxjs/lib/operators/combine-latest-map.operator.mjs +0 -10
  263. package/esm2022/rxjs/lib/operators/filter-nil.operator.mjs +0 -5
  264. package/esm2022/rxjs/public_api.mjs +0 -5
  265. package/esm2022/select/bravobit-bb-foundation-select.mjs +0 -5
  266. package/esm2022/select/lib/select/select.component.mjs +0 -288
  267. package/esm2022/select/lib/select-label.directive.mjs +0 -18
  268. package/esm2022/select/lib/select-multi-label.directive.mjs +0 -18
  269. package/esm2022/select/lib/select-option-group.directive.mjs +0 -18
  270. package/esm2022/select/lib/select-option.directive.mjs +0 -18
  271. package/esm2022/select/lib/select.config.mjs +0 -8
  272. package/esm2022/select/lib/select.module.mjs +0 -46
  273. package/esm2022/select/public_api.mjs +0 -8
  274. package/esm2022/storage/bravobit-bb-foundation-storage.mjs +0 -5
  275. package/esm2022/storage/lib/interfaces/attributes.interface.mjs +0 -2
  276. package/esm2022/storage/lib/interfaces/memory.interface.mjs +0 -2
  277. package/esm2022/storage/lib/interfaces/strategy.interface.mjs +0 -2
  278. package/esm2022/storage/lib/storage.service.mjs +0 -113
  279. package/esm2022/storage/lib/strategies/cookie-storage.strategy.mjs +0 -144
  280. package/esm2022/storage/lib/strategies/memory-storage.strategy.mjs +0 -54
  281. package/esm2022/storage/lib/strategies/polyfill-storage.strategy.mjs +0 -100
  282. package/esm2022/storage/public_api.mjs +0 -8
  283. package/esm2022/table/bravobit-bb-foundation-table.mjs +0 -5
  284. package/esm2022/table/lib/components/table/table.component.mjs +0 -200
  285. package/esm2022/table/lib/components/table-cell/table-cell.component.mjs +0 -11
  286. package/esm2022/table/lib/components/table-header-cell/table-header-cell.component.mjs +0 -135
  287. package/esm2022/table/lib/components/table-pager/table-pager.component.mjs +0 -136
  288. package/esm2022/table/lib/data/datasource.data.mjs +0 -30
  289. package/esm2022/table/lib/data/generic.data.mjs +0 -84
  290. package/esm2022/table/lib/interfaces/datasource.interface.mjs +0 -2
  291. package/esm2022/table/lib/interfaces/table.interfaces.mjs +0 -2
  292. package/esm2022/table/lib/table.module.mjs +0 -44
  293. package/esm2022/table/public_api.mjs +0 -10
  294. package/esm2022/tooltip/bravobit-bb-foundation-tooltip.mjs +0 -5
  295. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +0 -23
  296. package/esm2022/tooltip/lib/tooltip.directive.mjs +0 -130
  297. package/esm2022/tooltip/lib/tooltip.interfaces.mjs +0 -4
  298. package/esm2022/tooltip/lib/tooltip.module.mjs +0 -16
  299. package/esm2022/tooltip/public_api.mjs +0 -5
  300. package/esm2022/utils/bravobit-bb-foundation-utils.mjs +0 -5
  301. package/esm2022/utils/lib/directives/autosize.directive.mjs +0 -76
  302. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +0 -80
  303. package/esm2022/utils/lib/directives/focus.directive.mjs +0 -57
  304. package/esm2022/utils/lib/directives/template.directive.mjs +0 -33
  305. package/esm2022/utils/lib/utils.module.mjs +0 -35
  306. package/esm2022/utils/public_api.mjs +0 -6
@@ -108,10 +108,10 @@ class BaseUrlInterceptor {
108
108
  }
109
109
  return null;
110
110
  }
111
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BaseUrlInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
112
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BaseUrlInterceptor });
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BaseUrlInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
112
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BaseUrlInterceptor });
113
113
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BaseUrlInterceptor, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BaseUrlInterceptor, decorators: [{
115
115
  type: Injectable
116
116
  }] });
117
117
 
@@ -132,10 +132,10 @@ class ErrorInterceptor {
132
132
  return throwError(() => error);
133
133
  }));
134
134
  }
135
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
136
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorInterceptor });
135
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
136
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ErrorInterceptor });
137
137
  }
138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorInterceptor, decorators: [{
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ErrorInterceptor, decorators: [{
139
139
  type: Injectable
140
140
  }] });
141
141
 
@@ -167,11 +167,11 @@ class HttpModule {
167
167
  ]
168
168
  };
169
169
  }
170
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: HttpModule, deps: [{ token: HttpModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
171
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: HttpModule });
172
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: HttpModule });
170
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: HttpModule, deps: [{ token: HttpModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
171
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: HttpModule });
172
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: HttpModule });
173
173
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: HttpModule, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: HttpModule, decorators: [{
175
175
  type: NgModule
176
176
  }], ctorParameters: () => [{ type: HttpModule, decorators: [{
177
177
  type: Optional
@@ -1 +1 @@
1
- {"version":3,"file":"bravobit-bb-foundation-http.mjs","sources":["../../../projects/bb-foundation/http/src/lib/http.interfaces.ts","../../../projects/bb-foundation/http/src/lib/classes/http.config.ts","../../../projects/bb-foundation/http/src/lib/classes/http.error.ts","../../../projects/bb-foundation/http/src/lib/interceptors/base-url.interceptor.ts","../../../projects/bb-foundation/http/src/lib/interceptors/error.interceptor.ts","../../../projects/bb-foundation/http/src/lib/http.config.ts","../../../projects/bb-foundation/http/src/lib/http.module.ts","../../../projects/bb-foundation/http/src/bravobit-bb-foundation-http.ts"],"sourcesContent":["import {HttpConfig} from './classes/http.config';\nimport {InjectionToken} from '@angular/core';\n\nexport interface HttpConfigData {\n url: HttpConfigUrl;\n alias?: {\n prefix?: string;\n standard?: string;\n };\n disableErrorParsing?: boolean;\n}\n\nexport type HttpConfigPlatformUrl = string | { browser: string, server: string };\nexport type HttpConfigAlias = { alias: string, url: HttpConfigPlatformUrl };\nexport type HttpConfigUrl = HttpConfigPlatformUrl | HttpConfigAlias[];\n\nexport const HTTP_CONFIG = new InjectionToken<HttpConfig>('http config');\nexport const HTTP_CONFIG_DATA = new InjectionToken<HttpConfigData>('http config data');\n","import {HttpConfigAlias, HttpConfigData, HttpConfigUrl} from '../http.interfaces';\n\ndeclare let ngDevMode;\n\nexport class HttpConfig {\n\n readonly aliases: HttpConfigAlias[];\n readonly prefix: string;\n readonly defaultAlias: string;\n readonly disableErrorParsing: boolean;\n\n constructor(data: HttpConfigData) {\n // Get the data from the config.\n this.prefix = data?.alias?.prefix ?? '$';\n this.disableErrorParsing = data?.disableErrorParsing ?? false;\n\n // Parse the aliases.\n const standardAlias = data?.alias?.standard ?? 'api';\n this.aliases = this.parseAliases(data?.url, standardAlias);\n\n // Get the default alias.\n const firstAvailableAlias = this.aliases?.[0]?.alias ?? null;\n this.defaultAlias = `${this.prefix}${firstAvailableAlias}`;\n }\n\n private parseAliases = (value: HttpConfigUrl, standardAlias: string) => {\n if (!Array.isArray(value)) {\n value = [{alias: standardAlias, url: value}];\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const stringRegex = /^[a-zA-Z]+$/;\n for (const item of value) {\n if (!!item?.alias && !stringRegex.test(item?.alias)) {\n console?.warn?.(`[HttpModule]: Invalid HTTP-alias in HttpConfig named \"${item?.alias}\"; only latin characters should be used.`);\n }\n }\n }\n\n return value;\n };\n\n}\n","import {HttpErrorResponse} from '@angular/common/http';\n\nexport class HttpError extends HttpErrorResponse {\n\n constructor(error: HttpErrorResponse) {\n super(error);\n }\n\n get<T = any>(token: string, delimiter: string = '.') {\n const error = this.error ?? {};\n return (token ?? '')\n .split(delimiter)\n .reduce((previous, current) => previous?.[current] ? previous?.[current] : null, error) as T;\n }\n\n has(token: string, delimiter: string = '.') {\n return !!this.get(token, delimiter);\n }\n\n includes<T = any>(token: string, value: T) {\n const array = this.get<T[]>(token);\n return (array ?? []).includes(value);\n }\n\n}\n","import {HTTP_CONFIG, HttpConfigAlias, HttpConfigPlatformUrl} from '../http.interfaces';\nimport {HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {HttpConfig} from '../classes/http.config';\nimport {isPlatformServer} from '@angular/common';\n\ndeclare let ngDevMode;\n\n@Injectable()\nexport class BaseUrlInterceptor implements HttpInterceptor {\n\n // Dependencies.\n private readonly _config: HttpConfig = inject(HTTP_CONFIG);\n private readonly _platformId: Object = inject(PLATFORM_ID);\n\n // Aliases.\n private readonly _aliases: HttpConfigAlias[] = this._config?.aliases;\n private readonly _prefix: string = this._config?.prefix;\n private readonly _extractRegex: RegExp = new RegExp(`\\\\${this._prefix}[a-zA-Z]+`);\n\n intercept(request: HttpRequest<unknown>, next: HttpHandler) {\n const url = this.getUrlBasedOnAlias(request.url);\n const modified = request.clone({url});\n\n return next.handle(modified);\n }\n\n private getUrlBasedOnAlias(url: string) {\n const matches = this._extractRegex.exec(url);\n if (!matches) {\n return url;\n }\n\n return matches.reduce((previous, current) => {\n const alias = this.getAlias(current);\n const stringAlias = this.convertUrlToString(alias?.url);\n if (!stringAlias) {\n return previous;\n }\n\n return previous.replace(current, stringAlias);\n }, url);\n }\n\n private convertUrlToString(url: HttpConfigPlatformUrl) {\n if (typeof url === 'string') {\n return url;\n }\n\n return isPlatformServer(this._platformId)\n ? url?.server ?? url?.browser ?? null\n : url?.browser ?? null;\n }\n\n private getAlias(value: string) {\n const alias = value.replace(this._prefix, '');\n const fetched = this._aliases?.find(item => item.alias === alias) ?? null;\n if (fetched) {\n return fetched;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const available = this._aliases\n .map(item => `\\$${item?.alias}`)\n .join(', ');\n console?.warn?.(`[HttpModule]: Used an invalid HTTP-alias named \"${value}\", skipped parsing; Available aliases is one of (${available}).`);\n }\n\n return null;\n }\n\n}\n","import {HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {HttpConfig} from '../classes/http.config';\nimport {inject, Injectable} from '@angular/core';\nimport {HttpError} from '../classes/http.error';\nimport {HTTP_CONFIG} from '../http.interfaces';\nimport {catchError} from 'rxjs/operators';\nimport {throwError} from 'rxjs';\n\n@Injectable()\nexport class ErrorInterceptor implements HttpInterceptor {\n\n // Dependencies.\n private readonly _config: HttpConfig = inject(HTTP_CONFIG);\n\n // State.\n private readonly _disabled = this._config?.disableErrorParsing ?? false;\n\n intercept(request: HttpRequest<unknown>, next: HttpHandler) {\n return next.handle(request).pipe(\n catchError(error => {\n // If we have a matching http error response\n // re-map it with our custom class (if not disabled).\n if (!this._disabled && error instanceof HttpErrorResponse) {\n const parsed = new HttpError(error);\n return throwError(() => parsed);\n }\n\n // We did not match anything, just re-trow the error.\n return throwError(() => error);\n })\n );\n }\n\n}\n","import {HTTP_CONFIG, HTTP_CONFIG_DATA, HttpConfigData} from './http.interfaces';\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\nimport {BaseUrlInterceptor} from './interceptors/base-url.interceptor';\nimport {ErrorInterceptor} from './interceptors/error.interceptor';\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\nimport {HttpConfig} from './classes/http.config';\n\nexport function provideHttpConfig(config: HttpConfigData): EnvironmentProviders {\n return makeEnvironmentProviders([\n {provide: HTTP_CONFIG_DATA, useValue: config},\n {provide: HTTP_CONFIG, useFactory: createHttpConfig, deps: [HTTP_CONFIG_DATA]},\n {provide: HTTP_INTERCEPTORS, useClass: BaseUrlInterceptor, multi: true},\n {provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true}\n ]);\n}\n\nexport function createHttpConfig(data: HttpConfigData) {\n return new HttpConfig(data);\n}\n","import {ModuleWithProviders, NgModule, Optional, SkipSelf} from '@angular/core';\nimport {HttpConfigData} from './http.interfaces';\nimport {provideHttpConfig} from './http.config';\n\n@NgModule()\nexport class HttpModule {\n\n constructor(@Optional() @SkipSelf() private _parent?: HttpModule) {\n if (this._parent) {\n throw new Error('HttpModule is already loaded; Import it in the core module only.');\n }\n }\n\n static forRoot(config: HttpConfigData): ModuleWithProviders<HttpModule> {\n return {\n ngModule: HttpModule,\n providers: [\n provideHttpConfig(config)\n ]\n };\n }\n\n}\n","/**\n * Generated bundle index. Do not edit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,OAAO,CAAa;AAC5D,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AACd,YAAA,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;SACvF;KACJ;IAED,OAAO,OAAO,CAAC,MAAsB,EAAA;QACjC,OAAO;AACH,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,SAAS,EAAE;gBACP,iBAAiB,CAAC,MAAM,CAAC;AAC5B,aAAA;SACJ,CAAC;KACL;wGAfQ,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAV,UAAU,EAAA,CAAA,CAAA;yGAAV,UAAU,EAAA,CAAA,CAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB,QAAQ;;0BAGQ,QAAQ;;0BAAI,QAAQ;;;ACPrC;;AAEG;;;;"}
1
+ {"version":3,"file":"bravobit-bb-foundation-http.mjs","sources":["../../../projects/bb-foundation/http/src/lib/http.interfaces.ts","../../../projects/bb-foundation/http/src/lib/classes/http.config.ts","../../../projects/bb-foundation/http/src/lib/classes/http.error.ts","../../../projects/bb-foundation/http/src/lib/interceptors/base-url.interceptor.ts","../../../projects/bb-foundation/http/src/lib/interceptors/error.interceptor.ts","../../../projects/bb-foundation/http/src/lib/http.config.ts","../../../projects/bb-foundation/http/src/lib/http.module.ts","../../../projects/bb-foundation/http/src/bravobit-bb-foundation-http.ts"],"sourcesContent":["import {HttpConfig} from './classes/http.config';\nimport {InjectionToken} from '@angular/core';\n\nexport interface HttpConfigData {\n url: HttpConfigUrl;\n alias?: {\n prefix?: string;\n standard?: string;\n };\n disableErrorParsing?: boolean;\n}\n\nexport type HttpConfigPlatformUrl = string | { browser: string, server: string };\nexport type HttpConfigAlias = { alias: string, url: HttpConfigPlatformUrl };\nexport type HttpConfigUrl = HttpConfigPlatformUrl | HttpConfigAlias[];\n\nexport const HTTP_CONFIG = new InjectionToken<HttpConfig>('http config');\nexport const HTTP_CONFIG_DATA = new InjectionToken<HttpConfigData>('http config data');\n","import {HttpConfigAlias, HttpConfigData, HttpConfigUrl} from '../http.interfaces';\n\ndeclare let ngDevMode;\n\nexport class HttpConfig {\n\n readonly aliases: HttpConfigAlias[];\n readonly prefix: string;\n readonly defaultAlias: string;\n readonly disableErrorParsing: boolean;\n\n constructor(data: HttpConfigData) {\n // Get the data from the config.\n this.prefix = data?.alias?.prefix ?? '$';\n this.disableErrorParsing = data?.disableErrorParsing ?? false;\n\n // Parse the aliases.\n const standardAlias = data?.alias?.standard ?? 'api';\n this.aliases = this.parseAliases(data?.url, standardAlias);\n\n // Get the default alias.\n const firstAvailableAlias = this.aliases?.[0]?.alias ?? null;\n this.defaultAlias = `${this.prefix}${firstAvailableAlias}`;\n }\n\n private parseAliases = (value: HttpConfigUrl, standardAlias: string) => {\n if (!Array.isArray(value)) {\n value = [{alias: standardAlias, url: value}];\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const stringRegex = /^[a-zA-Z]+$/;\n for (const item of value) {\n if (!!item?.alias && !stringRegex.test(item?.alias)) {\n console?.warn?.(`[HttpModule]: Invalid HTTP-alias in HttpConfig named \"${item?.alias}\"; only latin characters should be used.`);\n }\n }\n }\n\n return value;\n };\n\n}\n","import {HttpErrorResponse} from '@angular/common/http';\n\nexport class HttpError extends HttpErrorResponse {\n\n constructor(error: HttpErrorResponse) {\n super(error);\n }\n\n get<T = any>(token: string, delimiter: string = '.') {\n const error = this.error ?? {};\n return (token ?? '')\n .split(delimiter)\n .reduce((previous, current) => previous?.[current] ? previous?.[current] : null, error) as T;\n }\n\n has(token: string, delimiter: string = '.') {\n return !!this.get(token, delimiter);\n }\n\n includes<T = any>(token: string, value: T) {\n const array = this.get<T[]>(token);\n return (array ?? []).includes(value);\n }\n\n}\n","import {HTTP_CONFIG, HttpConfigAlias, HttpConfigPlatformUrl} from '../http.interfaces';\nimport {HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {HttpConfig} from '../classes/http.config';\nimport {isPlatformServer} from '@angular/common';\n\ndeclare let ngDevMode;\n\n@Injectable()\nexport class BaseUrlInterceptor implements HttpInterceptor {\n\n // Dependencies.\n private readonly _config: HttpConfig = inject(HTTP_CONFIG);\n private readonly _platformId: Object = inject(PLATFORM_ID);\n\n // Aliases.\n private readonly _aliases: HttpConfigAlias[] = this._config?.aliases;\n private readonly _prefix: string = this._config?.prefix;\n private readonly _extractRegex: RegExp = new RegExp(`\\\\${this._prefix}[a-zA-Z]+`);\n\n intercept(request: HttpRequest<unknown>, next: HttpHandler) {\n const url = this.getUrlBasedOnAlias(request.url);\n const modified = request.clone({url});\n\n return next.handle(modified);\n }\n\n private getUrlBasedOnAlias(url: string) {\n const matches = this._extractRegex.exec(url);\n if (!matches) {\n return url;\n }\n\n return matches.reduce((previous, current) => {\n const alias = this.getAlias(current);\n const stringAlias = this.convertUrlToString(alias?.url);\n if (!stringAlias) {\n return previous;\n }\n\n return previous.replace(current, stringAlias);\n }, url);\n }\n\n private convertUrlToString(url: HttpConfigPlatformUrl) {\n if (typeof url === 'string') {\n return url;\n }\n\n return isPlatformServer(this._platformId)\n ? url?.server ?? url?.browser ?? null\n : url?.browser ?? null;\n }\n\n private getAlias(value: string) {\n const alias = value.replace(this._prefix, '');\n const fetched = this._aliases?.find(item => item.alias === alias) ?? null;\n if (fetched) {\n return fetched;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const available = this._aliases\n .map(item => `\\$${item?.alias}`)\n .join(', ');\n console?.warn?.(`[HttpModule]: Used an invalid HTTP-alias named \"${value}\", skipped parsing; Available aliases is one of (${available}).`);\n }\n\n return null;\n }\n\n}\n","import {HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {HttpConfig} from '../classes/http.config';\nimport {inject, Injectable} from '@angular/core';\nimport {HttpError} from '../classes/http.error';\nimport {HTTP_CONFIG} from '../http.interfaces';\nimport {catchError} from 'rxjs/operators';\nimport {throwError} from 'rxjs';\n\n@Injectable()\nexport class ErrorInterceptor implements HttpInterceptor {\n\n // Dependencies.\n private readonly _config: HttpConfig = inject(HTTP_CONFIG);\n\n // State.\n private readonly _disabled = this._config?.disableErrorParsing ?? false;\n\n intercept(request: HttpRequest<unknown>, next: HttpHandler) {\n return next.handle(request).pipe(\n catchError(error => {\n // If we have a matching http error response\n // re-map it with our custom class (if not disabled).\n if (!this._disabled && error instanceof HttpErrorResponse) {\n const parsed = new HttpError(error);\n return throwError(() => parsed);\n }\n\n // We did not match anything, just re-trow the error.\n return throwError(() => error);\n })\n );\n }\n\n}\n","import {HTTP_CONFIG, HTTP_CONFIG_DATA, HttpConfigData} from './http.interfaces';\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\nimport {BaseUrlInterceptor} from './interceptors/base-url.interceptor';\nimport {ErrorInterceptor} from './interceptors/error.interceptor';\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\nimport {HttpConfig} from './classes/http.config';\n\nexport function provideHttpConfig(config: HttpConfigData): EnvironmentProviders {\n return makeEnvironmentProviders([\n {provide: HTTP_CONFIG_DATA, useValue: config},\n {provide: HTTP_CONFIG, useFactory: createHttpConfig, deps: [HTTP_CONFIG_DATA]},\n {provide: HTTP_INTERCEPTORS, useClass: BaseUrlInterceptor, multi: true},\n {provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true}\n ]);\n}\n\nexport function createHttpConfig(data: HttpConfigData) {\n return new HttpConfig(data);\n}\n","import {ModuleWithProviders, NgModule, Optional, SkipSelf} from '@angular/core';\nimport {HttpConfigData} from './http.interfaces';\nimport {provideHttpConfig} from './http.config';\n\n@NgModule()\nexport class HttpModule {\n\n constructor(@Optional() @SkipSelf() private _parent?: HttpModule) {\n if (this._parent) {\n throw new Error('HttpModule is already loaded; Import it in the core module only.');\n }\n }\n\n static forRoot(config: HttpConfigData): ModuleWithProviders<HttpModule> {\n return {\n ngModule: HttpModule,\n providers: [\n provideHttpConfig(config)\n ]\n };\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAgBa,WAAW,GAAG,IAAI,cAAc,CAAa,aAAa;MAC1D,gBAAgB,GAAG,IAAI,cAAc,CAAiB,kBAAkB;;MCbxE,UAAU,CAAA;AAEV,IAAA,OAAO;AACP,IAAA,MAAM;AACN,IAAA,YAAY;AACZ,IAAA,mBAAmB;AAE5B,IAAA,WAAA,CAAY,IAAoB,EAAA;;QAE5B,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,EAAE,mBAAmB,IAAI,KAAK;;QAG7D,MAAM,aAAa,GAAG,IAAI,EAAE,KAAK,EAAE,QAAQ,IAAI,KAAK;AACpD,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,aAAa,CAAC;;AAG1D,QAAA,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,KAAK,IAAI,IAAI;QAC5D,IAAI,CAAC,YAAY,GAAG,CAAG,EAAA,IAAI,CAAC,MAAM,CAAA,EAAG,mBAAmB,CAAA,CAAE;;AAGtD,IAAA,YAAY,GAAG,CAAC,KAAoB,EAAE,aAAqB,KAAI;QACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACxB,YAAA,KAAK,GAAG,CAAC,EAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,KAAK,EAAC,CAAC;;AAG/C,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;YAC/C,MAAM,WAAW,GAA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AA,QAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAV,UAAU,EAAA,CAAA;wGAAV,UAAU,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB;;0BAGgB;;0BAAY;;;ACP7B;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { formatDate, DOCUMENT } from '@angular/common';
2
2
  import { map, distinctUntilChanged, startWith } from 'rxjs/operators';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, Injectable, InjectionToken, LOCALE_ID, Directive, Input, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, Pipe, Optional, APP_INITIALIZER, makeEnvironmentProviders, NgModule } from '@angular/core';
4
+ import { inject, Injectable, InjectionToken, LOCALE_ID, Directive, Input, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, Pipe, Optional, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
5
5
  import { Languages, WINDOW } from '@bravobit/bb-foundation';
6
6
  import { Storage } from '@bravobit/bb-foundation/storage';
7
7
  import { BehaviorSubject, of, Subscription } from 'rxjs';
@@ -556,11 +556,9 @@ class Localize {
556
556
  }
557
557
  return this._loadedDictionaries.get(id);
558
558
  }
559
- initialize() {
560
- return async () => {
561
- await this.switch(this._bestMatchingLanguage?.id, { reload: false, cache: false });
562
- return this.compareDictionaries();
563
- };
559
+ async initialize() {
560
+ await this.switch(this._bestMatchingLanguage?.id, { reload: false, cache: false });
561
+ return this.compareDictionaries();
564
562
  }
565
563
  clear() {
566
564
  this._storage.cookie.remove(this._storageToken);
@@ -641,10 +639,10 @@ class Localize {
641
639
  // If the parameter is a string fill in the blanks.
642
640
  return { token: tokenOrParams, optional: false, dictionary: null, data: {} };
643
641
  };
644
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: Localize, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
645
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: Localize, providedIn: 'root' });
642
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Localize, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
643
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Localize, providedIn: 'root' });
646
644
  }
647
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: Localize, decorators: [{
645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Localize, decorators: [{
648
646
  type: Injectable,
649
647
  args: [{
650
648
  providedIn: 'root'
@@ -776,14 +774,13 @@ class BbLocalizeTemplate {
776
774
  constructor(templateRef) {
777
775
  this.templateRef = templateRef;
778
776
  }
779
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BbLocalizeTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
780
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: BbLocalizeTemplate, isStandalone: true, selector: "[bbLocalizeTemplate]", inputs: { name: ["bbLocalizeTemplate", "name"] }, ngImport: i0 });
777
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BbLocalizeTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
778
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: BbLocalizeTemplate, isStandalone: true, selector: "ng-template[bbLocalizeTemplate]", inputs: { name: ["bbLocalizeTemplate", "name"] }, ngImport: i0 });
781
779
  }
782
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BbLocalizeTemplate, decorators: [{
780
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BbLocalizeTemplate, decorators: [{
783
781
  type: Directive,
784
782
  args: [{
785
- selector: '[bbLocalizeTemplate]',
786
- standalone: true
783
+ selector: 'ng-template[bbLocalizeTemplate]'
787
784
  }]
788
785
  }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { name: [{
789
786
  type: Input,
@@ -857,12 +854,12 @@ class BbLocalizeString {
857
854
  end.replace(escape, '\\$&')
858
855
  ];
859
856
  }
860
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BbLocalizeString, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
861
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: BbLocalizeString, isStandalone: true, selector: "[bb-localize-string]", inputs: { substitutions: "substitutions", value: ["bb-localize-string", "value"] }, host: { classAttribute: "bb-localize-string" }, queries: [{ propertyName: "items", predicate: BbLocalizeTemplate }], ngImport: i0, template: "@for (component of components; track component) {\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
857
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BbLocalizeString, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
858
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: BbLocalizeString, isStandalone: true, selector: "[bb-localize-string]", inputs: { substitutions: "substitutions", value: ["bb-localize-string", "value"] }, host: { classAttribute: "bb-localize-string" }, queries: [{ propertyName: "items", predicate: BbLocalizeTemplate }], ngImport: i0, template: "@for (component of components; track component) {\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
862
859
  }
863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BbLocalizeString, decorators: [{
860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BbLocalizeString, decorators: [{
864
861
  type: Component,
865
- args: [{ selector: '[bb-localize-string]', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'bb-localize-string' }, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, standalone: true, imports: [BbTemplate], template: "@for (component of components; track component) {\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n}\n" }]
862
+ args: [{ selector: '[bb-localize-string]', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'bb-localize-string' }, encapsulation: ViewEncapsulation.None, imports: [BbTemplate], template: "@for (component of components; track component) {\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n}\n" }]
866
863
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { items: [{
867
864
  type: ContentChildren,
868
865
  args: [BbLocalizeTemplate]
@@ -905,14 +902,13 @@ class BbLocalize {
905
902
  // Return the combined params and options.
906
903
  return { ...params, ...options };
907
904
  }
908
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BbLocalize, deps: [{ token: Localize, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
909
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: BbLocalize, isStandalone: true, name: "bbLocalize" });
905
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BbLocalize, deps: [{ token: Localize, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
906
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: BbLocalize, isStandalone: true, name: "bbLocalize" });
910
907
  }
911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BbLocalize, decorators: [{
908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BbLocalize, decorators: [{
912
909
  type: Pipe,
913
910
  args: [{
914
- name: 'bbLocalize',
915
- standalone: true
911
+ name: 'bbLocalize'
916
912
  }]
917
913
  }], ctorParameters: () => [{ type: Localize, decorators: [{
918
914
  type: Optional
@@ -928,7 +924,7 @@ function provideLocalizeConfig(config) {
928
924
  const mode = config?.mode ?? 'automatic';
929
925
  const automaticProviders = mode === 'automatic'
930
926
  ? [
931
- { provide: APP_INITIALIZER, deps: [Localize], useFactory: initializeLocale, multi: true },
927
+ provideAppInitializer(() => inject(Localize).initialize()),
932
928
  { provide: LOCALE_ID, deps: [Localize], useFactory: getLocale }
933
929
  ]
934
930
  : [];
@@ -944,9 +940,6 @@ function provideLocalizeConfig(config) {
944
940
  { provide: LOCALIZE_MISSING_HANDLER, useClass: LocalizeMissingHandler }
945
941
  ]);
946
942
  }
947
- function initializeLocale(localize) {
948
- return localize.initialize();
949
- }
950
943
  function getLocale(localize) {
951
944
  return localize?.current?.locale ?? null;
952
945
  }
@@ -960,15 +953,15 @@ class LocalizeModule {
960
953
  ]
961
954
  };
962
955
  }
963
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: LocalizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
964
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: LocalizeModule, imports: [BbLocalize,
956
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LocalizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
957
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: LocalizeModule, imports: [BbLocalize,
965
958
  BbLocalizeString,
966
959
  BbLocalizeTemplate], exports: [BbLocalize,
967
960
  BbLocalizeString,
968
961
  BbLocalizeTemplate] });
969
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: LocalizeModule });
962
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LocalizeModule });
970
963
  }
971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: LocalizeModule, decorators: [{
964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LocalizeModule, decorators: [{
972
965
  type: NgModule,
973
966
  args: [{
974
967
  imports: [
@@ -988,5 +981,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
988
981
  * Generated bundle index. Do not edit.
989
982
  */
990
983
 
991
- export { BbLocalize, BbLocalizeString, BbLocalizeTemplate, LOCALIZE_CONFIG, LOCALIZE_FUNCTION, LOCALIZE_ID, LOCALIZE_MISSING_HANDLER, LOCALIZE_TRANSFORM, Localize, LocalizeDateFunction, LocalizeDictionary, LocalizeDictionaryContext, LocalizeDictionaryData, LocalizeInterpolateTransform, LocalizeLowercaseFunction, LocalizeMissingHandler, LocalizeModule, LocalizePluralTransform, LocalizeReferenceTransform, LocalizeTransform, LocalizeUppercaseFunction, extraDutchDictionary, extraEnglishDictionary, extraPapiamentoDictionary, extraSpanishDictionary, getLocale, initializeLocale, provideLocalizeConfig };
984
+ export { BbLocalize, BbLocalizeString, BbLocalizeTemplate, LOCALIZE_CONFIG, LOCALIZE_FUNCTION, LOCALIZE_ID, LOCALIZE_MISSING_HANDLER, LOCALIZE_TRANSFORM, Localize, LocalizeDateFunction, LocalizeDictionary, LocalizeDictionaryContext, LocalizeDictionaryData, LocalizeInterpolateTransform, LocalizeLowercaseFunction, LocalizeMissingHandler, LocalizeModule, LocalizePluralTransform, LocalizeReferenceTransform, LocalizeTransform, LocalizeUppercaseFunction, extraDutchDictionary, extraEnglishDictionary, extraPapiamentoDictionary, extraSpanishDictionary, getLocale, provideLocalizeConfig };
992
985
  //# sourceMappingURL=bravobit-bb-foundation-localize.mjs.map