@bravobit/bb-foundation 0.14.3 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/README.md +47 -47
  2. package/auth/bravobit-bb-foundation-auth.d.ts +5 -5
  3. package/auth/lib/auth.interceptor.d.ts +21 -21
  4. package/auth/lib/auth.module.d.ts +15 -15
  5. package/auth/lib/auth.service.d.ts +59 -59
  6. package/auth/lib/auth.session.d.ts +34 -34
  7. package/auth/lib/directives/authenticated.directive.d.ts +14 -14
  8. package/auth/lib/directives/permission.directive.d.ts +24 -24
  9. package/auth/lib/directives/role.directive.d.ts +16 -16
  10. package/auth/lib/guards/anonymous.guard.d.ts +11 -11
  11. package/auth/lib/guards/authenticated.guard.d.ts +11 -11
  12. package/auth/lib/helpers/jwt.helper.d.ts +8 -8
  13. package/auth/lib/helpers/mapper.helper.d.ts +23 -23
  14. package/auth/lib/interfaces/config.interface.d.ts +12 -12
  15. package/auth/lib/interfaces/mapper.interface.d.ts +19 -19
  16. package/auth/lib/interfaces/provider.interface.d.ts +16 -16
  17. package/auth/lib/interfaces/token.interface.d.ts +11 -11
  18. package/auth/lib/permissions.service.d.ts +14 -14
  19. package/auth/lib/providers/email.provider.d.ts +15 -15
  20. package/auth/lib/providers/verify.provider.d.ts +13 -13
  21. package/auth/lib/tokens/use-authorization.token.d.ts +2 -2
  22. package/auth/public_api.d.ts +18 -18
  23. package/bravobit-bb-foundation.d.ts +5 -5
  24. package/bundles/bravobit-bb-foundation-auth.umd.js +1400 -1402
  25. package/bundles/bravobit-bb-foundation-auth.umd.js.map +1 -1
  26. package/bundles/bravobit-bb-foundation-collections.umd.js +868 -0
  27. package/bundles/bravobit-bb-foundation-collections.umd.js.map +1 -0
  28. package/bundles/bravobit-bb-foundation-dashboard.umd.js +817 -819
  29. package/bundles/bravobit-bb-foundation-dashboard.umd.js.map +1 -1
  30. package/bundles/bravobit-bb-foundation-dialog.umd.js +649 -651
  31. package/bundles/bravobit-bb-foundation-dialog.umd.js.map +1 -1
  32. package/bundles/bravobit-bb-foundation-elements.umd.js +2651 -2653
  33. package/bundles/bravobit-bb-foundation-elements.umd.js.map +1 -1
  34. package/bundles/bravobit-bb-foundation-http.umd.js +488 -490
  35. package/bundles/bravobit-bb-foundation-http.umd.js.map +1 -1
  36. package/bundles/bravobit-bb-foundation-localize.umd.js +1208 -1210
  37. package/bundles/bravobit-bb-foundation-localize.umd.js.map +1 -1
  38. package/bundles/bravobit-bb-foundation-notifications.umd.js +743 -745
  39. package/bundles/bravobit-bb-foundation-notifications.umd.js.map +1 -1
  40. package/bundles/bravobit-bb-foundation-recaptcha.umd.js +640 -642
  41. package/bundles/bravobit-bb-foundation-recaptcha.umd.js.map +1 -1
  42. package/bundles/bravobit-bb-foundation-rxjs.umd.js +13 -13
  43. package/bundles/bravobit-bb-foundation-rxjs.umd.js.map +1 -1
  44. package/bundles/bravobit-bb-foundation-storage.umd.js +756 -758
  45. package/bundles/bravobit-bb-foundation-storage.umd.js.map +1 -1
  46. package/bundles/bravobit-bb-foundation-table.umd.js +993 -995
  47. package/bundles/bravobit-bb-foundation-table.umd.js.map +1 -1
  48. package/bundles/bravobit-bb-foundation.umd.js +1332 -1334
  49. package/bundles/bravobit-bb-foundation.umd.js.map +1 -1
  50. package/collections/bravobit-bb-foundation-collections.d.ts +5 -0
  51. package/collections/lib/collection.d.ts +43 -0
  52. package/collections/lib/collections.module.d.ts +10 -0
  53. package/collections/lib/components/collections-pager/collections-pager.component.d.ts +34 -0
  54. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +12 -0
  55. package/collections/lib/components/collections.directive.d.ts +17 -0
  56. package/collections/lib/interfaces/collection.interface.d.ts +26 -0
  57. package/collections/lib/providers/api-collection.provider.d.ts +15 -0
  58. package/collections/lib/providers/collection.provider.d.ts +6 -0
  59. package/collections/lib/providers/local-collection.provider.d.ts +8 -0
  60. package/collections/package.json +10 -0
  61. package/collections/public_api.d.ts +9 -0
  62. package/dashboard/bravobit-bb-foundation-dashboard.d.ts +5 -5
  63. package/dashboard/lib/dashboard/dashboard.component.d.ts +19 -19
  64. package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +11 -11
  65. package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +9 -9
  66. package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +11 -11
  67. package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +21 -21
  68. package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +27 -27
  69. package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +16 -16
  70. package/dashboard/lib/dashboard.module.d.ts +16 -16
  71. package/dashboard/public_api.d.ts +8 -8
  72. package/dialog/bravobit-bb-foundation-dialog.d.ts +5 -5
  73. package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +5 -5
  74. package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +16 -16
  75. package/dialog/lib/dialog-container/dialog-container.component.d.ts +24 -24
  76. package/dialog/lib/dialog-header/dialog-header.component.d.ts +9 -9
  77. package/dialog/lib/dialog-link/dialog-link.component.d.ts +5 -5
  78. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +12 -12
  79. package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +22 -22
  80. package/dialog/lib/dialog.injector.d.ts +8 -8
  81. package/dialog/lib/dialog.insertion.d.ts +8 -8
  82. package/dialog/lib/dialog.interfaces.d.ts +3 -3
  83. package/dialog/lib/dialog.module.d.ts +19 -19
  84. package/dialog/lib/dialog.ref.d.ts +8 -8
  85. package/dialog/lib/dialog.service.d.ts +19 -19
  86. package/dialog/public_api.d.ts +9 -9
  87. package/elements/bravobit-bb-foundation-elements.d.ts +5 -5
  88. package/elements/lib/avatar/avatar.component.d.ts +25 -25
  89. package/elements/lib/button/button.component.d.ts +23 -23
  90. package/elements/lib/checkbox/checkbox.component.d.ts +27 -27
  91. package/elements/lib/date-picker/date-picker.component.d.ts +69 -69
  92. package/elements/lib/directives/addon.directive.d.ts +9 -9
  93. package/elements/lib/directives/autosize.directive.d.ts +18 -18
  94. package/elements/lib/directives/focus-trap.directive.d.ts +17 -17
  95. package/elements/lib/directives/focus.directive.d.ts +14 -14
  96. package/elements/lib/directives/form-submit.directive.d.ts +17 -17
  97. package/elements/lib/directives/input.directive.d.ts +38 -38
  98. package/elements/lib/directives/template.directive.d.ts +10 -10
  99. package/elements/lib/dropdown/dropdown.component.d.ts +21 -21
  100. package/elements/lib/elements.interfaces.d.ts +25 -25
  101. package/elements/lib/elements.module.d.ts +116 -116
  102. package/elements/lib/file-picker/file-picker.component.d.ts +49 -49
  103. package/elements/lib/form-control/form-control.component.d.ts +21 -21
  104. package/elements/lib/form-error/form-error.component.d.ts +29 -29
  105. package/elements/lib/form-group/form-group.component.d.ts +10 -10
  106. package/elements/lib/icon/icon.component.d.ts +22 -22
  107. package/elements/lib/image-picker/image-picker.component.d.ts +38 -38
  108. package/elements/lib/pipes/file-image.pipe.d.ts +13 -13
  109. package/elements/lib/pipes/file-size.pipe.d.ts +8 -8
  110. package/elements/lib/pipes/relative-time.pipe.d.ts +19 -19
  111. package/elements/lib/spinner/spinner.component.d.ts +12 -12
  112. package/elements/lib/tag/tag.component.d.ts +7 -7
  113. package/elements/public_api.d.ts +25 -25
  114. package/esm2015/auth/bravobit-bb-foundation-auth.js +4 -4
  115. package/esm2015/auth/lib/auth.interceptor.js +95 -95
  116. package/esm2015/auth/lib/auth.module.js +54 -54
  117. package/esm2015/auth/lib/auth.service.js +299 -299
  118. package/esm2015/auth/lib/auth.session.js +136 -136
  119. package/esm2015/auth/lib/directives/authenticated.directive.js +32 -32
  120. package/esm2015/auth/lib/directives/permission.directive.js +81 -81
  121. package/esm2015/auth/lib/directives/role.directive.js +38 -38
  122. package/esm2015/auth/lib/guards/anonymous.guard.js +35 -35
  123. package/esm2015/auth/lib/guards/authenticated.guard.js +36 -36
  124. package/esm2015/auth/lib/helpers/jwt.helper.js +69 -69
  125. package/esm2015/auth/lib/helpers/mapper.helper.js +35 -35
  126. package/esm2015/auth/lib/interfaces/config.interface.js +3 -3
  127. package/esm2015/auth/lib/interfaces/mapper.interface.js +2 -2
  128. package/esm2015/auth/lib/interfaces/provider.interface.js +2 -2
  129. package/esm2015/auth/lib/interfaces/token.interface.js +2 -2
  130. package/esm2015/auth/lib/permissions.service.js +58 -58
  131. package/esm2015/auth/lib/providers/email.provider.js +26 -26
  132. package/esm2015/auth/lib/providers/verify.provider.js +20 -20
  133. package/esm2015/auth/lib/tokens/use-authorization.token.js +3 -3
  134. package/esm2015/auth/public_api.js +19 -19
  135. package/esm2015/bravobit-bb-foundation.js +4 -4
  136. package/esm2015/collections/bravobit-bb-foundation-collections.js +5 -0
  137. package/esm2015/collections/lib/collection.js +104 -0
  138. package/esm2015/collections/lib/collections.module.js +54 -0
  139. package/esm2015/collections/lib/components/collections-pager/collections-pager.component.js +136 -0
  140. package/esm2015/collections/lib/components/collections-viewer/collections-viewer.component.js +39 -0
  141. package/esm2015/collections/lib/components/collections.directive.js +43 -0
  142. package/esm2015/collections/lib/interfaces/collection.interface.js +2 -0
  143. package/esm2015/collections/lib/providers/api-collection.provider.js +69 -0
  144. package/esm2015/collections/lib/providers/collection.provider.js +14 -0
  145. package/esm2015/collections/lib/providers/local-collection.provider.js +16 -0
  146. package/esm2015/collections/public_api.js +10 -0
  147. package/esm2015/dashboard/bravobit-bb-foundation-dashboard.js +4 -4
  148. package/esm2015/dashboard/lib/dashboard/dashboard.component.js +64 -64
  149. package/esm2015/dashboard/lib/dashboard-header/dashboard-header.component.js +41 -41
  150. package/esm2015/dashboard/lib/dashboard-menu/dashboard-menu.component.js +39 -39
  151. package/esm2015/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.js +38 -38
  152. package/esm2015/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.js +83 -83
  153. package/esm2015/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.js +110 -110
  154. package/esm2015/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.js +71 -71
  155. package/esm2015/dashboard/lib/dashboard.module.js +47 -47
  156. package/esm2015/dashboard/public_api.js +9 -9
  157. package/esm2015/dialog/bravobit-bb-foundation-dialog.js +4 -4
  158. package/esm2015/dialog/lib/dialog-actions/dialog-actions.component.js +20 -20
  159. package/esm2015/dialog/lib/dialog-confirm/dialog-confirm.component.js +45 -45
  160. package/esm2015/dialog/lib/dialog-container/dialog-container.component.js +162 -162
  161. package/esm2015/dialog/lib/dialog-header/dialog-header.component.js +33 -33
  162. package/esm2015/dialog/lib/dialog-link/dialog-link.component.js +19 -19
  163. package/esm2015/dialog/lib/dialog-modal/dialog-modal.component.js +54 -54
  164. package/esm2015/dialog/lib/dialog-overlay/dialog-overlay.component.js +143 -143
  165. package/esm2015/dialog/lib/dialog.injector.js +18 -18
  166. package/esm2015/dialog/lib/dialog.insertion.js +16 -16
  167. package/esm2015/dialog/lib/dialog.interfaces.js +3 -3
  168. package/esm2015/dialog/lib/dialog.module.js +74 -74
  169. package/esm2015/dialog/lib/dialog.ref.js +22 -22
  170. package/esm2015/dialog/lib/dialog.service.js +77 -77
  171. package/esm2015/dialog/public_api.js +10 -10
  172. package/esm2015/elements/bravobit-bb-foundation-elements.js +4 -4
  173. package/esm2015/elements/lib/avatar/avatar.component.js +151 -151
  174. package/esm2015/elements/lib/button/button.component.js +79 -79
  175. package/esm2015/elements/lib/checkbox/checkbox.component.js +83 -83
  176. package/esm2015/elements/lib/date-picker/date-picker.component.js +322 -322
  177. package/esm2015/elements/lib/directives/addon.directive.js +29 -29
  178. package/esm2015/elements/lib/directives/autosize.directive.js +74 -74
  179. package/esm2015/elements/lib/directives/focus-trap.directive.js +77 -77
  180. package/esm2015/elements/lib/directives/focus.directive.js +39 -39
  181. package/esm2015/elements/lib/directives/form-submit.directive.js +53 -53
  182. package/esm2015/elements/lib/directives/input.directive.js +139 -139
  183. package/esm2015/elements/lib/directives/template.directive.js +28 -28
  184. package/esm2015/elements/lib/dropdown/dropdown.component.js +111 -111
  185. package/esm2015/elements/lib/elements.interfaces.js +4 -4
  186. package/esm2015/elements/lib/elements.module.js +177 -177
  187. package/esm2015/elements/lib/file-picker/file-picker.component.js +247 -247
  188. package/esm2015/elements/lib/form-control/form-control.component.js +58 -58
  189. package/esm2015/elements/lib/form-error/form-error.component.js +116 -116
  190. package/esm2015/elements/lib/form-group/form-group.component.js +27 -27
  191. package/esm2015/elements/lib/icon/icon.component.js +110 -110
  192. package/esm2015/elements/lib/image-picker/image-picker.component.js +119 -119
  193. package/esm2015/elements/lib/pipes/file-image.pipe.js +45 -45
  194. package/esm2015/elements/lib/pipes/file-size.pipe.js +28 -28
  195. package/esm2015/elements/lib/pipes/relative-time.pipe.js +96 -96
  196. package/esm2015/elements/lib/spinner/spinner.component.js +34 -34
  197. package/esm2015/elements/lib/tag/tag.component.js +26 -26
  198. package/esm2015/elements/public_api.js +26 -26
  199. package/esm2015/http/bravobit-bb-foundation-http.js +4 -4
  200. package/esm2015/http/lib/classes/http.config.js +31 -31
  201. package/esm2015/http/lib/classes/http.error.js +21 -21
  202. package/esm2015/http/lib/http.interfaces.js +2 -2
  203. package/esm2015/http/lib/http.module.js +43 -43
  204. package/esm2015/http/lib/interceptors/base-url.interceptor.js +52 -52
  205. package/esm2015/http/lib/interceptors/error.interceptor.js +33 -33
  206. package/esm2015/http/public_api.js +7 -7
  207. package/esm2015/lib/core/coercions/boolean-coercion.js +4 -4
  208. package/esm2015/lib/core/miscellaneous/regex.js +5 -5
  209. package/esm2015/lib/core/miscellaneous/validator.js +86 -86
  210. package/esm2015/lib/core/mixins/can-disable.js +16 -16
  211. package/esm2015/lib/core/mixins/can-hide-errors.js +16 -16
  212. package/esm2015/lib/core/mixins/can-load.js +16 -16
  213. package/esm2015/lib/core/mixins/constructor.js +2 -2
  214. package/esm2015/lib/core/mixins/has-error.js +16 -16
  215. package/esm2015/lib/core/mixins/is-focused.js +16 -16
  216. package/esm2015/lib/core/mixins/is-grouped.js +16 -16
  217. package/esm2015/lib/core/mixins/is-readonly.js +16 -16
  218. package/esm2015/lib/core/mixins/is-required.js +16 -16
  219. package/esm2015/lib/core/services/clipboard.service.js +72 -72
  220. package/esm2015/lib/core/services/exif.service.js +168 -168
  221. package/esm2015/lib/core/services/file-loader.service.js +90 -90
  222. package/esm2015/lib/core/services/image-converter.service.js +130 -130
  223. package/esm2015/lib/core/services/languages.service.js +74 -74
  224. package/esm2015/lib/core/services/network.service.js +56 -56
  225. package/esm2015/lib/core/services/patch.service.js +65 -65
  226. package/esm2015/lib/core/services/platform.service.js +42 -42
  227. package/esm2015/lib/core/tokens/accept-language.token.js +3 -3
  228. package/esm2015/lib/core/tokens/base-url.token.js +3 -3
  229. package/esm2015/lib/core/tokens/cookie.token.js +3 -3
  230. package/esm2015/lib/core/tokens/location.token.js +6 -6
  231. package/esm2015/lib/core/tokens/navigator.token.js +6 -6
  232. package/esm2015/lib/core/tokens/window.token.js +12 -12
  233. package/esm2015/localize/bravobit-bb-foundation-localize.js +4 -4
  234. package/esm2015/localize/lib/functions/date.function.js +18 -18
  235. package/esm2015/localize/lib/functions/lowercase.function.js +13 -13
  236. package/esm2015/localize/lib/functions/uppercase.function.js +13 -13
  237. package/esm2015/localize/lib/handlers/missing.handler.js +17 -17
  238. package/esm2015/localize/lib/interfaces/config.interfaces.js +10 -10
  239. package/esm2015/localize/lib/interfaces/dictionary.interfaces.js +8 -8
  240. package/esm2015/localize/lib/interfaces/functions.interfaces.js +8 -8
  241. package/esm2015/localize/lib/interfaces/handlers.interfaces.js +2 -2
  242. package/esm2015/localize/lib/interfaces/options.interfaces.js +6 -6
  243. package/esm2015/localize/lib/localizations/dutch.localization.js +53 -53
  244. package/esm2015/localize/lib/localizations/english.localization.js +53 -53
  245. package/esm2015/localize/lib/localize.dictionary.js +137 -137
  246. package/esm2015/localize/lib/localize.module.js +69 -69
  247. package/esm2015/localize/lib/localize.pipe.js +49 -49
  248. package/esm2015/localize/lib/localize.service.js +282 -282
  249. package/esm2015/localize/lib/views/localize-string/localize-string.component.js +99 -99
  250. package/esm2015/localize/lib/views/localize-template-or-string.directive.js +28 -28
  251. package/esm2015/localize/lib/views/localize-template.directive.js +21 -21
  252. package/esm2015/localize/public_api.js +18 -18
  253. package/esm2015/notifications/bravobit-bb-foundation-notifications.js +4 -4
  254. package/esm2015/notifications/lib/notifications-item/notifications-item.component.js +108 -108
  255. package/esm2015/notifications/lib/notifications-list/notifications-list.component.js +56 -56
  256. package/esm2015/notifications/lib/notifications.animations.js +28 -28
  257. package/esm2015/notifications/lib/notifications.injector.js +18 -18
  258. package/esm2015/notifications/lib/notifications.interfaces.js +20 -20
  259. package/esm2015/notifications/lib/notifications.module.js +31 -31
  260. package/esm2015/notifications/lib/notifications.service.js +145 -145
  261. package/esm2015/notifications/public_api.js +4 -4
  262. package/esm2015/public_api.js +30 -30
  263. package/esm2015/recaptcha/bravobit-bb-foundation-recaptcha.js +4 -4
  264. package/esm2015/recaptcha/lib/recaptcha/recaptcha.component.js +199 -199
  265. package/esm2015/recaptcha/lib/recaptcha-loader.service.js +93 -93
  266. package/esm2015/recaptcha/lib/recaptcha.interface.js +3 -3
  267. package/esm2015/recaptcha/lib/recaptcha.module.js +27 -27
  268. package/esm2015/recaptcha/public_api.js +5 -5
  269. package/esm2015/rxjs/bravobit-bb-foundation-rxjs.js +4 -4
  270. package/esm2015/rxjs/lib/operators/combine-latest-map.operator.js +7 -7
  271. package/esm2015/rxjs/lib/operators/filter-nil.operator.js +5 -5
  272. package/esm2015/rxjs/public_api.js +3 -3
  273. package/esm2015/storage/bravobit-bb-foundation-storage.js +4 -4
  274. package/esm2015/storage/lib/interfaces/attributes.interface.js +2 -2
  275. package/esm2015/storage/lib/interfaces/memory.interface.js +2 -2
  276. package/esm2015/storage/lib/interfaces/strategy.interface.js +2 -2
  277. package/esm2015/storage/lib/storage.service.js +111 -111
  278. package/esm2015/storage/lib/strategies/cookie-storage.strategy.js +143 -143
  279. package/esm2015/storage/lib/strategies/memory-storage.strategy.js +56 -56
  280. package/esm2015/storage/lib/strategies/polyfill-storage.strategy.js +102 -102
  281. package/esm2015/storage/public_api.js +8 -8
  282. package/esm2015/table/bravobit-bb-foundation-table.js +4 -4
  283. package/esm2015/table/lib/components/table/table.component.js +183 -183
  284. package/esm2015/table/lib/components/table-cell/table-cell.component.js +19 -19
  285. package/esm2015/table/lib/components/table-header-cell/table-header-cell.component.js +141 -141
  286. package/esm2015/table/lib/components/table-pager/table-pager.component.js +146 -146
  287. package/esm2015/table/lib/data/datasource.data.js +32 -32
  288. package/esm2015/table/lib/data/generic.data.js +73 -73
  289. package/esm2015/table/lib/interfaces/datasource.interface.js +2 -2
  290. package/esm2015/table/lib/interfaces/table.interfaces.js +2 -2
  291. package/esm2015/table/lib/table.module.js +39 -39
  292. package/esm2015/table/public_api.js +10 -10
  293. package/fesm2015/bravobit-bb-foundation-auth.js +915 -915
  294. package/fesm2015/bravobit-bb-foundation-auth.js.map +1 -1
  295. package/fesm2015/bravobit-bb-foundation-collections.js +463 -0
  296. package/fesm2015/bravobit-bb-foundation-collections.js.map +1 -0
  297. package/fesm2015/bravobit-bb-foundation-dashboard.js +434 -434
  298. package/fesm2015/bravobit-bb-foundation-dashboard.js.map +1 -1
  299. package/fesm2015/bravobit-bb-foundation-dialog.js +603 -603
  300. package/fesm2015/bravobit-bb-foundation-dialog.js.map +1 -1
  301. package/fesm2015/bravobit-bb-foundation-elements.js +2076 -2076
  302. package/fesm2015/bravobit-bb-foundation-elements.js.map +1 -1
  303. package/fesm2015/bravobit-bb-foundation-http.js +154 -154
  304. package/fesm2015/bravobit-bb-foundation-http.js.map +1 -1
  305. package/fesm2015/bravobit-bb-foundation-localize.js +796 -796
  306. package/fesm2015/bravobit-bb-foundation-localize.js.map +1 -1
  307. package/fesm2015/bravobit-bb-foundation-notifications.js +364 -364
  308. package/fesm2015/bravobit-bb-foundation-notifications.js.map +1 -1
  309. package/fesm2015/bravobit-bb-foundation-recaptcha.js +297 -297
  310. package/fesm2015/bravobit-bb-foundation-recaptcha.js.map +1 -1
  311. package/fesm2015/bravobit-bb-foundation-rxjs.js +7 -7
  312. package/fesm2015/bravobit-bb-foundation-rxjs.js.map +1 -1
  313. package/fesm2015/bravobit-bb-foundation-storage.js +399 -399
  314. package/fesm2015/bravobit-bb-foundation-storage.js.map +1 -1
  315. package/fesm2015/bravobit-bb-foundation-table.js +578 -578
  316. package/fesm2015/bravobit-bb-foundation-table.js.map +1 -1
  317. package/fesm2015/bravobit-bb-foundation.js +851 -851
  318. package/fesm2015/bravobit-bb-foundation.js.map +1 -1
  319. package/http/bravobit-bb-foundation-http.d.ts +5 -5
  320. package/http/lib/classes/http.config.d.ts +9 -9
  321. package/http/lib/classes/http.error.d.ts +7 -7
  322. package/http/lib/http.interfaces.d.ts +12 -12
  323. package/http/lib/http.module.d.ts +15 -15
  324. package/http/lib/interceptors/base-url.interceptor.d.ts +15 -15
  325. package/http/lib/interceptors/error.interceptor.d.ts +11 -11
  326. package/http/public_api.d.ts +6 -6
  327. package/lib/core/coercions/boolean-coercion.d.ts +1 -1
  328. package/lib/core/miscellaneous/regex.d.ts +4 -4
  329. package/lib/core/miscellaneous/validator.d.ts +13 -13
  330. package/lib/core/mixins/can-disable.d.ts +6 -6
  331. package/lib/core/mixins/can-hide-errors.d.ts +6 -6
  332. package/lib/core/mixins/can-load.d.ts +6 -6
  333. package/lib/core/mixins/constructor.d.ts +1 -1
  334. package/lib/core/mixins/has-error.d.ts +6 -6
  335. package/lib/core/mixins/is-focused.d.ts +6 -6
  336. package/lib/core/mixins/is-grouped.d.ts +6 -6
  337. package/lib/core/mixins/is-readonly.d.ts +6 -6
  338. package/lib/core/mixins/is-required.d.ts +6 -6
  339. package/lib/core/services/clipboard.service.d.ts +18 -18
  340. package/lib/core/services/exif.service.d.ts +15 -15
  341. package/lib/core/services/file-loader.service.d.ts +13 -13
  342. package/lib/core/services/image-converter.service.d.ts +21 -21
  343. package/lib/core/services/languages.service.d.ts +16 -16
  344. package/lib/core/services/network.service.d.ts +14 -14
  345. package/lib/core/services/patch.service.d.ts +16 -16
  346. package/lib/core/services/platform.service.d.ts +18 -18
  347. package/lib/core/tokens/accept-language.token.d.ts +2 -2
  348. package/lib/core/tokens/base-url.token.d.ts +2 -2
  349. package/lib/core/tokens/cookie.token.d.ts +2 -2
  350. package/lib/core/tokens/location.token.d.ts +2 -2
  351. package/lib/core/tokens/navigator.token.d.ts +2 -2
  352. package/lib/core/tokens/window.token.d.ts +2 -2
  353. package/localize/bravobit-bb-foundation-localize.d.ts +5 -5
  354. package/localize/lib/functions/date.function.d.ts +5 -5
  355. package/localize/lib/functions/lowercase.function.d.ts +5 -5
  356. package/localize/lib/functions/uppercase.function.d.ts +5 -5
  357. package/localize/lib/handlers/missing.handler.d.ts +6 -6
  358. package/localize/lib/interfaces/config.interfaces.d.ts +8 -8
  359. package/localize/lib/interfaces/dictionary.interfaces.d.ts +12 -12
  360. package/localize/lib/interfaces/functions.interfaces.d.ts +9 -9
  361. package/localize/lib/interfaces/handlers.interfaces.d.ts +6 -6
  362. package/localize/lib/interfaces/options.interfaces.d.ts +10 -10
  363. package/localize/lib/localizations/dutch.localization.d.ts +51 -51
  364. package/localize/lib/localizations/english.localization.d.ts +51 -51
  365. package/localize/lib/localize.dictionary.d.ts +24 -24
  366. package/localize/lib/localize.module.d.ts +18 -18
  367. package/localize/lib/localize.pipe.d.ts +12 -12
  368. package/localize/lib/localize.service.d.ts +51 -51
  369. package/localize/lib/views/localize-string/localize-string.component.d.ts +23 -23
  370. package/localize/lib/views/localize-template-or-string.directive.d.ts +10 -10
  371. package/localize/lib/views/localize-template.directive.d.ts +9 -9
  372. package/localize/public_api.d.ts +17 -17
  373. package/notifications/bravobit-bb-foundation-notifications.d.ts +5 -5
  374. package/notifications/lib/notifications-item/notifications-item.component.d.ts +34 -34
  375. package/notifications/lib/notifications-list/notifications-list.component.d.ts +16 -16
  376. package/notifications/lib/notifications.animations.d.ts +1 -1
  377. package/notifications/lib/notifications.injector.d.ts +8 -8
  378. package/notifications/lib/notifications.interfaces.d.ts +49 -49
  379. package/notifications/lib/notifications.module.d.ts +13 -13
  380. package/notifications/lib/notifications.service.d.ts +34 -34
  381. package/notifications/public_api.d.ts +3 -3
  382. package/package.json +5 -5
  383. package/public_api.d.ts +26 -26
  384. package/recaptcha/bravobit-bb-foundation-recaptcha.d.ts +5 -5
  385. package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +47 -47
  386. package/recaptcha/lib/recaptcha-loader.service.d.ts +22 -22
  387. package/recaptcha/lib/recaptcha.interface.d.ts +14 -14
  388. package/recaptcha/lib/recaptcha.module.d.ts +10 -16
  389. package/recaptcha/public_api.d.ts +4 -4
  390. package/rxjs/bravobit-bb-foundation-rxjs.d.ts +5 -5
  391. package/rxjs/lib/operators/combine-latest-map.operator.d.ts +8 -8
  392. package/rxjs/lib/operators/filter-nil.operator.d.ts +1 -1
  393. package/rxjs/public_api.d.ts +2 -2
  394. package/storage/bravobit-bb-foundation-storage.d.ts +5 -5
  395. package/storage/lib/interfaces/attributes.interface.d.ts +13 -13
  396. package/storage/lib/interfaces/memory.interface.d.ts +7 -7
  397. package/storage/lib/interfaces/strategy.interface.d.ts +17 -17
  398. package/storage/lib/storage.service.d.ts +26 -26
  399. package/storage/lib/strategies/cookie-storage.strategy.d.ts +20 -20
  400. package/storage/lib/strategies/memory-storage.strategy.d.ts +11 -11
  401. package/storage/lib/strategies/polyfill-storage.strategy.d.ts +15 -15
  402. package/storage/public_api.d.ts +7 -7
  403. package/table/bravobit-bb-foundation-table.d.ts +5 -5
  404. package/table/lib/components/table/table.component.d.ts +48 -48
  405. package/table/lib/components/table-cell/table-cell.component.d.ts +5 -5
  406. package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +29 -29
  407. package/table/lib/components/table-pager/table-pager.component.d.ts +41 -41
  408. package/table/lib/data/datasource.data.d.ts +14 -14
  409. package/table/lib/data/generic.data.d.ts +23 -23
  410. package/table/lib/interfaces/datasource.interface.d.ts +17 -17
  411. package/table/lib/interfaces/table.interfaces.d.ts +1 -1
  412. package/table/lib/table.module.d.ts +14 -14
  413. package/table/public_api.d.ts +9 -9
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@bravobit/bb-foundation')) :
3
3
  typeof define === 'function' && define.amd ? define('@bravobit/bb-foundation/storage', ['exports', '@angular/core', '@bravobit/bb-foundation'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravobit = global.bravobit || {}, global.bravobit['bb-foundation'] = global.bravobit['bb-foundation'] || {}, global.bravobit['bb-foundation'].storage = {}), global.ng.core, global.bravobit['bb-foundation']));
