@bravobit/bb-foundation 0.26.3 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/auth/lib/directives/authenticated.directive.d.ts +1 -1
  2. package/collections/lib/components/collections-pager/collections-pager.component.d.ts +1 -1
  3. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +1 -1
  4. package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +1 -1
  5. package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +1 -1
  6. package/controls/lib/control-error/control-error/control-error.component.d.ts +1 -1
  7. package/controls/lib/form-control/form-control/form-control.component.d.ts +1 -1
  8. package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +1 -1
  9. package/controls/lib/form-control/form-control-input.directive.d.ts +1 -1
  10. package/controls/lib/radio/radio-button/radio-button.component.d.ts +1 -1
  11. package/controls/lib/radio/radio-group/radio-group.component.d.ts +1 -1
  12. package/controls/lib/toggle/toggle/toggle.component.d.ts +1 -1
  13. package/controls/lib/toggle/toggle-group/toggle-group.component.d.ts +1 -1
  14. package/dashboard/lib/dashboard/dashboard.component.d.ts +1 -1
  15. package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +1 -1
  16. package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +1 -1
  17. package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +1 -1
  18. package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +1 -1
  19. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +1 -1
  20. package/elements/lib/avatar/avatar.component.d.ts +1 -1
  21. package/elements/lib/button/button.component.d.ts +2 -2
  22. package/elements/lib/checkbox/checkbox.component.d.ts +1 -1
  23. package/elements/lib/date-picker/date-picker.component.d.ts +1 -1
  24. package/elements/lib/directives/input.directive.d.ts +2 -2
  25. package/elements/lib/dropdown/dropdown.component.d.ts +1 -1
  26. package/elements/lib/file-picker/file-picker.component.d.ts +2 -2
  27. package/elements/lib/form-control/form-control.component.d.ts +1 -1
  28. package/elements/lib/form-error/form-error.component.d.ts +1 -1
  29. package/elements/lib/form-group/form-group.component.d.ts +1 -1
  30. package/elements/lib/icon/icon.component.d.ts +1 -1
  31. package/elements/lib/image-picker/image-picker.component.d.ts +1 -1
  32. package/elements/lib/spinner/spinner.component.d.ts +1 -1
  33. package/esm2022/auth/lib/auth.interceptor.mjs +91 -0
  34. package/esm2022/auth/lib/auth.module.mjs +36 -0
  35. package/esm2022/auth/lib/auth.service.mjs +271 -0
  36. package/esm2022/auth/lib/directives/authenticated.directive.mjs +43 -0
  37. package/esm2022/auth/lib/guards/anonymous.guard.mjs +54 -0
  38. package/esm2022/auth/lib/guards/authenticated.guard.mjs +57 -0
  39. package/esm2022/collections/lib/collections.module.mjs +55 -0
  40. package/esm2022/collections/lib/components/collections-pager/collections-pager.component.mjs +124 -0
  41. package/esm2022/collections/lib/components/collections-viewer/collections-viewer.component.mjs +32 -0
  42. package/esm2022/collections/lib/components/collections.directive.mjs +47 -0
  43. package/esm2022/controls/lib/checkbox/checkbox/checkbox.component.mjs +179 -0
  44. package/esm2022/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +69 -0
  45. package/esm2022/controls/lib/checkbox/checkbox.module.mjs +21 -0
  46. package/esm2022/controls/lib/control-error/control-error/control-error.component.mjs +64 -0
  47. package/esm2022/controls/lib/control-error/control-error-submit.directive.mjs +48 -0
  48. package/esm2022/controls/lib/control-error/control-error.module.mjs +20 -0
  49. package/esm2022/controls/lib/controls.module.mjs +63 -0
  50. package/esm2022/controls/lib/form-control/form-control/form-control.component.mjs +80 -0
  51. package/esm2022/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +23 -0
  52. package/esm2022/controls/lib/form-control/form-control-input.directive.mjs +125 -0
  53. package/esm2022/controls/lib/form-control/form-control.module.mjs +35 -0
  54. package/esm2022/controls/lib/radio/radio-button/radio-button.component.mjs +76 -0
  55. package/esm2022/controls/lib/radio/radio-group/radio-group.component.mjs +169 -0
  56. package/esm2022/controls/lib/radio/radio.module.mjs +22 -0
  57. package/esm2022/controls/lib/toggle/toggle/toggle.component.mjs +154 -0
  58. package/esm2022/controls/lib/toggle/toggle-group/toggle-group.component.mjs +63 -0
  59. package/esm2022/controls/lib/toggle/toggle.module.mjs +21 -0
  60. package/esm2022/dashboard/lib/dashboard/dashboard.component.mjs +58 -0
  61. package/{esm2020 → esm2022}/dashboard/lib/dashboard-header/dashboard-header.component.mjs +6 -5
  62. package/esm2022/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +32 -0
  63. package/esm2022/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +30 -0
  64. package/esm2022/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +76 -0
  65. package/esm2022/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +100 -0
  66. package/esm2022/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +63 -0
  67. package/esm2022/dashboard/lib/dashboard.module.mjs +48 -0
  68. package/esm2022/dialog/lib/dialog-actions/dialog-actions.component.mjs +13 -0
  69. package/esm2022/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +47 -0
  70. package/esm2022/dialog/lib/dialog-container/dialog-container.component.mjs +78 -0
  71. package/esm2022/dialog/lib/dialog-header/dialog-header.component.mjs +19 -0
  72. package/esm2022/dialog/lib/dialog-link/dialog-link.component.mjs +12 -0
  73. package/esm2022/dialog/lib/dialog-modal/dialog-modal.component.mjs +68 -0
  74. package/esm2022/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +80 -0
  75. package/esm2022/dialog/lib/dialog.insertion.mjs +17 -0
  76. package/esm2022/dialog/lib/dialog.module.mjs +69 -0
  77. package/esm2022/dialog/lib/dialog.service.mjs +69 -0
  78. package/esm2022/elements/lib/avatar/avatar.component.mjs +150 -0
  79. package/esm2022/elements/lib/button/button.component.mjs +63 -0
  80. package/esm2022/elements/lib/checkbox/checkbox.component.mjs +74 -0
  81. package/esm2022/elements/lib/date-picker/date-picker.component.mjs +308 -0
  82. package/esm2022/elements/lib/directives/addon.directive.mjs +31 -0
  83. package/esm2022/elements/lib/directives/form-submit.directive.mjs +51 -0
  84. package/esm2022/elements/lib/directives/form-submitter.directive.mjs +26 -0
  85. package/esm2022/elements/lib/directives/input.directive.mjs +138 -0
  86. package/esm2022/elements/lib/dropdown/dropdown.component.mjs +102 -0
  87. package/esm2022/elements/lib/elements.module.mjs +178 -0
  88. package/esm2022/elements/lib/file-picker/file-picker.component.mjs +237 -0
  89. package/esm2022/elements/lib/form-control/form-control.component.mjs +50 -0
  90. package/esm2022/elements/lib/form-error/form-error.component.mjs +124 -0
  91. package/esm2022/elements/lib/form-group/form-group.component.mjs +19 -0
  92. package/esm2022/elements/lib/icon/icon.component.mjs +103 -0
  93. package/esm2022/elements/lib/image-picker/image-picker.component.mjs +107 -0
  94. package/esm2022/elements/lib/pipes/file-image.pipe.mjs +44 -0
  95. package/esm2022/elements/lib/pipes/file-size.pipe.mjs +29 -0
  96. package/esm2022/elements/lib/pipes/relative-time.pipe.mjs +97 -0
  97. package/esm2022/elements/lib/spinner/spinner.component.mjs +26 -0
  98. package/esm2022/elements/lib/tag/tag.component.mjs +19 -0
  99. package/esm2022/http/lib/http.module.mjs +44 -0
  100. package/esm2022/http/lib/interceptors/base-url.interceptor.mjs +51 -0
  101. package/esm2022/http/lib/interceptors/error.interceptor.mjs +33 -0
  102. package/esm2022/lib/core/services/clipboard.service.mjs +71 -0
  103. package/esm2022/lib/core/services/exif.service.mjs +164 -0
  104. package/esm2022/lib/core/services/file-loader.service.mjs +88 -0
  105. package/esm2022/lib/core/services/image-converter.service.mjs +124 -0
  106. package/esm2022/lib/core/services/languages.service.mjs +75 -0
  107. package/esm2022/lib/core/services/network.service.mjs +56 -0
  108. package/esm2022/lib/core/services/patch.service.mjs +64 -0
  109. package/esm2022/localize/lib/localize.module.mjs +82 -0
  110. package/esm2022/localize/lib/localize.pipe.mjs +47 -0
  111. package/esm2022/localize/lib/localize.service.mjs +186 -0
  112. package/{esm2020 → esm2022}/localize/lib/transforms/interpolate.transform.mjs +1 -1
  113. package/{esm2020 → esm2022}/localize/lib/transforms/reference.transform.mjs +1 -1
  114. package/esm2022/localize/lib/views/localize-string/localize-string.component.mjs +89 -0
  115. package/esm2022/localize/lib/views/localize-template.directive.mjs +22 -0
  116. package/esm2022/masking/lib/directives/currency-mask.directive.mjs +36 -0
  117. package/esm2022/masking/lib/directives/date-mask.directive.mjs +36 -0
  118. package/esm2022/masking/lib/directives/input-mask.directive.mjs +119 -0
  119. package/esm2022/masking/lib/masking.module.mjs +31 -0
  120. package/esm2022/masking/lib/masking.service.mjs +104 -0
  121. package/esm2022/notifications/lib/notifications-item/notifications-item.component.mjs +101 -0
  122. package/esm2022/notifications/lib/notifications-list/notifications-list.component.mjs +48 -0
  123. package/esm2022/notifications/lib/notifications.module.mjs +31 -0
  124. package/esm2022/notifications/lib/notifications.service.mjs +142 -0
  125. package/esm2022/permissions/lib/directives/permission.directive.mjs +89 -0
  126. package/esm2022/permissions/lib/guards/permission.guard.mjs +57 -0
  127. package/esm2022/permissions/lib/permissions.module.mjs +40 -0
  128. package/esm2022/permissions/lib/permissions.service.mjs +97 -0
  129. package/esm2022/recaptcha/lib/recaptcha/recaptcha.component.mjs +220 -0
  130. package/esm2022/recaptcha/lib/recaptcha-loader.service.mjs +96 -0
  131. package/esm2022/recaptcha/lib/recaptcha.module.mjs +28 -0
  132. package/esm2022/storage/lib/storage.service.mjs +110 -0
  133. package/esm2022/table/lib/components/table/table.component.mjs +194 -0
  134. package/esm2022/table/lib/components/table-cell/table-cell.component.mjs +12 -0
  135. package/esm2022/table/lib/components/table-header-cell/table-header-cell.component.mjs +132 -0
  136. package/esm2022/table/lib/components/table-pager/table-pager.component.mjs +137 -0
  137. package/esm2022/table/lib/table.module.mjs +43 -0
  138. package/esm2022/theming/lib/theming.directive.mjs +39 -0
  139. package/esm2022/theming/lib/theming.module.mjs +17 -0
  140. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +32 -0
  141. package/esm2022/tooltip/lib/tooltip.directive.mjs +141 -0
  142. package/esm2022/tooltip/lib/tooltip.module.mjs +32 -0
  143. package/esm2022/utils/lib/directives/autosize.directive.mjs +73 -0
  144. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +78 -0
  145. package/esm2022/utils/lib/directives/focus.directive.mjs +38 -0
  146. package/esm2022/utils/lib/directives/template.directive.mjs +29 -0
  147. package/esm2022/utils/lib/functions/parse-date.function.mjs +19 -0
  148. package/esm2022/utils/lib/utils.module.mjs +36 -0
  149. package/esm2022/utils/public_api.mjs +7 -0
  150. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-auth.mjs +19 -19
  151. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-auth.mjs.map +1 -1
  152. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-collections.mjs +38 -38
  153. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-collections.mjs.map +1 -1
  154. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-controls.mjs +83 -83
  155. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-controls.mjs.map +1 -1
  156. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dashboard.mjs +37 -37
  157. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  158. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dialog.mjs +46 -46
  159. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-dialog.mjs.map +1 -1
  160. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-elements.mjs +185 -185
  161. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -0
  162. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-http.mjs +10 -10
  163. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-http.mjs.map +1 -1
  164. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-localize.mjs +20 -20
  165. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-localize.mjs.map +1 -1
  166. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-masking.mjs +20 -20
  167. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-masking.mjs.map +1 -1
  168. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-notifications.mjs +13 -13
  169. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-notifications.mjs.map +1 -1
  170. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-permissions.mjs +13 -13
  171. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-permissions.mjs.map +1 -1
  172. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-recaptcha.mjs +16 -16
  173. package/{fesm2015 → fesm2022}/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  174. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-storage.mjs +3 -3
  175. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-storage.mjs.map +1 -1
  176. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-table.mjs +34 -34
  177. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-table.mjs.map +1 -1
  178. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-theming.mjs +7 -7
  179. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-theming.mjs.map +1 -1
  180. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-tooltip.mjs +13 -13
  181. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-tooltip.mjs.map +1 -1
  182. package/{fesm2020 → fesm2022}/bravobit-bb-foundation-utils.mjs +42 -23
  183. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -0
  184. package/{fesm2020 → fesm2022}/bravobit-bb-foundation.mjs +21 -21
  185. package/{fesm2020 → fesm2022}/bravobit-bb-foundation.mjs.map +1 -1
  186. package/localize/lib/views/localize-string/localize-string.component.d.ts +1 -1
  187. package/localize/lib/views/localize-template.directive.d.ts +1 -1
  188. package/masking/lib/directives/currency-mask.directive.d.ts +1 -1
  189. package/masking/lib/directives/date-mask.directive.d.ts +1 -1
  190. package/masking/lib/directives/input-mask.directive.d.ts +1 -1
  191. package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
  192. package/package.json +70 -112
  193. package/permissions/lib/directives/permission.directive.d.ts +1 -1
  194. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +1 -1
  195. package/table/lib/components/table/table.component.d.ts +1 -1
  196. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +1 -1
  197. package/table/lib/components/table-pager/table-pager.component.d.ts +1 -1
  198. package/theming/lib/theming.directive.d.ts +1 -1
  199. package/tooltip/lib/tooltip.directive.d.ts +1 -1
  200. package/utils/lib/directives/autosize.directive.d.ts +1 -1
  201. package/utils/lib/directives/template.directive.d.ts +1 -1
  202. package/utils/lib/functions/parse-date.function.d.ts +1 -0
  203. package/utils/public_api.d.ts +1 -0
  204. package/esm2020/auth/lib/auth.interceptor.mjs +0 -90
  205. package/esm2020/auth/lib/auth.module.mjs +0 -35
  206. package/esm2020/auth/lib/auth.service.mjs +0 -270
  207. package/esm2020/auth/lib/directives/authenticated.directive.mjs +0 -42
  208. package/esm2020/auth/lib/guards/anonymous.guard.mjs +0 -53
  209. package/esm2020/auth/lib/guards/authenticated.guard.mjs +0 -56
  210. package/esm2020/collections/lib/collections.module.mjs +0 -54
  211. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +0 -123
  212. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +0 -31
  213. package/esm2020/collections/lib/components/collections.directive.mjs +0 -43
  214. package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +0 -178
  215. package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +0 -68
  216. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +0 -20
  217. package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +0 -63
  218. package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +0 -47
  219. package/esm2020/controls/lib/control-error/control-error.module.mjs +0 -19
  220. package/esm2020/controls/lib/controls.module.mjs +0 -62
  221. package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +0 -79
  222. package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +0 -22
  223. package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +0 -124
  224. package/esm2020/controls/lib/form-control/form-control.module.mjs +0 -34
  225. package/esm2020/controls/lib/radio/radio-button/radio-button.component.mjs +0 -75
  226. package/esm2020/controls/lib/radio/radio-group/radio-group.component.mjs +0 -168
  227. package/esm2020/controls/lib/radio/radio.module.mjs +0 -21
  228. package/esm2020/controls/lib/toggle/toggle/toggle.component.mjs +0 -153
  229. package/esm2020/controls/lib/toggle/toggle-group/toggle-group.component.mjs +0 -62
  230. package/esm2020/controls/lib/toggle/toggle.module.mjs +0 -20
  231. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +0 -57
  232. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +0 -31
  233. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +0 -29
  234. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +0 -75
  235. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +0 -99
  236. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +0 -62
  237. package/esm2020/dashboard/lib/dashboard.module.mjs +0 -47
  238. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +0 -12
  239. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +0 -46
  240. package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +0 -77
  241. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +0 -18
  242. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +0 -11
  243. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +0 -67
  244. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +0 -79
  245. package/esm2020/dialog/lib/dialog.insertion.mjs +0 -16
  246. package/esm2020/dialog/lib/dialog.module.mjs +0 -68
  247. package/esm2020/dialog/lib/dialog.service.mjs +0 -68
  248. package/esm2020/elements/lib/avatar/avatar.component.mjs +0 -149
  249. package/esm2020/elements/lib/button/button.component.mjs +0 -61
  250. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +0 -73
  251. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +0 -307
  252. package/esm2020/elements/lib/directives/addon.directive.mjs +0 -29
  253. package/esm2020/elements/lib/directives/form-submit.directive.mjs +0 -50
  254. package/esm2020/elements/lib/directives/form-submitter.directive.mjs +0 -25
  255. package/esm2020/elements/lib/directives/input.directive.mjs +0 -136
  256. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +0 -100
  257. package/esm2020/elements/lib/elements.module.mjs +0 -177
  258. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +0 -236
  259. package/esm2020/elements/lib/form-control/form-control.component.mjs +0 -49
  260. package/esm2020/elements/lib/form-error/form-error.component.mjs +0 -123
  261. package/esm2020/elements/lib/form-group/form-group.component.mjs +0 -18
  262. package/esm2020/elements/lib/icon/icon.component.mjs +0 -102
  263. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +0 -106
  264. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +0 -43
  265. package/esm2020/elements/lib/pipes/file-size.pipe.mjs +0 -28
  266. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +0 -96
  267. package/esm2020/elements/lib/spinner/spinner.component.mjs +0 -25
  268. package/esm2020/elements/lib/tag/tag.component.mjs +0 -18
  269. package/esm2020/http/lib/http.module.mjs +0 -43
  270. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +0 -50
  271. package/esm2020/http/lib/interceptors/error.interceptor.mjs +0 -32
  272. package/esm2020/lib/core/services/clipboard.service.mjs +0 -70
  273. package/esm2020/lib/core/services/exif.service.mjs +0 -163
  274. package/esm2020/lib/core/services/file-loader.service.mjs +0 -87
  275. package/esm2020/lib/core/services/image-converter.service.mjs +0 -123
  276. package/esm2020/lib/core/services/languages.service.mjs +0 -74
  277. package/esm2020/lib/core/services/network.service.mjs +0 -55
  278. package/esm2020/lib/core/services/patch.service.mjs +0 -63
  279. package/esm2020/localize/lib/localize.module.mjs +0 -81
  280. package/esm2020/localize/lib/localize.pipe.mjs +0 -46
  281. package/esm2020/localize/lib/localize.service.mjs +0 -185
  282. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +0 -88
  283. package/esm2020/localize/lib/views/localize-template.directive.mjs +0 -21
  284. package/esm2020/masking/lib/directives/currency-mask.directive.mjs +0 -35
  285. package/esm2020/masking/lib/directives/date-mask.directive.mjs +0 -35
  286. package/esm2020/masking/lib/directives/input-mask.directive.mjs +0 -118
  287. package/esm2020/masking/lib/masking.module.mjs +0 -30
  288. package/esm2020/masking/lib/masking.service.mjs +0 -103
  289. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +0 -100
  290. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +0 -47
  291. package/esm2020/notifications/lib/notifications.module.mjs +0 -30
  292. package/esm2020/notifications/lib/notifications.service.mjs +0 -141
  293. package/esm2020/permissions/lib/directives/permission.directive.mjs +0 -88
  294. package/esm2020/permissions/lib/guards/permission.guard.mjs +0 -56
  295. package/esm2020/permissions/lib/permissions.module.mjs +0 -39
  296. package/esm2020/permissions/lib/permissions.service.mjs +0 -96
  297. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +0 -219
  298. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +0 -95
  299. package/esm2020/recaptcha/lib/recaptcha.module.mjs +0 -27
  300. package/esm2020/storage/lib/storage.service.mjs +0 -109
  301. package/esm2020/table/lib/components/table/table.component.mjs +0 -191
  302. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +0 -11
  303. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +0 -131
  304. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +0 -136
  305. package/esm2020/table/lib/table.module.mjs +0 -42
  306. package/esm2020/theming/lib/theming.directive.mjs +0 -38
  307. package/esm2020/theming/lib/theming.module.mjs +0 -16
  308. package/esm2020/tooltip/lib/tooltip-container/tooltip-container.component.mjs +0 -31
  309. package/esm2020/tooltip/lib/tooltip.directive.mjs +0 -140
  310. package/esm2020/tooltip/lib/tooltip.module.mjs +0 -31
  311. package/esm2020/utils/lib/directives/autosize.directive.mjs +0 -72
  312. package/esm2020/utils/lib/directives/focus-trap.directive.mjs +0 -77
  313. package/esm2020/utils/lib/directives/focus.directive.mjs +0 -37
  314. package/esm2020/utils/lib/directives/template.directive.mjs +0 -28
  315. package/esm2020/utils/lib/utils.module.mjs +0 -35
  316. package/esm2020/utils/public_api.mjs +0 -6
  317. package/fesm2015/bravobit-bb-foundation-auth.mjs +0 -851
  318. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +0 -1
  319. package/fesm2015/bravobit-bb-foundation-collections.mjs +0 -474
  320. package/fesm2015/bravobit-bb-foundation-collections.mjs.map +0 -1
  321. package/fesm2015/bravobit-bb-foundation-controls.mjs +0 -1217
  322. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +0 -1
  323. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +0 -417
  324. package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +0 -1
  325. package/fesm2015/bravobit-bb-foundation-dialog.mjs +0 -512
  326. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +0 -1
  327. package/fesm2015/bravobit-bb-foundation-elements.mjs +0 -1883
  328. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +0 -1
  329. package/fesm2015/bravobit-bb-foundation-http.mjs +0 -176
  330. package/fesm2015/bravobit-bb-foundation-http.mjs.map +0 -1
  331. package/fesm2015/bravobit-bb-foundation-localize.mjs +0 -835
  332. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +0 -1
  333. package/fesm2015/bravobit-bb-foundation-masking.mjs +0 -334
  334. package/fesm2015/bravobit-bb-foundation-masking.mjs.map +0 -1
  335. package/fesm2015/bravobit-bb-foundation-notifications.mjs +0 -357
  336. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +0 -1
  337. package/fesm2015/bravobit-bb-foundation-permissions.mjs +0 -310
  338. package/fesm2015/bravobit-bb-foundation-permissions.mjs.map +0 -1
  339. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +0 -349
  340. package/fesm2015/bravobit-bb-foundation-rxjs.mjs +0 -22
  341. package/fesm2015/bravobit-bb-foundation-rxjs.mjs.map +0 -1
  342. package/fesm2015/bravobit-bb-foundation-storage.mjs +0 -418
  343. package/fesm2015/bravobit-bb-foundation-storage.mjs.map +0 -1
  344. package/fesm2015/bravobit-bb-foundation-table.mjs +0 -613
  345. package/fesm2015/bravobit-bb-foundation-table.mjs.map +0 -1
  346. package/fesm2015/bravobit-bb-foundation-theming.mjs +0 -382
  347. package/fesm2015/bravobit-bb-foundation-theming.mjs.map +0 -1
  348. package/fesm2015/bravobit-bb-foundation-tooltip.mjs +0 -210
  349. package/fesm2015/bravobit-bb-foundation-tooltip.mjs.map +0 -1
  350. package/fesm2015/bravobit-bb-foundation-utils.mjs +0 -246
  351. package/fesm2015/bravobit-bb-foundation-utils.mjs.map +0 -1
  352. package/fesm2015/bravobit-bb-foundation.mjs +0 -929
  353. package/fesm2015/bravobit-bb-foundation.mjs.map +0 -1
  354. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +0 -1
  355. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +0 -1
  356. package/fesm2020/bravobit-bb-foundation-utils.mjs.map +0 -1
  357. /package/{esm2020 → esm2022}/auth/bravobit-bb-foundation-auth.mjs +0 -0
  358. /package/{esm2020 → esm2022}/auth/lib/auth.session.mjs +0 -0
  359. /package/{esm2020 → esm2022}/auth/lib/directives/abstract.directive.mjs +0 -0
  360. /package/{esm2020 → esm2022}/auth/lib/helpers/jwt.helper.mjs +0 -0
  361. /package/{esm2020 → esm2022}/auth/lib/interfaces/config.interface.mjs +0 -0
  362. /package/{esm2020 → esm2022}/auth/lib/interfaces/provider.interface.mjs +0 -0
  363. /package/{esm2020 → esm2022}/auth/lib/interfaces/token.interface.mjs +0 -0
  364. /package/{esm2020 → esm2022}/auth/lib/providers/email.provider.mjs +0 -0
  365. /package/{esm2020 → esm2022}/auth/lib/providers/verify.provider.mjs +0 -0
  366. /package/{esm2020 → esm2022}/auth/lib/tokens/use-authorization.token.mjs +0 -0
  367. /package/{esm2020 → esm2022}/auth/public_api.mjs +0 -0
  368. /package/{esm2020 → esm2022}/bravobit-bb-foundation.mjs +0 -0
  369. /package/{esm2020 → esm2022}/collections/bravobit-bb-foundation-collections.mjs +0 -0
  370. /package/{esm2020 → esm2022}/collections/lib/collection.mjs +0 -0
  371. /package/{esm2020 → esm2022}/collections/lib/interfaces/collection.interface.mjs +0 -0
  372. /package/{esm2020 → esm2022}/collections/lib/providers/api-collection.provider.mjs +0 -0
  373. /package/{esm2020 → esm2022}/collections/lib/providers/collection.provider.mjs +0 -0
  374. /package/{esm2020 → esm2022}/collections/lib/providers/local-collection.provider.mjs +0 -0
  375. /package/{esm2020 → esm2022}/collections/public_api.mjs +0 -0
  376. /package/{esm2020 → esm2022}/controls/bravobit-bb-foundation-controls.mjs +0 -0
  377. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error/control-error.animation.mjs +0 -0
  378. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.defaults.mjs +0 -0
  379. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.interface.mjs +0 -0
  380. /package/{esm2020 → esm2022}/controls/lib/control-error/control-error.utils.mjs +0 -0
  381. /package/{esm2020 → esm2022}/controls/lib/controls.interfaces.mjs +0 -0
  382. /package/{esm2020 → esm2022}/controls/public_api.mjs +0 -0
  383. /package/{esm2020 → esm2022}/dashboard/bravobit-bb-foundation-dashboard.mjs +0 -0
  384. /package/{esm2020 → esm2022}/dashboard/public_api.mjs +0 -0
  385. /package/{esm2020 → esm2022}/dialog/bravobit-bb-foundation-dialog.mjs +0 -0
  386. /package/{esm2020 → esm2022}/dialog/lib/dialog-container/dialog-container.animations.mjs +0 -0
  387. /package/{esm2020 → esm2022}/dialog/lib/dialog-overlay/dialog-overlay.animations.mjs +0 -0
  388. /package/{esm2020 → esm2022}/dialog/lib/dialog.interfaces.mjs +0 -0
  389. /package/{esm2020 → esm2022}/dialog/lib/dialog.ref.mjs +0 -0
  390. /package/{esm2020 → esm2022}/dialog/public_api.mjs +0 -0
  391. /package/{esm2020 → esm2022}/elements/bravobit-bb-foundation-elements.mjs +0 -0
  392. /package/{esm2020 → esm2022}/elements/lib/elements.interfaces.mjs +0 -0
  393. /package/{esm2020 → esm2022}/elements/public_api.mjs +0 -0
  394. /package/{esm2020 → esm2022}/http/bravobit-bb-foundation-http.mjs +0 -0
  395. /package/{esm2020 → esm2022}/http/lib/classes/http.config.mjs +0 -0
  396. /package/{esm2020 → esm2022}/http/lib/classes/http.error.mjs +0 -0
  397. /package/{esm2020 → esm2022}/http/lib/http.interfaces.mjs +0 -0
  398. /package/{esm2020 → esm2022}/http/public_api.mjs +0 -0
  399. /package/{esm2020 → esm2022}/lib/core/functions/date.utils.mjs +0 -0
  400. /package/{esm2020 → esm2022}/lib/core/functions/password.utils.mjs +0 -0
  401. /package/{esm2020 → esm2022}/lib/core/miscellaneous/regex.mjs +0 -0
  402. /package/{esm2020 → esm2022}/lib/core/miscellaneous/validator.mjs +0 -0
  403. /package/{esm2020 → esm2022}/lib/core/mixins/can-disable.mjs +0 -0
  404. /package/{esm2020 → esm2022}/lib/core/mixins/can-hide-errors.mjs +0 -0
  405. /package/{esm2020 → esm2022}/lib/core/mixins/can-load.mjs +0 -0
  406. /package/{esm2020 → esm2022}/lib/core/mixins/constructor.mjs +0 -0
  407. /package/{esm2020 → esm2022}/lib/core/mixins/has-error.mjs +0 -0
  408. /package/{esm2020 → esm2022}/lib/core/mixins/is-focused.mjs +0 -0
  409. /package/{esm2020 → esm2022}/lib/core/mixins/is-grouped.mjs +0 -0
  410. /package/{esm2020 → esm2022}/lib/core/mixins/is-readonly.mjs +0 -0
  411. /package/{esm2020 → esm2022}/lib/core/mixins/is-required.mjs +0 -0
  412. /package/{esm2020 → esm2022}/lib/core/tokens/accept-language.token.mjs +0 -0
  413. /package/{esm2020 → esm2022}/lib/core/tokens/base-url.token.mjs +0 -0
  414. /package/{esm2020 → esm2022}/lib/core/tokens/cookie.token.mjs +0 -0
  415. /package/{esm2020 → esm2022}/lib/core/tokens/location.token.mjs +0 -0
  416. /package/{esm2020 → esm2022}/lib/core/tokens/navigator.token.mjs +0 -0
  417. /package/{esm2020 → esm2022}/lib/core/tokens/window.token.mjs +0 -0
  418. /package/{esm2020 → esm2022}/localize/bravobit-bb-foundation-localize.mjs +0 -0
  419. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.class.mjs +0 -0
  420. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.context.mjs +0 -0
  421. /package/{esm2020 → esm2022}/localize/lib/dictionary/dictionary.data.mjs +0 -0
  422. /package/{esm2020 → esm2022}/localize/lib/functions/date.function.mjs +0 -0
  423. /package/{esm2020 → esm2022}/localize/lib/functions/lowercase.function.mjs +0 -0
  424. /package/{esm2020 → esm2022}/localize/lib/functions/uppercase.function.mjs +0 -0
  425. /package/{esm2020 → esm2022}/localize/lib/handlers/missing.handler.mjs +0 -0
  426. /package/{esm2020 → esm2022}/localize/lib/interfaces/config.interfaces.mjs +0 -0
  427. /package/{esm2020 → esm2022}/localize/lib/interfaces/functions.interfaces.mjs +0 -0
  428. /package/{esm2020 → esm2022}/localize/lib/interfaces/handlers.interfaces.mjs +0 -0
  429. /package/{esm2020 → esm2022}/localize/lib/interfaces/options.interfaces.mjs +0 -0
  430. /package/{esm2020 → esm2022}/localize/lib/interfaces/transforms.interfaces.mjs +0 -0
  431. /package/{esm2020 → esm2022}/localize/lib/locale.token.mjs +0 -0
  432. /package/{esm2020 → esm2022}/localize/lib/localizations/dutch.localization.mjs +0 -0
  433. /package/{esm2020 → esm2022}/localize/lib/localizations/english.localization.mjs +0 -0
  434. /package/{esm2020 → esm2022}/localize/lib/transforms/abstract.transform.mjs +0 -0
  435. /package/{esm2020 → esm2022}/localize/public_api.mjs +0 -0
  436. /package/{esm2020 → esm2022}/masking/bravobit-bb-foundation-masking.mjs +0 -0
  437. /package/{esm2020 → esm2022}/masking/lib/input-mask.interface.mjs +0 -0
  438. /package/{esm2020 → esm2022}/masking/public_api.mjs +0 -0
  439. /package/{esm2020 → esm2022}/notifications/bravobit-bb-foundation-notifications.mjs +0 -0
  440. /package/{esm2020 → esm2022}/notifications/lib/notifications.animations.mjs +0 -0
  441. /package/{esm2020 → esm2022}/notifications/lib/notifications.interfaces.mjs +0 -0
  442. /package/{esm2020 → esm2022}/notifications/public_api.mjs +0 -0
  443. /package/{esm2020 → esm2022}/permissions/bravobit-bb-foundation-permissions.mjs +0 -0
  444. /package/{esm2020 → esm2022}/permissions/lib/handlers/abstract.handler.mjs +0 -0
  445. /package/{esm2020 → esm2022}/permissions/lib/handlers/local.handler.mjs +0 -0
  446. /package/{esm2020 → esm2022}/permissions/lib/permissions.interface.mjs +0 -0
  447. /package/{esm2020 → esm2022}/permissions/public_api.mjs +0 -0
  448. /package/{esm2020 → esm2022}/public_api.mjs +0 -0
  449. /package/{esm2020 → esm2022}/recaptcha/bravobit-bb-foundation-recaptcha.mjs +0 -0
  450. /package/{esm2020 → esm2022}/recaptcha/lib/recaptcha.interface.mjs +0 -0
  451. /package/{esm2020 → esm2022}/recaptcha/public_api.mjs +0 -0
  452. /package/{esm2020 → esm2022}/rxjs/bravobit-bb-foundation-rxjs.mjs +0 -0
  453. /package/{esm2020 → esm2022}/rxjs/lib/observables/get-control-value.observable.mjs +0 -0
  454. /package/{esm2020 → esm2022}/rxjs/lib/operators/combine-latest-map.operator.mjs +0 -0
  455. /package/{esm2020 → esm2022}/rxjs/lib/operators/filter-nil.operator.mjs +0 -0
  456. /package/{esm2020 → esm2022}/rxjs/public_api.mjs +0 -0
  457. /package/{esm2020 → esm2022}/storage/bravobit-bb-foundation-storage.mjs +0 -0
  458. /package/{esm2020 → esm2022}/storage/lib/interfaces/attributes.interface.mjs +0 -0
  459. /package/{esm2020 → esm2022}/storage/lib/interfaces/memory.interface.mjs +0 -0
  460. /package/{esm2020 → esm2022}/storage/lib/interfaces/strategy.interface.mjs +0 -0
  461. /package/{esm2020 → esm2022}/storage/lib/strategies/cookie-storage.strategy.mjs +0 -0
  462. /package/{esm2020 → esm2022}/storage/lib/strategies/memory-storage.strategy.mjs +0 -0
  463. /package/{esm2020 → esm2022}/storage/lib/strategies/polyfill-storage.strategy.mjs +0 -0
  464. /package/{esm2020 → esm2022}/storage/public_api.mjs +0 -0
  465. /package/{esm2020 → esm2022}/table/bravobit-bb-foundation-table.mjs +0 -0
  466. /package/{esm2020 → esm2022}/table/lib/data/datasource.data.mjs +0 -0
  467. /package/{esm2020 → esm2022}/table/lib/data/generic.data.mjs +0 -0
  468. /package/{esm2020 → esm2022}/table/lib/interfaces/datasource.interface.mjs +0 -0
  469. /package/{esm2020 → esm2022}/table/lib/interfaces/table.interfaces.mjs +0 -0
  470. /package/{esm2020 → esm2022}/table/public_api.mjs +0 -0
  471. /package/{esm2020 → esm2022}/theming/bravobit-bb-foundation-theming.mjs +0 -0
  472. /package/{esm2020 → esm2022}/theming/lib/themes/checkbox-group.theme.mjs +0 -0
  473. /package/{esm2020 → esm2022}/theming/lib/themes/checkbox.theme.mjs +0 -0
  474. /package/{esm2020 → esm2022}/theming/lib/themes/control-error.theme.mjs +0 -0
  475. /package/{esm2020 → esm2022}/theming/lib/themes/form-control-addon.theme.mjs +0 -0
  476. /package/{esm2020 → esm2022}/theming/lib/themes/form-control.theme.mjs +0 -0
  477. /package/{esm2020 → esm2022}/theming/lib/themes/radio-button.theme.mjs +0 -0
  478. /package/{esm2020 → esm2022}/theming/lib/themes/radio-group.theme.mjs +0 -0
  479. /package/{esm2020 → esm2022}/theming/lib/themes/toggle-group.theme.mjs +0 -0
  480. /package/{esm2020 → esm2022}/theming/lib/themes/toggle.theme.mjs +0 -0
  481. /package/{esm2020 → esm2022}/theming/lib/theming.data.mjs +0 -0
  482. /package/{esm2020 → esm2022}/theming/lib/theming.interface.mjs +0 -0
  483. /package/{esm2020 → esm2022}/theming/lib/utils/theming.variable.mjs +0 -0
  484. /package/{esm2020 → esm2022}/theming/public_api.mjs +0 -0
  485. /package/{esm2020 → esm2022}/tooltip/bravobit-bb-foundation-tooltip.mjs +0 -0
  486. /package/{esm2020 → esm2022}/tooltip/lib/tooltip.interfaces.mjs +0 -0
  487. /package/{esm2020 → esm2022}/tooltip/public_api.mjs +0 -0
  488. /package/{esm2020 → esm2022}/utils/bravobit-bb-foundation-utils.mjs +0 -0
  489. /package/{fesm2020 → fesm2022}/bravobit-bb-foundation-rxjs.mjs +0 -0
  490. /package/{fesm2020 → fesm2022}/bravobit-bb-foundation-rxjs.mjs.map +0 -0