5
- }(this, (function (exports, i0, i1) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravobit = global.bravobit || {}, global.bravobit["bb-foundation"] = global.bravobit["bb-foundation"] || {}, global.bravobit["bb-foundation"].storage = {}), global.ng.core, global.bravobit["bb-foundation"]));
5
+ })(this, (function (exports, i0, i1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -13,781 +13,779 @@
13
13
  var d = Object.getOwnPropertyDescriptor(e, k);
14
14
  Object.defineProperty(n, k, d.get ? d : {
15
15
  enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
16
+ get: function () { return e[k]; }
19
17
  });
20
18
  }
21
19
  });
22
20
  }
23
- n['default'] = e;
21
+ n["default"] = e;
24
22
  return Object.freeze(n);
25
23
  }
26
24
 
27
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
26
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
27
 
30
- var PolyfillStorage = /** @class */ (function () {
31
- function PolyfillStorage(_storage) {
32
- var _this = this;
33
- this._storage = _storage;
34
- // State.
35
- this._isSupported = false;
36
- this.encode = function (value, attributes) {
37
- // Make sure the expires attribute is a date and not a number.
38
- var data = { value: value };
39
- if (typeof attributes.expires === 'number') {
40
- attributes.expires = new Date(attributes.expires);
41
- }
42
- if (attributes.expires) {
43
- data['expires'] = attributes.expires;
44
- }
45
- return JSON.stringify(data);
46
- };
47
- this.testIfSupported = function () {
48
- if (typeof _this._storage === 'undefined') {
49
- return false;
50
- }
51
- try {
52
- var x = '__storage_test__';
53
- _this._storage.setItem(x, x);
54
- _this._storage.removeItem(x);
55
- return true;
56
- }
57
- catch (error) {
58
- return error instanceof DOMException
59
- && (error.code === 22 ||
60
- error.code === 1014 ||
61
- error.name === 'QuotaExceededError' ||
62
- error.name === 'NS_ERROR_DOM_QUOTA_REACHED')
63
- && (_this._storage && _this._storage.length !== 0);
64
- }
65
- };
66
- // Check if the storage is supported.
67
- this._isSupported = this.testIfSupported();
68
- }
69
- PolyfillStorage.prototype.get = function (token) {
70
- // Validate that the storage is supported.
71
- if (!this._isSupported) {
72
- return undefined;
73
- }
74
- return this.decode(token);
75
- };
76
- PolyfillStorage.prototype.set = function (token, value, attributes) {
77
- // Validate that the storage is supported.
78
- if (!this._isSupported) {
79
- return;
80
- }
81
- // Stringify the data.
82
- var rawData = this.encode(value, Object.assign({}, attributes));
83
- // Set the raw data in the storage.
84
- this._storage.setItem(token, rawData);
85
- };
86
- PolyfillStorage.prototype.remove = function (token) {
87
- // Validate that the storage is supported.
88
- if (!this._isSupported) {
89
- return;
90
- }
91
- // Remove the item in the storage.
92
- this._storage.removeItem(token);
93
- };
94
- PolyfillStorage.prototype.clear = function () {
95
- // Validate that the storage is supported.
96
- if (!this._isSupported) {
97
- return;
98
- }
99
- // Clear the storage.
100
- this._storage.clear();
101
- };
102
- PolyfillStorage.prototype.isSupported = function () {
103
- return this._isSupported;
104
- };
105
- PolyfillStorage.prototype.decode = function (token) {
106
- // Retrieve the raw data from the storage.
107
- var rawData = this._storage.getItem(token);
108
- // Try to parse the data.
109
- var parsedData = undefined;
110
- // Only parse the data when it is not null.
111
- if (rawData !== null) {
112
- try {
113
- var _b = JSON.parse(rawData), value = _b.value, expires = _b.expires;
114
- if (expires !== undefined) {
115
- var now = Date.now();
116
- var expireDate = new Date(expires).getTime();
117
- if (expireDate <= now) {
118
- this.remove(token);
119
- return undefined;
120
- }
121
- }
122
- parsedData = value;
123
- }
124
- catch (_a) {
125
- // We dont do anything with failed parsing.
126
- }
127
- }
128
- // Return the parsed data.
129
- return parsedData;
130
- };
131
- return PolyfillStorage;
28
+ var PolyfillStorage = /** @class */ (function () {
29
+ function PolyfillStorage(_storage) {
30
+ var _this = this;
31
+ this._storage = _storage;
32
+ // State.
33
+ this._isSupported = false;
34
+ this.encode = function (value, attributes) {
35
+ // Make sure the expires attribute is a date and not a number.
36
+ var data = { value: value };
37
+ if (typeof attributes.expires === 'number') {
38
+ attributes.expires = new Date(attributes.expires);
39
+ }
40
+ if (attributes.expires) {
41
+ data['expires'] = attributes.expires;
42
+ }
43
+ return JSON.stringify(data);
44
+ };
45
+ this.testIfSupported = function () {
46
+ if (typeof _this._storage === 'undefined') {
47
+ return false;
48
+ }
49
+ try {
50
+ var x = '__storage_test__';
51
+ _this._storage.setItem(x, x);
52
+ _this._storage.removeItem(x);
53
+ return true;
54
+ }
55
+ catch (error) {
56
+ return error instanceof DOMException
57
+ && (error.code === 22 ||
58
+ error.code === 1014 ||
59
+ error.name === 'QuotaExceededError' ||
60
+ error.name === 'NS_ERROR_DOM_QUOTA_REACHED')
61
+ && (_this._storage && _this._storage.length !== 0);
62
+ }
63
+ };
64
+ // Check if the storage is supported.
65
+ this._isSupported = this.testIfSupported();
66
+ }
67
+ PolyfillStorage.prototype.get = function (token) {
68
+ // Validate that the storage is supported.
69
+ if (!this._isSupported) {
70
+ return undefined;
71
+ }
72
+ return this.decode(token);
73
+ };
74
+ PolyfillStorage.prototype.set = function (token, value, attributes) {
75
+ // Validate that the storage is supported.
76
+ if (!this._isSupported) {
77
+ return;
78
+ }
79
+ // Stringify the data.
80
+ var rawData = this.encode(value, Object.assign({}, attributes));
81
+ // Set the raw data in the storage.
82
+ this._storage.setItem(token, rawData);
83
+ };
84
+ PolyfillStorage.prototype.remove = function (token) {
85
+ // Validate that the storage is supported.
86
+ if (!this._isSupported) {
87
+ return;
88
+ }
89
+ // Remove the item in the storage.
90
+ this._storage.removeItem(token);
91
+ };
92
+ PolyfillStorage.prototype.clear = function () {
93
+ // Validate that the storage is supported.
94
+ if (!this._isSupported) {
95
+ return;
96
+ }
97
+ // Clear the storage.
98
+ this._storage.clear();
99
+ };
100
+ PolyfillStorage.prototype.isSupported = function () {
101
+ return this._isSupported;
102
+ };
103
+ PolyfillStorage.prototype.decode = function (token) {
104
+ // Retrieve the raw data from the storage.
105
+ var rawData = this._storage.getItem(token);
106
+ // Try to parse the data.
107
+ var parsedData = undefined;
108
+ // Only parse the data when it is not null.
109
+ if (rawData !== null) {
110
+ try {
111
+ var _b = JSON.parse(rawData), value = _b.value, expires = _b.expires;
112
+ if (expires !== undefined) {
113
+ var now = Date.now();
114
+ var expireDate = new Date(expires).getTime();
115
+ if (expireDate <= now) {
116
+ this.remove(token);
117
+ return undefined;
118
+ }
119
+ }
120
+ parsedData = value;
121
+ }
122
+ catch (_a) {
123
+ // We dont do anything with failed parsing.
124
+ }
125
+ }
126
+ // Return the parsed data.
127
+ return parsedData;
128
+ };
129
+ return PolyfillStorage;
132
130
  }());
133
131
 
134
- var CookieStorage = /** @class */ (function () {
135
- function CookieStorage(_isBrowser, _cookieString) {
136
- var _this = this;
137
- this._isBrowser = _isBrowser;
138
- this._cookieString = _cookieString;
139
- // State.
140
- this._isSupported = false;
141
- this.decode = function (cookieString) {
142
- var result = {};
143
- var cookies = cookieString ? cookieString.split('; ') : [];
144
- var rdecode = /(%[0-9A-Z]{2})+/g;
145
- for (var index = 0; index < cookies.length; index++) {
146
- var parts = cookies[index].split('=');
147
- var cookie = parts.slice(1).join('=');
148
- if (cookie.charAt(0) === '"') {
149
- cookie = cookie.slice(1, -1);
150
- }
151
- try {
152
- var name = parts[0].replace(rdecode, decodeURIComponent);
153
- var value = cookie.replace(rdecode, decodeURIComponent);
154
- result[name] = _this.jsonParse(value);
155
- }
156
- catch (_a) {
157
- // Ignore cookies with an invalid name/value encoding.
158
- }
159
- }
160
- return result;
161
- };
162
- this.jsonParse = function (rawValue) {
163
- // Try to parse the data.
164
- var parsedValue = undefined;
165
- // Only parse the value when it is not null.
166
- if (rawValue !== undefined) {
167
- try {
168
- parsedValue = JSON.parse(rawValue);
169
- }
170
- catch (_a) {
171
- // The string could not be parsed to JSON.
172
- }
173
- }
174
- // Return the parsed value.
175
- return parsedValue;
176
- };
177
- this.stringifyAttribute = function (token, value) {
178
- if (!value) {
179
- return '';
180
- }
181
- var stringified = "; " + token;
182
- // Boolean attributes should not have a value.
183
- if (value === true) {
184
- return stringified;
185
- }
186
- return stringified + ("= " + value);
187
- };
188
- this.testIfSupported = function () {
189
- // We are using an aggressive test here, because we cannot rely on navigator.cookieEnabled
190
- // it does not return the correct value at all times.
191
- var testCookieString = "bbcookietest";
192
- try {
193
- document.cookie = testCookieString + "=1";
194
- var result = document.cookie.indexOf(testCookieString + "=") !== -1;
195
- document.cookie = testCookieString + "=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";
196
- return result;
197
- }
198
- catch (_a) {
199
- return false;
200
- }
201
- };
202
- // Check if the storage is supported.
203
- this._isSupported = this.testIfSupported();
204
- }
205
- CookieStorage.prototype.get = function (token) {
206
- // Get all values and pick one out.
207
- var values = this.all();
208
- return values === null || values === void 0 ? void 0 : values[token];
209
- };
210
- CookieStorage.prototype.set = function (token, value, attributes) {
211
- // Validate that the storage is supported.
212
- if (!this._isSupported) {
213
- return;
214
- }
215
- // Write a new cookie.
216
- document.cookie = this.encode(token, value, Object.assign({ path: '/', sameSite: 'Lax' }, attributes));
217
- };
218
- CookieStorage.prototype.remove = function (token, attributes) {
219
- // Validate that the storage is supported.
220
- if (!this._isSupported) {
221
- return;
222
- }
223
- this.set(token, '', Object.assign(Object.assign({}, attributes), { expires: -1 }));
224
- };
225
- CookieStorage.prototype.clear = function (attributes) {
226
- // Validate that the storage is supported.
227
- if (!this._isSupported) {
228
- return;
229
- }
230
- var items = this.all();
231
- for (var token in items) {
232
- this.remove(token, attributes);
233
- }
234
- };
235
- CookieStorage.prototype.isSupported = function () {
236
- return this._isSupported;
237
- };
238
- CookieStorage.prototype.all = function () {
239
- var cookieString = this._isBrowser
240
- ? document === null || document === void 0 ? void 0 : document.cookie
241
- : this._cookieString;
242
- return this.decode(cookieString);
243
- };
244
- CookieStorage.prototype.encode = function (token, value, attributes) {
245
- // Encode the token.
246
- var encodedToken = encodeURIComponent(token)
247
- .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
248
- .replace(/\(/g, '%28').replace(/\)/g, '%29');
249
- var rawValue = JSON.stringify(value);
250
- // Encode the value.
251
- var encodedValue = encodeURIComponent(rawValue)
252
- .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
253
- // Return the completed encoded string.
254
- return [encodedToken, '=', encodedValue, this.stringifyCookie(attributes)].join('');
255
- };
256
- CookieStorage.prototype.stringifyCookie = function (attributes) {
257
- var _a;
258
- // Make sure the expires attribute is a date and not a number.
259
- if (typeof attributes.expires === 'number') {
260
- var expires = new Date();
261
- expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
262
- attributes.expires = expires;
263
- }
264
- // Force secure when sameSite=None.
265
- if (attributes.sameSite === 'None') {
266
- attributes.secure = true;
267
- (_a = console === null || console === void 0 ? void 0 : console.warn) === null || _a === void 0 ? void 0 : _a.call(console, 'Cooke was forced with secure flag because sameSite=None');
268
- }
269
- // Stringify all attributes.
270
- return this.stringifyAttribute('Expires', attributes.expires ? attributes.expires.toUTCString() : '')
271
- + this.stringifyAttribute('Domain', attributes.domain)
272
- + this.stringifyAttribute('Path', attributes.path)
273
- + this.stringifyAttribute('Secure', attributes.secure)
274
- + this.stringifyAttribute('SameSite', attributes.sameSite);
275
- };
276
- return CookieStorage;
132
+ var CookieStorage = /** @class */ (function () {
133
+ function CookieStorage(_isBrowser, _cookieString) {
134
+ var _this = this;
135
+ this._isBrowser = _isBrowser;
136
+ this._cookieString = _cookieString;
137
+ // State.
138
+ this._isSupported = false;
139
+ this.decode = function (cookieString) {
140
+ var result = {};
141
+ var cookies = cookieString ? cookieString.split('; ') : [];
142
+ var rdecode = /(%[0-9A-Z]{2})+/g;
143
+ for (var index = 0; index < cookies.length; index++) {
144
+ var parts = cookies[index].split('=');
145
+ var cookie = parts.slice(1).join('=');
146
+ if (cookie.charAt(0) === '"') {
147
+ cookie = cookie.slice(1, -1);
148
+ }
149
+ try {
150
+ var name = parts[0].replace(rdecode, decodeURIComponent);
151
+ var value = cookie.replace(rdecode, decodeURIComponent);
152
+ result[name] = _this.jsonParse(value);
153
+ }
154
+ catch (_a) {
155
+ // Ignore cookies with an invalid name/value encoding.
156
+ }
157
+ }
158
+ return result;
159
+ };
160
+ this.jsonParse = function (rawValue) {
161
+ // Try to parse the data.
162
+ var parsedValue = undefined;
163
+ // Only parse the value when it is not null.
164
+ if (rawValue !== undefined) {
165
+ try {
166
+ parsedValue = JSON.parse(rawValue);
167
+ }
168
+ catch (_a) {
169
+ // The string could not be parsed to JSON.
170
+ }
171
+ }
172
+ // Return the parsed value.
173
+ return parsedValue;
174
+ };
175
+ this.stringifyAttribute = function (token, value) {
176
+ if (!value) {
177
+ return '';
178
+ }
179
+ var stringified = "; " + token;
180
+ // Boolean attributes should not have a value.
181
+ if (value === true) {
182
+ return stringified;
183
+ }
184
+ return stringified + ("= " + value);
185
+ };
186
+ this.testIfSupported = function () {
187
+ // We are using an aggressive test here, because we cannot rely on navigator.cookieEnabled
188
+ // it does not return the correct value at all times.
189
+ var testCookieString = "bbcookietest";
190
+ try {
191
+ document.cookie = testCookieString + "=1";
192
+ var result = document.cookie.indexOf(testCookieString + "=") !== -1;
193
+ document.cookie = testCookieString + "=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";
194
+ return result;
195
+ }
196
+ catch (_a) {
197
+ return false;
198
+ }
199
+ };
200
+ // Check if the storage is supported.
201
+ this._isSupported = this.testIfSupported();
202
+ }
203
+ CookieStorage.prototype.get = function (token) {
204
+ // Get all values and pick one out.
205
+ var values = this.all();
206
+ return values === null || values === void 0 ? void 0 : values[token];
207
+ };
208
+ CookieStorage.prototype.set = function (token, value, attributes) {
209
+ // Validate that the storage is supported.
210
+ if (!this._isSupported) {
211
+ return;
212
+ }
213
+ // Write a new cookie.
214
+ document.cookie = this.encode(token, value, Object.assign({ path: '/', sameSite: 'Lax' }, attributes));
215
+ };
216
+ CookieStorage.prototype.remove = function (token, attributes) {
217
+ // Validate that the storage is supported.
218
+ if (!this._isSupported) {
219
+ return;
220
+ }
221
+ this.set(token, '', Object.assign(Object.assign({}, attributes), { expires: -1 }));
222
+ };
223
+ CookieStorage.prototype.clear = function (attributes) {
224
+ // Validate that the storage is supported.
225
+ if (!this._isSupported) {
226
+ return;
227
+ }
228
+ var items = this.all();
229
+ for (var token in items) {
230
+ this.remove(token, attributes);
231
+ }
232
+ };
233
+ CookieStorage.prototype.isSupported = function () {
234
+ return this._isSupported;
235
+ };
236
+ CookieStorage.prototype.all = function () {
237
+ var cookieString = this._isBrowser
238
+ ? document === null || document === void 0 ? void 0 : document.cookie
239
+ : this._cookieString;
240
+ return this.decode(cookieString);
241
+ };
242
+ CookieStorage.prototype.encode = function (token, value, attributes) {
243
+ // Encode the token.
244
+ var encodedToken = encodeURIComponent(token)
245
+ .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
246
+ .replace(/\(/g, '%28').replace(/\)/g, '%29');
247
+ var rawValue = JSON.stringify(value);
248
+ // Encode the value.
249
+ var encodedValue = encodeURIComponent(rawValue)
250
+ .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
251
+ // Return the completed encoded string.
252
+ return [encodedToken, '=', encodedValue, this.stringifyCookie(attributes)].join('');
253
+ };
254
+ CookieStorage.prototype.stringifyCookie = function (attributes) {
255
+ var _a;
256
+ // Make sure the expires attribute is a date and not a number.
257
+ if (typeof attributes.expires === 'number') {
258
+ var expires = new Date();
259
+ expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
260
+ attributes.expires = expires;
261
+ }
262
+ // Force secure when sameSite=None.
263
+ if (attributes.sameSite === 'None') {
264
+ attributes.secure = true;
265
+ (_a = console === null || console === void 0 ? void 0 : console.warn) === null || _a === void 0 ? void 0 : _a.call(console, 'Cooke was forced with secure flag because sameSite=None');
266
+ }
267
+ // Stringify all attributes.
268
+ return this.stringifyAttribute('Expires', attributes.expires ? attributes.expires.toUTCString() : '')
269
+ + this.stringifyAttribute('Domain', attributes.domain)
270
+ + this.stringifyAttribute('Path', attributes.path)
271
+ + this.stringifyAttribute('Secure', attributes.secure)
272
+ + this.stringifyAttribute('SameSite', attributes.sameSite);
273
+ };
274
+ return CookieStorage;
277
275
  }());
278
276
 
279
- var MemoryStorage = /** @class */ (function () {
280
- function MemoryStorage() {
281
- // State.
282
- this._storage = {};
283
- this.encode = function (value, attributes) {
284
- var data = { value: value };
285
- // Make sure the expires is a date object.
286
- if (typeof attributes.expires === 'number') {
287
- attributes.expires = new Date(attributes.expires);
288
- }
289
- // Add the expire date if it was set.
290
- if (attributes.expires) {
291
- data['expires'] = attributes.expires;
292
- }
293
- // Return the encoded data.
294
- return data;
295
- };
296
- }
297
- MemoryStorage.prototype.get = function (token) {
298
- // Grab the data from the memory storage.
299
- var result = this._storage[token];
300
- // Validate the data exists.
301
- if (result === undefined) {
302
- return undefined;
303
- }
304
- // Extract the value and expire date.
305
- var value = result.value, expires = result.expires;
306
- // Validate the value is still valid.
307
- if (expires !== undefined) {
308
- var now = Date.now();
309
- var expireDate = new Date(expires).getTime();
310
- // Remove the value if it is expired.
311
- if (expireDate <= now) {
312
- this.remove(token);
313
- return undefined;
314
- }
315
- }
316
- // Return the value.
317
- return value;
318
- };
319
- MemoryStorage.prototype.set = function (token, value, attributes) {
320
- // Save the encoded value with the attributes.
321
- this._storage[token] = this.encode(value, Object.assign({}, attributes));
322
- };
323
- MemoryStorage.prototype.remove = function (token) {
324
- delete this._storage[token];
325
- };
326
- MemoryStorage.prototype.clear = function () {
327
- this._storage = {};
328
- };
329
- MemoryStorage.prototype.isSupported = function () {
330
- // The memory storage is always supported.
331
- return true;
332
- };
333
- return MemoryStorage;
277
+ var MemoryStorage = /** @class */ (function () {
278
+ function MemoryStorage() {
279
+ // State.
280
+ this._storage = {};
281
+ this.encode = function (value, attributes) {
282
+ var data = { value: value };
283
+ // Make sure the expires is a date object.
284
+ if (typeof attributes.expires === 'number') {
285
+ attributes.expires = new Date(attributes.expires);
286
+ }
287
+ // Add the expire date if it was set.
288
+ if (attributes.expires) {
289
+ data['expires'] = attributes.expires;
290
+ }
291
+ // Return the encoded data.
292
+ return data;
293
+ };
294
+ }
295
+ MemoryStorage.prototype.get = function (token) {
296
+ // Grab the data from the memory storage.
297
+ var result = this._storage[token];
298
+ // Validate the data exists.
299
+ if (result === undefined) {
300
+ return undefined;
301
+ }
302
+ // Extract the value and expire date.
303
+ var value = result.value, expires = result.expires;
304
+ // Validate the value is still valid.
305
+ if (expires !== undefined) {
306
+ var now = Date.now();
307
+ var expireDate = new Date(expires).getTime();
308
+ // Remove the value if it is expired.
309
+ if (expireDate <= now) {
310
+ this.remove(token);
311
+ return undefined;
312
+ }
313
+ }
314
+ // Return the value.
315
+ return value;
316
+ };
317
+ MemoryStorage.prototype.set = function (token, value, attributes) {
318
+ // Save the encoded value with the attributes.
319
+ this._storage[token] = this.encode(value, Object.assign({}, attributes));
320
+ };
321
+ MemoryStorage.prototype.remove = function (token) {
322
+ delete this._storage[token];
323
+ };
324
+ MemoryStorage.prototype.clear = function () {
325
+ this._storage = {};
326
+ };
327
+ MemoryStorage.prototype.isSupported = function () {
328
+ // The memory storage is always supported.
329
+ return true;
330
+ };
331
+ return MemoryStorage;
334
332
  }());
335
333
 
336
- /*! *****************************************************************************
337
- Copyright (c) Microsoft Corporation.
338
-
339
- Permission to use, copy, modify, and/or distribute this software for any
340
- purpose with or without fee is hereby granted.
341
-
342
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
343
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
344
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
345
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
346
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
347
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
348
- PERFORMANCE OF THIS SOFTWARE.
349
- ***************************************************************************** */
350
- /* global Reflect, Promise */
351
- var extendStatics = function (d, b) {
352
- extendStatics = Object.setPrototypeOf ||
353
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
354
- function (d, b) { for (var p in b)
355
- if (Object.prototype.hasOwnProperty.call(b, p))
356
- d[p] = b[p]; };
357
- return extendStatics(d, b);
358
- };
359
- function __extends(d, b) {
360
- if (typeof b !== "function" && b !== null)
361
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
362
- extendStatics(d, b);
363
- function __() { this.constructor = d; }
364
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
365
- }
366
- var __assign = function () {
367
- __assign = Object.assign || function __assign(t) {
368
- for (var s, i = 1, n = arguments.length; i < n; i++) {
369
- s = arguments[i];
370
- for (var p in s)
371
- if (Object.prototype.hasOwnProperty.call(s, p))
372
- t[p] = s[p];
373
- }
374
- return t;
375
- };
376
- return __assign.apply(this, arguments);
377
- };
378
- function __rest(s, e) {
379
- var t = {};
380
- for (var p in s)
381
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
382
- t[p] = s[p];
383
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
384
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
385
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
386
- t[p[i]] = s[p[i]];
387
- }
388
- return t;
389
- }
390
- function __decorate(decorators, target, key, desc) {
391
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
392
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
393
- r = Reflect.decorate(decorators, target, key, desc);
394
- else
395
- for (var i = decorators.length - 1; i >= 0; i--)
396
- if (d = decorators[i])
397
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
398
- return c > 3 && r && Object.defineProperty(target, key, r), r;
399
- }
400
- function __param(paramIndex, decorator) {
401
- return function (target, key) { decorator(target, key, paramIndex); };
402
- }
403
- function __metadata(metadataKey, metadataValue) {
404
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
405
- return Reflect.metadata(metadataKey, metadataValue);
406
- }
407
- function __awaiter(thisArg, _arguments, P, generator) {
408
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
409
- return new (P || (P = Promise))(function (resolve, reject) {
410
- function fulfilled(value) { try {
411
- step(generator.next(value));
412
- }
413
- catch (e) {
414
- reject(e);
415
- } }
416
- function rejected(value) { try {
417
- step(generator["throw"](value));
418
- }
419
- catch (e) {
420
- reject(e);
421
- } }
422
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
423
- step((generator = generator.apply(thisArg, _arguments || [])).next());
424
- });
425
- }
426
- function __generator(thisArg, body) {
427
- var _ = { label: 0, sent: function () { if (t[0] & 1)
428
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
429
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
430
- function verb(n) { return function (v) { return step([n, v]); }; }
431
- function step(op) {
432
- if (f)
433
- throw new TypeError("Generator is already executing.");
434
- while (_)
435
- try {
436
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
437
- return t;
438
- if (y = 0, t)
439
- op = [op[0] & 2, t.value];
440
- switch (op[0]) {
441
- case 0:
442
- case 1:
443
- t = op;
444
- break;
445
- case 4:
446
- _.label++;
447
- return { value: op[1], done: false };
448
- case 5:
449
- _.label++;
450
- y = op[1];
451
- op = [0];
452
- continue;
453
- case 7:
454
- op = _.ops.pop();
455
- _.trys.pop();
456
- continue;
457
- default:
458
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
459
- _ = 0;
460
- continue;
461
- }
462
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
463
- _.label = op[1];
464
- break;
465
- }
466
- if (op[0] === 6 && _.label < t[1]) {
467
- _.label = t[1];
468
- t = op;
469
- break;
470
- }
471
- if (t && _.label < t[2]) {
472
- _.label = t[2];
473
- _.ops.push(op);
474
- break;
475
- }
476
- if (t[2])
477
- _.ops.pop();
478
- _.trys.pop();
479
- continue;
480
- }
481
- op = body.call(thisArg, _);
482
- }
483
- catch (e) {
484
- op = [6, e];
485
- y = 0;
486
- }
487
- finally {
488
- f = t = 0;
489
- }
490
- if (op[0] & 5)
491
- throw op[1];
492
- return { value: op[0] ? op[1] : void 0, done: true };
493
- }
494
- }
495
- var __createBinding = Object.create ? (function (o, m, k, k2) {
496
- if (k2 === undefined)
497
- k2 = k;
498
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
499
- }) : (function (o, m, k, k2) {
500
- if (k2 === undefined)
501
- k2 = k;
502
- o[k2] = m[k];
503
- });
504
- function __exportStar(m, o) {
505
- for (var p in m)
506
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
507
- __createBinding(o, m, p);
508
- }
509
- function __values(o) {
510
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
511
- if (m)
512
- return m.call(o);
513
- if (o && typeof o.length === "number")
514
- return {
515
- next: function () {
516
- if (o && i >= o.length)
517
- o = void 0;
518
- return { value: o && o[i++], done: !o };
519
- }
520
- };
521
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
522
- }
523
- function __read(o, n) {
524
- var m = typeof Symbol === "function" && o[Symbol.iterator];
525
- if (!m)
526
- return o;
527
- var i = m.call(o), r, ar = [], e;
528
- try {
529
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
530
- ar.push(r.value);
531
- }
532
- catch (error) {
533
- e = { error: error };
534
- }
535
- finally {
536
- try {
537
- if (r && !r.done && (m = i["return"]))
538
- m.call(i);
539
- }
540
- finally {
541
- if (e)
542
- throw e.error;
543
- }
544
- }
545
- return ar;
546
- }
547
- /** @deprecated */
548
- function __spread() {
549
- for (var ar = [], i = 0; i < arguments.length; i++)
550
- ar = ar.concat(__read(arguments[i]));
551
- return ar;
552
- }
553
- /** @deprecated */
554
- function __spreadArrays() {
555
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
556
- s += arguments[i].length;
557
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
558
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
559
- r[k] = a[j];
560
- return r;
561
- }
562
- function __spreadArray(to, from, pack) {
563
- if (pack || arguments.length === 2)
564
- for (var i = 0, l = from.length, ar; i < l; i++) {
565
- if (ar || !(i in from)) {
566
- if (!ar)
567
- ar = Array.prototype.slice.call(from, 0, i);
568
- ar[i] = from[i];
569
- }
570
- }
571
- return to.concat(ar || from);
572
- }
573
- function __await(v) {
574
- return this instanceof __await ? (this.v = v, this) : new __await(v);
575
- }
576
- function __asyncGenerator(thisArg, _arguments, generator) {
577
- if (!Symbol.asyncIterator)
578
- throw new TypeError("Symbol.asyncIterator is not defined.");
579
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
580
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
581
- function verb(n) { if (g[n])
582
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
583
- function resume(n, v) { try {
584
- step(g[n](v));
585
- }
586
- catch (e) {
587
- settle(q[0][3], e);
588
- } }
589
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
590
- function fulfill(value) { resume("next", value); }
591
- function reject(value) { resume("throw", value); }
592
- function settle(f, v) { if (f(v), q.shift(), q.length)
593
- resume(q[0][0], q[0][1]); }
594
- }
595
- function __asyncDelegator(o) {
596
- var i, p;
597
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
598
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
599
- }
600
- function __asyncValues(o) {
601
- if (!Symbol.asyncIterator)
602
- throw new TypeError("Symbol.asyncIterator is not defined.");
603
- var m = o[Symbol.asyncIterator], i;
604
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
605
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
606
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
607
- }
608
- function __makeTemplateObject(cooked, raw) {
609
- if (Object.defineProperty) {
610
- Object.defineProperty(cooked, "raw", { value: raw });
611
- }
612
- else {
613
- cooked.raw = raw;
614
- }
615
- return cooked;
616
- }
617
- ;
618
- var __setModuleDefault = Object.create ? (function (o, v) {
619
- Object.defineProperty(o, "default", { enumerable: true, value: v });
620
- }) : function (o, v) {
621
- o["default"] = v;
622
- };
623
- function __importStar(mod) {
624
- if (mod && mod.__esModule)
625
- return mod;
626
- var result = {};
627
- if (mod != null)
628
- for (var k in mod)
629
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
630
- __createBinding(result, mod, k);
631
- __setModuleDefault(result, mod);
632
- return result;
633
- }
634
- function __importDefault(mod) {
635
- return (mod && mod.__esModule) ? mod : { default: mod };
636
- }
637
- function __classPrivateFieldGet(receiver, state, kind, f) {
638
- if (kind === "a" && !f)
639
- throw new TypeError("Private accessor was defined without a getter");
640
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
641
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
642
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
643
- }
644
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
645
- if (kind === "m")
646
- throw new TypeError("Private method is not writable");
647
- if (kind === "a" && !f)
648
- throw new TypeError("Private accessor was defined without a setter");
649
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
650
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
651
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
334
+ /*! *****************************************************************************
335
+ Copyright (c) Microsoft Corporation.
336
+
337
+ Permission to use, copy, modify, and/or distribute this software for any
338
+ purpose with or without fee is hereby granted.
339
+
340
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
341
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
342
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
343
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
344
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
345
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
346
+ PERFORMANCE OF THIS SOFTWARE.
347
+ ***************************************************************************** */
348
+ /* global Reflect, Promise */
349
+ var extendStatics = function (d, b) {
350
+ extendStatics = Object.setPrototypeOf ||
351
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
352
+ function (d, b) { for (var p in b)
353
+ if (Object.prototype.hasOwnProperty.call(b, p))
354
+ d[p] = b[p]; };
355
+ return extendStatics(d, b);
356
+ };
357
+ function __extends(d, b) {
358
+ if (typeof b !== "function" && b !== null)
359
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
360
+ extendStatics(d, b);
361
+ function __() { this.constructor = d; }
362
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
363
+ }
364
+ var __assign = function () {
365
+ __assign = Object.assign || function __assign(t) {
366
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
367
+ s = arguments[i];
368
+ for (var p in s)
369
+ if (Object.prototype.hasOwnProperty.call(s, p))
370
+ t[p] = s[p];
371
+ }
372
+ return t;
373
+ };
374
+ return __assign.apply(this, arguments);
375
+ };
376
+ function __rest(s, e) {
377
+ var t = {};
378
+ for (var p in s)
379
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
380
+ t[p] = s[p];
381
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
382
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
383
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
384
+ t[p[i]] = s[p[i]];
385
+ }
386
+ return t;
387
+ }
388
+ function __decorate(decorators, target, key, desc) {
389
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
390
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
391
+ r = Reflect.decorate(decorators, target, key, desc);
392
+ else
393
+ for (var i = decorators.length - 1; i >= 0; i--)
394
+ if (d = decorators[i])
395
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
396
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
397
+ }
398
+ function __param(paramIndex, decorator) {
399
+ return function (target, key) { decorator(target, key, paramIndex); };
400
+ }
401
+ function __metadata(metadataKey, metadataValue) {
402
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
403
+ return Reflect.metadata(metadataKey, metadataValue);
404
+ }
405
+ function __awaiter(thisArg, _arguments, P, generator) {
406
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
407
+ return new (P || (P = Promise))(function (resolve, reject) {
408
+ function fulfilled(value) { try {
409
+ step(generator.next(value));
410
+ }
411
+ catch (e) {
412
+ reject(e);
413
+ } }
414
+ function rejected(value) { try {
415
+ step(generator["throw"](value));
416
+ }
417
+ catch (e) {
418
+ reject(e);
419
+ } }
420
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
421
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
422
+ });
423
+ }
424
+ function __generator(thisArg, body) {
425
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
426
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
427
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
428
+ function verb(n) { return function (v) { return step([n, v]); }; }
429
+ function step(op) {
430
+ if (f)
431
+ throw new TypeError("Generator is already executing.");
432
+ while (_)
433
+ try {
434
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
435
+ return t;
436
+ if (y = 0, t)
437
+ op = [op[0] & 2, t.value];
438
+ switch (op[0]) {
439
+ case 0:
440
+ case 1:
441
+ t = op;
442
+ break;
443
+ case 4:
444
+ _.label++;
445
+ return { value: op[1], done: false };
446
+ case 5:
447
+ _.label++;
448
+ y = op[1];
449
+ op = [0];
450
+ continue;
451
+ case 7:
452
+ op = _.ops.pop();
453
+ _.trys.pop();
454
+ continue;
455
+ default:
456
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
457
+ _ = 0;
458
+ continue;
459
+ }
460
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
461
+ _.label = op[1];
462
+ break;
463
+ }
464
+ if (op[0] === 6 && _.label < t[1]) {
465
+ _.label = t[1];
466
+ t = op;
467
+ break;
468
+ }
469
+ if (t && _.label < t[2]) {
470
+ _.label = t[2];
471
+ _.ops.push(op);
472
+ break;
473
+ }
474
+ if (t[2])
475
+ _.ops.pop();
476
+ _.trys.pop();
477
+ continue;
478
+ }
479
+ op = body.call(thisArg, _);
480
+ }
481
+ catch (e) {
482
+ op = [6, e];
483
+ y = 0;
484
+ }
485
+ finally {
486
+ f = t = 0;
487
+ }
488
+ if (op[0] & 5)
489
+ throw op[1];
490
+ return { value: op[0] ? op[1] : void 0, done: true };
491
+ }
492
+ }
493
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
494
+ if (k2 === undefined)
495
+ k2 = k;
496
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
497
+ }) : (function (o, m, k, k2) {
498
+ if (k2 === undefined)
499
+ k2 = k;
500
+ o[k2] = m[k];
501
+ });
502
+ function __exportStar(m, o) {
503
+ for (var p in m)
504
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
505
+ __createBinding(o, m, p);
506
+ }
507
+ function __values(o) {
508
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
509
+ if (m)
510
+ return m.call(o);
511
+ if (o && typeof o.length === "number")
512
+ return {
513
+ next: function () {
514
+ if (o && i >= o.length)
515
+ o = void 0;
516
+ return { value: o && o[i++], done: !o };
517
+ }
518
+ };
519
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
520
+ }
521
+ function __read(o, n) {
522
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
523
+ if (!m)
524
+ return o;
525
+ var i = m.call(o), r, ar = [], e;
526
+ try {
527
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
528
+ ar.push(r.value);
529
+ }
530
+ catch (error) {
531
+ e = { error: error };
532
+ }
533
+ finally {
534
+ try {
535
+ if (r && !r.done && (m = i["return"]))
536
+ m.call(i);
537
+ }
538
+ finally {
539
+ if (e)
540
+ throw e.error;
541
+ }
542
+ }
543
+ return ar;
544
+ }
545
+ /** @deprecated */
546
+ function __spread() {
547
+ for (var ar = [], i = 0; i < arguments.length; i++)
548
+ ar = ar.concat(__read(arguments[i]));
549
+ return ar;
550
+ }
551
+ /** @deprecated */
552
+ function __spreadArrays() {
553
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
554
+ s += arguments[i].length;
555
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
556
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
557
+ r[k] = a[j];
558
+ return r;
559
+ }
560
+ function __spreadArray(to, from, pack) {
561
+ if (pack || arguments.length === 2)
562
+ for (var i = 0, l = from.length, ar; i < l; i++) {
563
+ if (ar || !(i in from)) {
564
+ if (!ar)
565
+ ar = Array.prototype.slice.call(from, 0, i);
566
+ ar[i] = from[i];
567
+ }
568
+ }
569
+ return to.concat(ar || Array.prototype.slice.call(from));
570
+ }
571
+ function __await(v) {
572
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
573
+ }
574
+ function __asyncGenerator(thisArg, _arguments, generator) {
575
+ if (!Symbol.asyncIterator)
576
+ throw new TypeError("Symbol.asyncIterator is not defined.");
577
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
578
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
579
+ function verb(n) { if (g[n])
580
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
581
+ function resume(n, v) { try {
582
+ step(g[n](v));
583
+ }
584
+ catch (e) {
585
+ settle(q[0][3], e);
586
+ } }
587
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
588
+ function fulfill(value) { resume("next", value); }
589
+ function reject(value) { resume("throw", value); }
590
+ function settle(f, v) { if (f(v), q.shift(), q.length)
591
+ resume(q[0][0], q[0][1]); }
592
+ }
593
+ function __asyncDelegator(o) {
594
+ var i, p;
595
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
596
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
597
+ }
598
+ function __asyncValues(o) {
599
+ if (!Symbol.asyncIterator)
600
+ throw new TypeError("Symbol.asyncIterator is not defined.");
601
+ var m = o[Symbol.asyncIterator], i;
602
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
603
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
604
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
605
+ }
606
+ function __makeTemplateObject(cooked, raw) {
607
+ if (Object.defineProperty) {
608
+ Object.defineProperty(cooked, "raw", { value: raw });
609
+ }
610
+ else {
611
+ cooked.raw = raw;
612
+ }
613
+ return cooked;
614
+ }
615
+ ;
616
+ var __setModuleDefault = Object.create ? (function (o, v) {
617
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
618
+ }) : function (o, v) {
619
+ o["default"] = v;
620
+ };
621
+ function __importStar(mod) {
622
+ if (mod && mod.__esModule)
623
+ return mod;
624
+ var result = {};
625
+ if (mod != null)
626
+ for (var k in mod)
627
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
628
+ __createBinding(result, mod, k);
629
+ __setModuleDefault(result, mod);
630
+ return result;
631
+ }
632
+ function __importDefault(mod) {
633
+ return (mod && mod.__esModule) ? mod : { default: mod };
634
+ }
635
+ function __classPrivateFieldGet(receiver, state, kind, f) {
636
+ if (kind === "a" && !f)
637
+ throw new TypeError("Private accessor was defined without a getter");
638
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
639
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
640
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
641
+ }
642
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
643
+ if (kind === "m")
644
+ throw new TypeError("Private method is not writable");
645
+ if (kind === "a" && !f)
646
+ throw new TypeError("Private accessor was defined without a setter");
647
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
648
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
649
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
652
650
  }