@@ -1,929 +0,0 @@
1
- import { __awaiter } from 'tslib';
2
- import * as i0 from '@angular/core';
3
- import { Injectable, InjectionToken, Optional, Inject, inject } from '@angular/core';
4
- import * as i1 from '@angular/cdk/platform';
5
- import { map, distinctUntilChanged, shareReplay, debounceTime, startWith } from 'rxjs/operators';
6
- import { of, fromEvent, Observable, merge, Subscription } from 'rxjs';
7
- import { DOCUMENT, formatDate } from '@angular/common';
8
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
9
-
10
- class FileLoader {
11
- constructor() {
12
- this.isFile = (input) => {
13
- return 'File' in window && input instanceof File;
14
- };
15
- this.isBlob = (input) => {
16
- return 'Blob' in window && input instanceof Blob;
17
- };
18
- this.blobToFile = (blob, fileName) => {
19
- const anyBlob = blob;
20
- anyBlob.lastModifiedDate = new Date();
21
- anyBlob.name = fileName;
22
- return anyBlob;
23
- };
24
- }
25
- fromDataUrl(value, name = 'file') {
26
- if (!value) {
27
- return null;
28
- }
29
- try {
30
- // Convert base64 to raw binary data held in a string.
31
- const byteString = window.atob(value.split(',')[1]);
32
- // Separate out the mime component.
33
- const mimeString = value
34
- .split(',')[0]
35
- .split(':')[1]
36
- .split(';')[0];
37
- // Write the bytes of the string to an ArrayBuffer.
38
- const arrayBuffer = new ArrayBuffer(byteString.length);
39
- const uint8Array = new Uint8Array(arrayBuffer);
40
- for (let index = 0; index < byteString.length; index++) {
41
- uint8Array[index] = byteString.charCodeAt(index);
42
- }
43
- const dataView = new DataView(arrayBuffer);
44
- const blob = new Blob([dataView.buffer], { type: mimeString });
45
- return this.createFile(blob, name);
46
- }
47
- catch (_a) {
48
- return null;
49
- }
50
- }
51
- asDataUrl(file) {
52
- return this.read(file, 'dataurl');
53
- }
54
- asArrayBuffer(file) {
55
- return this.read(file, 'arraybuffer');
56
- }
57
- read(file, type) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- return new Promise((resolve, reject) => {
60
- const isFileLike = this.isFile(file) || this.isBlob(file);
61
- if (!file || !isFileLike) {
62
- return reject('Invalid file');
63
- }
64
- const reader = new FileReader();
65
- reader.onerror = () => reject('Error file read');
66
- reader.onabort = () => reject('Abort file read');
67
- reader.onload = () => {
68
- const result = reader.result;
69
- return resolve(result);
70
- };
71
- if (type === 'dataurl') {
72
- reader.readAsDataURL(file);
73
- }
74
- else if (type === 'arraybuffer') {
75
- reader.readAsArrayBuffer(file);
76
- }
77
- });
78
- });
79
- }
80
- createFile(blob, name) {
81
- if (!navigator['msSaveBlob']) {
82
- return new File([blob], name, { lastModified: Date.now(), type: blob === null || blob === void 0 ? void 0 : blob.type });
83
- }
84
- const blobFile = new Blob([blob], { type: blob === null || blob === void 0 ? void 0 : blob.type });
85
- return this.blobToFile(blobFile, name);
86
- }
87
- }
88
- FileLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FileLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
89
- FileLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FileLoader, providedIn: 'root' });
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FileLoader, decorators: [{
91
- type: Injectable,
92
- args: [{
93
- providedIn: 'root'
94
- }]
95
- }] });
96
-
97
- class Exif {
98
- constructor(_platform, _fileLoader) {
99
- this._platform = _platform;
100
- this._fileLoader = _fileLoader;
101
- this.transformImage = (image, type, orientation, quality = 100) => {
102
- // Create the canvas and context.
103
- const canvas = document.createElement('canvas');
104
- const context = canvas.getContext('2d');
105
- // Validate the context exists.
106
- if (!context) {
107
- return null;
108
- }
109
- // Set the canvas size based on the image.
110
- const { width, height } = image;
111
- canvas.width = width;
112
- canvas.height = height;
113
- // Validate the orientation is correct
114
- // else flip the canvas sizes.
115
- if (4 < orientation && orientation < 9) {
116
- canvas.width = height;
117
- canvas.height = width;
118
- }
119
- // Transform the context based on the orientation.
120
- switch (orientation) {
121
- case 2:
122
- context.transform(-1, 0, 0, 1, width, 0);
123
- break;
124
- case 3:
125
- context.transform(-1, 0, 0, -1, width, height);
126
- break;
127
- case 4:
128
- context.transform(1, 0, 0, -1, 0, height);
129
- break;
130
- case 5:
131
- context.transform(0, 1, 1, 0, 0, 0);
132
- break;
133
- case 6:
134
- context.transform(0, 1, -1, 0, height, 0);
135
- break;
136
- case 7:
137
- context.transform(0, -1, -1, 0, height, width);
138
- break;
139
- case 8:
140
- context.transform(0, -1, 1, 0, 0, width);
141
- break;
142
- default:
143
- break;
144
- }
145
- // Draw the image on the context and return the data URL.
146
- context.drawImage(image, 0, 0, width, height);
147
- return canvas.toDataURL(type, quality / 100);
148
- };
149
- this.getSupportedCanvasType = (fileType) => {
150
- switch (fileType) {
151
- case 'image/jpeg':
152
- case 'image/jpg':
153
- return 'image/jpeg';
154
- case 'image/x-windows-bmp':
155
- case 'image/bmp':
156
- return 'image/bmp';
157
- default:
158
- return 'image/png';
159
- }
160
- };
161
- this.getOrientation = (buffer) => {
162
- // Create a new data view.
163
- const view = new DataView(buffer);
164
- if (view.getUint16(0, false) !== 0xFFD8) {
165
- return -2;
166
- }
167
- const length = view.byteLength;
168
- let offset = 2;
169
- while (offset < length) {
170
- if (view.getUint16(offset + 2, false) <= 8) {
171
- return -1;
172
- }
173
- const marker = view.getUint16(offset, false);
174
- offset += 2;
175
- if (marker === 0xFFE1) {
176
- if (view.getUint32(offset += 2, false) !== 0x45786966) {
177
- return -1;
178
- }
179
- const little = view.getUint16(offset += 6, false) === 0x4949;
180
- offset += view.getUint32(offset + 4, little);
181
- const tags = view.getUint16(offset, little);
182
- offset += 2;
183
- for (let index = 0; index < tags; index++) {
184
- if (view.getUint16(offset + index * 12, little) === 0x0112) {
185
- return view.getUint16(offset + index * 12 + 8, little);
186
- }
187
- }
188
- }
189
- else if ((marker & 0xFF00) !== 0xFF00) {
190
- break;
191
- }
192
- else {
193
- offset += view.getUint16(offset, false);
194
- }
195
- }
196
- return -1;
197
- };
198
- }
199
- strip(file, quality = 100) {
200
- return __awaiter(this, void 0, void 0, function* () {
201
- // Validate we are on a browser.
202
- if (!this._platform.isBrowser) {
203
- return file;
204
- }
205
- // Validate the file exists and is
206
- // an instance of a File object.
207
- if (!file || !(file instanceof File)) {
208
- return file;
209
- }
210
- // Only jpeg images need correction.
211
- if (!['image/jpeg'].includes(file.type)) {
212
- return file;
213
- }
214
- try {
215
- // Read the file as an array buffer and data url.
216
- const arrayBuffer = yield this._fileLoader.asArrayBuffer(file);
217
- const dataUrl = yield this._fileLoader.asDataUrl(file);
218
- // Create an image element.
219
- const imageElement = yield this.createImageElement(dataUrl);
220
- // Get the orientation by using the buffer.
221
- const orientation = this.getOrientation(arrayBuffer);
222
- // Transform the image to remove the orientation.
223
- const canvasType = this.getSupportedCanvasType(file.type);
224
- const imageUrl = this.transformImage(imageElement, canvasType, orientation, quality);
225
- // Validate the image url exists.
226
- if (!imageUrl) {
227
- return file;
228
- }
229
- // Transform the image url to a file.
230
- return this._fileLoader.fromDataUrl(imageUrl, file.name);
231
- }
232
- catch (_a) {
233
- // When something goes wrong we
234
- // just return the default file.
235
- return file;
236
- }
237
- });
238
- }
239
- createImageElement(dataUrl) {
240
- return __awaiter(this, void 0, void 0, function* () {
241
- return new Promise((resolve, reject) => {
242
- const image = new Image();
243
- image.src = dataUrl;
244
- image.onerror = () => reject('Error image create');
245
- image.onabort = () => reject('Abort image create');
246
- image.onload = () => resolve(image);
247
- });
248
- });
249
- }
250
- }
251
- Exif.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Exif, deps: [{ token: i1.Platform }, { token: FileLoader }], target: i0.ɵɵFactoryTarget.Injectable });
252
- Exif.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Exif, providedIn: 'root' });
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Exif, decorators: [{
254
- type: Injectable,
255
- args: [{
256
- providedIn: 'root'
257
- }]
258
- }], ctorParameters: function () { return [{ type: i1.Platform }, { type: FileLoader }]; } });
259
-
260
- class ImageConverter {
261
- constructor(_exif, _platform, _fileLoader) {
262
- this._exif = _exif;
263
- this._platform = _platform;
264
- this._fileLoader = _fileLoader;
265
- // Data.
266
- this._types = ['image/png', 'image/jpeg'];
267
- this.calculateOffsetAndDimensions = (image, canvasWidth, canvasHeight) => {
268
- const originalWidth = image.width;
269
- const originalHeight = image.height;
270
- const widthRatio = canvasWidth / originalWidth;
271
- const heightRatio = canvasHeight / originalHeight;
272
- let width;
273
- let height;
274
- if (originalWidth > originalHeight) {
275
- height = originalHeight * heightRatio;
276
- width = (originalWidth / originalHeight) * height;
277
- }
278
- else {
279
- width = originalWidth * widthRatio;
280
- height = (originalHeight / originalWidth) * width;
281
- }
282
- let xOffset = 0;
283
- let yOffset = 0;
284
- if (canvasHeight === height) {
285
- xOffset = -((width - canvasWidth) / 2);
286
- }
287
- else if (canvasWidth === width) {
288
- yOffset = -((height - canvasHeight) / 2);
289
- }
290
- return { xOffset, yOffset, width, height };
291
- };
292
- }
293
- toDataUri(contents, options = null) {
294
- return __awaiter(this, void 0, void 0, function* () {
295
- // Check if the current platform is a browser.
296
- if (!this._platform.isBrowser) {
297
- return null;
298
- }
299
- // Get the image.
300
- const image = yield this.getImage(contents);
301
- // Get the canvas width and height.
302
- const canvasWidth = (options === null || options === void 0 ? void 0 : options.width) || (image === null || image === void 0 ? void 0 : image.width);
303
- const canvasHeight = (options === null || options === void 0 ? void 0 : options.height) || (image === null || image === void 0 ? void 0 : image.height);
304
- // Get the canvas and context.
305
- const canvas = document.createElement('canvas');
306
- const context = canvas.getContext('2d');
307
- // Validate the context exists.
308
- if (!context) {
309
- return null;
310
- }
311
- // Set the width and height.
312
- canvas.width = canvasWidth;
313
- canvas.height = canvasHeight;
314
- // When the canvas sizes are 0 we have failed.
315
- if ((canvas === null || canvas === void 0 ? void 0 : canvas.width) === 0 && (canvas === null || canvas === void 0 ? void 0 : canvas.height) === 0) {
316
- return null;
317
- }
318
- // Check if dimensions where supplied, else create the image.
319
- if (!options) {
320
- // Draw the image.
321
- context.drawImage(image, 0, 0);
322
- // Convert the canvas to a data url.
323
- return canvas.toDataURL(this._types[0]);
324
- }
325
- // Get the dimensions and offsets.
326
- const { width, height, xOffset, yOffset } = this.calculateOffsetAndDimensions(image, canvasWidth, canvasHeight);
327
- // Draw the image.
328
- context.drawImage(image, 0, 0, image.width, image.height, xOffset, yOffset, width, height);
329
- // Convert the canvas to a data url.
330
- return canvas.toDataURL(this._types[0]);
331
- });
332
- }
333
- fileToImage(file, types = this._types) {
334
- return __awaiter(this, void 0, void 0, function* () {
335
- // Check if the file matches an image.
336
- if (!types.includes(file.type)) {
337
- throw new Error('The selected file does not meet the required format.');
338
- }
339
- let stripped = null;
340
- try {
341
- stripped = yield this._exif.strip(file, 90);
342
- }
343
- catch (_a) {
344
- // Do nothing.
345
- }
346
- // Ge the data uri.
347
- const dataUri = yield this._fileLoader.asDataUrl(stripped !== null && stripped !== void 0 ? stripped : file);
348
- // Convert the data URI to a image element.
349
- return yield this.stringToImage(dataUri);
350
- });
351
- }
352
- stringToImage(src) {
353
- return new Promise((resolve, reject) => {
354
- const image = new Image();
355
- image.src = src;
356
- image.onload = () => resolve(image);
357
- image.onerror = error => reject(error);
358
- });
359
- }
360
- getImage(contents) {
361
- return __awaiter(this, void 0, void 0, function* () {
362
- // If the contents is already an HTML image element just return it.
363
- if (contents instanceof HTMLImageElement) {
364
- return contents;
365
- }
366
- // If the contents is a file convert it to an HTML image element.
367
- if (contents instanceof File) {
368
- return this.fileToImage(contents);
369
- }
370
- // If the contents is a string convert it to an HTML image element.
371
- return this.stringToImage(contents);
372
- });
373
- }
374
- }
375
- ImageConverter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ImageConverter, deps: [{ token: Exif }, { token: i1.Platform }, { token: FileLoader }], target: i0.ɵɵFactoryTarget.Injectable });
376
- ImageConverter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ImageConverter, providedIn: 'root' });
377
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ImageConverter, decorators: [{
378
- type: Injectable,
379
- args: [{
380
- providedIn: 'root'
381
- }]
382
- }], ctorParameters: function () { return [{ type: Exif }, { type: i1.Platform }, { type: FileLoader }]; } });
383
-
384
- const ACCEPT_LANGUAGE = new InjectionToken('AcceptLanguage');
385
-
386
- class Languages {
387
- constructor(_acceptLanguage) {
388
- this._acceptLanguage = _acceptLanguage;
389
- // Data.
390
- this._data = [];
391
- this.getLanguages = () => {
392
- // If defined we must be in a server environment.
393
- if (this._acceptLanguage) {
394
- return this._acceptLanguage;
395
- }
396
- // Try to get the languages from the navigator.
397
- if (typeof navigator !== 'object') {
398
- return null;
399
- }
400
- let t = 'anguage';
401
- let n = navigator;
402
- let f = n['l' + t + 's'];
403
- const data = f && f.length ? f : (t = n['l' + t] ||
404
- n['browserL' + t] ||
405
- n['userL' + t]) ? [t] : t;
406
- return typeof data === 'string'
407
- ? data
408
- : data.join(';');
409
- };
410
- this._data = this.initialize();
411
- }
412
- get all() {
413
- return this._data;
414
- }
415
- initialize() {
416
- // Get the languages.
417
- const data = this.getLanguages();
418
- // Parse all languages by using a regex.
419
- const strings = (data || '')
420
- .match(/((([a-zA-Z]+(-[a-zA-Z0-9]+){0,2})|\*)(;q=[0-1](\.[0-9]+)?)?)*/g);
421
- // Get the content by parsing the strings.
422
- const content = strings.map(item => {
423
- if (!item) {
424
- return null;
425
- }
426
- const bits = item.split(';');
427
- const ietf = bits[0].split('-');
428
- const hasScript = ietf.length === 3;
429
- return {
430
- code: ietf[0],
431
- script: hasScript ? ietf[1] : null,
432
- region: hasScript ? ietf[2] : ietf[1],
433
- quality: bits[1] ? parseFloat(bits[1].split('=')[1]) : 1.0
434
- };
435
- });
436
- // Filter out all the empty items
437
- // and sort them by the quality.
438
- return content
439
- .filter(item => !!item)
440
- .sort((a, b) => b.quality - a.quality);
441
- }
442
- }
443
- Languages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Languages, deps: [{ token: ACCEPT_LANGUAGE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
444
- Languages.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Languages, providedIn: 'root' });
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Languages, decorators: [{
446
- type: Injectable,
447
- args: [{
448
- providedIn: 'root'
449
- }]
450
- }], ctorParameters: function () {
451
- return [{ type: undefined, decorators: [{
452
- type: Optional
453
- }, {
454
- type: Inject,
455
- args: [ACCEPT_LANGUAGE]
456
- }] }];
457
- } });
458
-
459
- const WINDOW = new InjectionToken('An abstraction over global window object', {
460
- factory: () => {
461
- const { defaultView } = inject(DOCUMENT);
462
- if (!defaultView) {
463
- throw new Error('Window is not available');
464
- }
465
- return defaultView;
466
- }
467
- });
468
-
469
- const NAVIGATOR = new InjectionToken('An abstraction over window.navigator object', {
470
- factory: () => inject(WINDOW).navigator
471
- });
472
-
473
- class Network {
474
- constructor(_platform, _window, _navigator) {
475
- this._platform = _platform;
476
- this._window = _window;
477
- this._navigator = _navigator;
478
- // Data.
479
- this._online$ = of(true);
480
- this.getOnlineObservable();
481
- }
482
- online() {
483
- return this._online$;
484
- }
485
- getOnlineObservable() {
486
- // Validate we are on a browser.
487
- if (!this._platform.isBrowser) {
488
- return;
489
- }
490
- // Get all the events from the window.
491
- const online$ = fromEvent(this._window, 'online').pipe(map(() => true));
492
- const offline$ = fromEvent(this._window, 'offline').pipe(map(() => false));
493
- const now$ = new Observable(subscriber => {
494
- var _a;
495
- subscriber.next((_a = this._navigator) === null || _a === void 0 ? void 0 : _a.onLine);
496
- subscriber.complete();
497
- });
498
- // Merge all event so we get notified when
499
- // a user is online/offline.
500
- this._online$ = merge(now$, online$, offline$).pipe(map(value => value), distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
501
- }
502
- }
503
- Network.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Network, deps: [{ token: i1.Platform }, { token: WINDOW, optional: true }, { token: NAVIGATOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
504
- Network.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Network, providedIn: 'root' });
505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Network, decorators: [{
506
- type: Injectable,
507
- args: [{
508
- providedIn: 'root'
509
- }]
510
- }], ctorParameters: function () {
511
- return [{ type: i1.Platform }, { type: Window, decorators: [{
512
- type: Optional
513
- }, {
514
- type: Inject,
515
- args: [WINDOW]
516
- }] }, { type: Navigator, decorators: [{
517
- type: Optional
518
- }, {
519
- type: Inject,
520
- args: [NAVIGATOR]
521
- }] }];
522
- } });
523
-
524
- class Patch {
525
- constructor(_platform, _window, _document) {
526
- this._platform = _platform;
527
- this._window = _window;
528
- this._document = _document;
529
- this._hasPatchedMobileVerticalHeight = false;
530
- // Subscriptions.
531
- this._subscription = new Subscription();
532
- }
533
- mobileVerticalHeight() {
534
- // Check if the user has already patched
535
- // the mobile vertical height.
536
- if (this._hasPatchedMobileVerticalHeight) {
537
- return;
538
- }
539
- this.periodicallySetDocumentVerticalProperty();
540
- this._hasPatchedMobileVerticalHeight = true;
541
- }
542
- ngOnDestroy() {
543
- var _a;
544
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
545
- }
546
- periodicallySetDocumentVerticalProperty() {
547
- // Validate we are using a browser.
548
- if (!this._platform.isBrowser) {
549
- return;
550
- }
551
- // Listen to a debounced window resize event.
552
- const resize$ = fromEvent(this._window, 'resize').pipe(debounceTime(25), startWith(0));
553
- // Subscribe to the resize observable.
554
- const subscription = resize$.subscribe(() => {
555
- var _a, _b, _c, _d;
556
- const verticalHeight = ((_a = this._window) === null || _a === void 0 ? void 0 : _a.innerHeight) * 0.01;
557
- (_d = (_c = (_b = this._document) === null || _b === void 0 ? void 0 : _b.documentElement) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.setProperty('--vh', `${verticalHeight}px`);
558
- });
559
- // Save the subscription so we can destroy it later.
560
- this._subscription.add(subscription);
561
- }
562
- }
563
- Patch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Patch, deps: [{ token: i1.Platform }, { token: WINDOW, optional: true }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
564
- Patch.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Patch, providedIn: 'root' });
565
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Patch, decorators: [{
566
- type: Injectable,
567
- args: [{
568
- providedIn: 'root'
569
- }]
570
- }], ctorParameters: function () {
571
- return [{ type: i1.Platform }, { type: Window, decorators: [{
572
- type: Optional
573
- }, {
574
- type: Inject,
575
- args: [WINDOW]
576
- }] }, { type: Document, decorators: [{
577
- type: Optional
578
- }, {
579
- type: Inject,
580
- args: [DOCUMENT]
581
- }] }];
582
- } });
583
-
584
- class Clipboard {
585
- constructor(_document) {
586
- this._document = _document;
587
- }
588
- copy(text) {
589
- const pendingCopy = this.beginCopy(text);
590
- const successful = pendingCopy.copy();
591
- pendingCopy.destroy();
592
- return successful;
593
- }
594
- beginCopy(text) {
595
- return new ClipboardCopy(text, this._document);
596
- }
597
- }
598
- Clipboard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Clipboard, deps: [{ token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
599
- Clipboard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Clipboard, providedIn: 'root' });
600
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: Clipboard, decorators: [{
601
- type: Injectable,
602
- args: [{
603
- providedIn: 'root'
604
- }]
605
- }], ctorParameters: function () {
606
- return [{ type: Document, decorators: [{
607
- type: Optional
608
- }, {
609
- type: Inject,
610
- args: [DOCUMENT]
611
- }] }];
612
- } });
613
- class ClipboardCopy {
614
- constructor(_text, _document) {
615
- this._text = _text;
616
- this._document = _document;
617
- this.initialize();
618
- }
619
- copy() {
620
- var _a, _b, _c, _d, _e, _f;
621
- const textarea = this._textarea;
622
- let successful = false;
623
- try {
624
- const currentFocus = this._document.activeElement;
625
- (_a = textarea === null || textarea === void 0 ? void 0 : textarea.select) === null || _a === void 0 ? void 0 : _a.call(textarea);
626
- (_b = textarea === null || textarea === void 0 ? void 0 : textarea.setSelectionRange) === null || _b === void 0 ? void 0 : _b.call(textarea, 0, (_c = textarea === null || textarea === void 0 ? void 0 : textarea.value) === null || _c === void 0 ? void 0 : _c.length);
627
- successful = (_e = (_d = this._document) === null || _d === void 0 ? void 0 : _d.execCommand) === null || _e === void 0 ? void 0 : _e.call(_d, 'copy');
628
- (_f = currentFocus === null || currentFocus === void 0 ? void 0 : currentFocus.focus) === null || _f === void 0 ? void 0 : _f.call(currentFocus);
629
- }
630
- catch (_g) {
631
- // Do nothing.
632
- }
633
- return successful;
634
- }
635
- destroy() {
636
- var _a, _b, _c;
637
- (_c = (_b = (_a = this._textarea) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild) === null || _c === void 0 ? void 0 : _c.call(_b, this._textarea);
638
- this._textarea = undefined;
639
- }
640
- initialize() {
641
- const textarea = this._textarea = this._document.createElement('textarea');
642
- const styles = textarea.style;
643
- // Hide the element for display and accessibility. Set a fixed position so the page layout
644
- // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea
645
- // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.
646
- styles.position = 'fixed';
647
- styles.top = styles.opacity = '0';
648
- styles.left = '-999em';
649
- textarea.setAttribute('aria-hidden', 'true');
650
- textarea.value = this._text;
651
- this._document.body.appendChild(textarea);
652
- }
653
- }
654
-
655
- function mixinDisabled(base) {
656
- return class extends base {
657
- get disabled() {
658
- return this._disable;
659
- }
660
- set disabled(value) {
661
- this._disable = coerceBooleanProperty(value);
662
- }
663
- constructor(...args) {
664
- super(...args);
665
- this._disable = false;
666
- }
667
- };
668
- }
669
-
670
- function mixinLoad(base) {
671
- return class extends base {
672
- get loading() {
673
- return this._loading;
674
- }
675
- set loading(value) {
676
- this._loading = coerceBooleanProperty(value);
677
- }
678
- constructor(...args) {
679
- super(...args);
680
- this._loading = false;
681
- }
682
- };
683
- }
684
-
685
- function mixinError(base) {
686
- return class extends base {
687
- get error() {
688
- return this._error;
689
- }
690
- set error(value) {
691
- this._error = coerceBooleanProperty(value);
692
- }
693
- constructor(...args) {
694
- super(...args);
695
- this._error = false;
696
- }
697
- };
698
- }
699
-
700
- function mixinHideErrors(base) {
701
- return class extends base {
702
- get hideErrors() {
703
- return this._hideErrors;
704
- }
705
- set hideErrors(value) {
706
- this._hideErrors = coerceBooleanProperty(value);
707
- }
708
- constructor(...args) {
709
- super(...args);
710
- this._hideErrors = false;
711
- }
712
- };
713
- }
714
-
715
- function mixinFocused(base) {
716
- return class extends base {
717
- get focused() {
718
- return this._focused;
719
- }
720
- set focused(value) {
721
- this._focused = coerceBooleanProperty(value);
722
- }
723
- constructor(...args) {
724
- super(...args);
725
- this._focused = false;
726
- }
727
- };
728
- }
729
-
730
- function mixinGrouped(base) {
731
- return class extends base {
732
- get grouped() {
733
- return this._grouped;
734
- }
735
- set grouped(value) {
736
- this._grouped = coerceBooleanProperty(value);
737
- }
738
- constructor(...args) {
739
- super(...args);
740
- this._grouped = false;
741
- }
742
- };
743
- }
744
-
745
- function mixinReadonly(base) {
746
- return class extends base {
747
- get readonly() {
748
- return this._readonly;
749
- }
750
- set readonly(value) {
751
- this._readonly = coerceBooleanProperty(value);
752
- }
753
- constructor(...args) {
754
- super(...args);
755
- this._readonly = false;
756
- }
757
- };
758
- }
759
-
760
- function mixinRequired(base) {
761
- return class extends base {
762
- get required() {
763
- return this._required;
764
- }
765
- set required(value) {
766
- this._required = coerceBooleanProperty(value);
767
- }
768
- constructor(...args) {
769
- super(...args);
770
- this._required = false;
771
- }
772
- };
773
- }
774
-
775
- const BASE_URL = new InjectionToken('BaseUrl');
776
-
777
- const COOKIE = new InjectionToken('Cookie');
778
-
779
- const LOCATION = new InjectionToken('An abstraction over window.location object', {
780
- factory: () => inject(WINDOW).location
781
- });
782
-
783
- const BbRegex = {
784
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
785
- fullNumber: /^\d*[1-9]\d*$/
786
- };
787
-
788
- class BbValidator {
789
- static email(control) {
790
- if (isEmptyInputValue(control.value)) {
791
- return null;
792
- }
793
- return BbRegex.email.test(control.value) ? null : { email: true };
794
- }
795
- static fullNumber(control) {
796
- if (isEmptyInputValue(control.value)) {
797
- return null;
798
- }
799
- return BbRegex.fullNumber.test(control.value) ? null : { fullNumber: true };
800
- }
801
- static maxFileSize(bytes) {
802
- const validator = (control) => {
803
- const value = control.value;
804
- // Validate if the value is a file.
805
- if (!(value instanceof File)) {
806
- return null;
807
- }
808
- if (value.size <= bytes) {
809
- return null;
810
- }
811
- let maxSize = '0 Bytes';
812
- if (bytes !== 0) {
813
- const k = 1024;
814
- const dm = 2;
815
- const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
816
- const index = Math.floor(Math.log(bytes) / Math.log(k));
817
- maxSize = parseFloat((bytes / Math.pow(k, index)).toFixed(dm)) + ' ' + sizes[index];
818
- }
819
- return { maxFileSize: { maxSize } };
820
- };
821
- return validator;
822
- }
823
- static confirm(fieldName, error = 'confirm') {
824
- const validator = (control) => {
825
- var _a;
826
- if (isEmptyInputValue(control.value)) {
827
- return null;
828
- }
829
- const field = (_a = control === null || control === void 0 ? void 0 : control.parent) === null || _a === void 0 ? void 0 : _a.get(fieldName);
830
- return (control === null || control === void 0 ? void 0 : control.value) === (field === null || field === void 0 ? void 0 : field.value)
831
- ? null
832
- : { [error]: true };
833
- };
834
- return validator;
835
- }
836
- static maxDate(date, error = 'maxDate') {
837
- const formattedDate = date.toString() !== 'Invalid Date'
838
- ? formatDate(date, 'yyyy-MM-dd', 'en-US')
839
- : null;
840
- const validator = (control) => {
841
- if (isEmptyInputValue(control.value)) {
842
- return null;
843
- }
844
- const controlDate = new Date(control.value);
845
- return controlDate.getTime() > date.getTime()
846
- ? { [error]: { date: formattedDate } }
847
- : null;
848
- };
849
- return validator;
850
- }
851
- static minDate(date, error = 'minDate') {
852
- const formattedDate = date.toString() !== 'Invalid Date'
853
- ? formatDate(date, 'yyyy-MM-dd', 'en-US')
854
- : null;
855
- const validator = (control) => {
856
- if (isEmptyInputValue(control.value)) {
857
- return null;
858
- }
859
- const controlDate = new Date(control.value);
860
- return controlDate.getTime() < date.getTime()
861
- ? { [error]: { date: formattedDate } }
862
- : null;
863
- };
864
- return validator;
865
- }
866
- }
867
- function isEmptyInputValue(value) {
868
- // We don't check for string here so it also works with arrays.
869
- return value == null || value.length === 0;
870
- }
871
-
872
- function parseDate(value) {
873
- if (value === undefined || value === null) {
874
- return null;
875
- }
876
- if (typeof value === 'string') {
877
- if (/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/.test(value)) {
878
- return createDate(new Date(`${value}Z`));
879
- }
880
- if (/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.test(value)) {
881
- const [y, m, d] = value.split('-');
882
- const year = Number(y);
883
- const month = Number(m) - 1;
884
- const day = Number(d);
885
- return createDate(new Date(year, month, day));
886
- }
887
- }
888
- return createDate(new Date(value));
889
- }
890
- function createDate(date) {
891
- return isValidDate(date) ? date : null;
892
- }
893
- function isValidDate(date) {
894
- if (!isDate(date)) {
895
- return false;
896
- }
897
- return !isNaN(Number(date));
898
- }
899
- function isDate(value) {
900
- return (value instanceof Date || (typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]'));
901
- }
902
-
903
- function generatePassword(length = 12) {
904
- const chars = 'abcdefghijklmnopqrstuvwxyz';
905
- const upperChars = chars.toUpperCase();
906
- const numberChars = '0123456789';
907
- const specialChars = '#?!@$%^&*-';
908
- const usableChars = chars + upperChars + numberChars + specialChars;
909
- let generatedPassword = '';
910
- for (let index = 0; index < length - 4; index++) {
911
- generatedPassword += usableChars[Math.floor(Math.random() * (usableChars.length))];
912
- }
913
- generatedPassword += chars[Math.floor(Math.random() * (chars.length))];
914
- generatedPassword += upperChars[Math.floor(Math.random() * (upperChars.length))];
915
- generatedPassword += numberChars[Math.floor(Math.random() * (numberChars.length))];
916
- generatedPassword += specialChars[Math.floor(Math.random() * (specialChars.length))];
917
- return generatedPassword;
918
- }
919
-
920
- /*
921
- * Public API Surface of bb-foundation
922
- */
923
-
924
- /**
925
- * Generated bundle index. Do not edit.
926
- */
927
-
928
- export { ACCEPT_LANGUAGE, BASE_URL, BbRegex, BbValidator, COOKIE, Clipboard, ClipboardCopy, Exif, FileLoader, ImageConverter, LOCATION, Languages, NAVIGATOR, Network, Patch, WINDOW, createDate, generatePassword, isDate, isValidDate, mixinDisabled, mixinError, mixinFocused, mixinGrouped, mixinHideErrors, mixinLoad, mixinReadonly, mixinRequired, parseDate };
929
- //# sourceMappingURL=bravobit-bb-foundation.mjs.map