653
651
 
654
- var Storage = /** @class */ (function () {
655
- function Storage(_platform, _cookieString) {
656
- var _d;
657
- this._platform = _platform;
658
- this._cookieString = _cookieString;
659
- // Current selected storage strategy.
660
- this._current = null;
661
- this.getLocalStorage = function () {
662
- try {
663
- return (typeof window !== 'undefined') ? window === null || window === void 0 ? void 0 : window.localStorage : null;
664
- }
665
- catch (_a) {
666
- return null;
667
- }
668
- };
669
- this.getSessionStorage = function () {
670
- try {
671
- return (typeof window !== 'undefined') ? window === null || window === void 0 ? void 0 : window.sessionStorage : null;
672
- }
673
- catch (_a) {
674
- return null;
675
- }
676
- };
677
- this._strategies = (_d = {},
678
- _d["local" /* Local */] = new PolyfillStorage(this.getLocalStorage()),
679
- _d["cookie" /* Cookie */] = new CookieStorage(this._platform.isBrowser, this._cookieString),
680
- _d["session" /* Session */] = new PolyfillStorage(this.getSessionStorage()),
681
- _d["memory" /* Memory */] = new MemoryStorage(),
682
- _d);
683
- this._current = this.findBestStorageStrategy();
684
- }
685
- Storage.prototype.select = function (option) {
686
- var e_1, _d;
687
- var _a, _b, _c;
688
- var items = Array.isArray(option) ? option : [option];
689
- try {
690
- for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
691
- var item = items_1_1.value;
692
- var strategy = (_b = (_a = this._strategies) === null || _a === void 0 ? void 0 : _a[item]) !== null && _b !== void 0 ? _b : null;
693
- if (strategy && strategy.isSupported()) {
694
- return strategy;
695
- }
696
- }
697
- }
698
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
699
- finally {
700
- try {
701
- if (items_1_1 && !items_1_1.done && (_d = items_1.return)) _d.call(items_1);
702
- }
703
- finally { if (e_1) throw e_1.error; }
704
- }
705
- if (i0.isDevMode()) {
706
- (_c = console === null || console === void 0 ? void 0 : console.warn) === null || _c === void 0 ? void 0 : _c.call(console, '[Storage]: Could not select proper storage option, using memory fallback.');
707
- }
708
- // Always return as a fallback the memory storage since it should be always available.
709
- return this._strategies.memory;
710
- };
711
- Object.defineProperty(Storage.prototype, "local", {
712
- get: function () {
713
- return this._strategies.local;
714
- },
715
- enumerable: false,
716
- configurable: true
717
- });
718
- Object.defineProperty(Storage.prototype, "cookie", {
719
- get: function () {
720
- return this._strategies.cookie;
721
- },
722
- enumerable: false,
723
- configurable: true
724
- });
725
- Object.defineProperty(Storage.prototype, "session", {
726
- get: function () {
727
- return this._strategies.session;
728
- },
729
- enumerable: false,
730
- configurable: true
731
- });
732
- Object.defineProperty(Storage.prototype, "memory", {
733
- get: function () {
734
- return this._strategies.memory;
735
- },
736
- enumerable: false,
737
- configurable: true
738
- });
739
- Storage.prototype.get = function (token) {
740
- return this._current.get(token);
741
- };
742
- Storage.prototype.set = function (token, value, attributes) {
743
- this._current.set(token, value, attributes);
744
- };
745
- Storage.prototype.remove = function (token, attributes) {
746
- this._current.remove(token, attributes);
747
- };
748
- Storage.prototype.clear = function (attributes) {
749
- this._current.clear(attributes);
750
- };
751
- Storage.prototype.isSupported = function () {
752
- return !!this._current;
753
- };
754
- Storage.prototype.findBestStorageStrategy = function () {
755
- var _a, _b;
756
- // Loop through all available strategies to find the best.
757
- for (var type in this._strategies) {
758
- var strategy = (_a = this._strategies) === null || _a === void 0 ? void 0 : _a[type];
759
- // The first supported strategy is the best.
760
- if (strategy === null || strategy === void 0 ? void 0 : strategy.isSupported()) {
761
- return strategy;
762
- }
763
- }
764
- // If no strategy was returned we fallback to memory
765
- // storage since it should be available always.
766
- if (i0.isDevMode()) {
767
- (_b = console === null || console === void 0 ? void 0 : console.warn) === null || _b === void 0 ? void 0 : _b.call(console, '[Storage]: Could not select proper storage option, using memory fallback.');
768
- }
769
- return this._strategies.memory;
770
- };
771
- return Storage;
772
- }());
773
- Storage.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: Storage, deps: [{ token: i1__namespace.Platform }, { token: i1.COOKIE, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
774
- Storage.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: Storage, providedIn: 'root' });
775
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0__namespace, type: Storage, decorators: [{
776
- type: i0.Injectable,
777
- args: [{
778
- providedIn: 'root'
779
- }]
780
- }], ctorParameters: function () {
781
- return [{ type: i1__namespace.Platform }, { type: undefined, decorators: [{
782
- type: i0.Optional
783
- }, {
784
- type: i0.Inject,
785
- args: [i1.COOKIE]
786
- }] }];
652
+ var Storage = /** @class */ (function () {
653
+ function Storage(_platform, _cookieString) {
654
+ var _d;
655
+ this._platform = _platform;
656
+ this._cookieString = _cookieString;
657
+ // Current selected storage strategy.
658
+ this._current = null;
659
+ this.getLocalStorage = function () {
660
+ try {
661
+ return (typeof window !== 'undefined') ? window === null || window === void 0 ? void 0 : window.localStorage : null;
662
+ }
663
+ catch (_a) {
664
+ return null;
665
+ }
666
+ };
667
+ this.getSessionStorage = function () {
668
+ try {
669
+ return (typeof window !== 'undefined') ? window === null || window === void 0 ? void 0 : window.sessionStorage : null;
670
+ }
671
+ catch (_a) {
672
+ return null;
673
+ }
674
+ };
675
+ this._strategies = (_d = {},
676
+ _d["local" /* Local */] = new PolyfillStorage(this.getLocalStorage()),
677
+ _d["cookie" /* Cookie */] = new CookieStorage(this._platform.isBrowser, this._cookieString),
678
+ _d["session" /* Session */] = new PolyfillStorage(this.getSessionStorage()),
679
+ _d["memory" /* Memory */] = new MemoryStorage(),
680
+ _d);
681
+ this._current = this.findBestStorageStrategy();
682
+ }
683
+ Storage.prototype.select = function (option) {
684
+ var e_1, _d;
685
+ var _a, _b, _c;
686
+ var items = Array.isArray(option) ? option : [option];
687
+ try {
688
+ for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
689
+ var item = items_1_1.value;
690
+ var strategy = (_b = (_a = this._strategies) === null || _a === void 0 ? void 0 : _a[item]) !== null && _b !== void 0 ? _b : null;
691
+ if (strategy && strategy.isSupported()) {
692
+ return strategy;
693
+ }
694
+ }
695
+ }
696
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
697
+ finally {
698
+ try {
699
+ if (items_1_1 && !items_1_1.done && (_d = items_1.return)) _d.call(items_1);
700
+ }
701
+ finally { if (e_1) throw e_1.error; }
702
+ }
703
+ if (i0.isDevMode()) {
704
+ (_c = console === null || console === void 0 ? void 0 : console.warn) === null || _c === void 0 ? void 0 : _c.call(console, '[Storage]: Could not select proper storage option, using memory fallback.');
705
+ }
706
+ // Always return as a fallback the memory storage since it should be always available.
707
+ return this._strategies.memory;
708
+ };
709
+ Object.defineProperty(Storage.prototype, "local", {
710
+ get: function () {
711
+ return this._strategies.local;
712
+ },
713
+ enumerable: false,
714
+ configurable: true
715
+ });
716
+ Object.defineProperty(Storage.prototype, "cookie", {
717
+ get: function () {
718
+ return this._strategies.cookie;
719
+ },
720
+ enumerable: false,
721
+ configurable: true
722
+ });
723
+ Object.defineProperty(Storage.prototype, "session", {
724
+ get: function () {
725
+ return this._strategies.session;
726
+ },
727
+ enumerable: false,
728
+ configurable: true
729
+ });
730
+ Object.defineProperty(Storage.prototype, "memory", {
731
+ get: function () {
732
+ return this._strategies.memory;
733
+ },
734
+ enumerable: false,
735
+ configurable: true
736
+ });
737
+ Storage.prototype.get = function (token) {
738
+ return this._current.get(token);
739
+ };
740
+ Storage.prototype.set = function (token, value, attributes) {
741
+ this._current.set(token, value, attributes);
742
+ };
743
+ Storage.prototype.remove = function (token, attributes) {
744
+ this._current.remove(token, attributes);
745
+ };
746
+ Storage.prototype.clear = function (attributes) {
747
+ this._current.clear(attributes);
748
+ };
749
+ Storage.prototype.isSupported = function () {
750
+ return !!this._current;
751
+ };
752
+ Storage.prototype.findBestStorageStrategy = function () {
753
+ var _a, _b;
754
+ // Loop through all available strategies to find the best.
755
+ for (var type in this._strategies) {
756
+ var strategy = (_a = this._strategies) === null || _a === void 0 ? void 0 : _a[type];
757
+ // The first supported strategy is the best.
758
+ if (strategy === null || strategy === void 0 ? void 0 : strategy.isSupported()) {
759
+ return strategy;
760
+ }
761
+ }
762
+ // If no strategy was returned we fallback to memory
763
+ // storage since it should be available always.
764
+ if (i0.isDevMode()) {
765
+ (_b = console === null || console === void 0 ? void 0 : console.warn) === null || _b === void 0 ? void 0 : _b.call(console, '[Storage]: Could not select proper storage option, using memory fallback.');
766
+ }
767
+ return this._strategies.memory;
768
+ };
769
+ return Storage;
770
+ }());
771
+ Storage.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: Storage, deps: [{ token: i1__namespace.Platform }, { token: i1.COOKIE, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
772
+ Storage.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: Storage, providedIn: 'root' });
773
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: Storage, decorators: [{
774
+ type: i0.Injectable,
775
+ args: [{
776
+ providedIn: 'root'
777
+ }]
778
+ }], ctorParameters: function () {
779
+ return [{ type: i1__namespace.Platform }, { type: undefined, decorators: [{
780
+ type: i0.Optional
781
+ }, {
782
+ type: i0.Inject,
783
+ args: [i1.COOKIE]
784
+ }] }];
787
785
  } });
788
786
 
789
- /**
790
- * Generated bundle index. Do not edit.
787
+ /**
788
+ * Generated bundle index. Do not edit.
791
789
  */
792
790
 
793
791
  exports.CookieStorage = CookieStorage;
@@ -797,5 +795,5 @@
797
795
 
798
796
  Object.defineProperty(exports, '__esModule', { value: true });
799
797
 
800
- })));
798
+ }));
801
799
  //# sourceMappingURL=bravobit-bb-foundation-storage.umd.js.map